/* src/css/styles.css — DM Research Client Portal Design System */
/* Fonts: Syne (display) · Outfit (body) · JetBrains Mono (data) */

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS — DARK THEME
════════════════════════════════════════════════════ */
:root[data-theme="dark"] {
  --bg:         #080f1c;
  --bg2:        #0c1628;
  --surface:    #101e32;
  --surface2:   #152338;
  --surface3:   #1c2f4a;
  --border:     rgba(148,180,220,0.08);
  --border2:    rgba(148,180,220,0.14);
  --border3:    rgba(148,180,220,0.22);
  --gold:       #d4973e;
  --gold2:      #eab558;
  --gold3:      #fdd07c;
  --goldp:      rgba(212,151,62,0.10);
  --goldp2:     rgba(212,151,62,0.20);
  --green:      #34d399;
  --greenp:     rgba(52,211,153,0.10);
  --greenbd:    rgba(52,211,153,0.22);
  --red:        #f87171;
  --redp:       rgba(248,113,113,0.10);
  --redbd:      rgba(248,113,113,0.22);
  --blue:       #60a5fa;
  --bluep:      rgba(96,165,250,0.10);
  --purple:     #a78bfa;
  --purplep:    rgba(167,139,250,0.10);
  --text:       #e8eef8;
  --text2:      #8ba8c8;
  --text3:      #4a6280;
  --text4:      #263548;
  --topbar-bg:  rgba(8,15,28,0.95);
  --sidebar-bg: #0b1524;
  --sidebar-w:  240px;
  --shadow:     rgba(0,0,0,0.45);
  --card-shadow:0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25);
}

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS — LIGHT THEME
════════════════════════════════════════════════════ */
:root[data-theme="light"] {
  --bg:         #f0f4fa;
  --bg2:        #e4ecf6;
  --surface:    #ffffff;
  --surface2:   #f4f7fc;
  --surface3:   #e8eef8;
  --border:     rgba(10,30,65,0.10);
  --border2:    rgba(10,30,65,0.16);
  --border3:    rgba(10,30,65,0.24);
  --gold:       #7a4f0a;
  --gold2:      #8f5c0b;
  --gold3:      #a8700e;
  --goldp:      rgba(122,79,10,0.08);
  --goldp2:     rgba(122,79,10,0.16);
  --green:      #166534;
  --greenp:     rgba(22,101,52,0.08);
  --greenbd:    rgba(22,101,52,0.20);
  --red:        #b91c1c;
  --redp:       rgba(185,28,28,0.07);
  --redbd:      rgba(185,28,28,0.18);
  --blue:       #1e40af;
  --bluep:      rgba(30,64,175,0.08);
  --purple:     #6d28d9;
  --purplep:    rgba(109,40,217,0.08);
  --text:       #0a1628;
  --text2:      #1e3a5f;
  --text3:      #4a6580;
  --text4:      #aabcce;
  --topbar-bg:  rgba(255,255,255,0.97);
  --sidebar-bg: #0a1628;
  --sidebar-w:  240px;
  --shadow:     rgba(0,0,0,0.10);
  --card-shadow:0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
a { color: var(--gold); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ═══════════════════════════════════════════════════
   LAYOUT — SIDEBAR + MAIN
════════════════════════════════════════════════════ */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(148,180,220,0.08);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .3s ease;
}
#sidebar[hidden] { display: none !important; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(148,180,220,0.08);
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--goldp2), var(--goldp));
  border: 1.5px solid var(--goldp2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-brand { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px; color: #fff; letter-spacing: 0.5px; }
.sidebar-brand-sub { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 1px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-section-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.25); letter-spacing: 1.5px; text-transform: uppercase; padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 13px; font-weight: 500;
  cursor: pointer; margin-bottom: 2px;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.nav-item.nav-active { background: rgba(212,151,62,0.12); color: var(--gold2); font-weight: 700; }
.nav-item.nav-active .nav-icon { color: var(--gold); }
.nav-icon { font-size: 18px; width: 22px; text-align: center; }

.sidebar-footer { padding: 12px 8px; border-top: 1px solid rgba(148,180,220,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--goldp); border: 1.5px solid var(--goldp2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--gold); font-family: 'Syne', sans-serif; }
.sidebar-uname { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.8); }
.sidebar-urole { font-size: 10px; color: rgba(255,255,255,0.3); }

/* Topbar */
#topbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: 56px;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  z-index: 90;
}
#topbar[hidden] { display: none !important; }
#topbar-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--text2); transition: background .15s; }
.topbar-btn:hover { background: var(--surface3); }

