:root {
  --brand: #4338ca; --brand-2: #6366f1; --brand-soft: #eef2ff; --accent: #f59e0b;
  --bg: #f5f6fb; --card: #fff; --text: #1f2333; --muted: #6b7088; --line: #e6e8f0;
  --green: #059669; --green-soft: #d1fae5; --red: #dc2626; --red-soft: #fee2e2;
  --amber: #b45309; --amber-soft: #fef3c7; --blue: #2563eb; --blue-soft: #dbeafe;
  --purple: #7c3aed; --purple-soft: #ede9fe;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--muted); }
small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Layout */
.app { display: flex; min-height: 100vh; background: linear-gradient(to right, #1e1b4b 248px, var(--bg) 248px); }
.sidebar { width: 248px; flex-shrink: 0; background: #1e1b4b; color: #c7d2fe; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 6px 8px 14px; font-weight: 700; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand img.crest { width: 46px; height: 46px; background: #fff; border-radius: 10px; padding: 2px; object-fit: contain; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: #a5b4fc; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #c7d2fe; font-size: 13.5px; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar .ico { width: 20px; text-align: center; font-size: 13px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #818cf8; margin: 16px 10px 4px; font-weight: 600; }
.pill { margin-left: auto; background: var(--accent); color: #1e1b4b; border-radius: 99px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.page-title { font-size: 18px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.station-switch { display: flex; align-items: center; gap: 6px; }
.station-switch label { font-size: 12px; color: var(--muted); }
.station-switch select { width: auto; padding: 6px 8px; }
.station-badge { background: var(--brand-soft); color: var(--brand); padding: 5px 10px; border-radius: 99px; font-weight: 600; font-size: 13px; }
.bell { position: relative; font-size: 18px; }
.bell:hover { text-decoration: none; }
.bell-count { position: absolute; top: -6px; right: -10px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 5px; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.who b { display: block; font-size: 13px; line-height: 1.2; }
.who small { color: var(--muted); }
.content { padding: 20px 24px 48px; max-width: 1400px; width: 100%; }
.menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; }
.sidebar-backdrop { display: none; }

/* Cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid > .card { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.good .value { color: var(--green); } .kpi.bad .value { color: var(--red); } .kpi.warn .value { color: var(--amber); }
a.kpi:hover { text-decoration: none; border-color: var(--brand-2); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfe; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px !important; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef0f5; color: #475069; white-space: nowrap; }
.b-green, .b-Pass, .b-Paid, .b-Approved, .b-Filed, .b-Issued, .b-Completed, .b-success, .b-great, .b-good { background: var(--green-soft); color: var(--green); }
.b-red, .b-Fail, .b-Unpaid, .b-Rejected, .b-Overdue, .b-Dropped, .b-bad { background: var(--red-soft); color: var(--red); }
.b-amber, .b-Pending, .b-Partial, .b-Due, .b-warning, .b-warn, .b-Absent { background: var(--amber-soft); color: var(--amber); }
.b-blue, .b-Ongoing, .b-Active, .b-info, .b-Processed, .b-ok, .b-payment { background: var(--blue-soft); color: var(--blue); }
.b-purple, .b-announcement, .b-Diploma { background: var(--purple-soft); color: var(--purple); }

/* Forms */
label { display: block; font-size: 12.5px; font-weight: 600; color: #3c4257; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #d5d9e6; border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox] { width: auto; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters > * { flex: 0 1 auto; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters input[type=search] { min-width: 240px; }
.inline { display: inline; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; padding: 5px 8px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0 0 14px; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--brand); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #3730a3; text-decoration: none; }
.btn-ghost { background: #fff; color: var(--brand); border-color: #d5d9e6; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-green { background: var(--green); border-color: var(--green); } .btn-green:hover { background: #047857; }
.btn-red { background: #fff; color: var(--red); border-color: #f3c4c4; } .btn-red:hover { background: var(--red-soft); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Flash & toasts */
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash-success { background: var(--green-soft); color: #065f46; }
.flash-error { background: var(--red-soft); color: #991b1b; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 50; }
.toast { display: block; width: 320px; background: #fff; border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.15); color: var(--text); transform: translateY(20px); opacity: 0; transition: .3s; }
.toast.show { transform: none; opacity: 1; }
.toast:hover { text-decoration: none; }
.toast b { display: block; } .toast span { font-size: 13px; color: var(--muted); }
.toast-success { border-color: var(--green); } .toast-warning { border-color: var(--accent); } .toast-payment { border-color: var(--blue); }

/* Progress & performance */
.progress { height: 12px; background: #eceff6; border-radius: 99px; overflow: hidden; position: relative; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.progress.great > span, .progress.good > span { background: linear-gradient(90deg, #34d399, var(--green)); }
.progress.warn > span { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress.bad > span { background: linear-gradient(90deg, #f87171, var(--red)); }
.progress.thin { height: 7px; }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #d9dce6; }
.target-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.big-pct { font-size: 46px; font-weight: 800; line-height: 1; }
.callout { border-radius: 10px; padding: 12px 14px; font-weight: 500; margin-top: 14px; }
.callout.success { background: var(--green-soft); color: #065f46; }
.callout.info { background: var(--brand-soft); color: #312e81; }
.callout.warn { background: var(--amber-soft); color: #78350f; }
.scale { display: flex; gap: 4px; margin-top: 10px; }
.scale span { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; padding: 6px 4px; border-radius: 8px; background: #f1f3f8; color: var(--muted); }
.scale span.on { background: var(--brand); color: #fff; font-weight: 700; }

/* Bar chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .bar { width: 100%; max-width: 26px; border-radius: 5px 5px 0 0; background: var(--brand-2); min-height: 2px; }
.bars .bar.exp { background: #f59e0b; }
.bars .bar.hit { background: var(--green); }
.bars .bar.miss { background: #a5b4fc; }
.bars .lbl { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars .val { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.notif { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.notif.unread { background: #f8f9ff; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex-shrink: 0; }
.notif.read .dot { background: transparent; }
.notif b { display: block; }
.notif p { margin: 2px 0; color: #444b63; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; } .dl dd { margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--brand); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(140deg, #1e1b4b, #4338ca 60%, #6366f1); color: #e0e7ff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { color: #fff; font-size: 34px; line-height: 1.15; margin: 18px 0 12px; }
.login-art ul { padding-left: 18px; line-height: 1.9; }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 22px; margin-bottom: 4px; }
.station-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.station-pick label { border: 1.5px solid #d5d9e6; border-radius: 10px; padding: 12px; cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; margin: 0; }
.station-pick input { width: auto; margin: 0; }
.station-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.demo-box { margin-top: 22px; font-size: 12.5px; background: #f8f9fc; border: 1px dashed #cdd2e1; border-radius: 10px; padding: 10px 12px; color: var(--muted); }
.demo-box code { color: var(--text); }
.plain { min-height: 100vh; }

/* Responsive */
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-2-1 { grid-template-columns: 1fr; } .who { display: none; } }
@media (max-width: 860px) {
  .app { background: var(--bg); }
  .scale { flex-wrap: wrap; } .scale span { min-width: 30%; }
  .sidebar { position: fixed; left: -260px; z-index: 40; transition: left .2s; }
  body.nav-open .sidebar { left: 0; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
  .menu-btn { display: block; }
  .grid-2, .grid-3, .target-hero { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .station-switch label { display: none; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; }
  .filters input, .filters select, .filters input[type=search] { min-width: 0; width: 100%; }
  .filters > * { flex: 1 1 140px; }
}
@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  body { background: #fff; } .card { box-shadow: none; border: 0; }
}

/* Staff performance scorecard */
.rt { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rt-Excellent { background: #c6efce; color: #006100; }
.rt-Very-Good { background: #e2f5e6; color: #2e7d32; }
.rt-Average { background: #ffeb9c; color: #9c5700; }
.rt-Poor { background: #ffc7ce; color: #9c0006; }
.best-card { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #fff7d6, #ffe699); border: 1px solid #f1c232; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.best-card .trophy { font-size: 34px; }
.best-card .lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7f6000; }
.best-card .name { font-size: 20px; font-weight: 800; color: #3d2f00; }
.best-card .sub { color: #7f6000; font-size: 13px; }
.scorecard { font-size: 11.5px; }
.scorecard th, .scorecard td { text-align: center; padding: 6px 2px; vertical-align: middle; }
.scorecard .rt { font-size: 10px; padding: 2px 3px; white-space: normal; line-height: 1.2; }
.scorecard th:first-child, .scorecard td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line); }
.scorecard thead th:first-child { background: #1f3864; }
.scorecard thead tr.grp th:first-child { background: #2f5496; }
.edit-link { font-size: 11.5px; font-weight: 600; }
.scorecard thead th { background: #1f3864; color: #fff; text-transform: none; letter-spacing: 0; font-size: 10px; white-space: normal; line-height: 1.2; border-right: 1px solid rgba(255,255,255,.18); }
.scorecard thead tr.grp th { background: #2f5496; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.scorecard td.l, .scorecard th.l { text-align: left; }
.scorecard tbody tr:nth-child(even) td { background: #f3f6fb; }
.scorecard tbody tr.best td { background: #fff2cc; font-weight: 700; }
.scorecard td.sep, .scorecard th.sep { border-left: 2px solid #c9d3e6; }
.scorecard .pending td { color: var(--muted); }
.period-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.period-pick select { width: auto; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rules div { background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.rules b { display: block; margin-bottom: 4px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Payroll sheet */
.payroll-sheet th, .payroll-sheet td { text-align: right; vertical-align: top; padding: 6px 6px; }
.payroll-sheet th.l, .payroll-sheet td.l { text-align: left; }
.payroll-sheet th { font-size: 11px; line-height: 1.25; }
.payroll-sheet input { padding: 4px 6px; font-size: 13px; text-align: right; }
.payroll-sheet td.l input { text-align: left; }
.payroll-sheet tr.paid td { background: #f6fbf7; }
.payroll-sheet .grp-row td, .grp-row td { background: #eef2f8; font-weight: 700; color: #1f3864; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; }
.wa-text { white-space: pre-wrap; font-family: inherit; font-size: 14px; background: #f0f7ee; border: 1px solid #d5e8cf; border-radius: 10px; padding: 12px 14px; margin: 0; line-height: 1.5; }
tr.pending td { color: var(--muted); }
.section-title { margin: 6px 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.follower-kpis .kpi { color: var(--brand); }
.follower-kpis .kpi .label, .follower-kpis .kpi .sub { color: var(--muted); }
.follower-kpis .kpi .value { color: var(--text, #1d2433); }
.spark-wrap { margin-top: 8px; }
.spark-empty { font-size: 12px; color: var(--muted); padding: 14px 0; }
.up { color: var(--green); } .down { color: var(--red, #c0392b); }
.bars { display: flex; gap: 6px; align-items: flex-end; height: 160px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-col small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bar-stack { flex: 1; width: 100%; display: flex; align-items: flex-end; gap: 2px; }
.bar { flex: 1; border-radius: 3px 3px 0 0; min-height: 1px; }
.bar.a, .sw.a { background: #9fb3d9; } .bar.b, .sw.b { background: var(--brand); }
.legend { font-size: 12px; color: var(--muted); margin: 8px 0 0; display: flex; gap: 6px; align-items: center; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
/* Diploma tracker */
.tracker th, .tracker td { text-align: center; padding: 6px 7px; font-size: 13px; }
.tracker th { font-size: 11px; text-transform: uppercase; background: #1f3864; color: #fff; }
.tracker th.l, .tracker td.l { text-align: left; }
.tracker td.due { color: var(--red); font-weight: 600; }
.tracker tr.dropped td { opacity: .55; }
.ds { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #eef0f5; }
.ds-ok-g { background: #c6efce; color: #006100; } .ds-pend { background: #ffeb9c; color: #9c5700; } .ds-bad { background: #ffc7ce; color: #9c0006; }
.ds-drop { background: #e5e7eb; color: #4b5563; } .ds-cert { background: #dbeafe; color: #1e40af; }
.hl td { background: #fff8e1; }
.payroll-sheet td { padding: 6px 4px; } .payroll-sheet td.l small { display:block; max-width:110px; }
.tracker td.l small { display:block; min-width: 150px; }

/* ---- UAE: course picker, documents (Zoho layout) ---- */
.course-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 2px 18px; }
.cp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.cp-name { font-weight: 500; }
.cp-fields { display: inline-flex; gap: 6px; align-items: center; }
.cp-fields select, .cp-fields input { padding: 5px 8px; }
.cp-more { grid-column: 1 / -1; margin-top: 10px; color: var(--muted); }
@media (max-width: 640px) { .course-pick { grid-template-columns: 1fr; } }
.doc-body { background: #eef0f6; }
.doc-bar { max-width: 860px; margin: 16px auto 0; display: flex; gap: 8px; padding: 0 12px; flex-wrap: wrap; }
.doc-sheet { max-width: 860px; margin: 16px auto 40px; background: #fff; padding: 40px; box-shadow: var(--shadow); border-radius: 6px; }
.zoho { font-size: 13px; color: #222; }
.z-top { display: flex; justify-content: space-between; gap: 20px; }
.z-logo { width: 54px; display: block; margin-bottom: 6px; }
.z-title { text-align: right; }
.z-title h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: .02em; }
.z-status { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 4px; background: #eef0f5; font-size: 12px; }
.z-due { margin-top: 12px; }
.z-due b { font-size: 18px; }
.z-mid { display: flex; justify-content: space-between; gap: 20px; margin: 26px 0 16px; }
.z-meta td { padding: 2px 0 2px 16px; text-align: right; }
.z-lines, .z-tot, .z-tax table { width: 100%; border-collapse: collapse; }
.z-lines th { background: #3c3d3a; color: #fff; padding: 7px 8px; font-weight: 500; text-align: right; }
.z-lines td { padding: 9px 8px; border-bottom: 1px solid #ddd; text-align: right; vertical-align: top; }
.z-tot { width: 60%; margin-left: 40%; margin-top: 8px; }
.z-tot td { padding: 6px 8px; text-align: right; }
.z-tot .z-strong td { font-weight: 700; background: #f5f5f5; }
.z-tax { margin-top: 22px; }
.z-tax th, .z-tax td { padding: 6px 8px; text-align: right; border-bottom: 1px solid #e3e3e3; }
.z-notes { margin-top: 18px; }
@media print { .doc-body { background: #fff; } .doc-sheet { box-shadow: none; margin: 0; max-width: none; padding: 0; } }
@media (max-width: 640px) { .doc-sheet { padding: 16px; } .z-top, .z-mid { flex-direction: column; } .z-title { text-align: left; } .z-tot { width: 100%; margin-left: 0; } .z-lines { font-size: 12px; } }
.table .center { text-align: center; }
.hbar { background: #eef0f6; border-radius: 99px; height: 8px; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--brand-2, #6366f1); border-radius: 99px; }
.print-only { display: none; }
@media print { .print-only { display: block; } }
.trend { font-size: 12px; font-weight: 700; }
.trend.up { color: var(--green); } .trend.down { color: var(--red); } .trend.flat { color: var(--muted); }
.alert-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.login-mobile-brand { display: none; font-weight: 800; letter-spacing: .04em; color: var(--brand); margin-bottom: 10px; }
@media (max-width: 860px) { .login-mobile-brand { display: block; } }
