/* ══ NxTGen Journal — ai-coach-and-late-misc.css (original styles.css lines 10432-11134) ══ */

/* ════════════════════════════════════════════════════════════════
   ██╗     ██╗ ██████╗ ██╗   ██╗██╗██████╗      ██████╗ ██╗      █████╗ ███████╗███████╗
   ██║     ██║██╔═══██╗██║   ██║██║██╔══██╗    ██╔════╝ ██║     ██╔══██╗██╔════╝██╔════╝
   ██║     ██║██║   ██║██║   ██║██║██║  ██║    ██║  ███╗██║     ███████║███████╗███████╗
   ██║     ██║██║▄▄ ██║██║   ██║██║██║  ██║    ██║   ██║██║     ██╔══██║╚════██║╚════██║
   ███████╗██║╚██████╔╝╚██████╔╝██║██████╔╝    ╚██████╔╝███████╗██║  ██║███████║███████║
   ╚══════╝╚═╝ ╚══▀▀═╝  ╚═════╝ ╚═╝╚═════╝      ╚═════╝ ╚══════╝╚═╝  ╚═╝╚══════╝╚══════╝
   TRUE LIQUID GLASS OVERRIDE — Telegram-style floating pill nav + glass everything
   ════════════════════════════════════════════════════════════════ */

/* ── LIQUID GLASS TOKENS ─────────────────────────────────────────
   Real transparency: you see what's behind, tinted + blurred
   ─────────────────────────────────────────────────────────────── */
:root {
  --lg-bg-dark:         rgba(12, 16, 28, 0.45);
  --lg-bg-dark-hover:   rgba(20, 26, 46, 0.55);
  --lg-bg-nav:          rgba(10, 14, 26, 0.38);
  --lg-border-top:      rgba(255, 255, 255, 0.14);
  --lg-border:          rgba(255, 255, 255, 0.10);
  --lg-border-inner:    rgba(255, 255, 255, 0.06);
  --lg-shine-top:       rgba(255, 255, 255, 0.18);
  --lg-shine-inner:     rgba(255, 255, 255, 0.08);
  --lg-blur-nav:        blur(48px) saturate(2.2) brightness(1.05);
  --lg-blur-sidebar:    blur(36px) saturate(1.9) brightness(1.02);
  --lg-blur-surface:    blur(24px) saturate(1.8);
  --lg-shadow-nav:      0 -8px 40px rgba(0,0,0,0.28),
                        0 -1px 0 rgba(255,255,255,0.06),
                        0 2px 0 rgba(0,0,0,0.15);
  --lg-shadow-float:    0 20px 60px rgba(0,0,0,0.5),
                        0 8px 20px rgba(0,0,0,0.3),
                        0 0 0 0.5px rgba(255,255,255,0.12);
  --lg-active-pill:     rgba(96, 165, 250, 0.18);
  --lg-nav-radius:      30px; /* Telegram-style generous pill corners */
}

[data-theme="light"] {
  --lg-bg-dark:         rgba(255, 255, 255, 0.90);
  --lg-bg-dark-hover:   rgba(255, 255, 255, 0.97);
  --lg-bg-nav:          rgba(255, 255, 255, 0.90);
  --lg-border-top:      rgba(30, 41, 59, 0.10);
  --lg-border:          rgba(30, 41, 59, 0.08);
  --lg-border-inner:    rgba(30, 41, 59, 0.05);
  --lg-shine-top:       rgba(255, 255, 255, 0.95);
  --lg-shine-inner:     rgba(255, 255, 255, 0.7);
  --lg-blur-nav:        blur(32px) saturate(1.7) brightness(1.02);
  --lg-shadow-nav:      0 -8px 32px rgba(15,23,42,0.10),
                        0 -1px 0 rgba(255,255,255,0.9),
                        0 2px 0 rgba(15,23,42,0.05);
  --lg-shadow-float:    0 20px 50px rgba(15,23,42,0.16),
                        0 8px 20px rgba(15,23,42,0.09),
                        0 0 0 1px rgba(30,41,59,0.07);
  --lg-active-pill:     rgba(67, 56, 202, 0.12);
}

