/* ShiftMinute app: neutral frosted-glass skin matching the homepage (dark theme only).
   Loaded last, so it re-themes the app through its existing CSS variables. */
:root:not([data-theme="light"]) {
  --accent: #8fbf74;
  --accent-light: #a8d18d;
  --bg-card: rgba(150, 166, 182, 0.13);
  --bg-card-hover: rgba(176, 190, 204, 0.20);
  --bg-input: rgba(8, 12, 20, 0.50);
  --border: rgba(255, 255, 255, 0.16);
  --border-light: rgba(255, 255, 255, 0.28);
  --sidebar-bg: rgba(14, 19, 28, 0.74);
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --backdrop-blur: blur(22px) saturate(1.2);
  --card-backdrop: blur(22px) saturate(1.2);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.32);
  --shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --shadow-lg: 0 24px 54px -16px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --shadow-glow: 0 0 28px rgba(168, 209, 141, 0.10);
  --bg-gradient-start: #05080f;
  --bg-gradient-mid: #0a1018;
  --bg-gradient-end: #0d151c;
  --bg-glow-color: rgba(168, 209, 141, 0.09);
}

/* Glass surfaces: white hairline edge and a top highlight, like the homepage panels. */
html:not([data-theme="light"]) .card,
html:not([data-theme="light"]) .modal,
html:not([data-theme="light"]) .modal-content,
html:not([data-theme="light"]) .notif-dropdown {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
}
html:not([data-theme="light"]) header,
html:not([data-theme="light"]) .app-footer {
  background: rgba(12, 17, 25, 0.62);
  border-color: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
}
html:not([data-theme="light"]) .sidebar {
  background: rgba(14, 19, 28, 0.74);
  border-color: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
}

