/* Timeclock web kiosk — pixel-faithful port of the Flutter iPad app.
   All values traced from flutter_app/lib (app_theme.dart, punch_screen.dart,
   numpad_widget.dart, pin_input_widget.dart, clock_widget.dart,
   status_bar_widget.dart, admin/otp/outlet screens). Alphas are Flutter
   withAlpha(N)/255. */

:root {
  --bg: #1A1A2E;
  --surface: #2A2A4A;
  --primary: #3B82F6;
  --punch-in: #065F46;
  --punch-out: #7C2D12;
  --online: #4CAF50;
  --offline: #F44336;
  --error: #FF5252;      /* redAccent */
  --warning: #FFC107;    /* amber */
  --text-1: #FFFFFF;
  --text-70: rgba(255, 255, 255, 0.702);  /* alpha 179 */
  --text-2: rgba(255, 255, 255, 0.60);    /* alpha 153 */
  --text-50: rgba(255, 255, 255, 0.502);  /* alpha 128 */
  --text-3: rgba(255, 255, 255, 0.40);    /* alpha 102 */
  --border: rgba(255, 255, 255, 0.20);    /* alpha 51 */
  --fill-faint: rgba(255, 255, 255, 0.051); /* alpha 13 */
  --fill-light: rgba(255, 255, 255, 0.078); /* alpha 20 */
  --fill-subtle: rgba(255, 255, 255, 0.102); /* alpha 26 */
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.hidden { display: none !important; }

svg { fill: currentColor; flex: 0 0 auto; }

.view { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
button:disabled { opacity: 0.35; cursor: default; }

input, select, textarea {
  font: inherit; font-size: 16px;
  color: var(--text-1);
  background: var(--fill-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px;
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border: 2px solid var(--primary); padding: 14px 15px; }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.54); }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-70) 50%), linear-gradient(135deg, var(--text-70) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
select option { background: var(--surface); color: var(--text-1); }

.btn-icon {
  color: var(--text-2); width: 44px; height: 44px;
  border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.btn-icon:active { background: var(--fill-light); }

/* ================= PAIRING (full-screen, Flutter style) ================= */

#view-pair { overflow-y: auto; display: block; }
.pair-scroll { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 32px; }
.pair-col {
  width: min(480px, 100%);
  margin-top: max(6vh, 24px);
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.pair-col-wide { width: min(540px, 100%); margin-top: max(4vh, 16px); }

.pair-back { position: absolute; left: -8px; top: -8px; }

.pair-logo {
  width: 80px; height: 80px; border-radius: 20px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.pair-logo-sm { width: 64px; height: 64px; border-radius: 16px; }

.pair-title { font-size: 32px; font-weight: 700; margin-top: 24px; }
.pair-title-sm { font-size: 26px; }
.pair-title-outlet { font-size: 28px; margin-top: 20px; }
.pair-subtitle { font-size: 16px; color: var(--text-70); margin-top: 8px; text-align: center; margin-bottom: 48px; }
.pair-subtitle-sm { font-size: 14px; margin-bottom: 32px; }

.pair-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }

.field { position: relative; width: 100%; }
.field > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.54); pointer-events: none; }
.field > input { padding-left: 48px; }
.field > input:focus { padding-left: 47px; }

.btn-primary {
  width: 100%; height: 52px;
  background: var(--primary); color: #fff;
  font-size: 18px; font-weight: 600;
  border-radius: 12px;
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center;
}
.btn-primary:active { filter: brightness(1.15); }
.btn-primary:disabled { background: rgba(59, 130, 246, 0.302); opacity: 1; }

.btn-secondary {
  background: var(--fill-light); color: var(--text-1); font-weight: 600;
  border-radius: 10px; padding: 12px 20px;
}
.btn-danger { background: #B91C1C; color: #fff; font-weight: 600; border-radius: 10px; padding: 12px 20px; }
.btn-link { color: var(--primary); font-size: 14px; font-weight: 600; padding: 10px; margin-top: 8px; }
.btn-link:disabled { color: var(--text-3); }
.btn-link-dim { color: var(--text-2); font-weight: 400; }

.or-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-top: 20px;
}
.or-row span { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.149); }
.or-row b { font-size: 12px; font-weight: 500; letter-spacing: 1px; color: var(--text-50); }

.code-input {
  text-transform: uppercase; text-align: center;
  font-size: 22px; letter-spacing: 8px; font-weight: 600;
  font-family: "Courier New", Courier, monospace;
  background: var(--fill-light);
}