/* ════════════════════════════════════════════════════════════════
   1. BOTTOM NAV — Telegram floating pill style
   ════════════════════════════════════════════════════════════════ */

/* Wrapper: floating above content, NOT edge-to-edge */
.mob-bottom-nav {
  display: none;
  position: fixed !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  left: 12px !important;
  right: 12px !important;
  width: auto !important;

  /* Pill shape — Telegram style */
  border-radius: var(--lg-nav-radius) !important;

  /* TRUE liquid glass: low opacity so content bleeds through */
  background: var(--lg-bg-nav) !important;
  backdrop-filter: var(--lg-blur-nav) !important;
  -webkit-backdrop-filter: var(--lg-blur-nav) !important;

  /* Glass border: bright on top (light catches top edge), dim on sides */
  border: 0px !important;
  box-shadow:
    inset 0 1px 0 var(--lg-shine-top),
    inset 0 -0.5px 0 var(--lg-border-inner),
    inset 1px 0 0 var(--lg-border-inner),
    inset -1px 0 0 var(--lg-border-inner),
    var(--lg-shadow-float) !important;

  /* Height with padding for the pill shape */
  height: auto !important;
  padding: 8px 8px calc(8px) !important;
  padding-bottom: 8px !important;

  z-index: 1000 !important;
  overflow: hidden !important;
}

/* Glass refraction layer — pseudo shimmer across the pill */
.mob-bottom-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--lg-nav-radius);
  background: linear-gradient(
    168deg,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.03) 30%,
    transparent 60%,
    rgba(255,255,255,0.04) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Edge glow — subtle ambient from bottom (floor bounce) */
.mob-bottom-nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(96,165,250,0.35) 30%,
    rgba(167,139,250,0.35) 70%,
    transparent 100%
  );
  border-radius: 0 0 var(--lg-nav-radius) var(--lg-nav-radius);
  pointer-events: none;
}

[data-theme="light"] .mob-bottom-nav::after {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(79,70,229,0.2) 30%,
    rgba(124,58,237,0.2) 70%,
    transparent 100%
  );
}

@media (min-width: 769px){ .mob-bottom-nav { display: none !important; } }
@media (max-width: 768px){ .mob-bottom-nav { display: flex !important; } }
@media (min-width: 769px){
  .mob-more-sheet { display: none !important; }
  .mob-more-overlay { display: none !important; }
}

/* Items sit above pseudo layers */
.mob-bottom-nav-item {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: var(--r-full);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

/* Active state: glass pill highlight */
.mob-bottom-nav-item.active {
  background: var(--lg-active-pill) !important;
  box-shadow:
    inset 0 1px 0 rgba(96,165,250,0.25),
    0 0 16px rgba(96,165,250,0.12);
  color: var(--blue) !important;
  border-radius: var(--r-full) !important;
}

/* Remove old top-notch indicator, replace with pill glow */
.mob-bottom-nav-item.active::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: var(--r-full) !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(96,165,250,0.22) 0%, transparent 65%) !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  top: 0 !important;
  left: 0 !important;
  box-shadow: none !important;
}

.mob-bottom-nav-item:active {
  transform: scale(0.88) !important;
}

.mob-nav-icon {
  font-size: 21px;
  line-height: 1;
  transition: transform 0.22s var(--ease-spring);
  filter: drop-shadow(0 0 0 transparent);
}

.mob-bottom-nav-item.active .mob-nav-icon {
  transform: translateY(-1px) scale(1.08) !important;
  filter: drop-shadow(0 0 8px rgba(96,165,250,0.5));
}

.mob-nav-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* FAB center button — glass orb */
.mob-nav-add-btn .mob-nav-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg,
    rgba(96, 165, 250, 0.85) 0%,
    rgba(37, 99, 235, 0.9) 100%
  ) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow:
    0 4px 20px rgba(96,165,250,0.5),
    0 1px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.15) !important;
  margin-top: -12px !important;
  font-size: 22px !important;
  transition: all 0.2s var(--ease-spring) !important;
}

.mob-nav-add-btn:active .mob-nav-icon {
  transform: scale(0.88) translateY(2px) !important;
  box-shadow:
    0 2px 10px rgba(96,165,250,0.35),
    0 1px 2px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3) !important;
}