/* Main content area */
#main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding-top: 56px;
  min-height: 100vh;
}

.screen-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Mobile bottom nav */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
}
#mobile-nav[hidden] { display: none !important; }
.mobile-nav-inner { display: flex; justify-content: space-around; }
.mob-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: 8px;
  color: var(--text3); font-size: 10px; cursor: pointer;
  transition: color .15s;
}
.mob-nav-item.nav-active { color: var(--gold); }
.mob-nav-icon { font-size: 20px; }

/* ═══════════════════════════════════════════════════
   SCREENS (all hidden by default)
════════════════════════════════════════════════════ */
.screen { display: block; }
[hidden] { display: none !important; }

/* Splash */
#screen-splash {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.splash-inner { text-align: center; }
.splash-icon { width: 80px; height: 80px; background: linear-gradient(135deg,var(--goldp2),var(--goldp)); border: 2px solid var(--goldp2); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 20px; }
.splash-brand { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 900; color: var(--text); letter-spacing: 2px; }
.splash-sub { font-size: 11px; color: var(--text3); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 6px; }
.splash-spinner { margin-top: 32px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border2); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════
   AUTH SCREENS
════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--card-shadow);
}
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-logo-icon { font-size: 28px; width: 52px; height: 52px; background: var(--goldp); border: 1.5px solid var(--goldp2); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.auth-brand { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 900; color: var(--text); letter-spacing: 0.5px; }
.auth-brand-sub { font-size: 10px; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; }
.auth-title { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.auth-sub { font-size: 12px; color: var(--text3); margin-bottom: 24px; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface2); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 7px; background: transparent; border: none; color: var(--text3); font-size: 13px; font-weight: 600; transition: all .15s; }
.auth-tab-active { background: var(--surface3); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }
.auth-switch { font-size: 13px; color: var(--text3); text-align: center; margin-top: 16px; }
.link-btn { background: none; border: none; color: var(--gold); font-size: 13px; font-weight: 700; padding: 0; }

/* ═══════════════════════════════════════════════════
   FORM ELEMENTS
════════════════════════════════════════════════════ */
.form-field { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 6px; letter-spacing: 0.3px; }
.form-input {
  width: 100%; padding: 11px 14px;
  background: var(--surface2); border: 1.5px solid var(--border2);
  border-radius: 10px; color: var(--text); font-size: 14px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--goldp); }
.form-error { color: var(--red); font-size: 12px; margin-top: 8px; min-height: 16px; }
.form-success { color: var(--green); font-size: 12px; margin-top: 8px; }
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 44px; }
.btn-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 16px; color: var(--text3); padding: 4px; }

.btn-auth {
  width: 100%; padding: 13px; background: linear-gradient(135deg, var(--gold), var(--gold2));
  border: none; border-radius: 11px; color: #fff; font-size: 14px; font-weight: 800;
  font-family: 'Syne', sans-serif; letter-spacing: 0.3px;
  margin-top: 8px; transition: opacity .15s, transform .1s; box-shadow: 0 4px 16px var(--goldp2);
}
.btn-auth:hover { opacity: 0.92; }
.btn-auth:active { transform: scale(0.98); }
.btn-auth:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════
   CALL CARDS
