/* PayrollPro – "ledger" identity
   ink green chrome, cool paper, one rupee-gold accent, tabular figures everywhere money appears. */

:root {
    --ink: #16302B;
    --ink-2: #21443D;
    --ink-3: #2E574E;
    --paper: #F5F7F6;
    --surface: #FFFFFF;
    --text: #1C2624;
    --muted: #5B6B67;
    --rule: #D6DEDB;
    --rule-soft: #E7ECEA;
    --gold: #B7791F;
    --gold-soft: #FBF3E4;
    --ok: #1F7A4D;
    --ok-soft: #E6F4EC;
    --warn: #B54708;
    --warn-soft: #FEF3E7;
    --err: #B42318;
    --err-soft: #FDECEA;
    --info: #1D5B8F;
    --info-soft: #E8F1F9;
    --radius-s: 6px;
    --radius-m: 10px;
    --sidebar-w: 248px;
    --bs-body-font-family: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--paper);
    --bs-border-color: var(--rule);
    --bs-primary: var(--ink);
    --bs-primary-rgb: 22, 48, 43;
    --bs-link-color: var(--ink-3);
    --bs-link-hover-color: var(--ink);
}

html { font-size: 15px; }
body { font-family: var(--bs-body-font-family); color: var(--text); background: var(--paper); line-height: 1.5; }
.num, .money, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.money::before { content: "₹"; opacity: .55; margin-right: 1px; font-weight: 400; }
.text-muted, .muted { color: var(--muted) !important; }
a { color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 2000; }
.skip-link:focus { left: 8px; }