/* ---- Stronger homepage-style glass: lighter frosted panels over a soft glow ---- */
:root:not([data-theme="light"]) {
  --bg-gradient-start: #070d16;
  --bg-gradient-mid: #0b1520;
  --bg-gradient-end: #0f1f22;
  --bg-glow-color: rgba(168, 209, 141, 0.08);
  --bg-card: rgba(12, 18, 30, 0.78);
  --radius: 18px;
  --radius-lg: 24px;
}
html:not([data-theme="light"]) .card,
html:not([data-theme="light"]) .stat-card {
  background: linear-gradient(160deg, rgba(42, 54, 72, 0.66), rgba(16, 24, 38, 0.78) 55%, rgba(8, 14, 26, 0.84));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.03), 0 20px 44px -18px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
}
html:not([data-theme="light"]) .card-header,
html:not([data-theme="light"]) .card h2,
html:not([data-theme="light"]) .card h3 {
  color: #f1f5f8;
}
html:not([data-theme="light"]) .card-header i,
html:not([data-theme="light"]) .stat-icon i {
  color: #a8d18d;
}
html:not([data-theme="light"]) .stat-value {
  color: #a8d18d;
  -webkit-text-fill-color: #a8d18d;
  background: none;
  text-shadow: none;
}
html:not([data-theme="light"]) .stat-label {
  color: #aab4bf;
}
html:not([data-theme="light"]) table th,
html:not([data-theme="light"]) table td {
  border-color: rgba(255, 255, 255, 0.10);
}
html:not([data-theme="light"]) .btn {
  border-radius: 999px;
}
html:not([data-theme="light"]) .btn-outline {
  background: linear-gradient(180deg, rgba(210, 222, 234, 0.22), rgba(130, 146, 162, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #eef3f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html:not([data-theme="light"]) .btn-primary {
  background: #a8d18d;
  color: #102016;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 22px rgba(168, 209, 141, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
html:not([data-theme="light"]) .sidebar-action-btn,
html:not([data-theme="light"]) .sidebar-timer {
  background: rgba(170, 186, 202, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 14px;
}
html:not([data-theme="light"]) .sidebar-nav-item.active {
  background: linear-gradient(180deg, rgba(210, 222, 234, 0.20), rgba(130, 146, 162, 0.10));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Specificity fixes for the app's metallic/gradient button and header styles. */
html:not([data-theme="light"]) .card .card-header,
html:not([data-theme="light"]) .card .card-header * {
  color: #f1f5f8;
  -webkit-text-fill-color: #f1f5f8;
  background: none;
}
html:not([data-theme="light"]) .card .card-header i {
  color: #a8d18d;
  -webkit-text-fill-color: #a8d18d;
}
html:not([data-theme="light"]) .btn.btn-primary {
  background: #a8d18d;
  background-image: none;
  color: #102016;
  -webkit-text-fill-color: #102016;
}
html:not([data-theme="light"]) .btn.btn-primary i {
  color: #102016;
}

/* ---- Status badges: outlined glowing pills (as in the tilted dashboard image) ---- */
html:not([data-theme="light"]) .badge {
  --bc: 170, 182, 196;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  color: rgb(var(--bc));
  -webkit-text-fill-color: rgb(var(--bc));
  background: rgba(var(--bc), 0.12);
  border: 1.4px solid rgba(var(--bc), 0.8);
  box-shadow: 0 0 14px rgba(var(--bc), 0.22);
}
html:not([data-theme="light"]) :is(.badge-working, .badge-geofence-ok, .badge-leave-approved, .badge-task-completed, .badge-success) { --bc: 168, 209, 141; }
html:not([data-theme="light"]) :is(.badge-pending, .badge-leave-pending, .badge-task-pending, .badge-task-in-progress, .badge-overtime, .badge-priority-medium, .badge-geofence-unknown, .badge-holiday) { --bc: 230, 199, 111; }
html:not([data-theme="light"]) :is(.badge-geofence-out, .badge-leave-rejected, .badge-task-overdue, .badge-priority-high, .badge-flagged) { --bc: 238, 120, 120; }

/* ---- Glass list rows, avatars, radar ring and KPI tiles (utility classes) ---- */
html:not([data-theme="light"]) .gl-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.55rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(2, 5, 10, 0.66), rgba(2, 5, 10, 0.54));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html:not([data-theme="light"]) .gl-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; color: #eef3f6;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
html:not([data-theme="light"]) .gl-name { font-weight: 700; color: #f1f5f8; line-height: 1.15; }
html:not([data-theme="light"]) .gl-sub { font-size: 0.78rem; color: #aab4bf; }
html:not([data-theme="light"]) .gl-hours { margin-left: auto; font-size: 0.85rem; color: #c3ccd5; white-space: nowrap; }
html:not([data-theme="light"]) .gl-chevron { color: #aab4bf; margin-left: 0.2rem; }
html:not([data-theme="light"]) .gl-radar {
  position: relative; height: 150px; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 55%, transparent 0 26px, rgba(168, 209, 141, 0.55) 27px 29px, transparent 30px 52px, rgba(168, 209, 141, 0.38) 53px 55px, transparent 56px 78px, rgba(168, 209, 141, 0.24) 79px 81px, transparent 82px),
    linear-gradient(135deg, rgba(10, 18, 30, 0.7), rgba(10, 18, 30, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.14);
}
html:not([data-theme="light"]) .gl-radar::after {
  content: "\f3c5"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -62%);
  font-size: 1.7rem; color: #a8d18d; filter: drop-shadow(0 0 8px rgba(168, 209, 141, 0.7));
}
html:not([data-theme="light"]) .gl-radar-chip {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  padding: 0.18rem 0.8rem; border-radius: 999px; font-size: 0.75rem; color: #eef3f6;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35);
}
html:not([data-theme="light"]) .gl-kpi { display: flex; justify-content: space-between; padding: 0.35rem 0; color: #c3ccd5; }
html:not([data-theme="light"]) .gl-kpi b { color: #f1f5f8; }
html:not([data-theme="light"]) .gl-total { font-size: 1.7rem; font-weight: 800; color: #a8d18d; margin-top: 0.4rem; }

/* Optional real photos: drop an <img> inside .gl-avatar and it fills the circle. */
html:not([data-theme="light"]) .gl-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Keep the live timer readable on the lighter glass. */
html:not([data-theme="light"]) .live-timer {
  background: none;
  color: #c6e4b0;
  -webkit-text-fill-color: #c6e4b0;
  text-shadow: 0 0 18px rgba(168, 209, 141, 0.35);
}
html:not([data-theme="light"]) .live-timer-label { color: #e8eef2; }

/* ---- Real screens: tables become rows of glass, like the roster in the tilted image ---- */
html:not([data-theme="light"]) .card table {
  border-collapse: separate;
  border-spacing: 0 0.45rem;
}
html:not([data-theme="light"]) .card table thead th {
  border: 0;
  background: transparent;
  color: #aab4bf;
}
html:not([data-theme="light"]) .card table tbody td {
  background: linear-gradient(180deg, rgba(2, 5, 10, 0.66), rgba(2, 5, 10, 0.54));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 0;
  border-right: 0;
}
html:not([data-theme="light"]) .card table tbody td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px 0 0 14px;
}
html:not([data-theme="light"]) .card table tbody td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 14px 14px 0;
}
html:not([data-theme="light"]) .card table tbody tr:hover td {
  background: linear-gradient(180deg, rgba(60, 76, 96, 0.5), rgba(40, 54, 72, 0.4));
}
/* Form fields as glass */
html:not([data-theme="light"]) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html:not([data-theme="light"]) select,
html:not([data-theme="light"]) textarea {
  background: rgba(8, 12, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 12px;
  color: #eef3f6;
}
html:not([data-theme="light"]) input:focus,
html:not([data-theme="light"]) select:focus,
html:not([data-theme="light"]) textarea:focus {
  border-color: rgba(168, 209, 141, 0.7);
  box-shadow: 0 0 0 3px rgba(168, 209, 141, 0.18);
  outline: none;
}

/* Darker glass: deep slate panels with only a faint edge highlight. */
html:not([data-theme="light"]) .gl-row,
html:not([data-theme="light"]) .card table tbody td { border-color: rgba(255, 255, 255, 0.10); }
html:not([data-theme="light"]) .sidebar-action-btn,
html:not([data-theme="light"]) .sidebar-timer { background: rgba(10, 16, 26, 0.55); border-color: rgba(255, 255, 255, 0.12); }
html:not([data-theme="light"]) .btn-outline { background: linear-gradient(180deg, rgba(60, 74, 94, 0.55), rgba(26, 36, 52, 0.55)); border-color: rgba(255, 255, 255, 0.20); }

/* Darkest pass: near-black glass, edge highlight kept subtle. */
:root:not([data-theme="light"]) {
  --bg-gradient-start: #03060c;
  --bg-gradient-mid: #060b13;
  --bg-gradient-end: #08100f;
  --sidebar-bg: rgba(6, 10, 18, 0.82);
}
html:not([data-theme="light"]) .sidebar,
html:not([data-theme="light"]) header,
html:not([data-theme="light"]) .app-footer { background: rgba(6, 10, 18, 0.74); }
html:not([data-theme="light"]) .btn-outline { background: linear-gradient(180deg, rgba(40, 52, 70, 0.62), rgba(12, 20, 34, 0.66)); }

/* Outside the glass: near-black page background, only a trace of glow. */
html:not([data-theme="light"]) body {
  background: linear-gradient(145deg, #010307, #040810 55%, #05090c);
  background-attachment: fixed;
}
html:not([data-theme="light"]) body::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(168, 209, 141, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 209, 141, 0.04) 0%, transparent 50%);
}
html:not([data-theme="light"]) body::after { opacity: 0.12; }
html:not([data-theme="light"]) .sidebar-overlay { background: rgba(0, 0, 0, 0.7); }

/* Homepage-style glass edge: bright top-left rim, pale green bottom-right rim, and a shine line along the top. */
html:not([data-theme="light"]) .card,
html:not([data-theme="light"]) .stat-card {
  background:
    linear-gradient(90deg, transparent, rgba(220, 238, 205, 0.75), transparent) 50% 0 / 70% 1.5px no-repeat,
    linear-gradient(160deg, rgba(42, 54, 72, 0.66), rgba(16, 24, 38, 0.78) 55%, rgba(8, 14, 26, 0.84));
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.34),
    inset -1px -1px 0 rgba(168, 209, 141, 0.26),
    0 22px 48px -18px rgba(0, 0, 0, 0.85);
}
html:not([data-theme="light"]) .gl-row {
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.22), inset -1px -1px 0 rgba(168, 209, 141, 0.14);
}

/* ===== Homepage panel edge, applied everywhere the app uses the same glass =====
   Homepage panels: bright rim top-left fading to a pale-green rim bottom-right, ~1.6px. */
html:not([data-theme="light"]) .card::before,
html:not([data-theme="light"]) .stat-card::before {
  padding: 1.6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.12) 42%, rgba(168, 209, 141, 0.38));
}
html:not([data-theme="light"]) .card,
html:not([data-theme="light"]) .stat-card {
  border: 1px solid transparent;
  box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.85);
}
/* Surfaces without a free pseudo-element get the same rim from inset shadows. */
html:not([data-theme="light"]) :is(
  header, .sidebar, .app-footer, .modal-box, .biometric-modal-box, .notif-dropdown,
  .v3-auth-art, .sidebar-action-btn, .sidebar-timer, .btn-outline, .gl-row,
  .sidebar-nav-item.active, .gl-radar
) {
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.30),
    inset -1px -1px 0 rgba(168, 209, 141, 0.22),
    0 16px 36px -16px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.10);
}
html:not([data-theme="light"]) :is(.modal-box, .biometric-modal-box, .notif-dropdown, .v3-auth-art) {
  background-color: rgba(8, 14, 26, 0.86);
  border-radius: 22px;
}
html:not([data-theme="light"]) .card table tbody td {
  border-top-color: rgba(255, 255, 255, 0.16);
}

/* ===== v16 (v5 design) : map the v4/v5 theme variables onto the dark glass skin ===== */
html:not([data-theme="light"]) body[data-app-v4][data-app-v5],
html:not([data-theme="light"]) body[data-app-v4] {
  --v4-canvas: #02050a;
  --v4-ambient: #07111a;
  --v4-solid: rgba(8, 14, 24, 0.94);
  --v4-glass: rgba(8, 14, 24, 0.76);
  --v4-edge: rgba(255, 255, 255, 0.16);
  --v4-muted: #aab4bf;
  --v4-accent: #a8d18d;
  --v4-button: rgba(40, 52, 70, 0.62);
  --v5-highlight: #c6e4b0;
  --v5-card-fill: rgba(14, 22, 36, 0.80);
  --v5-card-rim: rgba(255, 255, 255, 0.10);
  --v5-card-sheen: rgba(255, 255, 255, 0.07);
  --v5-card-reflection: rgba(255, 255, 255, 0.24);
  --v5-card-shadow: rgba(0, 0, 0, 0.6);
}
html:not([data-theme="light"]) body[data-app-v5] :is(.card, .stat-card) {
  background:
    linear-gradient(90deg, transparent, rgba(220, 238, 205, 0.75), transparent) 50% 0 / 70% 1.5px no-repeat,
    linear-gradient(160deg, rgba(42, 54, 72, 0.66), rgba(16, 24, 38, 0.78) 55%, rgba(8, 14, 26, 0.84)) !important;
  border: 1px solid transparent !important;
  box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.85) !important;
}
html:not([data-theme="light"]) :is(.v4-dialog, .v5-company-dialog, .v4-auth-art, .v4-find, .v4-search-field) {
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.30),
    inset -1px -1px 0 rgba(168, 209, 141, 0.22),
    0 24px 60px -20px rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.10);
}
html:not([data-theme="light"]) body[data-app-v4] > .v4-topbar,
html:not([data-theme="light"]) body[data-app-v4] .v4-footer {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(168, 209, 141, 0.18);
}

