/* Leave System - one stylesheet. --brand is set from Settings → Main color. */
:root {
  --brand: #0b3b8c;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --text: #1a2333;
  --muted: #667085;
  --line: #dfe4ec;
  --soft: #f6f8fb;
  --ok: #1e7e34;
  --ok-bg: #e7f5ec;
  --warn: #9a6700;
  --warn-bg: #fff6dd;
  --bad: #c62828;
  --bad-bg: #fdecea;
  --grey: #5f6b7a;
  --grey-bg: #eef0f3;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar: 248px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
a { color: var(--brand); }
code, .code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; }
.code { display: block; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.error, .neg { color: var(--bad); }
.spacer { flex: 1; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand); filter: brightness(1.08); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: var(--ok); filter: brightness(1.08); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(1.08); }
.btn-danger-outline { color: var(--bad); border-color: #f1c4c0; }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.btn-block { width: 100%; padding: 11px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: inherit; font-size: 1.4rem; line-height: 1; }
.icon-btn:hover { background: var(--soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

input, select, textarea {
  font: inherit; color: inherit; background: var(--surface);
  border: 1px solid #cfd6e2; border-radius: 8px; padding: 8px 10px; min-height: 38px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=checkbox], input[type=radio] { min-height: 0; width: 16px; height: 16px; accent-color: var(--brand); }
input[type=color] { padding: 2px; width: 70px; }
textarea { resize: vertical; width: 100%; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-weight: 600; font-size: .88rem; }
.field small { color: var(--muted); font-size: .8rem; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check small { display: block; color: var(--muted); }
.multi { display: flex; flex-wrap: wrap; gap: 8px 18px; max-height: 260px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-error { color: var(--bad); background: var(--bad-bg); border-radius: 8px; padding: 8px 12px; margin: 0; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }

.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid #cfd6e2; border-radius: 9px; overflow: hidden; width: fit-content; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 14px; font-weight: 600; font-size: .88rem; border-right: 1px solid #cfd6e2; }
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--brand); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -3px; }
.date-list { display: flex; flex-wrap: wrap; gap: 8px; }
.summary { margin: 0; font-weight: 600; color: var(--brand); min-height: 1.5em; }

/* ---------- layout */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px;
}
.brand, .auth-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand img, .auth-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand strong, .auth-brand strong { display: block; line-height: 1.2; }
.brand small, .auth-brand small { color: var(--muted); }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--soft); }
.nav a.active { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); font-weight: 700; }
.nav-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 10px 6px; font-weight: 700; }
.nav-badge { margin-left: auto; background: var(--bad); color: #fff; font-style: normal; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(6px); padding: 10px 28px; border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 10px; font: inherit; color: inherit; text-align: left; }
.user-btn:hover { background: var(--surface); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.user-text b { display: block; font-size: .9rem; line-height: 1.2; }
.user-text small { color: var(--muted); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(16, 24, 40, .14); min-width: 190px; padding: 6px; z-index: 30; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 7px; background: none; border: 0; font: inherit; color: var(--text); text-decoration: none; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--soft); }
.view { padding: 24px 28px 48px; max-width: 1280px; width: 100%; outline: none; }
.scrim { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2, .card-head p { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 18px; }
.grid-apply { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.notice { display: block; background: var(--warn-bg); color: #5c4400; border: 1px solid #f3dfa0; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; text-decoration: none; }
.notice-action { background: color-mix(in srgb, var(--brand) 8%, white); border-color: color-mix(in srgb, var(--brand) 25%, white); color: var(--brand); font-weight: 600; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 4px; }
.page-loading { justify-content: center; min-height: 60vh; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* ---------- sign-in pages */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; padding: 28px; margin: 0; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card > .muted { margin-top: 0; }
.auth-card form { margin-top: 18px; }

/* ---------- public request page (/request) */
.request-page { place-items: start center; }
.request-card { width: 100%; max-width: 560px; padding: 28px; margin: 24px 0; }
.request-card h1 { margin-bottom: 4px; }
.request-card .form-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.email-saved { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.done { text-align: center; padding: 10px 0; }
.done-mark { width: 64px; height: 64px; margin: 6px auto 14px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
@media (max-width: 640px) { .request-card { padding: 20px 16px; margin: 0; } }

/* ---------- balance */
.balance-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.balance-total strong { font-size: 2rem; margin: 0 6px; color: var(--brand); }
.balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.bal-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--soft); display: flex; flex-direction: column; }
.bal-title { font-weight: 600; font-size: .85rem; }
.bal-card strong { font-size: 1.6rem; line-height: 1.2; }
.meter { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter span.high { background: #e0a100; }
.meter span.full { background: var(--bad); }

/* ---------- tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid #edf0f5; vertical-align: top; }
.table tbody tr:hover { background: #fafbfd; }
.table .num { text-align: center; }
.table .sel { width: 34px; }
.table .actions { text-align: right; white-space: nowrap; }
.matrix td:first-child { min-width: 260px; }
.group-row th { background: var(--soft); color: var(--text); padding-top: 12px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid #edf0f5; }
.people li:last-child { border-bottom: 0; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-approved { background: var(--ok-bg); color: var(--ok); }
.badge-rejected { background: var(--bad-bg); color: var(--bad); }
.badge-cancelled { background: var(--grey-bg); color: var(--grey); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; }
.filters input[type=search] { flex: 1 1 240px; }
.bulk { position: sticky; top: 60px; z-index: 10; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--text); color: #fff; border-radius: 10px; padding: 8px 14px; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- details / dialogs / toasts */
.details { display: flex; flex-direction: column; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf0f5; }
.kv > span { color: var(--muted); font-size: .88rem; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; padding: 16px; z-index: 100; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 24px 48px rgba(16, 24, 40, .25); animation: rise .18s ease; }
.modal-wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px 20px; }
.modal-body > p:first-child { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: 0 10px 24px rgba(16, 24, 40, .2); transition: opacity .3s, transform .3s; border-left: 4px solid var(--ok); }
.toast-error { border-left-color: #ff6b5e; }
.toast.hide { opacity: 0; transform: translateY(8px); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- calendar */
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar h2 { margin: 0 6px; min-width: 150px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-head { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.cal-cell { min-height: 96px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.off { background: #f8f9fb; }
.cal-cell.empty { background: #fbfbfc; }
.cal-cell.today .cal-date { background: var(--brand); color: #fff; border-radius: 6px; padding: 0 6px; width: fit-content; }
.cal-date { font-weight: 700; font-size: .85rem; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.hol { font-size: .7rem; color: var(--bad); font-weight: 600; }
.chip { display: block; font-size: .74rem; font-weight: 600; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-agenda .chip { display: inline-block; margin: 3px 3px 0 0; }
.chip-approved { background: color-mix(in srgb, var(--brand) 14%, white); color: var(--brand); }
.chip-pending { background: repeating-linear-gradient(45deg, var(--warn-bg), var(--warn-bg) 5px, #fff 5px, #fff 10px); color: var(--warn); border: 1px dashed #e8c766; }
.cal-agenda { display: none; list-style: none; padding: 0; margin: 0; }
.cal-agenda li { padding: 10px 0; border-bottom: 1px solid #edf0f5; }

.print-only { display: none; }

/* ---------- phones and tablets */
@media (max-width: 900px) {
  .grid-apply { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 40; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 8px 16px; }
  .view { padding: 18px 16px 40px; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .user-text { display: none; }
  .card { padding: 14px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  /* tables become cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 10px; }
  .table td { border: 0; padding: 4px 0; display: flex; gap: 10px; text-align: left !important; }
  .table td::before { content: attr(data-label); flex: 0 0 110px; color: var(--muted); font-size: .78rem; font-weight: 600; }
  .table td.sel::before, .table td.actions::before, .table td[data-label=""]::before { content: none; }
  .table td.actions { justify-content: flex-end; flex-wrap: wrap; }
  .table-wrap { margin: 0; }
}

/* ---------- print (Reports → Print / Save PDF) */
@media print {
  .sidebar, .topbar, .no-print, .page-actions, .bulk, #toasts { display: none !important; }
  .print-only { display: block; }
  body, .view { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .table { font-size: 10pt; }
  .table td, .table th { border: 1px solid #ccc; padding: 4px 6px; }
}

/* ---------- notifications: bell + panel */
.bell-wrap { position: relative; }
.bell-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; }
.bell-btn .ico { width: 21px; height: 21px; }
.bell-btn em { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-style: normal; font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.bell-panel { width: min(360px, calc(100vw - 24px)); right: -50px; padding: 10px; max-height: 70vh; overflow-y: auto; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; }
.bell-on { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-size: .82rem; font-weight: 600; }
.bell-help { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: #5c4400; font-size: .82rem; }
.bell-panel .btn-block { margin-bottom: 8px; padding: 9px; }
.bell-list { display: flex; flex-direction: column; gap: 2px; }
.bell-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.bell-item:hover { background: var(--soft); }
.bell-item.unread { background: color-mix(in srgb, var(--brand) 7%, white); }
.bell-item b { font-size: .88rem; }
.bell-item span { grid-column: 1; color: var(--muted); font-size: .82rem; }
.bell-item small { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .72rem; }
.push-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.push-hint small { flex-basis: 100%; }

/* ---------- Summary grid */
.sg-card { padding: 0; overflow: hidden; }
.sg-wrap { overflow: auto; max-height: calc(100vh - 260px); }
.sg { border-collapse: separate; border-spacing: 0; font-size: .82rem; min-width: 100%; }
.sg th, .sg td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.sg thead th { position: sticky; top: 0; z-index: 2; background: var(--soft); text-align: left; min-width: 130px; }
.sg thead th b { display: block; font-size: .82rem; }
.sg thead th small { color: var(--muted); font-weight: 500; }
.sg tbody th { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; white-space: nowrap; font-weight: 700; color: var(--brand); }
.sg .sg-corner { left: 0; z-index: 3; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.sg-cell { min-width: 130px; background: #fff; }
.sg-cell.edit { cursor: pointer; transition: background .15s; }
.sg-cell.edit:hover { background: color-mix(in srgb, var(--brand) 6%, white); }
.sg-n { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; font-size: .72rem; text-align: center; margin-bottom: 4px; }
.sg-dates-list { display: flex; flex-wrap: wrap; gap: 3px; }
.sg-dates-list i { font-style: normal; padding: 1px 6px; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); font-size: .74rem; font-variant-numeric: tabular-nums; }
.sg-empty { color: #c3c9d6; }
.sg-existing { display: flex; flex-wrap: wrap; gap: 8px 16px; max-height: 220px; overflow-y: auto; padding: 4px 0; }
.sg-h3 { margin: 18px 0 10px; font-size: .9rem; }
.sg-mode { margin-bottom: 10px; }
.sg-half { margin-bottom: 10px; max-width: 260px; }
.sg-emps { max-height: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.sg-dates .date-list { margin-bottom: 8px; }

/* ---------- Leave Chart (one date per cell, like the paper register) */
.lc-card { padding: 0; overflow: hidden; }
.lc-wrap { overflow: auto; max-height: calc(100vh - 250px); }
.lc { border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.lc th, .lc td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 14px; text-align: center; white-space: nowrap; }
.lc thead th { position: sticky; top: 0; z-index: 2; background: var(--soft); min-width: 120px; vertical-align: top; line-height: 1.35; }
.lc thead th b { display: block; font-weight: 600; white-space: normal; }
.lc thead th small { display: block; color: var(--muted); font-size: .76rem; font-weight: 500; }
.lc tbody th { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; font-weight: 700; min-width: 110px; }
.lc .lc-corner { left: 0; z-index: 3; }
.lc td { background: #fff; font-variant-numeric: tabular-nums; min-width: 120px; height: 44px; }
.lc tr.lc-start:not(:first-child) th, .lc tr.lc-start:not(:first-child) td { border-top: 3px solid var(--brand); }
.lc td.lc-edit { cursor: pointer; }
.lc td.lc-edit:hover { background: color-mix(in srgb, var(--brand) 6%, white); }
.sg-type textarea { width: 100%; }
.sg-preview { margin: 6px 0 0; min-height: 1.2em; }

/* =====================================================================
   Official theme (navy) - sign in split screen + sidebar + polish
   ===================================================================== */
:root { --brand: #2b3990; --navy: #1b2366; --bg: #f4f6fb; --radius: 14px; }
body { background: var(--bg); -webkit-font-smoothing: antialiased; }
h1 { letter-spacing: -.02em; }

/* sign in: video left, form right (video on top on phones) */
.auth-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); background: #fff; }
.auth-media { position: relative; overflow: hidden; background: #fff; border-right: 1px solid #edf0f6; }
.auth-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 32px 24px; background: linear-gradient(180deg, #fff, #f6f8fc); }
.auth-box { width: 100%; max-width: 380px; animation: rise .5s ease both; }
.auth-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 10px 26px -12px rgba(27, 35, 102, .45), 0 0 0 1px #e8ebf3; margin-bottom: 22px; }
.auth-box h1 { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.auth-sub { margin: 0 0 4px; }
.auth-box form { margin-top: 24px; gap: 16px; }
.auth-box input { min-height: 48px; border-radius: 12px; border: 1.5px solid #dde2ee; padding: 10px 14px; }
.auth-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.auth-box .btn-block { min-height: 50px; border-radius: 12px; font-size: 1rem; background: linear-gradient(135deg, var(--navy), var(--brand)); border: 0; box-shadow: 0 12px 24px -12px rgba(43, 57, 144, .8); }
.auth-box .btn-block:hover { filter: brightness(1.08); }
.auth-box .link { align-self: center; font-size: .88rem; }
.auth-foot { margin-top: auto; padding-top: 24px; font-size: .78rem; color: #8a93ab; }
@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; grid-template-rows: 36vh auto; }
  .auth-media { border-right: 0; border-bottom: 1px solid #edf0f6; }
  .auth-media video { object-fit: contain; background: #fff; }
  .auth-panel { justify-content: flex-start; padding: 28px 20px 18px; }
  .auth-logo { display: none; }
  .auth-box input { font-size: 16px; }
}

/* sidebar: deep navy */
.sidebar { background: linear-gradient(185deg, #141a52 0%, #1b2366 55%, #222c7a 100%); border-right: 0; color: #fff; }
.brand { padding: 6px 8px 22px; margin-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand img { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 3px; object-fit: contain; }
.brand strong { color: #fff; font-size: 1rem; }
.brand small { color: rgba(255, 255, 255, .6); font-size: .74rem; }
.nav a { color: rgba(255, 255, 255, .78); font-weight: 500; padding: 10px 12px; border-radius: 10px; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .5); }
.nav-group { color: rgba(255, 255, 255, .42); }
.nav-badge { background: #ff5d5d; }

/* top bar + pages */
.topbar { background: rgba(255, 255, 255, .85); border-bottom: 1px solid #e8ebf3; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.card { border: 1px solid #e8ebf3; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -16px rgba(27, 35, 102, .18); }
.btn { border-radius: 10px; }
.btn-primary { background: linear-gradient(135deg, var(--navy), var(--brand)); border: 0; }
.table th { color: #7a83a0; }
.avatar { background: linear-gradient(135deg, var(--navy), var(--brand)); }
.auth-media video { object-fit: contain; }
.auth-box { margin-top: auto; }
.email-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }

/* ---------- dashboard (Home) */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.dash-stat { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: var(--radius); background: #fff; border: 1px solid #e8ebf3; text-decoration: none; color: var(--text); box-shadow: 0 8px 24px -18px rgba(27, 35, 102, .25); transition: transform .15s; }
.dash-stat:hover { transform: translateY(-2px); }
.dash-stat b { font-size: 1.6rem; color: var(--navy); line-height: 1.2; }
.dash-stat span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.dash-stat.warn b { color: #d97706; }
.dash-stat.ok b { color: var(--ok); font-size: 1.15rem; padding-top: 6px; }
.dash-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 0 18px; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.note-list a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.note-list a:hover { background: var(--soft); }
.note-list li.unread a { background: color-mix(in srgb, var(--brand) 7%, white); }
.note-list b { font-size: .9rem; }
.note-list span { color: var(--muted); font-size: .84rem; }
.note-list small { color: #9aa2b8; font-size: .74rem; }

/* ---------- Usage page */
.u-h2 { margin: 6px 0 12px; color: var(--navy); font-size: 1.1rem; }
.u-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.u-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px solid #e8ebf3; box-shadow: 0 8px 24px -18px rgba(27, 35, 102, .25); }
.u-tile span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.u-tile b { font-size: 1.7rem; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; }
.u-tile b.u-small { font-size: 1.05rem; padding: 6px 0 2px; }
.u-tile small { color: var(--muted); }
.u-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.u-chart-head h3 { margin: 0; font-size: .95rem; color: var(--text); }
.u-bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; height: 150px; align-items: end; border-bottom: 1px solid var(--line); }
.u-bar { position: relative; height: 100%; display: flex; align-items: flex-end; outline: none; cursor: default; }
.u-bar i { display: block; width: 100%; height: var(--h); min-height: 0; background: var(--brand); border-radius: 4px 4px 0 0; transition: filter .15s; }
.u-bar:hover i, .u-bar:focus i { filter: brightness(1.25); }
.u-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; display: none; white-space: nowrap; padding: 6px 9px; border-radius: 8px; background: #1a2333; color: #fff; font-size: .74rem; line-height: 1.35; pointer-events: none; }
.u-bar:hover .u-tip, .u-bar:focus .u-tip { display: block; }
.u-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .74rem; }
.u-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 24px; }
.u-meter { display: flex; flex-direction: column; gap: 6px; }
.u-meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.u-meter-top b { font-variant-numeric: tabular-nums; }
.u-meter-top small { color: var(--muted); font-weight: 500; }
.u-track { height: 10px; border-radius: 99px; background: #e9edf5; overflow: hidden; }
.u-track span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.u-track span.warning { background: #d97706; }
.u-track span.critical { background: var(--bad); }
.u-counts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.u-counts div { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; background: var(--soft); border: 1px solid #edf0f6; min-width: 120px; }
.u-counts b { font-size: 1.2rem; color: var(--navy); }
.u-counts span { color: var(--muted); font-size: .78rem; }
.u-bar:nth-last-child(-n+3) .u-tip { left: auto; right: 0; transform: none; }
.u-bar:nth-child(-n+3) .u-tip { left: 0; transform: none; }

/* notifications: tick boxes + small red delete icon */
.bell-row, .note-list li { display: flex; align-items: center; gap: 8px; }
.bell-row .bell-item, .note-list li > a { flex: 1; min-width: 0; }
.bell-check { width: 16px; height: 16px; flex: none; margin: 0 0 0 6px; accent-color: #dc2626; cursor: pointer; }
.bell-del { border: 0; background: transparent; color: #dc2626; cursor: pointer; padding: 4px; margin-left: 8px; border-radius: 6px; line-height: 0; vertical-align: middle; }
.bell-del:hover, .bell-del:focus-visible { background: rgba(220, 38, 38, .12); }
.bell-del[hidden] { display: none; }
/* notification settings card */
.notif-settings { margin-top: 16px; }
.notif-settings .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.notif-status { padding: 10px 12px; border-radius: 10px; background: var(--surface-2, rgba(0,0,0,.04)); }
.notif-status.on { background: rgba(22, 163, 74, .1); color: #15803d; }

/* ===== Sign-in page (card + illustration) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth2 { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: #eef1f6; color: #111827; }
.auth2-inner { width: 100%; max-width: 1040px; background: #fff; border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .25); padding: 36px 44px 20px; }
.auth2-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth2-brand img { width: 44px; height: 44px; border-radius: 10px; }
.auth2-brand b { display: block; font-size: 1.45rem; letter-spacing: -.01em; }
.auth2-brand span { font-size: .9rem; color: #374151; }
.auth2-body { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; align-items: center; gap: 24px; }
.auth2-card { background: #fff; border-radius: 16px; padding: 28px 26px; box-shadow: 0 12px 40px -12px rgba(15, 23, 42, .22); position: relative; z-index: 1; }
.auth2-card h1 { font-size: 1.7rem; margin: 0 0 18px; }
.auth2-card .stack { gap: 14px; }
.icon-field { position: relative; display: block; }
.icon-field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: #7b8db0; pointer-events: none; }
.icon-field input { width: 100%; padding: 11px 12px 11px 40px; border: 1px solid #e3e7ef; border-radius: 8px; background: #fff; color: #111827; font-size: .95rem; }
.icon-field input::placeholder { color: #9ca3af; }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: .88rem; cursor: pointer; user-select: none; position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 34px; height: 18px; border-radius: 99px; background: #d1d5db; position: relative; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch-row input:checked + .switch { background: #22c55e; }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-login { padding: 12px; font-size: 1.05rem; border-radius: 8px; background: linear-gradient(90deg, #4a8cff, #2563eb); border: 0; box-shadow: 0 10px 20px -8px rgba(37, 99, 235, .55); margin-top: 6px; }
.auth-forgot { text-align: center; font-size: .88rem; }
.auth2-art { display: flex; justify-content: center; }
.auth-art { width: 100%; max-width: 560px; height: auto; }
.art-blob { fill: #cfe3fb; } .art-shirt { fill: #2f6fe4; } .art-collar { fill: #fff; } .art-skin { fill: #f8d3b0; } .art-hair { fill: #1f2937; }
.art-stand { fill: #9ca3af; } .art-screen-frame { fill: #4b5563; } .art-screen { fill: #fff; } .art-cal-head { fill: #2563eb; }
.art-cal-day { fill: #e5e7eb; } .art-cal-pick { fill: #22c55e; } .art-desk-top { fill: #c2703d; } .art-desk { fill: #f5d9b8; } .art-desk-line { fill: #e9c49b; }
.auth2 .auth-foot { text-align: center; color: #6b7280; font-size: .8rem; margin: 18px 0 0; }
@media (max-width: 820px) {
  .auth2 { padding: 16px; place-items: start center; }
  .auth2-inner { padding: 24px 16px 14px; border-radius: 20px; }
  .auth2-body { grid-template-columns: 1fr; }
  .auth2-art { order: -1; max-width: 300px; margin: -10px auto 0; }
}@media (max-width: 820px) { .auth2-brand b { font-size: 1.15rem; } .auth2-brand span { font-size: .8rem; } }

/* sign-in: video background + logo */
.auth2 { position: relative; overflow: hidden; background: #0b1630; }
.auth2-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.auth2::before { content: ''; position: fixed; inset: 0; z-index: 0; background: linear-gradient(135deg, rgba(8, 20, 50, .55), rgba(8, 20, 50, .25)); }
.auth2-inner { position: relative; z-index: 1; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.auth2-logo { width: 100%; max-width: 360px; height: auto; filter: drop-shadow(0 12px 24px rgba(15, 23, 42, .18)); }
@media (max-width: 820px) { .auth2-logo { max-width: 170px; } .auth2-art { margin: 0 auto; } }.auth2::before { z-index: 1; background: linear-gradient(135deg, rgba(11, 30, 80, .45), rgba(11, 30, 80, .2)); }
.auth2-inner { z-index: 2; }
.auth2-logo { mix-blend-mode: multiply; filter: none; }.auth2-logo { mix-blend-mode: normal; }

/* employees list: small round photo / initials */
.emp-cell { display: inline-flex; align-items: center; gap: 10px; }
.emp-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center;
  font-size: .75rem; font-weight: 700; color: hsl(var(--h, 220) 55% 30%); background: hsl(var(--h, 220) 70% 90%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px hsl(var(--h, 220) 50% 80%); }
img.emp-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #c7d2fe, 0 4px 10px -4px rgba(15, 23, 42, .35); transition: transform .15s; }
img.emp-avatar:hover { transform: scale(1.9); position: relative; z-index: 2; }.emp-cell > span:last-child { white-space: nowrap; }

/* =====================================================================
   Phone look (same link, small screens): styled like the employee app -
   greeting header, white rounded cards, bottom tabs, floating Request Leave
   ===================================================================== */
.m-tabs, .m-fab, .m-greet { display: none; }
@media (max-width: 760px) {
  body { background: #f5f7fc; }
  .shell { --card-shadow: 0 4px 16px -8px rgba(22, 29, 92, .22); }

  /* header: avatar + "Good afternoon / name" on the left, white bell on the right */
  .topbar { padding: 14px 18px 10px; gap: 12px; background: rgba(245, 247, 252, .94); backdrop-filter: blur(10px); border-bottom: 0; }
  .menu-btn { display: none; }
  .topbar .spacer { order: 1; }
  .bell-wrap { order: 2; }
  .user-menu { order: 0; min-width: 0; }
  .user-btn { gap: 12px; padding: 0; min-width: 0; }
  .user-btn:hover { background: none; }
  .user-btn .avatar { width: 48px; height: 48px; font-size: 1rem; flex: none; box-shadow: 0 0 0 3px #fff, 0 6px 16px -6px rgba(22, 29, 92, .5); }
  .user-text { display: block !important; min-width: 0; }
  .user-text .m-greet { display: block; color: var(--muted); font-size: .8rem; }
  .user-text b { font-size: 1.08rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .user-text .role { display: none; }
  #user-dd { left: 0; right: auto; }
  .bell-btn { width: 46px; height: 46px; border-radius: 14px; background: #fff; color: var(--navy); box-shadow: 0 6px 16px -8px rgba(22, 29, 92, .35); }
  .bell-btn em { border-color: #fff; top: -4px; right: -4px; }
  .bell-panel { position: fixed; top: 74px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 180px); border-radius: 18px; border: 0; }

  /* pages */
  .view { padding: 8px 16px calc(150px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 1.55rem; }
  .card { border: 0; border-radius: 18px; box-shadow: var(--card-shadow); padding: 16px; margin-bottom: 14px; }
  .notice { border-radius: 16px; }
  .btn { border-radius: 12px; min-height: 42px; }
  .btn-small { min-height: 34px; border-radius: 10px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  input, select, textarea { min-height: 46px; border-radius: 11px; border: 1.5px solid #d4dbec; font-size: 16px; }
  input[type=checkbox], input[type=radio] { min-height: 0; width: 18px; height: 18px; }
  .tabs { border-bottom: 0; gap: 6px; padding: 4px; background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); }
  .tabs a { border: 0; margin: 0; border-radius: 10px; padding: 8px 14px; }
  .tabs a.active { background: linear-gradient(135deg, var(--brand), #4558cc); color: #fff; }
  .badge { padding: 4px 11px; font-size: .74rem; }

  /* lists: each row is its own white card (the card around them disappears) */
  .card:has(> .table-wrap), .card:has(> .table) { background: transparent; box-shadow: none; padding: 0; }
  .card:has(> .table-wrap) > .card-head, .card:has(> .table-wrap) > h2 { padding: 0 4px; }
  .table tr { background: #fff; border: 0; border-radius: 16px; box-shadow: var(--card-shadow); margin-bottom: 12px; padding: 12px 14px; }
  .table tbody tr:hover { background: #fff; }
  .table td { padding: 5px 0; }
  .table td.actions { padding-top: 10px; margin-top: 4px; border-top: 1px solid #eef1f7; }

  /* dashboard numbers: three small tiles in one row */
  .home-head { display: none; }
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .dash-stat { padding: 12px; border: 0; border-radius: 16px; box-shadow: var(--card-shadow); }
  .dash-stat b { font-size: 1.35rem; }
  .dash-stat.ok b { font-size: .86rem; padding-top: 4px; }
  .dash-stat span { font-size: .74rem; }
  .note-list li > a { border-radius: 12px; }

  /* menu drawer (from "More") */
  .sidebar { border-radius: 0 22px 22px 0; padding-bottom: 90px; }

  /* bottom tab bar */
  .m-tabs {
    display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
    position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid #e6eaf4;
  }
  .m-tabs a, .m-tabs button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
    border: 0; background: none; cursor: pointer; font: inherit; font-size: .7rem; font-weight: 600;
    color: #8a93ad; text-decoration: none; border-radius: 12px; white-space: nowrap;
  }
  .m-tabs .ico { width: 23px; height: 23px; }
  .m-tabs .active { color: var(--brand); }
  .m-tabs .active .ico { stroke-width: 2.4; }
  .m-tabs em { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff5d5d; color: #fff; font-style: normal; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
  .nav-open .m-tabs { z-index: 55; }

  /* floating Request Leave */
  .m-fab {
    display: flex; align-items: center; gap: 8px; position: fixed; z-index: 44; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom));
    padding: 14px 22px 14px 18px; border-radius: 16px; text-decoration: none; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--brand), #4558cc); box-shadow: 0 14px 28px -10px rgba(46, 49, 146, .75);
  }
  .m-fab .ico { width: 20px; height: 20px; stroke-width: 2.6; }
  .m-fab[hidden] { display: none; }
  #toasts { bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 760px) { .sidebar { box-shadow: none; } .nav-open .sidebar { box-shadow: 0 0 40px rgba(0, 0, 0, .25); } }

/* =====================================================================
   Phone app for heads (lite.js): leave requests with Approve / Reject
   ===================================================================== */
.dropdown .m-only { display: none; }
@media (max-width: 760px) { .dropdown .m-only { display: flex; } }
.lite { min-height: 100vh; min-height: 100dvh; background: #f5f7fc; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
.lite-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; margin: 0 -16px; padding: 14px 18px 10px; background: rgba(245, 247, 252, .94); backdrop-filter: blur(10px); }
.lite-title { margin: 10px 2px 14px; font-size: 1.55rem; font-weight: 800; color: var(--navy); }
.lite .notice { border-radius: 16px; margin-bottom: 14px; }
.lite-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; background: #fff; border-radius: 14px; box-shadow: 0 4px 14px -8px rgba(22, 29, 92, .25); margin-bottom: 16px; }
.lite-seg button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 6px; border: 0; border-radius: 10px; background: none; color: #69728f; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; transition: background .2s, color .2s; }
.lite-seg button .ico { width: 17px; height: 17px; }
.lite-seg button.on { background: linear-gradient(135deg, var(--brand), #4558cc); color: #fff; box-shadow: 0 6px 14px -6px rgba(46, 49, 146, .7); }
.lite-seg em { font-style: normal; font-size: .7rem; font-weight: 800; background: #ffb020; color: #fff; border-radius: 999px; padding: 1px 7px; }
.lite-seg button.on em { background: #fff; color: var(--brand); }
.lite-list { display: flex; flex-direction: column; gap: 12px; }
.lite .app-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 46px 20px; text-align: center; color: var(--muted); background: #fff; border-radius: 18px; }
.lite .app-empty .ico { width: 42px; height: 42px; stroke: #b5bdd6; stroke-width: 1.6; margin-bottom: 6px; }
.lite .app-empty b { color: var(--navy); }
.lite .app-loading { display: grid; place-items: center; padding: 50px; }

.lr-card { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 4px 16px -8px rgba(22, 29, 92, .22); animation: lr-up .35s ease both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes lr-up { from { opacity: 0; transform: translateY(8px); } }
.lr-head { display: flex; align-items: center; gap: 12px; }
.lr-av { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 75% 92%); }
.lr-who { flex: 1; min-width: 0; }
.lr-who b { display: block; color: var(--navy); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-who small { color: var(--muted); font-size: .8rem; }
.lr-days { flex: none; padding: 5px 11px; border-radius: 999px; background: #eaeefb; color: var(--brand); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.lite .pill { padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.lite .s-pending { background: #fff3e0; color: #f08c00; }
.lite .s-approved { background: #e6f7ee; color: #1e9e5c; }
.lite .s-rejected { background: #fdecec; color: #e03131; }
.lr-type { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f5f7fc; }
.lr-type b { color: var(--text); font-size: .95rem; }
.lr-type span { display: inline-flex; align-items: center; gap: 6px; color: #4a5372; font-size: .88rem; font-weight: 600; }
.lr-type .ico { width: 15px; height: 15px; }
.lr-note { display: flex; gap: 8px; margin: 10px 0 0; padding: 0 2px; color: #55607d; font-size: .88rem; }
.lr-note .ico { width: 15px; height: 15px; margin-top: 3px; color: #9aa2b8; }
.lr-meta { margin-top: 10px; padding: 0 2px; color: #9aa2b8; font-size: .76rem; }
.lr-act { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.lr-act:has(> :only-child) { grid-template-columns: 1fr; }
.lr-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border-radius: 14px; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; transition: transform .1s, filter .2s; }
.lr-btn:active { transform: scale(.97); }
.lr-btn .ico { width: 19px; height: 19px; stroke-width: 2.6; }
.lr-btn.yes { border: 0; color: #fff; background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 10px 20px -10px rgba(22, 163, 74, .8); }
.lr-btn.no { border: 1.5px solid #f5c7c7; color: #e03131; background: #fff; }
.lite #user-dd { min-width: 230px; } .lite #user-dd button { white-space: nowrap; text-align: left; justify-content: flex-start; }

/* =====================================================================
   Sign in (system): company video full screen + blue / violet glow + glass form
   ===================================================================== */
.auth3 { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px 70px; overflow: hidden; color: #fff; background: #24168f; isolation: isolate; }
.auth3-video { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; z-index: -3; filter: blur(14px) saturate(1.3) brightness(.9); opacity: .55; }
.auth3-glow { position: absolute; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(ellipse at 15% 20%, rgba(116, 90, 255, .85), transparent 55%), radial-gradient(ellipse at 85% 75%, rgba(60, 70, 230, .85), transparent 55%), linear-gradient(135deg, rgba(43, 30, 160, .75), rgba(120, 80, 220, .6)); }
.auth3-glow i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .7; animation: a3-float 16s ease-in-out infinite alternate; }
.auth3-glow i:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: #6a4dff; }
.auth3-glow i:nth-child(2) { width: 40vmax; height: 40vmax; right: -10vmax; bottom: -14vmax; background: #2f3fd8; animation-duration: 20s; animation-direction: alternate-reverse; }
.auth3-glow i:nth-child(3) { width: 30vmax; height: 30vmax; left: 45%; top: 35%; background: #a26bf0; opacity: .45; animation-duration: 24s; }
@keyframes a3-float { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .auth3-glow i { animation: none; } }

.auth3-box { width: 100%; max-width: 390px; display: flex; flex-direction: column; align-items: center; text-align: center; animation: a3-in .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes a3-in { from { opacity: 0; transform: translateY(14px); } }
.auth3-logo { width: 190px; height: 92px; object-fit: cover; object-position: center; filter: drop-shadow(0 6px 18px rgba(10, 6, 60, .35)); }
.auth3-tag { margin: 6px 0 0; font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.auth3-box h1 { margin: 22px 0 22px; font-size: 2rem; font-weight: 500; letter-spacing: .01em; color: #fff; }
.auth3-sub { margin: -10px 0 20px; color: rgba(255, 255, 255, .8); font-size: .92rem; line-height: 1.5; }
.auth3-sub b { color: #fff; }
.auth3-box form { width: 100%; gap: 16px; text-align: left; }

/* glass inputs (pill shaped on the sign-in form) */
.auth3 input:not([type=checkbox]) { width: 100%; min-height: 52px; padding: 12px 20px; border-radius: 16px; font-size: 16px; color: #fff;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s, box-shadow .2s; }
.auth3 input::placeholder { color: rgba(255, 255, 255, .72); }
.auth3 input:hover { background: rgba(255, 255, 255, .2); }
.auth3 input:focus { outline: none; background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .7); box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.auth3 input:-webkit-autofill { -webkit-text-fill-color: #fff; transition: background-color 9999s; box-shadow: 0 0 0 40px rgba(110, 90, 230, .55) inset; }
.pill-field { position: relative; display: block; }
.pill-field input:not([type=checkbox]) { border-radius: 999px; padding-left: 52px; }
.pill-field svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; pointer-events: none; }
.auth3 .field > span { color: rgba(255, 255, 255, .9); font-weight: 600; }
.auth3 .field small { color: rgba(255, 255, 255, .7); }

.auth3-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 8px; font-size: .86rem; }
.auth3-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: rgba(255, 255, 255, .92); user-select: none; position: relative; }
.auth3-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auth3-check i { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(255, 255, 255, .75); display: grid; place-items: center; transition: background .2s; }
.auth3-check input:checked + i { background: #fff; }
.auth3-check input:checked + i::after { content: ''; width: 9px; height: 5px; border: solid #3a2bb8; border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg); }
.auth3-check input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }
.auth3 .link { color: #fff; font-weight: 500; opacity: .9; }
.auth3 .link:hover { opacity: 1; }
.auth3 form > .link { align-self: center; }

.auth3-btn, .auth3 .btn-block { width: 100%; min-height: 52px; margin-top: 4px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .02em;
  color: #2b2290; background: rgba(255, 255, 255, .9); box-shadow: 0 14px 30px -14px rgba(10, 6, 60, .7); transition: background .2s, transform .15s, box-shadow .2s; }
.auth3-btn:hover, .auth3 .btn-block:hover { background: #fff; filter: none; transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(10, 6, 60, .8); }
.auth3-btn:active, .auth3 .btn-block:active { transform: translateY(1px); }
.auth3-btn:disabled, .auth3 .btn-block:disabled { opacity: .7; cursor: wait; transform: none; }
.auth3 .form-error { background: rgba(255, 70, 90, .22); color: #fff; border: 1px solid rgba(255, 140, 150, .5); border-radius: 14px; padding: 10px 16px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.auth3-foot { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font-size: .76rem; color: rgba(255, 255, 255, .6); padding: 0 16px; }
@media (max-width: 480px) { .auth3-box h1 { font-size: 1.75rem; margin: 18px 0; } .auth3-logo { width: 160px; height: 78px; } }

/* sign in: logo comes in, floats gently, a light sweeps across it now and then */
.auth3-logo { position: relative; display: block; width: 190px; height: 92px; object-fit: initial; filter: drop-shadow(0 6px 18px rgba(10, 6, 60, .35));
  animation: a3-logo-in 1s cubic-bezier(.2, .9, .25, 1.15) both, a3-bob 6s ease-in-out 1.2s infinite; }
.auth3-logo img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.auth3-shine { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/img/logo-white.png) center / contain no-repeat; mask: url(/img/logo-white.png) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, #fff 50%, rgba(190, 210, 255, .9) 53%, transparent 64%) no-repeat; background-size: 260% 100%;
  animation: a3-shine 5s ease-in-out 1.4s infinite; }
@keyframes a3-logo-in { from { opacity: 0; transform: translateY(-14px) scale(.86); filter: blur(6px) drop-shadow(0 6px 18px rgba(10, 6, 60, .35)); } }
@keyframes a3-bob { 50% { transform: translateY(-5px); filter: drop-shadow(0 12px 22px rgba(10, 6, 60, .3)) drop-shadow(0 0 16px rgba(200, 190, 255, .45)); } }
@keyframes a3-shine { 0% { background-position: 130% 0; } 45%, 100% { background-position: -30% 0; } }
@media (max-width: 480px) { .auth3-logo { width: 160px; height: 78px; } }
@media (prefers-reduced-motion: reduce) { .auth3-logo, .auth3-shine { animation: none; } }

/* eye button in password boxes */
.pw-wrap { position: relative; display: block; width: 100%; }
.auth3 .pw-wrap input:not([type=checkbox]) { padding-right: 54px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; opacity: .8; transition: background .2s, opacity .2s; }
.pw-eye:hover, .pw-eye:focus-visible { opacity: 1; background: rgba(255, 255, 255, .16); }
.pw-eye:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.pw-eye svg { position: static; transform: none; opacity: 1; display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* "TRIAL VERSION" rubber stamp: sign-in pages and next to the bell */
.trial-stamp { display: block; flex: none; width: 50px; height: 50px; transform: rotate(-8deg); filter: drop-shadow(0 3px 6px rgba(150, 20, 30, .22)); user-select: none; pointer-events: none; }
.auth3-trial, .rq-login-trial { position: absolute; z-index: 2; animation: trial-stamp-in .6s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
.auth3-trial { top: 20px; right: 22px; width: 104px; height: 104px; }
.rq-login { position: relative; }
.rq-login-trial { top: 12px; right: 12px; width: 84px; height: 84px; }
.app-hello .trial-stamp { margin-left: auto; width: 54px; height: 54px; }
.app-hello .trial-stamp + .app-bell { margin-left: 0; }
@keyframes trial-stamp-in { from { opacity: 0; transform: scale(1.8) rotate(-24deg); } to { opacity: 1; transform: rotate(-8deg); } }
@media (max-width: 760px) { .trial-stamp { width: 46px; height: 46px; } .topbar .trial-stamp { order: 2; } .bell-wrap { order: 3; } }
@media (max-width: 480px) { .auth3-trial { top: 12px; right: 12px; width: 78px; height: 78px; } .rq-login-trial { top: 8px; right: 8px; width: 70px; height: 70px; } }
@media (prefers-reduced-motion: reduce) { .auth3-trial, .rq-login-trial { animation: none; } }
/* ======================================================================
   Able Container Line theme: logo blue (#28398A) + logo red (#CF2830)
   ====================================================================== */
:root { --brand: #28398a; --accent: #cf2830; --accent-bg: #fdecee; }
/* thin blue → red line across the top of the sidebar and under the top bar */
/* sidebar: dark logo-blue, with the blue → red line on top (two background layers) */
.sidebar { background: linear-gradient(90deg, #3a50b4, var(--accent)) top / 100% 4px no-repeat, linear-gradient(185deg, #141c4d 0%, #1d2a6b 55%, #28398a 100%); }
.topbar { border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, var(--brand) 0%, var(--brand) 55%, var(--accent) 100%) 1; }
.brand img { background: #fff; }
.brand strong { color: #fff; }
.brand small { color: #ff9ca2; font-weight: 600; }
/* active menu item: white, blue text, red marker on the left */
.nav a.active { box-shadow: inset 3px 0 0 var(--accent), 0 8px 18px -10px rgba(0, 0, 0, .5); }
.nav-group { color: rgba(255, 156, 162, .8); }
.btn-danger-outline { border-color: color-mix(in srgb, var(--accent) 35%, #fff); }

/* sign-in / first-time setup: deep blue with a red glow, full-colour logo on a white badge */
.auth3 { background: linear-gradient(140deg, #16204f 0%, #28398a 55%, #6e1d2b 100%); }
.auth3-glow { background: radial-gradient(ellipse at 15% 20%, rgba(58, 80, 180, .8), transparent 55%), radial-gradient(ellipse at 88% 85%, rgba(207, 40, 48, .7), transparent 50%), linear-gradient(140deg, rgba(22, 32, 79, .85), rgba(40, 57, 138, .7)); }
.auth3-glow i:nth-child(1) { background: #3a50b4; }
.auth3-glow i:nth-child(2) { background: #cf2830; opacity: .5; }
.auth3-glow i:nth-child(3) { background: #5b6fd6; opacity: .35; }
/* white logo straight on the background (no badge), with the light sweep across it */
.auth3-logo { width: 215px; height: auto; aspect-ratio: 356 / 288; filter: drop-shadow(0 6px 18px rgba(5, 10, 40, .35)); }
.auth3-logo img { width: 100%; height: 100%; object-fit: contain; opacity: .95; }
.auth3-shine { -webkit-mask: url(/img/logo-white.png) center / contain no-repeat; mask: url(/img/logo-white.png) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, #fff 50%, rgba(255, 190, 195, .9) 53%, transparent 64%) no-repeat; background-size: 260% 100%; }
@keyframes a3-bob { 50% { transform: translateY(-5px); filter: drop-shadow(0 12px 22px rgba(5, 10, 40, .3)) drop-shadow(0 0 16px rgba(255, 255, 255, .35)); } }
.auth3-tag { color: rgba(255, 255, 255, .85); }
.auth3-btn, .auth3 .btn-block { color: #28398a; }
.auth3-check input:checked + i::after { border-color: #28398a; }
.auth3 input:-webkit-autofill { box-shadow: 0 0 0 40px rgba(40, 57, 138, .6) inset; }
@media (max-width: 480px) { .auth3-logo { width: 175px; height: auto; } }
