@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Anek+Bangla:wght@400;500;600;700&display=swap');

/* ONE TAX NETWORK — Client Portal
   Indigo + Saffron · modern Indian fintech / taxation theme
   Plus Jakarta Sans · light surfaces · deep indigo rail · saffron action colour */

:root {
    /* Indigo scale */
    --brand: #312E81;
    --brand-mid: #4338CA;
    --brand-bright: #6366F1;
    --brand-dark: #1E1B4B;
    --brand-deeper: #171346;
    --brand-soft: #E6E7FB;
    --brand-softer: #F3F4FE;
    --brand-line: #C9CCF4;

    /* Saffron accent */
    --accent: #EA580C;
    --accent-bright: #F97316;
    --accent-soft: #FFF1E6;
    --accent-line: #FED2AE;

    --gold: #B45309;
    --gold-bright: #F59E0B;
    --gold-soft: #FFFBEB;

    /* Republic tricolour (used only as hairlines) */
    --tri-saffron: #FF9933;
    --tri-white: #FFFFFF;
    --tri-green: #138808;
    --tri-line: linear-gradient(90deg, #FF9933 0 33.33%, #E4E6F5 33.33% 66.66%, #138808 66.66% 100%);

    --navy: #312E81; --navy-mid: #4338CA; --navy-dark: #1E1B4B; --navy-light: #E6E7FB;
    --orange: #B45309; --orange-dark: #92400E; --orange-light: #FEF3C7;

    --page: #F4F5FB;
    --surface: #FFFFFF;
    --surface-2: #F7F8FD;

    --ink-900: #14142B;
    --ink-700: #3B3B5C;
    --ink-500: #6B6B8F;
    --ink-400: #9A9ABA;

    --line: #E4E5F2;
    --line-strong: #CDCFE4;

    --c-teal: #0F766E; --c-green: #15803D; --c-amber: #B45309; --c-sky: #0369A1;
    --c-violet: #6D28D9; --c-rose: #E11D48; --c-pink: #BE185D; --c-indigo: #4338CA;
    --green: #15803D; --sky: #0369A1; --violet: #6D28D9; --teal: #0F766E;
    --saffron: #EA580C; --indigo: #4338CA;

    --ok: #15803D; --ok-soft: #ECFDF3;
    --warn: #B45309; --warn-soft: #FFFAEB;
    --bad: #DC2626; --bad-soft: #FEF2F2;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 7px;
    --shadow-1: 0 1px 2px rgba(20, 20, 43, .05), 0 1px 3px rgba(20, 20, 43, .04);
    --shadow-2: 0 10px 26px -14px rgba(49, 46, 129, .28), 0 2px 8px -4px rgba(20, 20, 43, .08);
    --shadow-3: 0 32px 64px -28px rgba(23, 19, 70, .4);
    --ring: 0 0 0 3px rgba(99, 102, 241, .18);
    --ring-warm: 0 0 0 3px rgba(249, 115, 22, .22);
    --ease: cubic-bezier(.32, .72, 0, 1);

    /* Official-document motifs */
    --guilloche: repeating-radial-gradient(circle at 100% 0, transparent 0 6px, rgba(255, 255, 255, .045) 6px 7px, transparent 7px 14px);
    --grid-motif: linear-gradient(rgba(49, 46, 129, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(49, 46, 129, .05) 1px, transparent 1px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--page);
    color: var(--ink-900);
    font-family: 'Plus Jakarta Sans', 'Anek Bangla', 'Noto Sans Bengali', system-ui, sans-serif;
    font-size: 14px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { font-family: inherit; font-weight: 800; letter-spacing: -.022em; margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--accent); }
.muted { color: var(--ink-500); }
.tabular { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* ============ Frame ============ */
.shell { position: relative; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 262px; z-index: 40;
    display: flex; flex-direction: column;
    background: var(--brand-dark);
    border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--tri-line); z-index: 2;
}
.sidebar::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: var(--guilloche); background-size: 220px 220px; opacity: .8;
}
.sidebar-glow { display: none; }

.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 22px 18px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand-mark {
    width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 11px;
    background: #fff; border: 1px solid rgba(255, 255, 255, .3); overflow: hidden;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .55);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.brand-text strong { display: block; color: #fff; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.brand-text strong em { font-style: normal; color: var(--accent-bright); }
.brand-text small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .5); font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.drawer-close { display: none; margin-left: auto; background: none; border: 0; color: rgba(255, 255, 255, .6); font-size: 18px; cursor: pointer; }

.nav { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 14px 12px 18px; }
.nav-group { margin: 18px 10px 8px; font-size: 8.5px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .38); }
.nav-group:first-child { margin-top: 2px; }
.nav-link {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin-bottom: 2px; border-radius: var(--radius-xs);
    color: rgba(255, 255, 255, .74); font-size: 13.5px; font-weight: 500;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-link i { width: 20px; flex: none; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .45); transition: color .2s var(--ease); }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link:hover i { color: var(--accent-bright); }