════════════════════════════════════════════════════ */
.calls-list { display: flex; flex-direction: column; gap: 12px; }
.call-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: 16px;
  box-shadow: var(--card-shadow);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.call-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--shadow); }
.call-card::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--border2); border-radius: 3px 0 0 3px; }
.call-card[data-status="Active"]::before, .call-card .badge-green ~ ::before { background: var(--green); }

.cc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cc-time { flex: 1; font-size: 11px; color: var(--text3); text-align: right; }
.cc-title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cc-script { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; color: var(--text); }
.cc-sublabel { font-size: 11px; color: var(--text3); margin-bottom: 10px; }
.cc-dir { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.5px; }
.dir-buy { background: var(--greenp); color: var(--green); }
.dir-sell { background: var(--redp); color: var(--red); }
.cc-researcher { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; color: var(--text3); }
.researcher-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* Prices */
.cc-prices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.price-cell { display: flex; flex-direction: column; align-items: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; min-width: 72px; }
.price-label { font-size: 10px; color: var(--text3); font-weight: 600; letter-spacing: 0.3px; margin-bottom: 3px; text-transform: uppercase; }
.price-val { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; color: var(--text); }

/* Status badges */
.badge { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.5px; text-transform: uppercase; border: 1px solid; }
.badge-green { background: var(--greenp); color: var(--green); border-color: var(--greenbd); }
.badge-gold  { background: var(--goldp);  color: var(--gold);  border-color: var(--goldp2);  }
.badge-red   { background: var(--redp);   color: var(--red);   border-color: var(--redbd);   }
.badge-muted { background: var(--surface2); color: var(--text3); border-color: var(--border); }

/* Segment tags */
.seg-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; border: 1px solid; }
.seg-equity  { background: var(--goldp); color: var(--gold); border-color: var(--goldp2); }
.seg-index   { background: var(--purplep); color: var(--purple); border-color: rgba(167,139,250,0.2); }
.seg-fo      { background: var(--bluep); color: var(--blue); border-color: rgba(96,165,250,0.2); }
.seg-mcx     { background: rgba(245,158,11,0.1); color: #f59e0b; border-color: rgba(245,158,11,0.2); }

/* Locked card */
.call-card-locked { cursor: default; }
.call-card-blur { filter: blur(4px); pointer-events: none; user-select: none; }
.lock-overlay { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(8,15,28,0.7); backdrop-filter: blur(2px); border-radius: 16px; }
.lock-icon { font-size: 28px; }
.lock-text { font-size: 13px; color: var(--text2); font-weight: 600; }
.btn-subscribe-small { background: linear-gradient(135deg,var(--gold),var(--gold2)); border: none; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 700; padding: 7px 16px; }

/* Bookmark button */
.btn-bookmark { background: none; border: none; font-size: 16px; padding: 4px; opacity: 0.5; transition: opacity .15s, transform .15s; }
.btn-bookmark:hover, .btn-bookmark.bookmarked { opacity: 1; transform: scale(1.15); }

/* ═══════════════════════════════════════════════════
   TRADE PROGRESS BAR
════════════════════════════════════════════════════ */
.trade-progress { margin-top: 12px; }
.tp-labels { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tp-sl { font-size: 11px; color: var(--red); font-weight: 700; }
.tp-tgt { font-size: 11px; color: var(--green); font-weight: 700; }
.tp-rr { font-size: 11px; color: var(--text3); background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }
.tp-track { height: 6px; background: var(--surface2); border-radius: 3px; position: relative; overflow: visible; }
.tp-fill { height: 6px; border-radius: 3px; opacity: 0.85; transition: width .4s ease; }
.fill-green { background: var(--green); }
.fill-red   { background: var(--red); }
.fill-muted { background: var(--text3); }
.tp-marker { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; transform: translateX(-50%); }
.tp-entry { border-color: var(--text3); background: var(--surface); }
.tp-ltp { box-shadow: 0 2px 8px var(--shadow); }
.tp-sub { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }

/* ═══════════════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════════════════ */
.screen-header { margin-bottom: 20px; }
.screen-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); }
.screen-subtitle { font-size: 13px; color: var(--text3); margin-top: 3px; }

