/* 1. YUQORI TASMA (TOP NAVBAR) - ChatGPT Uslubidagi Nafis Header */
.top-nav {
  height: var(--header-height);
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 19px;
  height: 19px;
  color: var(--primary);
}

.header-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.header-toggle-icon:hover {
  background: var(--bg-bar-hover);
  border-color: var(--border-hairline);
  color: var(--text-main);
  transform: scale(1.04);
}

.header-toggle-icon:active {
  transform: scale(0.96);
}

/* Mavzu almashtirish ikonkalari (Qorong'i rejimda Oy, Yorug' rejimda Quyosh) */
.theme-icon-moon {
  display: block;
  width: 17px;
  height: 17px;
  color: #94a3b8;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.theme-icon-sun {
  display: none;
  width: 18px;
  height: 18px;
  color: #d97706;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

/* data-theme="light" bo'lganda Quyosh ko'rinadi */
[data-theme="light"] .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: block;
}

.header-toggle-icon:hover .theme-icon-moon {
  transform: rotate(-15deg) scale(1.12);
  color: #e2e8f0;
}

.header-toggle-icon:hover .theme-icon-sun {
  transform: rotate(25deg) scale(1.12);
  color: #f59e0b;
}

/* ChatGPT Uslubidagi O'rtadagi Pill Switcher ([ Chat | + Work ] kabi) */
.nav-pill-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-bar);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.mode-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-pill-btn:hover {
  color: var(--text-main);
}

.mode-pill-btn.active {
  background: var(--bg-pill-active);
  color: var(--text-pill-active);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .top-nav {
  background: #ffffff;
}

[data-theme="light"] .mode-pill-btn.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 163, 127, 0.08);
  border: 1px solid rgba(16, 163, 127, 0.2);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
}

.user-status-indicator .dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--primary);
}

/* 2. ASOSIY IKKI USTUNLI QOBIQ */
.layout-container {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  width: 100%;
}

/* 3. CHAP SIDEBAR (ChatGPT Sidebar Uslubi) */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  padding: 0.85rem 0;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

.sidebar-new-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.25rem 0.75rem 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-new-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
}

.sidebar-new-btn svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.sidebar-category {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-subtle);
  padding: 0.75rem 1.25rem 0.35rem;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem;
  margin: 0.1rem 0.65rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.12s ease;
  cursor: pointer;
  text-decoration: none;
}

.nav-link svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
  color: var(--text-subtle);
  transition: color 0.12s;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.nav-link:hover svg {
  color: var(--text-main);
}

.nav-link.active {
  background: var(--bg-bar);
  color: var(--text-main);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link.active svg {
  color: var(--primary);
}

/* Yorug' rejimda nafis va aniq sidebar menyusi */
[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link svg {
  color: #64748b;
}

[data-theme="light"] .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .nav-link:hover svg {
  color: #0f172a;
}

[data-theme="light"] .nav-link.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-link.active svg {
  color: #059669;
}

[data-theme="light"] .sidebar-category {
  color: #64748b;
}

/* Sidebar Pastki Profil (ChatGPT Skrinshotidagi kabi) */
.sidebar-footer {
  padding: 0.75rem 0.85rem 0.25rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #262626;
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.2;
}

.user-sub {
  font-size: 0.68rem;
  color: var(--text-subtle);
}

.pill-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

/* 4. ASOSIY MAYDON (Markazlashtirilgan, keng va nafis) */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 3.5rem 4rem;
  background-color: var(--bg-body);
  display: flex;
  justify-content: center;
}

.content-inner {
  max-width: 860px;
  width: 100%;
}


