/* HR & Accounting Integrated Management System.
   Simple, elegant, neutral base; each company / outsource group has its own accent color:
   TOTAL POWER BOX = copper, TOTALPOWER SYSTEMS = emerald, LK LAND = burgundy (light red),
   SECURITY GUARD = navy, CONSTRUCTION = gold. */
:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d2126;
  --muted: #6d7179;
  --line: #ebe8e2;
  --line-strong: #dedad2;
  --danger: #b3261e;
  --row-alt: #fbfaf8;
  --input-line: #dcd8d0;
  --shadow: 0 1px 2px rgba(24,24,24,.04), 0 8px 24px rgba(24,24,24,.05);
  --radius: 12px;
  --label-text: #3b4148;
  --placeholder: #a5a9ae;
  --photo-icon: #cbc6bd;
  --accent: #2f5d62;        /* computed values (e.g. totals) */
  --accent-soft: #e7efef;
  --sun: #e9e9e9;           /* DTR Sundays and LH / SH days (date cell) */
  --side-active: #ffffff;
  --orange-text: #ffffff;   /* text on the main buttons */
}
:root, .theme-copper {
  --side: #fae8d8;
  --side-hover: #f5dbc2;
  --side-text: #2a2724;
  --side-border: #eccbae;
  --orange: #c25e1a;          /* main accent (buttons) */
  --orange-strong: #8f4410;
  --link: #8f4410;
  --head: #f6dfc8;
  --hover: #f6dfc8;
  --soft: #fbf0e4;
  --brand-sub: #c25e1a;
  --group-text: #9c5522;
  --active-text: #8f4410;
  --th-text: #8f4410;
  --hero-a: #fbf0e4;
  --hero-b: #f2d3ae;
  --focus: rgba(194,94,26,0.2);
  --brand-tint: #f2d3ae;
}
.theme-emerald {
  --side: #d8ecdf;
  --side-hover: #cbe3d4;
  --side-text: #2a2724;
  --side-border: #b8d8c4;
  --orange: #2b6a52;          /* main accent (buttons) */
  --orange-strong: #1d4c3d;
  --link: #1d4c3d;
  --head: #cfe4d8;
  --hover: #cfe4d8;
  --soft: #e8f4ed;
  --brand-sub: #2b6a52;
  --group-text: #477a68;
  --active-text: #1d4c3d;
  --th-text: #1d4c3d;
  --hero-a: #e8f4ed;
  --hero-b: #b9d8c6;
  --focus: rgba(43,106,82,0.25);
  --brand-tint: #b9d8c6;
}
.theme-burgundy {            /* LK: a light red (the user, 2026-10-29) */
  --side: #fbe4e2;
  --side-hover: #f6d4d1;
  --side-text: #2a2724;
  --side-border: #f0c6c2;
  --orange: #b83b3b;          /* main accent (buttons) */
  --orange-strong: #8e2a2a;
  --link: #8e2a2a;
  --head: #f8dbd8;
  --hover: #f8dbd8;
  --soft: #fdf0ef;
  --brand-sub: #b83b3b;
  --group-text: #a8524d;
  --active-text: #8e2a2a;
  --th-text: #8e2a2a;
  --hero-a: #fdf0ef;
  --hero-b: #f3cbc7;
  --focus: rgba(184,59,59,0.25);
  --brand-tint: #f3cbc7;
}
.theme-navy {
  --side: #dbe6f6;
  --side-hover: #cbdbf0;
  --side-text: #2a2724;
  --side-border: #bddaee;
  --orange: #2c4a78;          /* main accent (buttons) */
  --orange-strong: #1b3257;
  --link: #1b3257;
  --head: #cbdcf2;
  --hover: #cbdcf2;
  --soft: #e6edf8;
  --brand-sub: #2c4a78;
  --group-text: #56709a;
  --active-text: #1b3257;
  --th-text: #1b3257;
  --hero-a: #e6edf8;
  --hero-b: #b3c8e6;
  --focus: rgba(44,74,120,0.25);
  --brand-tint: #b3c8e6;
}
.theme-gold {
  --side: #f4e9cf;
  --side-hover: #eddfba;
  --side-text: #2a2724;
  --side-border: #e2d3ad;
  --orange: #8c6a14;          /* main accent (buttons) */
  --orange-strong: #664c0c;
  --link: #664c0c;
  --head: #eee2c2;
  --hover: #eee2c2;
  --soft: #f8f1dd;
  --brand-sub: #8c6a14;
  --group-text: #8d7a45;
  --active-text: #664c0c;
  --th-text: #664c0c;
  --hero-a: #f8f1dd;
  --hero-b: #e2d0a2;
  --focus: rgba(140,106,20,0.25);
  --brand-tint: #e2d0a2;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0; display: flex; flex-direction: column; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 13.5px/1.5 "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .1px; font-feature-settings: "tnum" 1;   /* numbers line up in the tables */
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* ---------- Title bar and ribbon (the menu on top, like Excel) ---------- */
.app-bar {
  display: flex; align-items: center; gap: 18px; padding: 8px 22px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; line-height: 1.2; color: var(--side-text); }
.brand:hover { text-decoration: none; }
.brand .company { font-size: 15px; font-weight: 650; letter-spacing: .4px; }
.brand .app-name { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-sub); }
.brand .app-full { font-size: 8.5px; font-weight: 500; letter-spacing: .3px; color: var(--side-text); opacity: .7; margin-top: -1px; }
body > nav { background: var(--side); border-bottom: 1px solid var(--side-border); box-shadow: 0 2px 8px rgba(24,24,24,.04); position: sticky; top: 0; z-index: 60; }
.rb-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 6px 18px 0; overflow-x: auto; }
.rb-tab, .nav-home {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px 8px; margin: 0;
  border: 1px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0;
  font-size: 13px; font-weight: 600; color: var(--side-text); white-space: nowrap;
}
.rb-tab:hover, .nav-home:hover { background: var(--side-hover); text-decoration: none; }
.rb-tab.active, .nav-home[aria-current] {
  background: var(--card); border-color: var(--side-border); color: var(--active-text); font-weight: 700;
  box-shadow: inset 0 3px 0 var(--orange);
}
.rb-panels { background: var(--card); border-top: 1px solid var(--side-border); margin-top: -1px; }
/* For Checking / Update (red) + Approval (green) at the right of the tabs, a blinking dot (the user, 2026-11-03) */
.hub { margin-bottom: 4px; }
.hub.hub-first { margin-left: auto; }
.hub > summary { list-style: none; }
.hub > summary::-webkit-details-marker { display: none; }
.hub-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 9px; cursor: var(--cur-ptr, pointer);
           background: var(--card); border: 1px solid var(--side-border); font-size: 13px; font-weight: 700; white-space: nowrap;
           color: var(--side-text); user-select: none; }
.hub-btn:hover { background: var(--side-hover); }
.hub.is-check .hub-btn { border-color: rgba(220, 38, 38, .45); }
.hub.is-appr .hub-btn { border-color: rgba(34, 197, 94, .5); }
.hub-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; color: #fff; font-size: 11.5px; line-height: 20px;
         text-align: center; box-sizing: border-box; }