/* v5/v16: main buttons stay sage with dark text (v5 paints them with the dark button colour). */
html:not([data-theme="light"]) body[data-app-v4] .btn.btn-primary {
  background: #a8d18d !important;
  background-image: none !important;
  color: #102016 !important;
  -webkit-text-fill-color: #102016 !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

/* ===== v16: glass "Find a page" search pill ===== */
html:not([data-theme="light"]) body[data-app-v5] .v4-find {
  height: 38px;
  min-width: 0;
  padding: 0 8px 0 14px;
  gap: 9px;
  border-radius: 999px;
  color: #eef3f6;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(60, 74, 94, 0.60), rgba(18, 26, 40, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.28), inset -1px -1px 0 rgba(168, 209, 141, 0.20), 0 8px 20px -10px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html:not([data-theme="light"]) body[data-app-v5] .v4-find i { color: #a8d18d; }
html:not([data-theme="light"]) body[data-app-v5] .v4-find kbd {
  padding: 2px 9px;
  border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: 0.72rem; line-height: 1.5;
  color: #c3ccd5;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
html:not([data-theme="light"]) body[data-app-v5] .v4-topbar .v4-find:hover {
  background: linear-gradient(180deg, rgba(76, 92, 114, 0.70), rgba(26, 36, 54, 0.78));
  border-color: rgba(168, 209, 141, 0.5);
}
@media (max-width: 620px) {
  html:not([data-theme="light"]) body[data-app-v5] .v4-find { width: 40px; padding: 0; justify-content: center; }
}

/* ===== v16: floating clock-in dock, bottom centre, aurora glow ===== */
.v16-dock {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  transform: translateX(-50%);
  z-index: 160;
  display: flex;
  align-items: center;
}
.v16-dock[hidden], .v16-aux[hidden] { display: none; }
/* Soft glow behind the button (no rays, low intensity). */
.v16-dock::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: min(360px, 88vw);
  height: 120px;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 70%, rgba(168, 209, 141, 0.20), rgba(168, 209, 141, 0.07) 55%, transparent 100%);
  filter: blur(6px);
}
.v16-main {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  color: #f1f5f8;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(76, 92, 114, 0.62), rgba(18, 26, 40, 0.80));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.32),
    inset -1px -1px 0 rgba(168, 209, 141, 0.26),
    0 0 22px rgba(168, 209, 141, 0.16),
    0 14px 30px -12px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.v16-main i { color: #a8d18d; }
.v16-timer { padding-left: 10px; margin-left: 2px; border-left: 1px solid rgba(255, 255, 255, 0.22); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.9rem; color: #c3ccd5; }
.v16-main span, .v16-aux span { white-space: nowrap; }
.v16-main:hover { transform: translateY(-2px); border-color: rgba(168, 209, 141, 0.55); box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.36), inset -1px -1px 0 rgba(168, 209, 141, 0.3), 0 0 28px rgba(168, 209, 141, 0.22), 0 16px 34px -12px rgba(0, 0, 0, 0.9); }
.v16-main:active { transform: translateY(0) scale(0.98); }
.v16-main:focus-visible, .v16-aux:focus-visible { outline: 2px solid #c6e4b0; outline-offset: 4px; }
/* Clock out: same glass shape with a warm red rim and aurora tint. */
.v16-main[data-mode="out"] {
  background: linear-gradient(180deg, rgba(150, 70, 72, 0.50), rgba(40, 18, 24, 0.82));
  border-color: rgba(238, 120, 120, 0.55);
  color: #ffe6e6;
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.28), inset -1px -1px 0 rgba(238, 120, 120, 0.26), 0 0 22px rgba(238, 120, 120, 0.16), 0 14px 30px -12px rgba(0, 0, 0, 0.85);
}
.v16-main[data-mode="out"] i { color: #ff9c9c; }
.v16-dock:has(.v16-main[data-mode="out"])::before { filter: blur(6px) hue-rotate(-95deg); }
.v16-aux {
  position: absolute;
  left: calc(100% + 12px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #eef3f6;
  font-family: inherit; font-weight: 600; font-size: 0.85rem; line-height: 1;
  background: linear-gradient(180deg, rgba(60, 74, 94, 0.62), rgba(18, 26, 40, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.26), inset -1px -1px 0 rgba(168, 209, 141, 0.2), 0 8px 20px -10px #000;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  white-space: nowrap;
}
.v16-aux i { color: #e6c76f; }
@media (max-width: 520px) {
  /* On phones the secondary action sits above the main button, so nothing can run off the screen. */
  .v16-dock { flex-direction: column; align-items: center; gap: 10px; }
  .v16-aux { position: static; height: 44px; padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .v16-main { transition: none; }
}
/* Keep page content clear of the dock. */
body[data-app-v5].saas-app #app-outlet { padding-bottom: 170px !important; }
@media (max-width: 520px) { body[data-app-v5].saas-app #app-outlet { padding-bottom: 230px !important; } }

/* ===== v16: professional glass footer, pinned to the bottom of short pages ===== */
body[data-app-v5].saas-app { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: 0; }
body[data-app-v5].saas-app > .v4-flow { flex: 1 0 auto; min-width: 0; }
html:not([data-theme="light"]) body[data-app-v5] > .v4-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding: 14px var(--workspace-gutter);
  color: #aab4bf;
  font-size: 0.85rem;
  background: rgba(6, 10, 18, 0.72);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.v16-foot-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: #eef3f6; }
.v16-foot-brand img { border-radius: 5px; }
.v16-foot-brand em { font-style: normal; font-weight: 500; color: #8e99a5; }
.v16-foot-links { display: inline-flex; gap: 16px; margin-left: 6px; }
.v16-foot-links a { color: #aab4bf; text-decoration: none; }
.v16-foot-links a:hover { color: #c6e4b0; text-decoration: underline; text-underline-offset: 3px; }
html:not([data-theme="light"]) body[data-app-v5] .v4-footer .footer-link-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #eef3f6;
  font-family: inherit; font-weight: 600; font-size: 0.82rem; line-height: 1;
  background: linear-gradient(180deg, rgba(60, 74, 94, 0.60), rgba(18, 26, 40, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.26), inset -1px -1px 0 rgba(168, 209, 141, 0.18);
  cursor: pointer;
}
html:not([data-theme="light"]) body[data-app-v5] .v4-footer .footer-link-btn i { color: #e6c76f; }
html:not([data-theme="light"]) body[data-app-v5] .v4-footer .footer-link-btn:hover { border-color: rgba(168, 209, 141, 0.5); }
@media (max-width: 560px) {
  .v16-foot-links { display: none; }
  html:not([data-theme="light"]) body[data-app-v5] > .v4-footer { gap: 10px; }
}

/* ===== v16 light theme: same footer, dock and search pill, tuned for a light page ===== */
html[data-theme="light"] .v16-foot-brand { color: #1c2a21; }
html[data-theme="light"] .v16-foot-brand em { color: #5d6f63; }
html[data-theme="light"] .v16-foot-links a { color: #46594c; }
html[data-theme="light"] .v16-foot-links a:hover { color: #254c31; }
html[data-theme="light"] body[data-app-v5] > .v4-footer {
  display: flex; align-items: center; gap: 18px; margin-top: auto;
  padding: 14px var(--workspace-gutter);
  font-size: 0.85rem;
  background: rgba(248, 251, 248, 0.72);
  border-top: 1px solid rgba(38, 46, 42, 0.12);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
html[data-theme="light"] body[data-app-v5] .v4-footer .footer-link-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  color: #1c2a21; font-family: inherit; font-weight: 600; font-size: 0.82rem; line-height: 1;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(38, 46, 42, 0.18);
  box-shadow: 0 4px 12px -6px rgba(20, 30, 24, 0.25);
  cursor: pointer;
}
html[data-theme="light"] body[data-app-v5] .v4-footer .footer-link-btn i { color: #b07d0b; }
html[data-theme="light"] .v16-aux { color: #1c2a21; background: rgba(255, 255, 255, 0.85); border-color: rgba(38, 46, 42, 0.18); box-shadow: 0 6px 16px -8px rgba(20, 30, 24, 0.35); }
html[data-theme="light"] .v16-aux i { color: #b07d0b; }
html[data-theme="light"] .v16-main { color: #1c2a21; background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(38, 46, 42, 0.18); box-shadow: 0 0 22px rgba(79, 143, 58, 0.14), 0 10px 24px -10px rgba(20, 30, 24, 0.35); }
html[data-theme="light"] .v16-main i { color: #254c31; }
html[data-theme="light"] .v16-timer { color: #46594c; border-left-color: rgba(38, 46, 42, 0.2); }
html[data-theme="light"] .v16-main[data-mode="out"] { color: #7a1f1f; background: rgba(255, 232, 232, 0.9); border-color: rgba(200, 80, 80, 0.5); }
html[data-theme="light"] .v16-main[data-mode="out"] i { color: #b83a3a; }
html[data-theme="light"] body[data-app-v5] .v4-find {
  height: 38px; min-width: 0; padding: 0 8px 0 14px; gap: 9px; border-radius: 999px;
  color: #1c2a21; font-size: 0.85rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(38, 46, 42, 0.16);
  box-shadow: 0 6px 16px -8px rgba(20, 30, 24, 0.3);
}
html[data-theme="light"] body[data-app-v5] .v4-find kbd { padding: 2px 9px; border-radius: 999px; color: #46594c; background: rgba(38, 46, 42, 0.06); border: 1px solid rgba(38, 46, 42, 0.14); font-size: 0.72rem; font-weight: 600; }
html[data-theme="light"] body[data-app-v5] .v4-find i { color: #254c31; }

/* v16 has one clock button: the centred dock. Hide the app's own bottom-corner floating button. */
body[data-app-v5] #fab-wrapper { display: none !important; }

/* Footer logo: same mark as the top bar, sized properly with a hairline ring so it reads on dark. */
.v16-foot-brand img { width: 26px; height: 26px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
html[data-theme="light"] .v16-foot-brand img { box-shadow: 0 0 0 1px rgba(38, 46, 42, 0.12); }

/* ===== v16: "Find a page" search modal, glass ===== */
html:not([data-theme="light"]) body[data-app-v4] .v4-dialog {
  padding: 18px;
  width: min(560px, calc(100% - 24px));
  color: #eef3f6;
  background: linear-gradient(160deg, rgba(44, 58, 78, 0.80), rgba(10, 16, 28, 0.95) 60%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.28),
    inset -1px -1px 0 rgba(168, 209, 141, 0.22),
    0 30px 90px -20px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
}
html:not([data-theme="light"]) body[data-app-v4] .v4-dialog::backdrop {
  background: rgba(2, 5, 10, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
html:not([data-theme="light"]) .v4-dialog h2 { font-size: 1.05rem; font-weight: 700; color: #f1f5f8; letter-spacing: -0.01em; }
html:not([data-theme="light"]) .v4-dialog-head button {
  width: 38px; height: 38px; padding: 0;
  display: inline-grid; place-items: center;
  border-radius: 999px; color: #dfe6ec; cursor: pointer;
  background: linear-gradient(180deg, rgba(76, 92, 114, 0.5), rgba(18, 26, 40, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.24);
}
html:not([data-theme="light"]) .v4-dialog-head button:hover { border-color: rgba(168, 209, 141, 0.5); color: #fff; }
html:not([data-theme="light"]) .v4-search-field {
  margin: 14px 0 10px; padding: 0 14px; gap: 10px;
  border-radius: 14px;
  background: rgba(4, 8, 15, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}
html:not([data-theme="light"]) .v4-search-field i { color: #a8d18d; }
html:not([data-theme="light"]) .v4-search-field input { min-height: 46px; color: #f1f5f8; font-size: 1rem; }
html:not([data-theme="light"]) .v4-search-field input::placeholder { color: #8e99a5; }
html:not([data-theme="light"]) .v4-search-field:focus-within { outline: 0; border-color: rgba(168, 209, 141, 0.7); box-shadow: 0 0 0 3px rgba(168, 209, 141, 0.18), inset 0 2px 8px rgba(0, 0, 0, 0.35); }
html:not([data-theme="light"]) .v4-results { gap: 6px; max-height: min(46dvh, 380px); overflow-y: auto; padding-right: 2px; }
html:not([data-theme="light"]) .v4-results button {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 8px 14px;
  border-radius: 14px; color: #e9eef2; font-size: 0.95rem; cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
html:not([data-theme="light"]) .v4-results button i { width: 20px; color: #a8d18d; text-align: center; }
html:not([data-theme="light"]) .v4-results button:hover,
html:not([data-theme="light"]) .v4-results button:focus-visible {
  background: rgba(168, 209, 141, 0.12); border-color: rgba(168, 209, 141, 0.38); outline: 0;
}
html:not([data-theme="light"]) .v4-results button[aria-current="true"] { background: rgba(168, 209, 141, 0.16); border-color: rgba(168, 209, 141, 0.5); color: #c6e4b0; }
html:not([data-theme="light"]) .v4-results button:disabled { opacity: 0.45; cursor: not-allowed; }
html[data-theme="light"] body[data-app-v4] .v4-dialog { background: rgba(250, 252, 250, 0.96); border: 1px solid rgba(38, 46, 42, 0.14); border-radius: 22px; box-shadow: 0 30px 80px -24px rgba(20, 30, 24, 0.45); }
html[data-theme="light"] body[data-app-v4] .v4-dialog::backdrop { background: rgba(20, 30, 24, 0.45); backdrop-filter: blur(6px); }
html[data-theme="light"] .v4-search-field { border-radius: 14px; background: #fff; border-color: rgba(38, 46, 42, 0.16); }
html[data-theme="light"] .v4-results button { border-radius: 14px; }
@media (max-width: 520px) {
  html:not([data-theme="light"]) body[data-app-v4] .v4-dialog { padding: 14px; border-radius: 20px; }
}

/* The search field is one pill: keep the inner input flat so it doesn't draw a second box. */
html body .v4-search-field input,
html:not([data-theme="light"]) body .v4-search-field input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  outline: 0 !important;
}

/* ===== v16: Lucide line icons in the search modal, matching the sidebar ===== */
.v16-ico { flex: none; width: 20px; height: 20px; display: block; }
html:not([data-theme="light"]) .v4-results button .v16-ico { color: #a8d18d; }
html:not([data-theme="light"]) .v4-results button:hover .v16-ico,
html:not([data-theme="light"]) .v4-results button[aria-current="true"] .v16-ico { color: #c6e4b0; }
html:not([data-theme="light"]) .v4-search-field .v16-ico { color: #a8d18d; width: 19px; height: 19px; }
html:not([data-theme="light"]) .v4-dialog-head button .v16-ico { width: 18px; height: 18px; color: #dfe6ec; }
.v4-find .v16-ico { width: 17px; height: 17px; }
html:not([data-theme="light"]) body[data-app-v5] .v4-find .v16-ico { color: #a8d18d; }
html[data-theme="light"] .v4-results button .v16-ico, html[data-theme="light"] .v4-search-field .v16-ico, html[data-theme="light"] .v4-find .v16-ico { color: #254c31; }

/* v16: signed-out screens (login, sign up) have no Messages or Alerts icons in the header. */
body[data-app-v4]:not(.saas-app) :is(#msg-bell-wrap, #notif-bell-wrap) { display: none !important; }

/* ===== v16 dock states: resume, busy, break timer ===== */
.v16-main[data-mode="resume"] { /* default glass with green icon */ }
.v16-dock.is-busy .v16-main, .v16-dock.is-busy .v16-aux { opacity: 0.72; cursor: progress; pointer-events: none; }
.v16-aux[data-mode="out"] i { color: #ff9c9c; }
.v16-aux[data-mode="break"] i { color: #e6c76f; }
.v16-main:disabled, .v16-aux:disabled { cursor: progress; }
.v16-timer { min-width: 5.2ch; text-align: center; }
/* Break status pill colour on the HR live board (class used by the app, no style of its own). */
html:not([data-theme="light"]) .badge-break { --bc: 230, 199, 111; }