.nav-link.is-active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; }
.nav-link.is-active i { color: var(--accent-bright); }
.nav-bar { position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 4px 4px 0; background: var(--accent-bright); opacity: 0; transition: opacity .2s var(--ease); }
.nav-link.is-active .nav-bar { opacity: 1; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
    min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 999px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .7);
    font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.nav-link.is-active .nav-badge { background: var(--accent); border-color: var(--accent); color: #fff; }

.sidebar-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-top: 1px solid rgba(255, 255, 255, .09); background: rgba(0, 0, 0, .22); }
@supports (padding: env(safe-area-inset-bottom)) { .sidebar-foot { padding-bottom: calc(13px + env(safe-area-inset-bottom)); } }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.side-user .avatar { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.side-user span { min-width: 0; }
.side-user strong { display: block; color: #fff; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small { display: block; color: rgba(255, 255, 255, .5); font-size: 10.5px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.side-logout { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .7); transition: background-color .2s var(--ease), color .2s var(--ease); }
.side-logout:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.scrim { display: none; }

.main { margin-left: 262px; min-height: 100vh; }
.rainbow { display: none; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 16px;
    height: 64px; padding: 0 28px;
    background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tri-line); }
.icon-btn { background: none; border: 0; font-size: 17px; color: var(--brand); cursor: pointer; padding: 8px 10px; border-radius: var(--radius-xs); transition: background-color .2s var(--ease); }
.icon-btn:hover { background: var(--brand-soft); }
.only-mobile { display: none; }

.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-900); }
.crumb .home { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-weight: 500; }
.crumb .home i { color: var(--brand-mid); font-size: 12px; }
.crumb .sep { color: var(--ink-400); font-size: 9px; }
.crumb .dot { display: none; }
.crumb a:hover { color: var(--brand); }

.topsearch { position: relative; flex: 0 1 330px; margin-left: 16px; }
.topsearch i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 12px; }
.topsearch input {
    width: 100%; height: 38px; padding: 0 12px 0 34px;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface-2); font: inherit; font-size: 13px; color: var(--ink-900);
    transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.topsearch input:focus { outline: none; background: #fff; border-color: var(--brand-bright); box-shadow: var(--ring); }

.profile { position: relative; margin-left: auto; }
.profile-btn { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; transition: box-shadow .2s var(--ease), border-color .2s var(--ease); }
.profile-btn:hover { border-color: var(--brand-line); box-shadow: var(--shadow-1); }
.avatar {
    width: 31px; height: 31px; border-radius: 999px; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--brand-mid), var(--brand-dark)); color: #fff;
    font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.profile-text { text-align: left; line-height: 1.25; }
.profile-text strong { display: block; font-size: 11.5px; font-weight: 700; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-text small { display: block; font-size: 10px; color: var(--ink-400); letter-spacing: .05em; font-variant-numeric: tabular-nums; }

.profile-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 6px; display: none; animation: pop .18s var(--ease); }
.profile-menu.is-open { display: block; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.profile-menu-head { padding: 10px 11px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.profile-menu-head strong { display: block; font-size: 12.5px; }
.profile-menu-head small { color: var(--ink-400); font-size: 11px; }
.profile-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--radius-xs); font-size: 13px; color: var(--ink-700); transition: background-color .18s var(--ease), color .18s var(--ease); }
.profile-menu a:hover { background: var(--brand-softer); color: var(--brand); }
.profile-menu a.danger { color: var(--bad); }
.profile-menu a.danger:hover { background: var(--bad-soft); }

.logout-top { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-700); font-size: 12.5px; font-weight: 700; transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
.logout-top i { color: var(--bad); }
.logout-top:hover { background: var(--bad-soft); border-color: #FECACA; color: var(--bad); }

.content { padding: 26px 34px 76px; width: 100%; max-width: 1320px; }
.content > * + * { margin-top: 18px; }

.fade-up { animation: fadeUp .4s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.content.fade-up { animation: fadeIn .4s var(--ease) both; }
.stagger > * { animation: fadeUp .45s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; }
.stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; }
.stagger > *:nth-child(8) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .fade-up, .stagger > * { animation: none; } }