.welcome-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; background: linear-gradient(135deg, var(--surface2), var(--surface3)); border: 1px solid var(--border2); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.welcome-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: var(--text); }
.welcome-sub { font-size: 11px; color: var(--text3); margin-top: 4px; }
.trial-badge { display: flex; align-items: center; gap: 8px; background: var(--goldp); border: 1px solid var(--goldp2); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: var(--gold); font-weight: 600; }

.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 24px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--card-shadow); }
.kpi-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.kpi-green  { background: var(--greenp); }
.kpi-gold   { background: var(--goldp); }
.kpi-blue   { background: var(--bluep); }
.kpi-purple { background: var(--purplep); }
.kpi-value { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-label { font-size: 11px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.3px; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); }
.section-link { background: none; border: none; color: var(--gold); font-size: 13px; font-weight: 600; }

.market-status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px; border: 1px solid; }
.market-open { color: var(--green); background: var(--greenp); border-color: var(--greenbd); }
.market-closed { color: var(--text3); background: var(--surface2); border-color: var(--border); }
.ms-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.sebi-disclaimer { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 11px; color: var(--text3); line-height: 1.7; margin-top: 24px; }

/* ═══════════════════════════════════════════════════
   CALLS SCREEN — FILTERS
════════════════════════════════════════════════════ */
.tab-row { display: flex; gap: 4px; background: var(--surface2); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.tab-btn { flex: 1; padding: 9px; border-radius: 9px; background: transparent; border: none; color: var(--text3); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 7px; transition: all .15s; }
.tab-btn.tab-active { background: var(--surface3); color: var(--text); box-shadow: 0 1px 4px var(--shadow); }
.tab-count { background: var(--surface3); font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 10px; min-width: 20px; text-align: center; }
.tab-btn.tab-active .tab-count { background: var(--goldp); color: var(--gold); }

.filter-row { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; min-width: 54px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 12px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--border2); color: var(--text3); font-size: 12px; font-weight: 600; transition: all .15s; }
.chip:hover { background: var(--surface3); color: var(--text2); }
.chip-active { background: var(--goldp); border-color: var(--goldp2); color: var(--gold); font-weight: 800; }

.results-meta { font-size: 12px; color: var(--text3); margin-bottom: 12px; }

/* ═══════════════════════════════════════════════════
   CALL DETAIL
════════════════════════════════════════════════════ */
.detail-content { padding-top: 16px; }
.detail-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.btn-back { background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; padding: 8px 14px; color: var(--text2); font-size: 13px; font-weight: 600; transition: background .15s; }
.btn-back:hover { background: var(--surface3); }
.detail-header-card { background: var(--surface); border: 1px solid var(--border2); border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: var(--card-shadow); }
.detail-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.detail-sublabel { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.detail-date { font-size: 12px; color: var(--text3); margin-bottom: 12px; }
.researcher-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.researcher-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--greenp); border: 2px solid var(--greenbd); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--green); }
.researcher-name { font-weight: 700; font-size: 14px; color: var(--text); }
.researcher-badge { font-size: 10px; color: var(--green); background: var(--greenp); padding: 2px 7px; border-radius: 10px; margin-top: 3px; display: inline-block; }

