:root {
  --font-body: 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-head: 'Source Serif 4', Georgia, "Times New Roman", serif;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #1b2a4a;
  --brand-ink: #ffffff;
  --brand-tint: #e8ecf5;
  --accent: #f5a623;
  --danger: #c0392b;
  --danger-tint: #fbe9e6;
  --warn: #a8630a;
  --warn-tint: #fdf0d9;
  --ok: #2f855a;
  --ok-tint: #e4f3ea;
  --off-tint: #eef0f3;
  --leave-tint: #ece6fb;
  --leave: #5b3fb5;
  --shadow: 0 1px 2px rgba(22, 33, 46, .06), 0 4px 14px rgba(22, 33, 46, .07);
  --radius: 16px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e141b; --surface: #16202b; --surface-2: #1b2733; --ink: #e7edf3; --muted: #9aa9b8; --line: #2a3846;
  --brand: #8fa8de; --brand-ink: #0b1426; --brand-tint: #1a2540; --accent: #f5a623;
  --danger: #f0786a; --danger-tint: #3a1f1c; --warn: #e8b05a; --warn-tint: #3a2b14; --ok: #5fcb92; --ok-tint: #17301f;
  --off-tint: #222c37; --leave-tint: #2b2347; --leave: #b9a5f5;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141b; --surface: #16202b; --surface-2: #1b2733; --ink: #e7edf3; --muted: #9aa9b8; --line: #2a3846;
    --brand: #8fa8de; --brand-ink: #0b1426; --brand-tint: #1a2540; --accent: #f5a623;
    --danger: #f0786a; --danger-tint: #3a1f1c; --warn: #e8b05a; --warn-tint: #3a2b14; --ok: #5fcb92; --ok-tint: #17301f;
    --off-tint: #222c37; --leave-tint: #2b2347; --leave: #b9a5f5;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh;
  font: 16px/1.45 var(--font-body);
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-family: var(--font-head); font-weight: 600; letter-spacing: -0.005em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-right: auto; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.danger { color: var(--danger); }
.btn.big { padding: 16px 22px; font-size: 1.15rem; border-radius: 14px; }
.btn.sm { padding: 4px 9px; font-size: .82rem; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

label.f { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); }
label.f input, label.f select, label.f textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font-weight: 400; font-size: 1rem;
}
.check { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-size: .95rem; }

/* Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

/* Kiosk */
.clock { text-align: center; padding: 18px 0 8px; }
.clock .time { font-size: clamp(2.6rem, 9vw, 4.6rem); font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.clock .date { color: var(--muted); font-size: 1.05rem; }
.kiosk-search { max-width: 520px; margin: 12px auto 18px; }
.kiosk-search input { width: 100%; padding: 14px 16px; font-size: 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; cursor: pointer;
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0;
}
.tile:hover { border-color: var(--brand); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; background: var(--brand-tint); color: var(--brand); }
.tile .nm { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill.in { background: var(--ok-tint); color: var(--ok); }
.pill.out { background: var(--off-tint); color: var(--muted); }
.pill.done { background: var(--brand-tint); color: var(--brand); }
.pill.late { background: var(--warn-tint); color: var(--warn); }

/* Modal */
.ov { position: fixed; inset: 0; background: rgba(10, 16, 24, .55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); }
.modal.wide { max-width: 640px; }
.pinbox { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.pinbox span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brand); }
.pinbox span.f { background: var(--brand); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { padding: 16px 0; font-size: 1.4rem; font-weight: 700; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.pad button:active { background: var(--brand-tint); }
.err { color: var(--danger); font-weight: 600; min-height: 1.4em; text-align: center; }
.success { text-align: center; padding: 10px 0; }
.success .big { font-size: 3.2rem; }
.success .t { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 5px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

table.reg { font-size: .8rem; }
table.reg th, table.reg td { padding: 3px 3px; text-align: center; }
table.reg th.emp, table.reg td.emp { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 200px; padding-left: 10px; }
table.reg th.emp { background: var(--surface-2); }
table.reg th.wk { color: var(--danger); }
td.c { cursor: pointer; font-weight: 700; min-width: 30px; border-left: 1px solid var(--line); }
td.c:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.c-P { background: var(--ok-tint); color: var(--ok); }
.c-HD { background: var(--warn-tint); color: var(--warn); }
.c-A { background: var(--danger-tint); color: var(--danger); }
.c-MP { background: var(--warn-tint); color: var(--danger); }
.c-L, .c-CL, .c-SL, .c-PL, .c-CO, .c-OL { background: var(--leave-tint); color: var(--leave); }
.c-LWP { background: var(--leave-tint); color: var(--danger); }
.c-WO, .c-H { background: var(--off-tint); color: var(--muted); }
.c-IN { background: var(--brand-tint); color: var(--brand); }
td.c sup { color: var(--warn); font-size: .7em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.legend b { display: inline-block; min-width: 30px; padding: 1px 4px; border-radius: 5px; text-align: center; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .n { font-size: 1.6rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: .82rem; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 60; font-weight: 600; }
.note { background: var(--warn-tint); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.sess { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }

@media print {
  .topbar, .tabs, .noprint, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .tablewrap { overflow: visible; border: 0; }
  table.reg { font-size: 9px; }
}

/* --- online version additions */
.center { text-align: center; }
.auth { max-width: 440px; margin: 40px auto; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; padding: 10px; border: 0; background: var(--surface); cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.punchbtn { width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; border: 0; font-size: 1.6rem; font-weight: 800; cursor: pointer; color: #fff; background: var(--ok); box-shadow: var(--shadow); display: grid; place-items: center; margin: 18px auto; max-width: 100%; }
.punchbtn.out { background: var(--danger); }
.punchbtn:disabled { opacity: .6; cursor: wait; }
.big-status { font-size: 1.1rem; font-weight: 700; }
.list { display: flex; flex-direction: column; gap: 5px; }
.item { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; flex-wrap: wrap; }
.item .main { min-width: 0; flex: 1; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; font-size: .85rem; }
.pill.flag { background: var(--danger-tint); color: var(--danger); }
td.c i { color: var(--danger); font-style: normal; font-size: .7em; vertical-align: super; }
.mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini div { border-radius: 6px; padding: 4px 0; text-align: center; font-size: .75rem; font-weight: 700; }
.mini .dn { color: var(--muted); font-weight: 400; font-size: .65rem; display: block; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ===== Company workspace: left menu + top bar (same idea as the GC HR suite) ===== */
.ico { flex: none; vertical-align: middle; }
.app { display: flex; min-height: 100vh; }
.side { width: 244px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.side-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 56px; }
.side-head img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.side-head .who { min-width: 0; }
.side-head .who b { display: block; font-size: .85rem; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-head .who span { display: block; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side nav { flex: 1; overflow-y: auto; padding: 6px 8px 10px; }
.nav-group { font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: #94a3b8; padding: 0 10px; margin: 12px 0 2px; }
.nav-link { display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 10px; min-height: 32px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: .88rem; text-align: left; cursor: pointer; margin: 0; }
.nav-link:hover { background: var(--off-tint); color: var(--brand); }
.nav-link.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--brand); font-weight: 600; }
.nav-link .nb { margin-left: auto; background: #e04a4a; color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700; padding: 1px 7px; }
.nav-link.danger { color: #e05d5d; }
/* a menu entry with pages underneath (CRM): the arrow opens and closes them */
.nav-row { display: flex; align-items: center; }
.nav-row .nav-link { flex: 1; }
.nav-tog { flex: none; width: 28px; height: 28px; border: 0; background: none; color: var(--muted); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.nav-tog:hover { background: var(--off-tint); color: var(--brand); }
.nav-tog svg { transition: transform .15s; transform: rotate(-90deg); }
.nav-tree.open .nav-tog svg { transform: none; }
.nav-subs { display: none; margin: 1px 0 4px 18px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-tree.open .nav-subs { display: block; }
#crm-tabs[hidden] { display: none; }
.nav-link.nav-sub { min-height: 29px; padding: 4px 10px; font-size: .84rem; }
.nav-link.danger:hover { background: var(--danger-tint); color: var(--danger); }
.side-foot { border-top: 1px solid var(--line); padding: 6px 8px; }
@media (min-width: 901px) { .app.side-off .side { display: none; } }          /* the menu button hides and shows the sidebar on a computer */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 8px 20px; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.top .grow { flex: 1; }
.top .date { color: var(--muted); font-size: .85rem; }
.avatar-s { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.hamb { display: inline-flex; background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--brand); }
.hamb:hover { background: var(--off-tint); }
.comenu { position: relative; }
.copill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; color: var(--brand); cursor: pointer; max-width: 100%; }
.copill.static { cursor: default; }
.copill .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.copill:not(.static):hover { border-color: var(--brand); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.menu { display: none; position: absolute; left: 0; top: calc(100% + 6px); min-width: 280px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, .15); padding: 6px; z-index: 60; }
.menu.open { display: block; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.menu-item:hover { background: var(--surface-2); }
.menu-item.on { font-weight: 700; color: var(--brand); }
.menu-item .mi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item.add { color: var(--brand); font-weight: 600; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; padding-top: 12px; }
.page { padding: 16px 20px 32px; width: 100%; max-width: 1400px; }
.page-title { font-size: 1.5rem; color: var(--brand); }
.kpi { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 8px 10px; }
.kpi-card[data-tab] { cursor: pointer; }
.kpi-card[data-tab]:hover { border-color: var(--brand); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.kpi-ico.blue { background: #e8f0ff; color: #3b6fd4; }
.kpi-ico.green { background: #e4f6ec; color: #1f9d63; }
.kpi-ico.amber { background: #fdf0d9; color: #d48806; }
.kpi-ico.red { background: #fdeaea; color: #e04a4a; }
.kpi-ico.purple { background: #f1e9fd; color: #7c3aed; }
.kpi-n { font-family: inherit; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.45rem; line-height: 1; }
.kpi-l { color: var(--muted); font-size: .74rem; margin-top: 4px; line-height: 1.2; }
.kpi-n.blue { color: #3b6fd4; } .kpi-n.green { color: #1f9d63; } .kpi-n.amber { color: #d48806; } .kpi-n.red { color: #e04a4a; } .kpi-n.purple { color: #7c3aed; }
.scrim { display: none; }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 10px 40px rgba(15, 23, 42, .25); }
  .side.open { transform: none; }
  .side.open + .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 35; }
  .hamb { display: inline-flex; }
  .top { padding: 10px 14px; }
  .top .date { display: none; }
  .page { padding: 12px 12px 32px; }
  .page-title { font-size: 1.3rem; }
  .menu { min-width: min(300px, 86vw); }
  .kpi { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .kpi-card { padding: 7px 8px; }
}
@media print { .side, .top { display: none !important; } .page { padding: 0; } }

/* ===== Branding: a company colour replaces the default navy and amber ===== */
:root[data-brand] { --brand: var(--brand-custom); --brand-ink: var(--brand-contrast, #fff); --brand-tint: color-mix(in srgb, var(--brand-custom) 12%, white); --accent: var(--brand-custom); }
@media (prefers-color-scheme: dark) {
  :root[data-brand]:not([data-theme="light"]) { --brand: color-mix(in srgb, var(--brand-custom) 55%, white); --brand-ink: #0b1426; --brand-tint: color-mix(in srgb, var(--brand-custom) 28%, #0e141b); --accent: var(--brand); }
}
.side-head img, .e-head img, .brand img { object-fit: contain; background: transparent; }

/* ===== Read-only roles (Leadership): hide everything that changes data ===== */
.readonly .edit-only, .readonly [data-act="empnew"], .readonly [data-act="empimport"], .readonly [data-act="empedit"], .readonly [data-act="holimport"], .readonly [data-act="holnat"], .readonly [data-act="holdel"],
.readonly [data-act="leavenew"], .readonly [data-act="leavedecide"], .readonly button[data-act="day"] { display: none !important; }
.readonly td.c { pointer-events: none; }

/* ===== Admin pages: roles, branding, phone app tab ===== */
.kpi.roles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kpi.roles .kpi-card { padding: 14px 16px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.qr { width: 200px; max-width: 100%; margin: 4px auto; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
.steps { margin: 6px 0 0; padding-left: 20px; font-size: .92rem; color: var(--muted); }
.steps li { margin: 3px 0; }
.mock-web { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; min-height: 150px; color: #1e293b; }
.mock-side { width: 44%; border-right: 1px solid #e2e8f0; padding: 10px; }
.mock-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .75rem; }
.mock-head img, .mock-phead img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; }
.mock-nav { padding: 6px 8px; border-radius: 8px; font-size: .75rem; color: #64748b; margin: 2px 0; }
.mock-nav.on { font-weight: 700; }
.mock-main { flex: 1; padding: 12px; }
.mock-title { font-family: inherit; font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.mock-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mock-btn { padding: 5px 12px; border-radius: 8px; font-size: .75rem; font-weight: 700; }
.mock-pill { padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.mock-phone { width: 190px; border: 6px solid #0f172a; border-radius: 26px; overflow: hidden; background: #f8fafc; color: #1e293b; }
.mock-phead { display: flex; align-items: center; gap: 6px; padding: 8px; background: #fff; border-bottom: 1px solid #e2e8f0; font-size: .7rem; }
.mock-punch { margin: 14px auto; width: 84px; height: 84px; border-radius: 50%; background: #2f855a; color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.mock-pnav { display: flex; justify-content: space-around; padding: 6px 2px; font-size: .55rem; background: #fff; border-top: 1px solid #e2e8f0; color: #64748b; }

/* ===== Celebrations (birthdays and work anniversaries) ===== */
.cel { display: flex; gap: 10px; align-items: center; padding: 8px 0; text-align: left; }
.cellist .cel + .cel { border-top: 1px solid var(--line); }
.cel-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.cel-ic.birthday { background: #fdeaf3; color: #d9488b; }
.cel-ic.anniversary { background: #fdf0d9; color: #d48806; }
.celgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 18px; }

/* ===== Employee phone app: header, tabs, bottom menu ===== */
.e-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 560px; margin: 0 auto; background: var(--bg); }
.e-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.e-head img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.e-head .who { flex: 1; min-width: 0; }
.e-head .who b { display: block; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.e-head .who span { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-body { flex: 1; overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.e-nav { display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.e-nav button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 8px; border: 0; background: none; color: var(--muted); font-size: .7rem; font-weight: 600; cursor: pointer; }
.e-nav button.on { color: var(--brand); }
.e-nav button.on::before { content: ""; position: absolute; top: 0; left: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.e-nav .dotb { position: absolute; top: 6px; left: 55%; width: 9px; height: 9px; border-radius: 50%; background: #e04a4a; }
.etiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.et { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.et b { display: block; font-family: inherit; font-size: 1.4rem; font-weight: 700; color: var(--brand); }
.et span { display: block; font-size: .7rem; color: var(--muted); }
.next-hol h2 { color: var(--brand); margin: 2px 0; }
.phoneframe { width: 390px; max-width: 100%; height: 800px; margin: 8px auto 24px; border: 11px solid #0f172a; border-radius: 42px; overflow: hidden; box-shadow: 0 18px 50px rgba(15, 23, 42, .25); background: var(--bg); }
.phoneframe .e-app { height: 100%; max-width: none; }
@media (max-width: 480px) { .phoneframe { border-width: 8px; border-radius: 30px; } }

/* employee app: keep the punch button and the day's information on the first screen */
.e-app .clock { padding: 4px 0 0; }
.e-app .clock .time { font-size: clamp(2rem, 9vw, 2.8rem); }
.e-app .punchbtn { width: min(170px, 44vw); font-size: 1.25rem; margin: 10px auto; }
.e-app .e-body > .stack > * + * { margin-top: 10px; }

/* weekly off: day picker, planner */
.wod { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; }
.wod button { padding: 6px 0; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.wod button span { font-size: .6rem; font-weight: 500; color: var(--muted); }
.wod button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.wod button.on span { color: inherit; opacity: .8; }
.wod button:disabled { opacity: .35; cursor: not-allowed; }
.readonly [data-act="wocell"] { pointer-events: none; }

/* leadership (read only): hide the new decision / entry buttons too */
.readonly [data-act="regdecide"], .readonly [data-act="opopen"], .readonly [data-act="bknow"] { display: none !important; }

/* Site reports screens (site.js): plain filters and search boxes outside a labelled form */
#siteroot select, #siteroot input:not([type=checkbox]):not([type=file]) { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; color: inherit; max-width: 100%; }
#siteroot .item[data-s] { transition: background .12s; }
#siteroot .item[data-s]:hover { background: var(--surface-2); }

table td, table th, .num, .kpi-n { font-variant-numeric: tabular-nums; }

/* dashboard */
.dgrid3 { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 10px; align-items: stretch; }
.dgrid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; align-items: start; }
.dgrid3 > .card, .dgrid2 > .card { margin: 0 !important; min-width: 0; }
@media (max-width: 1100px) { .dgrid3, .dgrid2 { grid-template-columns: 1fr; } }
.gbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef1f5; }
.gbar span { display: block; height: 100%; }
.glegend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: .8rem; color: var(--muted); }
.glegend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.glegend b { color: var(--ink); }
.gfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.gnum { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.chip-b { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: .8rem; cursor: pointer; color: var(--muted); font-weight: 600; }
.chip-b span { opacity: .75; margin-left: 2px; }
.chip-b:hover { border-color: var(--brand); color: var(--brand); }
.chip-b.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.pager .grow { flex: 1; }
.whoq { min-width: 280px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table.dense th, table.dense td { padding: 4px 8px; }
tr.clk { cursor: pointer; } tr.clk:hover td { background: var(--off-tint); }
.celgrid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cel { padding: 4px 0; } .cel-ic { width: 28px; height: 28px; border-radius: 8px; }

/* employee photos: a round picture, or the initials until it is loaded / when there is none */
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--s, 36px); height: var(--s, 36px); border-radius: 50%; background: var(--brand-soft, #e8edf7) center / cover no-repeat; color: var(--brand); font-weight: 700; font-size: calc(var(--s, 36px) * .38); overflow: hidden; vertical-align: middle; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.photo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* photo crop step (sits above the form it was opened from) */
.cropov { position: fixed; inset: 0; background: rgba(10, 16, 24, .6); z-index: 70; display: grid; place-items: center; padding: 16px; }
.cropbox { position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin: 12px auto; overflow: hidden; border-radius: 12px; background: #111; touch-action: none; cursor: grab; outline-offset: 2px; }
.cropbox.grab { cursor: grabbing; }
.cropbox canvas { width: 100%; height: 100%; display: block; }
.cropmask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; }
.e-head .av { flex: none; }

/* page banner (1 Dec 2026) */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 22px; margin-bottom: 14px; border-radius: 16px; border-left: 5px solid #f5a623; color: #fff; background: linear-gradient(115deg, #14213f 0%, #223560 62%, #31456d 100%); box-shadow: 0 8px 22px rgba(20, 33, 63, .18); }
.hero-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: none; border-radius: 13px; background: linear-gradient(145deg, #ffbe45, #e8951a); color: #14213f; }
.hero-text { position: relative; z-index: 1; min-width: 0; flex: 1 1 220px; }
.hero-eyebrow { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .68; }
.hero h1 { margin: 1px 0 0; color: #fff; font: 600 1.45rem/1.2 var(--font-head); }
.hero p { margin: 2px 0 0; opacity: .8; font-size: .9rem; }
.hero-badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font: 600 .74rem/1.5 var(--font-body); }
.hero-art { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); opacity: .09; pointer-events: none; line-height: 0; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; width: 170px; height: 170px; }
.hero-art::after { width: 250px; height: 250px; }
.hero-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.hero-link { background: none; border: 0; color: #fff; font: 600 .85rem var(--font-body); cursor: pointer; padding: 6px 2px; }
.hero-link:hover { text-decoration: underline; }
.hero-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .35); }
.btn.gold { background: #f5a623; border-color: #f5a623; color: #14213f; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.btn.gold:hover { background: #ffb533; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
/* collapsible settings sections */
.acc-wrap { max-width: 1040px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(20, 33, 63, .05); }
.acc > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover .acc-title { color: var(--brand); }
.acc-ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; border-radius: 12px; color: #fff; }
.acc-ico.t1 { background: linear-gradient(145deg, #3a4a6b, #1d2a48); } .acc-ico.t2 { background: linear-gradient(145deg, #a78bfa, #8b2fe0); } .acc-ico.t3 { background: linear-gradient(145deg, #fb7185, #db2777); }
.acc-ico.t4 { background: linear-gradient(145deg, #38bdf8, #2563eb); } .acc-ico.t5 { background: linear-gradient(145deg, #34d399, #059669); }
.acc-head { display: flex; flex-direction: column; min-width: 0; }
.acc-title { font: 600 1.05rem/1.3 var(--font-head); }
.acc-sub { color: var(--muted); font-size: .85rem; }
.acc-count { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.acc-chev { margin-left: auto; color: var(--muted); line-height: 0; transition: transform .18s; }
.acc-count + .acc-chev { margin-left: 4px; }
.acc[open] > summary .acc-chev { transform: rotate(180deg); }
.acc-body { padding: 4px 18px 18px; border-top: 1px solid var(--line); padding-top: 14px; }
/* the menu under the round button at the top right */
.top { position: relative; }
button.avatar-s { border: 0; cursor: pointer; }
button.avatar-s:hover, button.avatar-s[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(245, 166, 35, .55); }
.umenu { position: absolute; right: 10px; top: calc(100% + 4px); z-index: 60; width: 310px; max-width: calc(100vw - 20px); max-height: 76vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(20, 33, 63, .22); padding: 8px; text-align: left; }
.um-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-label { margin: 10px 10px 4px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.um-list { max-height: 230px; overflow: auto; }
.umenu .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: inherit; font: 600 .9rem var(--font-body); text-align: left; cursor: pointer; }
.umenu .mi:hover, .umenu .mi.on { background: var(--surface-2); }
.umenu .mi .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.umenu .mi .muted { font-weight: 400; }
.um-sep { height: 1px; background: var(--line); margin: 6px 4px; }
@media (max-width: 640px) { .hero { padding: 13px 14px; gap: 11px; } .hero-ico { width: 40px; height: 40px; } .hero h1 { font-size: 1.2rem; } .hero p { font-size: .82rem; } .hero-art { right: -20px; } .hero-actions { margin-left: 0; width: 100%; } .acc > summary { padding: 12px; gap: 10px; } .acc-count { display: none; } .acc-body { padding-left: 12px; padding-right: 12px; } }
@media print { .hero, .umenu { display: none !important; } .vh { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; margin: 0; } }
.hero-badge[hidden], .acc-count[hidden] { display: none; }
.acc-ico.t6 { background: linear-gradient(145deg, #fbbf24, #f97316); }
.acc-count:empty { display: none; }

/* CRM (optional module): lists, board, notes */
.crm-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.crm-head h3 { margin: 0; display: flex; align-items: center; gap: 6px; }
.crm-bar > select, .crm-bar > input { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .95rem; }
.crm-rows { display: flex; flex-direction: column; gap: 6px; }
.crm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; }
.crm-row:hover, .crm-card:hover { border-color: var(--brand); }
.crm-row:focus-visible, .crm-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.crm-main { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.crm-main b, .crm-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 70px; }
.crm-own { min-width: 80px; text-align: right; }
@media (max-width: 640px) {
  .crm-row { grid-template-columns: minmax(0, 1fr) auto; }
  .crm-row .crm-val { text-align: left; }
  .crm-row .crm-own { text-align: right; }
}
/* CRM dashboard (C3) */
.stat .n.green { color: var(--ok, #15803d); }
.stat .n.red { color: var(--danger); }
.crm-brow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; text-align: left; }
.crm-brow > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-hbar { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.crm-hbar > span { display: block; height: 100%; border-radius: 6px; background: var(--brand); }
.crm-hbar > span.alt { background: var(--gold, #c9a227); }
#crm-dash .crm-bar { flex-wrap: wrap; gap: 8px; }
.crm-dfu { flex-wrap: wrap; gap: 10px; text-align: left; }
@media (max-width: 480px) { #crm-tabs { gap: 0; } #crm-tabs button { padding: 10px 8px; font-size: .88rem; } #crm-dash .seg button { padding: 8px 4px; font-size: .85rem; } }          /* a rep's four CRM tabs fit a 390 px phone without sideways scrolling */
.crm-board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.crm-col { flex: 0 0 240px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 120px; }
.crm-colh { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; padding: 2px 4px 8px; }
.crm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 7px; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.crm-card[draggable="true"] { cursor: grab; }
.crm-move { width: 100%; margin-top: 7px; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: .85rem; }
.crm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; text-align: left; }
.crm-facts > div > div { overflow-wrap: anywhere; }
.crm-note { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.crm-note textarea, #src-list, #lost-list { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; resize: vertical; }
.crm-act { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.crm-act.sys { color: var(--muted); font-size: .92rem; }
.crm-dup { background: var(--warn-tint); color: var(--warn); border-radius: 9px; padding: 8px 10px; font-size: .92rem; }
.crm-note select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .95rem; }

/* CRM follow-ups (step C2) */
.crm-fus { display: flex; flex-direction: column; gap: 6px; }
.crm-fu { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; text-align: left; }
.crm-fu.over { border-color: var(--danger); background: var(--danger-tint); }
.crm-fu.done { opacity: .65; }
.crm-fu .crm-main { flex: 1; }
.crm-fu .crm-main b, .crm-fu .crm-main span { white-space: normal; overflow-wrap: anywhere; }
.crm-fu .crm-main[data-act] { cursor: pointer; }
.crm-fu .fu-ph { width: 36px; flex: none; display: flex; justify-content: center; color: var(--ok); }
.crm-fu .fu-tools { display: flex; gap: 4px; flex: none; }
.crm-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .75rem; line-height: 18px; text-align: center; }
.crm-badge[hidden] { display: none; }
.crm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.crm-chips button { padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: .85rem; cursor: pointer; }
.crm-remind { text-align: left; }