/* ============ Page head / hero ============ */
.page-head, .hero {
    position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 18px;
    padding: 26px 30px; border: 1px solid var(--line); border-radius: var(--radius);
    background:
        radial-gradient(520px 200px at 100% 0, rgba(99, 102, 241, .07), transparent 70%),
        #fff;
    box-shadow: var(--shadow-1);
}
.page-head::before, .hero::before {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 4px;
    background: linear-gradient(180deg, var(--brand-mid), var(--accent));
}
.page-head::after, .hero::after { display: none; }
.page-head h1, .hero-body h1 { margin: 0; color: var(--ink-900); font-size: 23px; letter-spacing: -.03em; }
.page-head h1 em, .hero-body h1 em { font-style: normal; color: var(--accent); }
.page-head .sub, .hero-body p { margin: 7px 0 0; max-width: 900px; color: var(--ink-500); font-size: 13.5px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; font-size: 9.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.eyebrow .rule { width: 20px; height: 2px; border-radius: 2px; background: var(--accent); }
.count-chip { display: inline-block; margin-left: 10px; padding: 2px 11px; border-radius: 999px; background: var(--brand-soft) !important; color: var(--brand) !important; font-size: 12.5px; font-weight: 800; vertical-align: 4px; font-variant-numeric: tabular-nums; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.hero img, .hero-veil { display: none; }
.hero-body { position: relative; z-index: 1; max-width: 68%; }
.hero-tag { display: none; }
.hero-actions, .banner-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.banner-chips span {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line);
    color: var(--ink-700); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.banner-chips i { font-size: 10.5px; color: var(--accent); }

/* ============ Identity strip ============ */
.id-strip {
    position: relative; overflow: hidden;
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 34px;
    padding: 20px 26px; border-radius: var(--radius);
    background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 55%, #3B2E7E 100%);
    box-shadow: var(--shadow-2);
    color: #fff;
}
.id-strip::before { content: ''; position: absolute; inset: 0; background: var(--guilloche); background-size: 260px 260px; }
.id-strip::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tri-line); }
.id-strip .who { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; }
.id-strip .who .avatar { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); }
.id-strip .who strong { display: block; color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.id-strip .who small { display: block; color: var(--accent-bright); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.id-strip .facts { position: relative; display: flex; flex-wrap: wrap; gap: 12px 32px; margin-left: auto; }
.id-strip .facts span { color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.id-strip .facts b { display: block; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

/* ============ Action row ============ */
.action-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; }
.action-card {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 16px; padding: 20px 22px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
    transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.action-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line-strong); }
.action-card.due { background: linear-gradient(100deg, var(--bad-soft), #fff 55%); }
.action-card.due::before { background: var(--bad); }
.action-card.resubmit { background: linear-gradient(100deg, var(--warn-soft), #fff 55%); }
.action-card.resubmit::before { background: var(--gold-bright); }
.action-card .a-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; }
.action-card.due .a-ico { background: #fff; color: var(--bad); border: 1px solid #FECACA; }
.action-card.resubmit .a-ico { background: #fff; color: var(--gold); border: 1px solid #FDE68A; }
.action-card .a-body { flex: 1; min-width: 0; }
.action-card .a-body strong { display: block; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.action-card .a-body small { display: block; color: var(--ink-500); font-size: 12px; }

/* ============ Buttons ============ */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 20px; border: 1px solid var(--accent); border-radius: 999px;
    background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
    box-shadow: 0 1px 2px rgba(20, 20, 43, .06);
    transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: #C2410C; border-color: #C2410C; box-shadow: 0 10px 22px -12px rgba(234, 88, 12, .7); transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-warm); }
.btn-warm { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-warm:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 10px 22px -12px rgba(49, 46, 129, .65); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-700); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink-900); box-shadow: none; }
.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--ink-700); box-shadow: none; }
.btn-outline:hover { background: var(--brand-softer); border-color: var(--brand-line); color: var(--brand); box-shadow: none; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; box-shadow: 0 10px 22px -12px rgba(220, 38, 38, .6); }
.btn-sm { height: 35px; padding: 0 15px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-link { background: none; border: 0; color: var(--brand-mid); font-weight: 700; padding: 0; height: auto; box-shadow: none; }
.btn-link:hover { background: none; transform: none; box-shadow: none; text-decoration: underline; }

/* ============ Grids & cards ============ */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-body { padding: 22px 26px; }
.card-lg .card-body { padding: 26px; }

.stat { display: block; overflow: hidden; transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.stat .strip { position: absolute; inset: 0 auto 0 0; width: 3px; height: auto; background: var(--accent); }
.stat .halo { display: none; }
.stat:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat .label { letter-spacing: .16em; }
.stat-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; }
.stat-value { margin: 14px 0 0; font-size: 27px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat-hint { margin: 5px 0 0; color: var(--ink-500); font-size: 12px; font-variant-numeric: tabular-nums; }

.label { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 9.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-400); }
.label .rule { width: 20px; height: 2px; border-radius: 2px; }
.card h2 { margin: 8px 0 0; font-size: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* ============ Quick access ============ */
.qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.qa-tile {
    position: relative; overflow: hidden; display: block; padding: 22px; min-height: 126px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.qa-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--qa, var(--brand)); transform: scaleY(.2); transform-origin: top; transition: transform .32s var(--ease); }
.qa-tile:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.qa-tile:hover::before { transform: scaleY(1); }
.qa-bg-icon { display: none; }
.qa-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--qa, var(--brand)) 11%, #fff); color: var(--qa, var(--brand)); font-size: 16px;
    transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.qa-tile:hover .qa-icon { background: var(--qa, var(--brand)); color: #fff; transform: rotate(-6deg); }
.qa-label { display: block; margin-top: 15px; font-size: 14.5px; font-weight: 800; letter-spacing: -.015em; color: var(--ink-900); }
.qa-count { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-500); }
.qa-badge {
    position: absolute; right: 15px; top: 15px; min-width: 24px; height: 22px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-700);
    font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.qa-cta { position: absolute; right: 18px; bottom: 18px; font-size: 11.5px; font-weight: 800; color: var(--qa, var(--brand)); opacity: 0; transform: translateX(-4px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.qa-tile:hover .qa-cta { opacity: 1; transform: none; }

/* ============ Folders ============ */
.folder-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.folder {
    position: relative; overflow: hidden; cursor: pointer; text-align: left; width: 100%; display: block;
    padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    font: inherit; color: inherit; box-shadow: var(--shadow-1);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.folder::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--fc, var(--brand)); }
.folder:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.folder-ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 17px;
    background: color-mix(in srgb, var(--fc, var(--brand)) 11%, #fff); color: var(--fc, var(--brand));
    transition: background-color .25s var(--ease), color .25s var(--ease);
}
.folder:hover .folder-ico { background: var(--fc, var(--brand)); color: #fff; }
.folder-name { display: block; margin-top: 15px; font-size: 16px; font-weight: 800; letter-spacing: -.025em; }
.folder-meta { display: block; margin-top: 9px; padding-top: 11px; border-top: 1px dashed var(--line-strong); color: var(--ink-500); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.folder-open { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--fc, var(--brand)); opacity: 0; transform: translateX(-4px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.folder:hover .folder-open { opacity: 1; transform: none; }
.folder-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ============ Pills ============ */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3.5px 11px; border-radius: 999px; border: 1px solid; font-size: 11px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.pill i { width: 5px; height: 5px; border-radius: 99px; background: currentColor; }
.pill-success { background: var(--ok-soft); color: var(--ok); border-color: #A7F3C4; }
.pill-warning { background: var(--warn-soft); color: var(--warn); border-color: #FDE68A; }
.pill-danger { background: var(--bad-soft); color: var(--bad); border-color: #FECACA; }
.pill-neutral { background: var(--surface-2); color: var(--ink-500); border-color: var(--line-strong); }

/* ============ Toolbar & tables ============ */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.field { position: relative; }
.field i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 12px; }
.input, .select {
    height: 42px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: #fff; color: var(--ink-900); font: inherit; font-size: 13.5px;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input.with-icon { padding-left: 36px; }
.select {
    appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236B6B8F' stroke-width='1.8'%3E%3Cpath d='M4 6.5 8 10.5l4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent-bright); box-shadow: var(--ring-warm); }
.field-grow { flex: 0 1 340px; }
.field-grow .input { width: 100%; }
.toolbar-count { margin-left: auto; color: var(--ink-500); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-1); }
.table-scroll { overflow-x: auto; max-height: none; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
    position: sticky; top: 0; z-index: 2;
    padding: 13px 17px; text-align: left; white-space: nowrap;
    background: var(--brand-softer); color: var(--brand);
    font-size: 9.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
    border-bottom: 1px solid var(--brand-soft);
}
table.data th.right, table.data td.right { text-align: right; }
table.data td { padding: 13px 17px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-700); }
table.data td.amount, table.data th.amount { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color .16s var(--ease); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--brand-softer); }
td.strong { font-weight: 700; color: var(--ink-900); }

/* ============ Empty ============ */
.empty { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 30px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fff; }
.empty img { width: 88px; height: 88px; border-radius: var(--radius-sm); object-fit: cover; flex: none; filter: grayscale(.4); }
.empty h3 { font-size: 15.5px; }
.empty p { margin: 6px 0 0; max-width: 480px; color: var(--ink-500); font-size: 13px; }

/* ============ DL / note ============ */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 28px; margin: 18px 0 0; }
.dl > div { min-width: 0; padding-left: 13px; border-left: 2px solid var(--brand-soft); }
.dl dt { font-size: 9.5px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--ink-400); }
.dl dd { margin: 4px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink-900); word-break: break-word; }
.note { margin: 20px 0 0; padding: 13px 15px; border: 1px solid var(--line); border-left: 3px solid var(--brand-mid); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-500); font-size: 12.5px; }
.note-warm { background: var(--warn-soft); border-color: #FDE68A; border-left-color: var(--gold-bright); color: #7A5306; }

/* ============ Dialog ============ */
.dialog { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 26px 20px; overflow-y: auto; }
.dialog.is-open { display: flex; }
.dialog .dialog-panel { margin: auto; }
.dialog-scrim { position: absolute; inset: 0; background: rgba(23, 19, 70, .5); backdrop-filter: blur(4px); animation: fadeIn .2s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog-panel {
    position: relative; z-index: 1; width: 100%; max-width: 880px; display: flex; flex-direction: column;
    max-height: calc(100vh - 52px); overflow: hidden;
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-3); animation: dialogIn .26s var(--ease);
}
.dialog-panel.dialog-sm { max-width: 470px; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.dialog-head { position: relative; flex: none; padding: 22px 28px 18px; background: #fff; color: var(--ink-900); border-bottom: 1px solid var(--line); }
.dialog-head::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tri-line); }
.dialog-head h3 { font-size: 17.5px; color: var(--ink-900); padding-right: 44px; }
.dialog-head .dialog-sub { margin: 5px 0 0; color: var(--ink-500); font-size: 12.5px; }
.dialog-inner { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 28px 28px; }
.dialog-x { position: absolute; right: 15px; top: 17px; z-index: 3; width: 31px; height: 31px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-500); font-size: 13px; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), transform .3s var(--ease); }
.dialog-x:hover { background: var(--bad-soft); color: var(--bad); transform: rotate(90deg); }

/* ============ Lists ============ */
.stack { display: grid; gap: 9px; margin: 18px 0 0; }
.row-grid { display: grid; align-items: start; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
@media (max-width: 900px) { .row-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .row-grid { grid-template-columns: 1fr; } }
.row-grid .row-card { flex-direction: column; align-items: flex-start; gap: 10px; }
.row-grid .row-card > span:not(.row-ico) { flex: 1 1 auto !important; width: 100%; }
.row-ico { flex: none; width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-mid); font-size: 14px; }
.row-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease); }
.row-card:hover { border-color: var(--brand-line); background: var(--brand-softer); transform: translateX(2px); }
.row-card strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.row-card small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 11.5px; }

