/* ═══════════════════════════════════════════
   SIDEBAR NAVIGATION
   ═══════════════════════════════════════════ */

/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: rgba(13, 13, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 0 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: hidden;
  z-index: 100;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}

/* Sidebar Logo area */
.sidebar-logo {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  display: none !important;
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--text-primary);
}

.sidebar-logo-text span {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Sidebar Search ── */
.sidebar-search-wrap {
  padding: 0 16px 14px;
  position: relative;
}

.sidebar-search-wrap input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px 9px 34px;
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  transition: all 0.2s var(--ease-out);
}

.sidebar-search-wrap input::placeholder {
  color: var(--text-muted);
}

.sidebar-search-wrap input:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.sidebar-search-wrap input:focus {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.2);
}

.sidebar-search-wrap::after {
  content: '⌘K';
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%) translateY(-7px);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.sidebar-search-wrap .search-icon {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%) translateY(-7px); /* Adjusting for padding */
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Sidebar Clock */
.sidebar-clock {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.01);
}

.sidebar-clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  color: #e2e8f0;
  letter-spacing: -0.02em;
  line-height: 1;
}

.sidebar-clock-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Sidebar section label */
.sidebar-section-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 20px 6px;
}

/* Nav items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none; /* Hide scrollbar for clean look */
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  margin: 2px 0;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  text-decoration: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  border: 1px solid transparent;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #f1f5f9;
}

.sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.02) 100%);
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid #6366f1;
  border-radius: 0 8px 8px 0;
  box-shadow: inset 4px 0 8px rgba(99, 102, 241, 0.05);
}

.nav-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 16px;
  margin-right: 12px;
  font-size: 14px;
  color: #64748b;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.sidebar-nav-item:hover .nav-icon {
  color: #f1f5f9;
  transform: scale(1.05);
}

.sidebar-nav-item.active .nav-icon {
  color: #818cf8;
}

.nav-label { flex: 1; }

.nav-badge {
  display: none !important; /* Hide badges to reduce visual clutter */
}

/* Sidebar refresh area */
.sidebar-actions {
  padding: 16px 16px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-refresh-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-family: var(--font-sans);
  box-shadow: var(--shadow-sm);
}

.sidebar-refresh-btn:hover {
  background: rgba(94, 106, 210, 0.08);
  border-color: rgba(94, 106, 210, 0.3);
  box-shadow: 0 0 12px rgba(94, 106, 210, 0.06);
  transform: translateY(-1px);
}

.sidebar-refresh-btn:active {
  transform: translateY(0);
}

.sidebar-auto-refresh {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.sidebar-auto-refresh .dot-green {
  width: 6px;
  height: 6px;
}

/* ── Content Area ── */
.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Ticker tape is full width above content */
.ticker-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Content sections */
.content-section {
  display: none;
  padding: 32px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(10px);
}

.content-section.active {
  display: block;
  animation: slideUpFade 0.4s var(--ease-out) forwards;
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page title */
.page-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.page-title .page-icon {
  display: none !important;
}

/* ── Mobile sidebar overlay ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
}

/* sidebar-toggle: defined in mobile.css */
.sidebar-toggle { display: none; }

/* ── Sidebar Theme Toggle Button ── */
.sidebar-theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  font-family: var(--font-sans);
  box-shadow: var(--shadow-sm);
  margin-top: 8px;
}

.sidebar-theme-btn:hover {
  background: rgba(94, 106, 210, 0.08);
  border-color: rgba(94, 106, 210, 0.3);
  box-shadow: 0 0 12px rgba(94, 106, 210, 0.06);
  transform: translateY(-1px);
}

.sidebar-theme-btn:active {
  transform: translateY(0);
}

/* ── Light Mode Overrides ── */
:root[data-theme="light"] .sidebar {
  background: var(--bg-secondary);
  border-right-color: var(--border);
}
:root[data-theme="light"] .sidebar-clock {
  background: rgba(0, 0, 0, 0.01);
  border-bottom-color: var(--border);
}
:root[data-theme="light"] .sidebar-clock-time {
  color: var(--text-primary);
}
:root[data-theme="light"] .sidebar-nav-item {
  color: var(--text-secondary);
}
:root[data-theme="light"] .sidebar-nav-item:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
}
:root[data-theme="light"] .sidebar-nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.01) 100%);
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
}
:root[data-theme="light"] .sidebar-nav-item:hover .nav-icon {
  color: var(--text-primary);
}
:root[data-theme="light"] .sidebar-nav-item.active .nav-icon {
  color: var(--accent-blue);
}
:root[data-theme="light"] .sidebar-search-wrap::after {
  background: rgba(0, 0, 0, 0.03);
}

/* ── Sidebar Live Clock Widget ── */
.sidebar-clock-widget {
  margin: 0 14px 12px;
  padding: 14px 16px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sidebar-clock-widget::before {
  content: '';
  position: absolute;
  top: -30px; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.18), transparent 70%);
  pointer-events: none;
}

.scw-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a5b4fc;
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 0 18px rgba(165, 180, 252, 0.35);
  font-variant-numeric: tabular-nums;
}

.scw-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.scw-sep {
  color: rgba(99, 102, 241, 0.5);
  font-size: 8px;
}

/* Light Mode */
:root[data-theme="light"] .sidebar-clock-widget {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.18);
}
:root[data-theme="light"] .scw-time {
  color: #4f46e5;
  text-shadow: 0 0 12px rgba(79, 70, 229, 0.15);
}
:root[data-theme="light"] .scw-meta {
  color: var(--text-muted);
}

