/* Sneaks & Stuff — shared look for the employee portal, owner portal and shift page. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #000; --panel: #121212; --panel2: #181818; --line: #262626; --line2: #333;
  --w: #fff; --red: #E8001C; --green: #2ECC71; --amber: #F5A623;
  --side: 232px; --r: 12px;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--ink); color: var(--w); font: 400 15px/1.5 'Barlow', system-ui, sans-serif; min-height: 100vh; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden], .hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
input::placeholder { color: #fff; opacity: .5; }
.num { font-family: 'Bebas Neue', sans-serif; letter-spacing: .5px; font-variant-numeric: tabular-nums; }

/* ── Shell ── */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px; z-index: 20; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; text-decoration: none; }
.side-brand img { width: 40px; height: 40px; border-radius: 50%; }
.side-brand b { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; }
.side-brand span { font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover { background: var(--panel2); }
.nav a.on { background: #1f0a0d; box-shadow: inset 3px 0 0 var(--red); }
.nav .badge { margin-left: auto; background: var(--red); border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot a, .side-foot button { background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-size: 14px; cursor: pointer; }
.side-foot a:hover, .side-foot button:hover { background: var(--panel2); }
.main { margin-left: var(--side); padding: 34px 40px 80px; }
.page { max-width: 1040px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.2px; line-height: 1.1; }
.page-head p { margin-top: 4px; font-size: 15px; }
.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 860px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 74px 16px 96px; }
  .topbar { display: flex; position: fixed; inset: 0 0 auto 0; height: 58px; align-items: center; gap: 10px; padding: 0 16px; background: rgba(0,0,0,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 20; }
  .topbar img { width: 32px; height: 32px; border-radius: 50%; }
  .topbar b { font-size: 16px; }
  .topbar .tb-right { margin-left: auto; display: flex; gap: 6px; }
  .topbar .tb-right a, .topbar .tb-right button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; text-decoration: none; cursor: pointer; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 8px; position: relative; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--red); }
  .tabbar .badge { position: absolute; top: 2px; left: 56%; background: var(--red); color: #fff; border-radius: 9px; font-size: 10px; padding: 0 5px; }
  .page-head h1 { font-size: 24px; }
}

/* ── Panels ── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; font-weight: 700; }
@media (max-width: 560px) { .panel { padding: 16px; } }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat span { font-size: 13px; font-weight: 500; }
.stat b { display: block; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 32px; line-height: 1.1; margin-top: 4px; letter-spacing: .5px; }
.stat small { font-size: 12px; }
.stat.red b { color: var(--red); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.inp { width: 100%; padding: 11px 13px; background: var(--ink); border: 1px solid var(--line2); border-radius: 9px; font-size: 15px; color-scheme: dark; min-height: 44px; }
.inp:focus { border-color: #555; outline: none; }
select.inp { cursor: pointer; height: 44px; padding-top: 0; padding-bottom: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 140px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; min-height: 44px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #555; }
.btn.primary { background: var(--red); border-color: var(--red); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.go { background: var(--green); border-color: var(--green); color: #03140a; }
.btn.warn { background: var(--amber); border-color: var(--amber); color: #1a1000; }
.btn.ghost { background: none; }
.btn.danger { background: none; border-color: #4a1219; color: #ff6b7d; }
.btn.danger:hover { background: #2a0a0f; }
.btn.sm { padding: 6px 11px; min-height: 32px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; }
.msg { font-size: 14px; min-height: 20px; margin-top: 10px; }
.msg.ok { color: var(--green); }
.msg.err { color: #ff6b7d; }
.msg.warn { color: var(--amber); }
.seg { display: inline-flex; background: var(--ink); border: 1px solid var(--line2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { background: none; border: 0; padding: 7px 13px; border-radius: 7px; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel2); box-shadow: 0 0 0 1px var(--line2); }

/* ── Week calendar ── */
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-nav b { font-weight: 700; font-size: 16px; min-width: 150px; text-align: center; }
.week-nav button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line2); background: none; cursor: pointer; font-size: 17px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 7px; min-height: 132px; min-width: 0; }
.day.today { border-color: var(--red); }
.day-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; padding: 0 2px; }
.day-h span { font-size: 13px; font-weight: 600; }
.day-h b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 22px; line-height: 1; }
.day.today .day-h b { color: var(--red); }
.chip { display: block; width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid #555; border-radius: 8px; padding: 7px 7px 7px 8px; margin-bottom: 6px; font-size: 12px; line-height: 1.35; cursor: default; overflow-wrap: anywhere; position: relative; }
.chip.mine, .chip.edit { cursor: pointer; }
.chip.mine { border-left-color: var(--red); }
.chip:has(.x) { padding-right: 26px; }
.chip .t-s { display: none; }
.chip.mine:hover, .chip.edit:hover { border-color: #555; border-left-color: inherit; }
.chip.live { border-left-color: var(--green); }
.chip.flag { border-left-color: var(--amber); }
.chip.done { opacity: .7; }
.chip b { display: block; font-weight: 700; font-size: 12.5px; }
.chip .job { display: block; font-weight: 600; }
.chip .tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #0d2a18; color: var(--green); }
.chip .tag.amber { background: #2e2105; color: var(--amber); }
.chip .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel); font-size: 11px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.chip .x:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 860px) {
  .week { gap: 4px; }
  .day { padding: 6px 3px; min-height: 96px; border-radius: 8px; }
  .day-h { flex-direction: column; align-items: center; gap: 2px; }
  .day-h span { font-size: 11px; }
  .day-h b { font-size: 18px; }
  .chip { font-size: 10px; padding: 5px 4px 5px 5px; border-radius: 6px; }
  .chip b { font-size: 10.5px; }
  .chip .x { width: 16px; height: 16px; font-size: 9px; top: 2px; right: 2px; }
  .chip .t-l { display: none; }
  .chip .t-s { display: inline; }
}
@media (max-width: 600px) {
  .chip { overflow-wrap: normal; word-break: normal; }
  .chip .job, .chip .x { display: none; }
  .chip:has(.x) { padding-right: 4px; }
  .chip .tag { font-size: 9px; padding: 0 4px; }
}

/* ── Live banner ── */
.live-bar { display: flex; align-items: center; gap: 14px; background: #06180d; border: 1px solid #0f3d22; border-radius: var(--r); padding: 14px 18px; margin-bottom: 18px; text-decoration: none; flex-wrap: wrap; }
.live-bar.brk { background: #1c1404; border-color: #4d3608; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(46,204,113,.18); flex: none; animation: pulse 2s ease-in-out infinite; }
.live-bar.brk .live-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(245,166,35,.18); }
.live-bar .num { font-size: 28px; margin-left: auto; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── Lists & tables ── */
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1 1 200px; min-width: 0; }
.list-row b { font-weight: 700; }
.day-group + .day-group { margin-top: 18px; }
.day-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 13px; font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 13px 10px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.paid { color: var(--green); }
.pill.unpaid { color: #ff6b7d; }
.jobs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.jobs span { background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.jobs span b { font-weight: 800; margin-left: 4px; }
.empty { padding: 26px 4px; text-align: center; font-size: 15px; }
@media (max-width: 640px) {
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 2px; font-size: 14px; }
  .tbl.stack td::before { content: attr(data-l); font-weight: 600; }
  .tbl.stack td.r { text-align: right; }
}

/* ── Modal ── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 24px; max-height: 92vh; overflow: auto; }
.modal h3 { font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.modal .field + .field, .modal .row + .field, .modal .field + .row { margin-top: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-actions .spacer { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); flex: none; }

/* ── Job picker ── */
.job-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.jp { cursor: pointer; }
.jp input { position: absolute; opacity: 0; pointer-events: none; }
.jp span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line2); border-radius: 20px; font-size: 14px; font-weight: 600; background: var(--ink); }
.jp input:checked + span { background: #2a0a0f; border-color: var(--red); }
.jp input:checked + span::before { content: '✓'; margin-right: 6px; color: var(--red); font-weight: 800; }
.jp input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