.alert-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border: 1px solid #FDE68A; border-left: 3px solid var(--gold-bright); border-radius: var(--radius-sm); background: var(--warn-soft); }
.alert-row i { color: var(--gold); margin-top: 3px; font-size: 12px; }
.alert-row p { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.alert-row small { color: #8A6A22; font-size: 11.5px; }

.feed { list-style: none; margin: 18px 0 0; padding: 0 0 0 19px; border-left: 1px solid var(--line-strong); }
.feed li { position: relative; padding-bottom: 16px; }
.feed li:last-child { padding-bottom: 0; }
.feed li::before { content: ''; position: absolute; left: -23px; top: 7px; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 3px #fff; }
.feed p { margin: 0; font-size: 13.5px; font-weight: 700; }
.feed small { color: var(--ink-500); font-size: 11.5px; }

.legend { list-style: none; margin: 14px 0 0; padding: 0; }
.legend li { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.legend li:last-child { border-bottom: 0; }
.legend span.k { display: flex; align-items: center; gap: 9px; color: var(--ink-500); }
.legend i { width: 8px; height: 8px; border-radius: 2px; }

.mods { list-style: none; margin: 18px 0 0; padding: 0; }
.mods a { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-radius: var(--radius-xs); font-size: 13.5px; transition: background-color .2s var(--ease); }
.mods a:hover { background: var(--brand-softer); }
.mods .k { display: flex; align-items: center; gap: 11px; color: var(--ink-700); font-weight: 600; }
.mods .ico { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; }
.mods .v { font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; }

/* ============ CFS ============ */
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-mid), var(--accent)); transition: width .6s var(--ease); }
.cfs-meta { display: flex; flex-wrap: wrap; gap: 5px 22px; margin-top: 13px; color: var(--ink-500); font-size: 12px; font-variant-numeric: tabular-nums; }
.cfs-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 17px; font-size: 12.5px; font-weight: 800; color: var(--brand-mid); transition: gap .22s var(--ease); }
.cfs-link:hover { gap: 12px; }

