/* CFR Hub team app. Ported from the design mockups (mockups/index.html); team colours come from CSS variables set per team. */
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--dark,#14283F);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
body{--demobar:0px}body.has-demobar{--demobar:calc(52px + env(safe-area-inset-top))}
.screen{container-type:inline-size;container-name:app;position:fixed;left:0;right:0;top:var(--demobar);bottom:0}
@supports(height:100dvh){.screen{bottom:auto;height:calc(100dvh - var(--demobar))}}
@container app (max-width:759px){body.has-demobar .top{padding-top:12px}}
/* ============ APP ============ */
.app{
  /* Brand tokens – swap these when the brand pack arrives */
  --brand:#1d2c5e;--brand-ink:#131e45;--brand-soft:#e9edf7;--brand-2:#2c4590;--dark:#1d2c5e;--head:#17203a;--live:#17834a;--live-2:#0f6b3b;
  --accent:#f2b705;--accent-ink:#5a4300;
  --ok:#17834a;--ok-soft:#e2f4e9;--warn:#b86e00;--warn-soft:#fdf0d9;--bad:#c62828;--bad-soft:#fbe6e6;
  --c1:#c62828;--c2:#dd7a00;--c3:#2f6fd6;--sd:#7a8299;
  --bg:#f3f5f9;--card:#fff;--ink:#17203a;--muted:#5d6782;--line:#e1e5ee;--r:14px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  height:100%;width:100%;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:15px;line-height:1.4;
  display:grid;grid-template-rows:auto 1fr auto;grid-template-areas:"top" "main" "tabs";position:relative;overflow:hidden;overflow:clip
}
.app *{box-sizing:border-box}
:where(.app) button{font:inherit;color:inherit;cursor:pointer}
.ic{width:20px;height:20px;flex:none;display:inline-block;vertical-align:middle}
.ic.sm{width:16px;height:16px}.ic.lg{width:26px;height:26px}

