:root {
  --brand: #0f4c81;
  --brand-dark: #0a3558;
  --brand-soft: #e8f1fa;
  --accent: #f2a900;
  --sidebar-bg: #0c2a47;
  --sidebar-text: #b7c8da;
  --page-bg: #f4f6f9;
  --card-border: #e3e8ef;
}
body { background: var(--page-bg); font-size: .92rem; color: #1f2d3d; }
a { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }

/* ---- layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--sidebar-bg); color: var(--sidebar-text); overflow-y: auto; z-index: 1030; transition: transform .2s; }
.sidebar .brand { padding: .9rem 1rem; color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand small { display: block; font-weight: 400; font-size: .72rem; color: var(--sidebar-text); }
.sidebar .nav-heading { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; padding: 1rem 1.25rem .35rem; color: #6f8aa6; }
.sidebar .nav-link { color: var(--sidebar-text); padding: .5rem 1.25rem; display: flex; gap: .65rem; align-items: center; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.09); border-left-color: var(--accent); }
.sidebar .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.main { margin-left: 250px; min-height: 100vh; }
.topbar { background: #fff; border-bottom: 1px solid var(--card-border); padding: .6rem 1.5rem; position: sticky; top: 0; z-index: 1020; }
.content { padding: 1.5rem; max-width: 1500px; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: none; }
  .main { margin-left: 0; }
  .content { padding: 1rem; }
}

/* ---- cards & tables */
.card { border: 1px solid var(--card-border); border-radius: .6rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--card-border); font-weight: 600; padding: .75rem 1rem; }
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7a8c; font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
.table-hover tbody tr:hover { background: #f8fbff; }
.page-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-sub { color: #6b7a8c; margin: 0; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-in { color: #11875d; font-weight: 600; }
.amount-out { color: #c0392b; font-weight: 600; }
.form-label { font-weight: 600; font-size: .82rem; color: #44546a; margin-bottom: .25rem; }

/* ---- stat tiles */
.stat { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; }
.stat .icon { width: 2.75rem; height: 2.75rem; border-radius: .7rem; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.stat .label { color: #6b7a8c; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.stat .sub { color: #6b7a8c; font-size: .78rem; }

/* ---- pipeline stepper */
.stepper { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: .5rem; }
.stepper .step { flex: 1 0 96px; text-align: center; font-size: .72rem; color: #8493a5; position: relative; padding-top: 1.6rem; }
.stepper .step::before { content: ''; position: absolute; top: .55rem; left: 0; right: 0; height: 3px; background: #dfe5ec; }
.stepper .step .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #dfe5ec; border: 3px solid #fff; z-index: 1; }
.stepper .step.done::before, .stepper .step.done .dot { background: #1f9d6b; }
.stepper .step.current::before { background: linear-gradient(90deg, #1f9d6b, #dfe5ec); }
.stepper .step.current .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(242,169,0,.25); }
.stepper .step.current, .stepper .step.done { color: #1f2d3d; font-weight: 600; }

/* ---- kanban board */
.board { display: flex; gap: .85rem; overflow-x: auto; align-items: flex-start; padding-bottom: 1rem; }
.board .col-stage { flex: 0 0 255px; background: #eaeff5; border-radius: .6rem; padding: .6rem; }
.board .col-stage h6 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #44546a; display: flex; justify-content: space-between; margin: .15rem .25rem .6rem; }
.board .case-card { background: #fff; border-radius: .5rem; padding: .65rem .75rem; margin-bottom: .5rem; border: 1px solid var(--card-border); display: block; color: inherit; }
.board .case-card:hover { border-color: var(--brand); box-shadow: 0 2px 6px rgba(15,76,129,.15); }

/* ---- timeline */
.timeline { list-style: none; padding-left: 1.1rem; margin: 0; border-left: 2px solid #dfe5ec; }
.timeline li { position: relative; padding: 0 0 1rem 1rem; }
.timeline li::before { content: ''; position: absolute; left: -1.62rem; top: .35rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }

/* ---- score ring */
.score-ring { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring, var(--brand)) calc(var(--pct) * 1%), #e5eaf0 0); position: relative; flex: none; }
.score-ring::after { content: ''; position: absolute; inset: 11px; background: #fff; border-radius: 50%; }
.score-ring span { position: relative; z-index: 1; font-size: 1.8rem; font-weight: 700; }

.verdict-eligible { border-left: 4px solid #1f9d6b; }
.verdict-borderline { border-left: 4px solid var(--accent); }
.verdict-not_eligible { border-left: 4px solid #d6455d; opacity: .85; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0c2a47, #0f4c81); padding: 1rem; }
.login-card { width: 100%; max-width: 410px; }

.empty { text-align: center; color: #8493a5; padding: 2rem 1rem; }
.empty i { font-size: 2rem; display: block; margin-bottom: .4rem; }

/* ---- receipts / print */
.receipt { max-width: 760px; margin: 0 auto; background: #fff; padding: 2rem; border: 1px solid var(--card-border); }
@media print {
  .sidebar, .topbar, .no-print, .btn, .alert { display: none !important; }
  .main { margin: 0 !important; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .receipt { border: none; box-shadow: none; }
}