/* ════════════════════════════════════════════════════════════════
   2. SIDEBAR — True liquid glass (not flat colour)
   ════════════════════════════════════════════════════════════════ */

.sidebar {
  background: rgba(8, 12, 22, 0.35) !important;
  backdrop-filter: var(--lg-blur-sidebar) !important;
  -webkit-backdrop-filter: var(--lg-blur-sidebar) !important;
  border-right: 0.5px solid rgba(255,255,255,0.08) !important;
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.04),
    4px 0 32px rgba(0,0,0,0.25) !important;
}

/* Subtle inner shimmer on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.05) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(238,241,251,0.93)) !important;
  border-right: 1px solid rgba(30,41,59,0.10) !important;
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.8),
    4px 0 28px rgba(15,23,42,0.08) !important;
}

/* Mobile: sidebar drawer gets glass treatment */
@media (max-width: 768px){
  .sidebar.mob-open {
    background: rgba(8, 12, 22, 0.42) !important;
    backdrop-filter: blur(52px) saturate(2.4) brightness(1.05) !important;
    -webkit-backdrop-filter: blur(52px) saturate(2.4) brightness(1.05) !important;
    box-shadow:
      inset 0 0 0 0.5px rgba(255,255,255,0.10),
      8px 0 40px rgba(0,0,0,0.5) !important;
  }

  [data-theme="light"] .sidebar.mob-open {
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(240,243,251,0.97)) !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   3. TOPBAR — Glass strip
   ════════════════════════════════════════════════════════════════ */

.topbar {
  background: rgba(8, 12, 22, 0.32) !important;
  backdrop-filter: blur(40px) saturate(2) brightness(1.03) !important;
  -webkit-backdrop-filter: blur(40px) saturate(2) brightness(1.03) !important;
  border-bottom: 0.5px solid rgba(255,255,255,0.08) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -0.5px 0 rgba(255,255,255,0.04),
    0 2px 24px rgba(0,0,0,0.2) !important;
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(30,41,59,0.09) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 2px 18px rgba(15,23,42,0.07) !important;
}

/* ════════════════════════════════════════════════════════════════
   4. TABS bar — glass
   ════════════════════════════════════════════════════════════════ */

.tabs {
  background: rgba(10, 14, 28, 0.28) !important;
  backdrop-filter: blur(28px) saturate(1.8) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.8) !important;
  border-bottom: 0.5px solid rgba(255,255,255,0.07) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 1px 16px rgba(0,0,0,0.12) !important;
}

[data-theme="light"] .tabs {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(30,41,59,0.09) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 1px 12px rgba(15,23,42,0.05) !important;
}

/* ════════════════════════════════════════════════════════════════
   5. KPI CARDS — liquid glass surface
   ════════════════════════════════════════════════════════════════ */

.kpi-card, .glass-card {
  background: rgba(15, 20, 38, 0.40) !important;
  backdrop-filter: blur(20px) saturate(1.7) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.7) !important;
  border: 0.5px solid rgba(255,255,255,0.09) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -0.5px 0 rgba(0,0,0,0.2),
    0 4px 24px rgba(0,0,0,0.25) !important;
}

[data-theme="light"] .kpi-card,
[data-theme="light"] .glass-card {
  background: linear-gradient(150deg, rgba(255,255,255,0.97), rgba(246,248,253,0.90)) !important;
  border: 1px solid rgba(30,41,59,0.09) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 6px 22px rgba(15,23,42,0.08) !important;
}

/* ════════════════════════════════════════════════════════════════
   6. MODAL — Deep liquid glass overlay
   ════════════════════════════════════════════════════════════════ */

.modal {
  background: rgba(8, 12, 22, 0.42) !important;
  backdrop-filter: blur(52px) saturate(2.2) brightness(1.04) !important;
  -webkit-backdrop-filter: blur(52px) saturate(2.2) brightness(1.04) !important;
  border: 0.5px solid rgba(255,255,255,0.11) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -0.5px 0 rgba(255,255,255,0.04),
    0 32px 80px rgba(0,0,0,0.6),
    0 8px 24px rgba(0,0,0,0.4) !important;
}

