/* ═══════════════════════════════════════════════════════════════════════════
   JOURNTRADE — Premium visual layer v50 (2026-09-05)
   Additive only: no markup, ids, logic or calculations change. Same identity
   (dark #0a0a0b, green #22c55e, Plus Jakarta Sans / Cairo). Loaded last so it
   wins over the inline styles. Light and Premium(gold) themes keep their
   palettes — this layer only upgrades depth, radius, typography and glow.
   ═══════════════════════════════════════════════════════════════════════════ */

:root{
  --pv-radius:18px; --pv-radius-sm:12px;
  --pv-a:34,197,94; --pv-a0:#4ade80; --pv-a1:#34d46e; --pv-a2:#22c55e; --pv-a3:#1db457;
  --pv-card:linear-gradient(180deg,#141416 0%,#111113 100%);
  --pv-card-hover:linear-gradient(180deg,#17171a 0%,#131315 100%);
  --pv-border:rgba(255,255,255,.075); --pv-border2:rgba(255,255,255,.12);
  --pv-shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.28);
  --pv-glow:0 0 0 6px rgba(var(--pv-a),.10), 0 0 46px rgba(var(--pv-a),.55), 0 10px 30px rgba(var(--pv-a),.35);
  --pv-label:#9a9aa3;
}
body.light-theme{
  --pv-card:linear-gradient(180deg,#ffffff,#fafafb); --pv-card-hover:#ffffff;
  --pv-border:rgba(0,0,0,.07); --pv-border2:rgba(0,0,0,.12);
  --pv-shadow:0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px rgba(15,15,20,.06); --pv-label:#6b6b78;
}
body.premium-theme{
  --pv-card:linear-gradient(180deg,#171419,#120f14); --pv-card-hover:linear-gradient(180deg,#1b171d,#151117);
  /* gold accent of the app's premium theme (matches its --green/--green-bright) */
  --pv-a:184,154,115; --pv-a0:#e2caa8; --pv-a1:#d4b896; --pv-a2:#b89a73; --pv-a3:#9c7f5b;
}

/* ── canvas: a quiet green glow instead of flat black ─────────────────────── */
body:not(.light-theme){
  background-image:
    radial-gradient(55% 40% at 100% 100%, rgba(var(--pv-a),.085), transparent 70%),
    radial-gradient(45% 30% at 0% 0%, rgba(var(--pv-a),.045), transparent 70%);
  background-attachment:fixed; background-repeat:no-repeat;
}

/* ── typography ───────────────────────────────────────────────────────────── */
.stat-label,.flbl,.pf-gauge-label,.streak-lbl,.tl-stat-lbl,.tv-field-lbl,.an-label,.chart-lbl,.dg-lbl{
  letter-spacing:1.1px; text-transform:uppercase; font-weight:700; color:var(--pv-label);
}
.stat-value{ letter-spacing:-.6px; line-height:1.05; }
.streak-val{ letter-spacing:-.5px; }
.card-title{ font-weight:800; letter-spacing:-.2px; }

/* ── cards: gradient, hairline, 18px radius, soft depth ───────────────────── */
.card,.stat-card,.chart-card,.pf-card,.ms-card,.course-card,.insight-card,.an-card,.equity-card,.cal-card,
.radar-card,.best-trade-card,.tl-card,.g-card,.sub-nav,.acct-compare-card,.focus-card,.mode-selector-card{
  background:var(--pv-card); border:1px solid var(--pv-border); border-radius:var(--pv-radius); box-shadow:var(--pv-shadow);
}
.card:hover,.stat-card:hover,.pf-card:hover,.ms-card:hover,.course-card:hover{ background:var(--pv-card-hover); border-color:var(--pv-border2); }
.streak-card{ background:var(--pv-card); border:1px solid var(--pv-border); border-radius:14px; }
.insight-card{ border-radius:14px; }
.stat-icon{ opacity:.55; }

/* ── calendar ─────────────────────────────────────────────────────────────── */
.cal-cell{ background:#151517; border-color:rgba(255,255,255,.05); }
body.light-theme .cal-cell{ background:#f4f4f6; }
.cal-cell.day-profit{ background:rgba(var(--pv-a),.13); border-color:rgba(var(--pv-a),.28); }
.cal-cell.day-loss{ background:rgba(239,68,68,.13); border-color:rgba(239,68,68,.28); }
.cal-cell.today{ box-shadow:0 0 0 2px var(--green) inset, 0 0 18px rgba(var(--pv-a),.18); }
.cal-cell.summary-col{ background:#151517; }
.cal-hdr{ letter-spacing:.8px; }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn-save,.mode-confirm-btn{
  border-radius:14px; background:linear-gradient(180deg,var(--pv-a1),var(--pv-a2) 55%,var(--pv-a3));
  box-shadow:0 6px 24px rgba(var(--pv-a),.28); letter-spacing:-.1px;
}
.btn-save:hover{ box-shadow:0 8px 32px rgba(var(--pv-a),.42); transform:translateY(-1px); }
.btn-new{ border-radius:12px; background:linear-gradient(180deg,#3b82f6,#2f6df6); box-shadow:0 6px 22px rgba(47,109,246,.28); }
.btn-new:hover{ box-shadow:0 8px 28px rgba(47,109,246,.4); }
.filter-btn,.vtab{ border-radius:12px; background:#161618; border-color:rgba(255,255,255,.07); }
body.light-theme .filter-btn,body.light-theme .vtab{ background:#f1f1f4; }
.filter-btn.active,.vtab.active{ background:rgba(var(--pv-a),.10); border-color:rgba(var(--pv-a),.45); color:var(--green); }
.btn-edit{ border-radius:10px; }

/* ── forms ────────────────────────────────────────────────────────────────── */
.fi,.fs,.fta{ border-radius:12px; font-weight:600; background:#141416; border-color:rgba(255,255,255,.08); }
body.light-theme .fi,body.light-theme .fs,body.light-theme .fta{ background:#fff; }
.fi:focus,.fs:focus,.fta:focus{ border-color:rgba(var(--pv-a),.55); box-shadow:0 0 0 3px rgba(var(--pv-a),.10); }
.fsec-title{ color:var(--green); font-weight:800; }

/* ── modals ───────────────────────────────────────────────────────────────── */
.modal{ border-radius:22px; background:linear-gradient(180deg,#151517,#111113); border:1px solid rgba(255,255,255,.09); box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03); }
body.light-theme .modal{ background:#fff; }
.modal-title{ font-weight:800; letter-spacing:-.2px; }
.modal-x{ border-radius:50%; background:#1c1c20; }
body.light-theme .modal-x{ background:#eeeef2; }
body.light-theme .dg-progress-bg{ background:#e6e6ea; }
body.light-theme .cal-cell.summary-col{ background:#f4f4f6; }

/* ── sidebar + topbar (desktop) ───────────────────────────────────────────── */
.sidebar{ background:linear-gradient(180deg,#0e0e10,#0a0a0b); border-right:1px solid rgba(255,255,255,.06); }
.sidebar-item{ border-radius:12px; }
.sidebar-item.active{ background:rgba(var(--pv-a),.12); box-shadow:0 0 0 1px rgba(var(--pv-a),.25), 0 0 18px rgba(var(--pv-a),.14); }
.topbar{ background:rgba(10,10,11,.72); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); }
body.light-theme .topbar{ background:rgba(255,255,255,.8); }
.topbar-badge{ border-radius:999px; }

/* ── tables → softer rows ─────────────────────────────────────────────────── */
th{ letter-spacing:1px; color:var(--pv-label); }
td{ border-bottom-color:rgba(255,255,255,.05); }
#tBody tr:hover td,#mBody tr:hover td{ background:rgba(255,255,255,.025); }
.table-wrap{ border-radius:14px; }
.tag{ border-radius:8px; font-weight:700; }

/* ── prop gauges, goals, bars ─────────────────────────────────────────────── */
.pf-gauge-circle{ box-shadow:0 0 0 6px rgba(255,255,255,.025); }
.pf-status{ border-radius:8px; letter-spacing:.6px; font-weight:800; }
.dg-progress-bg{ border-radius:6px; background:#1f1f24; }
.dg-progress-fill,.ms-fill{ border-radius:6px; }
.ms-bg{ border-radius:6px; }

/* ── Trader Mirror / Focus ────────────────────────────────────────────────── */

/* ── AI bubble ────────────────────────────────────────────────────────────── */
#aiFab{ box-shadow:0 0 0 6px rgba(var(--pv-a),.10), 0 0 36px rgba(var(--pv-a),.45), 0 10px 30px rgba(var(--pv-a),.3); }
.ai-chip{ border-radius:999px; }

/* ── mobile bottom bar: glass + glowing add button ─────────────────────────── */
#mnav{
  background:linear-gradient(180deg,rgba(10,10,11,.86),#0c0c0e 40%);
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border-top:1px solid rgba(255,255,255,.05); box-shadow:none;
}
body.light-theme #mnav{ background:rgba(255,255,255,.9); }
.mnav-item{ letter-spacing:.1px; }
.mnav-plus button{
  width:58px; height:58px; top:-20px; border:0 !important;
  background:radial-gradient(circle at 35% 30%,var(--pv-a0),var(--pv-a2) 55%,var(--pv-a3));
  box-shadow:var(--pv-glow);
}
.mnav-plus button:active{ transform:translateX(-50%) scale(.94); }
.mns-item{ border-radius:14px; }

/* ── settings / sub nav pills ─────────────────────────────────────────────── */
.settings-nav-item{ border-radius:12px !important; }
.sub-nav{ border-radius:14px; }
.appearance-radio{ border-radius:14px; }

/* ── toasts ───────────────────────────────────────────────────────────────── */
.toast{ border-radius:14px; backdrop-filter:blur(12px); }

/* ── page titles (inline-styled uppercase headers) ────────────────────────── */
.page > div[style*="font-size:22px"]{ letter-spacing:-.4px; }

/* ═══ Market Intelligence page ═══════════════════════════════════════════════ */
.panel,.bias{ background:var(--pv-card); border:1px solid var(--pv-border); border-radius:var(--pv-radius); box-shadow:var(--pv-shadow); }
.panel{ overflow:hidden; }
.phead{ background:rgba(255,255,255,.015); }
.wrow{ border-radius:10px; border-left:0; }
.wrow:hover{ background:rgba(255,255,255,.04); }
.evt{ border-radius:12px; }
.release{ transition:background .15s; }
.release:hover{ background:rgba(255,255,255,.025); }
.tldr{ background:linear-gradient(135deg,rgba(var(--pv-a),.08),rgba(var(--pv-a),.02)); border-left:3px solid var(--green); }
.release.r45 + .tldr{ border-radius:14px; }
.btn-back,.langsw{ border-radius:12px; }
.status{ letter-spacing:.8px; }
.seclabel,.dayhead{ letter-spacing:1px; }
.pbtag,.tagdir{ border-radius:8px; }
.rulerow{ border-top-style:solid; border-top-color:rgba(255,255,255,.05); }
.gbody{ border-radius:14px; }

/* ═══ Site pages: landing, auth, subscribe, success, reset ═══════════════════ */
.b-card,.step,.plan,.quote,.mock,.auth-card,.stat,.ana-card{ box-shadow:var(--pv-shadow); }
.b-card,.step,.quote,.auth-card{ background:var(--pv-card); border-color:var(--pv-border); border-radius:20px; }
.btn-solid,.btn-submit,.cta-main,.plan-btn,.btn{ border-radius:14px; background:linear-gradient(180deg,var(--pv-a1),var(--pv-a2) 55%,var(--pv-a3)); box-shadow:0 6px 24px rgba(var(--pv-a),.28); }
.btn-solid:hover,.btn-submit:hover,.cta-main:hover,.plan-btn:hover,.btn:hover{ box-shadow:0 10px 34px rgba(var(--pv-a),.42); }
.btn-ghost{ border-radius:14px; }
.nav.scrolled,.nav[data-scrolled]{ backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); }
.tabs{ border-radius:14px; }
.tabs .tab{ border-radius:11px; }
.auth-card .fi{ border-radius:12px; }
.plan-badge{ border-radius:8px; }
.icon{ box-shadow:0 0 40px rgba(245,158,11,.15); }
.hero-badge{ border-radius:999px; }

/* ═══════════════════════════════════════════════════════════════════════════
   v51 — deeper pass: the video-screen layout language inside the app
   ═══════════════════════════════════════════════════════════════════════════ */

/* greeting header injected by premium-v51.js (text only, read from the page) */
.pv-greet{ display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:4px 0 18px; }
.pv-greet h1{ font-size:30px; font-weight:800; letter-spacing:-.6px; line-height:1.1; margin:0; }
.pv-greet .pv-sub{ font-size:13.5px; color:var(--text2); margin-top:5px; font-weight:500; }
.pv-greet .pv-sub b{ color:var(--green); font-weight:700; }
.pv-greet .pv-pill{ display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:999px; font-size:12px; font-weight:700; color:var(--green); border:1px solid rgba(var(--pv-a),.45); background:rgba(var(--pv-a),.06); white-space:nowrap; }
@media(max-width:768px){ .pv-greet h1{ font-size:26px; } .pv-greet{ margin:2px 0 14px; } }

/* page titles: 'ANALYTICS' → 'Analytics' (renamed by premium-v51.js), bigger, tighter */
.pv-title{ font-size:26px !important; font-weight:800 !important; letter-spacing:-.5px !important; text-transform:none !important; line-height:1.15; }
@media(max-width:768px){ .pv-title{ font-size:24px !important; } }

/* KPI tiles like the video: label, big value, icon quiet in the corner */
.stat-card .stat-icon{ opacity:.4; }

/* top bar → wordmark + pills */
#syncStatusPill{ border-radius:999px !important; background:#161618 !important; border-color:rgba(255,255,255,.08) !important; }
#syncStatusPill span:first-child{ box-shadow:0 0 8px rgba(var(--pv-a),.8); }
.theme-toggle{ border-radius:50% !important; background:#161618; border:1px solid rgba(255,255,255,.08); }
.mode-switch{ border-radius:999px !important; }
.mode-btn{ border-radius:999px !important; }
.topbar-title{ letter-spacing:.4px; }

/* analytics sub-nav → pill tabs (separators hidden) */

/* calendar cells: rounded chips, bold P&L, quiet count */
.c-date{ color:var(--text3); }
.cal-cell.day-profit .c-date,.cal-cell.day-loss .c-date{ color:var(--text); }
.c-pnl{ letter-spacing:-.3px; }
.c-count{ color:var(--text2); }
.cal-nav-btn{ border-radius:10px; }
.cal-month-lbl{ font-weight:800; letter-spacing:-.2px; }

/* desktop trade / missed tables → separated card rows */
@media(min-width:769px){
  #tbl-view table,#page-missed table{ border-collapse:separate; border-spacing:0 8px; }
  #tbl-view thead th,#page-missed thead th{ border:0; padding-bottom:2px; }
  #tBody td,#mBody td{ background:#141416; border-top:1px solid rgba(255,255,255,.06); border-bottom:1px solid rgba(255,255,255,.06); padding:11px 10px; }
  #tBody td:first-child,#mBody td:first-child{ border-left:1px solid rgba(255,255,255,.06); border-radius:14px 0 0 14px; }
  #tBody td:last-child,#mBody td:last-child{ border-right:1px solid rgba(255,255,255,.06); border-radius:0 14px 14px 0; }
  #tBody tr:hover td,#mBody tr:hover td{ background:#18181b; }
  body.light-theme #tBody td,body.light-theme #mBody td{ background:#fff; border-color:rgba(0,0,0,.07); }
}

/* prop firm gauges as mini tiles */
.pf-gauge{ background:#151517; border:1px solid rgba(255,255,255,.05); border-radius:14px; }
body.light-theme .pf-gauge{ background:#f4f4f6; border-color:rgba(0,0,0,.06); }
.pf-gauge-circle{ box-shadow:none; }
.pf-gauge-val{ font-weight:800; letter-spacing:-.3px; }
.pf-header .pf-name{ font-weight:800; letter-spacing:-.2px; }

/* insights / streaks like the video tiles */
.insight-card > div:first-child,.insight-icon{ border-radius:11px; background:rgba(var(--pv-a),.12); color:var(--green); }

/* review section headers and stat tiles */
.rs-header{ border-radius:16px; }
.rs-title{ font-weight:800; }
.rs-badge{ border-radius:999px; }

/* quick actions button */
.btn-action{ border-radius:14px; border:1px solid rgba(var(--pv-a),.35); background:rgba(var(--pv-a),.06); color:var(--green); font-weight:800; letter-spacing:.3px; }
.btn-action:hover{ background:rgba(var(--pv-a),.12); box-shadow:0 0 22px rgba(var(--pv-a),.18); }

/* daily goals card */
.dg-header .card-title{ font-weight:800; }
#dgStatus{ font-weight:800; }

/* settings */
.settings-section .card-title{ font-weight:800; }
.settings-nav-item.active{ background:rgba(var(--pv-a),.10) !important; color:var(--green) !important; }


/* ═══════════════════════════════════════════════════════════════════════════
   v51c — LAYOUT rules (padding / sizes / gaps) are DESKTOP-ONLY.
   Phones keep the app's own responsive layout untouched (only colors, radius
   and glow apply there). Lesson from 2026-09-05: an unscoped .cal-cell padding
   overflowed the 7-column calendar on Android and .evt padding:0 glued the
   Market Intelligence rows to the card edge.
   ═══════════════════════════════════════════════════════════════════════════ */
@media(min-width:769px){
  .stat-label,.flbl,.pf-gauge-label,.streak-lbl,.tl-stat-lbl,.tv-field-lbl,.an-label,.chart-lbl,.dg-lbl{ font-size:10.5px; }
  .stat-card{ padding:18px 18px 16px; min-height:104px; }
  .stat-value{ font-size:30px; }
  .streak-card{ padding:14px 12px; }
  .cal-cell{ border-radius:10px; padding:8px 9px; }
  .cal-cell.summary-col{ border-radius:10px; }
  .c-date{ font-size:11px; }
  .c-count{ font-size:10px; }
  .btn-new{ padding:8px 16px; }
  .filter-btn,.vtab{ padding:8px 13px; font-size:12px; }
  .fi,.fs,.fta{ padding:10px 13px; font-size:13.5px; }
  .modal-x{ width:32px; height:32px; }
  .tag{ padding:3px 9px; }
  #syncStatusPill{ padding:6px 12px !important; }
  .theme-toggle{ width:34px; height:34px; }
  .mode-switch{ padding:2px; }
  .sub-nav{ background:transparent; border:0; box-shadow:none; padding:0 0 4px; gap:8px; }
  .sub-nav .sub-sep{ display:none; }
  .sub-nav a{ padding:8px 13px; border-radius:12px; background:#161618; border:1px solid rgba(255,255,255,.07); color:var(--text2); font-weight:700; font-size:12.5px; }
  .sub-nav a.active{ background:rgba(var(--pv-a),.10); border-color:rgba(var(--pv-a),.45); color:var(--green); }
  body.light-theme .sub-nav a{ background:#f1f1f4; }
  .pf-gauges{ gap:10px; }
  .pf-gauge{ padding:14px 8px 12px; }
  .pf-header .pf-name{ font-size:16px; }
  .insight-card{ padding:14px 16px; }
  .insight-card > div:first-child,.insight-icon{ width:36px; height:36px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .streak-lbl{ margin-bottom:6px; }
  .streak-val{ font-size:24px; }
}
/* Market Intelligence page breakpoint is 820px */
@media(min-width:821px){
  .wrow{ margin:2px 6px; padding:9px 10px; }
  .chip{ padding:3px 9px; }
  .langsw button{ padding:7px 12px; }
  .evt{ padding:12px 14px; }
  .release{ padding:14px 16px; }
  .hist{ padding:14px 16px 10px; }
}