.timeline { list-style: none; margin: 24px 0 0; padding: 0; }
.timeline li { position: relative; display: flex; gap: 16px; padding-bottom: 24px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .line { position: absolute; left: 14px; top: 32px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li.done .line { background: #A7F3C4; }
.timeline .dot { position: relative; z-index: 1; flex: none; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-strong); color: var(--ink-400); font-size: 11px; }
.timeline li.done .dot { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.timeline li.current .dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(249, 115, 22, .2); }
.timeline .stage { margin: 5px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink-400); }
.timeline li.done .stage, .timeline li.current .stage { color: var(--ink-900); }
.timeline .tag-now { margin-left: 9px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); font-size: 8.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; vertical-align: 2px; }
.timeline .when { margin: 3px 0 0; color: var(--ink-500); font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline .why { margin: 4px 0 0; color: var(--ink-500); font-size: 12px; }

.history { list-style: none; margin: 18px 0 0; padding: 0; }
.history li { border-left: 1px solid var(--line-strong); padding: 0 0 16px 17px; }
.history li:last-child { padding-bottom: 0; }
.history strong { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.history small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ============ Documents ============ */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 16px; }
.doc-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-1); transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease); }
.doc-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.doc-top { display: flex; gap: 12px; }
.doc-ico { flex: none; width: 39px; height: 39px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-mid); font-size: 14px; }
.doc-card strong { display: block; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-card small { display: block; margin-top: 3px; color: var(--ink-500); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line-strong); }
.chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-500); font-size: 10.5px; font-weight: 700; }

/* ============ Breadcrumb trail (drill-down) ============ */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); font-size: 13px; font-weight: 700; }
.trail a { color: var(--brand-mid); display: inline-flex; align-items: center; gap: 7px; }
.trail a:hover { text-decoration: underline; }
.trail .sep { color: var(--ink-400); font-size: 9px; }
.trail .here { color: var(--ink-900); }

/* ============ Auth (login / register) ============ */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--page); }

