:root{
  --bg:#f6f8fc;--surface:#fff;--surface-soft:#f9faff;--ink:#10233f;--muted:#66758b;
  --line:#e4e9f2;--line-strong:#d3dbe8;--green:#3158d4;--green-dark:#2446b7;
  --green-deep:#122541;--mint:#edf2ff;--mint-strong:#dfe8ff;--danger:#c9465c;
  --danger-bg:#fff1f4;--sidebar:242px;--shadow-sm:0 5px 22px rgba(35,57,105,.055);
  --shadow:0 20px 54px rgba(35,57,105,.10)
}
html,body{background:var(--bg)}
body{color:var(--ink);background:radial-gradient(circle at 85% -8%,rgba(116,91,255,.09),transparent 27%),radial-gradient(circle at 35% -14%,rgba(54,179,231,.08),transparent 26%),var(--bg)}
.sidebar{padding:24px 16px 18px;background:#fff;color:var(--ink);border-right:1px solid var(--line);box-shadow:8px 0 30px rgba(39,62,107,.035)}
.brand-mark{background:linear-gradient(135deg,#19b8e8 0%,#4d71ed 49%,#7657db 100%);color:#fff;box-shadow:0 10px 27px rgba(77,113,237,.22)}
.brand-copy strong{color:#10233f}.brand-copy small{color:#8390a4;letter-spacing:.12em}
.system-state{color:#728099}.system-state i,.live-dot{background:#23bf8d;box-shadow:0 0 0 4px rgba(35,191,141,.11)}
.workspace-card{border:1px solid #e8edf5;background:linear-gradient(135deg,#f7f9ff,#f4f7fd)}
.workspace-icon{background:linear-gradient(135deg,#e8f8fd,#eae7ff);color:#4d64d4}.workspace-card small{color:#8491a4}.workspace-card strong{color:#233a59}
.nav-section{color:#9aa6b7}.side-nav a{color:#5d6b80}.side-nav a i{background:#f1f4f9;color:#748399}.side-nav a:hover{background:#f5f7fc;color:#233b60}.side-nav a.active{background:linear-gradient(90deg,#edf6ff,#f1efff);color:#284ebf}.side-nav a.active:before{background:linear-gradient(#21b9e5,#6d55db);box-shadow:none}.side-nav a.active i{background:#fff;color:#4e62d2;box-shadow:0 4px 12px rgba(59,87,185,.10)}
.sidebar-foot{border-top:1px solid var(--line)}.user-avatar{background:linear-gradient(135deg,#e8f8fd,#ece9ff);color:#4b5ec9}.user-meta strong{color:#243a58}.user-meta small{color:#8894a6}.logout-button{border:1px solid #dce3ee;background:#fff;color:#66758b;border-radius:8px}.logout-button:hover{border-color:#7d8fd3;color:#3158d4;background:#f7f9ff}
.workspace-bar{height:58px;border-bottom:1px solid rgba(222,228,239,.9);background:rgba(255,255,255,.78);color:#7b889b}.workspace-date{color:#344b69}
.page-shell{max-width:1520px;padding-top:36px}.hero-row h1{color:#10233f;font-size:31px}.hero-row p,.panel-heading p,.login-card p{color:#728097}.eyebrow{color:#4662cf}.hero-row>.filter-bar{border-color:#e1e7f0;background:rgba(255,255,255,.88);box-shadow:0 10px 32px rgba(38,62,111,.06)}
.filter-bar label,.filter-grid label,.stack-form label{color:#5d6c81}
input,select,textarea{border-color:#d8e0eb;background:#fff;color:#142843}input:hover,select:hover,textarea:hover{border-color:#a8b7d0}input:focus,select:focus,textarea:focus{border-color:#5872d7;box-shadow:0 0 0 4px rgba(78,103,209,.10)}input::placeholder,textarea::placeholder{color:#a0abba}
.primary{background:linear-gradient(135deg,#238fd8 0%,#5369dc 53%,#6a58cd 100%);color:#fff;box-shadow:0 9px 22px rgba(70,91,201,.20)}.primary:hover{box-shadow:0 12px 28px rgba(70,91,201,.27)}.secondary{background:#edf2ff;color:#3158c8}.secondary:hover{background:#e2eaff}.danger{background:#fff1f4;color:#c43e56;border-color:#f1cad1}
.metric-grid{gap:16px}.metric{min-height:146px;background:#fff;border-color:#e4e9f2;border-radius:18px;box-shadow:0 8px 28px rgba(36,58,102,.055)}.metric:after{right:-25px;bottom:-38px;background:radial-gradient(circle,rgba(84,103,218,.08),transparent 68%)}.metric:before{content:"";position:absolute;left:0;top:0;width:100%;height:3px;background:linear-gradient(90deg,rgba(26,183,231,.6),rgba(108,85,218,.45));opacity:.65}.metric:hover{border-color:#d6deeb;box-shadow:0 18px 42px rgba(36,58,102,.095)}.metric.accent{background:radial-gradient(circle at 95% 0,rgba(255,255,255,.17),transparent 36%),linear-gradient(135deg,#167fc5 0%,#4f66d7 55%,#6c54c8 100%);border-color:transparent;box-shadow:0 18px 42px rgba(72,90,194,.24)}.metric.accent:before{display:none}.metric span{color:#6f7d91}.metric strong{color:#10233f}.metric.accent strong{color:#fff}.metric.accent span,.metric.accent small{color:#eaf0ff}
.panel{background:rgba(255,255,255,.95);border-color:#e3e8f1;border-radius:18px;box-shadow:0 8px 28px rgba(36,58,102,.05)}.panel h2{color:#142b49}.panel-heading p{color:#7b8799}
.badge,.status{background:#edf2ff;color:#3158c8}.status.void{background:#fff0f3;color:#c13e54}.table-wrap{border-color:#e3e8f1}th,td{border-bottom-color:#ebeff5}th{background:#f7f9fc;color:#6c7a8e}tbody tr:hover{background:#f9fbff}.positive{color:#2758c5}.text-link,.pagination a,.raw-details summary{color:#315bc9}
.tag{background:#f0f3f9;color:#4c5e77}.status.matched{background:#e8f8f2;color:#12835f}.status.pending{background:#fff6dd;color:#8b6500}.status.unmatched{background:#f0f2f6;color:#617085}
.lead-card{background:#fbfcff;border-color:#e3e9f2}.lead-card pre,.detail-card pre,.raw-details pre{background:#f5f7fb;border-color:#e1e7f0;color:#30445f}
.flash{background:#edf7ff;border-color:#cfe5f6;color:#28588d}.flash.error{background:#fff1f4;border-color:#f0cbd2;color:#aa354a}
.login-card{background:rgba(255,255,255,.96);border-color:#e0e6f0;box-shadow:0 28px 80px rgba(38,58,106,.16)}.auth-body{background:radial-gradient(circle at 10% 15%,rgba(26,182,228,.12),transparent 28%),radial-gradient(circle at 88% 82%,rgba(111,84,215,.11),transparent 29%),#f5f7fc}.auth-topbar .brand-copy small{color:#7e8b9f}
.employee-link{display:flex;min-width:105px;flex-direction:column;color:#142b49;font-weight:800;text-decoration:none}.employee-link span{margin-top:1px;color:#5670d1;font-size:9px;font-weight:700;opacity:0;transform:translateY(-2px);transition:opacity .15s,transform .15s}.employee-link:hover{color:#3158c8}.employee-link:hover span{opacity:1;transform:none}.employee-detail-actions{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.employee-detail-actions .filter-bar{padding:9px;border:1px solid #e1e7f0;border-radius:14px;background:#fff}.employee-profile{display:grid;grid-template-columns:auto minmax(180px,1fr) minmax(420px,2fr);align-items:center;gap:18px;padding:20px 24px}.employee-profile-avatar{display:grid;place-items:center;width:56px;height:56px;border-radius:17px;background:linear-gradient(135deg,#dcf6fd,#e9e5ff);color:#425bca;font-size:22px;font-weight:900}.employee-profile>div{display:flex;align-items:flex-start;flex-direction:column;gap:7px}.employee-profile>div strong{font-size:19px}.employee-profile dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}.employee-profile dl div{padding:10px 13px;border-radius:12px;background:#f7f9fd}.employee-profile dt{color:#8190a5;font-size:10px}.employee-profile dd{margin:3px 0 0;color:#203b60;font-weight:750}.employee-metrics .metric{min-height:132px}
.deposit-chart-panel{padding:24px;margin-bottom:20px;scroll-margin-top:18px}.chart-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:19px}.chart-heading h2{margin:5px 0 0;font-size:21px}.chart-summary{display:flex;gap:28px}.chart-summary span{display:flex;flex-direction:column;text-align:right}.chart-summary small{color:#7d899c;font-size:11px}.chart-summary b{color:#17355a;font-size:19px;font-variant-numeric:tabular-nums}.chart-filter{display:grid;grid-template-columns:minmax(250px,1.25fr) repeat(4,minmax(140px,1fr)) auto;align-items:end;gap:11px;padding:15px;border:1px solid #e4e9f2;border-radius:14px;background:#f8faff}.chart-filter>label{display:flex;flex-direction:column;gap:6px;color:#617087;font-size:11px;font-weight:700}.chart-filter input,.chart-filter select{background:#fff}.chart-periods{display:flex;align-items:center;gap:6px;min-width:0;margin:0;padding:0;border:0}.chart-periods legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.chart-periods label{cursor:pointer}.chart-periods input{position:absolute;opacity:0;pointer-events:none}.chart-periods span{display:block;padding:10px 12px;border:1px solid #dbe2ed;border-radius:9px;background:#fff;color:#66758b;font-size:12px;font-weight:750;white-space:nowrap}.chart-periods input:checked+span{border-color:#6074d8;background:linear-gradient(135deg,#edf8ff,#efedff);color:#354fb8;box-shadow:0 0 0 3px rgba(83,105,220,.08)}.chart-context{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:15px 0 4px}.chart-context span{padding:4px 9px;border-radius:999px;background:#f0f3fa;color:#66758b;font-size:10px;font-weight:700}.deposit-chart{position:relative;width:100%;min-height:300px;overflow:hidden}.deposit-chart svg{display:block;width:100%;height:300px;overflow:visible}.chart-gridline{stroke:#e7ebf2;stroke-width:1;vector-effect:non-scaling-stroke}.chart-y-label{fill:#8491a3;font-size:10px;text-anchor:end;font-variant-numeric:tabular-nums}.chart-x-label{fill:#7a8799;font-size:10px;text-anchor:middle}.chart-area{fill:url(#depositArea)}.chart-line{fill:none;stroke:url(#depositLine);stroke-width:3;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}.chart-point{fill:#fff;stroke:#526bd9;stroke-width:2.5;vector-effect:non-scaling-stroke;transition:r .15s}.chart-point:hover{r:6;fill:#edf2ff}.chart-empty{position:absolute;left:70px;right:30px;top:47%;text-align:center;color:#8793a5;font-size:13px}
@media(max-width:1280px){.chart-filter{grid-template-columns:repeat(3,minmax(160px,1fr))}.chart-periods{grid-column:span 2}.chart-filter .primary{min-height:43px}}
@media(max-width:860px){.sidebar{background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(39,62,107,.08)}.side-nav a.active{background:linear-gradient(90deg,#eef7ff,#f1efff)}}
@media(max-width:760px){.chart-heading{align-items:flex-start;flex-direction:column}.chart-summary{width:100%;justify-content:space-between}.chart-summary span{text-align:left}.chart-filter{grid-template-columns:1fr 1fr}.chart-periods{grid-column:1/-1}.chart-filter .primary{grid-column:1/-1}.deposit-chart{overflow-x:auto}.deposit-chart svg{min-width:760px}}
@media(max-width:520px){.chart-filter{grid-template-columns:1fr}.chart-periods{grid-column:auto;flex-wrap:wrap}.chart-filter .primary{grid-column:auto}.chart-summary{gap:12px}.chart-summary b{font-size:16px}}

.profit-filter-panel{padding:18px 20px}.profit-filter{grid-template-columns:repeat(4,minmax(170px,1fr)) auto;align-items:end}.profit-filter button{min-height:44px}.profit-metrics .metric{min-height:132px}.metric.loss:before{background:linear-gradient(90deg,#ef6b78,#f3a45f)}.metric.loss strong,.negative{color:#c64255}.settlement-rule{display:block;min-width:210px;color:#64738a;font-size:11px;line-height:1.6}.status.pending{display:inline-block;margin:5px 0 0 7px}.rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rule-grid span{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid #e4e9f2;border-radius:13px;background:#f8faff;color:#68778e}.rule-grid b{color:#17355a}.calculation-note{margin-bottom:0}
@media(max-width:1120px){.profit-filter{grid-template-columns:repeat(2,minmax(180px,1fr))}.profit-filter button{grid-column:1/-1}.rule-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.profit-filter{grid-template-columns:1fr}.profit-filter button{grid-column:auto}.rule-grid{grid-template-columns:1fr}}
@media(max-width:900px){.employee-profile{grid-template-columns:auto 1fr}.employee-profile dl{grid-column:1/-1;width:100%}.employee-detail-actions{width:100%}}
@media(max-width:560px){.employee-profile{grid-template-columns:1fr}.employee-profile dl{grid-template-columns:1fr}.employee-profile-avatar{width:48px;height:48px}.employee-link span{opacity:1;transform:none}}
