/* InSynch Employee Dashboard
   Brand: navy #073849 and white (lime only on the sign-in page), Raleway. Minimum text size 0.8rem. No left-border accents. */
:root {
  --navy: #073849;
  --navy-2: #0c4a60;
  --navy-deep: #052a37;
  --navy-soft: #e6eef1;
  --lime: #a9d300;
  --lime-soft: #f2f8dc;
  --ink: #0f2129;
  --muted: #566a72;
  --faint: #8a9ca3;
  --line: #e0e7ea;
  --line-strong: #cad5d9;
  --bg: #f4f4f4;
  --card: #ffffff;
  --warn: #9a4f06;
  --warn-bg: #fff3e2;
  --warn-line: #f1d1a3;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --good: #3b6100;
  --good-bg: #eef7d6;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(7, 56, 73, .06), 0 4px 16px rgba(7, 56, 73, .06);
  --font: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; color: var(--navy); }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.num { font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }

/* ---------- preview bar ---------- */
.preview-bar { background: var(--navy-soft); color: var(--navy); border-bottom: 1px solid var(--line-strong); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 16px; flex-wrap: wrap; text-align: center; }
.preview-bar form { margin: 0; }
.preview-bar button { background: var(--navy); color: #fff; border: 0; border-radius: var(--radius); padding: 6px 14px; font: 700 13px var(--font); cursor: pointer; }

/* ---------- top bar (white, like insynch.co.uk) ---------- */
.topbar { background: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--line); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px; display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand .wordmark { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.brand .product { font-size: 14px; font-weight: 700; color: var(--navy); padding-left: 12px; border-left: 1px solid var(--line-strong); }
.nav { display: flex; gap: 28px; height: 100%; }
.nav a { display: flex; align-items: center; color: var(--navy); font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; padding-top: 3px; }
.nav a:hover { text-decoration: none; border-bottom-color: var(--line-strong); }
.nav a.on { border-bottom-color: var(--navy); font-weight: 700; }

.me { margin-left: auto; position: relative; }
.me summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--navy); padding: 6px 4px; }
.me summary::-webkit-details-marker { display: none; }
.me summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 30; }
.me-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; }
.me-head span { font-size: 13px; color: var(--muted); }
.me-menu form { margin: 0; }
.me-access { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; gap: 2px; }
.me-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.me-role { font-size: 13px; color: var(--ink); }
.me-role b { color: var(--navy); }
.me-menu button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; font: 600 14px var(--font); color: var(--navy); border-radius: 4px; cursor: pointer; }
.me-menu button:hover, .me-link:hover { background: var(--navy-soft); text-decoration: none; }
.me-link { display: block; padding: 10px 12px; font: 600 14px var(--font); color: var(--navy); border-radius: 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- navy band with wave (like the site's sections) ---------- */
.band { background: var(--navy); color: #fff; position: relative; padding-bottom: 8px; }
.band-inner { max-width: 1200px; margin: 0 auto; padding: 34px 24px 0; min-height: 145px; box-sizing: border-box; }  /* same depth on every page, with or without a sub-menu */
.band-title { color: #fff; font-size: 36px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.band-sub { margin-top: 10px; color: rgba(255, 255, 255, .8); font-size: 15px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chips { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; white-space: nowrap; }
.chip.on { background: #fff; color: var(--navy); }
.chip.solid { background: var(--navy); color: #fff; }
.home-panel .chip.small-chip { background: var(--navy-soft); color: var(--navy); vertical-align: middle; margin-left: 6px; }
.subnav { display: flex; gap: 6px; margin-top: 24px; overflow-x: auto; scrollbar-width: none; }
.subnav a { color: rgba(255, 255, 255, .85); font-weight: 700; font-size: 14px; padding: 10px 14px 12px; border-bottom: 3px solid transparent; white-space: nowrap; }
.subnav a:hover { color: #fff; text-decoration: none; border-bottom-color: rgba(255, 255, 255, .35); }
.subnav a.on { color: #fff; border-bottom-color: #fff; }
.wave { display: block; width: 100%; height: 40px; margin-top: -1px; }
.wave path { fill: var(--navy); }

/* ---------- layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 24px; line-height: 1.2; }
.page-head .sub { margin-top: 6px; color: var(--muted); max-width: 760px; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.head-stat { display: grid; text-align: right; }
.head-stat .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.head-stat .val { font-size: 26px; font-weight: 700; color: var(--navy); }

/* ---------- cards ---------- */
.card, .panel, .today, .home-panel, .table-wrap, .stats, .cal, .empty-state, .now-list, .type-summary, .filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card, .panel { padding: 24px 28px; }
.side .panel { padding: 20px; }

/* ---------- flash ---------- */
.flash { border: 1px solid var(--line-strong); background: #fff; padding: 12px 16px; margin-bottom: 22px; border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--navy); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; }
.flash::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); flex: none; margin-top: 5px; }
.flash.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.flash.warn::before { background: var(--warn); }
.flash.error { background: var(--bad-bg); border-color: #f2c4bf; color: var(--bad); }
.flash.error::before { background: var(--bad); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 4px; border: 1px solid var(--navy); background: var(--navy); color: #fff; font: 600 15px/1 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn.lg { height: 50px; padding: 0 28px; font-size: 16px; }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy-soft); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px;
  font: 500 15px var(--font); color: var(--ink); background: #fff; font-variant-numeric: lining-nums tabular-nums;
}
textarea { height: auto; padding: 10px 12px; width: 100%; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(7, 56, 73, .15); }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.error-text { color: var(--bad); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.field .opt { font-weight: 500; color: var(--faint); }
.field-help { font-size: 13px; font-weight: 500; color: var(--faint); }
.field-error { font-size: 13px; font-weight: 700; color: var(--bad); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); background: #fffafa; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: var(--bg); color: var(--muted); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--navy); }
.checks-inline { display: flex; gap: 14px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 200px; }
.inline-form { display: inline; margin: 0; }
.danger { color: var(--bad); }
.danger-btn { color: var(--bad) !important; border-color: var(--bad) !important; }

/* ---------- home ---------- */
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 4px; }
.home-panel { display: flex; flex-direction: column; overflow: hidden; }
.home-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.home-panel > header h2 { font-size: 22px; }
.home-panel > header p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.home-panel > header a { font-size: 14px; font-weight: 700; white-space: nowrap; }
.home-panel .body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; background: var(--bg); border-radius: var(--radius); padding: 14px 16px; }
.mini-stats .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.mini-stats .val { font-size: 22px; font-weight: 700; color: var(--navy); margin-top: 2px; }
.mini-stats .val.pos { color: var(--good); }
.mini-stats .val.negv { color: var(--bad); }
.home-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-row form { margin: 0; }
.home-note { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }
.home-note a { font-weight: 700; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.item-list li a { font-weight: 600; }
.item-list li span:last-child { color: var(--muted); font-size: 13px; text-align: right; }

/* ---------- today panel ---------- */
.today { display: grid; grid-template-columns: 260px 1fr auto; align-items: center; overflow: hidden; }
.today > * { padding: 26px 28px; }
.today-now { background: var(--navy-soft); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.today-now .time { font-size: 44px; font-weight: 800; color: var(--navy); line-height: 1; letter-spacing: -0.02em; }
.today-now .time small { font-size: 0.45em; font-weight: 700; margin-left: 3px; letter-spacing: 0; }
.today-now .date { margin-top: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.working { background: var(--navy); box-shadow: 0 0 0 3px rgba(7, 56, 73, .18); }
.dot.lunch { background: #e7a13a; }
.dot.done { background: var(--navy); }
.punches { display: grid; grid-template-columns: repeat(4, 1fr); }
.punch { padding: 2px 0 2px 18px; border-left: 1px solid var(--line); }
.punch:first-child { border-left: 0; padding-left: 0; }
.punch .lbl { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.punch .val { font-size: 24px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.punch .val.is-empty { color: var(--line-strong); }
.punch.flag .val { color: var(--warn); }
.punch .why { font-size: 13px; color: var(--warn); margin-top: 2px; font-weight: 600; }
.today-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 210px; }
.today-actions form { margin: 0; }
.today-actions .btn { width: 100%; }
.today-actions .note { font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- period filter ---------- */
.filter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 9px 14px; font-size: 13px; font-weight: 700; color: var(--navy); border-left: 1px solid var(--line); }
.seg a:first-child { border-left: 0; }
.seg a:hover { text-decoration: none; background: var(--navy-soft); }
.seg a.on { background: var(--navy); color: #fff; }
.custom { display: none; align-items: center; gap: 8px; }
.custom.show { display: flex; }
.custom input { height: 38px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; overflow: hidden; }
.stat { padding: 20px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.stat .val { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.15; margin-top: 6px; letter-spacing: -0.01em; }
.stat .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.ahead .val { color: var(--good); }
.stat.behind .val { color: var(--bad); }
.stat.flags .val { color: var(--warn); }
.stat.flags.none .val { color: var(--navy); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 22px 8px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 14px 12px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.t td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tbody tr:last-child td { border-bottom: 0; }
.t th:first-child, .t td:first-child { padding-left: 0; }
.t th:last-child, .t td:last-child { padding-right: 0; }
.t tr.weekend td { color: var(--faint); }
.t tr.today-row td { background: var(--navy-soft); }
.t .r { text-align: right; }
.t td.flag { color: var(--warn); font-weight: 700; }
.t .notes { color: var(--warn); font-size: 13px; font-weight: 600; }
.t .notes .sep { color: var(--line-strong); padding: 0 4px; }
.t td.notes-cell { min-width: 280px; }
.t tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); }
.t .date-cell { white-space: nowrap; font-weight: 700; }
.t .date-cell span { color: var(--muted); font-weight: 500; }
.t th a.sort { color: inherit; }
.t th a.sort.on { color: var(--navy); }
.t th a.sort.on::after { content: " ↓"; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: 4px; background: var(--navy-soft); color: var(--navy); white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.live { background: var(--navy); color: #fff; }
.tag.bad { background: var(--bad-bg); color: var(--bad); }

/* Change requests */
.small-link { display: block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.req-list { display: grid; gap: 16px; }
.req { padding: 20px 22px; }
.req-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.req-head a { font-weight: 700; color: var(--navy); }
.req-times { border-collapse: collapse; width: 100%; max-width: 640px; font-size: 15px; }
.req-times th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 12px 6px 0; }
.req-times td { padding: 5px 12px 5px 0; }
.req-times td:first-child { font-size: 13px; font-weight: 700; color: var(--muted); width: 80px; }
.req-times td.changed { font-weight: 800; color: var(--navy); background: var(--navy-soft); padding-left: 8px; border-radius: 4px; }
.req-reason { margin: 12px 0 16px; color: var(--ink); font-style: italic; }
.req-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.req-actions input[type=text] { flex: 1; min-width: 200px; max-width: 360px; }
.time-in { font-variant-numeric: tabular-nums; }
.pos { color: var(--good); font-weight: 700; }
.negv { color: var(--bad); font-weight: 700; }
.person { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.edit-link { font-size: 13px; font-weight: 700; }
.item-name { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.age-old { color: var(--warn); font-weight: 700; }
.muted-row td { color: var(--faint); }
.empty { padding: 28px 24px; color: var(--muted); background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state { padding: 40px 28px; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 14px; }
.cal-head .month { font-size: 22px; font-weight: 700; color: var(--navy); min-width: 200px; }
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .55fr)); margin-top: 18px; overflow: hidden; }
.cal .dow { font-size: 13px; font-weight: 700; color: #fff; background: var(--navy); text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; }
.cell { min-height: 136px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; background: #fff; }
.cell:nth-child(7n) { border-right: 0; }
.cell.out-month { background: #fafafa; }
.cell.out-month > * { opacity: .45; }
.cell.weekend { background: #fafafa; }
.cell.is-today { background: var(--navy-soft); }
.cell.has-flag { background: #fffaf2; }
.cell.is-today.has-flag { background: var(--navy-soft); }
.cell-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.cell-top .d { font-weight: 800; font-size: 15px; color: var(--ink); }
.cell.is-today .cell-top .d { background: var(--navy); color: #fff; border-radius: 4px; padding: 0 6px; }
.cell-top .tot { font-size: 13px; font-weight: 700; color: var(--navy); }
.cell-top .tot.short { color: var(--bad); }
.times { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 2px; }
.times li { display: flex; justify-content: space-between; gap: 6px; }
.times li span:first-child { color: var(--muted); }
.times li b { font-weight: 700; }
.times li.flag b, .times li.flag span:first-child { color: var(--warn); }
.times li.missing b { color: var(--line-strong); }
.cell .abs { font-size: 13px; font-weight: 700; color: var(--good); background: var(--good-bg); padding: 2px 6px; border-radius: 4px; align-self: flex-start; }
.cell .issue { font-size: 13px; color: var(--warn); line-height: 1.35; font-weight: 600; }
.cell .edit { margin-top: auto; align-self: flex-end; font-size: 13px; font-weight: 700; padding-top: 4px; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- team ---------- */
.now-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); padding: 6px 20px; }
.now-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); padding-right: 18px; }
.now-item .dot { margin-top: 7px; }
.now-item .who { font-weight: 700; font-size: 15px; }
.now-item .what { font-size: 13px; color: var(--muted); }

/* ---------- equipment ---------- */
.form-panel { max-width: 880px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 18px; }
.form-grid .field input, .form-grid .field select { width: 100%; }
.span-2 { grid-column: 1 / -1; }
.type-select { max-width: 880px; margin-bottom: 20px; display: flex; gap: 12px; align-items: flex-end; }
.type-select .field { flex: 1; }
.type-select select { width: 100%; max-width: 420px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.split .form-panel { max-width: none; }
.side { display: grid; gap: 16px; }
.split.setup { grid-template-columns: 230px minmax(0, 1fr); }
.type-list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.type-list a { padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink); }
.type-list a:last-child { border-bottom: 0; }
.type-list a:hover { background: var(--navy-soft); text-decoration: none; }
.type-list a.on { background: var(--navy); color: #fff; }
.field-rows { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; box-shadow: var(--shadow); }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.field-row:last-child { border-bottom: 0; }
.field-row.off { opacity: .55; }
.field-row .checks { display: flex; flex-direction: column; gap: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 18px 20px; margin-bottom: 20px; }
.filters .field select { min-width: 150px; }
.filters .grow input { width: 100%; }
.type-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 20px; overflow: hidden; }
.type-summary a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; color: var(--ink); }
.type-summary a:hover { background: var(--navy-soft); text-decoration: none; }
.type-summary .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.type-summary .val { font-size: 24px; font-weight: 800; color: var(--navy); }
.type-summary .hint { font-size: 13px; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-side { background: var(--navy); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-side .big { color: #fff; font-size: 56px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.login-side .big em { font-style: normal; color: var(--lime); display: block; }
.login-side .wordmark { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.login-box { width: 100%; max-width: 360px; }
.login-title { font-size: 30px; margin-bottom: 8px; }
.login-box .sub { color: var(--muted); margin-bottom: 28px; }
.sso { display: grid; gap: 12px; }
.sso .btn { height: 52px; justify-content: center; gap: 14px; background: #fff; color: var(--navy); border: 1px solid var(--navy); font-size: 16px; font-weight: 700; }
.sso .btn:hover { background: var(--navy-soft); }
.sso .btn svg { width: 20px; height: 20px; flex: none; }
.sso .btn.disabled { opacity: .5; pointer-events: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .split, .split.setup { grid-template-columns: 1fr; }
  .today { grid-template-columns: 1fr; }
  .today-now { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
  .today-now .status { margin-top: 0; }
  .today-actions { flex-direction: row; min-width: 0; border-top: 1px solid var(--line); }
  .today-actions form { flex: 1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 32px 24px; gap: 32px; }
  .login-side .big { font-size: 40px; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 20px; }
}
@media (max-width: 720px) {
  .topbar-inner { padding: 10px 16px 0; gap: 14px; height: auto; flex-wrap: wrap; }
  .brand img { height: 28px; }
  .brand .product { display: none; }
  .nav { order: 3; width: 100%; overflow-x: auto; height: 46px; gap: 22px; }
  .me .name { display: none; }
  .band-inner { padding: 24px 16px 0; min-height: 118px; }
  .band-title { font-size: 28px; }
  .subnav { margin-top: 16px; }
  .page { padding: 20px 16px 64px; }
  .page-title { font-size: 21px; }
  .today > * { padding: 18px 16px; }
  .today-now .time { font-size: 34px; }
  .punches { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .punch:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat { padding: 16px 14px; }
  .stat .val { font-size: 24px; }
  .cal { grid-template-columns: 1fr; }
  .cal .dow { display: none; }
  .cell { min-height: 0; border-right: 0; }
  .cell.out-month, .cell.weekend.empty-day { display: none; }
  .cell-top .d::after { content: attr(data-dow); color: var(--muted); font-weight: 500; margin-left: 6px; }
  .seg { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg a { flex: 1 0 auto; text-align: center; white-space: nowrap; padding: 9px 12px; }
  .section-head > *, .filter { min-width: 0; max-width: 100%; }
  .filter { width: 100%; }
  .custom.show { flex-wrap: wrap; }
  .custom input { flex: 1; min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .table-wrap { padding: 4px 14px 8px; }
  .table-wrap .t { min-width: 680px; }
  .filters .field, .filters .field select { width: 100%; }
  .mini-stats { gap: 10px; }
  .mini-stats .val { font-size: 18px; }
  .home-panel > header, .home-panel .body { padding-left: 16px; padding-right: 16px; }
  .card, .panel { padding: 18px 16px; }
  .type-select { flex-wrap: wrap; }
}

/* ---------- Health & Safety ---------- */
.home-line { font-size: 15px; margin-bottom: 14px; }
.stat .val .of { font-size: 16px; font-weight: 700; color: var(--muted); }
.hs-header { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hs-header .wide { grid-column: 1 / -1; }
.hs-header input[disabled] { background: var(--bg); color: var(--muted); }
.hs-hint { margin: 18px 0 4px; }
.hs-section { font-size: 18px; font-weight: 800; color: var(--navy); margin: 28px 0 10px; }
.hs-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.hs-q { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.hs-q:first-child { border-top: 0; }
.hs-text { font-size: 15px; line-height: 1.45; }
.hs-q.off { background: var(--warn-bg); }
.hs-action, .hs-mgmt, .hs-said { grid-column: 1 / -1; }
.hs-action { display: none; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.hs-q.off .hs-action, .no-js .hs-action { display: flex; }
.hs-action input { width: 100%; }
.hs-action .field:not(.grow) { width: 200px; }
.seg label { position: relative; cursor: pointer; }
.seg label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label span { display: block; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--navy); border-left: 1px solid var(--line); min-width: 48px; text-align: center; }
.seg label:first-child span { border-left: 0; }
.seg label input:checked + span { background: var(--navy); color: #fff; }
.seg label input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: -3px; }
.hs-submit { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hs-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 24px; }
.hs-details .wide { grid-column: span 2; }
.hs-details .lbl, .hs-said .lbl { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.hs-said { font-size: 14px; display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: baseline; }
.hs-said .lbl { display: inline; margin: 0; }
.hs-ans .ans { display: inline-block; min-width: 52px; text-align: center; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 4px; background: var(--navy-soft); color: var(--navy); }
.hs-ans .ans.bad { background: var(--bad-bg); color: var(--bad); }
.hs-mgmt { display: none; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.hs-mgmt input[type=text] { width: 100%; }
.hs-q.off .hs-mgmt, .hs-q.has-mgmt .hs-mgmt, .hs-view:has(#hs-all:checked) .hs-mgmt { display: flex; }
.hs-toggle { margin-top: 20px; white-space: normal; }
.hs-review { margin-top: 28px; }
.hs-review h3 { font-size: 18px; color: var(--navy); margin-bottom: 14px; }
.hs-edit-section { margin-top: 24px; }
.hs-sec-title { font-size: 17px !important; font-weight: 800 !important; color: var(--navy) !important; margin-bottom: 10px; width: 100%; max-width: 420px; }
.hs-edit-row { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hs-edit-row:first-child { border-top: 0; }
.hs-edit-row .sort { width: 70px; }
.hs-edit-row.inactive input[type=text] { color: var(--faint); text-decoration: line-through; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--navy); }
@media (max-width: 760px) {
  .hs-header, .hs-details { grid-template-columns: 1fr; }
  .hs-details .wide { grid-column: auto; }
  .hs-q { grid-template-columns: 1fr; padding: 14px 16px; }
  .hs-action .field:not(.grow) { width: 100%; }
  .hs-edit-row .grow { flex-basis: 100%; }
}
.home-note + .home-note { margin-top: 0; border-top: 0; padding-top: 6px; }

.leave-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.leave-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.leave-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-heading { font-size: 17px; color: var(--navy); margin: 8px 0 12px; }

/* Slack commands strip on Flexi > Today */
.slack-cmds { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.slack-cmds-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.slack-cmds h2 { font-size: 16px; color: var(--navy); }
.slack-cmds ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 20px; }
.slack-cmds li { display: grid; gap: 6px; align-content: start; }
.slack-cmds code { font: 700 15px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--navy); background: var(--navy-soft); padding: 5px 9px; border-radius: 4px; justify-self: start; }
.slack-cmds li span { font-size: 13px; color: var(--muted); line-height: 1.4; }
@media (max-width: 760px) { .slack-cmds ul { grid-template-columns: repeat(2, 1fr); } }

/* Time boxes: type a time, or pick one from the clock button */
.time-wrap { position: relative; display: block; }
.time-wrap input.time-in { width: 100%; padding-right: 44px; }
.time-pick { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 40px; border: 0; border-left: 1px solid var(--line); border-radius: 0 4px 4px 0; background: var(--navy-soft); color: var(--navy); cursor: pointer; display: grid; place-items: center; padding: 0; }
.time-pick:hover { background: #d9e6ea; }
.tp { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 272px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(7, 56, 73, .18); padding: 12px; }
.tp-ap { display: flex; gap: 6px; margin-bottom: 10px; }
.tp-ap button, .tp-grid button { border: 1px solid var(--line-strong); background: #fff; color: var(--navy); font: 700 14px var(--font); border-radius: 4px; height: 34px; cursor: pointer; }
.tp-ap button { flex: 1; }
.tp-ap .tp-now { flex: 1.3; }
.tp button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tp button:hover:not(.on) { background: var(--navy-soft); }
.tp-lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin: 8px 0 6px; }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.tp-hint { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.4; }

/* Clocked out and back in during the day */
.away-rows { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.away-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.away-title .opt { font-weight: 500; color: var(--faint); }
.away-row { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 16px; margin-bottom: 12px; }
.away-line { grid-column: 1 / -1; font-size: 14px; color: var(--muted); margin-top: 6px; }
.cal .times li.away span { color: var(--muted); }
@media (max-width: 760px) { .away-row { grid-template-columns: 1fr 1fr; } .tp { width: 256px; } }
.edit-link { white-space: nowrap; }
