/* =====================================================================
   DhanSetu - Paddy Trading Management System
   Theme: deep green + gold. Works on top of Bootstrap 5.3 (CDN).
   ===================================================================== */
:root {
    --g950: #04301f; --g900: #06412b; --g800: #0a5236; --g700: #0d6b43; --g600: #12804f; --g500: #1a9a5f;
    --g200: #c9e6d5; --g100: #e3f3ea; --g50: #f3faf6;
    --gold: #c8901a; --gold2: #e2ab2f; --gold-soft: #fbf1d8;
    --ink: #1b2a23; --muted: #6a7b72; --line: #e2eae5; --bg: #f2f6f3; --card: #ffffff;
    --orange: #f0a41c; --red: #e0443f; --blue: #1f6fe5; --purple: #7a55c7;
    --radius: 12px; --shadow: 0 1px 2px rgba(6, 65, 43, .06), 0 4px 14px rgba(6, 65, 43, .05);
    --sidebar-w: 252px;
    --bs-body-font-family: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --bs-body-color: var(--ink);
    --bs-body-font-size: .9rem;
    --bs-link-color: var(--g700);
    --bs-link-hover-color: var(--g900);
    --bs-primary: #0d6b43;
    --bs-primary-rgb: 13, 107, 67;
}
* { -webkit-font-smoothing: antialiased; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--bs-body-font-family); font-size: .9rem; }
a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }
.text-gold { color: var(--gold) !important; }
.text-g { color: var(--g700) !important; }
.fw-800 { font-weight: 800; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- sidebar */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040; overflow-y: auto; overflow-x: hidden;
    background: linear-gradient(180deg, var(--g800) 0%, var(--g900) 55%, var(--g950) 100%); color: #e8f5ee;
    display: flex; flex-direction: column; transition: transform .25s ease; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand svg { flex: 0 0 auto; }
.brand-name { font-size: 1.55rem; font-weight: 800; letter-spacing: -.5px; line-height: 1; color: #fff; }
.brand-name b { color: var(--gold2); font-weight: 800; }
.brand-sub { font-size: .62rem; color: rgba(255,255,255,.6); letter-spacing: .3px; margin-top: 3px; }
.sidebar .nav-list { list-style: none; margin: 0; padding: 12px 10px; flex: 1 1 auto; }
.sidebar .nav-list > li { margin-bottom: 2px; }
.sidebar .nav-item-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #e8f5ee; font-size: .86rem; font-weight: 500;
    cursor: pointer; transition: background .15s, color .15s; width: 100%; border: 0; background: transparent; text-align: left;
}
.sidebar .nav-item-link i.ico { width: 20px; text-align: center; font-size: .95rem; opacity: .95; }
.sidebar .nav-item-link:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidebar .nav-item-link.active { background: #e4f4ea; color: var(--g800); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.sidebar .nav-item-link .chev { margin-left: auto; font-size: .65rem; opacity: .7; transition: transform .2s; }
.sidebar .nav-item-link[aria-expanded="true"] .chev { transform: rotate(90deg); }
.sidebar .sub { list-style: none; margin: 2px 0 6px; padding: 0 0 0 30px; }
.sidebar .sub a { display: block; padding: 6px 10px; border-radius: 7px; color: rgba(255,255,255,.78); font-size: .8rem; }
.sidebar .sub a:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar .sub a.active { color: var(--gold2); font-weight: 700; }
.sidebar .lang-box { margin: 8px 12px 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.sidebar .lang-box small { display: block; color: rgba(255,255,255,.6); font-size: .68rem; margin-bottom: 6px; }
.lang-pills { display: flex; gap: 5px; }
.lang-pills a { flex: 1; text-align: center; padding: 4px 0; font-size: .74rem; border-radius: 6px; color: #dcefe4; background: rgba(255,255,255,.07); }
.lang-pills a.on, .lang-pills a:hover { background: var(--gold2); color: #3a2a00; font-weight: 700; }
.sidebar-backdrop { display: none; }

/* ---------------------------------------------------------------- main + topbar */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1030; height: 62px; background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.topbar .toggle { display: none; border: 0; background: transparent; font-size: 1.25rem; color: var(--g800); }
.topbar .search { position: relative; flex: 0 1 420px; }
.topbar .search input { padding-left: 38px; border-radius: 10px; background: #f5f8f6; border: 1px solid var(--line); height: 38px; font-size: .84rem; }
.topbar .search i { position: absolute; left: 13px; top: 11px; color: var(--muted); font-size: .85rem; }
.topbar .spacer { flex: 1; }
.topbar .today { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.topbar .fy-select { font-size: .8rem; border-radius: 8px; border: 1px solid var(--line); padding: 5px 26px 5px 10px; background-color: #fff; font-weight: 600; color: var(--g800); }
.bell { position: relative; border: 0; background: transparent; font-size: 1.1rem; color: var(--g800); padding: 6px 8px; }
.bell .cnt { position: absolute; top: 0; right: 0; background: var(--red); color: #fff; font-size: .62rem; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 3px 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--g700), var(--g500)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.user-chip .who { text-align: left; line-height: 1.15; }
.user-chip .who b { font-size: .82rem; display: block; color: var(--ink); }
.user-chip .who small { font-size: .7rem; color: var(--muted); }
.notif-menu { width: 340px; max-height: 420px; overflow: auto; padding: 0; }
.notif-menu .n-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--ink); }
.notif-menu .n-item:hover { background: var(--g50); }
.notif-menu .n-item i { margin-top: 2px; }
.content { padding: 22px 24px 30px; flex: 1; }
.footer-bar { padding: 12px 24px; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-size: 1.55rem; font-weight: 800; color: var(--g900); margin: 0; letter-spacing: -.3px; }
.page-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- cards */
.card-ds { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-ds > .card-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; color: var(--g900); }
.card-ds > .card-b { padding: 18px; }
.card-h .link { font-size: .78rem; font-weight: 600; }
.sec-title { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--g900); margin-bottom: 14px; font-size: .95rem; }
.sec-title .ic { width: 26px; height: 26px; border-radius: 50%; background: var(--g100); color: var(--g700); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; }

/* KPI tiles */
.kpi { border-radius: 14px; padding: 16px 18px; color: #fff; display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.12); min-height: 104px; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.1); }
.kpi .ic { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex: 0 0 auto; }
.kpi .lbl { font-size: .82rem; opacity: .92; font-weight: 500; }
.kpi .val { font-size: 1.45rem; font-weight: 800; line-height: 1.15; letter-spacing: -.4px; white-space: nowrap; }
.kpi .sub { font-size: .78rem; opacity: .92; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi .chg { background: rgba(255,255,255,.22); border-radius: 20px; padding: 0 7px; font-size: .72rem; font-weight: 700; }
.kpi.k-green { background: linear-gradient(135deg, #159a55, #0c7d43); } .kpi.k-green .ic { color: #159a55; }
.kpi.k-orange { background: linear-gradient(135deg, #f5b02a, #e58f0f); } .kpi.k-orange .ic { color: #e58f0f; }
.kpi.k-red { background: linear-gradient(135deg, #ea5348, #d32f33); } .kpi.k-red .ic { color: #d32f33; }
.kpi.k-blue { background: linear-gradient(135deg, #2a7cf0, #1758c9); } .kpi.k-blue .ic { color: #1758c9; }
.mini-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.mini-kpi .ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.mini-kpi .l { font-size: .74rem; color: var(--muted); }
.mini-kpi .v { font-size: 1.2rem; font-weight: 800; color: var(--ink); line-height: 1.2; }

/* ---------------------------------------------------------------- tables */
.table-ds { margin: 0; font-size: .82rem; }
.table-ds thead th { background: #f0f5f2; color: #35463d; font-weight: 700; font-size: .76rem; border-bottom: 1px solid var(--line); padding: 10px 9px; white-space: nowrap; }
.table-ds td { padding: 9px 9px; vertical-align: middle; border-color: var(--line); }
.table-ds tbody tr:hover { background: var(--g50); }
.table-ds tfoot td { background: #f6faf7; font-weight: 800; border-top: 2px solid var(--g200); }
.table-ds .num, .table-ds th.num { text-align: right; }
.table-wrap { overflow-x: auto; }
.st { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.st-completed, .st-closed, .st-active { background: #dcf3e5; color: #0d7a43; }
.st-pending { background: #fdecc8; color: #a86500; }
.st-advance { background: #dde9fb; color: #1758c9; }
.st-inactive, .st-cancelled { background: #ececec; color: #666; }
.icon-btn { width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; color: var(--g700); font-size: .8rem; cursor: pointer; }
.icon-btn:hover { background: var(--g100); color: var(--g900); }
.icon-btn.danger { color: var(--red); } .icon-btn.danger:hover { background: #fde8e7; }
.icon-btn.blue { color: var(--blue); } .icon-btn.blue:hover { background: #e3edfd; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.empty i { font-size: 2rem; color: var(--g200); display: block; margin-bottom: 8px; }

/* ---------------------------------------------------------------- forms & buttons */
.form-label { font-size: .76rem; font-weight: 600; color: #3d4e45; margin-bottom: 4px; }
.form-control, .form-select { font-size: .86rem; border-color: #d7e1db; border-radius: 8px; padding: .42rem .7rem; }
.form-control:focus, .form-select:focus { border-color: var(--g600); box-shadow: 0 0 0 .18rem rgba(18,128,79,.15); }
.form-control[readonly] { background: #f3f7f5; }
.input-group-text { background: #f3f7f5; border-color: #d7e1db; color: var(--muted); font-size: .84rem; }
.form-control.big { font-weight: 800; font-size: 1.05rem; }
.btn { border-radius: 8px; font-weight: 600; font-size: .84rem; }
.btn-ds { background: var(--g700); border-color: var(--g700); color: #fff; }
.btn-ds:hover, .btn-ds:focus { background: var(--g800); border-color: var(--g800); color: #fff; }
.btn-outline-ds { border-color: var(--g700); color: var(--g700); background: #fff; }
.btn-outline-ds:hover { background: var(--g700); color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; } .btn-blue:hover { background: #1758c9; color: #fff; }
.btn-wa { background: #25a768; border-color: #25a768; color: #fff; } .btn-wa:hover { background: #1c8d55; color: #fff; }
.btn-gold { background: var(--gold2); border-color: var(--gold2); color: #3a2a00; } .btn-gold:hover { background: var(--gold); color: #fff; }
.btn-soft { background: #fff; border: 1px solid var(--line); color: var(--ink); } .btn-soft:hover { background: var(--g50); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filter-bar .f { display: flex; flex-direction: column; }
.filter-bar .f label { font-size: .7rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.filter-bar .form-control, .filter-bar .form-select { min-width: 130px; height: 36px; }
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .86rem; display: flex; gap: 10px; align-items: center; }
.flash.ok { background: #dcf3e5; color: #0b6b3b; border: 1px solid #b9e4c9; }
.flash.warn { background: #fff3d6; color: #8a5a00; border: 1px solid #f3dc9d; }
.flash.err { background: #fde8e7; color: #a5211c; border: 1px solid #f5c2bf; }
.amount-box { background: var(--g50); border: 1px solid var(--g200); border-radius: 10px; padding: 12px 14px; }
.amount-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-size: .86rem; }
.amount-line.total { border-top: 2px solid var(--g200); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1rem; color: var(--g900); }
.amount-line .form-control { max-width: 130px; text-align: right; padding: .25rem .5rem; height: 30px; }
.bar-sticky { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 10px; flex-wrap: wrap; border-radius: 0 0 var(--radius) var(--radius); }
.pagination { margin: 0; } .page-link { color: var(--g700); font-size: .8rem; } .page-item.active .page-link { background: var(--g700); border-color: var(--g700); }
.list-foot { padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }

/* quick actions */
.qa { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; font-size: .84rem; margin-bottom: 8px; transition: all .15s; }
.qa:hover { background: var(--g50); border-color: var(--g200); color: var(--g800); transform: translateX(2px); }
.qa .ic { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .85rem; }

/* settings side menu */
.set-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: .85rem; margin-bottom: 3px; }
.set-menu a i { width: 18px; text-align: center; color: var(--g700); }
.set-menu a:hover { background: var(--g50); }
.set-menu a.active { background: var(--g700); color: #fff; } .set-menu a.active i { color: #fff; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* reports index */
.rep-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: 100%; box-shadow: var(--shadow); }
.rep-card h6 { margin: 0; padding: 12px 16px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--g800), var(--g700)); font-size: .9rem; }
.rep-card a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: var(--ink); font-size: .84rem; border-bottom: 1px solid var(--line); }
.rep-card a:last-child { border-bottom: 0; }
.rep-card a:hover { background: var(--g50); color: var(--g800); }
.rep-card a i { width: 18px; color: var(--gold); text-align: center; }
.rep-card a .go { margin-left: auto; color: var(--g200); font-size: .7rem; }

/* ledger header */
.party-head { display: flex; align-items: center; gap: 14px; }
.party-head .pic { width: 46px; height: 46px; border-radius: 50%; background: var(--g100); color: var(--g700); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; background: #f4f0dd; }
.login-bg { position: absolute; inset: 0; z-index: 0; }
.login-bg svg { width: 100%; height: 100%; display: block; }
.login-top-curve { position: absolute; top: 0; left: 0; z-index: 1; }
.login-inner { position: relative; z-index: 2; flex: 1; display: flex; padding: 34px 5vw 24px; gap: 30px; align-items: stretch; }
.login-left { flex: 1 1 58%; min-width: 0; display: flex; flex-direction: column; padding-right: 2vw; }
.login-right { flex: 0 0 min(470px, 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.logo-lockup { display: flex; align-items: center; gap: 10px; }
.logo-word { font-size: clamp(3rem, 5.4vw, 5rem); font-weight: 900; letter-spacing: -2px; line-height: .95; color: var(--g900); }
.logo-word b { background: linear-gradient(180deg, #e8b53a, #b87a0c); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.logo-word sup { font-size: .8rem; letter-spacing: 0; color: var(--g900); font-weight: 700; top: -2.2em; }
.logo-tag { font-size: 1.2rem; font-weight: 500; color: var(--g900); letter-spacing: .2px; margin-left: 4px; }
.tagline-mr { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 800; color: var(--g900); margin: 12px 0 2px; }
.tagline-en { font-size: 1.15rem; font-style: italic; font-weight: 600; color: var(--g800); }
.stat-strip { display: flex; gap: 26px; margin: 22px 0 16px; align-items: center; background: rgba(255,255,255,.72); backdrop-filter: blur(3px); border-radius: 14px; padding: 12px 22px; width: fit-content; max-width: 100%; flex-wrap: wrap; }
.stat-strip .st-i { text-align: center; }
.stat-strip .st-i i { font-size: 1.5rem; color: var(--g800); }
.stat-strip .st-i b { display: block; font-size: 1.35rem; color: var(--g900); font-weight: 800; line-height: 1.1; }
.stat-strip .st-i small { color: #445; font-size: .8rem; }
.check-list { list-style: none; padding: 0; margin: 0; background: rgba(255,255,255,.55); border-radius: 12px; width: fit-content; padding: 10px 18px 10px 12px; }
.check-list li { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: .98rem; color: #1e3a2c; }
.check-list li i { color: var(--g700); font-size: 1.15rem; }
.script-tag { position: absolute; left: 44%; top: 32%; font-family: 'Brush Script MT', 'Segoe Script', 'Lucida Handwriting', cursive; font-size: 1.9rem; color: var(--g900); transform: rotate(-9deg); line-height: 1.05; opacity: .95; }
.script-tag::after { content: ''; display: block; height: 3px; width: 85%; margin: 4px 0 0 30px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--gold2)); transform: rotate(-3deg); }
.login-card { width: 100%; background: #fff; border-radius: 16px; padding: 30px 34px 22px; box-shadow: 0 18px 50px rgba(6,65,43,.28); position: relative; }
.login-card .shield { width: 62px; height: 68px; margin: -50px auto 6px; display: block; }
.login-card h2 { text-align: center; font-weight: 800; color: var(--g950); margin: 0; font-size: 2rem; letter-spacing: -.5px; }
.login-card .sub { text-align: center; color: #48594f; margin-bottom: 20px; }
.login-card .input-icon { position: relative; margin-bottom: 14px; }
.login-card .input-icon > i.l { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #6b7a72; z-index: 2; }
.login-card .input-icon .form-control { padding-left: 44px; height: 50px; background: #eef3fb; border: 1px solid #dfe7f3; font-size: 1rem; border-radius: 10px; }
.login-card .input-icon .eye { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #55655d; z-index: 2; }
.login-btn { width: 100%; height: 48px; border-radius: 9px; background: linear-gradient(180deg, #0b6a43, #075336); color: #fff; font-weight: 700; font-size: 1.05rem; border: 0; display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-btn:hover { filter: brightness(1.12); color: #fff; }
.or-line { display: flex; align-items: center; gap: 12px; color: #55655d; font-size: .8rem; margin: 12px 0; } .or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: #dde5e0; }
.qr-btn { width: 100%; height: 44px; border-radius: 9px; background: #eef3fb; border: 1px solid #dfe7f3; color: #1b2a23; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 12px; }
.qr-btn:hover { background: #e2ebf8; }
.login-quote { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; color: #48594f; font-size: .85rem; text-align: center; line-height: 1.3; }
.lang-drop { position: absolute; top: 26px; right: 5vw; z-index: 6; }
.lang-drop .btn-lang { background: rgba(6,65,43,.94); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; padding: 8px 14px; min-width: 182px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; }
.lang-drop .menu { position: absolute; top: 44px; right: 0; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); min-width: 150px; padding: 6px; display: none; }
.lang-drop.open .menu { display: block; }
.lang-drop .menu a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink); }
.lang-drop .menu a:hover, .lang-drop .menu a.on { background: var(--g50); }
.module-tiles { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; padding: 0 5vw 18px; }
.module-tiles .t { background: rgba(255,255,255,.96); border-radius: 10px; padding: 12px 6px 9px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.module-tiles .t i { font-size: 1.65rem; color: var(--g800); display: block; margin-bottom: 4px; }
.module-tiles .t b { display: block; font-size: .78rem; color: var(--g950); line-height: 1.15; }
.module-tiles .t span { font-size: .75rem; color: #3a4a41; }
.login-footer { position: relative; z-index: 2; background: var(--g900); color: #d5eadf; padding: 13px 5vw; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .82rem; }
.login-footer a { color: #d5eadf; } .login-footer a:hover { color: #fff; }
.login-footer .links { display: flex; align-items: center; gap: 12px; }
.login-footer .links .sep { opacity: .4; }
.login-footer .soc { display: flex; gap: 14px; font-size: 1.25rem; margin-left: 10px; }

/* QR modal */
#qrBox { display: flex; align-items: center; justify-content: center; min-height: 230px; }
#qrBox canvas, #qrBox img { border: 8px solid #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

/* ---------------------------------------------------------------- print docs */
.doc { background: #fff; max-width: 820px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; padding: 30px 36px; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px double var(--g700); padding-bottom: 14px; margin-bottom: 16px; }
.doc-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; color: var(--g900); }
.doc .doc-title { text-align: center; font-weight: 800; letter-spacing: 1px; font-size: 1.05rem; text-transform: uppercase; margin: 6px 0 14px; color: var(--g800); }
.doc table.t { width: 100%; border-collapse: collapse; font-size: .85rem; }
.doc table.t th, .doc table.t td { border: 1px solid #cfd9d3; padding: 7px 10px; }
.doc table.t th { background: #eef4f0; }
.sign-row { display: flex; justify-content: space-between; margin-top: 60px; font-size: .8rem; color: #555; }
.sign-row div { border-top: 1px solid #999; padding-top: 4px; min-width: 150px; text-align: center; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199px) { .module-tiles { grid-template-columns: repeat(5, 1fr); } .script-tag { display: none; } }
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    body.sb-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
    body.sb-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
    .main { margin-left: 0; }
    .topbar .toggle { display: inline-block; }
    .topbar .today, .topbar .who { display: none; }
    .topbar .search { flex: 1 1 auto; }
    .content { padding: 16px 12px 24px; }
    .login-inner { flex-direction: column; padding-top: 70px; }
    .login-right { flex: none; margin-top: 30px; }
    .login-card .shield { margin-top: -50px; }
}
@media (max-width: 575px) { .module-tiles { grid-template-columns: repeat(2, 1fr); } .stat-strip { gap: 14px; } }

@media print {
    body { background: #fff !important; }
    .sidebar, .topbar, .no-print, .footer-bar, .flash, .filter-bar, .page-actions, .list-foot .pagination { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0 !important; }
    .card-ds, .doc { box-shadow: none !important; border: 0 !important; }
    .doc { max-width: 100%; padding: 0; }
    .table-ds thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit !important; }
}

/* compact tables inside half-width cards */
.table-ds.compact th, .table-ds.compact td { padding: 9px 7px; font-size: .82rem; }

.list-foot nav p.small { display: none; }
.list-foot nav > div:first-child.d-sm-none { display: none !important; }
.list-foot nav > div.d-sm-flex { justify-content: flex-end !important; }