/* ---------------------------------------------------------------- shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--ink); color: #D5E2DE;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 8px; background: var(--gold); color: var(--ink);
    display: grid; place-items: center; font-weight: 800; font-size: 1.15rem;
}
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.nav-title { font-size: .78rem; color: #8FAAA3; margin: 18px 10px 6px; font-weight: 600; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s);
    color: #D5E2DE; text-decoration: none; font-size: .93rem; margin-bottom: 1px;
}
.nav-item i { font-size: 1.02rem; opacity: .85; width: 18px; }
.nav-item:hover { background: var(--ink-2); color: #fff; }
.nav-item.active { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px;
    background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 900;
}
.topbar-title { font-weight: 600; color: var(--muted); font-size: .95rem; }
.user-chip { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px; border-radius: var(--radius-s); color: var(--text); }
.user-chip:hover { background: var(--paper); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.user-text { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.user-name { font-weight: 600; font-size: .9rem; }
.user-role { font-size: .76rem; color: var(--muted); }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.btn-icon { border: 1px solid var(--rule); background: var(--surface); width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: var(--radius-s); color: var(--text); }
.btn-icon:hover { border-color: var(--ink-3); }
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 1100; transform: translateX(-100%); transition: transform .2s ease; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 25, 22, .45); z-index: 1050; }
    .content { padding: 18px 16px 40px; }
    .topbar { padding: 0 16px; }
    .user-text { display: none; }
}

/* ---------------------------------------------------------------- page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; max-width: 68ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.month-picker { display: flex; align-items: center; gap: 6px; }
.month-picker input { width: 170px; }

/* ---------------------------------------------------------------- buttons & forms */
.btn { border-radius: var(--radius-s); font-weight: 600; font-size: .92rem; }
.btn-primary { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink-3); --bs-btn-hover-border-color: var(--ink-3); --bs-btn-active-bg: var(--ink-2); --bs-btn-disabled-bg: var(--ink-3); --bs-btn-disabled-border-color: var(--ink-3); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #9C6617; border-color: #9C6617; color: #fff; }
.btn-outline-secondary { --bs-btn-color: var(--text); --bs-btn-border-color: var(--rule); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--ink-3); }
.btn-link-danger { color: var(--err); background: none; border: 0; padding: 0; font-weight: 600; }
.form-label { font-weight: 600; font-size: .86rem; margin-bottom: 4px; }
.form-control, .form-select { border-color: var(--rule); border-radius: var(--radius-s); }
.form-control:focus, .form-select:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(46, 87, 78, .15); }
.form-text { color: var(--muted); }
.input-group-text { background: var(--paper); border-color: var(--rule); color: var(--muted); }
.field-validation-error, .text-danger { color: var(--err) !important; font-size: .84rem; }
.input-validation-error { border-color: var(--err) !important; }
.input-validation-error:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .15) !important; }
.validation-summary-errors { background: var(--err-soft); border: 1px solid #F4C7C2; border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 16px; color: var(--err); }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.required::after { content: " *"; color: var(--err); }
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0; }
.ts-control { border-color: var(--rule) !important; border-radius: var(--radius-s) !important; min-height: 38px; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.is-upper { text-transform: uppercase; }
.form-section { border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 22px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.form-section > p { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.form-footer { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 24px; }

/* ---------------------------------------------------------------- panels */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.panel-body { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--rule); }
.panel-head h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.panel-head .hint { color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- tables (hairline ledger) */
.ledger { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ledger th { font-weight: 600; font-size: .8rem; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--surface); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.ledger td { padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.ledger tbody tr:hover { background: #FAFBFA; }
.ledger tfoot td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: 0; }
.ledger .code { font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ledger .sub { display: block; font-size: .8rem; color: var(--muted); }
.ledger tr.row-err td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.ledger tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table-wrap { overflow-x: auto; }
.table-wrap.tall { max-height: 70vh; overflow-y: auto; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.row-actions form { display: inline; }

/* master-table.js toolbar */
.mt-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--rule); }
.mt-search { position: relative; min-width: 260px; }
.mt-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.mt-search input { padding-left: 32px; }
.mt-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; color: var(--muted); font-size: .85rem; }
.mt-pages { display: flex; gap: 4px; }
.mt-pages button { border: 1px solid var(--rule); background: var(--surface); border-radius: 5px; min-width: 32px; height: 30px; font-size: .85rem; }
.mt-pages button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mt-pages button:disabled { opacity: .4; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pills a { padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: .85rem; text-decoration: none; color: var(--text); background: var(--surface); }
.filter-pills a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-pills .count { opacity: .65; margin-left: 4px; }

/* ---------------------------------------------------------------- tags */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-err { background: var(--err-soft); color: var(--err); }
.tag-info { background: var(--info-soft); color: var(--info); }
.tag-muted { background: var(--rule-soft); color: var(--muted); }
.tag-dark { background: var(--ink); color: #fff; }
.tag-gold { background: var(--gold-soft); color: var(--gold); }

/* ---------------------------------------------------------------- flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-s); margin-bottom: 16px; border: 1px solid; font-size: .92rem; }
.flash > i { margin-top: 1px; }
.flash > span { flex: 1; }
.flash-ok { background: var(--ok-soft); border-color: #BFE3CE; color: #155C39; }
.flash-warn { background: var(--warn-soft); border-color: #F7D5B2; color: #8A3606; }
.flash-err { background: var(--err-soft); border-color: #F4C7C2; color: #8F1C13; }
.flash-close { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: inherit; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ---------------------------------------------------------------- dashboard hero */
.hero {
    background: var(--ink); color: #E8F0ED; border-radius: var(--radius-m); padding: 26px 28px 22px;
    display: grid; grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.6fr); gap: 32px; align-items: center; margin-bottom: 20px;
}
.hero-figure .label { color: #A9C2BB; font-size: .9rem; }
.hero-figure .amount { font-size: clamp(2.2rem, 4.2vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; color: #fff; margin: 4px 0 8px; }
.hero-figure .amount .rs { color: var(--gold); font-weight: 700; margin-right: 4px; }
.hero-figure .meta { color: #A9C2BB; font-size: .88rem; }
.hero-figure .delta-up { color: #F2C77B; }
.hero-figure .delta-down { color: #9FD8B9; }
.hero .live-note { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; border: 1px dashed #5E847A; color: #CFE0DA; font-size: .8rem; }

.run-rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.run-rail::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: #3C6A60; }
.rail-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; z-index: 1; }
.rail-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--ink); border: 2px solid #3C6A60; color: #8FAAA3; }
.rail-step.done .rail-dot { background: #3C6A60; border-color: #3C6A60; color: #fff; }
.rail-step.current .rail-dot { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 0 0 5px rgba(183, 121, 31, .25); }
.rail-label { font-weight: 600; font-size: .9rem; color: #E8F0ED; }
.rail-step.todo .rail-label { color: #8FAAA3; }
.rail-hint { font-size: .75rem; color: #8FAAA3; }
.panel .run-rail::before { background: var(--rule); }
.panel .rail-dot { background: var(--surface); border-color: var(--rule); color: var(--muted); }
.panel .rail-step.done .rail-dot { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.panel .rail-label { color: var(--text); }
.panel .rail-step.todo .rail-label, .panel .rail-hint { color: var(--muted); }

@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .rail-hint { display: none; } .rail-label { font-size: .78rem; } }

/* ---------------------------------------------------------------- figures strip */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); margin-bottom: 20px; }
.figure { padding: 16px 20px; border-right: 1px solid var(--rule-soft); }
.figure:last-child { border-right: 0; }
.figure .k { color: var(--muted); font-size: .84rem; }
.figure .v { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.figure .s { color: var(--muted); font-size: .8rem; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
@media (max-width: 1200px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 280px; }
.chart-box.small { height: 220px; }

/* statutory dues list */
.dues { list-style: none; margin: 0; padding: 0; }
.dues li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 20px; border-bottom: 1px solid var(--rule-soft); }
.dues li:last-child { border-bottom: 0; }
.dues .name { font-weight: 600; }
.dues .split { color: var(--muted); font-size: .8rem; grid-column: 1; }
.dues .due { color: var(--muted); font-size: .8rem; text-align: right; }
.dues .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--rule-soft); }
.checklist li:last-child { border-bottom: 0; }
.checklist .ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 26px; font-size: .85rem; }
.checklist .ico.ok { background: var(--ok-soft); color: var(--ok); }
.checklist .ico.warn { background: var(--warn-soft); color: var(--warn); }
.checklist .ico.err { background: var(--err-soft); color: var(--err); }
.checklist .txt { flex: 1; }
.checklist .txt small { display: block; color: var(--muted); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 10px 20px; border-bottom: 1px solid var(--rule-soft); font-size: .88rem; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); font-size: .78rem; }

/* ---------------------------------------------------------------- empty state */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state > i { font-size: 2.4rem; color: var(--rule); display: block; margin-bottom: 10px; }
.empty-state h2 { font-size: 1.15rem; color: var(--text); font-weight: 700; }
.empty-state p { max-width: 52ch; margin: 6px auto 16px; }

/* ---------------------------------------------------------------- tabs */
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; overflow-x: auto; }
.tabs-line a, .tabs-line button { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line a.on, .tabs-line button.active { color: var(--ink); border-bottom-color: var(--gold); }
.tabs-line .err-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--err); margin-left: 6px; vertical-align: middle; }

/* ---------------------------------------------------------------- salary calculator */
.calc { position: sticky; top: 84px; }
.calc dl { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.calc dt { font-weight: 400; color: var(--muted); padding: 7px 0; border-bottom: 1px solid var(--rule-soft); }
.calc dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.calc .total dt, .calc .total dd { color: var(--text); font-weight: 700; border-bottom: 2px solid var(--text); }
.calc .gap { color: var(--warn); font-size: .85rem; margin-top: 10px; }
.calc .gap.ok { color: var(--ok); }

/* ---------------------------------------------------------------- attendance grid */
.att-grid input { width: 76px; text-align: right; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.att-grid td.total { font-weight: 700; }
.att-grid tr.over td.total { color: var(--err); }
.att-grid tr.short td.total { color: var(--warn); }
.att-grid tr.dirty td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* ---------------------------------------------------------------- employee detail */
.profile-head { display: flex; gap: 18px; align-items: center; }
.profile-avatar { width: 58px; height: 58px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 1.3rem; display: grid; place-items: center; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-weight: 400; }
.kv dd { margin: 0; }

/* ---------------------------------------------------------------- payslip */
.payslip { background: var(--surface); max-width: 860px; margin: 0 auto; border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 36px 40px; }
.payslip header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
.payslip .co { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.payslip .co-block { display: flex; gap: 16px; align-items: center; }
.payslip .co-logo { max-width: 110px; max-height: 64px; object-fit: contain; }
.payslip .co-address { color: var(--muted); font-size: .85rem; max-width: 52ch; }
.payslip .co-ids { color: var(--muted); font-size: .8rem; display: flex; gap: 14px; flex-wrap: wrap; }
.logo-field { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
.logo-preview { height: 90px; border: 1px dashed var(--rule); border-radius: var(--radius-s); display: grid; place-items: center; background: var(--surface); padding: 8px; }
.logo-preview img { max-width: 100%; max-height: 72px; object-fit: contain; }
@media (max-width: 600px) { .logo-field { grid-template-columns: 1fr; } .payslip .facts { grid-template-columns: repeat(2, 1fr); } }
.payslip .doc { text-align: right; }
.payslip .doc .t { font-size: 1.05rem; font-weight: 700; }
.payslip .facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 18px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: .88rem; }
.payslip .facts .k { color: var(--muted); font-size: .78rem; }
.payslip .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 18px 0; }
.payslip table { width: 100%; font-size: .9rem; }
.payslip th { font-size: .8rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--rule); padding: 6px 0; }
.payslip td { padding: 6px 0; border-bottom: 1px solid var(--rule-soft); }
.payslip tfoot td { font-weight: 700; border-top: 1px solid var(--text); border-bottom: 0; }
.payslip .netbar { display: flex; justify-content: space-between; align-items: center; background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.payslip .netbar .amt { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.payslip .words { color: var(--muted); font-size: .86rem; margin-top: 6px; }
.payslip .foot { color: var(--muted); font-size: .78rem; margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 10px; }

@media print {
    .sidebar, .topbar, .page-head, .flash, .no-print, .sidebar-backdrop { display: none !important; }
    .content { padding: 0; }
    body { background: #fff; }
    .payslip { border: 0; padding: 0; }
}

/* ---------------------------------------------------------------- login */
.auth-body { background: var(--ink); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { padding: 56px; color: #D5E2DE; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .big { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -.025em; color: #fff; line-height: 1.1; max-width: 16ch; }
.auth-side .big .rs { color: var(--gold); }
.auth-side ol { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 10px; max-width: 360px; }
.auth-side li { display: flex; gap: 12px; align-items: center; color: #A9C2BB; }
.auth-side li span { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #3C6A60; display: grid; place-items: center; font-size: .8rem; color: #CFE0DA; }
.auth-main { background: var(--paper); display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* company list thumbnails */
.co-thumb { width: 44px; height: 32px; object-fit: contain; border: 1px solid var(--rule-soft); border-radius: 4px; background: var(--surface); flex: 0 0 44px; }
.co-thumb-empty { display: grid; place-items: center; color: var(--muted); background: var(--paper); }

/* roles & permissions grid */
.perm-grid th, .perm-grid td { white-space: nowrap; }
.perm-grid .perm-group td { background: var(--paper); font-weight: 700; font-size: .8rem; color: var(--muted); text-transform: none; padding-top: 14px; }
.perm-grid .form-check-input { width: 1.15rem; height: 1.15rem; cursor: pointer; }
.perm-grid .form-check-input:disabled { opacity: .7; cursor: not-allowed; }
.btn-link-col { border: 0; background: none; color: var(--ink-3); font-size: .72rem; padding: 0; text-decoration: underline; }

/* payslip – grid layout matching the company's paper payslip */
.slip { background: var(--surface); max-width: 920px; margin: 0 auto; border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 28px 32px; }
.slip-band { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.slip-logo { max-width: 130px; max-height: 60px; object-fit: contain; }
.slip-co { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.slip-addr { color: var(--muted); font-size: .85rem; }
.slip-ids { color: var(--muted); font-size: .78rem; display: flex; gap: 14px; flex-wrap: wrap; }
.slip-grid { width: 100%; border-collapse: collapse; font-size: .86rem; }
.slip-grid th, .slip-grid td { border: 1px solid #9AA6A3; padding: 5px 8px; }
.slip-grid + .slip-grid { border-top: 0; }
.slip-grid + .slip-grid thead th { border-top: 0; }
.slip-title { text-align: center; font-size: 1rem; background: #F2F5F4; }
.slip-grid .k { width: 17%; color: var(--text); }
.slip-grid .v { width: 33%; }
.slip-grid .strong { font-weight: 700; }
.slip-money thead th { background: #F2F5F4; text-align: center; font-weight: 700; font-size: .8rem; vertical-align: middle; }
.slip-money td:nth-child(1), .slip-money td:nth-child(4) { width: 25%; }
.slip-money .num { font-variant-numeric: tabular-nums; text-align: right; width: 12.5%; }
.slip-total td { font-weight: 700; }
.slip-net td { background: var(--gold-soft); font-weight: 700; font-size: .95rem; }
.slip-notes { font-size: .8rem; color: var(--muted); margin: 12px 0 0; padding-left: 20px; }
@media print { .slip { border: 0; padding: 0; max-width: none; } }
@media (max-width: 700px) { .slip { padding: 14px; } .slip-grid { font-size: .74rem; } .slip-grid th, .slip-grid td { padding: 3px 4px; } }

/* self-service */
.self-hero { background: var(--ink); color: #E8F0ED; border-radius: var(--radius-m); padding: 22px 26px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.self-id { display: flex; gap: 16px; align-items: center; }
.self-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); background: var(--gold-soft); }
.self-initials { display: grid; place-items: center; color: var(--gold); font-weight: 800; font-size: 1.4rem; }
.self-greet { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.self-meta { color: #A9C2BB; font-size: .88rem; }
.self-pay { text-align: right; }
.self-pay .label { color: #A9C2BB; font-size: .85rem; }
.self-pay .amount { font-size: 2.1rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.self-pay .rs { color: var(--gold); margin-right: 3px; }
.leave-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.leave-card { border: 1px solid var(--rule); border-top: 3px solid var(--lc); border-radius: var(--radius-s); padding: 12px 14px; background: var(--surface); }
.lc-name { font-weight: 700; font-size: .9rem; }
.lc-code { color: var(--muted); font-weight: 500; font-size: .75rem; margin-left: 4px; }
.lc-big { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lc-big small { font-size: .78rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.lc-bar { height: 6px; background: var(--rule-soft); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.lc-bar span { display: block; height: 100%; background: var(--lc); }
.lc-sub { color: var(--muted); font-size: .78rem; }
.leave-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lc); margin-right: 6px; }
.leave-days { background: var(--info-soft); color: var(--info); border-radius: var(--radius-s); padding: 8px 12px; font-size: .88rem; }
.leave-days:empty { display: none; }
.leave-days.none { background: var(--warn-soft); color: var(--warn); }
.payslip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ps-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 16px 18px; }
.ps-month { font-weight: 700; }
.ps-net { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.ps-net small { font-size: .75rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.ps-card dl { display: grid; grid-template-columns: 1fr auto; font-size: .85rem; margin: 0 0 12px; }
.ps-card dt { color: var(--muted); font-weight: 400; }
.ps-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ps-actions { display: flex; gap: 8px; }
.decide-form { min-width: 190px; }

/* employee photo & documents */
.profile-photo { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; border: 1px solid var(--rule); }
.doc-list { display: flex; flex-direction: column; }
.doc-item { display: flex; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--rule-soft); }
.doc-item:last-child { border-bottom: 0; }
.doc-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; border: 1px solid var(--rule); flex: 0 0 48px; }
.doc-icon { display: grid; place-items: center; background: var(--err-soft); color: var(--err); font-size: 1.4rem; }
.doc-body { flex: 1; min-width: 0; }
.doc-body .sub { display: block; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.steps { padding-left: 20px; margin-bottom: 18px; }
.steps li { margin-bottom: 6px; }
.report-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 40px; }
.report-card .panel-body { height: 100%; }
.month-picker .form-select { width: auto; }