/* layout parts */
.side{display:none;grid-area:side}
.top{grid-area:top;background:var(--dark);color:#fff;padding:calc(12px + env(safe-area-inset-top)) 16px 12px;display:flex;align-items:center;gap:12px}
.top .ttl{font-size:18px;font-weight:700;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .iconbtn{background:rgba(255,255,255,.12);border:0;border-radius:10px;width:38px;height:38px;display:grid;place-items:center;position:relative;color:#fff}
.dot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:var(--accent);border:2px solid var(--dark)}
.top .topbtn{display:none}
.main{grid-area:main;overflow-y:auto;overflow-x:hidden;padding:16px 16px 44px;display:flex;flex-direction:column;overscroll-behavior:contain}
.main-body{flex:1 0 auto}
.tabs{grid-area:tabs;position:relative;z-index:10;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr 76px 1fr 1fr;align-items:stretch;padding:2px 4px calc(4px + env(safe-area-inset-bottom))}
.tab{border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:2px;font-size:11px;line-height:1.2;color:var(--muted);padding:6px 0 4px;min-width:0;text-align:center}
.tab>span{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.tab.on{color:var(--brand);font-weight:600}
.tab.centre{position:relative}
.tab.centre .lbl{font-weight:600}
.tab.centre .fab{position:absolute;left:50%;top:-26px;transform:translateX(-50%);width:60px;height:60px;border-radius:50%;background:var(--action);color:#fff;display:grid;place-items:center;box-shadow:0 6px 16px rgba(0,0,0,.25);border:4px solid #fff;font-weight:700;font-size:11px;line-height:1.05;text-align:center;white-space:normal;overflow:visible}
.tab.centre .fab.live{background:var(--live-2);box-shadow:0 6px 16px rgba(0,0,0,.3);outline:3px solid var(--accent);outline-offset:-7px}
.tab.centre .fab.log{background:var(--brand);box-shadow:0 6px 16px rgba(29,44,94,.35)}
.logo{display:flex;align-items:center;gap:10px}
.logo .mark{width:36px;height:40px;flex:none}
.logo b{font-size:14px;line-height:1.1;display:block}
.logo small{font-size:11px;opacity:.75}

/* blocks */
.h1{font-size:22px;font-weight:800;margin:2px 0 2px;color:var(--head);letter-spacing:-.01em}
.sub{color:var(--muted);font-size:14px;margin:0 0 14px}
.sec{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:20px 2px 8px;display:flex;justify-content:space-between;align-items:center}
.sec a,.link{color:var(--brand-2);text-transform:none;letter-spacing:0;font-weight:600;cursor:pointer;font-size:14px;text-decoration:none}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;margin-bottom:12px}
a.card{display:block;color:inherit;text-decoration:none}
.card.flush{padding:0;overflow:hidden}
.card h3{margin:0 0 6px;font-size:16px;color:var(--head)}
.live h3,.social h3{color:#fff}
.grid{display:grid;gap:12px;grid-template-columns:minmax(0,1fr)}
.grid>*{min-width:0}
.grid>.card{margin:0}
.row{display:flex;align-items:center;gap:12px}
.row.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.muted{color:var(--muted)}
.small{font-size:13px}
.tiny{font-size:12px}
.b{font-weight:700}
.big{font-size:28px;font-weight:800;letter-spacing:-.02em;line-height:1.1}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;padding:3px 8px;border-radius:99px;background:var(--brand-soft);color:var(--brand);white-space:nowrap}
.badge.ok{background:var(--ok-soft);color:var(--ok)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.badge.bad{background:var(--bad-soft);color:var(--bad)}
.badge.grey{background:#eef0f4;color:var(--muted)}.badge.acc{background:#fff4cc;color:var(--accent-ink)}
.grade{display:inline-grid;place-items:center;min-width:30px;height:24px;padding:0 7px;border-radius:7px;color:#fff;font-weight:700;font-size:12px}
.g-C1{background:var(--c1)}.g-C2{background:var(--c2)}.g-C3{background:var(--c3)}.g-SD{background:var(--sd)}.g-GS{background:#6b3fa0}
.btn{border:0;border-radius:var(--btnr,12px);padding:12px 16px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--brand);color:#fff;text-decoration:none}
.btn.block{display:flex;width:100%}
.btn.ok{background:var(--ok)}.btn.bad{background:var(--bad)}
.btn.ghost{background:#fff;color:var(--brand);border:1.5px solid var(--line)}
.btn.soft{background:var(--brand-soft);color:var(--brand)}
.btn.sm{padding:7px 12px;border-radius:9px;font-size:13px}
.btns{display:flex;gap:10px;flex-wrap:wrap}
.btns>.btn{flex:1}
.list{list-style:none;margin:0;padding:0}
.li{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);cursor:pointer}
.li:last-child{border-bottom:0}
.li .chev{color:#b4bacb}
.av{width:36px;height:36px;border-radius:50%;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-weight:700;font-size:13px;flex:none}
.bar{height:8px;border-radius:99px;background:#e8ebf2;position:relative;overflow:visible}
.bar i{display:block;height:100%;border-radius:99px;background:var(--brand)}
.bar .pace{position:absolute;top:-4px;width:2px;height:16px;background:var(--ink);border-radius:2px}
.bar.ok i{background:var(--ok)}.bar.warn i{background:var(--warn)}.bar.bad i{background:var(--bad)}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:14px}
.kv dt{color:var(--muted)}.kv dd{margin:0;font-weight:600}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;margin-bottom:12px;scrollbar-width:none}
.chip{border:1.5px solid var(--line);background:#fff;border-radius:99px;padding:7px 13px;font-size:13px;font-weight:600;white-space:nowrap;color:var(--muted)}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.segtabs{display:flex;background:#e6e9f1;border-radius:11px;padding:3px;margin-bottom:14px}
.segtabs button{flex:1;border:0;background:none;padding:8px 6px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted)}
.segtabs button.on{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.1)}
.banner{display:flex;gap:10px;align-items:center;padding:10px 14px;border-radius:12px;margin-bottom:12px;font-size:14px}
.banner.off{background:#2b3245;color:#fff}
.banner.info{background:var(--brand-soft);color:var(--brand)}
.banner.warn{background:var(--warn-soft);color:var(--warn)}
.stat{padding:12px 14px;border-radius:12px;background:var(--bg)}
.stat .big{font-size:24px}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.callrow{display:flex;gap:8px;flex-wrap:wrap}
.callrow .cc{display:flex;align-items:center;gap:6px;font-weight:700}

/* forms */
.f{margin-bottom:14px}
.f label,.flabel{display:block;font-size:13px;font-weight:650;margin-bottom:6px;color:var(--ink)}
.f .hint{font-size:12px;color:var(--muted);margin-top:4px}
.in{width:100%;border:1.5px solid var(--line);background:#fff;border-radius:var(--inr,11px);padding:11px 12px;font:inherit;color:var(--ink)}
textarea.in{min-height:84px;resize:vertical}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.two>*{min-width:0}
.check{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1.5px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.check.on{border-color:var(--ok);background:var(--ok-soft)}
.box{width:22px;height:22px;border-radius:6px;border:2px solid #b6bdcf;display:grid;place-items:center;flex:none;background:#fff;color:#fff}
.check.on .box{background:var(--ok);border-color:var(--ok)}
.stepper{display:flex;align-items:center;justify-content:space-between;border:1.5px solid var(--line);border-radius:12px;padding:6px 6px 6px 12px;background:#fff}
.stepper button{width:38px;height:38px;border-radius:9px;border:0;background:var(--brand-soft);color:var(--brand);font-size:20px;font-weight:700}
.stepper .n{font-size:18px;font-weight:800;min-width:26px;text-align:center}
.steps4{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gradepick{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.gradepick button{border:2.5px solid transparent;border-radius:14px;padding:16px 0;color:#fff;font-size:22px;font-weight:800;opacity:.45}
.gradepick button.on{opacity:1;border-color:var(--ink)}
.typegrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px}
.typegrid button{border:1.5px solid var(--line);background:#fff;border-radius:12px;padding:10px;text-align:left;font-size:13px;font-weight:650;display:flex;gap:8px;align-items:center}
.typegrid button.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.counts-note{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:600;padding:10px 12px;border-radius:10px;margin-bottom:14px}
.counts-note.y{background:var(--ok-soft);color:var(--ok)}.counts-note.n{background:#eef0f4;color:var(--muted)}

/* compliance ring */
.comp{display:flex;gap:16px;align-items:center}
.ring{position:relative;width:132px;height:132px;flex:none}
.ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.ring .ctr{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
.ring .ctr b{font-size:28px;font-weight:800;line-height:1}
.ring .ctr span{font-size:12px;color:var(--muted)}
.legend{display:flex;gap:12px;font-size:12px;color:var(--muted);margin-top:8px;flex-wrap:wrap}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:4px;vertical-align:-1px}

/* live */
.live{background:linear-gradient(135deg,var(--live-2),var(--live));color:#fff;border:0;position:relative;overflow:hidden}
.trace{display:block;width:100%;height:auto}.authtrace{display:block}
.live .trace{position:absolute;left:0;right:0;bottom:6px;opacity:.9;pointer-events:none}
.live>*:not(.trace){position:relative}
.live .timer{font-size:40px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.live .btn.ghost{background:rgba(255,255,255,.15);color:#fff;border-color:rgba(255,255,255,.3)}
.live .btn.light{background:#fff;color:var(--action)}
.pulse{width:10px;height:10px;border-radius:50%;background:#7dffb0;display:inline-block;box-shadow:0 0 0 0 rgba(125,255,176,.7);animation:pl 1.6s infinite}
@keyframes pl{70%{box-shadow:0 0 0 10px rgba(125,255,176,0)}100%{box-shadow:0 0 0 0 rgba(125,255,176,0)}}
.offduty{display:flex;align-items:center;gap:14px}
.bigbook{width:100%;border:0;border-radius:16px;padding:18px;background:var(--action);color:#fff;font-size:18px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:0 6px 16px rgba(23,131,74,.3)}

/* events */
.ev{display:flex;gap:12px;cursor:pointer}
.datebox{width:52px;flex:none;align-self:flex-start;border-radius:12px;background:var(--brand);color:#fff;text-align:center;padding:6px 0}
.datebox b{display:block;font-size:20px;line-height:1.1}
.datebox span{font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.need{display:flex;gap:14px;font-size:13px;margin-top:8px;flex-wrap:wrap}
.ev .badge{white-space:normal}
.update{border-left:3px solid var(--accent);padding:2px 0 2px 12px;margin:10px 0}

/* notif */
.notif{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.notif .ico{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--brand-soft);color:var(--brand)}
.notif.unread{background:#f7f9ff}
.notif.unread .t::after{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent);margin-left:6px}
.toggle{width:44px;height:26px;border-radius:99px;background:#cfd4df;position:relative;border:0;flex:none}
.toggle::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:.15s}
.toggle.on{background:var(--ok)}.toggle.on::after{left:21px}

/* chart */
.cbars{display:flex;align-items:flex-end;gap:6px;height:130px;padding-top:6px}
.cbars div{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;height:100%;justify-content:flex-end}
.cbars i{display:block;width:100%;max-width:34px;background:var(--brand);border-radius:6px 6px 2px 2px}
.cbars i.part{background:repeating-linear-gradient(45deg,var(--brand),var(--brand) 4px,var(--brand-2) 4px,var(--brand-2) 8px);opacity:.6}
.cbars span{font-size:11px;color:var(--muted)}
.stack{display:flex;height:12px;border-radius:99px;overflow:hidden;margin:8px 0}
.social{background:var(--brand);color:#fff;border:0}
.social p{font-size:16px;line-height:1.45;margin:6px 0 12px}

/* sheet */
.overlay{position:absolute;inset:0;background:rgba(10,16,35,.45);display:none;z-index:50;align-items:flex-end}
.overlay.show{display:flex}
.sheet{background:#fff;width:100%;max-height:88%;border-radius:22px 22px 0 0;display:flex;flex-direction:column}
.sheet .sh-h{padding:14px 18px 10px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line)}
.sheet .sh-h b{flex:1;font-size:17px}
.sheet .sh-h button{border:0;background:#eef0f4;border-radius:50%;width:32px;height:32px;display:grid;place-items:center}
.sheet .sh-b{padding:16px 18px;overflow-y:auto}
.sheet .sh-f{padding:12px 18px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
/* In the installed app on some Android phones (seen on a Samsung A35) the bottom of the screen sits under the phone's own
   navigation buttons without the page being told, which hid the sheet's save button. Keep it clear of them. */
@media (display-mode:standalone){.sheet .sh-f{padding-bottom:max(60px,calc(16px + env(safe-area-inset-bottom)))}}
.grab{width:40px;height:5px;border-radius:9px;background:#d4d8e2;margin:8px auto 0}
.toast{position:absolute;left:50%;bottom:calc(100px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(20px);background:#1d2336;color:#fff;padding:11px 16px;border-radius:12px;font-size:14px;font-weight:600;opacity:0;transition:.25s;z-index:60;pointer-events:none;display:flex;gap:8px;align-items:center;max-width:90%}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* auth */
.app.auth{grid-template-rows:1fr;grid-template-areas:"main"}
.app.auth .top,.app.auth .tabs,.app.auth .side{display:none!important}
.app.auth .main{background:var(--dark);padding:calc(48px + env(safe-area-inset-top)) 20px 30px;display:flex;flex-direction:column;align-items:center}
.authcard{background:#fff;border-radius:20px;padding:22px 20px;width:100%;max-width:420px}
.authhead{color:#fff;text-align:center;margin-bottom:22px}
.authhead .mark{width:64px;height:72px;margin:0 auto 10px;display:block}
.authhead b{font-size:20px;display:block}
.d-only{display:none!important}
.tlogo img{height:40px;width:40px;display:block}
.sidelogo{width:216px;display:block;margin:0 0 6px -4px}
.authlogo{width:290px;max-width:100%;display:block;margin:0 auto 6px}
.hubfoot{display:flex;align-items:center;justify-content:center;gap:8px;margin:30px 0 0;font-family:Montserrat,var(--font);font-size:11.5px;color:var(--muted);font-weight:500}
.hubfoot img{height:24px}
.hubfoot .hublink{text-decoration:none}.hubfoot .hublink:hover b{text-decoration:underline}
.hubfoot b{font-weight:800;color:#14283F}.hubfoot b span{color:#F39200}
.app.auth .hubfoot{color:rgba(255,255,255,.75)}.app.auth .hubfoot b{color:#fff}
.app.hdr-light .top{background:#fff;color:var(--head);border-bottom:1px solid var(--line)}
.app.hdr-light .top .iconbtn{background:var(--brand-soft);color:var(--brand)}
.app.hdr-light .dot{border-color:#fff}
.app.hdr-light .tabs{background:var(--dark);border-top:0}
.app.hdr-light .tab{color:rgba(255,255,255,.62)}
.app.hdr-light .tab.on{color:var(--accent)}
.app.hdr-light .tab.centre .fab{border-color:var(--dark)}
.app.hdr-light .tab.centre span:last-child{color:rgba(255,255,255,.8)}
.teamtag{font-size:11px;opacity:.75;font-weight:600}
.m-only{}
.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);padding:10px 14px;border-bottom:1px solid var(--line);background:#fafbfd}
.tbl td{padding:11px 14px;border-bottom:1px solid var(--line)}
.tbl tr{cursor:pointer}
.tbl tr:hover td{background:#f8f9fc}
.photo{aspect-ratio:4/3;border-radius:10px;background:linear-gradient(135deg,#dfe4ef,#c9d0e0);display:grid;place-items:center;color:#8a93ab}
.pill-row{display:flex;gap:8px;flex-wrap:wrap}

/* ============ DESKTOP (container ≥ 760px) ============ */
@container app (min-width: 760px){
  .app{grid-template-columns:248px 1fr;grid-template-rows:auto 1fr;grid-template-areas:"side top" "side main"}
  .side{display:flex;flex-direction:column;background:var(--dark);color:#dfe5f5;padding:18px 12px;overflow-y:auto;min-height:0}
  .side .logo{padding:4px 8px 18px;color:#fff}
  .side .nav{display:flex;flex-direction:column;gap:2px}
  .side .navh{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#8d99bf;margin:16px 10px 6px}
  .side .ni{border:0;background:none;color:#cfd7ee;display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:9px;font-size:14px;text-align:left}
  .side .ni:hover{background:rgba(255,255,255,.06)}
  .side .ni.on{background:rgba(255,255,255,.12);color:#fff;font-weight:600}
  .side .ni .cnt{margin-left:auto;background:var(--accent);color:var(--accent-ink);font-size:11px;font-weight:700;border-radius:99px;padding:1px 7px}
  .side .me{margin-top:auto;display:flex;gap:10px;align-items:center;padding:12px 8px 0;border-top:1px solid rgba(255,255,255,.1)}
  .side .me .av{background:rgba(255,255,255,.15);color:#fff}
  .top{background:#fff;color:var(--ink);padding:14px 28px;border-bottom:1px solid var(--line)}
  .top .ttl{font-size:20px}
  .top .iconbtn{background:var(--bg);color:var(--ink)}
  .top .iconbtn.m-hide{display:none}
  .dot{border-color:#fff}
  .top .topbtn{display:inline-flex}
  .top .tlogo{display:none}
  .main{padding:24px 28px 40px}
  .tabs{display:none}
  .d-only{display:revert!important}
  .m-only{display:none!important}
  .grid.dash{grid-template-columns:repeat(3,minmax(0,1fr))}
  .grid.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid.dash .span2{grid-column:span 2}
  .grid.dash .span3{grid-column:span 3}
  .wrap{max-width:1080px}
  .narrow{max-width:640px}
  .stats{grid-template-columns:repeat(3,1fr)}
  .stats.four{grid-template-columns:repeat(4,1fr)}
  .overlay{align-items:center;justify-content:center}
  .sheet{max-width:540px;border-radius:18px;max-height:84%}
  .grab{display:none}
  .sheet .sh-f{padding-bottom:16px}
  .toast{bottom:30px}
  .app.auth .main{justify-content:center;padding:30px}
  .typegrid{grid-template-columns:repeat(4,1fr)}
  .steps4{grid-template-columns:repeat(4,1fr)}
  .evgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
  .evgrid>.card{margin:0}
  .split{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:16px;align-items:start}
  .h1{font-size:24px}
}

/* ============ Real-app additions ============ */
:where(.app) a{color:inherit;text-decoration:none}
:where(.app) a.link,:where(.app) .sec a{color:var(--brand-2)}
.app .btn{cursor:pointer;font-size:15px;line-height:1.2}
.app .btn.sm{font-size:13px}
.app .btn.light{background:#fff;color:var(--brand)}
:where(.app) form{margin:0} /* low specificity, so a form that is also a .card keeps the card's spacing */
.app input[type=checkbox].hide,.app input[type=radio].hide,.app input[type=file].hide{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.check:has(input:checked){border-color:var(--ok);background:var(--ok-soft)}
.check:has(input:checked) .box{background:var(--ok);border-color:var(--ok)}
.check:has(input:focus-visible),.typegrid label:has(input:focus-visible),.gradepick label:has(input:focus-visible){outline:2px solid var(--brand);outline-offset:2px}
.typegrid label{border:1.5px solid var(--line);background:#fff;border-radius:12px;padding:10px;text-align:left;font-size:13px;font-weight:650;display:flex;gap:8px;align-items:center;cursor:pointer}
.typegrid label:has(input:checked){border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.gradepick label{border:2.5px solid transparent;border-radius:14px;padding:16px 0;color:#fff;font-size:22px;font-weight:800;opacity:.45;text-align:center;cursor:pointer}
.gradepick label:has(input:checked){opacity:1;border-color:var(--ink)}
.stepper input{width:34px;border:0;background:none;text-align:center;font:800 18px var(--font);color:var(--ink);-moz-appearance:textfield;padding:0}
.stepper input::-webkit-inner-spin-button{-webkit-appearance:none}
.chips a.chip{display:inline-block}
.banner.bad{background:var(--bad-soft);color:var(--bad)}
.banner.ok{background:var(--ok-soft);color:var(--ok)}
/* Dropdowns: our own arrow, with room on the right, instead of the browser's */
select.in{-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314283F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:16px 16px;padding-right:42px;cursor:pointer}
.li.static{cursor:default}
.li:hover{background:rgba(0,0,0,.015)}
.err{color:var(--bad);font-size:13px;font-weight:600;margin:-6px 0 12px}
.page-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.me{color:inherit}

/* Demo bar (demo.cfrhub.app only) */
.demobar{position:fixed;top:0;left:0;right:0;height:var(--demobar);background:#14283F;color:#fff;display:flex;align-items:center;gap:12px;padding:env(safe-area-inset-top) 14px 0;font:600 13px Montserrat,sans-serif;z-index:100}
.demobar img{height:28px}.demobar .wm{font-weight:800;font-size:15px;white-space:nowrap}.demobar .wm span{color:#F39200}
.demobar .msg{opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.demobar form{display:flex;align-items:center;gap:8px;margin:0}
.demobar select{-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314283F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;background-size:14px 14px;padding-right:30px!important;font:600 13px Montserrat,sans-serif;border-radius:8px;border:0;padding:6px 8px;background-color:#fff;color:#14283F}
.demobar a{color:#fff;text-decoration:none;white-space:nowrap}
.demobar .req{background:#F39200;color:#14283F;border-radius:99px;padding:8px 14px;font-weight:700}
.demobar .mobtog{display:flex;align-items:center;gap:7px;white-space:nowrap;cursor:pointer;background:rgba(255,255,255,.1);padding:6px 10px;border-radius:8px;border:0;color:#fff;font:600 13px Montserrat,sans-serif}
.demobar .mobtog i{width:16px;height:16px;border-radius:4px;background:#fff;display:inline-grid;place-items:center;color:#14283F;font-style:normal;font-size:12px;line-height:1}
.demobar .mobtog.on i{background:#F39200;color:#14283F}
.demo-phonewrap{position:fixed;top:var(--demobar);left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(120% 90% at 50% 100%,#24476e 0%,#14283F 65%);overflow:hidden;overflow:clip}
.demo-phonewrap .phone{width:390px;height:844px;border-radius:46px;background:#111;padding:12px;box-shadow:0 30px 60px rgba(0,0,0,.45);flex:none;transform-origin:center}
.demo-phonewrap .screen{position:relative;inset:auto;top:auto;width:100%;height:100%;border-radius:36px;overflow:hidden;overflow:clip;background:#fff}
.demo-phonewrap .top{padding-top:44px}
.demo-hint{color:rgba(255,255,255,.65);font:600 12.5px Montserrat,sans-serif;margin-top:14px}
@media(max-width:759px){.demo-phonewrap{display:contents}.demo-phonewrap .phone{display:contents}.demo-phonewrap .screen{position:fixed;top:var(--demobar);left:0;right:0;border-radius:0}.demo-phonewrap .top{padding-top:12px}.demo-hint{display:none}}
.dm-inline{display:flex;align-items:center;gap:12px;margin-left:auto}
.dm-menu{display:none;margin-left:auto}
.dm-menu summary{list-style:none;display:flex;align-items:center;gap:8px;cursor:pointer;background:rgba(255,255,255,.12);padding:7px 10px;border-radius:9px;white-space:nowrap}
.dm-menu summary::-webkit-details-marker{display:none}
.dm-panel{position:fixed;top:var(--demobar);left:0;right:0;background:#14283F;padding:14px 16px 18px;display:flex;flex-direction:column;gap:8px;box-shadow:0 14px 30px rgba(0,0,0,.4);border-top:1px solid rgba(255,255,255,.12)}
.dm-panel form{display:block}
.dm-note{opacity:.85;font-weight:500;line-height:1.45;margin-bottom:4px}
.dm-h{font-size:11px;text-transform:uppercase;letter-spacing:.08em;opacity:.6;margin-top:4px}
.dm-opt{width:100%;text-align:left;background:rgba(255,255,255,.08);border:0;color:#fff;font:600 14px Montserrat,sans-serif;padding:12px 14px;border-radius:10px;cursor:pointer}
.dm-opt.on{background:#F39200;color:#14283F}
.demobar .dm-panel .req{text-align:center;margin-top:8px;padding:12px}
.dm-exit{text-align:center;padding:8px;opacity:.8}
@media(max-width:1100px){.demobar .msg{display:none}}
@media(max-width:860px){.dm-inline{display:none}.dm-menu{display:block}.demobar .wm{font-size:14px}}

.app [hidden]{display:none!important}
summary::-webkit-details-marker{display:none}
details[open]>summary .chev{transform:rotate(90deg)}
input.hide:checked+.toggle{background:var(--ok)}input.hide:checked+.toggle::after{left:21px}
input.hide:focus-visible+.toggle{outline:2px solid var(--brand);outline-offset:2px}
.reset-colour{width:36px;height:36px;border-radius:10px;border:1.5px solid var(--line);background:#fff;display:grid;place-items:center;color:var(--muted);flex:none;cursor:pointer}
.reset-colour:hover{color:var(--brand);border-color:var(--brand)}
.setup-steps{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.setup-step{display:flex;align-items:center;gap:10px;padding:8px 6px;border-radius:10px;font-size:14px;font-weight:600;color:var(--ink)}
.setup-step:hover{background:rgba(255,255,255,.6)}
.setup-step .dotc{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:800;background:#fff;color:var(--brand);border:1.5px solid var(--line);flex:none}
.setup-step.done{color:var(--muted)}.setup-step.done .dotc{background:var(--ok);border-color:var(--ok);color:#fff}
.setup-card{background:var(--brand-soft);border-color:transparent}
.setup-step.here{background:#fff;box-shadow:0 1px 2px rgba(20,40,63,.08)}.setup-step.here .dotc{background:var(--brand);border-color:var(--brand);color:#fff}.setup-step.here .tiny{color:var(--brand)}
.setup-step.done.here .dotc{background:var(--ok);border-color:var(--ok)}
.setup-foot{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid rgba(20,40,63,.08)}.setup-foot .tiny{flex:1 1 240px}.setup-foot .btn{margin-left:auto}
.setup-tick{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--ok);color:#fff;flex:none}
.banner.demo{background:#FFF3D6;color:#5A3A00;border:2px solid #F39200;font-family:Montserrat,sans-serif;align-items:flex-start}
.banner.demo .ic{color:#F39200}
.banner.demo b{color:#14283F}
/* Branding preview (team settings) */
.preview-col{position:sticky;top:12px;align-self:start}
.pv{--brand-soft:color-mix(in srgb,var(--brand) 10%,#fff);--pvbg:#EEF1F5;font-family:var(--pvfont);max-width:300px;margin:12px auto 0;border-radius:26px;overflow:hidden;border:6px solid #111;background:var(--pvbg);box-shadow:0 10px 30px rgba(0,0,0,.15);font-size:12px;color:#1F2A37}
.pv .ic{width:14px;height:14px}
.pv-top{background:var(--dark);color:var(--ondark);display:flex;align-items:center;gap:8px;padding:12px 12px 10px}
.pv-top img{width:26px;height:26px;border-radius:6px}.pv-top b{flex:1;font-size:14px}
.pv-bell{position:relative;width:28px;height:28px;border-radius:8px;background:rgba(255,255,255,.14);display:grid;place-items:center}
.pv-bell i{position:absolute;top:5px;right:5px;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.pv.light .pv-top{background:#fff;color:var(--head);border-bottom:1px solid #e6e9ef}.pv.light .pv-bell{background:var(--brand-soft);color:var(--brand)}
.pv-body{padding:10px 10px 6px}
.pv-h{font-size:16px;font-weight:800;color:var(--head)}.pv-sub{color:#5D6782;font-size:11px;margin:2px 0 8px}
.pv-card{background:#fff;border:1px solid #e6e9ef;border-radius:var(--pvr);padding:10px;margin-bottom:8px}
.pv-ch{color:var(--head);font-size:12.5px}.pv-row{display:flex;justify-content:space-between;align-items:center;gap:6px}
.pv-book{margin-top:8px;background:var(--action);color:#fff;border-radius:var(--pvb);padding:9px;text-align:center;font-weight:800;display:flex;justify-content:center;gap:6px;align-items:center}
.pv-link{color:var(--brand);font-weight:700;text-align:center;margin-top:6px;font-size:11px}.pv-row .pv-link{margin:0}
.pv-badge{display:inline-block;font-size:10px;font-weight:700;padding:2px 7px;border-radius:99px;margin-top:4px}
.pv-badge.ok{background:#E2F4E9;color:#17834A}.pv-badge.warn{background:#FDF0D9;color:#B86E00}
.pv-badge.acc{background:color-mix(in srgb,var(--accent) 22%,#fff);color:color-mix(in srgb,var(--accent) 45%,#000)}
.pv-bar{height:7px;border-radius:9px;background:#e8ebf2;margin:8px 0 4px}.pv-bar i{display:block;width:62%;height:100%;border-radius:9px;background:#17834A}
.pv-small{color:#5D6782;font-size:10.5px}
.pv-ev{display:flex;gap:8px;margin-top:8px;align-items:flex-start}
.pv-date{width:38px;flex:none;border-radius:9px;background:var(--brand);color:#fff;text-align:center;font-weight:800;font-size:15px;line-height:1.1;padding:4px 0}.pv-date small{display:block;font-size:8.5px;letter-spacing:.06em}
.pv-btns{display:flex;gap:6px;margin-bottom:8px}.pv-btn{flex:1;display:flex;gap:4px;justify-content:center;align-items:center;background:var(--brand);color:#fff;border-radius:var(--pvb);padding:8px;font-weight:700}
.pv-btn.ghost{background:#fff;color:var(--brand);border:1.5px solid #e1e5ee}
.pv-foot{display:flex;align-items:center;justify-content:center;gap:5px;font:500 9.5px Montserrat,sans-serif;color:#5D6782;padding:4px 0 2px}.pv-foot img{height:14px}.pv-foot b{color:#14283F}.pv-foot b span{color:#F39200}
.pv-tabs{display:grid;grid-template-columns:repeat(5,1fr);align-items:end;background:#fff;border-top:1px solid #e6e9ef;padding:6px 4px 8px;font-size:9.5px;color:#5D6782;text-align:center}
.pv-tabs span{display:flex;flex-direction:column;align-items:center;gap:2px}.pv-tabs .on{color:var(--brand);font-weight:700}
.pv-fab{width:44px;height:44px;margin:-22px auto 0;border-radius:50%;background:var(--action);color:#fff;font-weight:800;font-size:8.5px;line-height:1.05;justify-content:center;border:3px solid #fff}
.pv.light .pv-tabs{background:var(--dark);border-top:0;color:var(--ondark);opacity:1}.pv.light .pv-tabs .on{color:var(--accent)}.pv.light .pv-fab{border-color:var(--dark)}
@container app (max-width:759px){.preview-col{position:static}}
/* Account pages (sign in, sign up…) */
.app.auth .main{display:flex;flex-direction:column}
.app.auth .main-body{width:100%;max-width:440px;margin:0 auto}
.authcard .h1{font-size:21px}
.authcard .sub{margin-bottom:16px}
.authcard .links{text-align:center;font-size:14px;margin-top:16px;color:var(--muted)}
.authcard .center{text-align:center}
.authcard .big-ico{font-size:42px;text-align:center;margin-bottom:6px}
.authcard .btn{width:100%}
.authcard .err{margin:0 0 12px}
.authcard .banner{font-size:13.5px}
.authcard .remember{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:600}
.authcard .remember input{width:18px;height:18px;accent-color:var(--brand);margin:0}
.app.auth{grid-template-columns:1fr!important;grid-template-rows:1fr!important;grid-template-areas:"main"!important}

.btn.action{background:var(--action)}
/* Teams can pick a light Header colour: switch text on it to dark */
.app.light-header .top{color:var(--on-dark)}
.app.light-header .top .iconbtn{background:rgba(0,0,0,.07);color:var(--on-dark)}
.app.light-header .side,.app.light-header .side .ni,.app.light-header .side .me .b,.app.light-header .side .tiny{color:var(--on-dark)!important}
.app.light-header .side .ni.on{background:rgba(0,0,0,.08)}.app.light-header .side .ni:hover{background:rgba(0,0,0,.05)}
.app.light-header .side .navh{color:var(--on-dark);opacity:.6}.app.light-header .side .me{border-top-color:rgba(0,0,0,.12)}
.app.light-header .side .me .av{background:rgba(0,0,0,.08);color:var(--on-dark)}
.app.light-header.hdr-light .tabs .tab{color:var(--on-dark);opacity:.7}.app.light-header.hdr-light .tabs .tab.on{opacity:1;color:var(--brand)}
.app.auth.light-header .authhead,.app.auth.light-header .hubfoot{color:var(--on-dark)}.app.auth.light-header .hubfoot b{color:#14283F}
/* CFR Hub logo used until a team uploads its own */
.hublogo{display:flex;align-items:center;gap:10px;font:800 22px/1 Montserrat,sans-serif;color:var(--on-dark,#fff)}.hublogo img{height:44px}.hublogo i{font-style:normal;color:#F39200}
.side .hublogo{padding:4px 8px 18px}.authhead .hublogo{justify-content:center;font-size:30px}.authhead .hublogo img{height:64px}
.side .me .b{color:#fff}
.tbl td:first-child,.tbl td:nth-child(6){white-space:nowrap}
/* Shift rota */
.rota-cell{display:block;min-height:58px;padding:5px;color:inherit}
.rota-chip{margin-top:3px;font-size:11px;line-height:1.25;padding:2px 5px;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rota-week{padding:12px 10px}
.rota-grid{display:grid;grid-template-columns:54px 1fr;gap:0 10px;color:inherit}
.rota-lane{position:relative;border-top:1px solid var(--line);background:repeating-linear-gradient(90deg,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%)}
.rota-bar{position:absolute;height:20px;border-radius:6px;color:#fff;font-size:11px;font-weight:700;padding:2px 6px;white-space:nowrap;overflow:hidden;text-overflow:clip;min-width:30px}
.daypick{flex:1;cursor:pointer}.daypick span{display:block;text-align:center;padding:9px 0;border-radius:10px;border:1.5px solid var(--line);background:#fff;font-weight:700;font-size:12px}
.daypick input:checked+span{background:var(--brand);border-color:var(--brand);color:#fff}
@container app (min-width:760px){.rota-cell{min-height:104px}.rota-week{padding:12px 16px}.rota-grid{grid-template-columns:110px 1fr}}
/* Vehicle photos */
.vphotos{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.vphoto{border:2px dashed var(--line);border-radius:12px;background:#fafbfc;padding:12px 6px;display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--muted);cursor:pointer;text-align:center}
.vphoto.taken{border:2px solid var(--ok);background:var(--ok-soft);color:var(--ok)}
.vph-img{width:100%;aspect-ratio:4/3;border-radius:8px;display:grid;place-items:center;overflow:hidden}
.vph-img img{width:100%;height:100%;object-fit:cover}
.vthumb{display:block;width:64px;height:48px;border-radius:8px;overflow:hidden;flex:none;background:var(--bg)}.vthumb img{width:100%;height:100%;object-fit:cover}
.vdamage{border-bottom:1px solid var(--line);padding-bottom:6px;margin-bottom:10px}
@container app (min-width:760px){.vphotos{grid-template-columns:repeat(5,1fr)}}
.share-list{border:1px solid var(--line);border-radius:12px;max-height:260px;overflow:auto}.share-item{cursor:pointer;padding:8px 12px;border-bottom:1px solid var(--line);gap:10px}.share-item:last-child{border-bottom:0}.share-item input:checked+.box{background:var(--ok);border-color:var(--ok)}
.asset-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}.asset-photo{position:relative;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:var(--bg)}.asset-photo img{width:100%;height:100%;object-fit:cover;display:block}.asset-photo form{position:absolute;top:4px;right:4px}.asset-photo button{width:26px;height:26px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;display:grid;place-items:center}
/* Month-by-month chart */
.yearnav{display:flex;align-items:center;gap:4px;font-size:14px}
.yearnav a,.yearnav span{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--bg);color:var(--brand)}
.yearnav span{opacity:.35}
.yearnav b{min-width:40px;text-align:center}
.mchart .plot{position:relative;height:150px;padding-top:16px;display:flex;align-items:stretch;gap:4px}
.mchart .col{flex:1;min-width:0;position:relative}
.mchart .col i{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:34px;background:var(--brand);border-radius:5px 5px 2px 2px;min-height:2px}
.mchart .col i.prev{opacity:.22}
.mchart.cmp .col i.cur{width:62%;max-width:22px}
.mchart .col i.part,.legend i.part-key{background:repeating-linear-gradient(135deg,var(--brand) 0 4px,color-mix(in srgb,var(--brand) 35%,#fff) 4px 7px)}
.mchart .col b{position:absolute;left:50%;transform:translateX(-50%);z-index:2;background:var(--card);padding:0 2px;border-radius:3px;font-size:10px;font-weight:700;color:var(--ink);line-height:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.mchart .col s.ref{position:absolute;left:12%;right:12%;height:0;border-top:2px solid var(--ink);z-index:1}
.mchart .avgwrap{position:absolute;left:0;right:0;top:16px;bottom:0;pointer-events:none;z-index:1}
.mchart .avg{position:absolute;left:0;right:0;border-top:2px dashed var(--accent)}
.mchart .avgtag{position:absolute;z-index:3;font-size:10px;font-weight:700;line-height:13px;background:var(--accent);color:var(--accent-ink);padding:1px 5px;border-radius:5px;white-space:nowrap}
.mchart .mlabels{display:flex;gap:4px;margin-top:4px}
.mchart .mlabels span{flex:1;text-align:center;font-size:11px;color:var(--muted)}
@container app (min-width:760px){
  .mchart .plot,.mchart .mlabels{gap:6px}.mchart .col b{font-size:11px}
  /* Room for last year's bar beside this year's */
  .mchart.cmp .col i.prev{opacity:.3;width:46%;max-width:18px;transform:translateX(calc(-100% - 1px))}
  .mchart.cmp .col i.cur{width:46%;max-width:18px;transform:translateX(1px)}
}
/* Date and time fields: iPhones draw these at their own (wider, taller) size, so they overlapped and ran off the
   screen. Draw them like the other fields instead. */
.in[type=date],.in[type=time],.in[type=month],.in[type=datetime-local]{-webkit-appearance:none;appearance:none;display:block;min-width:0;max-width:100%;min-height:47px;text-align:left}
.in::-webkit-date-and-time-value{text-align:left;margin:0}
.in::-webkit-datetime-edit{padding:0}
/* Phones zoom in on any field with text under 16px: keep fields at 16px on touch screens */
@media (pointer:coarse){.in,.demobar select{font-size:16px}}
/* Stats pages */
.stag{font-size:11.5px;margin-top:4px;opacity:.75;font-weight:600}
.typelist{display:flex;flex-direction:column;gap:6px;font-size:13px}
.typelist>div{display:flex;align-items:center;gap:8px}.typelist i{width:10px;height:10px;border-radius:3px;flex:none}.typelist b{min-width:52px;text-align:right}.typelist .muted{min-width:34px;text-align:right}
.ty-oncall{background:var(--brand)}.ty-goodsam{background:#6b3fa0}.ty-secamb{background:var(--c3)}.ty-event{background:var(--accent)}.ty-admin{background:var(--sd)}.ty-meeting{background:var(--ok)}.ty-other{background:#c3c8d4}
.wgrid{display:grid;grid-template-columns:30px repeat(24,minmax(0,1fr));gap:2px;margin:10px 0 2px;align-items:center}
.wgrid i,.wkey{display:block;aspect-ratio:1;border-radius:2px;background:#eef0f4}
.wgrid .wd{font-size:10.5px;color:var(--muted);font-weight:600}.wgrid .wh{font-size:9.5px;color:var(--muted);text-align:left;white-space:nowrap;overflow:visible}
.lv1{background:color-mix(in srgb,var(--brand) 18%,#fff)!important}.lv2{background:color-mix(in srgb,var(--brand) 35%,#fff)!important}.lv3{background:color-mix(in srgb,var(--brand) 55%,#fff)!important}
.lv4{background:color-mix(in srgb,var(--brand) 78%,#fff)!important}.lv5{background:var(--brand)!important}
.wkey{width:11px;height:11px;margin:0!important}
.spark{display:flex;align-items:flex-end;gap:3px;height:44px}.spark i{flex:1;background:var(--brand-soft);border-radius:3px 3px 1px 1px;min-height:0}.spark i:last-child{background:var(--brand)}
.ydays{position:relative;overflow-x:auto;margin:10px 0 2px;padding-bottom:4px;scrollbar-width:thin}
.ydays .ym,.ydays .yg{display:grid;gap:2px;width:max-content}
.ydays .ym span{font-size:10px;color:var(--muted);white-space:nowrap;height:14px}
.ydays .yg{grid-template-rows:repeat(7,11px)}
.ydays .yg i{width:11px;height:11px;border-radius:2px;background:#eef0f4}.ydays .yg i.out{background:transparent}
.records{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.records .stat b{display:block;font-size:20px;font-weight:800;margin-top:2px}
.ydays .yg i.today{outline:2px solid var(--ink);outline-offset:-1px}
/* Demo tour */
.tour-ring{position:fixed;z-index:300;border-radius:12px;box-shadow:0 0 0 3px #F39200,0 0 0 9999px rgba(10,20,35,.55);pointer-events:none;transition:all .2s}
.tour-ring.full{inset:0;border-radius:0;box-shadow:none;background:rgba(10,20,35,.55)}
.tour-box{position:fixed;z-index:301;background:#fff;color:#14283F;border-radius:16px;padding:18px 20px 16px;box-shadow:0 20px 50px rgba(0,0,0,.35);font:500 14px/1.5 Montserrat,-apple-system,sans-serif}
.tour-box .tour-t{display:block;font-size:17px;font-weight:800;margin-bottom:4px}
.tour-box p{margin:6px 0}.tour-box ul{margin:8px 0;padding-left:18px}.tour-box li{margin:6px 0}
.tour-box .tour-arrow{display:none}
.tour-box.pointing .tour-arrow{display:block;position:absolute;top:-9px;width:18px;height:18px;background:#fff;transform:rotate(45deg);border-radius:3px}
.tour-btns{display:flex;align-items:center;gap:10px;margin-top:12px}
.tour-next{margin-left:auto;border:0;border-radius:99px;background:#F39200;color:#14283F;font:700 14px Montserrat,sans-serif;padding:10px 18px;cursor:pointer}
.tour-skip{border:0;background:none;color:#6a7a8c;font:600 13px Montserrat,sans-serif;cursor:pointer;padding:6px 0}
.tour-n{font-size:12px;color:#6a7a8c;font-weight:600}
/* Categories of hours (Team settings → Compliance) */
.cats .cat{padding:12px 14px}
.cat-top{display:flex;align-items:center;gap:10px}.cat-top .in{flex:1;font-weight:700}
.cat-on{flex:none;cursor:pointer;display:block}.cat-on .toggle{display:block}
.cat.off{opacity:.6}
.cat-rm{display:flex;gap:6px;align-items:flex-start;margin-top:10px;color:var(--bad);font-weight:600;cursor:pointer}.cat-rm input{margin-top:2px}.cat-rm .muted{display:block;font-weight:500}
.iconpick{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.iconpick span{width:34px;height:34px;border-radius:9px;border:1.5px solid var(--line);display:grid;place-items:center;color:var(--muted);background:#fff;cursor:pointer}
.iconpick input:checked+span{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}
/* Stats pages: one column on phones in a set order (--o); on larger screens two columns (.ms-cols)
   or rows of two boxes the same height (.ms-pairs) */
.ms-cols,.ms-pairs{display:flex;flex-direction:column}
.ms-col{display:contents}
.ms-i{order:var(--o)}
@container app (min-width:760px){
  .ms-cols{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:16px;align-items:start}.ms-col{display:block}
  .ms-pairs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 16px;align-items:stretch}
  .ms-pairs>.ms-i{order:0;display:flex;flex-direction:column}
  .ms-pairs>.ms-i>.card,.ms-pairs>.ms-i>.stats{flex:1}
}
/* Side-by-side pairs of boxes on larger screens (Team stats) */
@container app (min-width:760px){.pairs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 16px;align-items:stretch}}
/* Side-by-side charts: descriptions take the same space, so the charts start level */
@container app (min-width:760px){.pairs .cdesc{min-height:calc(3 * 1.45em)}.pairs .cdesc+.ydays{margin-top:-4px}} /* -4px: the year grid's month labels sit above its first row of squares */
.rlegend{display:flex;align-items:center;gap:14px}.rlegend span{display:inline-flex;align-items:center;gap:5px}.rkey{display:inline-block;width:10px;height:10px;border-radius:3px}
/* The public booking page: phone-first, wider with columns on bigger screens */
.bk-card{padding:0;overflow:hidden;margin-bottom:12px}
.bk-img{display:block;width:100%;aspect-ratio:16/7;object-fit:cover}
.bk-row{display:flex;gap:14px;align-items:center;padding:14px 16px}
.bk-side .banner:first-child,.bk-side #done+.banner{margin-top:18px}
@media (min-width:900px){
  .app.auth.wide .main-body{max-width:1040px}
  .app.auth.wide .authcard{max-width:none;padding:30px 34px;border-radius:24px}
  .app.auth.wide .authhead{margin-bottom:26px}
  .bk-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .bk-grid .bk-card{margin:0;display:flex;flex-direction:column;transition:border-color .15s,box-shadow .15s}
  .bk-grid .bk-card:hover{border-color:var(--brand);box-shadow:0 10px 26px rgba(20,40,63,.1)}
  .bk-grid .bk-row{flex:1;align-items:flex-start}
  .bk-ev{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:36px;align-items:start}
  .bk-ev .h1{font-size:28px}
  .bk-side{position:sticky;top:24px}
  .bk-side form.card,.bk-side .banner{margin-top:0!important}
}
.inline-edit{margin-top:4px}.inline-edit summary{cursor:pointer;list-style:none;display:inline}.inline-edit summary::-webkit-details-marker{display:none}
.inline-edit[open] summary{color:var(--muted)}
/* Feature request votes */
.vote{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:52px;padding:6px 8px;border:1.5px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);cursor:pointer;font:inherit;line-height:1.1}
.vote .arrow{font-size:11px;color:var(--muted)}.vote b{font-size:17px}.vote span:not(.arrow){font-size:10.5px;color:var(--muted)}
.vote.on{border-color:var(--brand);background:var(--brand);color:#fff}.vote.on .arrow{color:#fff}
.vote.mine{cursor:default;background:var(--bg)}
/* Maps (Leaflet) use z-indexes up to 1000 inside the map: keep them inside it, below sheets, menus and banners */
.leaflet-container{position:relative;z-index:0;isolation:isolate}

/* The app's frame clips (overflow:clip above) instead of only hiding overflow: a hidden-overflow box can still be scrolled
   by the browser, e.g. when tapping a toggle focuses its hidden checkbox, which slid the whole app up inside the window */
/* announcements */
.clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ann-body{white-space:pre-line;overflow-wrap:anywhere;font-size:15px;line-height:1.55}
.pick-list{max-height:280px;overflow-y:auto;border:1.5px solid var(--line);border-radius:12px;background:#fff}
.pick-list label{display:flex;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid var(--line);cursor:pointer;font-size:14px}
.pick-list label:last-child{border-bottom:0}
.pick-list label:has(input:checked){background:var(--brand-soft)}
/* kit: tick several items to book together, then check them out and in together */
button.link{background:none;border:0;padding:0;font-family:inherit;white-space:nowrap;margin-left:10px}
.li.pick{cursor:pointer}
.li.pick:has(input:checked){background:var(--ok-soft)}
.li.pick:has(input:checked) .box{background:var(--ok);border-color:var(--ok)}
.li.pick:has(input:focus-visible){outline:2px solid var(--brand);outline-offset:-2px}
.kit-go{position:sticky;bottom:12px;z-index:5;margin-top:12px;filter:drop-shadow(0 6px 14px rgba(0,0,0,.18))}
.kit-items{margin-top:8px}
.kit-items .row{padding:7px 0;border-top:1px solid var(--line)}
.ticks{display:flex;flex-direction:column;gap:8px}
.ticks .check{padding:10px 12px}

/* App updates: the pop-up and What's new */
.rel-sheet .sh-h .rel-ico{width:30px;height:30px;border-radius:9px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex:none}
.rel-pop+.rel-pop{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.rel-h{margin:2px 0 6px;font-size:16px}
.rel-intro{margin:0 0 8px}
.rel-sec{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:12px 0 6px;padding-left:8px;border-left:3px solid var(--accent)}
.rel-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.rel-items li{background:#f5f7fa;border-radius:10px;padding:9px 12px}
.rel-items li.yours{background:#fff7e0;box-shadow:inset 0 0 0 1px #f5dc8a}
.rel-t{margin-bottom:2px;font-size:14px}
.rel-tag{font-size:11px;padding:2px 7px;vertical-align:1px}
.rel-btns{display:flex;flex-direction:column;gap:8px}
@media (min-width:760px){.rel-btns{flex-direction:row-reverse}.rel-btns .btn{flex:1}}
