/* Wireworks Time — one small stylesheet. Off-white, ink, one orange. Square, flat, ruled. */
:root {
  --bg: #FAF9F5; --ink: #100F0D; --orange: #F2551D; --soft: #D8D4C8; --tint: #F0EDE3; --mute: #5A564E;
  --blue: #1E4FD0; --green: #177A3C; --red: #B4201A; --ot: #E8B400;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --u: 4px; --pad: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.4 var(--sans); overflow-wrap: break-word; }
p, li, td, .card, .note, .toast span, .mute { overflow-wrap: anywhere; min-width: 0; }
td.n, td.nowrap, .nowrap { overflow-wrap: normal; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
.mono, .num, td.n, th.n, time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mute { color: var(--mute); }
.lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.big { font: 400 56px/1 var(--mono); letter-spacing: -.03em; }
.mid { font: 400 28px/1.1 var(--mono); letter-spacing: -.02em; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a.sr:focus { position: static; width: auto; height: auto; clip-path: none; display: inline-block; padding: 8px 12px; background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- shell ---- */
.top { display: flex; align-items: stretch; border-bottom: 1px solid var(--ink); min-height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 var(--pad); border-right: 1px solid var(--ink); text-decoration: none; }
.brand img { height: 30px; width: 25px; display: block; }
.brand b { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.15; }
.brand b span { display: block; font-weight: 400; color: var(--mute); }
.tabs { display: flex; flex: 1; overflow-x: auto; }
.tabs a { display: flex; align-items: center; padding: 0 var(--pad); text-decoration: none; border-right: 1px solid var(--soft); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tabs a:hover { background: var(--tint); }
.tabs a:focus-visible { outline-offset: -4px; }
.tabs a[aria-current="page"]:focus-visible { outline-color: var(--bg); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); border-right-color: var(--ink); }
.tabs a .count { margin-left: 8px; background: var(--orange); color: var(--ink); font: 12px/1 var(--mono); padding: 3px 5px; }
.who { display: flex; align-items: center; gap: 12px; padding: 0 var(--pad); border-left: 1px solid var(--ink); white-space: nowrap; }
.bar { padding: 7px var(--pad); border-bottom: 1px solid var(--ink); font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bar.practice { background: var(--orange); }
.bar.offline, .bar.warn { background: var(--ink); color: var(--bg); }
.bar.warn button, .bar.offline button { border-color: var(--bg); color: var(--bg); }
main { padding: var(--pad); max-width: 1500px; }
main:focus { outline: none; }
main.narrow { max-width: 560px; margin: 0 auto; }
.page-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.page-title h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }

/* ---- controls ---- */
button, .btn, select, input, textarea { font: inherit; color: inherit; border-radius: 0; }
button, .btn { background: transparent; border: 1px solid var(--ink); padding: 6px 12px; cursor: pointer; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; }
button:hover, .btn:hover { background: var(--ink); color: var(--bg); }
button.primary { background: var(--ink); color: var(--bg); }
button.primary:hover { background: var(--bg); color: var(--ink); }
button.act { background: var(--orange); color: var(--ink); }
button.act:hover { background: var(--ink); color: var(--bg); }
button.quiet { border-color: transparent; text-decoration: underline; padding-left: 0; padding-right: 0; }
button.quiet:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
button:disabled, button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; background: transparent; color: var(--ink); }
button.small { padding: 2px 8px; min-height: 24px; font-size: 12px; font-family: var(--sans); }
td button.small, td select, td input { vertical-align: middle; }
td select { max-width: 100%; }
input, select, textarea { background: #fff; border: 1px solid var(--ink); padding: 6px 8px; min-height: 32px; max-width: 100%; }
select { appearance: none; -webkit-appearance: none; padding-right: 26px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23100F0D'/%3E%3C/svg%3E") no-repeat right 9px center; }
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; min-height: 0; width: 18px; height: 18px; margin: 0; padding: 0; border: 1px solid var(--ink); background: #fff; vertical-align: -4px; flex: none; cursor: pointer; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23FAF9F5' stroke-width='2.2'/%3E%3C/svg%3E") center / 14px no-repeat; }
input[type="radio"]:checked { background: var(--ink); border: 4px solid #fff; outline: 1px solid var(--ink); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .45; cursor: not-allowed; }
textarea { width: 100%; min-height: 64px; resize: vertical; }
input.n { font-family: var(--mono); text-align: right; width: 76px; }
label.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span, .field > label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.field .hint { font-size: 12px; color: var(--mute); text-transform: none; letter-spacing: 0; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select { width: 100%; }
.field.err input, .field.err select, .field.err textarea { border: 2px solid var(--red); }
.err-text { color: var(--red); font-size: 13px; }
.err-text::before { content: "Problem: "; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.field .find { margin-bottom: 6px; }
.seg { display: inline-flex; }
.seg button { border-right-width: 0; }
.seg button:last-child { border-right-width: 1px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---- toolbar (same on every tab) ---- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0 12px; border-bottom: 1px solid var(--ink); margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.toolbar .read { font-size: 12px; color: var(--mute); }
.menu { position: relative; display: inline-block; }
.menu > .pop { position: absolute; z-index: 20; top: calc(100% + 2px); left: 0; background: var(--bg); border: 1px solid var(--ink); min-width: 240px; max-height: 70vh; overflow: auto; padding: 6px; }
.menu > .pop.right { left: auto; right: 0; }
.pop .item { display: flex; width: 100%; border: 0; text-align: left; padding: 6px 8px; min-height: 30px; }
.pop .item:hover { background: var(--tint); color: var(--ink); }
.pop hr { border: 0; border-top: 1px solid var(--soft); margin: 6px 0; }
.pop .lbl { padding: 6px 8px 2px; }

/* ---- notices ---- */
.note { border: 1px solid var(--ink); padding: 10px 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.note.need { border-left: 8px solid var(--orange); }
.note.bad { border-left: 8px solid var(--red); }
.note.ok { border-left: 8px solid var(--ink); }
.note .x { margin-left: auto; }
.strip { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); margin-bottom: 12px; }
.strip > * { padding: 8px 12px; border-right: 1px solid var(--soft); display: flex; gap: 8px; align-items: center; background: transparent; border-top: 0; border-bottom: 0; border-left: 0; min-height: 40px; }
.strip > .lead { background: var(--orange); border-right: 1px solid var(--ink); }
.strip .cnt { font: 16px/1 var(--mono); }
.strip > .done { color: var(--mute); }
.strip .tick { font: 15px/1 var(--mono); }
.strip > .end { margin-left: auto; border-right: 0; border-left: 1px solid var(--soft); color: var(--mute); }
.strip > .end.approved { color: var(--ink); font-weight: 600; }
.strip > .end.ready { background: var(--ink); color: var(--bg); border-left-color: var(--ink); gap: 12px; }
.strip > .end.ready button { border-color: var(--orange); }
.strip > .end.ready button:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.stepper { display: inline-flex; }
.stepper button { font-size: 16px; padding: 4px 12px; }
.stepper .cur { display: inline-flex; align-items: center; justify-content: center; min-width: 168px; padding: 0 14px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-weight: 600; font-size: 13px; }
.empty { padding: 40px 16px; text-align: center; color: var(--mute); border: 1px dashed var(--soft); }
.loading { padding: 24px 0; color: var(--mute); }
.loading::after { content: " …"; }
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; max-width: min(520px, calc(100vw - 32px)); }
dialog > .toasts { position: absolute; left: 16px; right: 16px; bottom: 72px; max-width: none; justify-items: start; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 12px; display: flex; gap: 12px; align-items: center; border: 1px solid var(--ink); }
.toast.bad { background: var(--bg); color: var(--ink); border-left: 8px solid var(--red); }
.toast button { border-color: currentColor; color: inherit; }
.toast:not(.bad) :focus-visible { outline-color: var(--bg); }

/* ---- tables ---- */
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--ink); white-space: nowrap; vertical-align: bottom; }
td { padding: 6px 8px; border-bottom: 1px solid var(--soft); vertical-align: top; }
th.n, td.n { text-align: right; }
th, th.n { font-family: var(--sans); }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th button.sort { border: 0; padding: 0; min-height: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; }
th button.sort:hover { background: transparent; color: var(--ink); text-decoration: underline; }
th[aria-sort="ascending"] button.sort::after { content: " ▲"; }
th[aria-sort="descending"] button.sort::after { content: " ▼"; }
tr.sel td { background: var(--tint); }
.scroll-x { overflow-x: auto; position: relative; } /* relative: keeps screen-reader-only text inside from widening the page */
.tag { display: inline-block; color: var(--ink); border: 1px solid var(--ink); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 1px 5px; white-space: nowrap; line-height: 1.5; }
.tag.need { background: var(--orange); }
.tag.dash { border-style: dashed; }
.tag.solid { background: var(--ink); color: var(--bg); }
.tag.bad { border-color: var(--red); color: var(--red); }
.key { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; background: var(--ink); }
.c-regular { background: var(--ink); } .c-overtime { background: var(--ot); outline: 1px solid var(--ink); outline-offset: -1px; } .c-pto { background: var(--blue); } .c-holiday { background: var(--green); } .c-other { background: var(--mute); }
.c-unpaid { background: transparent; border: 1px dashed var(--ink); }

/* ---- dialogs and side panels (one pattern) ---- */
dialog { border: 1px solid var(--ink); background: var(--bg); color: var(--ink); padding: 0; max-width: min(720px, calc(100vw - 24px)); width: 100%; max-height: calc(100vh - 24px); }
dialog.wide { max-width: min(1040px, calc(100vw - 24px)); }
dialog.side { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; max-width: min(760px, 100vw); border-width: 0 0 0 1px; }
dialog::backdrop { background: rgba(16, 15, 13, .35); }
dialog form.dlg, dialog .dlg { display: flex; flex-direction: column; max-height: inherit; height: 100%; }
.dlg-head { display: flex; gap: 12px; align-items: baseline; padding: 12px var(--pad); border-bottom: 1px solid var(--ink); }
.dlg-head h2 { font-size: 17px; font-weight: 600; flex: 1; }
.dlg-body { padding: var(--pad); overflow: auto; flex: 1; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px var(--pad); border-top: 1px solid var(--ink); flex-wrap: wrap; }
.dlg-foot .left { margin-right: auto; }
.section { border-top: 1px solid var(--ink); padding: 14px 0; }
.section:first-child { border-top: 0; padding-top: 0; }
.section > h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }

/* ---- timesheet grid ---- */
.week { border: 1px solid var(--ink); margin-bottom: 16px; }
.wk-head, .wk-row { display: grid; grid-template-columns: minmax(200px, 1.5fr) repeat(7, minmax(0, 1fr)); }
.wk-head { background: var(--ink); color: var(--bg); }
.wk-head > div { padding: 6px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-right: 1px solid #3a3833; }
.wk-head .today { background: var(--orange); color: var(--ink); }
.wk-head .today::after { content: " · today"; }
.wk-row { border-top: 1px solid var(--soft); }
.wk-row:first-of-type { border-top: 0; }
.wk-row > * { padding: 7px 8px; border-right: 1px solid var(--soft); min-width: 0; }
.wk-row > *:last-child { border-right: 0; }
.wk-row > .wk-who, .wk-head > div:first-child { border-right: 1px solid var(--ink); }
.wk-who .name { font-weight: 600; }
.wk-who .tot { font: 15px/1.4 var(--mono); display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--mute); }
.wk-who .tot span { font: 12px/1.5 var(--sans); }
.wk-who .tot b { color: var(--ink); font: 400 15px/1.4 var(--mono); }
.wk-who .status { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.wk-who .status button.act { background: transparent; border-left: 8px solid var(--orange); }
.wk-who .status button.act:hover { background: var(--ink); color: var(--bg); }
.wk-who .status button.ok { border: 1px solid var(--soft); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; min-height: 22px; color: var(--mute); }
.wk-who .status button.ok:hover { background: var(--ink); color: var(--bg); }
button.cell { display: block; width: 100%; text-align: left; border: 0; border-right: 1px solid var(--soft); padding: 7px 8px; min-height: 58px; white-space: normal; font-size: 12px; align-content: start; }
button.cell:hover { background: var(--tint); color: var(--ink); }
button.cell.nonwork { background: var(--tint); }
button.cell.outside { opacity: .4; }
button.cell.outside:hover, button.cell.outside:focus-visible { opacity: 1; }
.wk-head .outside { color: #8a867c; }
.cell .ln { display: flex; justify-content: space-between; gap: 6px; font-family: var(--mono); line-height: 1.45; }
.cell .ln span:first-child { font-family: var(--sans); color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .flags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.daybar { position: relative; height: 7px; border: 1px solid var(--soft); margin-bottom: 5px; background: #fff; }
.daybar i { position: absolute; top: 0; bottom: 0; display: block; }
.daybar i.under { top: 55%; z-index: 1; }
.daybar.tall { height: 28px; border-color: var(--ink); margin: 0 0 4px; }
.axis { display: flex; justify-content: space-between; font: 10px/1 var(--mono); color: var(--mute); margin-bottom: 12px; }
.wk-row.compact button.cell { min-height: 30px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mute); margin: 0 0 10px; }

/* ---- month calendar ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ink); }
.cal > .day:nth-child(7n) { border-right: 0; }
.cal > .dow { background: var(--ink); color: var(--bg); padding: 5px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-right: 1px solid #3a3833; }
.cal > .day { min-height: 80px; border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft); padding: 4px 6px; font-size: 12px; }
.cal > .day.out { background: var(--tint); color: var(--mute); }
.cal > .day.nonwork { background: var(--tint); }
.cal .dnum { font-family: var(--mono); display: flex; justify-content: space-between; margin-bottom: 3px; }
.cal .day.today .dnum b { background: var(--orange); color: var(--ink); padding: 0 4px; }
.cal .off { display: block; width: 100%; text-align: left; border: 1px solid var(--ink); padding: 1px 4px; margin-bottom: 2px; min-height: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; background: var(--ink); color: var(--bg); }
.cal .off.pending { background: transparent; color: var(--ink); border-style: dashed; }
.cal .off:hover { background: var(--bg); color: var(--ink); border-style: solid; }
.cal .hol { color: var(--green); font-weight: 600; }

/* ---- cards (phone-first pieces) ---- */
.card { border: 1px solid var(--ink); padding: 14px; margin-bottom: 12px; }
.card.need { border-left: 8px solid var(--orange); }
.card h2 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--ink); border-right: 0; border-bottom: 0; margin-bottom: 16px; }
.stat-grid > div { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 10px 12px; }
.stat-grid .v { font: 400 24px/1.15 var(--mono); letter-spacing: -.02em; }
.stat-grid .s { font-size: 12px; color: var(--mute); }
.list > li { border-bottom: 1px solid var(--soft); padding: 10px 0; }
.list > li:first-child { border-top: 1px solid var(--ink); }
.sticky-foot { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--ink); padding: 10px 0; margin-top: 12px; }
svg text { font-family: var(--mono); font-size: 10px; fill: var(--mute); }
svg .ink { stroke: var(--ink); } svg .soft { stroke: var(--soft); }

/* ---- sign-in ---- */
.signin { max-width: 400px; margin: 7vh auto 0; padding: 0 16px; }
.signin .mark { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.signin .mark img { height: 64px; width: 54px; }
.signin .mark div { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; }
.signin .seg { display: flex; margin-bottom: 18px; }
.signin .seg button { flex: 1; justify-content: center; }
.signin input { font-size: 16px; min-height: 42px; }
.signin button.primary { width: 100%; justify-content: center; min-height: 44px; font-size: 15px; }

/* ---- phone ---- */
@media (max-width: 820px) {
  body { font-size: 15px; }
  input, select, textarea { font-size: 16px; min-height: 42px; }
  button, .btn, .tabs a { min-height: 44px; }
  button.small { min-height: 44px; padding: 6px 10px; }
  label.check { min-height: 44px; }
  th button.sort { min-height: 44px; }
  .pop .item { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
  .top { flex-wrap: wrap; }
  .brand b { display: none; }
  .who { border-left: 0; margin-left: auto; }
  .tabs { order: 3; flex-basis: 100%; border-top: 1px solid var(--ink); }
  .tabs a { padding: 12px 14px; }
  .top.few .tabs { order: 0; flex-basis: 0; border-top: 0; }
  .top.few .who { margin-left: 0; }
  main { padding: 12px; }
  dialog, dialog.side, dialog.wide { max-width: 100vw; width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .big { font-size: 46px; }
  .wk-head, .wk-row { grid-template-columns: minmax(150px, 1fr) repeat(7, 104px); }
  .week { overflow-x: auto; }
  .cal > .day { min-height: 64px; }
  .hide-phone { display: none !important; }
  .strip > .lead { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--ink); }
  .toolbar .spacer { display: none; }
}
@media (max-width: 480px) { .tabs a { padding: 12px 9px; font-size: 12px; letter-spacing: 0; } .tabs a .count { margin-left: 4px; } }
@media (min-width: 821px) { .only-phone { display: none !important; } }
@media (prefers-reduced-motion: no-preference) { button, .tabs a { transition: none; } }
@media print { .tabs, .who, .toolbar, .bar, .toasts, button { display: none !important; } body { background: #fff; } }