.gov-bar {
    position: relative; z-index: 3; flex: none;
    display: flex; align-items: center; gap: 14px; padding: 12px 32px;
    background: #fff; border-bottom: 1px solid var(--line);
}
.gov-bar::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tri-line); }
.gov-bar .gb-mark {
    width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px;
    background: linear-gradient(140deg, var(--brand-mid), var(--brand-dark)); color: #fff;
    font-size: 12px; font-weight: 800; letter-spacing: .04em; overflow: hidden;
}
.gov-bar .gb-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.gov-bar .gb-name strong { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; }
.gov-bar .gb-name small { display: block; color: var(--ink-500); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.gov-bar .gb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.gov-bar .gb-tag {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    background: var(--brand-softer); border: 1px solid var(--brand-soft); color: var(--brand);
    font-size: 11.5px; font-weight: 700;
}
.gov-bar .gb-tag i { color: var(--accent); }

.auth { flex: 1 1 auto; display: grid; grid-template-columns: 1.08fr 1fr; }
.auth-art {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
    padding: 52px 48px; color: #fff;
    background: linear-gradient(150deg, var(--brand-deeper) 0%, var(--brand) 55%, #3E2E86 100%);
}
.auth-art .glow { position: absolute; inset: 0; background: var(--guilloche); background-size: 300px 300px; opacity: .9; }
.auth-art .glow::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(560px 320px at 90% 8%, rgba(249, 115, 22, .22), transparent 65%);
}
.auth-art .brand-mark { width: 46px; height: 46px; background: #fff; color: var(--brand); font-size: 13px; font-weight: 800; border: 0; }
.auth-art .brand-text strong { font-size: 14.5px; letter-spacing: .05em; color: #fff; }
.auth-art .brand-text small { color: rgba(255, 255, 255, .55); }
.auth-art .mid { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 42px; }
.auth-art h1 { color: #fff; font-size: 40px; line-height: 1.1; letter-spacing: -.035em; }
.auth-art h1 em { font-style: normal; color: var(--accent-bright); }
.auth-art ul { list-style: none; margin: 30px 0 0; padding: 0; }
.auth-art li { display: flex; gap: 13px; margin-bottom: 14px; color: rgba(255, 255, 255, .78); font-size: 13.5px; }
.auth-art li i { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 999px; background: var(--accent-bright); }
.auth-art img { width: 296px; max-width: 38%; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .75); }
.auth-art .foot { position: relative; color: rgba(255, 255, 255, .45); font-size: 9.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }

.auth-badges { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.auth-badges span {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
    color: #fff; font-size: 11.5px; font-weight: 700;
}
.auth-badges i { color: var(--accent-bright); font-size: 11px; }

.auth-form { position: relative; overflow: hidden; display: grid; place-items: center; padding: 48px 26px; background: var(--page); }
.auth-form .glow { position: absolute; inset: 0; background-image: var(--grid-motif); background-size: 34px 34px; mask-image: radial-gradient(600px 400px at 50% 40%, #000, transparent 78%); }
.auth-box {
    position: relative; width: 100%; max-width: 424px; background: #fff;
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2); padding: 32px 32px 30px;
    overflow: hidden;
}
.auth-box::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tri-line); }
.auth-box h2 { margin: 10px 0 0; font-size: 25px; letter-spacing: -.03em; }
.auth-box .lede { margin: 9px 0 0; color: var(--ink-500); font-size: 13.5px; }
.auth-box form { margin-top: 24px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; margin-bottom: 7px; font-size: 9.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-500); }
.form-row .input { width: 100%; height: 48px; }
.form-row .hint { margin: 5px 0 0; color: var(--ink-400); font-size: 11.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ink-400); cursor: pointer; font-size: 13px; }
.pw-toggle:hover { color: var(--accent); }
.btn-block { width: 100%; height: 48px; font-size: 13.5px; }
.brand-inline { display: none; align-items: center; gap: 11px; margin-bottom: 24px; }
.brand-inline .brand-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, var(--brand-mid), var(--brand-dark)); color: #fff; font-size: 12px; font-weight: 800; border: 0; }