.detail-price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; margin-bottom: 16px; }
.price-box { background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.price-box-label { font-size: 10px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; display: flex; align-items: center; gap: 5px; }
.price-box-val { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: var(--text); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 2s infinite; }

.detail-section { background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.detail-section-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.detail-kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; }
.kv-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.kv-key { font-size: 12px; color: var(--text3); }
.kv-val { font-size: 13px; color: var(--text); font-weight: 600; }
.targets-row { display: flex; gap: 10px; }
.target-pill { background: var(--greenp); border: 1px solid var(--greenbd); border-radius: 10px; padding: 10px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.t-label { font-size: 10px; color: var(--text3); font-weight: 700; }
.t-val { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; }
.detail-rationale { font-size: 14px; color: var(--text2); line-height: 1.7; }

/* ═══════════════════════════════════════════════════
   PORTFOLIO
════════════════════════════════════════════════════ */
.portfolio-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.psm-card { background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; text-align: center; }
.psm-val { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 800; }
.psm-label { font-size: 11px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.psm-green .psm-val { color: var(--green); }
.psm-red   .psm-val { color: var(--red); }
.psm-blue  .psm-val { color: var(--blue); }
.psm-gold  .psm-val { color: var(--gold); }

/* ═══════════════════════════════════════════════════
   ARTICLES
════════════════════════════════════════════════════ */
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 20px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { flex-shrink: 0; padding: 7px 16px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--border2); color: var(--text3); font-size: 12px; font-weight: 600; transition: all .15s; }
.cat-chip:hover { background: var(--surface3); }
.cat-active { background: var(--goldp); border-color: var(--goldp2); color: var(--gold); font-weight: 800; }

.articles-grid { display: flex; flex-direction: column; gap: 12px; }
.article-card { display: flex; background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--shadow); }
.article-featured { flex-direction: column; border-radius: 18px; }
.article-img-wrap { height: 200px; overflow: hidden; }
.article-img { width: 100%; height: 100%; object-fit: cover; }
.article-featured-body { padding: 18px; }
.article-card-accent { width: 80px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.article-cat-letter { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 900; color: rgba(255,255,255,0.7); }
.article-card-body { padding: 14px; flex: 1; }
.article-cat-tag, .article-cat-badge { font-size: 10px; font-weight: 800; color: var(--gold); background: var(--goldp); border: 1px solid var(--goldp2); border-radius: 6px; padding: 2px 8px; letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 8px; display: inline-block; }
.article-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.article-title-featured { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.article-excerpt { font-size: 12px; color: var(--text3); line-height: 1.6; margin-bottom: 10px; }
.article-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text3); }
.article-reader-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; margin-bottom: 20px; }
.article-reader-gradient { height: 180px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.article-cat-letter-lg { font-family: 'Syne', sans-serif; font-size: 56px; font-weight: 900; color: rgba(255,255,255,0.6); }
.article-reader { max-width: 720px; }
.article-reader-title { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 900; color: var(--text); margin: 10px 0; line-height: 1.3; }
.article-reader-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text3); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article-reader-body { font-size: 15px; line-height: 1.8; color: var(--text2); }
.article-reader-body p { margin-bottom: 16px; }
.article-reader-body h2, .article-reader-body h3 { font-family: 'Syne', sans-serif; color: var(--text); margin: 20px 0 10px; }

/* ═══════════════════════════════════════════════════
   SETTINGS / ACCOUNT
════════════════════════════════════════════════════ */
.profile-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 18px; margin-bottom: 20px; }
.profile-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--goldp2), var(--goldp)); border: 2px solid var(--goldp2); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 900; color: var(--gold); flex-shrink: 0; }
.profile-info { flex: 1; }
.profile-name { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; color: var(--text); }
.profile-email { font-size: 12px; color: var(--text3); margin-top: 3px; }
.profile-phone { font-size: 12px; color: var(--text3); }
.btn-icon-edit { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 8px; font-size: 16px; }

.settings-section { margin-bottom: 20px; }
.settings-section-title { font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 800; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; padding: 14px 16px; cursor: pointer; margin-bottom: 8px; transition: background .15s; }
.settings-row:hover { background: var(--surface2); }
.settings-row-left { display: flex; align-items: center; gap: 12px; }
.settings-row-icon { font-size: 20px; width: 28px; text-align: center; }
.settings-row-title { font-size: 14px; font-weight: 600; color: var(--text); }
.settings-row-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }
.settings-row-danger .settings-row-title { color: var(--red); }
.status-check { font-size: 18px; }
.status-arrow { font-size: 16px; color: var(--text3); }