.section-label {
  display: block; width: 100%; text-align: left;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  letter-spacing: 0.5px; margin: 8px 0 -8px;
}
.hint-i { font-size: 11px; font-style: italic; font-weight: 400; color: var(--text-3); letter-spacing: 0.3px; text-transform: none; }

.pair-error {
  width: 100%; padding: 12px;
  background: rgba(244, 67, 54, 0.102);
  border: 1px solid rgba(244, 67, 54, 0.302);
  border-radius: 8px;
  color: var(--error); font-size: 14px; line-height: 1.4;
}
.pair-version { margin-top: auto; padding-top: 24px; font-size: 12px; color: var(--text-3); }

/* ================= PUNCH SCREEN ================= */

/* Status bar: black@20% strip, storefront + "Company - Outlet", online dot
   + label, menu button. Padding 14/20 per status_bar_widget.dart. */
.status-bar {
  display: flex; align-items: center;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.20);
  position: relative;
  z-index: 10;
  gap: 14px;
}
.status-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.sb-store { color: var(--text-2); }
.outlet-label { font-size: 18px; color: var(--text-70); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-online { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.dot-on { background: var(--online); }
.dot-off { background: var(--offline); }
.online-text { font-size: 18px; color: var(--text-50); }

/* Status-alert badges (Flutter: overnight indigo@20% / missing amber@20%,
   radius 12, icon + w600 count, tappable). */
.sb-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 12px;
  font-weight: 600;
}
.sb-badge-indigo { background: rgba(63, 81, 181, 0.2); color: #536DFE; font-size: 16px; }
.sb-badge-amber { background: rgba(255, 193, 7, 0.2); color: #FFC107; font-size: 18px; }
.sb-badge:active { filter: brightness(1.3); }

.status-right { position: relative; margin-left: 6px; }
#btn-menu { color: var(--text-2); }

.menu {
  position: absolute; right: 0; top: 44px;
  background: var(--surface); border-radius: 12px;
  min-width: 260px; padding: 6px 0; z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.menu button {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  height: 52px; padding: 0 16px;
  font-size: 18px; color: var(--text-1);
}
.menu button svg { color: var(--text-70); }
.menu button:active { background: var(--fill-light); }
.menu .menu-dim, .menu .menu-dim svg { color: var(--text-50); }

/* Two 50/50 panes: clock + PIN on the left, numpad on the right. */
.punch-body {
  flex: 1; display: flex; align-items: stretch;
  overflow-y: auto;
}
.pane { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.clock { text-align: center; }
.clock-row { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.clock-time { font-size: 84px; font-weight: 300; letter-spacing: 2px; line-height: 1.05; color: var(--text-1); font-variant-numeric: tabular-nums; }
.clock-ampm { font-size: 36px; font-weight: 400; color: var(--text-70); }
.clock-date { font-size: 24px; color: var(--text-2); margin-top: 4px; }
.clock-version { font-size: 13px; color: var(--text-3); margin-top: 6px; }

.pin-prompt { font-size: 24px; color: var(--text-2); margin-top: 24px; }

/* PinInputWidget: 280x56 box, faint fill, 12 radius, bullets 36px ls 8 */
.pin-box {
  width: 280px; height: 56px; margin-top: 16px;
  background: var(--fill-faint);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; letter-spacing: 8px; color: var(--text-1);
  overflow: hidden; white-space: nowrap;
}

.pin-status { font-size: 14px; color: var(--error); height: 20px; margin-top: 12px; }

/* NumpadWidget iPad metrics: 90px rounded squares (r16), fill white@7.8%,
   digits 40 w500, gaps 16 vertical / 20 horizontal. Confirm is always
   primary blue — no disabled state. */
.numpad {
  display: grid; grid-template-columns: repeat(3, 90px);
  gap: 16px 20px;
}
.numpad button {
  width: 90px; height: 90px; border-radius: 16px;
  background: var(--fill-light);
  font-size: 40px; font-weight: 500; color: var(--text-1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.08s;
}
.numpad button:active { background: rgba(59, 130, 246, 0.302); }
.numpad .key-fn { background: transparent; color: var(--text-2); }
.numpad .key-fn:active { background: var(--fill-subtle); }
.numpad .key-ok { background: var(--primary); color: #fff; }
.numpad .key-ok:active { background: var(--primary); filter: brightness(1.2); }

/* ---------- Overlays ---------- */

.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.702);
  display: flex; align-items: center; justify-content: center;
}

.overlay-processing { background: rgba(26, 26, 46, 0.80); flex-direction: column; gap: 20px; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--fill-subtle); border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
.processing-text { font-size: 18px; font-weight: 500; color: rgba(255, 255, 255, 0.784); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Confirmation card: icon 64 → activity 32 bold → name 24 → time 18@80%
   → hours box → notice → dismiss hint (punch_screen.dart order). */
.confirm-card {
  max-width: 420px; margin: 48px;
  border-radius: 24px; padding: 40px 48px; text-align: center;
  animation: pop 0.18s ease-out;
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-card.in { background: var(--punch-in); }
.confirm-card.out { background: var(--punch-out); }
.confirm-activity { font-size: 32px; font-weight: 700; margin-top: 20px; }
.confirm-name { font-size: 24px; margin-top: 12px; }
.confirm-time { font-size: 18px; color: rgba(255, 255, 255, 0.80); margin-top: 8px; }

.confirm-hours {
  margin: 20px auto 0; padding: 14px 24px;
  background: var(--fill-subtle); border-radius: 12px;
}
.confirm-hours .ch-row { font-size: 16px; color: var(--text-70); margin-top: 6px; }
.confirm-hours .ch-row:first-child { margin-top: 0; }
.confirm-hours .ch-row b { color: var(--text-1); font-weight: 600; }
.confirm-hours .ch-label { font-size: 15px; color: var(--text-70); margin-top: 12px; }
.confirm-hours .ch-value { font-size: 30px; font-weight: 700; color: #93C5FD; }

.confirm-note {
  display: inline-block;
  margin-top: 12px; padding: 4px 12px;
  background: rgba(255, 193, 7, 0.20); border-radius: 12px;
  color: var(--warning); font-size: 13px;
}
.confirm-dismiss { font-size: 13px; color: var(--text-50); margin-top: 24px; }

/* ---------- Modals (today's punches / dialogs) ---------- */

.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 10, 20, 0.65);
  display: flex; align-items: center; justify-content: center;
}

.modal-panel {
  width: min(640px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 60px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.modal-title { flex: 1; text-align: center; }
.modal-title h2 { font-size: 18px; font-weight: 700; }
.modal-subtitle { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.modal-close { margin-left: 4px; }
.modal-body { overflow-y: auto; padding: 8px 16px 18px; }
.modal-loading, .modal-empty { text-align: center; color: var(--text-3); padding: 48px 0; font-size: 15px; }

.punch-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.punch-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-3); padding: 12px 10px 8px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface);
}
.punch-table td { padding: 12px 10px; border-bottom: 1px solid var(--fill-faint); }
.punch-table .t-in { color: #69F0AE; font-variant-numeric: tabular-nums; }
.punch-table .t-out { color: var(--warning); font-variant-numeric: tabular-nums; }
.punch-table .t-none { color: var(--text-3); }
.outlet-tag {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--warning);
  border: 1px solid rgba(255, 193, 7, 0.4); border-radius: 6px; padding: 1px 6px; margin-left: 8px;
  vertical-align: 1px;
}

/* Confirm dialogs must layer above feature sheets (both use .modal). */
#modal-dialog { z-index: 250; }

/* Admin Access dialog (Flutter _AdminAuthDialog / Material 3 AlertDialog):
   28px corners, 24px title, "Signed in as" line, single filled field,
   periwinkle link + Access pill, Cancel as plain text. */
.admin-dialog {
  width: min(390px, calc(100vw - 48px));
  border-radius: 28px;
  padding: 24px 24px 20px;
}
.admin-dialog h2 { font-size: 24px; font-weight: 500; letter-spacing: 0.01em; }
.aa-signed { font-size: 15px; color: var(--text-2); margin-top: 16px; }
.aa-prompt { font-size: 16px; color: rgba(255, 255, 255, 0.87); margin: 12px 0 14px; }
.admin-dialog input {
  margin: 0;
  padding: 16px;
  font-size: 17px;
  background: var(--fill-light);
  border-radius: 10px;
}
.admin-dialog input:focus { padding: 16px; border: 1px solid rgba(255, 255, 255, 0.3); }
.admin-dialog input::placeholder { color: rgba(255, 255, 255, 0.38); }
.aa-err { color: var(--error); font-size: 13.5px; min-height: 18px; margin-top: 8px; }
.aa-link {
  display: block; text-align: left;
  padding: 2px 0 0; margin: 4px 0 0;
  font-size: 15px; font-weight: 500;
  color: #5D7CFA;
}
.admin-dialog .dialog-actions { margin-top: 26px; align-items: center; }
.btn-text { color: var(--text-70); font-size: 16px; padding: 10px 18px; border-radius: 20px; }
.btn-text:active { background: var(--fill-light); }
.btn-pill {
  background: #5D7CFA; color: #fff; font-weight: 600; font-size: 16px;
  border-radius: 24px; padding: 12px 30px;
}
.btn-pill:active { filter: brightness(1.12); }

.dialog-panel {
  width: min(420px, calc(100vw - 48px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px;
}
.dialog-panel h2 { font-size: 19px; margin-bottom: 10px; }
.dialog-panel p { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* Top-pinned snackbar (Flutter showRootSnack): green success / red
   failure / orange partial, floating near the top above open sheets. */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 300;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 20px; font-size: 16px; font-weight: 500;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 40px);
}
.toast.toast-success { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.toast.toast-error   { background: #C62828; border-color: #C62828; color: #fff; }
.toast.toast-warn    { background: #EF6C00; border-color: #EF6C00; color: #fff; }

/* ---------- Feature sheets (amendments / OT / notes / benefits) ----------
   Styled after the Flutter bottom sheets: slide up from the bottom,
   top-rounded corners, drag handle, surface background, 560px cap. */

#sheet.modal, #modal-today.modal { align-items: flex-end; }

.sheet-panel {
  width: min(560px, 100vw);
  height: min(860px, 92dvh);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: sheet-up 0.22s ease-out;
}
.sheet-panel::before, #modal-today .modal-panel::before {
  content: '';
  flex: 0 0 auto;
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  margin: 8px auto 0;
}
@keyframes sheet-up { from { transform: translateY(48px); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }

#modal-today .modal-panel {
  width: min(560px, 100vw);
  height: min(860px, 92dvh);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  animation: sheet-up 0.22s ease-out;
}

.sheet-body { flex: 1; display: flex; flex-direction: column; padding: 14px 18px 18px; overflow: hidden; }

/* Flutter sheet headers: accent icon + left-aligned bold title, with
   refresh + a compact primary action on the right. */
.sheet-header { gap: 10px; padding: 12px 14px 12px 18px; }
.sheet-icon { color: var(--accent, var(--primary)); }
.sheet-header .modal-title.title-left { text-align: left; }
.sheet-header .modal-title.title-left h2 {
  font-size: 21px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-tag {
  font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  vertical-align: super; letter-spacing: 0.02em;
}
.sheet-actions { display: flex; align-items: center; gap: 8px; }
.sheet-actions:empty { display: none; }
.sheet-actions .btn-icon { width: 38px; height: 38px; font-size: 20px; }
.btn-mini {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary); color: #fff;
  font-size: 14.5px; font-weight: 600;
  padding: 9px 14px; border-radius: 9px;
}
.btn-mini:active { filter: brightness(1.15); }

/* OT-style cards: badge on its own line, bold time range below. */
.lc-time { font-size: 17px; font-weight: 700; margin-top: 6px; }

/* Admin Settings page (Flutter AdminSettingsScreen): labeled cards with
   right-aligned values, full-width pill actions. */
.set-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.set-card h3 { font-size: 14.5px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 15px; }
.kv .k { color: var(--text-3); }
.kv .v { font-weight: 600; text-align: right; }
.kv .v.ok { color: #4ADE80; }
.kv .v.bad { color: #FF5252; }
.btn-block {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; border-radius: 24px;
  font-size: 16px; font-weight: 600; color: #fff;
  margin-top: 10px;
}
.btn-block:first-of-type { margin-top: 0; }
.btn-block.b-blue { background: var(--primary); }
.btn-block.b-red { background: #C74440; }
.btn-block:active { filter: brightness(1.12); }
.set-empty { color: var(--text-3); font-size: 14.5px; padding: 6px 0 2px; }

/* Amendment PAIR cards: Clock In | divider | Clock Out | pencil.
   Clock-out accent #EF4444 per the reworked Flutter screen. */
.pair-card {
  display: flex; align-items: center;
  background: var(--fill-faint); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px; padding: 12px; margin-bottom: 6px;
}
.pair-side-cell { flex: 1; min-width: 0; }
.pair-div { width: 1px; height: 40px; background: rgba(255, 255, 255, 0.08); margin: 0 8px; flex: 0 0 auto; }
.ps-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.ps-head svg { flex: 0 0 auto; }
.ps-time { font-size: 22px; font-weight: 600; margin-top: 4px; }
.ps-time.t-in { color: #69F0AE; }
.ps-time.t-out { color: #EF4444; }
.ps-missing { font-style: italic; color: rgba(255, 255, 255, 0.35); font-size: 20px; margin-top: 4px; }
.ps-old { font-size: 18px; color: rgba(255, 255, 255, 0.4); text-decoration: line-through; margin-top: 4px; }
.ps-req { font-size: 22px; font-weight: 600; color: #FFC107; }
.ps-del { display: flex; align-items: center; gap: 4px; color: rgba(255, 82, 82, 0.78); font-size: 16px; margin-top: 2px; }
.ps-pill { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 193, 7, 0.2); color: #FFC107; font-size: 13px; font-weight: 600; }

/* Edit Punch Pair dialog: tinted per-side blocks */
.edit-side { border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.edit-side.in { background: rgba(105, 240, 174, 0.08); border: 1px solid rgba(105, 240, 174, 0.31); }
.edit-side.out { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.31); }
.edit-side.missing { border-style: dashed; opacity: 0.75; }
.es-head { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; }
.es-head.in { color: #69F0AE; }
.es-head.out { color: #EF4444; }
.es-missing { font-style: italic; color: rgba(255, 255, 255, 0.47); font-size: 14px; margin-top: 10px; }
.date-tile {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 13px 14px; margin: 10px 0;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px; font-size: 15px; color: var(--text-1);
}

/* Amendments/benefits compact rows: icon + label left, value + pencil right */
.am-row { justify-content: space-between; padding: 8px 8px 8px 14px; }
.am-act { display: flex; align-items: center; gap: 10px; font-size: 16.5px; color: rgba(255, 255, 255, 0.87); min-width: 0; }
.am-right { display: flex; align-items: center; gap: 8px; font-size: 16.5px; flex: 0 0 auto; }
.am-right b { font-weight: 700; }
.am-edit { color: #448AFF; width: 38px; height: 38px; }

/* Flutter Material accent palette (blueAccent / amberAccent / orangeAccent) */
.sheet-accent-amber  { --accent: #FFD740; }
.sheet-accent-blue   { --accent: #448AFF; }
.sheet-accent-orange { --accent: #FFAB40; }
.sheet-accent-green  { --accent: #69F0AE; }
.sheet-accent-indigo { --accent: #536DFE; }

.elapsed-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 9px; border-radius: 10px; border: 1px solid;
  background: rgba(255, 193, 7, 0.15); border-color: rgba(255, 193, 7, 0.5); color: #FFC107;
}
.elapsed-badge.elapsed-long {
  background: rgba(255, 82, 82, 0.15); border-color: rgba(255, 82, 82, 0.5); color: #FF5252;
}

/* PIN phase inside a sheet — Flutter PinDisplay: masked asterisks over a
   2px underline, accent-colored once non-empty. */
.pin-phase { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 6px; }
.pin-phase .pin-title { font-size: 18px; font-weight: 600; }
.pin-phase .pin-sub { font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; text-align: center; }
.pin-display {
  width: 140px; height: 40px; margin: 8px 0 2px;
  display: flex; align-items: flex-end; justify-content: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 24px; letter-spacing: 8px; font-weight: 600;
  color: var(--text-1);
  overflow: hidden; white-space: nowrap;
}
.pin-display.has-value { border-bottom-color: var(--accent, var(--primary)); }
.pin-phase .pin-err { color: #FF5252; font-size: 13.5px; min-height: 20px; }

.mini-numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(268px, 70vw); }
.mini-numpad button {
  aspect-ratio: 1; border-radius: 50%;
  background: rgba(255, 255, 255, 0.10); border: none;
  font-size: 26px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.mini-numpad button:active { background: rgba(255, 255, 255, 0.18); }
.mini-numpad .key-fn { background: transparent; color: var(--text-2); }
.mini-numpad .key-ok { background: var(--accent, var(--primary)); color: #14141f; font-weight: 700; font-size: 20px; }
.mini-numpad .key-ok:disabled { background: var(--fill-faint); color: var(--text-3); opacity: 1; }

/* Lists inside sheets — Flutter group headers: 'EEE, d MMM' white@60% w600 */
.sheet-list { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.list-date-header {
  font-size: 17px; color: rgba(255, 255, 255, 0.6);
  margin: 16px 2px 8px; font-weight: 600;
}
.list-card {
  background: var(--fill-faint); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.list-card .lc-main { flex: 1; min-width: 0; }
.list-card .lc-title { font-size: 15px; font-weight: 600; }
.list-card .lc-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.list-card .lc-actions { display: flex; gap: 6px; flex: 0 0 auto; }

/* Flutter row buttons: Edit = amber (AppColors.warning) with black text */
.list-card .lc-actions button {
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  background: #FFC107; color: #14141f;
}
.list-card .lc-actions .act-danger { background: transparent; color: #FF5252; }

/* Flutter ApprovalStatusBadge: color@15% fill, color@50% border, 12px w600 */
.badge-status {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; border: 1px solid;
}
.badge-pending  { background: rgba(255, 171, 64, 0.15); border-color: rgba(255, 171, 64, 0.5); color: #FFAB40; }
.badge-approved { background: rgba(105, 240, 174, 0.15); border-color: rgba(105, 240, 174, 0.5); color: #69F0AE; }
.badge-rejected { background: rgba(255, 82, 82, 0.15); border-color: rgba(255, 82, 82, 0.5); color: #FF5252; }

.sheet-empty { text-align: center; color: var(--text-3); padding: 44px 12px; font-size: 20px; }

/* Flutter editable-range banner: primary@15% fill, primary@31% border */
.sheet-banner {
  font-size: 13px; color: var(--text-1); background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.31); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px;
}
.sheet-error { color: var(--error); font-size: 13.5px; min-height: 20px; margin: 6px 0; }

.sheet-footer { display: flex; gap: 10px; margin-top: 12px; }
.sheet-footer .btn-primary { flex: 1; margin-top: 0; height: 46px; background: var(--accent, var(--primary)); color: #14141f; font-size: 16px; }
.sheet-footer .btn-secondary { flex: 0 0 auto; }
.sheet-footer .btn-danger { flex: 0 0 auto; }

/* Forms inside sheets */
.form-col { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.form-col label { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.form-col textarea { min-height: 90px; resize: vertical; }

.seg-row { display: flex; background: var(--fill-faint); border-radius: 10px; padding: 4px; gap: 4px; }
.seg-row button { flex: 1; padding: 9px; border-radius: 8px; color: var(--text-2); font-size: 14px; }
.seg-row button.active { background: var(--accent, var(--primary)); color: #14141f; font-weight: 600; }

/* Time picker: selects (Safari never commits typed native time inputs) */
.time-row { display: flex; align-items: center; gap: 8px; }
.time-row select { width: auto; flex: 1; text-align: center; padding: 12px 30px 12px 12px; }

/* Calendar (custom grid — native date inputs are unreliable on Safari) */
.cal { background: var(--fill-faint); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head .cal-month { font-size: 14.5px; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { font-size: 10.5px; color: var(--text-3); text-align: center; padding: 4px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1.15; border-radius: 8px; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-1);
}
.cal-day:disabled { color: var(--text-3); opacity: 0.4; }
.cal-day.shift { box-shadow: inset 0 0 0 1px var(--accent, var(--primary)); }
.cal-day.sel { background: var(--accent, var(--primary)); color: #14141f; font-weight: 700; }
.cal-day.today-mark { text-decoration: underline; }

.emp-search { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.emp-search input { flex: 0 0 auto; }
.emp-list { overflow-y: auto; flex: 1; }
.emp-list button {
  display: block; width: 100%; text-align: left; padding: 12px 14px;
  border-radius: 10px; font-size: 15px;
}
.emp-list button:active { background: var(--fill-light); }

/* ---------- Narrow / portrait ---------- */

@media (max-width: 900px), (orientation: portrait) {
  .punch-body { flex-direction: column; justify-content: center; gap: 32px; padding: 24px 0; }
  .pane { flex: 0 0 auto; }
  .clock-time { font-size: clamp(56px, 12vw, 84px); }
  .pin-prompt { margin-top: 20px; }
}

@media (max-width: 640px) {
  .sheet-panel { width: 100vw; height: calc(100dvh - 16px); }
  .numpad { grid-template-columns: repeat(3, 72px); gap: 12px 14px; }
  .numpad button { width: 72px; height: 72px; font-size: 32px; }
  .outlet-label, .online-text { font-size: 15px; }
}
