  :root {
    /* Design A: white surfaces, hairline rules, red as a mark. */
    --bg: #ffffff; --panel: #ffffff; --panel-2: #f6f7f9; --border: #e5e7eb; --border-strong: #d1d5db; --line: #e5e7eb;
    --text: #111827; --muted: #6b7280; --faint: #9ca3af; --accent: #c8102e; --accent-2: #a50d26;
    --callout: #c8102e; --tardy: #b45309; --leftearly: #6d28d9;
    --excused: #15803d; --unexcused: #c8102e; --danger: #c8102e; --expired: #9ca3af;
    --shadow-sm: none; --shadow-md: none;
    --ring: rgba(200,16,46,0.15);
    --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fdebd0; --bad: #c8102e; --bad-bg: #fde2e2;
    --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-pill: 999px;
  }
  /* Night mode — same tokens, darker values. Follows the phone unless overridden in More. */
  html[data-theme="dark"] {
    --bg: #12151b; --panel: #1b1f27; --panel-2: #242a35; --border: #2d3441; --border-strong: #3c4454;
    --text: #e7eaf0; --muted: #9aa3b2; --faint: #6f7887;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4); --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
    --ok-bg: #123322; --warn-bg: #332616; --bad-bg: #3a1218;
  }
  html[data-theme="dark"] img[src="logo.png"] { background: #fff; border-radius: 8px; padding: 3px 6px; }
  /* daypart row tints are light pastels — in dark mode they fight the light text, so neutralize them */
  html[data-theme="dark"] .lu-row { background: var(--panel-2) !important; }
  * { box-sizing: border-box; }
  body, html { margin: 0; padding: 0; background: var(--bg); color: var(--text);
    min-height: 100vh; min-height: 100dvh;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; }
  .app { max-width: 1100px; margin: 0 auto; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 16px; }
  .header { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(115deg,#123a86 0%,#2a5bb5 42%,#a5305a 74%,#c8102e 100%); border: none; border-radius: 14px; padding: 12px 18px; box-shadow: var(--shadow-sm); flex-wrap: wrap; gap: 10px; color: #fff; }
  .header .hdrLogo { background: #fff; border-radius: 9px; padding: 4px 9px; display: inline-flex; align-items: center; }
  .header h1 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: 0.01em; }
  .header .who { font-size: 12px; color: var(--muted); }
  /* Hospitality header */
  .header { padding: 16px 20px; gap: 16px; }
  .hdrL { display: flex; align-items: center; gap: 16px; min-width: 0; }
  .hdrLogo img { height: 40px; width: auto; display: block; }
  .hdrRule { width: 1px; height: 34px; background: rgba(255,255,255,.30); flex: none; }
  #hdrGreet { font-size: 16.5px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
  #hdrDate { font-size: 12px; color: rgba(255,255,255,.82); margin-top: 3px; }
  .hdrR { display: flex; align-items: center; gap: 10px; }
  .hdrChip { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; padding: 8px 13px; border-radius: 22px; background: rgba(255,255,255,.18); color: #fff; white-space: nowrap; cursor: pointer; }
  .hdrChip .k { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(26,127,55,.12); flex: none; }
  .hdrBell { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; transition: background .15s; }
  .hdrBell:hover { background: rgba(255,255,255,.26); }
  .hdrDot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--panel); }
  .hdrAvWrap { position: relative; }
  .hdrAvatar { width: 42px; height: 42px; border-radius: 50%; background: #5b2a4e; color: #fff; font-size: 14.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; }
  .hdrMenu { position: absolute; right: 0; top: 54px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 38px rgba(0,0,0,.18); padding: 7px; min-width: 210px; z-index: 120; display: none; }
  .hdrMenu.on { display: block; }
  .hdrMenu .mh { padding: 10px 12px 9px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
  .hdrMenu .mh .n { font-size: 14px; font-weight: 800; }
  .hdrMenu .mh .r { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
  .hdrMenu .mi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; }
  .hdrMenu .mi:hover { background: var(--panel-2); }
  .hdrMenu .mi.danger { color: var(--accent); }
  /* Leader dashboard — Today's Snapshot */
  .dashCard { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 15px 15px 16px; box-shadow: 0 4px 14px rgba(20,25,40,.05); }
  .dashTop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .dashTop .t { font-size: 16px; font-weight: 800; }
  .dashTop .w { font-size: 12.5px; color: var(--muted); font-weight: 700; }
  .dashGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
  .dashStat { border-radius: 15px; padding: 14px; cursor: pointer; }
  .dashStat .ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 9px; }
  .dashStat .ic svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; }
  .dashStat .n { font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: #1b2230; }
  .dashStat .l { font-size: 13px; font-weight: 700; margin-top: 3px; color: #2a3040; }
  .dashStat .s { font-size: 11.5px; font-weight: 700; margin-top: 5px; }
  .dashStat.g1 { background: #e7f7ee; } .dashStat.g1 .ic { background: #22a35a; } .dashStat.g1 .s { color: #1a7f43; }
  .dashStat.g2 { background: #fdecef; } .dashStat.g2 .ic { background: #e4405f; } .dashStat.g2 .s { color: #c0344f; }
  .dashStat.g3 { background: #efeafc; } .dashStat.g3 .ic { background: #7a54d0; } .dashStat.g3 .s { color: #6742b8; }
  .dashStat.g4 { background: #fef3e0; } .dashStat.g4 .ic { background: #e8983a; } .dashStat.g4 .s { color: #c47a20; }
  .dashLeads { margin-top: 13px; }
  .dashLead { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--border); }
  .dashLead:first-of-type { border-top: none; padding-top: 4px; }
  .dashLav { width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
  .dashLead .nm { font-size: 13.5px; font-weight: 700; } .dashLead .rl { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
  .dashContact { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--accent); border: 1.5px solid var(--accent); background: var(--panel); border-radius: 9px; padding: 6px 13px; cursor: pointer; }
  /* End of Shift Report form */
  .eos-gh { background: linear-gradient(115deg,#123a86 0%,#2a5bb5 42%,#a5305a 74%,#c8102e 100%); color: #fff; border-radius: 14px; padding: 15px 16px; margin-bottom: 12px; }
  .eos-gh .t { font-size: 16px; font-weight: 800; }
  .eos-gh .meta { display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
  .eos-gh .m .k { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.72); }
  .eos-gh .m .v { font-size: 13.5px; font-weight: 800; margin-top: 1px; }
  .eos-toggle { display: flex; gap: 8px; margin-bottom: 12px; }
  .eos-toggle button { flex: 1; border: 1px solid var(--border); background: var(--panel); font: inherit; font-size: 13.5px; font-weight: 800; padding: 9px; border-radius: 11px; cursor: pointer; color: var(--muted); }
  .eos-toggle button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
  .eos-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 15px; margin-bottom: 11px; }
  .eos-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
  .eos-lbl .tick { width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .eos-auto { font-size: 9px; font-weight: 800; color: #1a7f43; background: #e7f7ee; border-radius: 10px; padding: 1px 7px; text-transform: uppercase; letter-spacing: .03em; }
  .eos-kv { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; padding: 6px 0; border-top: 1px solid var(--border); } .eos-kv:first-of-type { border-top: none; }
  .eos-kv .k { color: var(--muted); font-weight: 700; } .eos-kv .v { font-weight: 800; }
  .eos-kv input { width: 96px; text-align: right; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; font-weight: 800; color: var(--text); background: var(--panel-2); }
  .eos-chk { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 9px 0; border-top: 1px solid var(--border); cursor: pointer; } .eos-chk:first-of-type { border-top: none; }
  .eos-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; }
  .eos-chk.on .eos-box { background: #1a7f43; border-color: #1a7f43; }
  .eos-chk .txt { font-weight: 600; } .eos-chk.on .txt { color: var(--muted); }
  .eos-rate { padding: 9px 0; border-top: 1px solid var(--border); } .eos-rate:first-of-type { border-top: none; }
  .eos-rate .rl { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
  .eos-stars, .eos-hearts { font-size: 24px; letter-spacing: 4px; cursor: pointer; user-select: none; }
  .eos-stars span, .eos-hearts span { cursor: pointer; }
  .eos-time { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; font-weight: 800; color: var(--text); background: var(--panel-2); }
  .eos-notes { width: 100%; min-height: 78px; border: 1px solid var(--border); border-radius: 11px; padding: 11px; font: inherit; font-size: 13.5px; resize: vertical; color: var(--text); background: var(--panel-2); }
  .eos-submit { width: 100%; background: var(--accent); color: #fff; border: none; border-radius: 12px; padding: 14px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
  .eos-hint { font-size: 11px; color: var(--faint); margin-top: 7px; }
  /* WASTE — template C (colored header, white body, table grid) */
  .wl-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 3px 12px rgba(20,25,40,.06); margin-bottom: 15px; }
  .wl-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; color: #fff; }
  .wl-hd .t { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
  .wl-hd .badge { background: rgba(255,255,255,.24); border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 800; white-space: nowrap; }
  .wl-hd.dp-Breakfast { background: linear-gradient(120deg,#e8983a,#d17c1f); }
  .wl-hd.dp-Lunch { background: linear-gradient(120deg,#4a90d9,#2f6fb5); }
  .wl-hd.dp-Afternoon { background: linear-gradient(120deg,#e0654e,#c74631); }
  .wl-hd.dp-Dinner { background: linear-gradient(120deg,#7a54d0,#5c39ac); }
  .wl-hd.dp-sum { background: linear-gradient(120deg,#123a86,#2a5bb5); }
  .wl-hd.dp-fs { background: linear-gradient(120deg,#1a7f43,#12633a); }
  .wl-body { padding: 6px 14px 14px; }
  .wl-controls { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 12px 14px 4px; }
  .wl-controls label { margin: 0; font-weight: 700; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .wl-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 12px; }
  .wl-chip { cursor: pointer; font-size: 12.5px; font-weight: 800; padding: 7px 14px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
  .wl-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
  .wl-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; padding: 0 14px 4px; }
  .mysch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--border); }
  .mysch-row:first-child { border-top: none; }
  .mysch-row .mysch-day { font-size: 14px; font-weight: 700; display: flex; align-items: baseline; gap: 9px; }
  .mysch-row .mysch-date { font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .mysch-row .mysch-shift { font-size: 14px; font-weight: 800; color: var(--accent); white-space: nowrap; }
  .mysch-row.off .mysch-day { color: var(--muted); font-weight: 600; }
  .mysch-row.off .mysch-shift { color: var(--faint); font-weight: 600; }
  .mysch-row.today { background: linear-gradient(90deg, rgba(42,91,181,.07), transparent); border-radius: 9px; padding-left: 10px; padding-right: 10px; }
  .mysch-row.today .mysch-day::after { content: 'TODAY'; font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--accent); border-radius: 10px; padding: 2px 7px; margin-left: 2px; }
  /* reusable loading skeleton */
  .skl { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--border) 25%, var(--panel-2) 37%, var(--border) 63%); background-size: 400% 100%; animation: sklsh 1.2s ease-in-out infinite; }
  @keyframes sklsh { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
  /* Dashboard gradient header + chips (Option A) */
  .dashHdr { background: linear-gradient(115deg,#123a86 0%,#2a5bb5 42%,#a5305a 74%,#c8102e 100%); color: #fff; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-radius: 16px 16px 0 0; }
  .dashHdr .burger { width: 20px; height: 16px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; flex: none; }
  .dashHdr .burger i { height: 2px; background: #fff; border-radius: 2px; } .dashHdr .burger i:nth-child(2) { width: 70%; }
  .dashHdr .glogo { display: inline-flex; background: #fff; border-radius: 7px; padding: 3px 7px; } .dashHdr .glogo img { height: 18px; display: block; }
  .dashHdr .gt { font-size: 16px; font-weight: 800; }
  .dashHdr .gbell { margin-left: auto; width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; color: #fff; }
  .dashHdr .gbell svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
  .dashChips { display: flex; gap: 8px; align-items: center; padding: 12px 2px 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dashChips::-webkit-scrollbar { display: none; }
  .dchip { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 6px 11px; font-size: 11.5px; font-weight: 700; white-space: nowrap; cursor: pointer; color: var(--text); }
  .dchip b { background: #fdecef; color: var(--accent); border-radius: 20px; padding: 0 6px; font-size: 11px; }
  #homeDash .dashCard { margin-top: 12px; }
  /* Full-bleed dashboard header on phones */
  #homeTopBar .dashHdr { border-radius: 16px; margin-bottom: 14px; }
  @media (max-width: 700px) {
    #homeTopBar { margin: calc(-12px - env(safe-area-inset-top, 0px)) -12px 12px; }
    #homeTopBar .dashHdr { border-radius: 0; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
    #homeDash { margin: 0 -12px; }
    #homeDash .dashChips { padding-left: 12px; padding-right: 12px; }
    #homeDash .dashCard { margin: 12px 12px 0; }
  }
  /* Team-member gradient launcher */
  .panel.tmLaunch { background: linear-gradient(180deg,#0f2f77 0%,#1a49a0 28%,#6b2668 54%,#a81d3a 80%,#c8102e 100%) !important; border: none; color: #fff; border-radius: 20px; padding: 18px 16px 20px; box-shadow: 0 12px 30px rgba(15,30,90,.28); min-height: 0; }
  .tmL-top { display: flex; align-items: center; justify-content: space-between; }
  .tmL-hi { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.85); }
  .tmL-hi b { display: block; font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -.01em; margin-top: 1px; }
  .tmL-inbox { cursor: pointer; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 6px 12px; font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap; }
  .tmL-hero { display: flex; align-items: center; gap: 15px; margin: 16px 2px 4px; }
  .tmL-ring { position: relative; width: 92px; height: 92px; flex: none; }
  .tmL-ring .v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .tmL-ring .num { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
  .tmL-ring .un { font-size: 8px; font-weight: 800; color: rgba(255,255,255,.7); letter-spacing: .1em; text-transform: uppercase; margin-top: 1px; }
  .tmL-htxt .k { font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .05em; }
  .tmL-htxt .b { font-size: 18px; font-weight: 800; line-height: 1.2; margin-top: 3px; }
  .tmL-htxt .s { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 4px; }
  .tmL-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
  .tmL-tile { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 9px; cursor: pointer; transition: background .15s, transform .1s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .tmL-tile:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
  .tmL-tile svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.8; }
  .tmL-tile span { font-size: 13px; font-weight: 700; color: #fff; }
  .tmL-tile .bdg { font-size: 9.5px; font-weight: 800; background: #fff; color: #c8102e; border-radius: 11px; padding: 1px 8px; margin-top: -3px; }
  .tmL-sec { margin-top: 16px; }
  .tmL-sec .lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.7); margin-bottom: 7px; }
  .tmL-week { display: flex; gap: 5px; }
  .tmL-day { flex: 1; border-radius: 10px; padding: 7px 2px; text-align: center; background: rgba(255,255,255,.1); }
  .tmL-day.on { background: rgba(255,255,255,.2); }
  .tmL-day.today { outline: 2px solid #fff; }
  .tmL-day .dn { font-size: 8.5px; font-weight: 800; color: rgba(255,255,255,.7); text-transform: uppercase; }
  .tmL-day .dt { font-size: 9.5px; font-weight: 800; margin-top: 2px; color: #fff; }
  .tmL-crew { display: flex; margin-top: 8px; padding-left: 6px; }
  .tmL-cv { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; margin-left: -6px; }
  /* Command palette */
  .cmdVeil { position: fixed; inset: 0; background: rgba(17,24,39,.42); display: none; align-items: flex-start; justify-content: center; z-index: 1300; padding-top: 14vh; }
  .cmdVeil.on { display: flex; }
  .cmdBox { width: min(560px, 92vw); background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden; animation: cmdPop .14s ease; }
  @keyframes cmdPop { from { transform: translateY(-8px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
  .cmdTop { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--border); }
  .cmdTop svg { color: var(--muted); flex: none; }
  .cmdTop input { flex: 1; border: none; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--text); }
  .cmdTop input::placeholder { color: var(--faint); }
  .cmdEsc { font-size: 10.5px; font-weight: 800; color: var(--faint); background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }
  .cmdRes { max-height: 320px; overflow: auto; padding: 7px; }
  .cmdRes .rhead { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding: 9px 10px 4px; }
  .cmdRes .ritem { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text); }
  .cmdRes .ritem.sel, .cmdRes .ritem:hover { background: var(--panel-2); }
  .cmdRes .ritem .rsub { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: auto; }
  .cmdRes .ritem .rcsf { font-size: 9px; font-weight: 800; color: #fff; border-radius: 9px; padding: 2px 8px; margin-left: auto; letter-spacing: .03em; }
  .cmdRes .rempty { padding: 16px 12px; color: var(--muted); font-size: 13.5px; }
  .panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
  h2 { margin: 0 0 14px 0; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
  /* Small uppercase section label — the quiet way to title a block. */
  .eyebrow { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
  /* The greeting moved into the header. These old hero blocks are kept only so the
     existing render code can still write to them — they must never be shown. */
  #homeHero, #dashHero { display: none !important; }
  label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
  input, select, textarea {
    width: 100%; padding: 9px 11px; background: var(--panel-2); color: var(--text);
    border: 1px solid var(--border); border-radius: 9px; font: inherit; outline: none;
  }
  input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
  textarea { resize: vertical; min-height: 60px; }
  button { padding: 10px 18px; background: var(--accent); color: white; border: none; border-radius: 10px; font: inherit; font-weight: 800; letter-spacing: 0.01em; cursor: pointer; transition: background 0.15s, transform 0.04s; }
  button:hover { background: var(--accent-2); }
  button:active { transform: translateY(1px); }
  button:disabled { opacity: 0.5; cursor: not-allowed; }
  button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
  button.secondary:hover { background: var(--panel-2); }
  button.danger { background: transparent; color: var(--danger); border: none; padding: 4px 8px; }
  button.danger:hover { background: rgba(216,56,56,0.08); }
  .grid-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
  table { width: 100%; border-collapse: collapse; }
  th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
  th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
  .shift-table { min-width: 560px; }
  .shift-table td { vertical-align: middle; }
  .shift-table .shift-day { font-weight: 600; white-space: nowrap; width: 96px; }
  .shift-cell-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 120px; min-height: 34px; padding: 3px; border-radius: 8px; cursor: pointer; }
  .shift-cell-wrap:hover { background: var(--panel-2); }
  .leader-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 12px; white-space: nowrap; }
  .leader-chip .chip-x { cursor: pointer; opacity: 0.55; font-weight: 700; }
  .leader-chip .chip-x:hover { opacity: 1; }
  .shift-add-hint { color: var(--muted); font-size: 14px; opacity: 0; transition: opacity 0.12s; margin-left: 2px; }
  .shift-cell-wrap:hover .shift-add-hint { opacity: 0.45; }
  select.shift-add { width: auto; min-width: 44px; padding: 5px 6px; border-radius: 8px; cursor: pointer; background: var(--panel-2); color: var(--muted); font-size: 12px; }
#homeCsf { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
  @media (min-width: 701px) { #homeCsf { grid-template-columns: repeat(5, 1fr); gap: 8px; } }
.setpanel summary::-webkit-details-marker{display:none;}
  .setpanel[open] summary span:last-child{display:none;}
  .lu-section {  background: #e0452a; color: #fff; font-weight: 600; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; padding: 8px 12px; border-radius: 8px; margin-top: 10px; }
  .lu-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
  .lu-label { min-width: 150px; font-weight: 600; font-size: 13px; }
  .lu-cap { display: inline-block; color: var(--accent); margin-right: 4px; font-size: 12px; }
  .lu-slots { display: flex; flex-wrap: wrap; gap: 8px; }
  .lu-slot { min-width: 118px; height: 34px; border-radius: 8px; display: flex; align-items: center; gap: 5px; justify-content: center; font-size: 12px; padding: 0 10px; white-space: nowrap; }
  .lu-slot.empty { border: 1.5px dashed var(--border); color: var(--muted); cursor: default; }
  .lu-slot.empty.need { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); font-weight: 800; }
  .lu-slot[draggable="true"] { cursor: grab; }
  .lu-tray-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; user-select: none; padding: 5px 10px; border-radius: 11px; }
  tr.expired td { color: var(--expired); }
  tr.expired .pill { opacity: 0.45; }
  .pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
  .pill.callout { background: rgba(216,56,56,0.12); color: var(--callout); }
  .pill.tardy { background: rgba(184,115,10,0.14); color: var(--tardy); }
  .pill.leftearly { background: rgba(122,78,209,0.14); color: var(--leftearly); }
  .pill.excused { background: rgba(45,138,90,0.14); color: var(--excused); }
  .pill.unexcused { background: rgba(216,56,56,0.12); color: var(--unexcused); }
  .pill.expired { background: rgba(154,163,178,0.18); color: var(--expired); }
  .pill.active { background: rgba(45,138,90,0.14); color: var(--excused); }
  .pill.soon { background: rgba(184,115,10,0.18); color: var(--tardy); }
  .today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
  .today-stat { display: flex; flex-direction: column; gap: 4px; background: var(--panel-2); padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border); }
  .today-stat .num { font-size: 26px; font-weight: 900; line-height: 1; }
  .today-stat .lbl { font-size: 11px; color: var(--muted); margin-top: 0; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
  .today-stat .delta { display: none; }
  .today-stat .delta.up { color: var(--callout); }
  .today-stat .delta.down { color: var(--excused); }
  .chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  @media (max-width: 720px) { .chart-grid { grid-template-columns: 1fr; } }
  /* ---- Mobile polish ---- */
  /* Bottom navigation bar (phones only) */
  #bottomNav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: none; background: var(--panel); border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(0,0,0,0.08); }
  #bottomNav .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 7px 2px; padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; user-select: none; }
  #bottomNav .bn-item.active { color: var(--accent); }
  #bottomNav .bn-fabwrap { position: relative; }
  #bottomNav .bn-fab { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,#7a1f4a,#c8102e); display: flex; align-items: center; justify-content: center; margin-top: -22px; box-shadow: 0 8px 20px rgba(200,16,46,.4); }
  #bottomNav .bn-fab svg { width: 22px; height: 22px; stroke: #fff; }
  body.onLauncher #bottomNav .bn-fab { background: rgba(255,255,255,.9); }
  body.onLauncher #bottomNav .bn-fab svg { stroke: #c8102e; }
  #bottomSheet { position: fixed; inset: 0; z-index: 210; display: none; }
  #bottomSheet .bs-backdrop { position: absolute; inset: 0; background: rgba(20,25,35,0.45); }
  #bottomSheet .bs-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow: auto; background: var(--panel); border-radius: 16px 16px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0,0,0,0.2); }
  #bottomSheet .bs-item { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  #bottomSheet .bs-head { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text); margin: 16px 0 4px; }
  /* One-tap Swap sheet */
  #swapSheet { display: none; position: fixed; inset: 0; z-index: 1200; }
  #swapSheet .swp-backdrop { position: absolute; inset: 0; background: rgba(20,25,35,0.45); }
  #swapSheet .swp-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow: auto; background: var(--panel); border-radius: 18px 18px 0 0; padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0,0,0,0.2); }
  #swapSheet .swp-step { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
  #swapSheet .swp-h { font-size: 17px; font-weight: 800; margin-bottom: 3px; }
  #swapSheet .swp-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
  #swapSheet .swp-opt { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 11px; margin-bottom: 8px; cursor: pointer; background: var(--panel); width: 100%; text-align: left; font: inherit; color: var(--text); }
  #swapSheet .swp-opt:hover { border-color: var(--border-strong); }
  #swapSheet .swp-meta { display: flex; flex-direction: column; min-width: 0; }
  #swapSheet .swp-n { font-size: 14px; font-weight: 700; }
  #swapSheet .swp-t { font-size: 12px; color: var(--muted); margin-top: 1px; }
  #swapSheet .swp-rev { background: var(--panel-2); border-radius: 11px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.6; }
  #swapSheet .swp-confirm { width: 100%; background: var(--accent); color: #fff; border: none; border-radius: 11px; padding: 13px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
  #swapSheet .swp-confirm:disabled { opacity: .6; cursor: default; }
  #swapSheet .swp-cancel { width: 100%; background: transparent; color: var(--muted); border: none; padding: 12px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; margin-top: 4px; }
  @media (min-width: 701px) {
    #swapSheet .swp-panel { left: 50%; transform: translateX(-50%); bottom: auto; top: 50%; margin-top: -220px; width: 420px; border-radius: 18px; max-height: 88vh; }
  }
  /* Phones: bottom bar */
  @media (max-width: 700px) {
    #bottomNav { display: flex; }
    .app { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  }
  /* Tablet / computer: left vertical rail */
  @media (min-width: 701px) {
    #bottomNav { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px; left: 0; right: auto; top: 0; bottom: 0; width: 80px; border-top: none; border-right: 1px solid var(--border); box-shadow: 2px 0 12px rgba(0,0,0,0.06); padding: 16px 0; }
    #bottomNav .bn-item { flex: 0 0 auto; padding: 13px 4px; border-radius: 10px; margin: 0 8px; }
    #bottomNav .bn-item.active { background: var(--panel-2); }
    .app { padding-left: 100px; }
    #bottomSheet .bs-panel { left: 80px; right: auto; width: 360px; top: 0; bottom: auto; max-height: 100vh; border-radius: 0 16px 16px 0; }
  }

  /* ===== Team Hub layout (cream canvas, white bar, tile hubs) ===== */
  .hub { max-width: 1040px; margin: 0 auto; }
  .hub-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; margin: 2px 0 16px; }
  .hub-head { display: flex; align-items: center; gap: 12px; }
  .hub-head .hub-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
  .hub-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.2px; color: var(--text); }
  .hub-welcome { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 8px 0 18px; }
  .hub-sec { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
  .hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
  .hub-tile { background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 16px; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; min-height: 132px; display: flex; flex-direction: column; }
  .hub-tile:hover { background: var(--panel); box-shadow: var(--shadow-md); transform: translateY(-1px); }
  .hub-tile:active { transform: translateY(0); }
  .hub-tile .tic { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; flex: none; }
  .hub-tile .tic svg { width: 22px; height: 22px; }
  .hub-tile .tt { font-size: 15px; font-weight: 800; color: var(--text); }
  .hub-tile .td { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
  .hub-tile.soft .tic { background: var(--text); }
  .hub-tile.plain .tic { background: var(--panel); color: var(--accent); border: 1.5px solid var(--border-strong); }
  /* Home: store title + vision + row cards */
  .hub-store { text-align: center; padding: 6px 0 4px; }
  .hub-store .hs-name { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.2px; }
  .hub-store .hs-sub { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; }
  .hub-vision { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; margin: 14px 0 6px; text-align: center; }
  .hub-vision .hv-t { color: var(--accent); font-weight: 800; font-size: 15px; margin-bottom: 8px; }
  .hub-vision .hv-l { font-size: 13px; line-height: 1.55; }
  .hub-vision .hv-l b { color: var(--text); }
  .hub-vision .hv-q { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
  .hub-vision .qk { font-size: 9.5px; font-weight: 800; letter-spacing: .16em; color: var(--muted); margin-right: 4px; } .hub-vision .qw { font-size: 15px; font-weight: 800; color: var(--accent); } .hub-vision .hv-q i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
  .hub-rows { display: grid; gap: 10px; margin-top: 12px; }
  .hub-row { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
  .hub-row:hover { box-shadow: var(--shadow-md); }
  .hub-row .ric { width: 38px; height: 38px; border-radius: 10px; background: rgba(228,0,43,.08); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .hub-row .rt { font-size: 15px; font-weight: 800; }
  .hub-row .rd { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
  .hub-row .rchev { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
  @media (min-width: 700px) { .hub-rows { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 600px) { .hub-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .hub-tile { padding: 14px; min-height: 118px; border-radius: 14px; } .hub-tile .tic { width: 38px; height: 38px; margin-bottom: 10px; } .hub-tile .tt { font-size: 14px; } .hub-head h2 { font-size: 21px; } }
  @media (max-width: 600px) {
    body, html { font-size: 14px; }
    .app { padding: 12px; gap: 12px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
    /* Home launcher goes edge-to-edge on phones, like the preview */
    /* Launcher is a fixed, non-scrolling full-screen gradient */
    body.onLauncher { overflow: hidden; }
    body.onLauncher #tmHome { position: fixed; inset: 0; z-index: 100; margin: 0; overflow: hidden; }
    body.onLauncher #tmHome .panel.tmLaunch { border-radius: 0; padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); min-height: 100dvh; }
    /* On the launcher, the shared bottom nav goes translucent so the gradient shows through */
    body.onLauncher #bottomNav { background: rgba(14,18,40,.30); border-top-color: rgba(255,255,255,.16); box-shadow: none; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
    body.onLauncher #bottomNav .bn-item { color: rgba(255,255,255,.78); }
    body.onLauncher #bottomNav .bn-item.active { color: #fff; }
    /* Header on a phone: logo · greeting · bell · avatar. Chip, divider, role preview drop out. */
    .header { flex-wrap: nowrap; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; }
    .hdrL { gap: 10px; }
    .hdrLogo img { height: 30px; }
    .hdrRule, .hdrChip { display: none !important; }
    #hdrGreet { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #hdrDate { font-size: 11.5px; white-space: nowrap; }
    .hdrBell, .hdrAvatar { width: 38px; height: 38px; }
    #viewAs, #logoutBtn, #driveStatus, #roleBadge { display: none !important; }
    .header h1 { font-size: 15px; }
    .panel { padding: 14px; border-radius: 12px; }
    h2 { font-size: 15px; }
    /* Comfortable touch targets and no cramped controls. */
    button { padding: 11px 16px; min-height: 42px; }
    input, select, textarea { padding: 11px 12px; font-size: 16px; }  /* 16px stops iOS zoom-on-focus */
    .toolbar { flex-wrap: wrap; gap: 8px; }
    table { font-size: 12.5px; }
    th, td { padding: 8px 6px; }
    .grid-form { grid-template-columns: 1fr !important; }
    .lu-row { flex-wrap: wrap; }
    .lu-label { min-width: 0; flex-basis: 100%; }
    .lu-slots { width: 100%; }
    .lu-slot { min-width: 104px; }
    .today-grid { grid-template-columns: 1fr 1fr; }
  }
  .chart-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
  .chart-card h3 { font-size: 13px; margin: 0 0 4px; }
  .chart-card .sub { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
  .chart-wrap { position: relative; height: 220px; }
  .name-chip { background: rgba(216,56,56,0.1); color: var(--callout); padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; }
  .name-chip.tardy { background: rgba(184,115,10,0.14); color: var(--tardy); }
  .name-chip.leftearly { background: rgba(122,78,209,0.14); color: var(--leftearly); }
  .empty { color: var(--muted); text-align: center; padding: 24px; font-style: italic; }
  .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: end; }
  .filter-bar > div { flex: 1; min-width: 130px; }
  .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
  .banner { background: rgba(228,0,43,0.05); border: 1px solid rgba(228,0,43,0.18); padding: 10px 14px; border-radius: 8px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .file-drop { border: 1.5px dashed var(--border); border-radius: 8px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; background: var(--panel-2); }
  .file-drop.has-file { border-style: solid; border-color: var(--excused); color: var(--text); background: rgba(45,138,90,0.06); }
  .attach-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: rgba(45,138,90,0.14); color: var(--excused); border-radius: 10px; font-size: 11px; font-weight: 600; cursor: pointer; border: none; }
  .login-overlay { position: fixed; inset: 0; background: rgba(20,25,35,0.85); display: flex; align-items: center; justify-content: center; z-index: 100; }
  .login-card { background: var(--panel); border-radius: 14px; padding: 28px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
  .login-card h2 { margin: 0 0 4px; }
  .login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
  .login-banner { background: var(--accent); margin: -28px -28px 22px; border-radius: 14px 14px 0 0; padding: 24px 28px 22px; text-align: center; box-shadow: 0 2px 8px rgba(228,0,43,0.22); }
  .login-banner h2 { color: #fff; margin: 14px 0 2px; font-weight: 800; }
  .login-banner .sub { color: rgba(255,255,255,0.88); font-size: 13px; margin: 0; }
  .login-logo-chip { display: inline-flex; background: #fff; border-radius: 12px; padding: 8px 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.16); }
  .toast { position: fixed; top: 16px; right: 16px; padding: 10px 16px; border-radius: 8px; background: var(--text); color: white; font-size: 13px; z-index: 99; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
  .toast.err { background: var(--danger); }
  .loading { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -3px; margin-right: 6px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .gsi-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; color: var(--muted); }

/* ===== Station mode (shared iPads): name picker + acting-as chip ===== */
#stationPick { position: fixed; inset: 0; z-index: 400; }
#stationPick .sp-back { position: absolute; inset: 0; background: rgba(14,18,40,.45); }
#stationPick .sp-panel { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); width: min(560px, 94vw); max-height: 84vh; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-md); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
#stationPick .sp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#stationPick .sp-t { font-size: 22px; font-weight: 800; } #stationPick .sp-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
#stationPick .sp-q { font-size: 18px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong); }
#stationPick .sp-list { overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#stationPick .sp-name { text-align: left; font-size: 16px; font-weight: 700; padding: 14px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
#stationPick .sp-name span { font-size: 11px; font-weight: 700; color: var(--accent); }
#stationPick .sp-name:active { background: var(--panel); }
@media (max-width: 600px) { #stationPick .sp-list { grid-template-columns: 1fr; } }
#stationChip { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 350; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 22px; padding: 7px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-md); white-space: nowrap; }
#stationChip .sc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok, #1a7f43); } #stationChip .sc-dot.off { background: var(--faint); }
#stationChip .sc-sw, #stationChip .sc-out { color: var(--accent); font-weight: 800; cursor: pointer; padding-left: 6px; border-left: 1px solid var(--border); }


/* =====================================================================================
   DESIGN A LAYER — flat, editorial. Later rules win, so this reshapes the shell without
   touching the screens' own markup. Phone and laptop both.
   ===================================================================================== */
  html { background: var(--bg); }
  .app { gap: 0; padding-top: calc(0px + env(safe-area-inset-top, 0px)); }
  /* Header: flat white, kicker + title, hairline below. */
  .header { background: var(--panel) !important; color: var(--text); border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0 12px; margin-bottom: 4px; }
  .header .hdrLogo { background: transparent; padding: 0; border-radius: 0; }
  .hdrLogo img { height: 30px; }
  .hdrRule { background: var(--line); }
  .hdrL, .hdrL > div { min-width: 0; }
  #hdrGreet { color: var(--text); font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hdrR { flex: none; }
  #hdrDate { color: var(--muted); font-size: 12px; margin-top: 2px; }
  .hdrChip { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); font-weight: 700; border-radius: 999px; }
  .hdrBell { background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; }
  .hdrBell:hover { background: var(--panel-2); }
  .hdrBell svg { stroke: var(--text) !important; }
  .hdrAvatar { background: var(--text); width: 36px; height: 36px; font-size: 13px; }
  .hdrMenu { border-radius: 10px; box-shadow: 0 10px 30px rgba(17,24,39,.14); }
  /* Panels become sections: no card, a hairline underneath, generous air. */
  .panel { background: transparent; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 20px 0 22px; box-shadow: none; }
  .panel:last-child { border-bottom: none; }
  .panel .panel { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-top: 10px; }   /* a panel inside a panel stays a quiet box */
  h2 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 12px; }
  h3 { font-weight: 700; letter-spacing: -.01em; }
  .eyebrow { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
  /* Controls: one button system — primary (red), secondary (hairline), danger (quiet text). */
  button { border-radius: var(--r-sm); font-weight: 700; letter-spacing: 0; padding: 9px 14px; }
  button.secondary { border-color: var(--border-strong); background: var(--panel); }
  button.secondary:hover { background: var(--panel-2); }
  input, select, textarea { background: var(--panel); border-color: var(--border-strong); border-radius: var(--r-sm); }
  label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
  th { font-size: 10px; letter-spacing: .14em; font-weight: 700; padding: 10px 10px; }
  td { padding: 11px 10px; border-bottom: 1px solid #f1f3f5; }
  .pill { border-radius: 4px; font-weight: 700; padding: 2px 7px; }
  .empty { font-style: normal; }
  .toast { border-radius: 8px; box-shadow: 0 8px 24px rgba(17,24,39,.18); }
  /* Bottom bar (phone) and rail (laptop): white, hairline, red mark on the active item. */
  #bottomNav { background: var(--panel); border-top: 1px solid var(--line); box-shadow: none; }
  #bottomNav .bn-item { color: var(--muted); font-weight: 600; font-size: 10.5px; position: relative; }
  #bottomNav .bn-item.active { color: var(--text); }
  #bottomNav .bn-item.active::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 18px; height: 2px; background: var(--accent); }
  @media (min-width: 701px) {
    #bottomNav { border-right: 1px solid var(--line); box-shadow: none; }
    #bottomNav .bn-item.active { background: var(--panel-2); }
    #bottomNav .bn-item.active::before { display: none; }
  }
  body.onLauncher #bottomNav { background: var(--panel); border-top-color: var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.onLauncher #bottomNav .bn-item { color: var(--muted); }
  body.onLauncher #bottomNav .bn-item.active { color: var(--text); }
  #bottomSheet .bs-panel { border-radius: 14px 14px 0 0; }
  /* Hubs: tiles become list rows. */
  .hub-back { font-size: 13px; color: var(--muted); }
  .hub-head .hub-ic { display: none; }
  .hub-head h2 { font-size: 26px; letter-spacing: -.02em; }
  .hub-welcome { display: none; }
  .hub-sec { font-size: 10px; letter-spacing: .14em; color: var(--muted); margin: 20px 0 2px; }
  .hub-grid { display: block; }
  .hub-tile { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; background: transparent; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 13px 0; min-height: 0; box-shadow: none; transform: none; text-align: left; }
  .hub-tile:hover { background: transparent; box-shadow: none; transform: none; }
  .hub-tile .tic { display: none; }
  .hub-tile .tt { font-size: 15px; font-weight: 600; }
  .hub-tile .td { margin: 0; text-align: right; color: var(--faint); font-size: 12.5px; }
  .hub-tile .tt + .td { margin-left: auto; }
  /* Home (leaders): quiet store line, mission moved to the Growth page, doors as a list. */
  .hub-store { text-align: left; padding: 6px 0 0; }
  .hub-store .hs-name { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
  .hub-store .hs-sub { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
  .hub-vision { display: none; }
  .hub-rows { display: block; margin-top: 14px; }
  .hub-row { background: transparent; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0; gap: 12px; }
  .hub-row:hover { box-shadow: none; }
  .hub-row .ric { display: none; }
  .hub-row .rt { font-size: 16px; font-weight: 600; }
  .hub-row .rd { font-size: 12.5px; color: var(--faint); margin-top: 1px; }
  .hub-row .rchev { border: none; width: auto; height: auto; color: var(--faint); }
  @media (min-width: 700px) { .hub-rows { display: block; } }
  /* Leader dashboard: flat header, numbers in a strip instead of pastel tiles. */
  .dashHdr { background: var(--panel) !important; color: var(--text); border-bottom: 1px solid var(--line); border-radius: 0 !important; padding: 14px 0; }
  .dashHdr .burger i { background: var(--text); }
  .dashHdr .glogo { background: transparent; padding: 0; }
  .dashHdr .gbell { background: transparent; border: 1px solid var(--line); border-radius: 8px; }
  .dashHdr .gbell svg { stroke: var(--text); }
  #homeTopBar .dashHdr { margin-bottom: 0; }
  @media (max-width: 700px) { #homeTopBar { margin: 0 0 8px; } #homeTopBar .dashHdr { padding-top: calc(14px + env(safe-area-inset-top, 0px)); } #homeDash { margin: 0; } #homeDash .dashCard { margin: 0; } }
  .dashCard { background: transparent; border: none; border-radius: 0; padding: 14px 0; box-shadow: none; border-bottom: 1px solid var(--line); }
  .dashTop .t { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
  .dashGrid { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .dashStat { background: transparent !important; border-radius: 0; padding: 12px 10px 12px 0; }
  .dashStat + .dashStat { border-left: 1px solid var(--line); padding-left: 12px; }
  .dashStat .ic { display: none; }
  .dashStat .n { font-size: 26px; color: var(--text); }
  .dashStat .l { font-size: 12px; color: var(--muted); font-weight: 600; }
  .dashStat .s { font-size: 11.5px; color: var(--muted) !important; font-weight: 600; }
  .dchip { border-radius: 6px; font-weight: 600; }
  .dchip b { border-radius: 4px; }
  .dashContact { border-radius: 6px; border-width: 1px; }
  .today-stat { background: transparent; border: none; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
  .today-stat .num { font-weight: 800; letter-spacing: -.02em; }
  /* Team-member Home: the gradient launcher becomes a flat white page. */
  .panel.tmLaunch { background: var(--panel) !important; color: var(--text); border-radius: 0; }
  .tmL-hi { color: var(--muted); }
  .tmL-hi b { color: var(--text); font-size: 26px; letter-spacing: -.02em; }
  .tmL-inbox { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 6px; }
  .tmL-ring .un, .tmL-htxt .k, .tmL-htxt .s { color: var(--muted); }
  .tmL-htxt .b { color: var(--text); }
  .tmL-tile { background: transparent; border: 1px solid var(--line); border-radius: var(--r-md); }
  .tmL-tile:hover { background: var(--panel-2); transform: none; }
  .tmL-tile svg { stroke: var(--text); }
  .tmL-tile span { color: var(--text); }
  .tmL-tile .bdg { background: var(--accent); color: #fff; }
  .tmL-sec .lbl { color: var(--muted); letter-spacing: .14em; font-size: 10px; }
  .tmL-day { background: var(--panel-2); }
  .tmL-day.on { background: var(--text); }
  .tmL-day.on .dn, .tmL-day.on .dt { color: #fff; }
  .tmL-day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
  .tmL-day .dn { color: var(--muted); } .tmL-day .dt { color: var(--text); }
  .tmL-cv { border-color: var(--panel); }
  /* Coloured block headers on logs and reports become quiet section titles. */
  .wl-card { border: none; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); margin-bottom: 0; }
  .wl-hd { background: transparent !important; color: var(--text); padding: 16px 0 8px; border-bottom: 1px solid var(--line); }
  .wl-hd .t { font-size: 18px; letter-spacing: -.015em; }
  .wl-hd .badge { background: var(--panel-2); color: var(--text); border-radius: 4px; }
  .wl-body { padding: 6px 0 14px; }
  .wl-controls, .wl-chips { padding-left: 0; padding-right: 0; }
  .wl-note { padding-left: 0; padding-right: 0; }
  .wl-chip { border-radius: 999px; font-weight: 600; background: transparent; }
  .wl-chip.on { background: var(--text); border-color: var(--text); }
  .eos-gh { background: var(--panel) !important; color: var(--text); border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0; }
  .eos-gh .m .k { color: var(--muted); } .eos-gh .m .v { color: var(--text); }
  .eos-card { border-radius: var(--r-md); }
  .eos-toggle button.on { background: var(--text); border-color: var(--text); }
  .eos-submit { border-radius: var(--r-sm); }
  .lu-section { background: transparent; color: var(--accent); font-weight: 700; font-size: 10.5px; letter-spacing: .14em; padding: 14px 0 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .lu-slot { border-radius: 6px; }
  .chart-card { border-radius: var(--r-md); }
  .banner { border-radius: 6px; }
  .login-card { border-radius: 12px; }
  .login-banner { border-radius: 12px 12px 0 0; }
  @media (max-width: 600px) {
    .header { border-radius: 0; padding: 10px 0; }
    .hdrLogo img { height: 26px; }
    .panel { padding: 16px 0 18px; border-radius: 0; }
    .panel .panel { padding: 12px 14px; }
  }

  /* Home: the numbers strip under the greeting. */
  .kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 14px 0 4px; }
  .kpi { padding: 12px 8px 12px 0; cursor: pointer; }
  .kpi + .kpi { border-left: 1px solid var(--line); padding-left: 12px; }
  .kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
  .kpi .l { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

  /* Section tab strips (Training Center, Library, Attendance, Time Clock, Inbox, Checklists): underline tabs, not a pill tray. */
  #gsecToggle_library, #gsecToggle_money, #gsecToggle_backoffice, #tnSecToggle, #atSecToggle, #tcSecToggle, #inboxToggle, #clSecToggle {
    background: transparent !important; border: none !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; padding: 0 !important; gap: 0 !important; margin-bottom: 14px !important; display: flex !important; flex-wrap: wrap;
  }
  #clSecToggle .wl-chip { background: transparent !important; border: none !important; border-radius: 0 !important; padding: 8px 2px !important; margin-right: 18px; color: var(--muted); }
  #clSecToggle .wl-chip.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
  /* Profile stat strip: cards became top-ruled cells. */
  [data-view="empprofile"] [data-ovgo]:hover { background: var(--panel-2); }

/* ===== BOH Dashboard ===== */
.boh-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.boh-h { margin: 4px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.kpis-boh { grid-template-columns: repeat(6, 1fr); margin-bottom: 18px; }
.kpis-boh .kpi .l { line-height: 1.3; }
.boh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.boh-card { border-top: 1px solid var(--line); padding: 12px 0 14px; min-width: 0; }
.boh-wide { grid-column: 1 / -1; }
.boh-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.boh-hd span { font-size: 13px; font-weight: 800; letter-spacing: .01em; }
.boh-hd a { font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.boh-hd a:hover { color: var(--accent); }
.boh-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.boh-row:first-of-type { border-top: 0; }
.boh-row .boh-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.boh-row .boh-r { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.boh-link { cursor: pointer; }
.boh-s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.boh-bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; width: 160px; max-width: 100%; overflow: hidden; }
.boh-bar i { display: block; height: 100%; background: var(--accent); }
.boh-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 24px; }
.boh-zone { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.boh-zone .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.boh-zone > div { flex: 1; min-width: 0; }
.boh-zone.stale .boh-t { color: var(--accent); }
@media (max-width: 900px) { .kpis-boh { grid-template-columns: repeat(3, 1fr); } .kpis-boh .kpi:nth-child(4) { border-left: 0; padding-left: 0; } .kpis-boh .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 700px) { .boh-grid { grid-template-columns: 1fr; } }
