:root {
  --tabs-height: 48px;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background-color: #0b192f;
}

.layout {
  display: flex;
  height: 100%;
  width: 100%;
  color: #f5f5f5;
}

.sidebar {
  background: #121212;
  width: 250px;
  min-width: 0;
  transition: width 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar.closed {
  width: 0;
  overflow: hidden;
}

.sidebar .header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  height: var(--tabs-height);
  background: #0c0c0c;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sidebar .nav {
  padding: 0;
  margin: 0;
}

.sidebar .nav-link {
  width: 100%;
  text-align: left;
  padding: 12px 20px;
  color: #f0f0f0;
  background: transparent;
  border: none;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.15s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-bar {
  display: flex;
  align-items: center;
  background: #101010;
  height: var(--tabs-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
  padding: 0 8px;
}

.toggle-btn {
  padding: 6px 10px;
  background: transparent;
  border: none;
  color: #f5f5f5;
  font-size: 1.3rem;
  cursor: pointer;
}

.toggle-btn:hover,
.toggle-btn:focus {
  color: #50fa7b;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  background: #1b1b1b;
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  position: relative;
  color: #e8e8e8;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tab.active {
  background: #222;
  border-color: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  transform: translateY(1px);
}

.tab .close {
  margin-left: 4px;
  padding: 0 4px;
  font-size: 1rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.tab .close:hover {
  color: #ff6b6b;
}

.content {
  flex: 1;
  background: #050b16;
  overflow: hidden;
  position: relative;
}

.content iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  background: transparent;
}

.content iframe.active {
  display: block;
}

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    z-index: 3;
    height: 100%;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
  }

  .sidebar.closed {
    pointer-events: none;
  }
}