.sub-status-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; }
.sub-active  { border-color: var(--greenbd); background: var(--greenp); }
.sub-trial   { border-color: var(--goldp2); background: var(--goldp); }
.sub-inactive { border-color: var(--redbd); }
.sub-status-icon { font-size: 24px; }
.sub-status-body { flex: 1; }
.sub-status-label { font-size: 13px; font-weight: 700; color: var(--text); }
.sub-status-plan { font-size: 12px; color: var(--text3); margin-top: 2px; }
.sub-days { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ═══════════════════════════════════════════════════
   SUBSCRIBE / PLANS
════════════════════════════════════════════════════ */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 12px; margin-bottom: 24px; }
.plan-card { background: var(--surface); border: 2px solid var(--border2); border-radius: 16px; padding: 18px; cursor: pointer; position: relative; transition: all .2s; }
.plan-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.plan-card.plan-selected { border-color: var(--gold); box-shadow: 0 0 0 3px var(--goldp); }
.plan-card.plan-popular { border-color: var(--goldp2); }
.plan-badge { position: absolute; top: -10px; right: 12px; background: var(--gold); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 10px; letter-spacing: 0.3px; }
.plan-badge-trial { background: var(--blue); }
.plan-name { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.plan-seg  { font-size: 11px; color: var(--text3); margin-bottom: 10px; }
.plan-price { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 800; color: var(--gold); margin-bottom: 3px; }
.plan-dur  { font-size: 11px; color: var(--text3); margin-bottom: 12px; }
.plan-select-indicator { font-size: 12px; font-weight: 700; color: var(--text3); border: 1px solid var(--border2); border-radius: 8px; padding: 6px; text-align: center; transition: all .15s; }
.plan-selected .plan-select-indicator { background: var(--gold); color: #fff; border-color: var(--gold); }

.payment-section { background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.payment-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.payment-note { font-size: 12px; color: var(--gold); background: var(--goldp); border: 1px solid var(--goldp2); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.payment-method { display: flex; align-items: center; gap: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.pm-label { font-size: 11px; color: var(--text3); font-weight: 700; min-width: 90px; }
.pm-value { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text); }
.btn-copy { background: var(--surface3); border: 1px solid var(--border2); border-radius: 7px; padding: 4px 10px; font-size: 11px; color: var(--text2); }
.payment-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.payment-placeholder { text-align: center; color: var(--text3); font-size: 14px; padding: 32px; }
.btn-pay { flex: 1; background: linear-gradient(135deg,var(--gold),var(--gold2)); border: none; border-radius: 11px; color: #fff; font-size: 14px; font-weight: 800; padding: 13px; font-family: 'Syne', sans-serif; }
.btn-whatsapp { flex: 1; background: #16a34a; border: none; border-radius: 11px; color: #fff; font-size: 13px; font-weight: 700; padding: 13px; }

/* ═══════════════════════════════════════════════════
   AGREEMENT SCREEN
════════════════════════════════════════════════════ */
.agreement-wrap { max-width: 680px; margin: 0 auto; padding: 24px 20px 120px; }
.agreement-header { display: flex; align-items: center; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; margin-bottom: 20px; }
.agreement-icon { font-size: 28px; }
.agreement-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: var(--text); }
.agreement-sub { font-size: 12px; color: var(--text3); margin-top: 3px; }
.agreement-scroll { max-height: none; }
.agreement-clause { background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.clause-title { font-size: 12px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.clause-body { font-size: 13px; color: var(--text2); line-height: 1.7; white-space: pre-line; }
.agreement-end { display: flex; align-items: center; gap: 8px; background: var(--greenp); border: 1px solid var(--greenbd); border-radius: 12px; padding: 14px; font-size: 13px; color: var(--green); font-weight: 600; margin-bottom: 20px; }
.agreement-footer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--topbar-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--border2); padding: 16px 20px env(safe-area-inset-bottom, 16px); z-index: 50; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin-bottom: 12px; }
.checkbox-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); margin-top: 2px; flex-shrink: 0; }
.checkbox-label { font-size: 13px; color: var(--text2); line-height: 1.5; }
.btn-accept { width: 100%; padding: 13px; background: linear-gradient(135deg,var(--gold),var(--gold2)); border: none; border-radius: 11px; color: #fff; font-size: 15px; font-weight: 800; font-family: 'Syne', sans-serif; box-shadow: 0 4px 16px var(--goldp2); transition: opacity .15s; }
.btn-accept:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════ */
#modal-container { position: fixed; inset: 0; z-index: 200; display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: var(--surface); border: 1px solid var(--border2); border-radius: 20px; width: 100%; max-width: 440px; box-shadow: 0 24px 80px var(--shadow); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; color: var(--text); }
.modal-close { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 5px 10px; color: var(--text3); font-size: 14px; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.btn-cancel { flex: 1; padding: 11px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; color: var(--text2); font-size: 14px; font-weight: 600; }
.btn-primary { flex: 1; padding: 11px; background: linear-gradient(135deg,var(--gold),var(--gold2)); border: none; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 800; }

/* ═══════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════ */
#toast-container { position: fixed; bottom: 80px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface3); border: 1px solid var(--border2); border-radius: 12px; padding: 12px 18px; font-size: 13px; font-weight: 600; color: var(--text); box-shadow: 0 8px 24px var(--shadow); transform: translateX(120%); transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s; opacity: 0; pointer-events: all; max-width: 300px; }
.toast-show { transform: translateX(0); opacity: 1; }
.toast-success { border-color: var(--greenbd); color: var(--green); }
.toast-error   { border-color: var(--redbd);   color: var(--red);   }
.toast-info    { border-color: var(--border2);  color: var(--text2); }

/* ═══════════════════════════════════════════════════
   UTILITY
════════════════════════════════════════════════════ */
.text-green { color: var(--green) !important; }
.text-red   { color: var(--red)   !important; }
.text-gold  { color: var(--gold)  !important; }
.loading-spinner { display: flex; justify-content: center; padding: 60px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; gap: 12px; }
.empty-icon { font-size: 48px; }
.empty-state h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); }
.empty-state p { font-size: 13px; color: var(--text3); max-width: 280px; line-height: 1.6; }

/* Buttons */
.btn-upgrade-sm { background: linear-gradient(135deg,var(--gold),var(--gold2)); border: none; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 800; padding: 5px 12px; white-space: nowrap; }
.btn-subscribe  { background: linear-gradient(135deg,var(--gold),var(--gold2)); border: none; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 800; padding: 10px 18px; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — TABLET
════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #sidebar  { display: none !important; }
  #main-content { margin-left: 0; padding-top: 56px; padding-bottom: 70px; }
  #mobile-nav { display: block; }
  #topbar { left: 0; }

  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .portfolio-summary { grid-template-columns: repeat(2,1fr); }
  .plans-grid { grid-template-columns: 1fr; }
  .detail-price-grid { grid-template-columns: repeat(2,1fr); }
  .screen-content { padding: 16px 14px 100px; }
  .auth-card { padding: 28px 20px; }
  .welcome-banner { flex-direction: column; }
  .payment-actions { flex-direction: column; }
  #toast-container { bottom: 90px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .cc-prices { gap: 6px; }
  .price-cell { min-width: 64px; padding: 6px 8px; }
  .filter-chips { gap: 4px; }
  .chip { padding: 4px 10px; font-size: 11px; }
}
