/* BKCG Ops. Brand: Forest #0F5D3B as solid fill, hairline or type only.
   Status colours are for data states only. No separators between the dark
   sidebar, top bar and footer. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-400-normal.503e7cbdb484.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-500-normal.e5e6761eaecb.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-600-normal.79e62f3332cd.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.5b629bd8abb4.woff2") format("woff2"); }

:root {
  --forest: #0F5D3B; --forest-950: #04211A;
  --ink: #0F172A; --ink-2: #475569; --stone: #94A3BB;
  --line: rgba(148,163,187,.55); --line-2: rgba(148,163,187,.3);
  --glacier: #F6F8FA;
  --good: #0CA30C; --warning: #FAB219; --serious: #EC835A; --critical: #D03B3B;
  --good-text: #0B7A0B; --warning-text: #8A5A00; --critical-text: #C02E2E;
  /* Data-viz roles */
  --s-total: #2A78D6; --s-etf: #12A4B6; --s-stock: #EB6834; --s-option: #4A3AA7; --s-other: #B8B4AA;
  --usd: #1F3F77; --cad: #64748B; --market: #A23B87; --compare: #9A968C;
  --acerto: #1B7F45; --astha: #B8860B;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--forest-950); font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
a { color: var(--forest); }
a:hover { color: var(--forest-950); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--forest-950); color: #FFFFFF; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo-btn { height: 72px; flex-shrink: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; padding: 0 24px; }
.sidebar .logo-full { width: 184px; height: auto; display: block; }
.sidebar .logo-mark { width: 42px; height: auto; display: none; }
.sidebar nav { padding: 12px 16px 16px 0; display: flex; flex-direction: column; gap: 2px; }
.sb-mod, .sb-sec { display: flex; align-items: center; text-decoration: none; font-size: 14px; color: rgba(255,255,255,.72); }
.sb-mod { gap: 12px; min-height: 44px; padding: 0 12px 0 24px; font-weight: 600; }
.sb-mod svg { flex-shrink: 0; }
.sb-sec { min-height: 38px; padding: 0 12px 0 54px; font-weight: 500; }
.sb-mod:hover, .sb-sec:hover { color: #FFFFFF; }
.sb-mod.open { color: #FFFFFF; font-weight: 700; }
.sb-mod.on, .sb-sec.on { color: #FFFFFF; font-weight: 700; box-shadow: inset 3px 0 0 #FFFFFF; }

body.sb-collapsed { --sidebar-w: 72px; }
body.sb-collapsed .sidebar .logo-btn { justify-content: center; padding: 0; }
body.sb-collapsed .logo-full, body.sb-collapsed .sb-label, body.sb-collapsed .sb-sec { display: none; }
body.sb-collapsed .logo-mark { display: block; }
body.sb-collapsed .sidebar nav { padding: 12px 0 16px 0; }
body.sb-collapsed .sb-mod { padding: 0 0 0 27px; }
body.sb-collapsed .sb-mod.open { box-shadow: inset 3px 0 0 #FFFFFF; }

.main-col { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 72px; flex-shrink: 0; background: var(--forest-950); display: flex; align-items: center; gap: 12px; padding: 0 24px 0 32px; }
.crumbs { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; min-width: 0; }
.crumb { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.62); text-decoration: none; }
.crumb:hover { color: #FFFFFF; }
.crumb-sep { color: rgba(255,255,255,.35); }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: #FFFFFF; }
.topbar .spacer { flex-grow: 1; }
.avatar { width: 36px; height: 36px; border-radius: 999px; border: none; background: var(--forest); color: #FFFFFF; font: 700 13px "Plus Jakarta Sans", sans-serif; display: flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; }
.avatar::-webkit-details-marker { display: none; }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: 44px; z-index: 20; min-width: 220px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(4,33,26,.18); display: flex; flex-direction: column; }
.menu-panel .who { padding: 10px 12px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menu-panel .who b { display: block; color: var(--ink); font-size: 14px; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: transparent; border-radius: 8px; font: 500 14px "Plus Jakarta Sans", sans-serif; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--glacier); }

.tabband { height: 44px; flex-shrink: 0; background: #FFFFFF; border-bottom: 1px solid var(--line); display: flex; align-items: stretch; gap: 26px; padding: 0 32px; overflow-x: auto; }
.tabband a { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; white-space: nowrap; color: var(--ink-2); font-weight: 500; }
.tabband a.on { color: var(--forest); font-weight: 700; box-shadow: inset 0 -2px 0 var(--forest); }
.tabband .group { display: flex; align-items: center; margin-left: 10px; margin-right: -12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-2); white-space: nowrap; text-transform: uppercase; }

main.content { background: var(--glacier); flex-grow: 1; padding: 28px 32px; display: flex; flex-direction: column; gap: 24px; }

.footer { height: 44px; flex-shrink: 0; background: var(--forest-950); display: flex; align-items: center; gap: 14px; padding: 0 32px; font-size: 12px; color: rgba(255,255,255,.64); }
.footer .grow { flex-grow: 1; }
.env { display: inline-flex; align-items: center; gap: 7px; color: #FFFFFF; font-weight: 600; }

/* Components */
.card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; }
.kpi { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.muted { color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.t { width: 100%; border-collapse: collapse; }
.t th { font-size: 12px; font-weight: 500; color: var(--ink-2); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.t td { font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: none; }

.btn, .btn2 { min-height: 40px; padding: 0 16px; border-radius: 8px; font: 600 14px "Plus Jakarta Sans", sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.btn { border: none; background: var(--forest); color: #FFFFFF; }
.btn:hover { background: var(--forest-950); color: #FFFFFF; }
.btn2 { border: 1px solid var(--line); background: #FFFFFF; color: var(--ink); font-weight: 500; }
.btn2:hover { border-color: var(--stone); }
.btn:disabled, .btn2:disabled { background: #FFFFFF; border: 1px solid var(--line); color: var(--stone); cursor: not-allowed; }

.empty { padding: 72px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2 { margin: 0; font-size: 18px; font-weight: 700; }

.messages { display: flex; flex-direction: column; gap: 8px; }
.msg { background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--forest); border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.msg.error { border-left-color: var(--critical); }
.msg.warning { border-left-color: var(--warning); }

/* Forms (also styles allauth's default elements) */
form p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: 400 15px "Plus Jakarta Sans", sans-serif; color: var(--ink); background: #FFFFFF; width: 100%;
}
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }
.errorlist { list-style: none; margin: 0 0 8px; padding: 0; color: var(--critical-text); font-size: 13px; font-weight: 600; }
.panel button, .auth-card button, .panel .btnlike { min-height: 44px; padding: 0 16px; border-radius: 8px; border: none; background: var(--forest); color: #FFFFFF; font: 600 14px "Plus Jakarta Sans", sans-serif; cursor: pointer; margin: 4px 8px 4px 0; }
.panel button[type=button], .auth-card button[type=button] { background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.panel { padding: 24px; max-width: 720px; }
.panel h1, .panel h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.panel table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.panel th, .panel td { text-align: left; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }

/* Auth pages */
body.auth { background: var(--glacier); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; }
.auth-wrap .logo { width: 280px; height: auto; }
.auth-card { width: 100%; max-width: 420px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.auth-card h1 { margin: 0 0 18px; font-size: 20px; font-weight: 700; }
.auth-card button[type=submit] { width: 100%; margin: 8px 0 0; }
.auth-card hr { border: 0; border-top: 1px solid var(--line-2); margin: 20px 0; }
.auth-env { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--warning-text); text-transform: uppercase; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { padding: 0 16px; height: 56px; }
  .topbar h1 { font-size: 18px; }
  .crumb, .crumb-sep { display: none; }
  .tabband { padding: 0 16px; gap: 22px; }
  main.content { padding: 16px; }
  .footer { padding: 0 16px; }
}
.auth-card #passkey_login { background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); font-weight: 600; width: 100%; margin: 0; }
.foot-link { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.82); text-decoration: none; }
.foot-link:hover { color: #FFFFFF; }