[data-theme="light"] .modal {
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1px solid rgba(30,41,59,0.09) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 32px 80px rgba(15,23,42,0.16),
    0 8px 24px rgba(15,23,42,0.09) !important;
}

/* ════════════════════════════════════════════════════════════════
   7. DETAIL PANEL
   ════════════════════════════════════════════════════════════════ */

.detail-panel {
  background: rgba(10, 14, 26, 0.38) !important;
  backdrop-filter: blur(36px) saturate(2) !important;
  -webkit-backdrop-filter: blur(36px) saturate(2) !important;
  border-left: 0.5px solid rgba(255,255,255,0.08) !important;
}

[data-theme="light"] .detail-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border-left: 1px solid rgba(30,41,59,0.09) !important;
}

/* ════════════════════════════════════════════════════════════════
   8. SIDEBAR OVERLAY (mobile backdrop) — dim glass
   ════════════════════════════════════════════════════════════════ */

.sidebar-overlay {
  background: rgba(4, 6, 14, 0.55) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* ════════════════════════════════════════════════════════════════
   9. SB-ITEM active — refined glass pill
   ════════════════════════════════════════════════════════════════ */

.sb-item.active {
  background: rgba(96, 165, 250, 0.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(96,165,250,0.20),
    inset 0 -0.5px 0 rgba(96,165,250,0.08),
    0 0 14px rgba(96,165,250,0.08) !important;
}

[data-theme="light"] .sb-item.active {
  background: rgba(79,70,229,0.10) !important;
  box-shadow:
    inset 0 1px 0 rgba(79,70,229,0.16),
    inset 0 -0.5px 0 rgba(79,70,229,0.06),
    0 0 14px rgba(79,70,229,0.06) !important;
}

/* ════════════════════════════════════════════════════════════════
   10. BODY / APP BACKGROUND — more aggressive ambient glow
       so the glass actually has something luminous to refract
   ════════════════════════════════════════════════════════════════ */

body {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(96,165,250,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(167,139,250,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 60% 40%,  rgba(45,212,191,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 30% 70%,  rgba(251,191,36,0.04) 0%, transparent 60%) !important;
}

[data-theme="light"] body {
  background:#e7ebf5 !important;
  background-image:
    radial-gradient(ellipse 100% 65% at 14% -12%, rgba(79,70,229,0.14) 0%, transparent 52%),
    radial-gradient(ellipse 65% 55% at 86% 108%, rgba(124,58,237,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 42% 34% at 55% 46%,  rgba(13,148,136,0.06) 0%, transparent 58%),
    radial-gradient(ellipse 36% 30% at 20% 86%,  rgba(180,83,9,0.045) 0%, transparent 48%) !important;
}

/* ════════════════════════════════════════════════════════════════
   11. DATA TABLE HEADERS — faint glass tint
   ════════════════════════════════════════════════════════════════ */

.data-table th {
  background: rgba(15,20,38,0.35) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

[data-theme="light"] .data-table th {
  background: rgba(255,255,255,0.88) !important;
  color: var(--text2) !important;
  border-bottom: 1px solid rgba(30,41,59,0.09) !important;
}

/* ════════════════════════════════════════════════════════════════
   END LIQUID GLASS OVERRIDE
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   FEATURE: MENTAL STATE BUTTONS
   ════════════════════════════════════════════════════════════════ */
.mental-state-btns,
.followed-plan-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ms-btn, .fp-btn {
  flex: 1;
  min-width: 80px;
  padding: 7px 10px;
  border-radius: var(--r-sm, 8px);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  background: var(--glass-0, rgba(255,255,255,0.04));
  color: var(--text2);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-family: inherit;
  line-height: 1.4;
}
.ms-btn:hover, .fp-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text1);
}
.ms-btn.active.ms-focused  { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); color: var(--green); }
.ms-btn.active.ms-neutral  { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.3); color: var(--blue); }
.ms-btn.active.ms-distracted { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.3); color: var(--red); }
.fp-btn.active.fp-yes     { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); color: var(--green); }
.fp-btn.active.fp-partial { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.3); color: var(--gold); }
.fp-btn.active.fp-no      { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.3); color: var(--red); }