.hub.is-check .hub-n { background: #dc2626; }
.hub.is-appr .hub-n { background: #16a34a; }
.pulse { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; flex: none; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: #c8c8c8; }
.pulse-ring { position: absolute; inset: 0; border-radius: 50%; display: none; }
.is-check .pulse.on .pulse-dot { background: #dc2626; box-shadow: 0 0 8px #dc2626; }
.is-appr .pulse.on .pulse-dot { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.pulse.on .pulse-ring { display: block; animation: hub-pulse 1.6s cubic-bezier(0, 0, 0.2, 1) infinite; }
.is-check .pulse.on .pulse-ring { background: rgba(220, 38, 38, .7); }
.is-appr .pulse.on .pulse-ring { background: rgba(34, 197, 94, .7); }
@keyframes hub-pulse { 0% { transform: scale(.95); opacity: .8; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse.on .pulse-ring { animation: none; display: none; } }
.hub-panel { position: fixed; right: 12px; top: 90px; z-index: 80; max-width: calc(100vw - 16px); min-width: 280px; background: var(--card);
             border: 1px solid var(--side-border); border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.14); padding: 6px; }
.hub-head { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 8px 10px 6px; }
.hub-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 10px; border-radius: 8px; color: var(--text);
           font-size: 13.5px; }
.hub-row:hover { background: var(--hover); text-decoration: none; }
.hub-row b { font-weight: 700; color: var(--muted); }
.is-check .hub-row.has b { color: #dc2626; }
.is-appr .hub-row.has b { color: #16a34a; }
@media print { .hub { display: none !important; } }
.rb-panel { display: flex; align-items: stretch; padding: 3px 10px 2px; overflow-x: auto; }
.rb-group { display: flex; flex-direction: column; padding: 0 8px; border-right: 1px solid var(--line); }
.rb-group:last-child { border-right: 0; }
.rb-items { display: flex; align-items: flex-start; gap: 2px; flex: 1; }
.rb-group-name {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 3px 4px 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .3px; color: var(--group-text); white-space: nowrap;
}
.nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.seg-btn > .nav-dot { margin-left: 6px; vertical-align: 1px; box-shadow: 0 0 0 2px var(--card); }   /* (2026-10-28) */
.nav-item > .nav-dot { position: absolute; top: 1px; right: 50%; margin-right: -17px; box-shadow: 0 0 0 2px var(--card); }
/* A button of the ribbon: the picture on top, the name under it */
.nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: auto; min-width: 56px; min-height: 0; padding: 3px 6px 4px; border: 1px solid transparent; border-radius: 9px;
  color: var(--side-text); font-size: 11px; font-weight: 500; line-height: 1.2; text-align: center;
}
.rb-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--orange); stroke-width: 1.600;
  stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--side-hover); text-decoration: none; }
.nav-item.active { background: var(--head); border-color: var(--side-border); color: var(--active-text); font-weight: 700; }
.nav-item.active .rb-ico { stroke: var(--orange-strong); }
.count {
  position: static; min-width: 18px; padding: 0 5px; border-radius: 9px; text-align: center;
  background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 600; line-height: 15px;
}
.nav-item.active .count { background: var(--card); }
.print-header { display: none; }

main { flex: 1; min-width: 0; padding: 14px 28px 14px; }

/* Liquidation: center-aligned headers */
.grid.liq-grid th, .items-table.liq-table th { text-align: center; vertical-align: middle; }

/* Narrow the No. column, with the header middle-aligned */
.grid th.no-col { text-align: center; width: 48px; }
.grid td.no-col { width: 48px; text-align: center; }
/* ---------- Headings ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.head-actions { display: flex; gap: 8px; align-items: center; }
.head-actions form { margin: 0; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--orange-strong);
}
h1 { font-size: 22px; margin: 2px 0 0; font-weight: 600; letter-spacing: -.3px; }
h2 { font-size: 15.5px; margin: 0 0 12px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font: inherit; font-weight: 600;
  cursor: var(--cur-ptr, pointer); white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--orange-text); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-light { background: rgba(255,255,255,.6); border-color: rgba(90,51,25,.18); color: var(--side-text); }
.btn-link { background: none; border-color: transparent; color: var(--link); padding-left: 6px; padding-right: 6px; }
.btn-outline { background: #fff; border-color: var(--orange); color: var(--link); }
.btn-ghost-danger { background: #fff; border-color: #f0c9c4; color: var(--danger); }
.btn-small { padding: 6px 12px; font-size: 12.5px; }
.link-danger { background: none; border: 0; padding: 0; color: var(--danger); font: inherit; cursor: var(--cur-ptr, pointer); }
.link-danger:hover { text-decoration: underline; }
.link-ok { background: none; border: 0; padding: 0; color: #1b6e2a; font: inherit; font-weight: 600; cursor: var(--cur-ptr, pointer); }
.link-ok:hover { text-decoration: underline; }
.adj-decide { display: inline-flex; gap: 8px; }
.adj-seg .seg-btn { width: auto; min-width: 90px; padding: 0 12px; font-size: 13px; }

/* ---------- Confirm popup (centered) ---------- */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(30,25,20,.35); z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.confirm-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px; min-width: 300px; max-width: 440px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.confirm-msg { margin: 0 0 16px; font-size: 14px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Flash ---------- */
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
/* the result of an email: a box in the middle of the screen (2026-10-28) */
.mail-dlg { width: min(440px, 92vw); border: 0; border-radius: 16px; padding: 28px 28px 22px; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22); animation: mail-in .22s ease-out; }
.mail-dlg::backdrop { background: rgba(20, 24, 28, .38); backdrop-filter: blur(2px); }
.mail-dlg h2 { margin: 10px 0 6px; font-size: 19px; }
.mail-dlg p { margin: 4px 0; color: var(--muted, #555); line-height: 1.45; overflow-wrap: anywhere; }
.mail-dlg .btn { margin-top: 18px; min-width: 120px; }
.mail-ico { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mail-ico svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mail-dlg.is-ok .mail-ico { background: #e6f4ea; color: #1b6e2a; }
.mail-dlg.is-ok .ok-dot { fill: #1b6e2a; stroke: #e6f4ea; }
.mail-dlg.is-ok .ok-tick { stroke: #fff; stroke-width: 1.6; }
.mail-dlg.is-bad .mail-ico { background: #fdecea; color: #b3261e; }
.mail-dlg.is-warn .mail-ico { background: #fdf1d8; color: #9a6a12; }
@keyframes mail-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.flash-ok { background: var(--accent-soft); border-color: #b6e0d9; color: #1b5f57; }
.flash-error { background: #fdecea; border-color: #f5c2bc; color: var(--danger); }

/* ---------- Inputs ---------- */
input, select {
  font: inherit; padding: 8px 11px; border: 1px solid var(--input-line); border-radius: 9px;
  background: #fff; color: var(--text); width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--placeholder); }
input:focus, select:focus {
  outline: none; border-color: var(--orange-strong); box-shadow: 0 0 0 3px var(--focus);
}
input.money, input.num-input { text-align: right; font-variant-numeric: tabular-nums; }
input.invalid { border-color: var(--danger); }

/* Toolbar */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { width: 340px; }
.toolbar input, .toolbar select { width: auto; }

/* Combo (dropdown na pwedeng i-type) */
.combo { position: relative; }
.combo input { padding-right: 34px; }
.combo-btn {
  position: absolute; right: 1px; top: 1px; bottom: 1px; width: 32px;
  border: 0; border-left: 1px solid var(--line); border-radius: 0 9px 9px 0;
  background: var(--soft); color: var(--link); cursor: var(--cur-ptr, pointer); font-size: 12px;
}
.combo-btn:hover { background: var(--head); }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 3px);
  max-height: 240px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--input-line); border-radius: 10px;
  box-shadow: 0 10px 24px rgba(90,51,25,.16);
}
.combo-list li { padding: 7px 10px; border-radius: 7px; cursor: var(--cur-ptr, pointer); }
.combo-list li:hover, .combo-list li.active { background: var(--hover); }
.combo-list li.selected { font-weight: 700; color: var(--link); }
.combo-list li.selected::after { content: "  ✓"; }
.combo-list li .sub { margin-left: 8px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.combo-list li.note { color: var(--muted); font-size: 12px; font-style: italic; cursor: var(--cur-def, default); }
.combo-list li.note:hover { background: none; }

/* Date (23-Sep-26) na may kalendaryo */
.date-field { position: relative; }
.date-field .date-text { padding-right: 36px; }
.date-btn {
  position: absolute; right: 1px; top: 1px; bottom: 1px; width: 34px;
  border: 0; border-radius: 0 9px 9px 0; background: transparent; cursor: var(--cur-ptr, pointer);
  display: flex; align-items: center; justify-content: center; color: var(--link);
}
.date-btn:hover { background: var(--head); }
.date-auto { display: inline-block; vertical-align: middle; }
.date-auto .date-text { width: 150px; }
.date-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.date-picker {
  position: absolute; right: 0; bottom: 0; width: 34px; height: 100%;
  opacity: 0; pointer-events: none; border: 0; padding: 0;
}

/* ---------- Table ---------- */
.table-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto; box-shadow: var(--shadow);
}
/* THE HEADER STAYS IN VIEW (the user, 2026-10-29: "kapag nag scroll down ako hindi ko na makita ang header ... gawin mo sa lahat ng
   posible"): a long table scrolls inside its box (as high as the screen under the ribbon: --top-h, set by static/app.js) and its
   whole <thead> (two header rows too) sticks at the top of the box; the box keeps its horizontal scrollbar in view as well. */
.table-wrap { overflow: auto; max-height: max(320px, calc(100vh - var(--top-h, 170px) - 14px)); }
.table-wrap > table > thead { position: sticky; top: 0; z-index: 4; }
.table-wrap > table > thead th { top: auto; }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid th {
  background: var(--head); text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--th-text); font-weight: 700; position: sticky; top: 0;
}
.grid tbody tr:nth-child(even) { background: var(--row-alt); }
.grid tbody tr:hover { background: var(--hover); }
.grid tfoot td { font-weight: 700; background: var(--head); border-bottom: 0; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid .strong { font-weight: 600; }
.grid .muted { color: var(--muted); }
.grid .computed { color: var(--accent); font-weight: 600; }
.grid .empty { text-align: center; color: var(--muted); padding: 44px; white-space: normal; }
.grid .actions, .grid thead th:last-child {
  position: sticky; right: 0; background: var(--card); box-shadow: -1px 0 0 var(--line);
}
.grid thead th:last-child { background: var(--head); }
.grid tbody tr:nth-child(even) .actions { background: var(--row-alt); }
.grid tbody tr:hover .actions { background: var(--hover); }
.actions-inner { display: flex; gap: 14px; justify-content: flex-end; }
.actions form { margin: 0; }
.grid tr.separated td:not(.actions) { color: var(--muted); }
/* TEST copy of the system (Start_Test.bat) */
.test-banner { background: #c62828; color: #fff; text-align: center; font-weight: 700; font-size: 12.5px;
  letter-spacing: .4px; padding: 5px 10px; position: sticky; top: 0; z-index: 1000; }
@media print { .test-banner { display: none; } }
/* Compact lists (deductions and DTR): many columns fit on the screen */
.grid.grid-compact th, .grid.grid-compact td { padding: 6px 7px; font-size: 12.5px; }
.grid.grid-compact th { white-space: normal; line-height: 1.2; font-size: 10px; letter-spacing: .3px;
  vertical-align: middle; min-width: 52px; }
.grid.grid-compact th.no-col, .grid.grid-compact td.no-col { width: 34px; }
.grid.grid-compact .actions-inner { gap: 8px; }
.grid.grid-compact thead th { text-align: center; vertical-align: middle; }   /* all the headers centered */
/* lines between the columns */
.grid.grid-compact th, .grid.grid-compact td { border-right: 1px solid var(--line); }
.grid.grid-compact th:last-child, .grid.grid-compact td:last-child { border-right: 0; }
.grid th.center, .grid td.center { text-align: center; }
/* DTR: EOT, OT, TAR, UT and all the "Hrs" columns have ONE width ("Hrs" is on a second line of the header);
   Remarks takes the rest of the line and wraps */
.grid.grid-compact th.hrs-col, .grid.grid-compact td.hrs-col { width: 38px; min-width: 38px; max-width: 38px;
  padding-left: 2px; padding-right: 2px; }
/* DTR: Meal, Less Meal, MP2 (counts, 2026-10-15) are narrower, so the whole DTR still fits a 1366px screen */
.grid.grid-dtr th.count-col, .grid.grid-dtr td.count-col { width: 28px; min-width: 28px; max-width: 28px; }
/* the Deployment of the day (Security Guard): in place of Less Meal and MP2 (2 x 28px) */
.grid.grid-dtr th.post-col, .grid.grid-dtr td.post-col { width: 56px; min-width: 56px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid.grid-compact th.hrs-col { letter-spacing: -0.2px; font-size: 8.5px; }
/* Remarks is short: 72px on a 1366px screen, wider on a wider screen (the Full Name takes the rest) */
.grid.grid-compact th.remarks-col, .grid.grid-compact td.remarks-col { width: 72px;
  min-width: clamp(72px, calc((100vw - 1366px) * 0.4 + 72px), 346px); white-space: normal; overflow-wrap: anywhere; }
/* DTR: Time In and Time Out have one width, just wide enough for "12:30 PM" (so that Sus Hrs fits a 1366px screen) */
.grid.grid-dtr th.time-col, .grid.grid-dtr td.time-col { width: 58px; min-width: 58px; max-width: 58px;
  padding-left: 2px; padding-right: 2px; }
/* DTR: the Full Name takes the rest of the line; the dates are right-aligned (like Excel) */
.grid.grid-dtr th.name-col, .grid.grid-dtr td.name-col { width: 100%; min-width: 150px; }
.grid.grid-dtr td.date-col { text-align: right; }
/* DTR: the page fits the screen (no scrolling to the right): the small columns are only as wide as their text */
.grid.grid-dtr th { min-width: 0; }
.grid.grid-dtr th, .grid.grid-dtr td { padding-left: 2px; padding-right: 2px; }
.grid.grid-dtr th.no-col, .grid.grid-dtr td.no-col { width: 26px; padding-left: 3px; padding-right: 3px; }
.grid.grid-dtr .actions-inner { gap: 6px; }
/* DTR: Tardiness (TAR) and Undertime (UT) in red: the header and the hours */
.grid.grid-compact th.dtr-red, .grid.grid-compact td.dtr-red { color: #c62828; }
.grid.grid-compact td.dtr-red { font-weight: 600; }
/* DTR hours: reserved for automatic computation, but formulas are not set up yet. */
.dtr-auto-note { margin: 0 2px 8px; color: var(--accent); font-size: 12px; font-weight: 600; }
/* DTR: the date cell of Sundays and LH / SH days */
.grid td.dtr-sun { background: var(--sun); }

.person { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.person:hover { text-decoration: none; color: var(--link); }
.avatar-sm {
  width: 30px; height: 30px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--head); color: var(--brand-sub); font-size: 11px; font-weight: 700;
  border: 1px solid var(--line-strong);
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

/* Employees as cards (2026-11-04): the picture, the name, the Emp ID */
.emp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; margin-top: 4px; }
.emp-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 14px 16px;
            background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
            color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.emp-card:hover, .emp-card:focus-visible { text-decoration: none; border-color: var(--orange); transform: translateY(-2px);
            box-shadow: 0 2px 4px rgba(24,24,24,.05), 0 12px 28px rgba(24,24,24,.09); outline: none; }
.emp-card-photo { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none; margin-bottom: 8px;
                  display: flex; align-items: center; justify-content: center; background: var(--soft);
                  border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong); }
.emp-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.emp-card-ini { font-size: 28px; font-weight: 700; color: var(--brand-sub); letter-spacing: .5px; }
.emp-card-name { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
                 -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.emp-card:hover .emp-card-name { color: var(--link); }
.emp-card-id { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.emp-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.emp-card-tags .chip { font-size: 11px; padding: 1px 8px; }
.emp-card.is-inactive { background: var(--row-alt); }
.emp-card.is-inactive .emp-card-photo { filter: grayscale(1); opacity: .7; }
.emp-card.is-inactive .emp-card-name { color: var(--muted); }
.emp-cards-empty { grid-column: 1 / -1; padding: 28px; text-align: center; }
@media (max-width: 600px) {
  .emp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .emp-card { padding: 14px 8px 12px; }
  .emp-card-photo { width: 72px; height: 72px; }
}

.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--head); color: var(--th-text); border: 1px solid var(--line-strong);
}
.chip-ok { background: var(--accent-soft); color: #1b6b62; border-color: #b6e0d9; }
.chip-muted { background: #f3efec; color: var(--muted); border-color: #e5ddd6; }
.chip-late { background: #fdecea; color: #a8322a; border-color: #f4c7c2; }
.chip-part { background: #fdf1d8; color: #9a6a12; border-color: #f3dca8; }
.tag {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 8px;
  background: #fde2e2; color: var(--danger); font-size: 11px; font-weight: 600;
}

/* ---------- Cards / forms ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.form-card { max-width: 1120px; margin-bottom: 0; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px;
  align-content: start;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: span 2; }
.field.full { grid-column: 1 / -1; }
.field .label { font-weight: 600; font-size: 12.5px; color: var(--label-text); display: flex; align-items: center; gap: 4px; }
.field em, .form-actions em, .label em, th em { color: var(--danger); font-style: normal; }
/* the red * of a required field, bigger (the user, 2026-10-30: "hindi kasi masyado makita") */
.field em, .label em, th em { font-size: 1.45em; font-weight: 800; line-height: 0; vertical-align: -0.12em; margin-left: 1px; }
.field small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.field small.error { color: var(--danger); font-weight: 600; }
.field small.warn { color: #b45309; }
.field.has-error input, .field.has-error select { border-color: var(--danger); background: #fffafa; }
.label-link { margin-left: auto; font-size: 11.5px; font-weight: 600; }
.tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; font-size: 10px; font-style: normal;
  background: var(--head); color: var(--link); cursor: help; font-weight: 700;
}
.form-grid h2.section {
  grid-column: 1 / -1; margin: 6px 0 -2px; padding-bottom: 6px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  color: var(--orange-strong); border-bottom: 1px solid var(--line);
}
.form-grid h2.section:first-child { margin-top: 0; }
.readonly { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-color: #cfe9e4; }
.form-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
}
.form-actions .order-last { order: 10; }

/* Compact Employees form: fits on one screen */
.form-card.compact { padding: 12px 16px; max-width: 1180px; }
.form-card.compact .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.form-card.compact .field { gap: 2px; }
.form-card.compact input, .form-card.compact select { padding: 5px 8px; font-size: 13px; }
.form-card.compact .form-grid h2.section { margin-top: 6px; }
.form-card.compact .form-grid h2.section:first-child { margin-top: 0; }
.form-card.compact .form-actions { margin-top: 10px; padding-top: 8px; }
/* Add / Edit Vehicle: the form uses the whole width of the page - 6 boxes in a row (4 full rows + Remarks), so it
   fits on one screen. Edit: the fields on the left, the Registration History on the right. */
.form-card.veh-card { max-width: none; }
.form-card.veh-card .form-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.veh-edit { display: flex; gap: 18px; align-items: flex-start; }
.veh-edit > .form-grid { flex: 1; min-width: 0; }
.veh-edit > .hist-side { width: 300px; flex: none; }
.veh-edit > .hist-side .grid { font-size: 12.5px; }
.veh-edit > .hist-side h2.section { margin-top: 0; }
/* ... and the whole HEIGHT of the screen: the card goes down to the bottom of the page, its rows share that height,
   the boxes get bigger on a taller screen, and the Registration History uses the height too. */
main:has(> .veh-card) { display: flex; flex-direction: column; }
main:has(> .veh-card) > .veh-card { flex: 1; }
.form-card.veh-card { display: flex; flex-direction: column; min-height: calc(100vh - 290px); }
.form-card.veh-card > .veh-edit { flex: 1; align-items: stretch; }
.form-card.veh-card .form-grid { grid-auto-rows: minmax(min-content, 1fr); align-content: stretch; gap: 8px 14px; }
.form-card.veh-card .field { align-self: center; gap: 4px; }
.form-card.veh-card .field .label { font-size: clamp(12.5px, 1.7vh, 14.5px); }
.form-card.veh-card .form-grid input, .form-card.veh-card .form-grid select {
  padding: clamp(6px, 1.25vh, 12px) 10px; font-size: clamp(13px, 1.85vh, 16px);
}
.veh-edit > .hist-side { display: flex; flex-direction: column; }
.veh-edit > .hist-side .table-wrap { flex: 1 1 0; min-height: 120px; overflow-y: auto; margin-bottom: 10px; }
.veh-edit > .hist-side .grid { font-size: clamp(12.5px, 1.7vh, 14.5px); }
.veh-edit > .hist-side .toolbar { margin: 0; }
@media (max-width: 1250px) { .form-card.veh-card .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .veh-edit { flex-direction: column; }
  .veh-edit > .hist-side { width: 100%; }
  .veh-edit > .hist-side .table-wrap { flex: none; }
}
.emp-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; }
.photo-panel {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding-right: 22px; border-right: 1px solid var(--line);
}
.photo-frame {
  width: 150px; height: 150px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, var(--hero-a), var(--hero-b)); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame svg { width: 70px; height: 70px; fill: var(--photo-icon); }
.photo-panel .btn { width: 100%; }

/* ---------- Profile (View employee) ---------- */
.profile { padding: 0; overflow: hidden; }
.profile-head {
  display: flex; gap: 22px; align-items: center; padding: 22px 26px;
  background: linear-gradient(120deg, var(--hero-a) 0%, var(--hero-b) 100%);
  border-bottom: 1px solid var(--line);
}
.avatar-lg {
  width: 112px; height: 112px; border-radius: 16px; overflow: hidden; flex: none;
  background: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(90,51,25,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: var(--photo-icon);
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-title h1 { font-size: 24px; margin: 2px 0 2px; }
.profile-sub { color: var(--label-text); font-size: 14.5px; }
.profile-sub .dot { color: var(--orange); margin: 0 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.profile-body {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
}
.profile-body section { padding: 18px 26px 22px; border-right: 1px solid var(--line); }
.profile-body section:last-child { border-right: 0; }
.profile-body h2.section {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  color: var(--orange-strong); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.profile-body h2.section.sub { margin-top: 18px; }
/* The employee tabs: Information | PAN | Deduction History */
.emp-tabs { display: flex; gap: 2px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); }
.emp-tabs:last-child { border-bottom: 0; }
.emp-tabs a {
  padding: 12px 16px 10px; font-weight: 700; font-size: 13.5px; color: var(--label-text);
  border-bottom: 3px solid transparent;
}
.emp-tabs a:hover { text-decoration: none; color: var(--text); background: var(--hover); }
.emp-tabs a.active { color: var(--active-text); border-bottom-color: var(--orange-strong); }
/* PAN history: PAN 1, PAN 2, ... (automatic) */
.pan-history { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; margin: 0 0 14px; }
.pan-history .pan-pick { display: flex; flex-direction: column; gap: 3px; min-width: 320px; max-width: 560px; }
.pan-history .pan-pick .label {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--group-text);
}
.pan-history .pan-pick select { padding: 7px 10px; font-weight: 600; }
.pan-history .pan-changes { flex-basis: 100%; }
.pan-changes { margin: 8px 0 0; font-size: 12.5px; color: var(--label-text); max-width: 8in; }
.profile-body dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; }
.profile-body dt { color: var(--muted); font-size: 12.5px; }
.profile-body dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

/* ---------- Choosing the company ---------- */
.company-switch {
  display: flex; flex-direction: column; gap: 3px; margin: 2px 0 6px;
  padding: 6px; border-radius: 10px; background: rgba(255,255,255,.45);
}
/* (2026-10-30: only the company switcher and the payslip head: the plain .co of the reports' heads stays at the left edge) */
.company-switch .co, .slip-sheet .co {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--side-text); opacity: .75;
}
.company-switch .co:hover { opacity: 1; text-decoration: none; background: rgba(255,255,255,.6); }
.company-switch .co.active { opacity: 1; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.12); }
.co-copper .dot { background: #a4532b; }
.co-emerald .dot { background: #2f6b57; }
.co-burgundy .dot { background: #b83b3b; }
.co-navy .dot { background: #2c4a78; }
.co-gold .dot { background: #8c6a14; }

.company-select { display: flex; flex-direction: column; gap: 4px; margin: 4px 2px 6px; }
.company-select .label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--group-text); padding-left: 8px;
}
.select-wrap { position: relative; display: block; }
.select-wrap .dot { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.select-wrap select {
  padding: 8px 10px 8px 28px; font-size: 12.5px; font-weight: 700; color: var(--side-text);
  background: #fff; border-color: rgba(0,0,0,.08); cursor: var(--cur-ptr, pointer);
  white-space: nowrap; text-overflow: ellipsis;
}
.nav-empty { padding: 12px 18px; margin: 0; }
.app-bar .company-select { flex-direction: row; margin: 0; min-width: 190px; }
.app-bar .select-wrap { width: 100%; }

/* Activity log */
.grid td.wrap { white-space: normal; }
.grid.log td.details { min-width: 280px; max-width: 520px; font-size: 12.5px; color: var(--label-text); }
.co-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.act {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: #efeae6; color: #6b5d52;
}
.act-add { background: #e3f4ea; color: #1f6b3d; }
.act-edit { background: #fff1dc; color: #9a5b00; }
.act-delete, .act-maling-login, .act-failed-login { background: #fde2e2; color: var(--danger); }
.act-upload, .act-download, .act-backup { background: #e3edf6; color: #2f5d86; }
.act-request-add, .act-request-edit, .act-request-delete, .act-resubmit { background: #eef4fb; color: #2f5d86; }
.act-approve { background: #d7f0e0; color: #17613a; }
.act-cancel, .act-bawiin, .act-withdraw { background: #fde2e2; color: var(--danger); }

/* Filters with the label above (Employee, Department, Position, Employment Status) */
.toolbar.filters { align-items: flex-end; gap: 10px; margin-bottom: 6px; }
.filter { display: flex; flex-direction: column; gap: 3px; }
.filter .label {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--group-text); padding-left: 2px;
}
.toolbar .filter input[type=search] { width: 250px; }
.toolbar .filter select { width: 170px; }
.filter-actions { display: flex; gap: 4px; }
/* DTR: the title beside the actions; actions wrap on narrow screens. */
.dtr-page-head { flex-wrap: wrap; }
.dtr-title-filters { display: flex; flex: 1 1 690px; align-items: flex-end; flex-wrap: wrap;
  gap: 12px 32px; min-width: 0; }
.dtr-page-head .head-actions { flex-wrap: wrap; margin-left: auto; }
/* DTR Payroll cutoff: a box as wide as its text; the pay date (15th / end of the month) in bold */
/* Payroll Report: a wide table (the columns of the payroll Excel); the Emp ID and the name stay in view */
.pay-summary-wrap { overflow: auto; max-height: calc(100vh - 300px); }
.pay-summary th, .pay-summary td { white-space: nowrap; }
.pay-summary thead th { position: sticky; top: 0; z-index: 3; }
.pay-summary thead tr.pay-groups th { background: var(--soft); color: var(--label-text); font-size: 10px; letter-spacing: .5px;
  text-transform: uppercase; border-bottom: 1px solid var(--line); }
.pay-summary thead tr:nth-child(2) th { top: 25px; max-width: 86px; white-space: normal; }
.pay-summary .stick-1 { position: sticky; left: 0; z-index: 2; background: var(--card); min-width: 58px; }
.pay-summary .stick-2 { position: sticky; left: 58px; z-index: 2; background: var(--card); box-shadow: 2px 0 0 var(--line); }
.pay-summary thead .stick-1, .pay-summary thead .stick-2 { z-index: 4; background: var(--head); }
.pay-summary .not-yet { background: var(--soft); color: var(--muted); }
.neg, .pay-summary td.neg, .emp-stat strong.neg { color: #c62828; }
.pay-summary .slip-col form { display: inline; margin-left: 6px; }
.pay-summary .slip-col .btn-link { padding: 0; }
/* Contributions: the standard amounts, and the amounts typed to use instead */
.contri-grid th, .contri-grid td { white-space: nowrap; }
.contri-grid input.num-in { width: 84px; padding: 3px 6px; text-align: right; font: inherit; }
.contri-grid input.rem-in { width: 150px; padding: 3px 6px; font: inherit; }
.contri-grid select { width: auto; padding: 3px 6px; font: inherit; }
.contri-grid td.std { color: var(--muted); }
.contri-grid tr.is-changed td.name { box-shadow: inset 3px 0 0 var(--orange); }
.contri-grid thead tr.pay-groups th { background: var(--soft); color: var(--label-text); font-size: 10px; letter-spacing: .5px;
  text-transform: uppercase; }
.pay-summary tfoot td { font-weight: 700; border-top: 2px solid var(--line); position: sticky; bottom: 0; background: var(--card); }
/* Payroll: the pay rates by day type, and the computation of one employee */
/* Payroll Report: "Send Single Payslip" opens a small box under the button (choose the employee: open / send) */
/* Payroll Report: Search name -> the payslip in a popup (2026-10-29) */
.slip-find { position: relative; }
.slip-find input { width: 230px; height: 37px; box-sizing: border-box; }
.slip-dlg { width: min(880px, 96vw); height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.slip-dlg[open] { display: flex; flex-direction: column; }
.slip-dlg::backdrop { background: rgba(20, 20, 20, .45); }
.slip-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px;
                 border-bottom: 1px solid var(--line); background: var(--soft); }
.slip-dlg-head span { display: flex; gap: 8px; }
.slip-dlg iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.slip-one { position: relative; }
.slip-one > summary { list-style: none; }
.slip-one > summary::-webkit-details-marker { display: none; }
.slip-one[open] > summary { border-color: var(--orange); box-shadow: 0 0 0 3px var(--focus); }
.slip-one .slip-one-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 330px; padding: 12px 14px 14px;
  display: grid; grid-template-columns: 1fr; gap: 8px; align-items: stretch; text-align: left; background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: var(--shadow); }
.slip-one .slip-one-box input[type=text] { width: 100%; min-width: 0; box-sizing: border-box; }
.slip-one .slip-one-box .label { margin: 0; }
.slip-one-buttons { display: flex; gap: 8px; justify-content: flex-end; }
.pay-rates-box { margin: 0 0 10px; }
.pay-rates-box > summary { cursor: var(--cur-ptr, pointer); font-size: 12.5px; font-weight: 600; color: var(--label-text); }
.pay-rates { width: auto; margin: 6px 0 4px; }
.pay-rates td, .pay-rates th { white-space: nowrap; }
.pay-calc td.calc { white-space: nowrap; }
.pay-calc td.calc .muted { font-size: 11px; }
.pay-calc tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
/* Statement of Deductions: tick which loans / deductions are shown and printed */
.hist-pick { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: stretch; }
.hist-pick fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px 5px; margin: 0; background: var(--card); }
.hist-pick legend { padding: 0 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--label-text); }
.hist-pick label { display: flex; align-items: center; gap: 6px; padding: 1px 0; font-size: 12.5px; white-space: nowrap; cursor: var(--cur-ptr, pointer); }
.hist-pick input { width: auto; margin: 0; }
.hist-pick-all { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.hist-pick.pending .hist-pick-all .muted b { color: var(--orange-strong); }
.btn.btn-pending { box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 35%, transparent); }
.cut-pick { position: relative; }
.cut-pick > summary { list-style: none; cursor: var(--cur-ptr, pointer); display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 8px 30px 8px 11px; border: 1px solid var(--input-line); border-radius: 9px; background: #fff; position: relative; }
.cut-pick > summary::-webkit-details-marker { display: none; }
.cut-pick > summary::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.cut-pick[open] > summary, .cut-pick > summary:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--focus); }
.cut-pick b { font-weight: 800; color: var(--text); }
.cut-period { color: var(--label-text); }
.cut-list { position: absolute; z-index: 30; left: 0; top: calc(100% + 3px); min-width: 100%; max-height: 330px; overflow-y: auto;
  overflow-x: hidden; padding: 4px; background: #fff; border: 1px solid var(--input-line); border-radius: 10px;
  box-shadow: 0 10px 24px rgba(90,51,25,.16); }
.cut-list a { display: flex; gap: 10px; white-space: nowrap; padding: 7px 26px 7px 10px; border-radius: 7px; color: var(--text); }
.cut-list a:hover, .cut-list a:focus { background: var(--hover); text-decoration: none; outline: none; }
.cut-list a.selected { background: var(--soft); }
.cut-list a.selected b { color: var(--link); }
.list-count { margin: 0 2px 8px; }

/* Approval */
.count-alert { background: var(--danger) !important; color: #fff; }
.flash-info { background: #eef4fb; border-color: #c9dcf0; color: #2f5d86; }
.notice-chip {
  margin-left: auto; margin-right: 8px; max-width: 520px; padding: 6px 12px; border-radius: 9px;
  background: #eef4fb; border: 1px solid #c9dcf0; color: #2f5d86; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 10px; background: var(--head); }
.seg a { padding: 6px 14px; border-radius: 8px; color: var(--label-text); font-weight: 600; font-size: 13px; }
.seg a:hover { text-decoration: none; background: rgba(255,255,255,.6); }
.seg a.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.kind, .st {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.kind-add { background: #e3f4ea; color: #1f6b3d; }
.kind-edit { background: #fff1dc; color: #9a5b00; }
.kind-delete { background: #fde2e2; color: var(--danger); }
.st-pending { background: #eef4fb; color: #2f5d86; }
.st-returned { background: #fde2e2; color: var(--danger); }
.st-approved { background: #e3f4ea; color: #1f6b3d; }
.st-withdrawn { background: #efeae6; color: #6b5d52; }
a.st { margin-left: 8px; }
a.st:hover { text-decoration: none; filter: brightness(.96); }
.req-summary { display: flex; flex-wrap: wrap; gap: 14px 36px; align-items: flex-start; padding: 16px 22px; }
.req-summary > div { display: flex; flex-direction: column; gap: 3px; }
.req-summary .wide-note { flex-basis: 100%; }
.req-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.req-photos { display: flex; flex-direction: column; gap: 12px; }
.req-photos figure { margin: 0; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.photo-frame.sm { width: 120px; height: 120px; }
.grid.diff { width: 100%; }
.grid.diff td { white-space: normal; }
.grid.diff tr.changed td { background: #fff7e0; }
.grid.diff tr.changed td:first-child { box-shadow: inset 3px 0 0 #f0b43c; color: var(--text); font-weight: 600; }
.decide { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.decide form { margin: 0; }
.cancel-form { display: flex; gap: 8px; flex: 1; min-width: 320px; }
.cancel-form input { flex: 1; }
.btn-approve { background: #2e8b57; border-color: #2e8b57; color: #fff; padding: 9px 22px; }

/* ---------- Personnel Action Notice (same as HRA.FRM.005) ---------- */
.pan-wrap { margin: 0; }
.pan-doc {
  width: 8in; margin: 0 auto 24px; padding: 0.3in 0.3in 0.35in; background: #fff; color: #111;
  font: 10.5px/1.25 Calibri, Carlito, "Segoe UI", Arial, sans-serif;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.pan-doc table { width: 100%; border-collapse: collapse; margin-top: 8px; table-layout: fixed; }
.pan-doc th, .pan-doc td { border: 1px solid #222; padding: 3px 5px; vertical-align: middle; }
.pan-doc th { font-weight: 700; font-size: 10px; text-align: center; background: #fff; }
.pan-doc th.left { text-align: left; }
.pan-doc th.pan-sec { background: #d9d9d9; }
.pan-doc th.pan-plain { border: 0; padding-top: 4px; }
.pan-doc .pan-sm { font-size: 8.5px; }
.pan-doc .w-lbl { width: 20%; }
.pan-doc .center { text-align: center; }
.pan-doc .pan-cell { height: 22px; }
.pan-doc .pan-lbl { width: 13%; font-weight: 400; }
/* Header */
.pan-head { margin-top: 0 !important; }
.pan-head td { border: 1px solid #222; }
.pan-head .pan-logo { width: 20%; text-align: center; padding: 6px; }
.pan-head .pan-logo img { max-width: 100%; max-height: 46px; }
.pan-head .pan-logo strong { font-size: 15px; }
.pan-head .pan-co {
  text-align: center; font: 700 16px/1.2 Cambria, "Times New Roman", serif; padding: 5px;
}
.pan-head .pan-title { text-align: center; font-weight: 700; font-size: 12.5px; letter-spacing: .2px; }
.pan-head .pan-code { width: 20%; font-size: 8.5px; padding: 2px 5px; color: #333; }
/* Itaas: petsa + employee info + picture */
/* 80% information + 20% picture, so the vertical lines match the other tables */
.pan-top { display: grid; grid-template-columns: 80% 20%; align-items: end; }
.pan-top-left { min-width: 0; }
.pan-created { text-align: right; margin-top: 8px; font-size: 11px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.pan-photo {
  width: calc(100% - 10px); aspect-ratio: 1 / 1; justify-self: end; border: 1.5px solid #1f3a5f; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #fff;
}
.pan-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Checkbox */
.pan-checks { vertical-align: top !important; padding: 6px 10px !important; height: 110px; }
.pan-chk { display: flex; align-items: center; gap: 8px; margin: 1px 0; font-size: 10.5px; }
.pan-box { font-size: 13px; line-height: 1; width: 14px; }
.pan-nature { display: flex; align-items: center; gap: 6px; }
.pan-nature .pan-chk { flex: none; }
.pan-other { border-bottom: 1px solid #555 !important; min-width: 120px; }
.pan-info th.left { font-size: 10px; height: 30px; }
/* Pirma */
.pan-sign td { border: 1px solid #222; }
.pan-sign .pan-cap { font-size: 10px; padding: 2px 4px; border-bottom: 0; height: 14px; }
.pan-sign .pan-signee { text-align: center; height: 44px; vertical-align: bottom; border-top: 0; padding-bottom: 4px; }
.pan-sign .pan-name { font-size: 10.5px; }
.pan-sign .pan-role { font-weight: 700; font-size: 10.5px; }
/* Values at inputs */
.pan-val { display: block; min-height: 14px; }
.pan-val.pan-strong, .pan-strong { font-weight: 700; }
.pan-editing .pan-in, .pan-editing .date-text {
  width: 100%; border: 0; border-radius: 3px; padding: 2px 4px; font: inherit; font-size: 11px;
  background: #fff7d6; box-shadow: none; min-width: 0;
}
.pan-editing .pan-in.center { text-align: center; }
.pan-editing .pan-in[readonly] { background: transparent; cursor: var(--cur-def, default); }
.pan-editing .pan-in:focus, .pan-editing .date-text:focus { outline: 1.5px solid var(--orange-strong); background: #fff; }
.pan-editing .pan-in.invalid, .pan-editing .date-text.invalid { background: #fde2e2; }
.pan-editing .pan-date { max-width: 150px; margin: 0 auto; }
.pan-created .pan-date { margin: 0; }
.pan-editing .pan-date .date-text { padding-right: 26px; text-align: center; }
.pan-editing .pan-date .date-btn { width: 24px; }
.pan-editing .pan-chk input { width: auto; margin: 0; }
/* Check boxes (like the PDF), also Probationary/Regular */
.pan-editing .pan-chk input[type=radio], .pan-editing .pan-chk input[type=checkbox] {
  appearance: none; -webkit-appearance: none; width: 12px; height: 12px; padding: 0;
  border: 1px solid #222; border-radius: 1px; background: #fff; cursor: var(--cur-ptr, pointer);
  display: inline-grid; place-content: center; flex: none;
}
.pan-editing .pan-chk input:checked::before {
  content: "✓"; font-size: 11px; line-height: 1; font-weight: 700; color: #111;
}
.pan-editing .pan-chk input:focus-visible { outline: 2px solid var(--orange-strong); }
/* Print page */
.pan-print-body { display: block; background: #eee; }
.pan-print-bar { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px; }
@media print {
  .pan-print-body { background: #fff !important; display: block; }
  .pan-print-bar { display: none; }
  .pan-doc { width: auto; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .pan-doc th.pan-sec { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* On paper: like writing, not an input */
  .pan-editing .pan-in, .pan-editing .date-text { background: transparent !important; outline: 0 !important; }
  .pan-editing ::placeholder { color: transparent !important; }
  .pan-doc .date-btn { display: none !important; }
  /* A4: bigger letters and rows to fill the page (still one page) */
  /* Measured: ~281mm high at 198mm wide (A4 with 6mm/5mm margins = 286mm) */
  .pan-doc { break-inside: avoid; font-size: 12px; line-height: 1.3; }
  .pan-doc th { font-size: 11px; }
  .pan-doc .pan-sm { font-size: 9px; }
  .pan-doc .pan-cell { height: 26px; }
  .pan-doc table { margin-top: 8px; }
  .pan-head .pan-logo img { max-height: 52px; }
  .pan-head .pan-co { font-size: 18px; }
  .pan-head .pan-title { font-size: 13.5px; }
  .pan-created { font-size: 12px; }
  .pan-editing .pan-in, .pan-editing .date-text { font-size: 12px; }
  .pan-info th.left { height: 36px; font-size: 11px; }
  .pan-checks { height: 120px; }
  .pan-chk { font-size: 11.5px; }
  .pan-sign .pan-cap { font-size: 10.5px; }
  .pan-sign .pan-signee { height: 54px; }
  .pan-sign .pan-name, .pan-sign .pan-role { font-size: 11.5px; }
}

/* ---------- Deduction History (Statement of Deductions) ---------- */
.hist-lookup { margin-bottom: 14px; }
.hist-lookup .date-field { width: 150px; }
.hist-lookup .date-field .date-text { width: 100%; }
.hist-empty { max-width: 760px; }
.hist-empty p { margin: 0; }
/* Statement: clean, pastel, follows the company color */
.stmt {
  max-width: 920px; margin: 0 0 28px; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); color: var(--text);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.stmt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stmt .strong { font-weight: 700; }
.stmt .peso { font-weight: 500; opacity: .55; margin-right: 1px; }
.stmt-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.stmt-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 28px; background: linear-gradient(120deg, var(--hero-a) 0%, var(--hero-b) 100%);
  border-bottom: 1px solid var(--line);
}
.stmt-brand { display: flex; align-items: center; gap: 14px; }
.stmt-brand img { height: 44px; background: #fff; border-radius: 10px; padding: 5px 8px; }
.stmt-co { font-size: 17px; font-weight: 800; color: var(--side-text); letter-spacing: .2px; }
.stmt-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--brand-sub); margin-top: 2px; }
.stmt-asof { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.stmt-asof span { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--group-text); font-weight: 700; }
.stmt-asof strong { font-size: 18px; color: var(--side-text); }
.stmt-emp { display: flex; align-items: center; gap: 16px; padding: 18px 28px 6px; }
.stmt-photo {
  width: 64px; height: 64px; border-radius: 16px; overflow: hidden; flex: none; background: var(--head);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: var(--photo-icon);
}
.stmt-photo img { width: 100%; height: 100%; object-fit: cover; }
.stmt-name { font-size: 20px; font-weight: 800; letter-spacing: .1px; }
.stmt-meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; color: var(--label-text); margin-top: 2px; }
.stmt-meta span + span::before { content: "•"; color: var(--orange); margin: 0 8px; }
.stmt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 28px 4px; }
.kpi {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px;
  background: var(--soft); border: 1px solid var(--line);
}
.kpi strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--group-text); }
.kpi-sub { font-size: 11.5px; color: var(--muted); }
.kpi-main { background: var(--accent-soft); border-color: transparent; }
.kpi-main strong { color: var(--accent); font-size: 20px; }
.kpi-main .kpi-label { color: var(--accent); }
.kpi-bar, .mini-bar { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 3px 0 1px; }
.kpi-bar i, .mini-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); opacity: .75; }
.mini-bar { width: 70px; margin-left: auto; height: 5px; }
.mini-bar.big { width: 180px; height: 7px; margin: 0; }
.stmt-h {
  margin: 20px 28px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--orange-strong); break-after: avoid;
}
.stmt-table { width: calc(100% - 56px); margin: 0 28px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.stmt-table th {
  background: var(--head); color: var(--th-text); font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; text-align: left; padding: 8px 10px; white-space: nowrap;
}
.stmt-table th:first-child { border-radius: 10px 0 0 10px; }
.stmt-table th:last-child { border-radius: 0 10px 10px 0; }
.stmt-table thead th, .stmt-table thead th.num { text-align: center; vertical-align: middle; }
.stmt-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.stmt-table td.wrap { white-space: normal; width: 100%; }
.stmt-table tfoot td { border-bottom: 0; border-top: 2px solid var(--line-strong); font-weight: 800; padding-top: 10px; }
.stmt-link { color: var(--text); font-weight: 700; }
.stmt-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.stmt-pill.is-run { background: #fff1dc; color: #9a5b00; }
.stmt-pill.is-done { background: #e3f4ea; color: #1f6b3d; }
.stmt-pill.is-wait { background: #eaf1fa; color: #2f5d86; }
.stmt-item { margin: 0 28px 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; break-after: avoid; }
.item-title { font-size: 15px; font-weight: 800; }
.item-facts {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  margin: 12px 0 10px; padding: 10px 12px; background: var(--soft); border-radius: 10px;
}
.item-facts dt { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--group-text); }
.item-facts dd { margin: 1px 0 0; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.item-progress { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--label-text); margin-bottom: 10px; }
.item-remarks { margin: -2px 0 10px; font-size: 12px; color: var(--label-text); }
.sched-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; align-items: start; }
.sched-cols.cols-1 .sched { max-width: 480px; }
.sched-cols.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sched-cols.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sched { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.sched th {
  font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--group-text);
  text-align: left; padding: 4px 8px; border-bottom: 1.5px solid var(--line-strong);
}
.sched th.num { text-align: right; }
.sched td { padding: 3.5px 8px; border-bottom: 1px solid var(--line); }
.sched tr.is-up td { color: var(--muted); }
.sched tr.is-next td { background: var(--hover); color: var(--text); font-weight: 700; }
.sched td.mark { width: 1%; text-align: center; white-space: nowrap; }
.sched td, .sched th { white-space: nowrap; }
.sched .tick { color: var(--accent); font-weight: 800; }
.sched .next-tag { font-weight: 800; color: var(--orange-strong); }
.stmt-foot { margin: 8px 28px 0; padding: 14px 0 24px; border-top: 1px solid var(--line); }
.stmt-note { margin: 0 0 30px; font-size: 11.5px; color: var(--muted); }
.stmt-note .print-legend { display: none; }
.stmt-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.stmt-sign > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sign-line { align-self: stretch; text-align: center; border-top: 1px solid var(--text); padding-top: 5px; font-weight: 700; font-size: 12.5px; }
@media (max-width: 800px) {
  .stmt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sched-cols.two { grid-template-columns: 1fr; }
  .stmt-table { display: block; overflow-x: auto; }
}
@media print {
  .stmt { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .stmt-head { border-radius: 14px; }
  .stmt-head, .stmt-emp, .stmt-kpis, .stmt-table, .stmt-h, .stmt-item, .stmt-foot { margin-left: 0; margin-right: 0; }
  .stmt-emp, .stmt-kpis { padding-left: 0; padding-right: 0; }
  .stmt-table { width: 100%; }
  .stmt-table thead { display: table-header-group; }
  .stmt-table tr, .sched tr, .kpi, .stmt-emp, .stmt-head, .stmt-sign, .item-facts { break-inside: avoid; }
  .stmt-link { text-decoration: none; }
  /* Keep the key figures on paper; leave the longer repeated details on screen. */
  .stmt-who .stmt-meta + .stmt-meta,
  .item-head .stmt-sub, .item-head .stmt-pill, .item-progress,
  .item-facts > div:not(.print-detail), .stmt-note .screen-note { display: none; }
  .stmt-note .print-legend { display: inline; }
  .stmt-head { padding: 7px 12px; }
  .stmt-brand img { height: 30px; padding: 3px 5px; }
  .stmt-co { font-size: 13px; }
  .stmt-kicker, .stmt-asof span { font-size: 9px; }
  .stmt-asof strong { font-size: 13px; }
  .stmt-emp { gap: 8px; padding-top: 7px; padding-bottom: 4px; }
  .stmt-photo { width: 42px; height: 42px; border-radius: 7px; font-size: 16px; }
  .stmt-name { font-size: 15px; }
  .stmt-meta { font-size: 10px; }
  .stmt-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px 0 2px; }
  .kpi { min-width: 0; gap: 1px; padding: 5px 7px; border-radius: 7px; }
  .kpi-label { font-size: 8px; letter-spacing: .2px; }
  .kpi strong, .kpi-main strong { font-size: 12px; }
  .kpi-sub { font-size: 9px; }
  .kpi-bar { height: 3px; margin: 1px 0 0; }
  .stmt-h { margin-top: 9px; margin-bottom: 4px; font-size: 10px; }
  .stmt-table { font-size: 9px; }
  .stmt-table th { font-size: 8px; padding: 4px 5px; letter-spacing: 0; }
  .stmt-table td { padding: 4px 5px; }
  .stmt-table tfoot td { padding-top: 5px; }
  .stmt-sub, .stmt-pill { font-size: 9px; }
  .stmt-pill { padding: 1px 5px; }
  .stmt-item { padding: 6px 8px; margin-bottom: 6px; }
  .item-title { font-size: 11px; }
  .item-facts { justify-content: flex-start; gap: 12px; margin: 3px 0 4px; padding: 3px 6px; }
  .item-facts dt { font-size: 8px; }
  .item-facts dd { font-size: 10px; }
  .item-remarks { margin: 0 0 4px; font-size: 10px; }
  .sched { font-size: 9px; }
  .sched td { padding: 1px 4px; line-height: 1.2; }
  .sched th { font-size: 8px; padding: 2px 4px; letter-spacing: 0; }
  .stmt-foot { margin-top: 6px; padding: 7px 0 0; }
  .stmt-note { margin-bottom: 14px; font-size: 9px; }
  .stmt-sign { gap: 30px; }
  .sign-line { font-size: 10px; padding-top: 3px; }
}

/* Placeholder (hal. DTR) */
.placeholder { text-align: center; padding: 48px 24px; max-width: 560px; }
.placeholder svg { width: 52px; height: 52px; fill: none; stroke: var(--orange-strong); stroke-width: 1.6; }
.placeholder h2 { margin: 10px 0 4px; }
.placeholder p { margin: 0; }

/* ---------- Login / accounts: simple, elegant, pastel ---------- */
body.bare {
  --ink: #3b3650; --ink-soft: #6f6a85; --accent-pastel: #b9b0e6; --accent-deep: #6c61b8;
  background:
    radial-gradient(900px 520px at 0% 0%, #fde6dc 0%, transparent 60%),      /* peach */
    radial-gradient(800px 520px at 100% 0%, #e7e2fb 0%, transparent 62%),    /* lavender */
    radial-gradient(900px 600px at 50% 110%, #dcf1e8 0%, transparent 60%),   /* mint */
    #fbf9f7;
}
body.bare .btn-primary {
  background: linear-gradient(135deg, #c9bff2, #b6d9ea); border: 0; color: var(--ink); font-weight: 700;
  letter-spacing: .3px; box-shadow: 0 6px 18px rgba(108,97,184,.18);
}
body.bare .btn-primary:hover { filter: brightness(1.03); }
body.bare .field .label { color: var(--ink-soft); }
body.bare .field input { background: #fdfcfe; border-color: #e6e1f1; border-radius: 10px; }
body.bare .field input:focus { border-color: var(--accent-pastel); box-shadow: 0 0 0 4px rgba(185,176,230,.28); }
body.bare .flash-error { background: #fff1f0; border-color: #f7d4d0; }
.auth-wrap { min-height: calc(100vh - 28px); display: flex; align-items: center; justify-content: center; }
.auth-card {
  width: 100%; max-width: 400px; padding: 36px 34px 26px; display: flex; flex-direction: column; gap: 14px;
  background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.9); border-radius: 22px;
  box-shadow: 0 1px 2px rgba(59,54,80,.04), 0 24px 60px rgba(108,97,184,.14);
  backdrop-filter: blur(6px);
}
.auth-card h1 { font-size: 14.5px; margin: 0; font-weight: 600; color: var(--ink-soft); letter-spacing: .3px; }
.auth-card p { margin: 0; }
.auth-card .muted { color: #9a95ab; }
.auth-brand { text-align: center; padding-bottom: 18px; border-bottom: 1px solid #efebf6; }
.brand-mark { width: 52px; height: 52px; margin: 0 auto 14px; display: block; }
.brand-mark rect { fill: url(#brand-grad); }
.brand-mark path { fill: none; stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-title {
  font: 600 26px/1.2 Georgia, "Times New Roman", serif; letter-spacing: .3px; color: var(--ink);
}
.brand-sub {
  margin-top: 7px; font-size: 11px; font-weight: 600; letter-spacing: 3.6px; text-transform: uppercase;
  color: var(--accent-deep); padding-left: 3px;
}
/* thin line in the (pastel) colors of the companies and outsource groups */
.brand-rule { display: flex; justify-content: center; gap: 5px; margin-top: 16px; }
.brand-rule i { width: 18px; height: 4px; border-radius: 4px; }
.brand-rule i:nth-child(1) { background: #f4c7ae; }
.brand-rule i:nth-child(2) { background: #b9e1cf; }
.brand-rule i:nth-child(3) { background: #efc0ca; }
.brand-rule i:nth-child(4) { background: #bccfee; }
.brand-rule i:nth-child(5) { background: #eedfa8; }

/* ---------- Item lines (Job Order, Delivery Receipt) ---------- */
.items-block { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.items-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; }
.items-head h2.section { margin: 0; }
.items-block.has-error .items-wrap { border-color: var(--danger); }
.items-block > .error { display: block; margin-bottom: 6px; }
.items-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 10px; margin-bottom: 8px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.items-table th {
  background: var(--head); color: var(--th-text); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; padding: 7px 6px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-strong);
}
.items-table th.num { text-align: right; }
.items-table td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.items-table td input, .items-table td select {
  width: 100%; min-width: 0; padding: 5px 6px; font: inherit; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text);
}
.items-table td input:hover, .items-table td select:hover { border-color: var(--input-line); }
.items-table td input:focus, .items-table td select:focus {
  outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px var(--focus);
}
.items-table td.num input { text-align: right; }
.items-table .it-calc { color: var(--accent); font-weight: 700; background: transparent !important; border: 0 !important; }
.items-table .line-no { width: 30px; color: var(--muted); }
.items-table td.done { color: var(--accent); font-weight: 700; padding-right: 10px; }
.items-table tfoot td { background: var(--soft); font-weight: 700; padding: 6px 10px; text-align: right; }
.items-table tfoot td:first-child { text-align: left; }
.it-remove {
  border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: var(--cur-ptr, pointer); padding: 2px 6px;
  border-radius: 6px;
}
.it-remove:hover { color: var(--danger); background: #fdecea; }

/* ---------- Employee workflow: Update Request, History, Approvals ---------- */
.field.locked .label { color: var(--muted); font-weight: 500; }
.locked-input { background: #f4f2ee !important; color: var(--muted) !important; border-style: dashed !important;
                cursor: not-allowed; }
.field.chosen input, .field.chosen select { border-color: var(--orange); box-shadow: 0 0 0 3px var(--focus); }
.field.chosen .label { color: var(--active-text); }
.eff-field .label { color: var(--active-text); }
.eff-field input { border-color: var(--orange) !important; }
.need-acct, .hist-mark {
  display: inline-block; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .2px; white-space: nowrap; vertical-align: 1px;
}
.need-acct { background: #fdf1d8; color: #8a5a07; border: 1px solid #f1dcae; }
.hist-mark { background: var(--head); color: var(--active-text); border: 1px solid var(--brand-tint); }
.upd-choose { padding: 18px 20px; }
.upd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px 18px; }
.upd-grid fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; }
.upd-grid legend { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
                   color: var(--orange-strong); padding: 0 6px; }
.upd-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13px; cursor: var(--cur-ptr, pointer);
            border-radius: 6px; flex-wrap: wrap; }
.upd-item:hover { background: var(--hover); }
.upd-item input { accent-color: var(--orange); width: 15px; height: 15px; }
.hist-card { padding: 16px 20px; margin-top: 14px; }
.hist-asof { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.asof-values { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: 10px; }
.asof-values div { display: flex; flex-direction: column; min-width: 110px; }
.asof-values span { font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.asof-values strong { font-size: 13.5px; font-weight: 600; }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px 22px; margin-top: 10px; }
.hist-table td, .hist-table th { padding: 6px 10px; }
.hist-table tr.current td { background: var(--accent-soft); }
.hist-table tr.future td { font-style: italic; }
.hist-table .chip { font-size: 10.5px; margin-left: 4px; padding: 0 6px; }
.hist-table td.hist-up { color: #1a7f37; font-weight: 600; }
.hist-table td.hist-down { color: #c0392b; font-weight: 600; }
.emp-stat.is-pending { text-decoration: none; color: inherit; border-style: dashed; }
.emp-stat.is-pending strong { color: #8a5a07; }
.ok-text { color: #1b6b62; font-weight: 700; }
tr.my-turn td { background: #fff8e6; }

/* ---------- Admin home: HR / Payroll / Accounting ---------- */
body.home-page { background:
  radial-gradient(900px 500px at 0% 0%, var(--brand-tint) 0%, transparent 55%),
  radial-gradient(800px 500px at 100% 100%, var(--head) 0%, transparent 60%), var(--bg); }
body.home-page main { padding: 0 28px 40px; }
.home-wrap { max-width: 1100px; margin: 0 auto; padding-top: 7vh; }
.home-hello { text-align: center; margin-bottom: 30px; }
.home-hello h1 { font-size: 28px; font-weight: 600; margin-top: 6px; }
.home-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.home-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 30px 28px 24px; min-height: 290px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; color: var(--text);
  box-shadow: 0 1px 2px rgba(24,24,24,.04), 0 14px 38px rgba(24,24,24,.07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--orange);
                   box-shadow: 0 2px 4px rgba(24,24,24,.05), 0 22px 50px rgba(24,24,24,.12); }
.home-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 22px 22px 0 0;
                     background: var(--card-accent); }
.home-hr { --card-accent: linear-gradient(90deg, #f4c7ae, #efc0ca); --icon-bg: #fdf0e8; --icon-fg: #b0613a; }
.home-payroll { --card-accent: linear-gradient(90deg, #b9e1cf, #bccfee); --icon-bg: #eaf6f0; --icon-fg: #2f7a5f; }
.home-acct { --card-accent: linear-gradient(90deg, #c9bff2, #9fd3e6); --icon-bg: #efedfb; --icon-fg: #5b51a8; }
.home-admin { --card-accent: linear-gradient(90deg, #f4d3a0, #e8b48a); --icon-bg: #fdf3e4; --icon-fg: #8a5a1e; }
.home-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--icon-bg); }
.home-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--icon-fg); stroke-width: 2.4;
                 stroke-linecap: round; stroke-linejoin: round; }
.home-title { font: 600 24px/1.2 Georgia, "Times New Roman", serif; margin-top: 6px; }
.home-text { color: var(--muted); font-size: 13.5px; }
.home-stats { display: flex; gap: 18px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.home-stats span { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.home-stats strong { font-size: 20px; font-weight: 650; color: var(--text); }
.home-note { margin-top: auto; font-size: 12px; color: var(--muted); font-style: italic; }
.home-go { align-self: flex-end; font-size: 13px; font-weight: 700; color: var(--icon-fg); }
@media (max-width: 900px) { .home-cards { grid-template-columns: 1fr; } .home-card { min-height: 0; } }

/* ---------- Users & Roles ---------- */
.add-user { padding: 12px 16px; margin-bottom: 14px; }
.add-user summary { list-style: none; cursor: var(--cur-ptr, pointer); }
.add-user summary::-webkit-details-marker { display: none; }
.add-user-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; margin-top: 14px; }
.add-user-form .full { grid-column: 1 / -1; }
.user-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; align-content: start; }
.user-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.user-card-head { display: flex; align-items: center; gap: 12px; }
.user-card .user-avatar { width: 38px; height: 38px; }
.user-id { min-width: 0; }
.user-id code { margin-left: 4px; }
/* (2026-11-11) names only; click to open the details */
details.user-card { padding: 0; display: block; }
details.user-card > summary { list-style: none; cursor: var(--cur-ptr, pointer); padding: 11px 16px; margin: 0; }
details.user-card > summary::-webkit-details-marker { display: none; }
details.user-card > summary::marker { content: ""; }
details.user-card > summary:hover { background: var(--hover, rgba(0,0,0,.02)); }
details.user-card[open] > summary { border-bottom: 1px solid var(--line); }
.user-caret { color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
details.user-card[open] .user-caret { transform: rotate(90deg); }
.user-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.user-access { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; align-items: end; }
.user-access .co-field { grid-column: 1 / -1; }
.user-access button { justify-self: start; }
.co-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.co-checks label { display: inline-flex; align-items: center; gap: 6px; cursor: var(--cur-ptr, pointer); }
.co-checks input, .perm input { accent-color: var(--orange); width: 15px; height: 15px; }
.pw-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line); }
.pw-form .label { font-size: 12px; font-weight: 600; color: var(--label-text); }
.role-card { padding: 14px 18px; margin-bottom: 14px; }
.role-card.is-admin { background: var(--soft); }
.role-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.role-head h2 { margin: 0; }
.role-head > .muted { white-space: nowrap; }
/* who has the role: display name + user name */
.role-users { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12.5px; }
.role-users .label { font-weight: 600; color: var(--label-text); margin-right: 2px; }
.role-users .chip { font-size: 12.5px; }
.role-users .chip .muted { font-weight: 500; margin-left: 4px; }
.role-users .chip:hover { text-decoration: none; border-color: var(--orange); }
.role-name { font-size: 16px; font-weight: 650; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px;
             background: transparent; min-width: 240px; }
.role-name:hover, .role-name:focus { border-color: var(--input-line); background: #fff; }
.perm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.perm-grid fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin: 0; }
.perm-grid legend { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
                    color: var(--orange-strong); padding: 0 6px; }
.perm { display: flex; align-items: flex-start; gap: 8px; padding: 4px 2px; font-size: 12.5px; cursor: var(--cur-ptr, pointer); border-radius: 6px; }
.perm:hover { background: var(--hover); }
.perm input { margin-top: 2px; flex: none; }
.add-role { display: flex; align-items: flex-end; gap: 12px; padding: 14px 18px; }
/* Roles & Permissions: the users on the left; click one, its ticks on the right */
.pick-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 18px; }
.pick-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 8px; }
.pick-title { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--orange-strong);
              padding: 4px 8px 6px; }
.pick-user { display: block; padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; color: inherit; font-size: 13px;
             line-height: 1.3; }
a.pick-user:hover { background: var(--hover); text-decoration: none; }
.pick-user.active { background: var(--soft); border-color: var(--orange); }
.pick-user.is-admin { opacity: .65; }
.pick-user .muted { font-size: 12px; }
.pick-what { display: block; font-size: 11.5px; color: var(--muted); }
.pick-empty { padding: 28px 22px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.pick-panel .perm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roles-section > summary { list-style: none; cursor: var(--cur-ptr, pointer); display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.roles-section > summary::-webkit-details-marker { display: none; }
.roles-section[open] > summary .btn { background: var(--soft); border-color: var(--orange); }
@media (max-width: 1100px) { .pick-layout { grid-template-columns: 1fr; } .pick-list { position: static; }
                             .pick-panel .perm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* one user: the user's own ticks */
.perm-source { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 14px; font-size: 13px; }
.perm-source.is-own { background: var(--soft); }
.user-perms .role-head { flex-wrap: wrap; }
.user-perms .co-field { margin: 4px 0 14px; }
.user-perms .form-actions { margin-top: 14px; }
.perm-copy { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.perm-copy .label { font-weight: 600; color: var(--label-text); }
.perm-copy select { width: auto; padding: 5px 8px; }
.user-card-head .user-name { color: inherit; }
.user-card-head .user-name:hover strong { color: var(--orange-strong); }
.user-access .own-note { grid-column: 1 / -1; margin: 0; }
.user-access .actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.role-users .chip .own { color: var(--orange-strong); font-weight: 600; margin-left: 4px; }
@media (max-width: 1100px) { .perm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
                             .user-cards { grid-template-columns: 1fr; } }

/* ---------- Job Order View ---------- */
.jo-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 22px; padding: 16px 20px;
           margin-bottom: 18px; }
.jo-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jo-head div.wide { grid-column: 1 / -1; }
.jo-head span { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.jo-head strong { font-size: 14.5px; font-weight: 600; }
.jo-h { margin: 6px 0 8px; }
.jo-items tfoot td { background: var(--soft); font-weight: 700; padding: 8px 10px; }
.pend { color: #9a6a12; font-weight: 700; }
.jo-head .chip, h1 .chip { vertical-align: middle; font-size: 12px; margin-left: 6px; }
@media (max-width: 900px) { .jo-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- DTR rules per Day Type ---------- */
.rule-grid { width: auto; min-width: 560px; margin-top: 6px; }
.rule-grid td, .rule-grid th { padding: 5px 12px; }
.need-chip { display: inline-block; min-width: 62px; padding: 1px 8px; border-radius: 99px; text-align: center;
             font-size: 11.5px; font-weight: 700; }
.need-chip-yes { background: var(--accent-soft); color: #1b6b62; }
.need-chip-no { background: #f3f1ef; color: #9a8f86; }
.need-chip-depends { background: #fdf1d8; color: #9a6a12; }
.field.need-yes .label::after { content: " *"; color: var(--danger); font-style: normal; }
.field.need-no { opacity: .45; }
.field.need-no input, .field.need-no select { background: #f5f3f1; cursor: not-allowed; }

.auth-brand .company { font-size: 18px; font-weight: 800; color: var(--side-text); letter-spacing: .3px; }
.auth-brand .app-name {
  margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--brand-sub);
}
.btn-block { width: 100%; }
.center { text-align: center; }
.message-card { max-width: 460px; }
.message-card h1 { margin-bottom: 6px; }
code { background: var(--head); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.error { color: var(--danger); font-weight: 600; }
.note { margin-top: 12px; }

.user-box { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--head); color: var(--brand-sub); font-weight: 800;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-meta strong { font-size: 13.5px; }
.user-meta span { font-size: 11px; color: var(--group-text); }
.user-links { display: flex; align-items: center; gap: 14px; font-size: 12px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-links a { color: var(--side-text); }
.user-links form { margin: 0; }
.user-links .link-danger { font-size: 12px; font-weight: 600; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input { width: 150px; padding: 6px 9px; }

/* ---------- Upload ---------- */
.upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.upload-grid .card { margin: 0; }
.step { position: relative; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.step h2 { margin: 0; font-size: 15px; }
.step p { margin: 0; }
.step input[type=file] { padding: 7px; }
.step-no {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--orange); color: var(--orange-text); font-weight: 800;
}
ul.tight { margin: 0; padding-left: 18px; }
ul.tight li { margin-bottom: 3px; }
.radio-group { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.radio-group .label { font-weight: 600; color: var(--label-text); }
.radio-group label { display: flex; gap: 6px; align-items: center; cursor: var(--cur-ptr, pointer); }
.radio-group input { width: auto; }
.result h2 { margin-bottom: 8px; }
.result.ok { border-color: #b6e0d9; }
.result.bad { border-color: #f5c2bc; }
.result.bad h2 { color: var(--danger); }
.result .table-wrap { max-height: 320px; overflow-y: auto; margin-top: 10px; box-shadow: none; }
.stats { display: flex; gap: 14px; margin: 6px 0 16px; }
.stats div {
  flex: 1; max-width: 200px; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-soft); display: flex; flex-direction: column;
}
.stats strong { font-size: 24px; color: var(--accent); }
/* For Checking: pastel pink = what to update (the list, the Edit form and the employee's page) */
:root { --check-bg: #ffe6ee; --check-line: #f4b6c8; --check-text: #8a3154; }
.check-list { margin: 0; padding: 0; list-style: none; font-size: 12.5px; display: flex; flex-direction: column;
  gap: 3px; align-items: flex-start; }
.check-list li { padding: 2px 9px; border-radius: 7px; background: var(--check-bg); border: 1px solid var(--check-line);
  color: var(--check-text); }
.check-legend { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px;
  background: var(--check-bg); border: 1px solid var(--check-line); color: var(--check-text); font-size: 12px;
  font-weight: 600; white-space: nowrap; }
.check-legend i { width: 10px; height: 10px; border-radius: 3px; background: #f9bfd0; border: 1px solid var(--check-line); }
.page-head > .check-legend { margin-right: 8px; }
/* DTR For Checking: the uploaded rows with a problem; pink = the cell to correct */
.grid.dtr-check td.to-check { background: var(--check-bg); box-shadow: inset 0 0 0 1px var(--check-line); font-weight: 600; }
.grid.dtr-check td.wrap { min-width: 120px; }
.grid.dtr-check .check-list li b { font-weight: 700; }
.result .to-check-link { margin-right: 8px; }
/* DTR For Checking: its three parts; the rules as a tidy list */
.check-h { font-size: 15px; margin: 22px 0 6px; display: flex; align-items: baseline; gap: 10px; }
.dtr-notes { padding: 6px 18px; }
.dtr-notes dl { margin: 0; }
.dtr-notes dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.dtr-notes dl > div:first-child { border-top: 0; }
.dtr-notes dt { font-weight: 700; color: var(--label-text); }
.dtr-notes dd { margin: 0; }
.grid.dtr-missing td.wrap { white-space: normal; }
.dtr-missing-link { display: inline-block; margin: 0 2px 8px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px;
  background: var(--check-bg); border: 1px solid var(--check-line); color: var(--text); }
.dtr-missing-link:hover { text-decoration: none; border-color: var(--orange); }
/* Deductions: one loan / deduction (schedule, hold / stop / pay in full) */
.ded-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.ded-grid .card, .ded-sched, .ded-form { padding: 14px 18px; }
.ded-sum { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 13.5px; }
.ded-sum th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--th-text); text-align: left; padding: 4px 8px; }
.ded-sum th.num, .ded-sum td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ded-sum td { padding: 6px 8px; border-top: 1px solid var(--line); }
.ded-sum tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.ded-req { padding: 8px 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ded-req:first-of-type { border-top: 0; }
.ded-req form { margin: 0; }
.ded-side.is-pending { color: var(--orange-strong); font-weight: 600; }
.ded-side.is-approved { color: var(--ok, #1f7a3d); }
.ded-side.is-none { color: var(--muted); }
.ded-log td.nowrap { white-space: nowrap; }
.ded-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ded-form { display: flex; flex-direction: column; gap: 8px; }
.ded-form .btn { align-self: flex-start; margin-top: 4px; }
.ded-delete { max-width: 460px; margin-bottom: 14px; scroll-margin-top: 130px; }
.ded-delete h2 { color: var(--danger); }
.ded-cuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; }
.ded-cuts label { display: inline-flex; align-items: center; gap: 6px; cursor: var(--cur-ptr, pointer); }
.ded-cuts input { width: 15px; height: 15px; accent-color: var(--orange); }
.ded-pay { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 9px; background: var(--soft); }
.ded-pay strong { font-size: 20px; }
.ded-sched { margin-bottom: 14px; }
.ded-sched .table-wrap { box-shadow: none; max-height: 460px; overflow-y: auto; margin-top: 8px; }
.grid tr.ded-done td { color: var(--muted); }
.grid tr.ded-next td { background: var(--soft); font-weight: 600; }
.grid tr.ded-hold td, .grid tr.ded-cancelled td { color: var(--muted); font-style: italic; }
.ded-reject { display: flex; gap: 4px; align-items: center; }
.ded-reject input { width: 130px; padding: 4px 8px; font-size: 12px; }
.stmt-pill.is-stop { background: #fde2e2; color: var(--danger); }
.sched tr.is-off td { color: var(--muted); font-style: italic; }
@media (max-width: 1000px) { .ded-grid { grid-template-columns: 1fr; } }
.field.needs-update input, .field.needs-update select { background: var(--check-bg); border-color: var(--check-line); }
.field.needs-update .label { color: var(--check-text); }
.field small.check-note { color: var(--check-text); font-weight: 600; }
.profile-body dt.needs-update, .profile-body dd.needs-update { background: var(--check-bg); color: var(--check-text); }
.profile-body dt.needs-update { margin: -3px -8px -3px -6px; padding: 3px 8px 3px 6px; border-radius: 6px 0 0 6px; }
.profile-body dd.needs-update { margin: -3px -6px -3px -8px; padding: 3px 6px 3px 8px; border-radius: 0 6px 6px 0; }
.check-box { margin: 0 0 14px; }
.check-box ul { margin: 6px 0 0; padding-left: 18px; }
/* Employees: Total / Active / Inactive */
/* (2026-11-16: "same size mo ang mga box para malinis tignan") every box as wide as the widest (one row; 2 a row on a phone) */
.emp-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: max-content; max-width: 100%; gap: 8px;
  margin: -4px 0 10px; }
@media (max-width: 600px) { .emp-stats { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); width: auto; } }
.emp-stat {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.emp-stat span { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--group-text); }
.emp-stat strong { font-size: 20px; font-weight: 800; color: var(--text); }
.emp-stat.is-active strong { color: var(--accent); }
.emp-stat.is-inactive strong { color: var(--muted); }
.day-codes h2 { margin: 0 0 10px; font-size: 15px; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 18px; font-size: 13px; }
.code-grid div { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.code-grid b { min-width: 68px; color: var(--active-text); }
.stats span { font-size: 12px; color: var(--muted); }

/* Print-only header for documents/reports */
.print-report-head { display: none; }
@media print {
  .print-report-head { display: block; text-align: center; margin-bottom: 14px; }
  .print-report-head h1 { font-size: 18px; margin: 0; }
  .print-report-head h2 { font-size: 14px; margin: 2px 0; }
  .print-report-head p { margin: 0; color: var(--muted); }
}
/* ---------- Responsive / print ---------- */
@media (max-width: 1100px) {
  .upload-grid { grid-template-columns: 1fr; }
  .form-card.compact .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-body { grid-template-columns: 1fr; }
  .profile-body section { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 800px) {
  .app-bar { flex-wrap: wrap; gap: 10px; }
  .emp-layout { grid-template-columns: 1fr; }
  .photo-panel { border-right: 0; padding-right: 0; }
  .form-card.compact .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .field.wide { grid-column: auto; }
  .toolbar input[type=search] { width: 100%; }
  main { padding: 16px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}
@media print {
  .app-bar, body > nav, .toolbar, .actions, .page-head .btn, .head-actions { display: none; }
  .table-wrap, .card { border: 0; box-shadow: none; }
  .table-wrap { max-height: none; overflow: visible; }
  .print-header { display: block; font-weight: 800; font-size: 16px; margin-bottom: 6px; }
}

/* Payroll Report */
.payroll-summary { margin-top: 4px; }
.payroll-note { margin: -4px 0 12px; }
.payroll-grid th, .payroll-grid td.num { white-space: nowrap; }
.payroll-grid td.small { min-width: 120px; }
/* ---------- Medical Claims ---------- */
.chip.med-pending_approval { background: #fff4d6; border-color: #ecd596; color: #7a5a00; }
.chip.med-approved { background: #e6f4ea; border-color: #b9dcc3; color: #1f6b3a; }
.chip.med-replenished { background: #eef4fb; border-color: #c9dcf0; color: #2f5d86; }
.chip.med-rejected { background: #fdeaea; border-color: #f0c2c2; color: #a02828; }
.med-info { padding: 8px 12px; border-radius: 9px; background: #eef4fb; border: 1px solid #c9dcf0; color: #2f5d86;
  font-size: 12.5px; line-height: 1.5; }
.med-info .bad { color: var(--danger); font-weight: 600; }
.med-warn { color: var(--danger); font-size: 12.5px; margin: 4px 0 0; }
.receipt-list { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.receipt-list li { display: flex; gap: 10px; align-items: baseline; }
.decide-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; margin-top: 14px; }
.decide-card .reject-form { display: flex; gap: 8px; flex: 1; min-width: 280px; }
.decide-card .reject-form input { flex: 1; }
.decide-card button[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cash Vaults ---------- */
.vault-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 22px; }
.vault-card { padding: 16px 18px; }
.vault-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.vault-head h2 { margin: 0; font-size: 18px; }
.vault-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.vault-lines dt { color: var(--muted); }
.vault-lines dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.chip.vault-bad { background: #fdeaea; border-color: #f0c2c2; color: #a02828; font-weight: 700; }
.vault-diff-bad { color: var(--danger); font-weight: 700; }
.vault-error { margin: 10px 0 0; padding: 8px 12px; border-radius: 9px; background: #fdeaea; border: 1px solid #f0c2c2;
  color: #a02828; font-size: 12.5px; font-weight: 600; }
.vault-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.replenish-form { display: flex; gap: 8px; margin-top: 10px; }
.replenish-form input { flex: 1; min-width: 0; }
.count-layout { display: grid; grid-template-columns: minmax(300px, 460px) minmax(260px, 1fr); gap: 22px; align-items: start;
  margin-bottom: 14px; }
.count-table input { width: 110px; text-align: right; }
.count-table input.bad-input { border-color: var(--danger); }
.count-summary { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.count-result { font-weight: 700; }
.count-result.ok { color: #1f6b3a; }
.count-result.bad { color: var(--danger); }
@media (max-width: 800px) { .count-layout { grid-template-columns: 1fr; } }
.profile-body.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .profile-body.two-col { grid-template-columns: 1fr; } }

/* ---------- Petty Cash Fund ---------- */
.chip.pcr-received, .chip.pc-replenished { background: #eef4fb; border-color: #c9dcf0; color: #2f5d86; }
.chip.pc-for_liquidation { background: #ffdede; border-color: #f4b8b8; color: #9a3030; }      /* pastel red */
.chip.pc-overdue { background: #c0392b; border-color: #c0392b; color: #fff; font-weight: 700; }
.chip.pc-for_approval, .chip.pcr-open { background: #fff4d6; border-color: #ecd596; color: #7a5a00; }
.chip.pc-for_replenishment { background: #e6f4ea; border-color: #b9dcc3; color: #1f6b3a; }
.chip.pc-returned { background: #fdeaea; border-color: #f0c2c2; color: #a02828; }
.emp-stat.is-overdue strong { color: var(--danger); }
.emp-stat .stat-text { font-size: 14px; font-weight: 600; max-width: 420px; }
.check-field .check-line { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13.5px; }
.check-field .check-line input { width: auto; }
.trip-field[hidden] { display: none; }
#liquidate { display: block; padding: 14px 16px; margin-top: 14px; }
#liquidate h2.section { margin-top: 0; }
.liq-scroll { overflow-x: auto; margin: 4px 0 10px; padding-bottom: 4px; }
.liq-table { min-width: 1820px; table-layout: fixed; }
.liq-table th { white-space: nowrap; }
.liq-table th:first-child { width: 28px; }
.liq-table th:last-child { width: 34px; }
.liq-table .c-name { width: 200px; } .liq-table .c-no { width: 76px; } .liq-table .c-item { width: 58px; }
.liq-table .c-qty { width: 58px; } .liq-table .c-unit { width: 58px; } .liq-table .c-details { width: 170px; }
.liq-table .c-date { width: 112px; } .liq-table .c-amount { width: 108px; } .liq-table .c-dept { width: 140px; }
/* Middle alignment + uniform box size for Item No., Receipt Date, Qty, Unit */
.liq-table input[name="ln_item"], .liq-table input[name="ln_qty"],
.liq-table input[name="ln_unit"], .liq-table input[name="ln_receipt_date"],
.liq-table input[name="ln_mr"], .liq-table input[name="ln_mrr"] { text-align: center; width: 100%; }
.liq-table .c-expense { width: 200px; } .liq-table .c-plate { width: 112px; } .liq-table .c-tin { width: 180px; }
.liq-table .c-ewt { width: 100px; } .liq-table .c-seller { width: 240px; }
.liq-table td { vertical-align: middle; }
.liq-table td input[type="text"] { border-color: var(--input-line); background: #fff; }
.liq-table td input[readonly] { background: #f3f1ee; color: var(--muted); }
.liq-table .ln-amount, .liq-table .num-input { text-align: right; }
.liq-table .combo input { padding-right: 30px; }
.liq-table .combo-btn { width: 26px; }
.liq-table .date-btn { width: 28px; }
.liq-table .ewt-cell label { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.liq-table .ewt-cell input[type="checkbox"] { width: 16px; height: 16px; flex: none; }
.liq-table .ewt-cell small { display: block; font-size: 11px; }
.liq-table .ln-ewt-type.error { color: var(--danger); }
.liq-totals { max-width: 520px; margin: 12px 0 0; }
.summary-tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.summary-tabs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text); }
.summary-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.summary-tabs a:hover { text-decoration: none; }
.liquidate-foot { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.liquidate-foot .field { margin: 0; flex: 1; min-width: 240px; }
.summary-grid tr.sum-person td { background: var(--soft); font-weight: 700; }
.summary-grid td.sub { padding-left: 26px; }
.head-actions form { display: inline-flex; margin: 0; }
.grid th.th-wrap { white-space: normal; width: 96px; line-height: 1.25; }
.grid .pc-pcr { display: block; margin-top: 2px; }
.vault-lines .vault-part { font-size: 12.5px; font-weight: 500; padding-left: 14px; color: var(--muted); }
.vault-lines dd.vault-part { padding-left: 0; }

/* Payroll Report: the Close Payroll bar above the sheet (the payroll chosen: open / closed) */
.close-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; padding: 8px 12px;
  border: 1px solid var(--side-border); border-left: 4px solid var(--orange); border-radius: 6px; background: var(--soft); font-size: 13px; }
.close-bar.is-closed { border-left-color: #2e7d32; }
.close-bar .close-text { flex: 1 1 420px; }
.close-bar .close-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.close-bar .close-form input[type=text] { width: 230px; }
/* the sign-off steps before Close Payroll (PAYROLL_APPROVAL, 2026-10-20) */
.close-bar .close-steps { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; }
.close-bar .close-step { padding: 2px 8px; border: 1px solid var(--border, #ccc); border-radius: 10px; }
.close-bar .close-step.is-done { border-color: #2e7d32; color: #2e7d32; }
.stmt-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.stmt-actions .btn-small { padding: 2px 8px; font-size: 11.5px; }
/* Edit / Hold / Stop / More in the head of each loan of the statement (the user, 2026-10-20) */
.item-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.item-head-right .stmt-actions { margin-top: 0; }
.ded-form:target { outline: 2px solid var(--orange-strong); outline-offset: 2px; }
@media print { .stmt-actions { display: none !important; } }
.add-emp-dlg { border: none; border-radius: 10px; padding: 18px 20px 14px; width: min(560px, calc(100vw - 32px));
  box-shadow: 0 12px 40px rgba(0,0,0,.28); background: var(--card); color: var(--text); }
.add-emp-dlg::backdrop { background: rgba(0,0,0,.35); }
.add-emp-dlg h2 { margin: 0 0 12px; font-size: 18px; }
.add-emp-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.add-emp-choice { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; color: var(--text); text-decoration: none; margin: 0; }
a.add-emp-choice:hover { background: var(--hover); }
.add-emp-choice span { font-size: 12.5px; color: var(--label-text); }
.add-emp-choice select { width: 100%; }
.add-emp-foot { text-align: right; margin-top: 12px; }
@media (max-width: 600px) { .add-emp-choices { grid-template-columns: 1fr; } }
.contracts-card .contract-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px;
  align-items: end; margin: 8px 0 14px; }
.contracts-card .contract-form .wide { grid-column: span 2; }
.contracts-card .contract-add summary { cursor: var(--cur-ptr, pointer); font-weight: 700; margin-top: 10px; }
.contracts-card tr.current td { font-weight: 600; }
.close-bar .close-warn { display: block; color: #b3261e; font-weight: 700; margin-top: 2px; }
.close-bar .close-issues { flex: 1 1 100%; color: #b3261e; font-size: 12.5px; line-height: 1.5; }
.close-bar .close-issues details { margin-top: 2px; }
.close-bar .close-issues summary { cursor: var(--cur-ptr, pointer); font-weight: 700; }
.close-bar .close-warn { flex: 1 1 100%; color: #8a5a00; background: #fff6e0; border: 1px solid #f0d9a0; border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; line-height: 1.5; }
.close-bar .close-warn summary { cursor: var(--cur-ptr, pointer); font-weight: 700; }
.close-bar .close-issues ul { margin: 4px 0 4px 18px; padding: 0; color: var(--text); max-height: 220px; overflow: auto; }
.close-bar .close-submitted { flex: 1 1 100%; }
.dtr-submitted-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #8a5a00;
  background: #fff4d6; border: 1px solid #e8c766; border-radius: 6px; padding: 5px 10px; }
@media print { .close-bar { display: none; } }

/* Deductions: Paid Before the System, by cutoff (the page of one loan / deduction) */
.ded-before { padding: 14px 18px; margin-bottom: 14px; }
.ded-before-table { max-width: 720px; margin: 6px 0 10px; }
.ded-before-table form { margin: 0; }
.ded-before-table input, .ded-before-table select { padding: 3px 6px; }
.ded-before-table select.cutoff-pick { width: 110px; }
.ded-before-table input[name=amount] { width: 100px; text-align: right; }
.ded-before-table input[name=remarks] { width: 180px; }
.ded-before-acts { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ded-before-forms { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; }
.ded-before-forms form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.ded-before-add label { display: flex; flex-direction: column; gap: 2px; }
.ded-before-add input[name=amount] { width: 110px; }
.ded-prior-edit { margin: 4px 0 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--side-border); }
.ded-prior-edit label { display: flex; flex-direction: column; gap: 2px; }
.ded-prior-edit input[type=text] { width: 130px; }
.ded-before-add .wide input { width: 220px; }
.ded-before-off { color: #b3261e; font-weight: 700; }
.ded-before-ok { color: #2e7d32; font-weight: 700; }

/* Statement of deductions: the remarks of a cutoff, under its date */
.sched-note { font-size: 10.5px; line-height: 1.25; color: var(--muted); white-space: normal; max-width: 200px; }

/* A search box with suggestions: our own list under the box (Arrow Down / Up, Tab / Enter / click to pick) */
.sugg-menu { position: absolute; left: 0; top: 100%; z-index: 60; min-width: 100%; width: max-content; max-width: 420px;
  max-height: 280px; overflow-y: auto; margin-top: 2px; background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 6px; box-shadow: var(--shadow); }
.sugg-item { padding: 6px 10px; font-size: 13px; font-weight: 500; color: var(--text); cursor: var(--cur-ptr, pointer); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: normal; }
.sugg-item:hover { background: var(--hover); }
.sugg-tag { margin-left: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sugg-item.on { background: var(--accent-soft); color: var(--text); outline: 1px solid var(--accent); }

/* a long text in a form (the Holiday Memo: Message, Notes; 2026-10-21) */
.form-textarea { width: 100%; min-height: 4.5em; padding: 7px 9px; font: inherit; border: 1px solid var(--line); border-radius: 6px;
  background: var(--input-bg, #fff); color: var(--text); resize: vertical; box-sizing: border-box; }

/* the notes of a Holiday Memo: one line = one bullet, each may be red (2026-10-21) */
.bullet-edit .be-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.bullet-edit .be-row::before { content: "\2022"; font-weight: 800; }
.bullet-edit .be-row input[type=text] { flex: 1; }
.bullet-edit .be-row input.red { color: #c00000; }
.bullet-edit .be-red { display: flex; gap: 4px; align-items: center; font-size: 12px; white-space: nowrap; }
.bullet-edit .be-del { border: 0; background: none; font-size: 18px; cursor: var(--cur-ptr, pointer); color: var(--label-text); }

/* My Records (2026-10-21): the tabs of an employee's account, in place of the ribbon */
.me-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 16px; background: var(--card, #fff); border-bottom: 1px solid var(--line, #e5e5e5); }
.me-nav a { padding: 7px 14px; border-radius: 6px; font-weight: 700; text-decoration: none; color: inherit; }
.me-nav a.active { background: var(--orange-strong, #c60); color: #fff; }
.me-head { margin-bottom: 12px; }
/* My Records on a phone (2026-10-21): the heading over the buttons, one column of history tables */
@media (max-width: 700px) {
  .me-nav ~ main .page-head, body:has(.me-nav) .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  body:has(.me-nav) .hist-grid { grid-template-columns: 1fr !important; }
  body:has(.me-nav) .slip-stage { padding: 4px !important; overflow: hidden; }
}
.me-preview { background: #fff4d6; border-bottom: 1px solid #e6c46a; padding: 8px 16px; font-size: 13px; }
.me-preview a { font-weight: 800; margin-left: 10px; }
.refund-after { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 4px; }
.refund-after label { font-size: 13px; font-weight: 400; }

/* a list row that opens a page (the deduction lists, 2026-10-22) */
tr.row-link { cursor: var(--cur-ptr, pointer); }
tr.row-link:hover td, tr.row-link:focus td { background: var(--hover); }
tr.row-link:focus { outline: 2px solid var(--orange-strong); outline-offset: -2px; }
/* the five loan buttons of the Government Loans list */
.loan-seg { display: flex; flex-wrap: nowrap; gap: 0; }
.seg-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 108px;
  height: var(--seg-h, 37px); padding: 0 8px; border: 1px solid var(--line); margin-left: -1px; background: var(--card, #fff);
  color: inherit; text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.seg-btn:first-child { margin-left: 0; border-radius: 6px 0 0 6px; }
.seg-btn:last-child { border-radius: 0 6px 6px 0; }
.seg-btn:hover { background: var(--hover); }
.seg-btn.on { background: var(--orange-strong); border-color: var(--orange-strong); color: #fff; font-weight: 600; }
/* the cutoffs before the system in the Schedule of a loan (2026-10-22) */
.ded-sched tr.ded-b td { background: var(--head); }
.ded-sched tr.ded-b form { margin: 0; }
.ded-sched tr.ded-b input, .ded-sched tr.ded-b select { padding: 3px 6px; }
.ded-sched tr.ded-b select.cutoff-pick { width: 110px; }
.ded-sched tr.ded-b input.amt-in { width: 100px; text-align: right; }
.ded-sched tr.ded-b input[name=remarks] { width: 100%; min-width: 160px; }
.ded-sched .ded-before-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 10px 0 4px; }
.ded-sched .ded-before-add > .strong { align-self: center; }
/* the Refund of a row of the Schedule (2026-10-22) */
.ded-sched .refund-btn { background: none; border: 0; padding: 0; color: var(--orange-strong); font-weight: 600; cursor: var(--cur-ptr, pointer); }
.ded-sched .refund-btn:hover { text-decoration: underline; }
.refund-dlg { border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; max-width: 520px; width: 92vw; }
.refund-dlg::backdrop { background: rgba(0,0,0,.35); }
.refund-dlg h3 { margin: 0 0 6px; }
.refund-dlg .field { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; }
.refund-dlg .refund-after { border: 0; padding: 0; }
/* the two choices = two big buttons, the whole box clickable (the user, 2026-10-22: "mahirap pindutin") */
.refund-dlg .refund-after label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 6px 0;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; cursor: var(--cur-ptr, pointer); line-height: 1.35; }
.refund-dlg .refund-after label:hover { background: var(--hover); }
.refund-dlg .refund-after input[type=radio] { width: 18px; height: 18px; margin: 1px 0 0; flex: none; cursor: var(--cur-ptr, pointer);
  accent-color: var(--orange-strong); }
.refund-dlg .refund-after label:has(input:checked) { border-color: var(--orange-strong); background: var(--head); }
.refund-dlg .dlg-acts { display: flex; gap: 8px; margin-top: 10px; }
.ded-sched > .ded-before-add { margin: 4px 0 10px; }
/* Hold / Change amount / Stop / Pay in full: one card, four buttons, one form open (2026-10-22) */
.ded-acts { padding: 10px 14px; margin-bottom: 14px; }
.ded-acts-bar { display: flex; flex-wrap: wrap; }
.ded-acts-bar .seg-btn { width: auto; min-width: 120px; padding: 0 14px; cursor: var(--cur-ptr, pointer); font: inherit; font-size: 13px; }
.ded-acts .ded-pane { display: none; padding: 10px 0 2px; }
.ded-acts .ded-pane.open { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.ded-acts .ded-pane > p, .ded-acts .ded-pane > .ded-cuts, .ded-acts .ded-pane > .ded-pay { flex-basis: 100%; margin: 0; }
.ded-acts .ded-pane .field { min-width: 220px; }
.ded-acts .ded-pane .btn { align-self: flex-end; margin: 0; }
.ded-acts .ded-pane:target { outline: none; }
/* paid by the company: the deduct back (2026-10-22) */
.ded-sched tr.ded-back td { background: #fff8e8; font-style: italic; }
.ded-sched .back-plan { font-size: 11.5px; color: var(--orange-strong); margin-top: 2px; white-space: normal; }
.ded-sched .back-btn { background: none; border: 0; padding: 0; color: var(--orange-strong); font-weight: 600; cursor: var(--cur-ptr, pointer); }
.ded-sched .back-btn:hover { text-decoration: underline; }
.refund-dlg .back-preview { margin: 8px 0; max-width: 300px; }
/* a B row: text; Edit (the admin) shows its boxes (2026-10-22) */
.ded-sched tr.ded-b .b-edit { display: none; }
.ded-sched tr.ded-b.editing .b-edit { display: inline-block; }
.ded-sched tr.ded-b.editing input[name=remarks].b-edit { display: block; }
.ded-sched tr.ded-b.editing .b-show { display: none; }
.ded-sched tr.ded-b form.b-edit { margin: 0; }
.ded-sched .b-edit-btn, .ded-sched .b-cancel { background: none; border: 0; padding: 0; color: var(--orange-strong); font-weight: 600; cursor: var(--cur-ptr, pointer); }
.ded-sched .b-edit-btn:hover, .ded-sched .b-cancel:hover { text-decoration: underline; }

/* the Company Advance Back column of a loan's Schedule (2026-10-22) */
.ded-sched .back-col { background: #fff8e8; }
.ded-sched th.back-col { line-height: 1.15; }
.ded-sched .back-ok { color: #2e7d32; font-weight: 700; margin-left: 4px; cursor: help; }

/* the Requests of a loan: one button like Hold / Stop, the list under it (2026-10-22) */
.ded-grid:has(> .ded-facts:only-child) { grid-template-columns: minmax(0, 1fr); }
.ded-reqs .ded-pane.open { display: block; }
.ded-reqs .ded-req { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ded-reqs .ded-req:last-child { border-bottom: 0; }
/* the head of a loan's Schedule: the title and Print Schedule (2026-10-22) */
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* the SOA: Company Advance Back, a table of its own under the schedule (2026-10-22) */
.adv-box { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; break-inside: avoid; }
.adv-title { font-size: 12.5px; font-weight: 800; }
.adv-note { margin: 2px 0 6px; font-size: 11px; color: var(--muted); }
.adv-table { max-width: 560px; }
.adv-table tfoot td { font-weight: 800; border-top: 1.5px solid var(--line-strong); padding: 4px 8px; }
@media print { .adv-box { background: #fff; } }
/* 201 File, Reminders (2026-10-22) */
.doc-usual { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.doc-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; background: var(--soft); border-radius: 10px; }
.doc-upload label { display: flex; flex-direction: column; gap: 2px; }
.doc-upload .wide input { width: 220px; }
.doc-late { color: #b3261e; font-weight: 700; }
.doc-soon { color: #9a5b00; font-weight: 700; }
.rem-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.rem-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); color: inherit; text-decoration: none; }
.rem-kpi b { font-size: 24px; }
.rem-kpi span { font-size: 12px; color: var(--label-text); }
.rem-kpi.is-alert { border-color: var(--orange-strong); background: #fff8ee; }
.rem-kpi:hover { background: var(--hover); text-decoration: none; }
.rem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rem-grid .card { padding: 14px 18px; }
@media (max-width: 1000px) { .rem-grid { grid-template-columns: 1fr; } }
/* the regularization stages (2026-10-22) */
.rem-today td { background: #fff8ee; }
.reg-eval { color: #2f5d86; font-weight: 700; }
.reg-next { color: #9a5b00; font-weight: 700; }
.reg-late { color: #b3261e; font-weight: 700; }

/* The Less Meal typed in the DTR list (2026-10-27) */
.lm-bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 6px 0; padding: 6px 10px; border: 1px solid #e6c766; border-radius: 6px; background: #fff7dc; color: #4a3b00; font-size: 13px; }
.lm-bar .spacer { flex: 1; }
.lm-mode .lm-val { display: none; }
.grid.grid-dtr .lm-in { width: 24px; height: 18px; padding: 0; margin: 0; text-align: center; font-size: 11px;
  border: 1px solid #b9b9b9; border-radius: 3px; background: #fff; color: #222; }
.grid.grid-dtr .lm-in.lm-changed { background: #fff2bf; border-color: #d39e00; font-weight: 700; }
.grid.grid-dtr .lm-in.lm-bad { background: #fde2e2; border-color: #c62828; }

/* Attendance Evaluation (2026-10-27) */
.att-seg .seg-btn { width: auto; min-width: 110px; padding: 0 14px; font-size: 13px; }
.att-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.att-kpi { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface, #fff); display: flex; flex-direction: column; gap: 2px; }
.att-kpi span { font-size: 11px; color: var(--muted, #666); text-transform: uppercase; letter-spacing: .3px; }
.att-kpi b { font-size: 20px; line-height: 1.2; }
.att-kpi small { font-size: 11px; color: var(--muted, #666); }
.att-kpi.is-bad b { color: #c62828; }
.att-h { font-size: 14px; margin: 14px 0 6px; }
.att-table td.att-bad, .att-table .att-bad { color: #c62828; font-weight: 600; }
.att-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.att-rate-ex { background: #e3f4e5; color: #1b6e2a; }
.att-rate-vg { background: #e7f1fb; color: #1d5a91; }
.att-rate-gd { background: #eef3e2; color: #4f6a17; }
.att-rate-fa { background: #fff3d6; color: #8a5a00; }
.att-rate-ni { background: #fde2e2; color: #a61b1b; }
.att-rate-na { background: #eee; color: #666; }
.att-kpi.att-rate-ex, .att-kpi.att-rate-vg, .att-kpi.att-rate-gd, .att-kpi.att-rate-fa, .att-kpi.att-rate-ni { border-color: transparent; }
.att-how-btn { cursor: var(--cur-ptr, pointer); text-align: left; font: inherit; border: 1px dashed var(--accent, #2e7d32); }
.att-how-btn:hover, .att-how-btn:focus-visible { background: color-mix(in srgb, var(--accent, #2e7d32) 8%, var(--surface, #fff)); }
.att-how-btn b { color: var(--accent, #2e7d32); }
@media print { .att-how-btn { display: none !important; } }
.att-how-dlg { max-width: 640px; font-size: 13px; line-height: 1.5; }
.att-how-dlg h2 { margin: 0 0 8px; font-size: 16px; }
.att-how-list { margin: 0; padding-left: 20px; }
.att-how-list > li { margin: 0 0 8px; }
.att-how-list ul { margin: 2px 0 0; padding-left: 18px; }
.att-how-dlg p { margin: 8px 0 0; }
.att-how-dlg .att-chip { font-size: 11px; }
.att-how-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
@media print { .att-filters, .head-actions, .att-how-dlg { display: none !important; } }

/* the address picker, as in Shopee (2026-10-29): Region / Province / City / Barangay, the ZIP automatic */
.addr-pick-field { position: relative; }
.addr-pick { position: relative; }
.addr-pick .ap-box { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left;
  font: inherit; padding: 8px 11px; border: 1px solid var(--input-line); border-radius: 9px; background: var(--card, #fff); cursor: var(--cur-ptr, pointer); }
.addr-pick-field.open .ap-box { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
.addr-pick .ap-text.muted { color: var(--muted); }
.addr-pick .ap-caret { color: var(--muted); }
.addr-pick .ap-panel { position: absolute; left: 0; width: max(100%, 660px); max-width: calc(100vw - 40px); top: calc(100% + 4px); z-index: 40; background: var(--card, #fff);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, .14); padding: 10px; }
.addr-pick .ap-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.addr-pick .ap-tab { font: inherit; font-size: 12.5px; padding: 8px 4px; white-space: nowrap; border: 0; border-radius: 6px; background: #f3f1ee; color: var(--text);
  cursor: var(--cur-ptr, pointer); font-weight: 600; }
.addr-pick .ap-tab.on { background: color-mix(in srgb, var(--orange) 14%, #fff); color: var(--orange); }
.addr-pick .ap-tab:disabled { color: #b9b4ae; cursor: var(--cur-def, default); }
.addr-pick .ap-tab.done:not(.on)::after { content: " \2713"; color: #2e7d32; }
.addr-pick .ap-search { margin-top: 8px; }
.addr-pick .ap-search input { width: 100%; }
.addr-pick .ap-list { margin-top: 8px; max-height: 260px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 4px 6px; align-content: flex-start; }
.addr-pick .ap-chip { font: inherit; font-size: 13px; border: 0; background: none; padding: 6px 9px; border-radius: 6px; cursor: var(--cur-ptr, pointer); color: var(--text); }
.addr-pick .ap-chip:hover { background: #f3f1ee; }
.addr-pick .ap-chip.on { color: var(--orange); font-weight: 700; background: color-mix(in srgb, var(--orange) 10%, #fff); }
.addr-pick .ap-note { width: 100%; font-size: 12px; color: var(--muted); margin-top: 4px; }
.addr-pick .ap-type, .addr-pick .ap-zip { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px; }
.addr-pick .ap-type input { flex: 1 1 220px; }
.addr-pick .ap-zip span { color: var(--muted); font-size: 12px; }
.addr-pick .ap-zip b { font-size: 18px; letter-spacing: 1px; }

/* ---------- PHONE, 375px (the user, 2026-11-01: "paki ayos ang 375 pixel for mobile view") ----------
   Nothing wider than the screen: the head over its buttons (they wrap), the filters / forms one column, a wide table or a
   paper sheet scrolls inside its own box. The ribbon already scrolls sideways. */
@media (max-width: 600px) {
  main { padding: 12px; }
  .app-bar { padding: 8px 12px; gap: 8px; }
  .app-bar .company-select { min-width: 0; width: 100%; }
  .user-links { border-left: 0; padding-left: 0; }
  .rb-tabs { padding: 6px 8px 0; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head h1 { white-space: normal; font-size: 20px; }
  .page-head > .muted, .page-head .small { white-space: normal; }
  .head-actions { flex-wrap: wrap; }
  .head-actions > .btn, .head-actions > a.btn, .head-actions > form, .head-actions > details { flex: 1 1 auto; }
  .head-actions .btn { justify-content: center; }
  .toolbar, .filters { flex-direction: column; align-items: stretch; }
  .toolbar > *, .filters > * { width: 100%; min-width: 0; max-width: 100%; }
  .filter input, .filter select { width: 100%; min-width: 0; box-sizing: border-box; }
  .loan-seg { flex-wrap: wrap; }
  .loan-seg > * { flex: 1 1 30%; }
  .form-grid, .form-card.compact .form-grid, .form-card.veh-card .form-grid { grid-template-columns: 1fr !important; }
  .field.wide, .field { grid-column: auto !important; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 auto; justify-content: center; }
  .role-head { flex-wrap: wrap; }
  .role-head > .muted { white-space: normal; }
  .pay-rates-box, .req-body, .cp-sheet, .dr-sheet { max-width: 100%; overflow-x: auto; }
  .pay-rates-box { display: block; }
  .req-body { grid-template-columns: 1fr; }
  .grid.diff { display: block; overflow-x: auto; }
  .slip-one .slip-box, .slip-one > div { max-width: calc(100vw - 24px); }
  dialog { max-width: calc(100vw - 16px); }
  .card { max-width: 100%; }
  .emp-tabs { flex-wrap: wrap; overflow-x: visible; }
  .notice-chip { white-space: normal; height: auto; max-width: 100%; }
  .filter .date-auto, .toolbar .date-auto { display: block; }
  .filter .date-auto .date-text, .toolbar .date-auto .date-text { width: 100%; box-sizing: border-box; }
}

/* Petty Cash Fund list (2026-11-04): the headers centered */
.pc-list thead th { text-align: center; vertical-align: middle; }

/* (2026-11-04) petty cash list: vertical lines between the cells */
.pc-list th, .pc-list td { border-right: 1px solid var(--line, #d8d8d8); }
.pc-list th:last-child, .pc-list td:last-child { border-right: 0; }
.pc-btn-overdue { border-color: #c62828; color: #c62828; }

/* (2026-11-04) petty cash: Unliquidated / Liquidated, the liquidation dates, On Time / Late */
.chip.pc-ontime { background: #e7f5ec; border-color: #b9e0c6; color: #1e7a3c; font-weight: 600; }
.chip.pc-late { background: #fdeaea; border-color: #f0c2c2; color: #b3261e; font-weight: 700; }
.pc-liq-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pc-liq-head h2 { margin-bottom: 6px; }
.pc-tof-find { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.pc-tof-find input { width: 200px; }
.pc-liq td[rowspan] { vertical-align: middle; background: var(--surface, #fff); }
.pc-liq tr.pc-first td { border-top: 2px solid var(--line-strong, #bfc5cc); }
.liq-dates { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 10px 14px; margin: 4px 0 14px; }
.liq-dates .field { margin: 0; }
.liq-days { font-size: 1.15em; font-weight: 700; padding: 7px 0 2px; }
@media (max-width: 900px) { .liq-dates { grid-template-columns: repeat(2, 1fr); } }
/* (2026-11-04) PCF: Unliquidated / Liquidated, two boxes beside the search */
.pc-views { display: flex; gap: 10px; align-items: stretch; }
.pc-view { display: flex; flex-direction: column; justify-content: center; min-width: 150px; padding: 6px 16px;
  border: 1px solid var(--border, #d8d8d8); border-radius: 10px; background: var(--surface, #fff); color: inherit; text-decoration: none; }
.pc-view span { font-size: .78em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); }
.pc-view strong { font-size: 1.25em; line-height: 1.2; }
.pc-view:hover { border-color: var(--accent); }
.pc-view.is-on { border: 2px solid var(--accent); background: var(--soft, #fdf4ec); }
.pc-view.is-on span { color: var(--accent); }
.pc-view-over { font-style: normal; font-size: .75em; color: #c62828; font-weight: 700; }
/* (2026-11-04) PCF list: the date headers on two lines; a small status chip (the row stays low) */
.pc-list th.pc-date-h { white-space: normal; width: 84px; line-height: 1.15; }
.chip.chip-sm { font-size: .72em; padding: 1px 6px; line-height: 1.3; }

/* (2026-11-04) Add / Edit petty cash: on one screen with its Save (4 boxes a row; Remarks takes the room the trip dates leave) */
.pc-form .pc-remarks { grid-column: span 3; }
.pc-form .trip-field:not([hidden]) ~ .pc-remarks { grid-column: span 1; }
.pc-form .pc-target { padding: 6px 10px; }
.pc-form .check-line { padding: 5px 0; }
/* (2026-11-04, later: "masyado nman maliit ... medyo lakihan mo"): bigger boxes and text, still on one screen with the Save */
.form-card.compact.pc-form { padding: 18px 22px; max-width: 1240px; }
.form-card.compact.pc-form .form-grid { gap: 12px 18px; }
.form-card.compact.pc-form .field { gap: 4px; }
.form-card.compact.pc-form .field .label { font-size: 14px; }
.form-card.compact.pc-form input, .form-card.compact.pc-form select { padding: 9px 11px; font-size: 15px; }
.form-card.compact.pc-form .check-line { font-size: 15px; padding: 9px 0; }
.form-card.compact.pc-form .pc-target { padding: 9px 12px; font-size: 14px; }
.form-card.compact.pc-form .form-actions { margin-top: 14px; padding-top: 12px; }
.form-card.compact.pc-form .form-actions .btn { font-size: 15px; padding: 9px 18px; }
/* (2026-11-04) PCF: Generate Report beside the Liquidated title */
.pc-gen { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
/* (2026-11-04) the Liquidated table with its Total column: narrower cell sides so it fits 1366px */
.pc-liq th, .pc-liq td { padding-left: 6px; padding-right: 6px; }

/* (2026-11-04) the PCF report: one compact line; the Item No. column narrow (1 or 2 digits) */
.pc-rep-info { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; padding: 10px 16px; margin-bottom: 12px; }
.pc-rep-info > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pc-rep-info span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); }
.pc-rep-info b { font-size: 14.5px; }
.pc-list th.pc-item-h { white-space: normal; width: 40px; line-height: 1.15; }
.liq-table th.c-item, .liq-table td:nth-child(6) input { width: 46px; }

/* (2026-11-04) the Days of a liquidation: centered */
.pc-list td.pc-days { text-align: center; }

/* SUGGESTION BOX (2026-11-12): the employee's form + history (me_suggestions.html), the bosses' inbox (suggestions.html) */
.sug-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #c62828; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; }
.sug-form { display: grid; gap: 14px; }
.sug-form h2 { margin: 0; }
.sug-form p { margin: 0; }
.sug-form textarea { width: 100%; resize: vertical; font: inherit; }
.sug-about { display: grid; gap: 6px; }
.sug-about .seg { margin: 0; flex-wrap: wrap; }
.sug-about .seg-btn { cursor: var(--cur-ptr, pointer); width: auto; min-width: 104px; }
.sug-about .seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.sug-about .seg-btn:has(input:checked) { background: var(--orange-strong); border-color: var(--orange-strong); color: #fff; font-weight: 600; }
.sug-about .seg-btn:has(input:focus-visible) { outline: 2px solid var(--orange-strong); outline-offset: 1px; }
.sug-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sug-top .spacer { flex: 1; }
.sug-msg { white-space: pre-wrap; line-height: 1.55; margin-top: 8px; }
.sug-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sug-item:last-child { border-bottom: 0; }
.sug-box { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.sug-inbox { padding: 6px; max-height: calc(100vh - var(--top-h, 140px) - 120px); overflow: auto; }
.sug-row { display: block; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.sug-row + .sug-row { margin-top: 2px; }
.sug-row:hover { background: var(--hover); }
.sug-row.on { background: var(--soft, var(--head)); }
.sug-row.unread { border-left-color: var(--orange-strong); }
.sug-row.unread strong::after { content: " •"; color: var(--orange-strong); }
.sug-sub { margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-read { min-height: 240px; }
.sug-read .sug-msg { font-size: 15px; }
@media (max-width: 760px) { .sug-box { grid-template-columns: 1fr; } .sug-inbox { max-height: none; } }
/* the kind of a suggestion (Improvement / Concern / Appreciation): three cards to click, and a coloured chip */
.sug-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.sug-kind { position: relative; display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card, #fff); cursor: var(--cur-ptr, pointer); }
.sug-kind:hover { background: var(--hover); }
.sug-kind input { position: absolute; opacity: 0; pointer-events: none; }
.sug-kind:has(input:checked) { border-color: var(--orange-strong); box-shadow: 0 0 0 1px var(--orange-strong) inset; background: var(--soft, var(--card)); }
.sug-kind:has(input:focus-visible) { outline: 2px solid var(--orange-strong); outline-offset: 2px; }
.sug-kind-t { font-weight: 700; }
.sug-kind-h { font-size: 12px; color: var(--muted); line-height: 1.35; }
.chip.sug-k-improvement { background: #e3f2e6; color: #1e6b34; }
.chip.sug-k-concern { background: #fdecea; color: #a12a20; }
.chip.sug-k-appreciation { background: #e8eefc; color: #2a4a9a; }
/* the filter bar of the bosses' Suggestion Box (2026-11-12: "i align mo ... para malinis tignan"): one row, every box 38px */
.sug-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin-bottom: 14px; padding: 12px 14px;
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; }
.sug-bar .filter select { width: 180px; height: 38px; box-sizing: border-box; }
.sug-seg { display: inline-flex; height: 38px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sug-seg a { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; color: inherit; text-decoration: none;
  font-size: 13px; white-space: nowrap; background: var(--card, #fff); }
.sug-seg a + a { border-left: 1px solid var(--line); }
.sug-seg a:hover { background: var(--hover); }
.sug-seg a b { min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--head); font-size: 11.5px; text-align: center; }
.sug-seg a b.is-new { background: #c62828; color: #fff; }
.sug-seg a.on { background: var(--orange-strong); color: #fff; font-weight: 600; }
.sug-seg a.on b { background: rgba(255, 255, 255, .25); color: #fff; }
@media (max-width: 600px) { .sug-seg { height: auto; flex-wrap: wrap; } .sug-seg a { height: 38px; } .sug-bar .filter select { width: 100%; } .sug-bar .filter { flex: 1 1 140px; } }
.sug-row .sug-top { flex-wrap: nowrap; }
.sug-row .sug-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-row .sug-top .muted { flex: none; }
.sug-about .seg { justify-self: start; }
/* Can't close the payroll: one box, one line per reason (2026-11-13) */
.close-bar .close-open { color: var(--muted); font-weight: 600; }
.close-bar .close-issues { background: #fdecea; border: 1px solid #f3c2bd; border-radius: 8px; padding: 8px 12px; }
.close-bar .close-issues ul.close-reasons { margin: 4px 0 0 18px; max-height: none; overflow: visible; color: #b3261e; }
.close-bar .close-reasons > li { margin: 2px 0; }
.close-bar .close-reasons details { display: inline-block; margin: 0; }
.close-bar .close-reasons summary { font-weight: 600; }
.close-bar .close-reasons a { font-weight: 600; }
td.date-r { text-align: right; font-variant-numeric: tabular-nums; }   /* dates are right-aligned (the user, 2026-11-13) */

/* PAALALA -> the Contributions popup (2026-11-13) */
.close-warn a.contri-pop { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; cursor: var(--cur-ptr, pointer); }
.close-warn a.contri-pop:hover { color: var(--orange); }
.close-warn .contri-pop-hint { font-size: 11px; font-weight: 600; color: var(--orange); opacity: 0; transition: opacity .15s; }
.close-warn li:hover .contri-pop-hint { opacity: 1; }
.contri-dlg { width: min(560px, 94vw); padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.contri-dlg::backdrop { background: rgba(20, 20, 20, .45); backdrop-filter: blur(2px); }
.contri-dlg form { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.contri-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.contri-dlg-head b { font-size: 16px; }
.contri-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: var(--cur-ptr, pointer); color: var(--muted, #777); }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; }
.cd-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted, #666); }
.cd-field input, .cd-field select { height: 36px; font-size: 14px; font-weight: 500; color: var(--text); }
.cd-field input { text-align: right; }
.cd-wide input { text-align: left; }
.cd-note { margin: -4px 0 0; }
.contri-dlg-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 12px; }
.contri-dlg-foot span { display: flex; gap: 8px; }

/* THE CURSOR OF THE SYSTEM (the user, 2026-11-16: a switchgear panel as the mouse pointer, since 2026-11-16 the Power Box mark: a red circle with the yellow square, 24 x 24, the hotspot the centre 12 12): static/cursor/arrow.svg
   (the hotspot = the tip, 3 2) and hand.svg (the same with the breaker green and a lamp lit) on what can be clicked. A rule with
   "cursor: pointer" is written var(--cur-ptr, pointer); a text box keeps the browser's I-beam. */
/* (2026-11-16: "yung circle na red pixilated ... smooth") PNGs with smooth edges whose edge pixels keep the red / yellow (only the
   alpha fades), so Windows does not blend them with black; 2x for a scaled screen. Made by the scratch make_cursor.py. */
:root {
  --cur-def: url("/static/cursor/arrow.png?v=5") 12 12, default;
  --cur-ptr: url("/static/cursor/hand.png?v=5") 12 12, pointer;
  --cur-text: url("/static/cursor/arrow.png?v=5") 12 12, text;    /* (2026-11-16: "yung i beam palitan mo na din ng logo cursor") */
}
@supports (cursor: -webkit-image-set(url("x.png") 1x) 0 0, auto) {
  :root {
    --cur-def: -webkit-image-set(url("/static/cursor/arrow.png?v=5") 1x, url("/static/cursor/arrow@2x.png?v=5") 2x) 12 12, default;
    --cur-ptr: -webkit-image-set(url("/static/cursor/hand.png?v=5") 1x, url("/static/cursor/hand@2x.png?v=5") 2x) 12 12, pointer;
    --cur-text: -webkit-image-set(url("/static/cursor/arrow.png?v=5") 1x, url("/static/cursor/arrow@2x.png?v=5") 2x) 12 12, text;
  }
}
html { cursor: var(--cur-def); }
a[href], button:not(:disabled), summary, select, label[for], [role="button"], [onclick], input[type="checkbox"], input[type="radio"],
input[type="submit"], input[type="button"], input[type="file"], .btn:not([disabled]) { cursor: var(--cur-ptr); }
input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="url"], input[type="date"], textarea, [contenteditable="true"] { cursor: var(--cur-text, text); }
/* (2026-11-16: "kapag tinatapat ko sa x ... nagiging arrow") the x that clears a search box = what can be clicked */
input[type="search"]::-webkit-search-cancel-button { cursor: var(--cur-ptr, pointer); }
button:disabled, .btn[disabled] { cursor: not-allowed; }

/* (2026-11-16: "sa accounting mag lagay ka ng mga vertical lines sa mga tables") every table of the Accounting tab has column lines */
.mod-acct table.grid th, .mod-acct table.grid td,
.mod-acct table.items-table th, .mod-acct table.items-table td { border-right: 1px solid var(--line, #d8d8d8); }
.mod-acct table.grid th:last-child, .mod-acct table.grid td:last-child,
.mod-acct table.items-table th:last-child, .mod-acct table.items-table td:last-child { border-right: 0; }
.mod-acct table.grid { border-left: 1px solid var(--line, #d8d8d8); border-right: 1px solid var(--line, #d8d8d8); }
/* (2026-11-16) Accounts Payable: the Debit (Account), Supplier and Invoice columns wrap, so the list fits the screen */
.grid td.wrap-col, .grid th.wrap-col { white-space: normal; min-width: 120px; max-width: 190px; }
.grid td.wrap-col.computed { color: inherit; font-weight: 500; }

/* (2026-11-16: "lahat ng tables na meron tayo dapat middle align at sa future na gagawin ntin palagi nka middle align") every cell of
   every table is vertically centred (Excel's Middle Align); a NEW table needs nothing more. Kept on top: the Calendar month grid. */
table th, table td { vertical-align: middle; }


/* (2026-11-16) the totals boxes on top of Accounts Payable and Sales Invoice */
.ap-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.ap-tot-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
background: var(--card); color: inherit; text-decoration: none; }
.ap-tot-box span { font-size: 12px; color: var(--muted); } .ap-tot-box strong { font-size: 19px; } .ap-tot-box small { font-size: 11.5px; color: var(--muted); }
.ap-tot-box.is-main { border-left: 5px solid var(--accent); } .ap-tot-box.is-main strong { font-size: 22px; color: var(--accent); }
.ap-tot-box.is-bad { border-left: 5px solid #c62828; } .ap-tot-box.is-bad strong { color: #c62828; }
.ap-tot-box.is-warn { border-left: 5px solid #e08a00; } .ap-tot-box.is-loan { border-left: 5px solid #1d5f99; }

/* (2026-11-16: "kapag nag drop down meron ka pag pipilian? arrow na ang cursor doon ... yung arrow na yun ang pinapagawa ko na yellow")
   THE CURSOR ON THE CHOICES of a dropdown = a YELLOW arrow (static/cursor/pick.png / pick@2x.png, hotspot = the tip 2 2; scratch
   make_yarrow.py). The list of a <select> was drawn by Windows (its own white arrow): appearance base-select (Edge / Chrome 135+)
   makes the browser draw it in the page, styled here like the combo lists, so the cursor can be set. The box itself is unchanged. */
:root { --cur-pick: url("/static/cursor/pick.png?v=1") 2 2, default; }
@supports (cursor: -webkit-image-set(url("x.png") 1x) 0 0, auto) {
  :root { --cur-pick: -webkit-image-set(url("/static/cursor/pick.png?v=1") 1x, url("/static/cursor/pick@2x.png?v=1") 2x) 2 2, default; }
}
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  select:not([multiple]):not([size])::picker(select) {
    border: 1px solid var(--input-line); border-radius: 10px; padding: 4px; background: #fff;
    box-shadow: 0 10px 24px rgba(90,51,25,.16); max-height: 320px; overflow-y: auto; cursor: var(--cur-pick);
  }
  select:not([multiple]):not([size]) option { padding: 7px 10px; border-radius: 7px; cursor: var(--cur-pick); }
  select:not([multiple]):not([size]) option:hover, select:not([multiple]):not([size]) option:focus-visible { background: var(--hover); outline: none; }
  select:not([multiple]):not([size]) option:checked { font-weight: 700; color: var(--link); }
  select:not([multiple]):not([size]) option::checkmark { display: none; }
  select:not([multiple]):not([size])::picker-icon { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75 L6 6.25 L10.5 1.75' fill='none' stroke='%23555' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); width: 12px; height: 8px; transition: none; }
  select:not([multiple]):not([size]):open::picker-icon { rotate: 0deg; }
}
.combo-list li:not(.note) { cursor: var(--cur-pick); }
