/* Holistic Legacy Accounting - Information Technology Department. All rights reserved. Proprietary and internal (see LICENSE). */
:root {
  --bg: #f4f6f8; --card: #fff; --ink: #1d2733; --muted: #6b7785; --line: #e3e8ee;
  --brand: #003F8F; --brand-2: #e8f0fb; --danger: #b42318; --danger-bg: #fdecea; --warn: #b54708; --warn-bg: #fff4e5;
  --ok: #067647; --ok-bg: #e7f6ee; --info: #175cd3; --info-bg: #eaf1fd; --radius: 10px;
  --accent: #E2BE6F; --font: Arial, sans-serif;
  font-family: var(--font);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; font-family: var(--font); }
button, input, select, textarea { font-family: inherit; }
a { color: var(--brand); text-decoration: none; }
h2 { margin: 0; font-size: 22px; } h3 { margin: 0 0 12px; font-size: 16px; } h4 { margin: 16px 0 8px; }
.muted { color: var(--muted); } .d-block { display: block; } .nowrap { white-space: nowrap; } .pre { white-space: pre-wrap; font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; margin-top: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500; line-height: 1.2; }
.btn:hover { background: #f0f3f6; } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-outline { color: var(--danger); border-color: #f1b8b2; }
.btn.small { padding: 5px 10px; font-size: 13px; } .btn.block { width: 100%; justify-content: center; padding: 11px; }
.btn.link { border: 0; background: none; color: var(--brand); width: 100%; justify-content: center; }
.icon-btn { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, #003F8F 0%, #00145B 100%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 28px; display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.brand { display: flex; gap: 10px; align-items: center; }
.brand .logo { width: 38px; height: 38px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 20px; flex: none; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.brand.big h1 { margin: 0; font-size: 20px; } .brand.big p { margin: 2px 0 0; color: var(--muted); }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; flex: none; background: #fff; border-inline-end: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh; }
.sidebar nav { display: grid; gap: 2px; flex: 1; overflow: auto; align-content: start; }
.sidebar nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.sidebar nav a:hover { background: #f0f3f6; } .sidebar nav a.active { background: var(--brand-2); color: var(--brand); font-weight: 600; }
.sidebar .ic { width: 20px; text-align: center; opacity: .8; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.side-foot .who small { display: block; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 22px 26px 40px; }
.menu-btn { display: none; margin-bottom: 10px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 620px; }
.table-card { padding: 0; overflow-x: auto; } .table-card > h3 { padding: 16px 16px 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid2 > .card { margin-bottom: 0; }
.grid2 + * { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); display: grid; gap: 6px; }
a.stat:hover { border-color: var(--brand); }
.stat small { color: var(--muted); } .stat b { font-size: 24px; font-variant-numeric: tabular-nums; }
.stats.money .stat b { font-size: 20px; }
.stat.warn { background: var(--warn-bg); border-color: #f7d4a8; } .stat.warn b { color: var(--warn); }
.stat.accent { background: var(--brand-2); border-color: #bfe0dd; } .stat.accent b { color: var(--brand); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 50px; gap: 10px; align-items: center; padding: 5px 0; color: var(--ink); }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bar-row b { text-align: end; }
.bar { height: 10px; background: #eef1f4; border-radius: 6px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f8fafb; font-weight: 600; color: #3d4955; font-size: 13px; white-space: nowrap; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f7fbfb; }
tr.hl td { background: var(--brand-2); }
tfoot td { font-weight: 700; background: #f8fafb; }
td.empty { text-align: center; color: var(--muted); padding: 28px; }
table.perm td, table.perm th { text-align: center; padding: 7px; } table.perm td:first-child, table.perm th:first-child { text-align: start; }
.changes { margin: 0; padding-inline-start: 16px; font-size: 13px; } .changes s { color: var(--muted); }
.chips { max-width: 420px; } .chip { display: inline-block; background: #f0f3f6; border-radius: 12px; padding: 2px 8px; margin: 2px; font-size: 12px; }

/* badges & progress */
.badge { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; background: #eef1f4; color: #3d4955; white-space: nowrap; }
.s-in_service { background: var(--ok-bg); color: var(--ok); } .s-in_storage { background: var(--info-bg); color: var(--info); }
.s-under_maintenance { background: var(--warn-bg); color: var(--warn); } .s-lost, .s-scrapped { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.accent { background: var(--brand-2); color: var(--brand); }
.a-delete, .a-scrap, .a-login_failed, .a-deactivate { background: var(--danger-bg); color: var(--danger); }
.a-create, .a-login { background: var(--ok-bg); color: var(--ok); } .a-update, .a-assign { background: var(--info-bg); color: var(--info); }
.progress { width: 90px; height: 7px; background: #eef1f4; border-radius: 5px; overflow: hidden; } .progress.lg { width: 100%; height: 10px; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--brand); } .progress.full i { background: var(--warn); }

/* key-values & timeline */
.kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 18px; margin-bottom: 8px; }
.kv small { display: block; color: var(--muted); margin-bottom: 3px; } .kv b { font-weight: 600; } .kv.full { grid-column: 1 / -1; }
.big-num { font-size: 20px; color: var(--brand); }
.timeline { display: grid; gap: 0; margin-bottom: 10px; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 8px 0; border-inline-start: 2px solid var(--line); margin-inline-start: 6px; padding-inline-start: 0; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); margin-inline-start: -7px; margin-top: 3px; }
.ev-scrapped .tl-dot { background: var(--danger); } .ev-assigned .tl-dot { background: var(--info); } .ev-restored .tl-dot { background: var(--ok); }

/* forms */
.form h3 { margin-top: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-grid { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.field { display: grid; gap: 5px; } .field.full, .check.full { grid-column: 1 / -1; }
.field > span { font-weight: 600; font-size: 13px; } .field small { color: var(--muted); font-size: 12px; } .req { color: var(--danger); font-style: normal; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfd6de; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b7cdea; border-color: var(--brand); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
input:disabled { background: #f3f5f7; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 150px; } .filters input[name=q] { min-width: 220px; flex: 1; }
.inline { display: flex; gap: 6px; align-items: center; }
.page-head select { width: auto; }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 12px; }

/* modal & toast */
.modal-wrap { position: fixed; inset: 0; height: 100vh; height: 100dvh; background: rgba(15, 25, 35, .45); display: grid; place-items: center; padding: 16px; z-index: 50; overflow: hidden; overscroll-behavior: contain; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 92vh; max-height: calc(100dvh - 32px); min-height: 0; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 760px; }
.modal-head, .modal-foot { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.modal-head { border-bottom: 1px solid var(--line); } .modal-head h3 { margin: 0; }
.modal-foot { border-top: 1px solid var(--line); justify-content: flex-start; }
.modal-body { padding: 18px; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; } .modal-body .form-grid { margin-bottom: 0; }
#toasts { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
[dir=rtl] #toasts { transform: translateX(50%); }
.toast { padding: 10px 18px; border-radius: 8px; background: #1d2733; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.err { background: var(--danger); }
.empty-state { text-align: center; padding: 40px; }
.print-only { display: none; }

/* fleet & requests */
.sec-title { margin: 6px 0 10px; color: var(--muted); font-size: 14px; text-transform: none; }
.stat.danger { background: var(--danger-bg); border-color: #f1b8b2; } .stat.danger b { color: var(--danger); }
.notice { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.notice.warn { background: var(--warn-bg); border-color: #f7d4a8; color: var(--warn); font-weight: 600; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.table-foot { padding: 10px 14px; font-weight: 600; background: #f8fafb; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.tab span { background: #eef1f4; border-radius: 10px; padding: 0 7px; margin-inline-start: 4px; font-size: 12px; }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; } .tab.active span { background: rgba(255,255,255,.25); }
.tab.danger:not(.active) { border-color: #f1b8b2; color: var(--danger); }
.rs-pending { background: var(--warn-bg); color: var(--warn); } .rs-approved { background: var(--info-bg); color: var(--info); }
.rs-handed_over { background: var(--brand-2); color: var(--brand); } .rs-returned { background: var(--ok-bg); color: var(--ok); }
.rs-rejected, .rs-cancelled { background: #eef1f4; color: var(--muted); }
.a-approve, .a-handover, .a-trip_in { background: var(--ok-bg); color: var(--ok); } .a-reject, .a-cancel { background: var(--danger-bg); color: var(--danger); }
.a-return, .a-trip_out, .a-odometer, .a-service { background: var(--info-bg); color: var(--info); }
.ev-handed_over .tl-dot, .ev-trip_out .tl-dot { background: var(--warn); } .ev-returned .tl-dot, .ev-trip_in .tl-dot { background: var(--ok); }
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.step { flex: 1; min-width: 140px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.step i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: #eef1f4; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.step.done { color: var(--brand); border-color: #bfe0dd; background: var(--brand-2); } .step.done i { background: var(--brand); color: #fff; }
.step.bad { color: var(--danger); border-color: #f1b8b2; background: var(--danger-bg); } .step.bad i { background: var(--danger); color: #fff; }
.print-form-area { display: none; }
.pf-block { page-break-after: always; padding: 10px 0; } .pf-block:last-child { page-break-after: auto; }
.pf-block h2 { text-align: center; margin-bottom: 14px; } .pf-block h3 { margin: 18px 0 8px; }
.pf-table th { width: 32%; background: #f3f3f3; } .pf-table th, .pf-table td { border: 1px solid #999; padding: 7px 10px; }
.pf-decl { margin: 18px 0 40px; line-height: 1.8; }
.pf-sign { display: flex; justify-content: space-between; gap: 40px; }

/* v3: navigation groups, letterhead, documents, forms */
.nav-group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 12px 4px; }
.logo-img { object-fit: contain; background: #fff; padding: 2px; border: 1px solid var(--line); }
.brand .logo-img { width: 38px; height: 38px; border-radius: 9px; }
.lh-wrap { width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse; }
.lh-wrap > tbody > tr > td { min-width: 0; overflow-wrap: anywhere; }
.lh-wrap > thead > tr > td, .lh-wrap > tbody > tr > td, .lh-wrap > tfoot > tr > td { padding: 0; border: 0; background: none; }
.lh-only { display: none; }
.lh-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 3px solid var(--brand); margin-bottom: 14px; }
.lh-head .lh-ar, .lh-head .lh-en { flex: 1; display: grid; gap: 3px; } .lh-head { direction: ltr; }
.lh-head b { font-size: 17px; color: var(--brand); } .lh-head small { color: #555; font-size: 11px; }
.lh-head.lh-center { flex-direction: column; text-align: center; } .lh-head.lh-center .lh-ar, .lh-head.lh-center .lh-en { text-align: center; } .lh-head.lh-center .lh-mid { order: -1; }
.lh-head.lh-start .lh-mid { order: -1; }
.lh-logo { max-height: 70px; max-width: 180px; object-fit: contain; }
.lh-foot { border-top: 2px solid var(--accent); padding-top: 6px; margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 11px; color: #444; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 0 10px; }
.table-card > .card-head { padding: 14px 16px 6px; } .table-card > .card-head h3 { padding: 0; margin: 0; }
.paper { max-width: 900px; margin: 0 auto; }
.preview-paper { border: 1px dashed #ccc; padding: 20px; background: #fff; } .preview-body { min-height: 120px; }
.logo-box { height: 110px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; margin-bottom: 10px; background: #fafafa; }
.logo-box img { max-height: 100px; max-width: 90%; }
.logo-lg { width: 90px; height: 90px; border-radius: 12px; font-size: 40px; } .company-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; } .company-head h2, .company-head h3 { margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
table.lines { margin-bottom: 8px; } table.lines td { padding: 6px; border-bottom: 1px solid var(--line); } table.lines input, table.lines select { min-width: 90px; }
.chip.big { padding: 6px 12px; font-size: 13px; background: var(--brand-2); color: var(--brand); } .chip.big.danger { background: var(--danger-bg); color: var(--danger); }
ul.plain { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.report { background: #fbfbf8; border: 1px solid var(--line); border-radius: 8px; padding: 12px; line-height: 1.8; }
.list-row.link { color: var(--ink); } .list-row.link:hover { background: #f7fbfb; }
.my-card { border-color: var(--brand); } .my-card .stats { margin-bottom: 6px; }
.alert-card { border-color: #f7d4a8; }
.ts-requested, .ps-submitted { background: var(--warn-bg); color: var(--warn); } .ts-approved, .ps-approved, .ps-ordered { background: var(--info-bg); color: var(--info); }
.ts-out { background: var(--brand-2); color: var(--brand); } .ts-returned, .ps-received, .pay-paid { background: var(--ok-bg); color: var(--ok); }
.ts-rejected, .ts-cancelled, .ps-rejected, .ps-cancelled { background: #eef1f4; color: var(--muted); } .pay-unpaid { background: var(--danger-bg); color: var(--danger); } .pay-partial { background: var(--warn-bg); color: var(--warn); }
.a-upload, .a-order, .a-receive, .a-fuel { background: var(--info-bg); color: var(--info); } .a-clearance { background: var(--danger-bg); color: var(--danger); }
.ev-fuel .tl-dot { background: var(--accent); }
.pf-table.grid th { width: auto; } .pf-table.grid td, .pf-table.grid th { text-align: start; }
.print-area { display: none; }
.notice.full { grid-column: 1 / -1; margin: 0; }
.form-grid.full { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40; transform: translateX(-110%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  [dir=rtl] .sidebar { transform: translateX(110%); }
  .sidebar.open { transform: none !important; }
  .menu-btn { display: inline-flex; }
  .main { padding: 14px; }
}
@media print {
  .sidebar, .menu-btn, .page-head .row, .filters, .pager, .no-print, #toasts { display: none !important; }
  .main { padding: 0; } body { background: #fff; }
  .card { border: 0; padding: 0 0 12px; break-inside: avoid; }
  .print-only { display: block; } th { background: #eee !important; }
  tr.hl td { background: none; }
  body.print-form #view > *:not(.print-area) { display: none !important; }
  body.print-form .print-area { display: block; }
  .lh-only { display: table-header-group; } tfoot.lh-only { display: table-footer-group; }
  .lh-wrap { width: 100%; }
  .card.paper { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .no-print, .card-head .btn { display: none !important; }
  a { color: inherit; }
}
#openBox { margin-bottom: 16px; }

input[type=color] { height: 40px; padding: 3px; cursor: pointer; }

/* v4: bell, notifications, activity, reports */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 6px; }
.topbar .menu-btn { margin: 0; margin-inline-end: auto; }
.bell { position: relative; font-size: 20px; text-decoration: none; padding: 4px 8px; border-radius: 8px; }
.bell:hover { background: #fff; }
.bell-count { position: absolute; top: -2px; inset-inline-end: -4px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center; }
.nav-count { position: static; margin-inline-start: auto; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 12px 6px; border-bottom: 1px solid var(--line); color: var(--ink); }
.notif:last-child { border-bottom: 0; } .notif:hover { background: #f7fbfb; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; margin-top: 6px; flex: none; }
.notif.unread { font-weight: 600; } .notif.unread .notif-dot { background: var(--brand); }
.toast.info { background: var(--brand); }
.k-page { background: #eef1f4; color: #3d4955; } .k-action { background: var(--info-bg); color: var(--info); } .k-file, .k-export { background: var(--warn-bg); color: var(--warn); }
a.tab { display: inline-block; text-decoration: none; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.report-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; color: var(--ink); }
.report-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.report-card .ric { font-size: 26px; }
.small-text { font-size: 12px; max-width: 380px; }
@media print { .topbar { display: none !important; } .report-table { font-size: 11px; } .report-table th, .report-table td { padding: 5px 6px; } }

/* v5: signatures, policies, misc */
.sign-box { display: flex; gap: 14px; align-items: center; background: #fafbfc; border: 1px dashed var(--line); border-radius: 8px; padding: 10px; }
.sign-box > div { flex: 1; }
.sig-img { max-height: 70px; max-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.sig-current { margin: 8px 0 12px; min-height: 40px; }
.sig-pad { width: 100%; max-width: 520px; height: auto; aspect-ratio: 52 / 18; background: #fff; border: 2px dashed #b9c3cf; border-radius: 8px; touch-action: none; display: block; margin: 6px 0 10px; cursor: crosshair; }
.sig-list { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.sig { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; justify-items: center; gap: 2px; min-width: 170px; background: #fff; }
.sig img { max-height: 60px; max-width: 200px; }
.sig small { color: var(--muted); font-size: 11px; }
.policy-text { white-space: pre-wrap; line-height: 2; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fcfcfa; }
.todo-card { border-color: var(--accent); }
.chip.bad { background: var(--danger-bg); color: var(--danger); }
.pad { padding: 8px 16px; display: block; }
.low-row td { background: #fff8ef; }
.ls-requested, .fs-pending_ack, .ms2-requested { background: var(--warn-bg); color: var(--warn); }
.ls-active, .fs-acknowledged, .ms2-approved, .ms2-in_progress { background: var(--info-bg); color: var(--info); }
.ls-returned, .fs-settled, .ms2-completed, .mv-in { background: var(--ok-bg); color: var(--ok); }
.fs-disputed, .fs-unassigned, .mv-out { background: var(--danger-bg); color: var(--danger); }
.ls-rejected, .ls-cancelled, .fs-company_paid, .fs-cancelled, .ms2-rejected, .ms2-cancelled, .mv-adjust { background: #eef1f4; color: var(--muted); }
.ps-with_accountant { background: var(--info-bg); color: var(--info); } .ps-paid { background: var(--brand-2); color: var(--brand); }
@media print { .sig { border: 0; } .sign-box { display: none; } }
/* v5.1: KPIs & vehicle evaluation */
.kpi-card .card-head .row { flex-wrap: wrap; gap: 6px; }
.kpi-sec { margin: 14px 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.stats.kpis { margin-bottom: 4px; }
.stat.kpi b { font-size: 21px; }
.kdelta { font-size: 12px; font-variant-numeric: tabular-nums; }
.kdelta.good { color: #1f7a3e; } .kdelta.bad { color: var(--danger); } .kdelta.flat { color: var(--muted); }
.score { display: inline-block; width: 70px; height: 8px; background: #edf0f2; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.score i { display: block; height: 100%; }
.score i.g1 { background: #1f7a3e; } .score i.g2 { background: #4f9d69; } .score i.g3 { background: #d8962c; } .score i.g4 { background: #c0392b; }
.badge.ve-excellent { background: #dff3e6; color: #1f7a3e; } .badge.ve-good { background: #e8f4ec; color: #2f7d4b; }
.badge.ve-review { background: var(--warn-bg); color: var(--warn); } .badge.ve-replace { background: var(--danger-bg); color: var(--danger); } .badge.ve-na { background: #eef0f2; color: var(--muted); }
.row.wrap { flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) { .stat.kpi b { font-size: 18px; } .kpi-card .card-head { flex-direction: column; align-items: flex-start; gap: 8px; } }
@media print { .kpi-card .btn { display: none !important; } }
.table-scroll { overflow-x: auto; max-width: 100%; }
.eval-table td.reasons { min-width: 220px; }
.eval-table td:first-child { min-width: 110px; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .stat { padding: 10px 12px; } .stat b { font-size: 18px; } }
@media print { .table-scroll { overflow: visible; } }

/* ===== v6.0 theme variables, simplified screens ([CSS-V6]) ===== */
h1, h2, h3, h4 { color: var(--heading, inherit); font-family: var(--font-h, var(--font)); }
.modal h3, .modal h4 { color: inherit; }
.sidebar { background: var(--sb-bg, #fff); color: var(--sb-ink, var(--ink)); }
.sidebar nav a, .side-foot, .brand b { color: var(--sb-ink, var(--ink)); }
.sidebar .brand small, .side-foot .who small, .nav-group { color: var(--sb-ink, var(--muted)); opacity: .75; }
.sidebar nav a:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.sidebar nav a.active { background: var(--sb-active, var(--brand-2)); color: var(--sb-active-ink, var(--brand)); }
.side-foot { border-top-color: color-mix(in srgb, currentColor 18%, transparent); }
.brand .logo-img { height: var(--logo-h, 40px); width: auto; max-width: 170px; object-fit: contain; border-radius: 6px; background: none; }
.topbar { padding: 6px 12px; border-radius: 10px; background: var(--tb-bg, transparent); color: var(--tb-ink, var(--ink)); min-height: 44px; }
.topbar .menu-btn { margin-inline-end: 0; } .topbar .bell { color: var(--tb-ink, var(--ink)); }
.tb-brand { margin-inline-end: auto; display: flex; align-items: center; gap: 10px; } .tb-logo { height: 30px; width: auto; object-fit: contain; }
.nav-more { margin-top: 8px; border-top: 1px dashed color-mix(in srgb, currentColor 22%, transparent); padding-top: 6px; }
.nav-more summary { cursor: pointer; padding: 8px 12px; opacity: .8; list-style: none; } .nav-more[open] summary { margin-bottom: 4px; }
.lh-head { background: var(--p-hbg, transparent); color: var(--p-hink, inherit); border-bottom-color: var(--p-line, var(--brand)); font-family: var(--font-p, var(--font)); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.lh-head.lh-split, .lh-head { padding: 10px 12px; }
.lh-head b { color: var(--p-hink, var(--brand)); } .lh-head small { color: var(--p-hink, #555); opacity: .85; }
.lh-foot { border-top-color: var(--p-line, var(--accent)); color: var(--p-fink, #444); font-family: var(--font-p, var(--font)); }
.preview-paper { font-family: var(--font-p, var(--font)); color: var(--p-ink, inherit); }
@media print { body { color: var(--p-ink, var(--ink)); font-family: var(--font-p, var(--font)); } }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .grid3 > .card { margin-bottom: 0; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } }
.kind-pick { display: flex; gap: 10px; margin-bottom: 14px; } .kind-pick .btn { flex: 1; font-size: 16px; padding: 14px 8px; }
.logo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .logo-slot { display: grid; gap: 6px; align-content: start; }
@media (max-width: 800px) { .logo-grid { grid-template-columns: 1fr; } }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.color-f input[type=color] { width: 54px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 5; }
.odo-prev { max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--line); margin-top: 6px; }
details.plain { margin: 10px 0; } details.plain > summary { cursor: pointer; padding: 6px 0; font-weight: 600; }
.row.wrap { flex-wrap: wrap; }

/* phones: forms open as a full-height sheet; header and Save bar stay visible, only the middle scrolls */
@media (max-width: 640px) {
  .modal-wrap { padding: 0; place-items: stretch; }
  .modal { max-width: none; width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .modal-head { flex: 0 0 auto; } .modal-foot { flex: 0 0 auto; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); background: #fff; }
  .modal-body { padding: 14px; }
}

/* [V6.4-MOBILE] wide tables inside cards scroll sideways instead of widening the page; new filter rows wrap */
@media (max-width: 900px) {
  .card, .pf-block, .paper { overflow-x: auto; max-width: 100%; }
  .card table, .pf-block table { max-width: none; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .emp-dept { display: block; margin-top: 3px; }
}
.print-only { display: none; } @media print { .print-only { display: block; } }
@media (max-width: 900px) { .filters select, .filters input { max-width: 100%; } }

/* Excel/CSV downloads are for admin, HR and accountant only (the server enforces it too) */
.no-export #csvBtn, .no-export #xlsxBtn, .no-export #xBtn { display: none !important; }

/* signatures: each party's image + name + date/time in its own cell */
.pf-sign > div { flex: 1; text-align: center; }
.pf-sign .pf-sig { display: grid; justify-items: center; gap: 2px; margin-top: 6px; } .pf-sign .pf-sig img { max-height: 60px; max-width: 200px; } .pf-sign .pf-sig u { text-decoration: none; font-weight: 600; } .pf-sign .pf-sig small { color: #555; font-size: 11px; }
.pf-sign div > span { display: block; border-bottom: 1px solid #333; height: 50px; margin-bottom: 6px; }

/* HR module: wide tables scroll inside their box instead of widening the page */
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 560px; }
#hrBody, #tblIn { max-width: 100%; }
#hrBody .filters { flex-wrap: wrap; }
#hrBody .filters input, #hrBody .filters select { max-width: 100%; }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.stat-row .stat { flex: 1 1 140px; border: 1px solid var(--border, #ddd); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.stat-row .stat b { font-size: 1.4em; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }

/* printed pages: the footer is pinned to the bottom of every page (not glued to the last line); the table footer only reserves its space */
@media print {
  .lh-wrap > tbody > tr > td { vertical-align: top; }
  .lh-wrap > tfoot > tr > td { height: 70px; padding: 0; }
  tfoot.lh-only .lh-foot { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: #fff; }
  .paper { break-inside: auto; }
  .layout { min-height: 0 !important; }
  html, body { height: auto !important; }
}
.hr-paper .pf-block { page-break-after: auto; }

.hr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.hr-tile { text-decoration: none; color: inherit; display: block; }
.hr-tile:hover { border-color: #b8923a; }

/* login: Holistic navy & gold, slow drifting shapes */
.login-page { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--lg1, #00145B) 0%, var(--lg2, #003F8F) 55%, var(--lg1, #00145B) 100%); gap: 28px; grid-auto-flow: row; align-content: center; justify-items: center; }
.login-bg i { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--lga, #E2BE6F) 35%, transparent), transparent 70%); animation: lgFloat 18s ease-in-out infinite; }
.login-bg i:nth-child(1) { width: 340px; height: 340px; top: -90px; inset-inline-start: -80px; }
.login-bg i:nth-child(2) { width: 220px; height: 220px; bottom: 8%; inset-inline-end: 6%; animation-delay: -4s; }
.login-bg i:nth-child(3) { width: 140px; height: 140px; top: 18%; inset-inline-end: 22%; animation-delay: -8s; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), rgba(255,255,255,0) 70%); }
.login-bg i:nth-child(4) { width: 480px; height: 480px; bottom: -200px; inset-inline-start: 18%; animation-delay: -2s; background: radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--lga, #E2BE6F) 18%, transparent), transparent 70%); }
.login-bg i:nth-child(5) { width: 90px; height: 90px; top: 55%; inset-inline-start: 8%; animation-delay: -11s; }
.login-bg i:nth-child(6) { width: 60px; height: 60px; top: 10%; inset-inline-start: 45%; animation-delay: -6s; background: radial-gradient(circle, rgba(255,255,255,.2), transparent 70%); }
@keyframes lgFloat { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(26px,-34px) scale(1.08); } }
.login-hero { position: relative; text-align: center; color: #fff; animation: lgIn 1.1s ease both; }
.login-hero h2 { margin: 8px 0 2px; font-size: 26px; letter-spacing: .3px; } .login-hero p { margin: 0; color: var(--lga, #E2BE6F); font-weight: 600; }
.login-hero .lg-logo { display: inline-grid; place-items: center; background: none; box-shadow: none; border-radius: 0; width: auto; height: auto; }
.login-hero .lg-logo img { max-width: 220px; max-height: 110px; width: auto; height: auto; background: none; border-radius: 0; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
@keyframes lgPulseOld { 0%,100% { box-shadow: 0 0 0 3px rgba(212,175,55,.5), 0 12px 34px rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 9px rgba(212,175,55,.18), 0 12px 34px rgba(0,0,0,.35); } }
@keyframes lgIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.login-card { position: relative; animation: lgIn .9s .15s ease both; border-top: 4px solid var(--lga, #E2BE6F); }
.login-card .chk { font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
@media (prefers-reduced-motion: reduce) { .login-bg i, .login-hero, .login-card, .lg-logo { animation: none !important; } }
.tb-user { display: inline-flex; gap: 6px; align-items: center; margin-inline-start: auto; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.05); text-decoration: none; color: inherit; max-width: 46vw; overflow: hidden; white-space: nowrap; }
.tb-user small { opacity: .6; } @media (max-width: 600px) { .tb-user small { display: none; } }
.row-bad td { color: #b42318; }

.login-page.lg-solid { background: var(--lg1, #00145B); }
.login-page.lg-still .login-bg i, .login-page.lg-still .login-hero, .login-page.lg-still .login-card, .login-page.lg-still .lg-logo { animation: none !important; }
.lh-tag { display: block; margin-top: 8px; color: #fff; opacity: .85; }
/* horizontal layout: branding beside the card (stacks on phones) */
@media (min-width: 900px) {
  .login-page.lg-horizontal { grid-auto-flow: column; grid-template-columns: 1fr minmax(340px, 420px); justify-items: center; align-content: center; gap: 60px; padding: 40px 8vw; }
  .login-page.lg-horizontal .login-hero h2 { font-size: 34px; } 
}

@media (min-width: 900px) { .login-page.lg-horizontal .lg-logo { width: auto; height: auto; border-radius: 0; } .login-page.lg-horizontal .lg-logo img { max-width: 300px; max-height: 150px; } }

.login-hero .lg-logo img { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: none !important; padding: 0 !important; }
.login-hero .lg-logo.lg-mono img { filter: brightness(0) invert(1) drop-shadow(0 4px 14px rgba(0,0,0,.3)); }

/* always-visible check-in bar */
.hr-bar { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.hr-bar + .tb-user { margin-inline-start: 0; }
.hr-bar-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(0,0,0,.06); font-size: 13px; text-decoration: none; color: inherit; white-space: nowrap; }
.hr-bar-chip.on { background: #dcfce7; color: #166534; font-size: 15px; } .hr-bar-chip.done { background: #e0f2fe; color: #075985; } .hr-bar-chip.warn { background: #fef3c7; color: #92400e; } .hr-bar-chip.pend { background: #ede9fe; color: #5b21b6; }
.hr-bar-chip b { font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.hr-bar-btn { white-space: nowrap; } .hr-bar-btn.pulse { animation: hrPulse 2s ease-in-out infinite; }
@keyframes hrPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 50% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } }
@media (max-width: 700px) { .hr-bar-chip { padding: 4px 8px; font-size: 12px; } .tb-brand { display: none; } .tb-user b { display: none; } }
/* notification cards */
.nb-host { position: fixed; top: 64px; inset-inline: 0; margin: 0 auto; width: min(460px, 94vw); z-index: 9999; display: grid; gap: 8px; pointer-events: none; }
.nb-card { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: #fff; color: #1d2733; border: 1px solid #e2e8f0; border-inline-start: 5px solid var(--primary, #003F8F); border-radius: 12px; padding: 11px 14px; box-shadow: 0 10px 30px rgba(15,23,42,.18); text-decoration: none; animation: nbIn .35s ease both; }
.nb-card.out { opacity: 0; transform: translateY(-10px); transition: all .4s; }
.nb-tx { flex: 1; font-size: 14px; line-height: 1.4; } .nb-x { border: 0; background: none; cursor: pointer; opacity: .55; font-size: 14px; }
@keyframes nbIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* ===== v6.6: refined look (cards, fields, tables, tabs), icons, nav buttons, avatars, editor ===== */
:root { --radius: 14px; --shadow: 0 1px 2px rgba(16, 32, 48, .05), 0 6px 20px rgba(16, 32, 48, .05); --ring: 0 0 0 3px rgba(0, 63, 143, .16); }
.card, .stat, .modal { box-shadow: var(--shadow); }
.card { border-color: #e6ebf0; padding: 20px; }
.modal { border-radius: 16px; }
.modal-head { background: linear-gradient(180deg, #fbfcfd, #fff); }
input, select, textarea { padding: 10px 12px; min-height: 42px; border: 1px solid #d5dce4; border-radius: 10px; background: #fcfdfe; transition: border-color .15s, box-shadow .15s, background .15s; }
textarea { min-height: 0; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: #b8c3ce; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: #fff; }
input[type=checkbox], input[type=radio] { min-height: 0; box-shadow: none; }
input[type=file] { padding: 8px; background: #fff; }
.field > span { color: #34424f; letter-spacing: .1px; }
.btn { border-radius: 10px; padding: 9px 15px; font-weight: 600; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { box-shadow: 0 1px 4px rgba(16, 32, 48, .08); } .btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 11px; } .btn.active { background: var(--brand-2); border-color: #b7cdea; color: var(--brand); }
.table-wrap, .table-card { border-radius: 12px; }
th { background: #f6f8fa; text-transform: none; font-size: 12.5px; }
tbody tr:hover td { background: #fafcfd; } tr.click { cursor: pointer; }
.badge { padding: 3px 10px; } .badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.danger { background: var(--danger-bg); color: var(--danger); } .badge.info { background: var(--info-bg); color: var(--info); }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; flex: none; }
[dir=rtl] .ic-flip { transform: scaleX(-1); }
.hr-chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: none; margin-bottom: 14px; }
.hr-chips .chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; margin: 0; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: #fff; border: 1px solid #e0e6ec; color: #3d4955; transition: all .15s; }
.hr-chips .chip:hover { border-color: #b7cdea; color: var(--brand); }
.hr-chips .chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(0, 63, 143, .25); }
.subchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; } .subchips .chip { padding: 6px 14px; margin: 0; background: #fff; border: 1px solid #e0e6ec; border-radius: 999px; font-weight: 600; }
.subchips .chip.active { background: var(--brand-2); color: var(--brand); border-color: #b7cdea; }
.nav-pair { display: inline-flex; gap: 6px; } .nav-btn { gap: 4px; } .nav-btn span { font-size: 13px; }
@media (max-width: 720px) { .nav-btn span { display: none; } .nav-btn { padding: 8px 10px; } .hr-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; } .hr-chips .chip { white-space: nowrap; } }
.av { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-2); color: var(--brand); font-weight: 700; flex: none; }
.av-xs { width: 26px; height: 26px; font-size: 11px; } .av-sm { width: 34px; height: 34px; font-size: 13px; } .av-md { width: 44px; height: 44px; } .av-lg { width: 84px; height: 84px; font-size: 26px; border: 3px solid #fff; box-shadow: var(--shadow); }
.emp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; } .emp-head h2 { margin: 0; }
.app-head { display: flex; align-items: center; gap: 16px; } .app-photo { width: 96px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.rte { border: 1px solid #d5dce4; border-radius: 12px; overflow: hidden; background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #f6f8fa; border-bottom: 1px solid var(--line); align-items: center; }
.rte-bar select { width: auto; min-height: 34px; padding: 4px 8px; } .rte-bar input[type=color] { width: 36px; min-height: 34px; padding: 2px; }
.rte-b { min-width: 34px; height: 34px; border: 1px solid transparent; background: transparent; border-radius: 8px; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; color: #34424f; }
.rte-b:hover { background: #e7edf2; }
.rte-area { padding: 14px 16px; line-height: 1.9; outline: none; font-size: 16px; } .rte-area:focus { box-shadow: inset 0 0 0 2px rgba(0, 63, 143, .18); }
.rte-view, .rte-area { overflow-wrap: anywhere; } .rte-view p, .rte-area p { margin: 0 0 8px; } .rte-view ul, .rte-view ol { margin: 6px 0 8px; padding-inline-start: 24px; }
.kbar { height: 9px; background: #e8edf2; border-radius: 99px; overflow: hidden; } .kbar i { display: block; height: 100%; background: linear-gradient(90deg, #003F8F, #1AA4D2); border-radius: 99px; }
.stars { display: inline-flex; gap: 6px; } .stars label { cursor: pointer; } .stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.stars span { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid #d5dce4; border-radius: 10px; font-weight: 700; background: #fff; }
.stars input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; } .stars input:focus-visible + span { box-shadow: var(--ring); }
.eval-total { font-size: 18px; margin-top: 14px; }
@media print { .nav-pair { display: none !important; } body.print-app .offer-only { display: none !important; } body.print-offer .app-only { display: none !important; } .rte-view { font-size: 14px; } .av-lg { box-shadow: none; } }

/* ===== Holistic brand pass: navy #00145B / royal #003F8F / cyan #1AA4D2 / gold #E2BE6F, thin geometric chevrons ===== */
:root { --navy: #00145B; --cyan: #1AA4D2; --info: #1AA4D2; --info-bg: #e6f5fb; --bg: #f3f6fa; --line: #e1e7ef; }
h2, h3 { color: var(--navy); }
.page-head h2, .page-head h3 { position: relative; padding-inline-start: 14px; }
.page-head h2::before, .page-head h3::before { content: ''; position: absolute; inset-inline-start: 0; top: 14%; bottom: 14%; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--accent), #c79a3c); }
.btn.primary { background: linear-gradient(135deg, #003F8F, #00145B); border-color: #00145B; box-shadow: 0 4px 12px rgba(0, 20, 91, .22); }
.btn.primary:hover { filter: none; background: linear-gradient(135deg, #0a4fa6, #00145B); }
.sidebar nav a.active { position: relative; font-weight: 700; }
.sidebar nav a.active::before { content: ''; position: absolute; inset-inline-start: -12px; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
[dir=rtl] .sidebar nav a.active::before { border-radius: 4px 0 0 4px; }
th { color: var(--navy); border-bottom: 2px solid #dfe6ef; }
.card { border-top: 0; } .stat { border-top: 3px solid var(--cyan); }
.badge.accent { background: #fbf3df; color: #8a6a1f; }
.login-page { background: linear-gradient(135deg, var(--lg1, #00145B) 0%, var(--lg2, #003F8F) 60%, var(--lg1, #00145B) 100%); }
.login-bg i { border-radius: 0; clip-path: polygon(0 0, 52% 0, 100% 50%, 52% 100%, 0 100%, 48% 50%); background: linear-gradient(180deg, rgba(26, 164, 210, .45), rgba(0, 63, 143, 0) 85%); }
.login-bg i:nth-child(1) { width: 300px; height: 380px; top: 6%; inset-inline-start: -70px; }
.login-bg i:nth-child(2) { width: 220px; height: 300px; bottom: 6%; inset-inline-end: 4%; animation-delay: -4s; }
.login-bg i:nth-child(3) { width: 140px; height: 190px; top: 12%; inset-inline-end: 20%; animation-delay: -8s; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)); }
.login-bg i:nth-child(4) { width: 380px; height: 480px; bottom: -160px; inset-inline-start: 22%; animation-delay: -2s; background: linear-gradient(180deg, rgba(0, 63, 143, .55), rgba(0, 20, 91, 0)); }
.login-bg i:nth-child(5) { width: 80px; height: 110px; top: 55%; inset-inline-start: 8%; animation-delay: -11s; background: linear-gradient(180deg, rgba(226, 190, 111, .5), rgba(226, 190, 111, 0)); }
.login-bg i:nth-child(6) { width: 60px; height: 84px; top: 10%; inset-inline-start: 45%; animation-delay: -6s; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); }
[dir=rtl] .login-bg i { transform-origin: center; }
.login-card { border-radius: 18px; border-top: 4px solid var(--accent); box-shadow: 0 24px 60px rgba(0, 10, 50, .45); }
.login-hero p { letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }
.login-hero h2 { color: #fff; }

/* navy sidebar, gold active item */
.sidebar { --sbn: #00145B; background: var(--sb-bg, linear-gradient(180deg, #00145B 0%, #001a73 100%)); color: var(--sb-ink, #fff); border-inline-end: 0; box-shadow: 2px 0 24px rgba(0, 20, 91, .18); }
.sidebar nav a, .side-foot, .brand b, .side-foot .who b { color: var(--sb-ink, #eaf0ff); }
.sidebar .brand small, .side-foot .who small, .nav-group { color: var(--sb-ink, #a9b8e0); opacity: .8; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .08); }
.sidebar nav a.active { background: var(--sb-active, rgba(226, 190, 111, .14)); color: var(--sb-active-ink, #E2BE6F); font-weight: 700; }
.sidebar nav a.active .ic { opacity: 1; }
.sidebar nav a.active::before { background: #E2BE6F; }
.logo-img.logo-mono { filter: brightness(0) invert(1); }
.side-foot { border-top-color: rgba(255, 255, 255, .14); }
.side-foot .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }
.side-foot .btn:hover { background: rgba(255, 255, 255, .16); }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); }
.emp-info { margin-bottom: 8px; } .pf-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; background: #f6f9fd; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pf-mini small { display: block; color: var(--muted); font-size: 11.5px; } .pf-mini b { font-size: 13.5px; overflow-wrap: anywhere; }
.grp-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; }
.to-box { margin: 10px 0 16px; } .to-box th { width: 30%; } .lt-part { margin-bottom: 8px; } .lt-sep { border: 0; border-top: 1px dashed #b8c3d4; margin: 20px 0; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; } .recips { margin-top: 18px; }
@media (max-width: 720px) { .pf-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grp-list { grid-template-columns: 1fr; } }
.agr-page { page-break-after: always; break-after: page; margin-bottom: 18px; } .agr-page:last-child { page-break-after: auto; }
.doc-stat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .ds { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.ds small { color: var(--muted); } .ds b { font-size: 20px; color: #0a7a3d; } .ds span { font-size: 12px; color: var(--muted); } .ds.warn { border-color: #E2BE6F; background: #fff9e8; } .ds.warn b { color: #9a6b00; } .ds.bad { border-color: #e4a0a0; background: #fff1f1; } .ds.bad b { color: #b42318; }
.days-badge { background: #00145B; color: #fff; padding: 6px 12px; border-radius: 999px; } .days-badge b { color: #E2BE6F; }
.trk-overlay { position: fixed; inset: 0; background: rgba(0, 20, 91, .55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.trk-box { background: #fff; border-radius: 18px; padding: 24px; max-width: 420px; width: 100%; text-align: center; border-top: 5px solid #E2BE6F; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); } .trk-box h3 { color: #00145B; margin: 0 0 8px; } .trk-box .btn { margin-top: 10px; min-width: 160px; }
.pp-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .pp { border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; } .msg { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 6px 0; } .msg.me { background: #f4f8ff; }
svg.chart { width: 100%; height: auto; max-height: 240px; display: block; } svg.chart.flow { max-height: 90px; } .flow-box { overflow-x: auto; margin: 6px 0 12px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: #4a5a78; margin-top: 4px; } .chart-legend.col { flex-direction: column; } .chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; }
.donut-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .donut { width: 150px; height: 150px; flex: none; }
@media print { body.print-pdf * { visibility: hidden !important; } body.print-pdf #pdfBox, body.print-pdf #pdfBox * { visibility: visible !important; } body.print-pdf #pdfBox { position: absolute; inset-inline: 0; top: 0; } body.print-pdf #pdfBox table { font-size: 9px; } }
.my-head { padding: 14px 16px; } .my-head h2 { margin: 0; } .my-head p { margin: 2px 0 0; }
.req-quick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #00145B; text-decoration: none; font-size: 13px; white-space: nowrap; }
.req-quick b { background: #9aa7bd; color: #fff; border-radius: 999px; min-width: 22px; text-align: center; padding: 1px 6px; font-size: 12px; } .req-quick.has { border-color: #E2BE6F; background: #fff9e8; } .req-quick.has b { background: #c0392b; }
@media (max-width: 720px) { .req-quick span { display: none; } }
/* v6.7.4 IT report */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.card.kpi { text-align: center; padding: 12px 8px; }
@media (max-width: 800px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
