:root {
  /* Paradis brand: yellow #FCC440, sky blue #69B9D9, scoop red #C8303A, outline #2B2B2B */
  --yellow: #FCC440; --yellow-soft: #FFF3D1; --sky: #69B9D9; --blue: #1F7FAA;
  --bg: #FFFFFF; --card: #FFFFFF; --ink: #2B2B2B; --muted: #6E6E6E; --line: #EEE6D3;
  --accent: #1F7FAA; --accent-soft: #E3F3FA; --ok: #2F7A4C; --ok-soft: #E2F1E7;
  --bad: #C8303A; --bad-soft: #FBE4E5; --warn: #9A6A00; --warn-soft: #FFF3D1;
  --r: 14px; --tab-h: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 0 calc(var(--tab-h) + env(safe-area-inset-bottom)); }
#app { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 2px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 15px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sub { color: var(--muted); font-size: 14px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand img { height: 40px; width: auto; }

.card { background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(43,43,43,.05); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 700px) { .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } }

button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 12px 16px; min-height: 46px;
  background: var(--yellow); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
button.plain { background: var(--accent-soft); color: var(--accent); }
button.danger { background: var(--bad); color: #fff; }
button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button:disabled { opacity: .45; cursor: default; }
button.block { width: 100%; }
input, select, textarea { font: inherit; font-size: 16px; width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
.chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; }
.chk input { width: 22px; height: 22px; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--sky); border-radius: 99px; }

/* checklist */
.list-head { cursor: pointer; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-top: 1px solid var(--line); }
.tick { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; min-height: 0; color: transparent; font-size: 20px; }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.item .t { font-size: 16px; line-height: 1.3; }
.item.done .t { color: var(--muted); }
.meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; margin-top: 6px; cursor: pointer; }
.cam { position: relative; overflow: hidden; }
.cam input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* temps */
.reading { font-size: 28px; font-weight: 700; }
.reading.bad { color: var(--bad); }
.temp-in { display: flex; gap: 8px; margin-top: 10px; }
.temp-in input { font-size: 20px; text-align: center; }
.temp-in button { flex: none; }