/* Light theme overrides */
[data-theme="light"] .ms-btn,
[data-theme="light"] .fp-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: var(--text2);
}
[data-theme="light"] .ms-btn:hover,
[data-theme="light"] .fp-btn:hover {
  background: rgba(0,0,0,0.08);
}

/* ════════════════════════════════════════════════════════════════
   FEATURE: LOSS REASON FIELD — slide in smoothly
   ════════════════════════════════════════════════════════════════ */
#loss-reason-field {
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════
   COMPACT REFRESH — Dashboard calendar KPI strip + Watchlist header
   ════════════════════════════════════════════════════════════════ */

/* ── Dashboard calendar: always a single compact row (Trades / P&L / Best / Worst / Day win rate) ── */
.dash-cal-panel .cal-kpi-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dash-cal-panel .cal-kpi-row::-webkit-scrollbar { display: none; }
.dash-cal-panel .cal-kpi {
  flex: 1 1 0;
  min-width: 88px;
  padding: 7px 9px;
  border-radius: var(--r-sm, 8px);
}
.dash-cal-panel .cal-kpi-label { font-size: 7.5px; margin-bottom: 1px; letter-spacing: 0.05em; white-space: nowrap; }
.dash-cal-panel .cal-kpi-val { font-size: 13px; white-space: nowrap; }
.dash-cal-panel .cal-kpi-val .cal-kpi-sub,
.dash-cal-panel .cal-kpi small { font-size: 7px; }
.dash-cal-panel .cal-kpi-sub-row { font-size: 7.5px; gap: 4px; }

/* Slightly tighter panel chrome to match */
.dash-cal-panel { padding: 16px 14px 20px; }
.dash-cal-top { margin-bottom: 10px; }
.dash-cal-panel .cal-header { padding: 4px 0 6px !important; }
.dash-cal-panel .cal-month-label { font-size: 13px; }
.dash-cal-panel .cal-nav { width: 24px; height: 24px; font-size: 13px; }

@media (max-width: 1080px){
  .dash-cal-panel .cal-kpi { min-width: 78px; padding: 6px 8px; }
  .dash-cal-panel .cal-kpi-label { font-size: 7px; }
  .dash-cal-panel .cal-kpi-val { font-size: 12px; }
}

@media (max-width: 640px){
  .dash-cal-panel .cal-kpi-row { gap: 5px; }
  .dash-cal-panel .cal-kpi { min-width: 68px; padding: 6px 7px; flex: 0 0 auto; }
  .dash-cal-panel .cal-kpi-label { font-size: 6.5px; }
  .dash-cal-panel .cal-kpi-val { font-size: 11px; }
}

@media (max-width: 420px){
  .dash-cal-panel .cal-kpi { min-width: 62px; padding: 5px 6px; }
  .dash-cal-panel .cal-kpi-label { font-size: 6px; }
  .dash-cal-panel .cal-kpi-val { font-size: 10px; }
}

/* ── Watchlist: compact hero header ── */
#page-watchlist .cover { padding: 14px 18px; margin-bottom: 14px; }
#page-watchlist .cover-label { font-size: 9px; margin-bottom: 3px; }
#page-watchlist .cover-title { font-size: 18px; }
#page-watchlist .cover-sub { font-size: 11px; margin-top: 3px; }

/* ── Watchlist: quarter + week pill bar — compact, responsive, properly organized ── */
.wl-quarter-nav { gap: 6px; margin-bottom: 10px; }
.wl-q-tab { padding: 5px 12px; font-size: 10.5px; }

.wl-week-bar {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  align-items: center;
}
.wl-week-scroll {
  gap: 6px;
  row-gap: 6px;
}
.wl-week-chip {
  padding: 4px 11px;
  font-size: 10.5px;
}
.wl-add-week-btn {
  padding: 4px 12px;
  font-size: 10.5px;
}

