/* Apex Field phone pages (WP-326). From Timeclock's style.css and the timeclock prototype's layout:
   one column, phone first, light and dark, 16 px side margins, no sideways scrolling.
   The client's colours come from /brand.css (--brand, --brand-ink). */
:root {
  --bg: #ffffff; --surface: #ffffff; --ink: #14201d; --muted: #5d6b67; --line: #d5dcda;
  --brand: #1f5f4a; --brand-ink: #ffffff; --in: #1e8e3e; --in-ink: #ffffff; --out: #c62828; --out-ink: #ffffff;
  --bad: #a4291b; --bad-bg: #f8dfda; --ok: #0f7a55; --ok-bg: #d9f0e6; --warn: #8a5a00; --warn-bg: #fbf0d4;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1513; --surface: #16211e; --ink: #e8efed; --muted: #9aaba6; --line: #2a3a36;
    --in: #2ea44f; --in-ink: #ffffff; --out: #e5483c; --out-ink: #ffffff; --bad: #f08a7c; --bad-bg: #3d1712; --ok: #2fb586; --ok-bg: #12382b; --warn: #f0c05a; --warn-bg: #3a2d0c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
[hidden] { display: none !important; }
.app { max-width: 30rem; margin-inline: auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; min-width: 0; }
.logo { height: 64px; width: auto; }
.who { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.today-date { font-size: 1.1rem; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.notice { text-align: center; }
.notice h1 { font-size: 1.2rem; margin: 0 0 6px; }
.notice-open { padding-top: 24px; }
.status { display: flex; flex-direction: column; gap: 6px; }
.pill { align-self: flex-start; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--line); color: var(--muted); }
.pill.in { background: var(--ok-bg); color: var(--ok); }
.pill.done { background: var(--brand); color: var(--brand-ink); }
.sub { color: var(--muted); font-size: .95rem; margin: 0; }
.center { text-align: center; }
.clock { width: 100%; border: 0; border-radius: 14px; padding: 26px 16px; font: 700 1.5rem system-ui, -apple-system, sans-serif; cursor: pointer; background: var(--in); color: var(--in-ink); }
.clock.open { background: var(--brand); color: var(--brand-ink); }
.clock.out { background: var(--out); color: var(--out-ink); }
.clock:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.msg { border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.good { background: var(--ok-bg); color: var(--ok); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 700; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding-block: 10px; border-top: 1px solid var(--line); align-items: baseline; font-size: .92rem; }
.log .pair { white-space: nowrap; }
.log li:first-child { border-top: 0; }
.log .dt { font-weight: 600; min-width: 7.6rem; }
.log .tm { font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; }
.log .tag { font-size: .8rem; font-weight: 700; margin-left: 4px; }
.log .tag.in { color: var(--in); } .log .tag.out { color: var(--out); }
.log .note { color: var(--muted); }
.log[hidden] { display: none; }
.leftpage { text-align: left; }
.pagehead { font-size: 1.3rem; font-weight: 800; margin: 0; }
.forlist { list-style: none; margin: 0; padding: 0; }
.forlist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--line); }
.forlist li:first-child { border-top: 0; }
.forlist a { font-weight: 600; }
.forlist .tm { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.homebtn { display: block; text-align: center; text-decoration: none; border-radius: 14px; padding: 20px 16px; font: 700 1.2rem system-ui, -apple-system, sans-serif; background: var(--brand); color: var(--brand-ink); }
.adminnav { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.adminnav a.on { font-weight: 800; text-decoration: none; color: var(--ink); }
.dayctl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.dayctl input[type=date] { font: inherit; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.dayctl .filter { flex: 1; min-width: 10rem; width: auto; }
.tablewrap { max-width: 100%; overflow-x: auto; }
.daytable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.daytable th, .daytable td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); }
.daytable th { border-top: 0; }
.daytable th button { background: none; border: 0; padding: 0; font: 700 .8rem system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.daytable td.tm { font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; white-space: nowrap; }
.acting { background: #fff4cc; color: #5a4300; border: 1px solid #e6c95c; border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-weight: 600; }
.notice-line { margin: 8px 0 0; text-align: center; font-size: .85rem; color: var(--muted); }
.terms-line { margin: 18px 0 0; text-align: center; font-size: .7rem; }
.terms-line a { color: var(--muted); }
.terms { font-size: .8rem; color: var(--ink); }
.terms p { margin: 0 0 10px; }
.notebtn { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 14px; font: 700 1.05rem system-ui, -apple-system, sans-serif; background: var(--surface); color: var(--ink); cursor: pointer; }
.notebox { display: flex; flex-direction: column; gap: 10px; }
.notebox textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); resize: vertical; }
.logout { width: 100%; border: 2px solid var(--ink); border-radius: 14px; padding: 16px; font: 700 1.1rem system-ui, -apple-system, sans-serif; background: var(--surface); color: var(--ink); cursor: pointer; }
.notice .btn { min-width: 10rem; }
.log .note.shift { color: var(--ink); font-weight: 600; }
.tabs { display: flex; gap: 8px; margin-bottom: 6px; }
.tab { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; font: 700 .95rem system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); cursor: pointer; }
.tab.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.idle { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.idle .box { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 22px; max-width: 22rem; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.idle .n { font-size: 2rem; font-variant-numeric: tabular-nums; }
.idle button, .btn { border: 0; border-radius: 12px; padding: 14px; font: 700 1rem system-ui, -apple-system, sans-serif; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
a { color: var(--brand); }
/* admin page */
.people { list-style: none; margin: 8px 0 0; padding: 0; }
.people li { display: flex; flex-direction: column; gap: 6px; padding-block: 12px; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.person { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.small { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: 600 .85rem system-ui, sans-serif; background: var(--surface); color: var(--ink); cursor: pointer; }
.small.warn { color: var(--bad); }
.linkbox { width: 100%; font: .85rem ui-monospace, Menlo, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.filter { width: 100%; padding: 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