/* labels */
.label-btn { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); text-align: left; display: block; padding: 14px; min-height: 76px; }
.label-btn small { display: block; color: var(--muted); font-weight: 500; margin-top: 4px; }
.label-btn.sel { border-color: var(--yellow); background: var(--yellow-soft); }
.stepper { display: flex; align-items: center; gap: 0; }
.stepper button { width: 48px; padding: 0; }
.stepper span { width: 54px; text-align: center; font-size: 20px; font-weight: 700; }
.preview { font-size: 15px; line-height: 1.35; border: 2px dashed var(--line); border-radius: 10px; padding: 12px; background: #fff; font-family: Arial, sans-serif; max-width: 320px; }

/* schedule */
.day { margin-bottom: 14px; }
.day h3 { margin-top: 6px; }
.shift { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.shift.mine { border-color: var(--sky); background: var(--accent-soft); }
.shift.open { border-style: dashed; }

/* login */
.login { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.login .logo img { width: min(300px, 80%); height: auto; }
.login .logo { margin-bottom: 2px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.people button { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); min-height: 64px; }
.dots { display: flex; justify-content: center; gap: 12px; margin: 18px 0; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sky); }
.dots i.on { background: var(--sky); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pad button { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); font-size: 24px; min-height: 64px; }
.err { color: var(--bad); font-weight: 600; min-height: 22px; margin-top: 8px; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--blue); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs a { flex: 1; max-width: 140px; color: #D6EDF7; text-decoration: none; text-align: center; font-size: 11px; font-weight: 600; padding: 9px 2px 8px; height: var(--tab-h); }
.tabs a svg { display: block; margin: 0 auto 4px; width: 24px; height: 24px; }
.tabs a.on { color: var(--yellow); }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(30, 20, 15, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 20px; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 30; font-weight: 600; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.seg { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.seg button { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); white-space: nowrap; min-height: 40px; padding: 6px 14px; }
.seg button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }
.photo-full { width: 100%; border-radius: 12px; }

/* print: only the label sheet */
#print-area { display: none; }
@media print {
  body { padding: 0; background: #fff; }
  #app, #tabs, #modal, #toast { display: none !important; }
  #print-area { display: block; }
  .lbl { page-break-after: always; break-after: page; font-family: Arial, sans-serif; color: #000; overflow: hidden; padding: 0.06in 0.08in; }
  .lbl:last-child { page-break-after: auto; break-after: auto; }
}
.lbl .n { font-weight: 800; line-height: 1.1; }
.lbl .k { display: flex; justify-content: space-between; gap: 4px; line-height: 1.2; }
.lbl .u { font-weight: 800; }
.lbl .s { opacity: .8; }

/* v2 additions */
.link { color: var(--accent); font-weight: 600; text-decoration: none; }
.small-link { font-size: 13px; }
.store-switch, .date-pick { width: auto; padding: 6px 10px; font-size: 14px; }
.tabs a { position: relative; }
.badge { position: absolute; top: 4px; left: 54%; background: var(--bad); border: 1.5px solid #fff; color: #fff; font-size: 10px; min-width: 17px; height: 17px; line-height: 17px; border-radius: 9px; padding: 0 4px; }
.badge.static { position: static; display: inline-block; margin-right: 6px; }
.banner { display: block; background: var(--yellow-soft); border-color: var(--yellow); color: var(--ink); text-decoration: none; }
.card.unread { border-color: var(--accent); }
.body { white-space: pre-wrap; margin-top: 8px; line-height: 1.45; font-size: 15px; }
.doc-body { max-height: 65vh; overflow: auto; }
.items { margin-top: 6px; }
.sec { margin: 18px -14px 4px; padding: 8px 14px; background: var(--sky); color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.subt { font-weight: 700; color: var(--blue); margin: 14px 0 2px; font-size: 15px; }
.info { background: var(--yellow-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; line-height: 1.4; }
.tick.flag { background: var(--bad); border-color: var(--bad); color: #fff; }
div.tick { color: var(--muted); font-size: 16px; }
div.tick.on { color: #fff; }
.yn { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); min-width: 70px; }
.yn.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.yn.on.no { background: var(--warn); border-color: var(--warn); }
.hub { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.hub-i { font-size: 24px; width: 34px; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; padding: 12px 6px; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12px; color: var(--muted); }
.dash-row { padding: 6px 0; border-top: 1px solid var(--line); }
.dash-row:first-child { border-top: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.checks .chk { margin-top: 4px; font-size: 14px; }
.checks.days .chk { gap: 4px; }
.avail-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.avail-row input[type=time] { padding: 8px; font-size: 14px; }
.ed-item { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; background: var(--card); display: grid; gap: 6px; }
.ed-item.ed-section { background: var(--accent-soft); }
.ed-item textarea { padding: 8px 10px; font-size: 15px; resize: vertical; }
.ed-type { width: auto; padding: 6px 8px; font-size: 14px; margin-right: auto; }
.ed-opts { border-top: 1px dashed var(--line); padding-top: 6px; }
.sticky-save { position: sticky; bottom: -18px; background: var(--bg); padding: 10px 0; }
.doc-row { padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; gap: 8px; }
.doc-row:first-child { border-top: 0; }
.pdf { width: 100%; height: 65vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pad button.go { background: var(--yellow); color: var(--ink); font-size: 17px; }
details summary { cursor: pointer; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: transparent; color: var(--muted); border: 0; min-height: 40px; width: 44px; padding: 0; }
.pw-eye:hover { color: var(--blue); }
.pw-eye svg { width: 22px; height: 22px; }

/* wide pages (schedule builder, people) */
body.wide #app { max-width: 1500px; }
.nowrap { white-space: nowrap; }
td.c, th.c { text-align: center; }

/* schedule builder grid */
.sb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.wk-label { min-width: 120px; text-align: center; }
.sb-banner { background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sb-tip { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; color: var(--blue); }
.sb-section { margin: 18px 0 8px; }
.sb-h { cursor: pointer; font-size: 20px; margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; user-select: none; }
.sb-h .meta { font-weight: 500; }
.sb-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.sb { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; font-size: 13px; table-layout: fixed; }
table.sb th { background: #F6F2E8; font-weight: 600; color: var(--muted); text-align: center; padding: 9px 4px; border-top: 0; border-bottom: 1px solid var(--line); }
table.sb th.today { color: var(--blue); background: var(--accent-soft); }
table.sb td { border-top: 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px; vertical-align: top; height: 40px; }
table.sb .sb-name { position: sticky; left: 0; background: #fff; z-index: 1; width: 150px; text-align: left; font-weight: 600; color: var(--ink); border-left: 0; padding: 9px 10px; }
table.sb th.sb-name { background: #F6F2E8; color: var(--muted); }
table.sb .sb-hours { width: 92px; text-align: center; font-weight: 700; vertical-align: middle; }
table.sb .sb-hours .over { color: var(--bad); }
table.sb tr.unassigned td { background: #EEF0FA; }
table.sb tr.unassigned .sb-name { background: #EEF0FA; font-weight: 500; }
table.sb tr.sb-total td { font-weight: 700; text-align: center; background: #FBF9F4; vertical-align: middle; }
table.sb tr.sb-total .sb-name { background: #FBF9F4; text-align: right; }
td.cell.add { cursor: pointer; }
td.cell.add:hover { background: var(--accent-soft); }
td.cell.off { background: repeating-linear-gradient(135deg, #f2f2f2 0 6px, #e9e9e9 6px 12px); }
td.cell.unavail { background: #ECECEC; }
.cell-note { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 2px; }
.chip { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 5px 7px; margin-bottom: 3px; min-height: 0; font-size: 12px; font-weight: 600; line-height: 1.25;
  background: var(--sky); color: var(--ink); cursor: pointer; }
.chip small { display: block; font-weight: 500; font-size: 11px; opacity: .85; }
.chip.mine { background: var(--yellow); }
.chip.open { background: #fff; border: 1.5px dashed var(--blue); color: var(--blue); }
.chip.offered, .chip.asked { box-shadow: inset 0 0 0 2px var(--bad); }
.chip.other { background: #E6EEF2; color: #7B8B93; font-weight: 500; cursor: default; }
.warn-i { color: var(--bad); margin-right: 3px; font-weight: 800; }
.sb-grand { text-align: right; margin: 10px 2px 20px; color: var(--muted); }
.legend { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; }
.legend .chip { width: auto; display: inline-block; margin: 0; cursor: default; }
.legend-box { width: 70px; height: 22px; border-radius: 6px; display: inline-block; border: 1px solid var(--line); }
.legend-box.off { background: repeating-linear-gradient(135deg, #f2f2f2 0 6px, #e9e9e9 6px 12px); }
.legend-box.unavail { background: #ECECEC; }

/* people table */
.ppl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ppl-search { flex: 1 1 260px; max-width: 380px; }
.ppl-bar select { width: auto; padding: 9px 10px; font-size: 14px; }
.ppl-scroll { overflow-x: auto; }
table.ppl { min-width: 1150px; font-size: 14px; }
table.ppl th { background: #F6F2E8; color: var(--ink); font-weight: 700; padding: 10px 8px; border-top: 0; white-space: nowrap; }
table.ppl td { padding: 9px 8px; vertical-align: middle; }
table.ppl tr.ppl-row { cursor: pointer; }
table.ppl tr.ppl-row:hover td { background: var(--accent-soft); }
.ppl-name { font-weight: 600; white-space: nowrap; }
.ppl-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppl-loc { max-width: 220px; }
.pin-dots { letter-spacing: 2px; color: var(--muted); }
.ok-tick { color: var(--ok); font-weight: 800; }

/* lists dashboard landing */
.dash-group { font-weight: 500; font-size: 22px; margin: 6px 0 10px; }
.dash-list { border-top: 1px solid var(--line); }
.dash-row-btn { display: flex; width: 100%; align-items: center; gap: 12px; background: #fff; color: var(--ink); border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 14px 12px; min-height: 56px; font-size: 17px; text-align: left; }
.dash-row-btn:hover { background: var(--accent-soft); }
.dash-row-btn .store-i { font-size: 18px; }
.dash-row-btn .chev { font-size: 24px; color: var(--muted); margin-left: 6px; }
/* manage requests */
.tabs-seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.tabs-seg button { background: #fff; color: var(--ink); border: 0; border-right: 1.5px solid var(--line); border-radius: 0; min-height: 40px; padding: 6px 16px; font-size: 13px; letter-spacing: .06em; }
.tabs-seg button:last-child { border-right: 0; }
.tabs-seg button.on { background: var(--accent-soft); color: var(--blue); }
.tabs-seg .cnt { background: var(--blue); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.empty-state { text-align: center; padding: 60px 10px; font-size: 18px; }
.empty-state .sub { font-size: 15px; margin-top: 4px; }
table.avt { min-width: 640px; font-size: 13px; }
table.avt th, table.avt td { text-align: center; padding: 6px 4px; }
table.avt th:first-child { text-align: left; color: var(--muted); }
table.avt td.na { color: var(--bad); font-weight: 600; }
table.avt tr.cur td { color: var(--muted); }

/* morning vs night shifts, copy/paste, time off states */
.chip.am { background: var(--sky); color: var(--ink); }
.chip.pm { background: #2E5A88; color: #fff; }
.chip.pm small { color: #E3EEF8; }
.chip.mine { box-shadow: inset 0 0 0 3px var(--yellow); }
.chip.open { background: #fff; color: var(--blue); }
.chip.copied { outline: 3px dashed var(--yellow); outline-offset: 1px; }
.chip.dragging { opacity: .4; }
.chip-wrap { position: relative; }
.chip-copy { position: absolute; top: 2px; right: 2px; min-height: 0; width: 22px; height: 22px; padding: 0; border-radius: 5px; font-size: 13px;
  background: rgba(255,255,255,.85); color: var(--ink); border: 0; display: none; }
.chip-wrap:hover .chip-copy { display: block; }
@media (hover: none) { .chip-copy { display: block; } }
td.cell.pending { background: #FFF1C2; }
td.cell.pending .cell-note { color: #8A6400; font-weight: 600; }
td.cell.off { background: repeating-linear-gradient(135deg, #DADADA 0 6px, #CFCFCF 6px 12px); cursor: not-allowed; }
td.cell.off .cell-note { color: #555; font-weight: 600; }
td.cell.paste:hover, td.cell.drop { background: #FFF6D6; outline: 2px dashed var(--yellow); outline-offset: -3px; }
.sb-clip { background: var(--yellow-soft); border: 2px dashed var(--yellow); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.legend-box.pending { background: #FFF1C2; }
.legend-box.off { background: repeating-linear-gradient(135deg, #DADADA 0 6px, #CFCFCF 6px 12px); }

/* desktop login card */
.login-card { max-width: 440px; margin: 9vh auto 0; padding: 26px 30px 28px; text-align: left; box-shadow: 0 6px 30px rgba(43,43,43,.08); }
.login-card .logo { text-align: center; }
.login-card .logo img { width: 230px; height: auto; }
.login-title { text-align: center; font-weight: 400; font-size: 30px; margin: 4px 0 8px; color: var(--ink); }
.or-line { text-align: center; color: var(--muted); margin: 16px 0 10px; font-size: 14px; }
.or-line::before, .or-line::after { content: '—'; margin: 0 8px; }

/* dashboard cards */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 900px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.dcard { margin: 0; position: relative; }
.dcard h2 { font-size: 19px; margin: 4px 0 10px; }
.range, .range-l { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
select.range { width: auto; border: 0; padding: 0; background: transparent; cursor: pointer; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { width: 180px; height: 180px; }
.d-pct { font-size: 30px; font-weight: 800; fill: var(--ink); }
.d-lbl { font-size: 11px; fill: var(--muted); }
.d-legend div { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 15px; color: var(--muted); }
.d-legend b { font-size: 22px; color: var(--ink); font-weight: 600; min-width: 34px; }
.d-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.bars { width: 100%; height: auto; }
.bars .ax { font-size: 12px; fill: var(--muted); }
.bars .bv { font-size: 12px; font-weight: 700; fill: var(--ink); }
.leader { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; }
.leader.top { background: var(--accent-soft); }
.leader .rank { width: 30px; text-align: center; color: var(--muted); font-weight: 700; }
.leader .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.leader small { display: block; font-size: 10px; color: var(--blue); letter-spacing: .06em; font-weight: 700; }
.leader .cnt-n { color: var(--blue); font-weight: 700; font-size: 17px; }
.ok-big { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #9A9A9A; color: #9A9A9A; display: grid; place-items: center; font-size: 24px; font-weight: 800; margin: 14px auto; }
.corr { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.corr:first-of-type { border-top: 0; }
.store-block { padding: 8px 0; border-top: 1px solid var(--line); }
.back-arrow { font-size: 24px; color: var(--ink); text-decoration: none; }
.meta.c { text-align: center; }

/* desktop sidebar (Jolt style): section panel + icon rail */
.side { display: none; }
@media (min-width: 900px) {
  body.has-side { padding: 0 0 0 290px; }
  body.has-side.side-min { padding-left: 66px; }
  body.has-side .side { display: flex; }
  body.has-side .toast { bottom: 24px; }
  body.has-side .top .brand { display: none; }
}
.side { position: fixed; top: 0; bottom: 0; left: 0; width: 290px; background: #262626; color: #EDEDED; z-index: 15; }
.side-min .side { width: 66px; }
.side-min .side-panel { display: none; }
.side-panel { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 14px 14px 0 16px; min-width: 0; }
.side-rail { width: 66px; flex: none; display: flex; flex-direction: column; align-items: center; background: #1E1E1E; padding: 10px 0; overflow-y: auto; }
.rail-btn { display: grid; place-items: center; width: 66px; height: 52px; background: transparent; border: 0; border-radius: 0; color: #EDEDED; padding: 0; min-height: 0; cursor: pointer; }
.rail-btn svg { width: 24px; height: 24px; }
.rail-btn:hover { background: rgba(255,255,255,.08); }
.rail-btn.on { color: var(--yellow); }
.rail-btn.sel { background: #333; }
.side-rail .grow { flex: 1; }
.side-logo { background: #fff; border-radius: 10px; padding: 8px 10px; display: flex; justify-content: center; margin-bottom: 14px; }
.side-logo img { height: 46px; width: auto; }
.side-name { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; color: #EDEDED; font-size: 17px; font-weight: 700; padding: 0 10px; min-height: 52px; cursor: pointer; }
.side-name:hover { background: rgba(255,255,255,.07); }
.side-name.on { color: var(--yellow); }
.side-back { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: transparent; border: 0; color: #fff; font-size: 24px; font-weight: 700; padding: 10px 0 6px; min-height: 0; cursor: pointer; }
.side-back svg { width: 26px; height: 26px; }
.side-h { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; color: #CFCFCF; border-bottom: 2px solid #9A9A9A; padding: 18px 2px 6px; margin-bottom: 4px; }
.side-link { display: block; color: #EDEDED; text-decoration: none; font-size: 16px; font-weight: 600; padding: 9px 4px; border-radius: 6px; }
.side-link:hover { background: rgba(255,255,255,.07); }
.side-link.on { color: var(--yellow); }
.side-me { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 12px 4px 16px; color: #EDEDED; text-decoration: none; }
.side-me b { display: block; font-size: 15px; }
.side-me small { color: #A9A9A9; font-size: 12px; }
.rep-list a { display: block; padding: 12px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.rep-list a:first-child { border-top: 0; margin-top: 8px; }
.rep-list a b { display: block; color: var(--blue); }
.rep-list a:hover b { text-decoration: underline; }

/* dashboard: two stacked columns like Jolt */
@media (min-width: 900px) { .dash-col { display: flex; flex-direction: column; gap: 14px; } .dash-grid .span2 { grid-column: 1 / -1; } }
.dash-col { display: contents; }
@media (min-width: 900px) { .dash-col { display: flex; } }
.rep-list a.hi { background: var(--accent-soft); border-radius: 8px; }

/* phone: Jolt-style menu drawer + compact dashboard */
.menu-btn { display: none; }
@media (max-width: 899px) {
  .top { align-items: flex-start; flex-wrap: wrap; column-gap: 12px; row-gap: 4px; }
  .top > .grow { flex: 1 1 calc(100% - 60px); min-width: 0; }
  .top > :not(.grow):not(.menu-btn) { margin-left: 56px; }
  .menu-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; background: transparent; color: var(--ink); border: 0; border-radius: 10px; margin-top: 4px; }
  .menu-btn svg { width: 24px; height: 24px; }
  body.drawer .side { display: flex; width: min(340px, 90vw); box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); z-index: 40; }
  body.drawer { overflow: hidden; }
  .side-panel { padding-bottom: 12px; }
  .dash-grid { gap: 10px; }
  .dcard { padding: 12px 12px 10px; }
  .dcard h2 { font-size: 16px; margin: 2px 0 6px; }
  .donut-wrap { flex-wrap: nowrap; gap: 12px; justify-content: flex-start; }
  .donut { width: 116px; height: 116px; flex: none; }
  .d-legend div { font-size: 13px; margin: 6px 0; gap: 7px; }
  .d-legend b { font-size: 18px; min-width: 26px; }
  .ok-big { width: 36px; height: 36px; font-size: 18px; margin: 6px auto; }
  .dash-row { font-size: 14px; }
}

/* phone home (Jolt app style) */
.hm-bar { display: flex; align-items: center; gap: 10px; margin: -6px -4px 0; padding-bottom: 10px; }
.hm-ham { background: transparent; border: 0; color: var(--ink); width: 46px; height: 46px; min-height: 0; padding: 0; display: grid; place-items: center; }
.hm-ham svg { width: 30px; height: 30px; }
.hb-store { width: auto; border: 0; background: transparent; font-size: 19px; font-weight: 700; padding: 0 22px 0 0; color: var(--ink); min-height: 0; }
.hm-bar .sub { font-size: 13px; margin-top: 1px; }
.hm-av { width: 48px; height: 48px; border-radius: 50%; background: #A9A9A9; color: #fff; display: grid; place-items: center; font-size: 18px; text-decoration: none; flex: none; }
.hm-banner { position: relative; margin: 0 -16px 8px; background: linear-gradient(135deg, #1F7FAA 0%, #2B95C4 55%, #69B9D9 100%); color: #fff; padding: 22px 20px 70px; clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%); overflow: hidden; }
.hm-banner::after { content: ''; position: absolute; right: -40px; top: -30px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.14); }
.hm-name { font-size: 27px; font-weight: 800; position: relative; z-index: 1; }
.hm-role { opacity: .85; font-size: 14px; position: relative; z-index: 1; }
.hm-banner img { position: absolute; right: 22px; top: 18px; width: 84px; height: 84px; border-radius: 50%; background: #fff; padding: 6px; z-index: 1; }
.hm-sec { display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: var(--ink); padding: 18px 2px 6px; }
.hm-sec h2 { font-size: 22px; margin: 0; font-weight: 600; }
.hm-sec .sub { font-size: 15px; }
.hm-arrow { font-size: 26px; color: #6B6B6B; }
.hm-body { padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.hm-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.hm-row:first-child { border-top: 0; }
.hm-date { width: 54px; text-align: center; border-radius: 10px; background: var(--accent-soft); padding: 6px 0; flex: none; }
.hm-date b { display: block; color: var(--blue); font-size: 13px; text-transform: uppercase; }
.hm-date span { font-size: 13px; }
.hm-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--blue); flex: none; }
.hm-ic svg { width: 20px; height: 20px; }
.hm-ic.log { background: #FFF4D6; color: #9A6B00; }
.hm-empty { color: var(--muted); padding: 10px 0 12px; text-align: center; }
.hm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 0 8px; }
.hm-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.hm-stats b { display: block; font-size: 22px; color: var(--blue); }
.hm-stats b.bad { color: var(--bad); }
.hm-stats span { font-size: 12px; color: var(--muted); }

/* phone drawer (white, like the Jolt app) */
.side.white { background: #fff; color: var(--ink); flex-direction: column; overflow-y: auto; }
.dw-top { display: flex; align-items: center; gap: 8px; padding: 22px 22px 14px; }
.dw-top img { height: 44px; }
.dw-top span { color: var(--blue); font-weight: 700; letter-spacing: .08em; font-size: 13px; }
.dw-nav { flex: 1; padding: 4px 14px 4px 0; }
.dw-nav a, .dw-foot a, .dw-foot button { display: flex; align-items: center; gap: 22px; padding: 13px 22px; color: #4A4A4A; text-decoration: none; font-size: 17px; border-radius: 0 30px 30px 0; background: transparent; border: 0; width: 100%; min-height: 0; font-weight: 500; text-align: left; }
.dw-nav a svg, .dw-foot svg { width: 24px; height: 24px; flex: none; color: #5A5A5A; }
.dw-nav a.on { background: #C9E8F7; color: var(--blue); font-weight: 700; }
.dw-nav a.on svg { color: var(--blue); }
.dw-nav .badge.static { margin-left: auto; }
.dw-foot { border-top: 1px solid var(--line); padding: 6px 14px 14px 0; }
.dw-foot small { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 899px) { body.drawer .side.white { box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); } }
.dc-link { display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: var(--ink); }
.dc-link .hm-arrow { font-size: 22px; }
a.hm-row { text-decoration: none; color: var(--ink); }
.hm-row.unread b { color: var(--blue); }
.hm-row.unread { background: var(--accent-soft); border-radius: 10px; padding-left: 6px; padding-right: 6px; }
.hm-ic.note { background: #FDE7E9; color: var(--bad); }
.avatar.sm { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.wt-store { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin-top: 8px; }
.dcard h2 .cnt-n { font-size: 15px; background: var(--accent-soft); color: var(--blue); border-radius: 10px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.dcard h2 .cnt-n.bad { background: #FDE7E9; color: var(--bad); }
.hm-row .row .small { min-height: 34px; padding: 4px 10px; }

/* Home app grid (FIS CORR style) */
.ag-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.menu-btn2 { display: none; }
@media (max-width: 899px) { .menu-btn2 { display: grid; } }
.ag-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: linear-gradient(135deg, #1F7FAA 0%, #2B95C4 60%, #69B9D9 100%); color: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 18px; }
.ag-hi { font-size: 26px; font-weight: 800; }
.ag-sub { opacity: .9; font-size: 14px; }
.ag-store { width: auto; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 10px; padding: 6px 10px; font-weight: 700; min-height: 0; }
.ag-store option { color: var(--ink); }
.ag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 600px) { .ag-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .ag-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; } }
.ag-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 8px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .08s; }
.ag-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43,43,43,.08); }
.ag-ic { position: relative; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.ag-ic svg { width: 28px; height: 28px; }
.ag-badge { position: absolute; top: -7px; right: -9px; background: var(--bad); color: #fff; border: 2px solid #fff; font-size: 11px; min-width: 22px; height: 22px; line-height: 18px; border-radius: 11px; padding: 0 5px; }
.ag-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.ag-sub2 { font-size: 11px; color: var(--muted); line-height: 1.2; }
.ag-out { position: absolute; top: 8px; right: 10px; color: var(--muted); font-size: 13px; }

/* Shift Chat */
.chat-wrap { display: flex; gap: 14px; align-items: stretch; }
.chat-roster { width: 210px; flex: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; align-self: flex-start; }
.cr { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #BDBDBD; display: inline-block; }
.dot.on { background: #2E9E6B; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); min-height: 60vh; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px; max-height: 62vh; display: flex; flex-direction: column; gap: 8px; }
.cm { max-width: 78%; align-self: flex-start; }
.cm.mine { align-self: flex-end; text-align: right; }
.cm-b { display: inline-block; background: #EEF6FA; border-radius: 14px 14px 14px 4px; padding: 8px 12px; text-align: left; white-space: pre-wrap; word-break: break-word; }
.cm.mine .cm-b { background: var(--blue); color: #fff; border-radius: 14px 14px 4px 14px; }
.cm-dm { display: block; font-size: 11px; opacity: .8; }
.cm-m { font-size: 11px; color: var(--muted); margin-top: 2px; }
.chat-form { border-top: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-form select { font-size: 14px; }
.chat-form input { flex: 1; }
.chat-closed { text-align: center; padding: 30px 16px; }
@media (max-width: 899px) { .chat-wrap { flex-direction: column; gap: 8px; } .chat-roster { width: auto; align-self: stretch; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 8px 10px; } .chat-roster .range-l { width: 100%; margin: 0 !important; } .cr { padding: 0; font-size: 13px; } .chat-main { min-height: 0; } .chat-list { height: calc(100vh - 430px); min-height: 180px; max-height: none; } }

/* Inventory (Sortly style) */
.back-link { display: inline-block; margin: -4px 0 10px; color: var(--blue); text-decoration: none; font-weight: 600; }
.inv-layout { display: flex; gap: 18px; align-items: flex-start; }
.inv-main { flex: 1; min-width: 0; }
.inv-tree { width: 230px; flex: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; position: sticky; top: 10px; max-height: 85vh; overflow-y: auto; }
.inv-tree a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-tree a:hover { background: var(--accent-soft); }
.inv-tree a.on { background: #FDE7E9; color: var(--bad); font-weight: 700; }
@media (max-width: 899px) { .inv-tree { display: none; } }
.inv-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.inv-pick { flex: 2 1 260px; font-size: 16px; min-height: 48px; }
.inv-search { flex: 1 1 200px; }
.inv-totals { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.inv-totals b { color: var(--ink); font-weight: 600; }
.inv-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.inv-crumbs a { color: var(--blue); text-decoration: none; }
.inv-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.inv-folder { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); }
.inv-folder:hover { box-shadow: 0 6px 18px rgba(43,43,43,.1); }
.inv-collage { height: 112px; background: #8E8E93; display: grid; gap: 2px; }
.inv-collage img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.inv-collage.n2 { grid-template-columns: 1fr 1fr; }
.inv-collage.n3 { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; }
.inv-collage.n3 img:first-child { grid-row: span 2; }
.inv-fold-ic { display: grid; place-items: center; font-size: 42px; height: 100%; opacity: .8; }
.inv-fi { padding: 10px 12px; }
.inv-folder-wrap .inv-last { font-size: 12px; color: var(--muted); padding: 6px 4px 0; }
.bad-t { color: var(--bad); font-weight: 700; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.inv-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); }
.inv-card:hover { box-shadow: 0 6px 18px rgba(43,43,43,.1); }
.inv-imgw { position: relative; height: 130px; background: #F4F1EA; }
.inv-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-lowtag { position: absolute; top: 8px; right: 8px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 5px; letter-spacing: .04em; }
.inv-cn { font-weight: 700; padding: 10px 12px 4px; line-height: 1.25; font-size: 15px; }
.inv-cq { padding: 0 12px 8px; font-size: 13px; margin-top: auto; }
.inv-tags { padding: 0 12px 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.inv-tags span { font-size: 11px; background: #F1F1F1; border-radius: 5px; padding: 2px 6px; color: var(--muted); }
.inv-nophoto { display: grid; place-items: center; width: 100%; height: 100%; color: #B9B9B9; }
.inv-nophoto svg { width: 34px; height: 34px; }
.inv-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: #F4F1EA; }
span.inv-thumb { display: grid; place-items: center; }
span.inv-thumb svg { width: 22px; height: 22px; }
.inv-need { text-align: right; font-size: 13px; }
.inv-item { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.inv-photo { flex: 1 1 320px; max-width: 520px; background: #F4F1EA; border-radius: 16px; overflow: hidden; }
.inv-photo img { width: 100%; display: block; }
.inv-nophoto.big { height: 260px; flex-direction: column; gap: 6px; }
.inv-info { flex: 1 1 320px; min-width: 0; }
.inv-qty { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.inv-qty button { width: 60px; height: 60px; font-size: 30px; border-radius: 50%; padding: 0; min-height: 0; }
.inv-qty div { text-align: center; min-width: 110px; }
.inv-qty b { display: block; font-size: 40px; line-height: 1; }
.inv-qty.low b { color: var(--bad); }
.inv-qty span { color: var(--muted); }
.inv-tbl th { width: 40%; color: var(--muted); font-weight: 600; }
.cnt-card { padding: 4px 12px; }
.cnt-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cnt-row:first-child { border-top: 0; }
.cnt-row a { color: var(--ink); text-decoration: none; }
.cnt-row.low .meta { color: var(--bad); }
.cnt-row.changed { background: #FFF8E1; border-radius: 10px; }
.stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.stepper button { width: 44px; height: 44px; min-height: 0; padding: 0; font-size: 24px; border-radius: 12px; background: var(--accent-soft); color: var(--blue); border: 0; }
.stepper input { width: 70px; text-align: center; font-size: 18px; font-weight: 700; padding: 8px 4px; }
.cnt-bar { position: sticky; bottom: calc(var(--tab-h) + 8px); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 14px; margin-top: 14px; z-index: 5; }
body.has-side .cnt-bar { bottom: 12px; }
.cnt-bar .meta { color: #ddd; }
@media (max-width: 899px) { .inv-grid, .inv-folders { grid-template-columns: repeat(2, 1fr); gap: 10px; } .inv-imgw { height: 110px; } .inv-collage { height: 96px; } }

/* Missed punch */
.punch-row { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
.punch-row label.f { margin-top: 0; font-size: 12px; }
@media (max-width: 700px) { .punch-row { grid-template-columns: 1fr 1fr; } .punch-row > div:first-child { grid-column: 1 / -1; } }
.sig-wrap { position: relative; border: 2px dashed var(--line); border-radius: 12px; background: #fff; }
.sig-wrap canvas { width: 100%; height: 140px; display: block; touch-action: none; cursor: crosshair; }
.sig-wrap button { position: absolute; top: 6px; right: 6px; }
.punch-tbl { width: 100%; margin-top: 8px; font-size: 13px; }
.punch-tbl th { font-size: 11px; color: var(--muted); }
.punch-card { margin-bottom: 10px; }
@media print {
  body.print-form #print-area { display: block; }
  .pform { font-family: Arial, sans-serif; color: #000; padding: 0.4in; font-size: 12pt; }
  .pform h1 { font-size: 18pt; margin: 0; } .pform h2 { font-size: 14pt; margin: 4px 0 14px; }
  .pf-head, .pf-tbl { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
  .pf-tbl th, .pf-tbl td { border: 1px solid #000; padding: 6px; text-align: left; }
}
.inv-nav { margin-bottom: 12px; }
.segl { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); white-space: nowrap; min-height: 38px; padding: 7px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; }
.segl.on { background: #E2343F; color: #fff; border-color: #E2343F; }
.inv-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 899px) { .inv-sum { grid-template-columns: repeat(2, 1fr); } }
.inv-sum > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.inv-sum .ic { grid-row: span 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.inv-sum .ic.b { background: #E3F1F8; } .inv-sum .ic.y { background: #FFF2CC; } .inv-sum .ic.r { background: #FDE7E9; } .inv-sum .ic.g { background: #E4F5EC; }
.inv-sum b { font-size: 24px; }
.inv-sum span:last-child { color: var(--muted); font-size: 13px; }
.inv-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.act-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.act-line:first-child { border-top: 0; }
.act-line a { color: var(--ink); }
.act-line > .meta { white-space: nowrap; }
.tag-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tag-row { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 600; }
.inv-cp { font-size: 11px; color: var(--muted); padding: 0 12px 4px; }
.inv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .inv-stats { grid-template-columns: 1fr 1fr; } }
.inv-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.inv-stats > div.low { border-color: var(--bad); }
.inv-stats span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.inv-stats b { font-size: 24px; }
.inv-stats .low b { color: var(--bad); }
.inv-qty2 { display: flex; align-items: center; gap: 10px; }
.inv-qty2 button { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 12px; font-size: 24px; }
.inv-qty2 b { min-width: 50px; text-align: center; font-size: 28px; }
.inv-pi, .inv-cf { flex: 1 1 320px; margin: 0; }
.inv-pi .inv-photo { max-width: none; }
.pi-k { font-size: 12px; color: var(--muted); margin-top: 12px; }
.inv-cf > div:not(.pi-k) { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ag-sec { margin: 18px 0 10px; } .ag-sec:first-of-type { margin-top: 4px; }
@media (max-width: 599px) {
  .ag-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .ag-tile { padding: 10px 4px 9px; border-radius: 14px; gap: 6px; }
  .ag-ic { width: 46px; height: 46px; border-radius: 14px; }
  .ag-ic svg { width: 24px; height: 24px; }
  .ag-name { font-size: 12px; }
  .ag-sub2 { font-size: 10px; }
}
.hr-thread { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }

/* Back arrow to the app grid, shown in every app */
.top .home-back { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 4px; border-radius: 12px; color: var(--blue); background: rgba(31,127,170,.08); text-decoration: none; }
.top .home-back:hover { background: rgba(31,127,170,.16); }
.top .home-back svg { width: 22px; height: 22px; }
@media (max-width: 899px) {
  .top > .home-back.home-back:not(.grow):not(.menu-btn) { margin: 6px 0 0; width: 40px; height: 40px; }
  .top > .home-back ~ .grow { flex-basis: calc(100% - 112px); }
  .top > .home-back ~ :not(.grow):not(.menu-btn) { margin-left: 108px; }
}

/* Required Training */
.tr-card { border-left: 4px solid var(--blue); }
.tr-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--blue); }
.tr-due { margin: 12px 0 4px; font-size: 15px; }
.tr-due.overdue { color: var(--bad); } .tr-due.soon { color: var(--warn); }
.tr-done { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ink); }
.tr-note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.tr-steps { margin: 12px 0 0; padding-left: 22px; }
.tr-steps li { margin: 0 0 14px; line-height: 1.45; }
.tr-go { margin-top: 8px; }
.tr-up { margin-top: 6px; }
.tr-pct { font-size: 28px; font-weight: 800; line-height: 1; }
.tr-bar { height: 8px; border-radius: 99px; background: var(--line); margin-top: 12px; overflow: hidden; }
.tr-bar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.tr-filters { margin-top: 12px; }
.tr-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tr-row:first-child { border-top: 0; }
.tr-row .grow { min-width: 200px; }
.tr-act { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 899px) { .tr-act { width: 100%; } }
.seg .segl .cnt { display: inline-block; background: var(--blue); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 5px; line-height: 17px; }
.seg .segl.on .cnt { background: #fff; color: var(--bad); }

/* Notifications */
.nt-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.nt-row:first-child { border-top: 0; }
.nt-row .nt-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--line); color: var(--muted, #777); }
.nt-row .nt-ic svg { width: 18px; height: 18px; }
.nt-row.unread .nt-ic { background: #FDEBD3; color: #E58A00; }
.nt-row.unread b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E58A00; margin-right: 6px; vertical-align: middle; }
.nt-body { white-space: pre-line; line-height: 1.4; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nr-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.nr-row:first-child { border-top: 0; }
.nr-row.off .grow { opacity: .5; }
.nr-t { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted, #777); min-width: 44px; cursor: pointer; }
.nr-t input { width: 20px; height: 20px; margin: 0; }
.nr-extra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.nr-extra select { width: auto; max-width: 100%; font-size: 13px; padding: 4px 8px; min-height: 0; }
.nr-x { background: none; border: 0; padding: 0 0 0 4px; min-height: 0; color: inherit; font-weight: 800; cursor: pointer; }
.nr-live { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 4px solid var(--warn); background: var(--warn-soft); }
.nr-live.on { border-left-color: var(--ok); background: var(--ok-soft); }
.nc-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.nc-sw { display: flex; gap: 10px; align-items: center; }
@media (max-width: 899px) { .nc-grid { grid-template-columns: 1fr; } }
.nc-prev { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.nc-pa { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.nc-pi { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); }
.nc-pi:first-of-type { border-top: 0; }
.p-log { margin-top: 8px; } .p-log summary { cursor: pointer; font-size: 13px; color: var(--blue); font-weight: 600; }
.iq-card { border-left: 4px solid var(--warn); } .iq-card.resolved { border-left-color: var(--ok); }
.iq-issue { margin: 8px 0; padding: 10px 12px; background: var(--warn-soft); border-radius: 10px; white-space: pre-line; }
.iq-msg { padding: 8px 0; border-top: 1px solid var(--line); } .iq-msg div { white-space: pre-line; }

/* Flavors */
.fl-base { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-right: 4px; }
.b-milk { background: #F6E8D2; color: #7A5418; } .b-vegan { background: #DDF1E2; color: #23683A; } .b-sorbet { background: #FBE0EA; color: #A3184A; }
.fl-legend { margin: 0 0 10px; }
.fl-ph { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--line); font-size: 22px; }
.fl-ph.sm { width: 36px; height: 36px; font-size: 18px; }
.fl-big { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; display: inline-grid; place-items: center; background: var(--line); font-size: 50px; }
.fl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.fl-item { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.fl-item.off { opacity: .55; }
.fl-grid { display: grid; gap: 6px; margin-top: 12px; overflow-x: auto; }
.fl-slot { position: relative; border-radius: 10px; padding: 6px 4px 4px; text-align: center; min-width: 70px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 1px solid rgba(0,0,0,.06); }
.fl-slot.empty { background: #F3F3F3; color: #999; border-style: dashed; }
.fl-n { position: absolute; top: 3px; left: 5px; font-size: 10px; font-weight: 800; opacity: .6; }
.fl-sph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.6); display: grid; place-items: center; }
.fl-sn { font-size: 11px; font-weight: 700; line-height: 1.15; min-height: 26px; }
.fl-sel { font-size: 11px; padding: 2px; min-height: 0; width: 100%; }
.fl-need { font-size: 22px; font-weight: 800; text-align: center; line-height: 1; } .fl-need span { display: block; font-size: 10px; font-weight: 600; color: var(--muted, #777); }
.fl-cases { display: flex; gap: 14px; overflow-x: auto; }
.fl-case1 { flex: 1 1 0; min-width: 0; }
.fl-ch { font-size: 12px; font-weight: 800; letter-spacing: .05em; color: var(--muted, #777); margin-top: 10px; text-transform: uppercase; }
.fl-case1 .fl-grid { margin-top: 6px; }
@media (max-width: 700px) { .fl-cases { flex-direction: column; gap: 4px; } }
.fl-cases .fl-slot { min-width: 0; padding: 5px 2px 3px; }
.fl-cases .fl-sph { width: 30px; height: 30px; }
.fl-cases .fl-sn { font-size: 10px; min-height: 24px; overflow-wrap: anywhere; }
.fl-cases .fl-sel { font-size: 10px; }
.fl-dupes { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.fl-dup { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid rgba(0,0,0,.08); }
.fl-dup:first-of-type { margin-top: 8px; }
.fl-group { margin-top: 18px; }
.fl-ghead { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 12px; font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.fl-gn { font-size: 13px; font-weight: 600; opacity: .8; }
.fl-dup .grow { flex: 1 1 220px; min-width: 200px; }
@media (max-width: 899px) { .fl-dup .grow { flex-basis: 100%; } }
.b-unset { background: #ECECEC; color: #555; } .b-ss { background: #E3ECFB; color: #234E9A; }
.fl-ss { margin-top: 8px; } .fl-ssrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fl-ssel { font-size: 12px; padding: 3px 4px; min-height: 0; width: 100%; }
.fl-ssrow .fl-slot { width: 150px; }

/* Display grid: same layout as the real case on every screen, scaled to fit */
.fl-grid { overflow: visible; gap: 4px; }
.fl-slot { min-width: 0 !important; font: inherit; color: inherit; cursor: default; }
button.fl-slot.pick { cursor: pointer; border: 1px solid rgba(0,0,0,.1); min-height: 0; padding: 6px 2px 4px; box-shadow: none; }
button.fl-slot.pick:hover { outline: 2px solid var(--blue); }
button.fl-slot.pick.empty { border: 1px dashed #bbb; background: #F7F7F7; color: var(--blue); }
.fl-sn { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) { .fl-sph { width: 30px; height: 30px; } .fl-sn { font-size: 10px; } }
@media (max-width: 700px) { .fl-grid { gap: 3px; } .fl-slot, button.fl-slot.pick { padding: 4px 1px 3px; border-radius: 7px; } .fl-sph { width: 22px; height: 22px; } .fl-sn { font-size: 9px; line-height: 1.1; min-height: 30px; } .fl-n { font-size: 8px; top: 1px; left: 3px; } }

.fl-ssrow .fl-slot { width: 140px; }
.pk-list { max-height: 60vh; overflow-y: auto; }
.pk-g { margin-bottom: 10px; }
.pk-i { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; color: var(--ink, #222); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 4px; font-weight: 600; min-height: 0; box-shadow: none; }
.pk-i span { flex: 1; } .pk-i.on { background: #EEF6FB; } .pk-i b { color: var(--blue); }

.fl-swipe { display: none; }
@media (max-width: 600px) {
  .fl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px 6px; }
  .fl-scroll .fl-grid { grid-template-columns: repeat(var(--cols), 64px) !important; width: max-content; }
  .fl-scroll .fl-sph { width: 26px; height: 26px; }
  .fl-scroll .fl-sn { font-size: 9.5px; min-height: 32px; }
  .fl-swipe { display: block; margin-top: 4px; }
}
.off-card { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.vault-old { max-height: 240px; overflow-y: auto; font-size: 13px; } .vault-old img { max-width: 100%; }
.vp { display: inline-flex; flex-direction: column; gap: 4px; align-items: center; } .vp img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }

/* Service tickets & equipment */
a.tk-card { display: block; color: inherit; text-decoration: none; border-left: 4px solid #ccc; }
.tk-card.pr-urgent { border-left-color: var(--bad); } .tk-card.pr-high { border-left-color: var(--warn); } .tk-card.pr-normal { border-left-color: var(--blue); }
.tk-card { border-left: 4px solid #ccc; }
.tk-act { margin-top: 6px; font-weight: 700; color: var(--blue); } .tk-act.big { font-size: 16px; margin: 10px 0 4px; }
.tk-step { opacity: .8; } .tk-step.on { opacity: 1; border: 2px solid var(--blue); }
.tk-sh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .tk-sh .meta { flex: 1; text-align: right; font-weight: 600; }
.tk-n { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.tk-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 10px; }
.tk-cat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; background: #fff; color: var(--ink, #222); border: 1px solid var(--line); border-radius: 12px; font-weight: 700; min-height: 0; box-shadow: none; }
.tk-cat span { font-size: 28px; }
.tk-eqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tk-eq { display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; padding: 8px; background: #fff; color: var(--ink, #222); border: 1px solid var(--line); border-radius: 12px; min-height: 0; box-shadow: none; }
.tk-eq img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; } .tk-eq b { font-size: 15px; color: var(--blue); }
.tk-noimg { display: grid; place-items: center; height: 90px; border-radius: 8px; background: #F2F2F2; color: #999; font-size: 12px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tk-chips .chip { padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink, #222); font-weight: 600; min-height: 0; box-shadow: none; }
.tk-chips .chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.tk-prs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.tk-pr { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px; background: #fff; color: var(--ink, #222); border: 2px solid var(--line); border-radius: 12px; min-height: 0; box-shadow: none; }
.tk-pr span { font-size: 12px; font-weight: 500; color: var(--muted, #777); }
.tk-pr.pr-urgent b { color: var(--bad); } .tk-pr.pr-high b { color: var(--warn); }
.tk-pr.on { border-color: var(--blue); background: #EEF6FB; }
.tk-eqline { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 8px; background: #F7F7F7; border-radius: 10px; }
.tk-eqline img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.tk-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .tk-photos img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }
.tk-own { border: 2px solid var(--blue); } .tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; } .tk-grid input { margin-top: 6px; }
.eq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.eq-card { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin: 0; }
.eq-tag img, .eq-tag .tk-noimg { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; display: grid; }
.eq-no { font-size: 13px; font-weight: 800; color: var(--blue); letter-spacing: .03em; }
.eq-btns { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.eq-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
@media (max-width: 899px) { .eq-list { grid-template-columns: 1fr; } }
#test-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: #7B1FA2; color: #fff; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 4px 8px; }
body.is-test { padding-top: 24px; }