@media (max-width: 640px){
  #page-watchlist .cover { padding: 12px 14px; }
  #page-watchlist .cover-title { font-size: 16px; }
  .wl-quarter-nav { gap: 5px; margin-bottom: 8px; }
  .wl-q-tab { padding: 4px 10px; font-size: 10px; }
  .wl-week-bar {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 14px;
  }
  .wl-week-scroll { gap: 5px; }
  .wl-week-chip { padding: 4px 9px; font-size: 10px; }
  .wl-add-week-btn { width: 100%; text-align: center; padding: 6px 12px; }
}

/* ── Monthly Review: clickable Loss Audit / Pair Breakdown rows ── */
.mr-clickable-row { cursor: pointer; transition: background 0.12s; }
.mr-clickable-row:hover { background: var(--glass-2); }
.mr-pair-sub-row td { background: rgba(255,255,255,0.015); }
[data-theme="light"] .mr-pair-sub-row td { background: rgba(0,0,0,0.015); }

/* ── Watchlist: organized "Past Weeks" history dropdown ── */
.wl-week-chip-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 6px rgba(52,211,153,0.6);
}
.wl-week-history { position: relative; flex-shrink: 0; }
.wl-week-history-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-full);
  border: 1px solid var(--glass-border); background: var(--glass-1);
  color: var(--text2); font-size: 10px; font-weight: 600; cursor: pointer;
  transition: var(--t-fast); font-family: var(--font-mono); white-space: nowrap;
}
.wl-week-history-btn:hover { background: var(--glass-2); color: var(--text); border-color: var(--glass-border-h); }
.wl-week-history-ico { font-size: 10.5px; line-height: 1; }
.wl-week-history-count { color: var(--blue); font-weight: 700; }
.wl-week-history-arrow { font-size: 8.5px; transition: transform 0.15s ease; opacity: 0.7; }

/* Solid, opaque surface — deliberately NOT transparent glass here, since
   this panel floats over bright white chart thumbnails and a see-through
   background would wash out and become unreadable against them. */
.wl-week-history-panel {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 270px; max-width: 320px; max-height: 320px; overflow-y: auto;
  background: linear-gradient(180deg, rgba(15,19,30,0.99) 0%, rgba(11,14,23,0.99) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 8px; z-index: 100;
  display: flex; flex-direction: column;
}
.wl-week-history-panel::before {
  content: 'PREVIOUS WATCHLISTS';
  display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--text3); padding: 4px 8px 8px; font-family: var(--font-mono);
}
[data-theme="light"] .wl-week-history-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(248,250,252,0.99) 100%);
  border-color: rgba(0,0,0,0.08);
}
.wl-week-history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; padding: 9px 8px; border-radius: var(--r-sm, 8px);
  border: none; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent; color: var(--text2); cursor: pointer;
  transition: background 0.12s, color 0.12s, padding-left 0.12s;
  position: relative;
}
.wl-week-history-item::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  border-radius: 2px; background: transparent; transition: background 0.12s;
}
.wl-week-history-item:last-of-type { border-bottom: none; }
.wl-week-history-item:hover { background: rgba(96,165,250,0.07); color: var(--text); padding-left: 12px; }
.wl-week-history-item:hover::before { background: var(--blue); }
[data-theme="light"] .wl-week-history-item { border-bottom-color: rgba(0,0,0,0.06); }
.wl-week-history-item-label { font-size: 11px; font-weight: 700; font-family: var(--font-mono); color: var(--text); letter-spacing: -0.1px; }
.wl-week-history-item-range { font-size: 9px; color: var(--text3); font-family: var(--font-mono); white-space: nowrap; }
.wl-week-history-empty { padding: 14px 10px; text-align: center; font-size: 11px; color: var(--text3); font-style: italic; }

/* Slim accent scrollbar to match the panel's deliberate, polished feel */
.wl-week-history-panel::-webkit-scrollbar { width: 4px; }
.wl-week-history-panel::-webkit-scrollbar-thumb { background: var(--glass-2); border-radius: 99px; }

@media (max-width: 640px){
  .wl-week-history-panel { left: auto; right: 0; min-width: 230px; }
  .wl-week-history-btn { padding: 4px 10px; font-size: 9.5px; }
  .wl-week-history-item-label { font-size: 10.5px; }
  .wl-week-history-item-range { font-size: 8.5px; }
}