.service-strip {
    position: relative; flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px;
    padding: 16px 32px; background: var(--brand-dark); color: rgba(255, 255, 255, .8);
}
.service-strip::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tri-line); }
.service-strip .ss-title { font-size: 9.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.service-strip .ss-items { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.service-strip .ss-items span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: 11.5px; font-weight: 600; }
.service-strip .ss-items i { color: var(--accent-bright); font-size: 11px; }
.service-strip .ss-foot { margin-left: auto; font-size: 10.5px; color: rgba(255, 255, 255, .45); letter-spacing: .04em; }

.tabs { display: flex; gap: 3px; padding: 4px; margin-bottom: 22px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.tabs a { flex: 1; text-align: center; padding: 9px 10px; border-radius: 999px; color: var(--ink-500); font-size: 12.5px; font-weight: 700; transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.tabs a:hover { color: var(--brand); }
.tabs a.is-active { background: #fff; color: var(--brand); box-shadow: var(--shadow-1); }

.alert { display: flex; gap: 10px; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--bad-soft); color: var(--bad); border-color: #FECACA; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: #A7F3C4; }
.alert-info { background: var(--brand-softer); color: var(--brand); border-color: var(--brand-soft); }
.auth-note { display: flex; gap: 10px; margin: 22px 0 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-500); font-size: 11.5px; line-height: 1.6; }
.auth-alt { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-500); font-size: 12.5px; text-align: center; }
.auth-alt a { color: var(--accent); font-weight: 800; }

.steps { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.steps span { display: flex; align-items: center; gap: 8px; color: var(--ink-400); font-size: 11.5px; font-weight: 700; }
.steps b { width: 23px; height: 23px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: #fff; font-size: 10.5px; }
.steps .on { color: var(--brand); }
.steps .on b { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps .sep { flex: 1; height: 1px; background: var(--line-strong); }

/* ============ Payment UI ============ */
.pay-msg { display: none; padding: 13px 17px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13px; font-weight: 700; margin-top: 0; }
.pay-msg.show { display: block; }
.pay-msg.ok { background: var(--ok-soft); color: var(--ok); border-color: #A7F3C4; }
.pay-msg.warn { background: var(--warn-soft); color: var(--warn); border-color: #FDE68A; }
.pay-msg.err { background: var(--bad-soft); color: var(--bad); border-color: #FECACA; }
.amount-input-wrap { position: relative; }
.amount-input-wrap::before { content: '₹'; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-500); font-weight: 800; }
.amount-input-wrap .input { padding-left: 33px; width: 100%; height: 50px; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-secure { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; color: var(--ink-400); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pay-secure span { display: inline-flex; align-items: center; gap: 7px; }

/* ============ Mobile bottom nav ============ */
.tabbar { display: none; }

/* ============ Responsive ============ */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3, .grid-2-1, .grid-1-1, .grid-2 { grid-template-columns: 1fr; }
    .qa-grid, .folder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-body { max-width: 100%; }
    .auth-art { padding: 40px 34px; }
    .auth-art h1 { font-size: 33px; }
}
@media (max-width: 1023px) {
    .sidebar { z-index: 50; transform: translateX(-100%); transition: transform .3s var(--ease); width: 282px; box-shadow: 0 0 60px rgba(23, 19, 70, .35); }
    .sidebar.is-open { transform: none; }
    .drawer-close { display: block; }
    .scrim { display: block; position: fixed; inset: 0; z-index: 46; background: rgba(23, 19, 70, .45); opacity: 0; pointer-events: none; transition: opacity .26s var(--ease); }
    .scrim.is-open { opacity: 1; pointer-events: auto; }
    .main { margin-left: 0; }
    .only-mobile { display: inline-flex; }
    .topsearch { display: none; }
    .qa-grid, .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .brand-inline { display: flex; }
    .logout-top { display: none; }
    .id-strip .facts { margin-left: 0; width: 100%; }
    .service-strip { padding: 14px 18px; }
    .service-strip .ss-foot { display: none; }
    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
        border-top: 1px solid var(--line);
    }
    .tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 7px 2px; border-radius: var(--radius-xs); color: var(--ink-500);
        font-size: 9.5px; font-weight: 800; letter-spacing: .02em;
    }
    .tabbar a i { font-size: 16px; }
    .tabbar a.is-active { color: var(--accent); background: var(--accent-soft); }
    .content { padding-bottom: 96px; }
}
@media (max-width: 720px) {
    .content { padding: 16px 14px 100px; }
    .topbar { height: 58px; padding: 0 12px; }
    .grid-4, .folder-grid, .qa-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .page-head, .hero { padding: 20px 18px; }
    .page-head h1, .hero-body h1 { font-size: 20px; }
    .id-strip { padding: 18px; }
    .profile-text { display: none; }
    .crumb .home span { display: none; }
    .dialog { padding: 10px; }
    .dialog-head { padding: 20px 18px 15px; }
    .dialog-inner { padding: 18px 18px 22px; }
    .dl { grid-template-columns: 1fr; }
    .gov-bar { padding: 10px 16px; }
    .gov-bar .gb-tag span { display: none; }
    .auth-form { padding: 26px 14px; }
    .auth-box { padding: 26px 20px; }
    .auth-box h2 { font-size: 22px; }
    table.data th, table.data td { padding: 12px 14px; }

    /* Tables collapse to stacked cards when cells carry data-label */
    table.data.cards thead { display: none; }
    table.data.cards tbody tr { display: block; padding: 13px 15px; border-bottom: 1px solid var(--line); }
    table.data.cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
    table.data.cards td.amount { text-align: right; }
    table.data.cards td::before { content: attr(data-label); font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); text-align: left; }
}

/* ============ Print (invoices / receipts) ============ */
@media print {
    body { background: #fff; font-size: 12px; }
    .sidebar, .topbar, .tabbar, .scrim, .toolbar, .btn, .head-actions, .qa-grid, .folder-open, .dialog-x, .service-strip { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; max-width: none; }
    .card, .table-wrap, .page-head, .hero, .id-strip { box-shadow: none; border: 1px solid #ccc; }
    .id-strip { background: #fff !important; color: #000; }
    .id-strip .who strong, .id-strip .facts span { color: #000 !important; }
    .id-strip .who small, .id-strip .facts b { color: #444 !important; }
    table.data th { position: static; background: #f3f4f6 !important; color: #000 !important; -webkit-print-color-adjust: exact; }
    a[href]::after { content: none !important; }
}

/* ============================================================
   UI/UX patch — sidebar, headers, folders, calendar, documents
   ============================================================ */

/* Sidebar: scrolling works, scrollbar is invisible */
.nav, .sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.nav::-webkit-scrollbar, .sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
.nav-badge { display: none !important; }

/* No welcome / banner block — compact page title only */
.page-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.page-title h1 { margin: 0; font-size: 22px; letter-spacing: -.03em; color: var(--ink-900); }

/* Folder cards: single CTA in the flow, nothing overlapping */
.folder { padding-bottom: 18px; }
.folder-open {
    position: static; opacity: 1; transform: none; margin-top: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: var(--fc, var(--brand));
}
.folder-open i { transition: transform .25s var(--ease); }
.folder:hover .folder-open { opacity: 1; transform: none; }
.folder:hover .folder-open i { transform: translateX(3px); }
.folder-meta { padding-right: 0; }

/* Due date calendar */
.due-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; margin-top: 4px; }
.cal-card, .due-list-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-1); padding: 18px 20px 20px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cal-head h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav a { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-500); font-size: 12px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.cal-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-dow { text-align: center; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); padding: 2px 0 6px; }
.cal-day { position: relative; min-height: 46px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--ink-900); font-variant-numeric: tabular-nums; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.cal-day.is-blank { border-color: transparent; }
.cal-day.is-today { border-color: var(--accent); background: var(--accent-soft); font-weight: 800; }
.cal-day.has-due { border-color: rgba(190, 18, 60, .35); background: rgba(190, 18, 60, .06); }
.cal-day.has-due:hover { background: rgba(190, 18, 60, .12); }
.cal-day .dot { position: absolute; right: 6px; bottom: 6px; width: 6px; height: 6px; border-radius: 999px; background: #BE123C; }
.cal-day .cal-tag { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #BE123C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due-list { display: grid; gap: 9px; margin-top: 4px; }
.due-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.due-item:hover { transform: translateX(2px); border-color: var(--brand-line); }
.due-item.is-soon { border-color: rgba(190, 18, 60, .4); background: rgba(190, 18, 60, .05); }
.due-item .d-date { flex: none; width: 46px; text-align: center; }
.due-item .d-date b { display: block; font-size: 16px; font-weight: 800; line-height: 1.1; }
.due-item .d-date small { display: block; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.due-item .d-body strong { display: block; font-size: 13px; font-weight: 700; }
.due-item .d-body small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 11.5px; }
@media (max-width: 900px) { .due-wrap { grid-template-columns: 1fr; } }

/* Document modal viewer */
.doc-viewer { width: 100%; height: min(66vh, 620px); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; background: var(--page); }
.dialog-inner, .table-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.dialog-inner::-webkit-scrollbar, .table-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.only-desktop { display: initial; }
.only-mobile-inline { display: none; }
@media (max-width: 767px) {
    .doc-viewer, .only-desktop { display: none !important; }
    .only-mobile-inline { display: inline-flex !important; }
}

/* ============ Login (logo-led, viewport fit) ============ */
body.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; background: var(--page); overflow: hidden; }
.login-shell { width: 100%; max-width: 412px; }
.login-logo { display: block; margin: 0 auto 22px; width: min(260px, 62%); height: auto; }
.login-card { border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-2); padding: 26px 24px 24px; }
.login-card h1 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.03em; }
.login-card .lede { margin: 0 0 18px; color: var(--ink-500); font-size: 13px; }
.login-foot { margin: 16px 0 0; text-align: center; color: var(--ink-500); font-size: 12px; }
@media (max-height: 640px) { body.login-page { overflow: auto; place-items: start center; } .login-logo { width: min(190px, 50%); margin-bottom: 14px; } }

/* ---- Auth pages: logo instead of the OTN text mark, no gov header ---- */
.brand-mark.otn-logo-mark { background: #fff; padding: 5px; }
.brand-mark.otn-logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.auth-logo { display: block; width: min(190px, 58%); height: auto; margin: 0 auto 20px; }
.auth-page { min-height: 100dvh; }

/* Calendar nav buttons (client-side month switching) */
.cal-nav button {
    width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-500); font-size: 12px;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cal-nav button:hover { background: var(--accent-soft); color: var(--accent); }

/* CFS file detail — summary strip */
.file-head { margin-bottom: 18px; }
.file-head .fh-main {
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 12px;
    padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow-1);
}
.fh-eyebrow { margin: 0; font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-500); }
.fh-no { margin: 4px 0 0; font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fh-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.fh-facts span { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; color: var(--ink-900); }
.fh-facts b { font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 3px; }
.fh-status { margin-left: auto; }
@media (max-width: 767px) { .fh-status { margin-left: 0; } }
.auth-art .brand-mark.otn-logo-mark { width: 58px; height: 58px; border-radius: 12px; padding: 6px; }
.auth-art .brand-mark.otn-logo-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---- Calendar: category colours, legend, verified badge ---- */
.cal-day.has-due.is-gst { border-color: rgba(21, 128, 61, .38); background: rgba(21, 128, 61, .07); }
.cal-day.has-due.is-it { border-color: rgba(67, 56, 202, .38); background: rgba(67, 56, 202, .07); }
.cal-day .cal-tag { color: var(--ink-900); opacity: .75; }
.cal-day .dot { position: static; display: inline-block; width: 6px; height: 6px; margin: 3px 3px 0 0; }
.cal-day .dot-gst { background: #15803D; }
.cal-day .dot-it { background: #4338CA; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; font-size: 11px; font-weight: 700; color: var(--ink-500); }
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 6px; }
.cal-legend .dot-gst { background: #15803D; }
.cal-legend .dot-it { background: #4338CA; }
.cal-verified { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 4px 10px; border-radius: 999px; background: rgba(21, 128, 61, .1); color: #15803D; }
.cal-verified i { width: auto; height: auto; background: none; }
.cat-chip { display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cat-chip.cat-gst { background: rgba(21, 128, 61, .12); color: #15803D; }
.cat-chip.cat-it { background: rgba(67, 56, 202, .12); color: #4338CA; }

/* ---- Shared document viewer popup (no links anywhere) ---- */
.dialog-panel.dialog-wide { max-width: 1020px; width: 100%; }
.doc-frame-wrap { position: relative; }
.doc-frame-wrap .doc-viewer { width: 100%; height: min(72dvh, 700px); border: 1px solid var(--line); border-radius: 12px; background: var(--page); display: block; }
#otnDocObject { display: none; }
.only-desktop { display: initial; }
@media (max-width: 767px) {
    .doc-frame-wrap .doc-viewer { height: 66dvh; }
    .only-desktop { display: initial; }
}
#otn-doc-dialog { z-index: 140; }
.otn-doc-open { margin: 3px 6px 3px 0; }

/* Payment line items — billed / paid / due per "Payment for" row */
.line-amts { display: flex; gap: 16px; flex: 0 0 auto; }
.line-amts span { display: flex; flex-direction: column; align-items: flex-end; }
.line-amts small { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); }
.line-amts b { font-size: 13px; font-weight: 700; }
@media (max-width: 520px) { .line-amts { gap: 12px; width: 100%; justify-content: space-between; } }
