/* Home Construction site sign-in: shared styles.
   Layout: a navy brand band on top, a single centred column for the phone screens,
   a wider two-level layout for the manager page. */
:root {
  --navy: #0A132E;
  --royal: #20376C;
  --sky: #7EA5EA;
  --pale: #CFDBF5;
  --slate: #415166;
  --silver: #B5BBC4;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --line: #DCE2EC;
  --fg: #0A132E;
  --muted: #4A5770;
  --accent: #20376C;
  --accent-fg: #FFFFFF;
  --good: #1E6B47;
  --good-soft: #E3F3EA;
  --bad: #A3262A;
  --bad-soft: #FBEBEB;
  --warn: #7A5200;
  --warn-soft: #FFF4DC;
  --focus: #3B6FD8;
  --font: "Segoe UI", "Segoe UI Variable Text", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B132B; --card: #111C3A; --line: #27355E; --fg: #E8EDF7; --muted: #A4B0C9;
    --accent: #7EA5EA; --accent-fg: #0A132E; --good: #7FD3A6; --good-soft: #13321F;
    --bad: #F2999C; --bad-soft: #3A1A26; --warn: #F3C46B; --warn-soft: #3A2E12; --focus: #9DBBF0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0B132B; --card: #111C3A; --line: #27355E; --fg: #E8EDF7; --muted: #A4B0C9;
    --accent: #7EA5EA; --accent-fg: #0A132E; --good: #7FD3A6; --good-soft: #13321F;
    --bad: #F2999C; --bad-soft: #3A1A26; --warn: #F3C46B; --warn-soft: #3A2E12; --focus: #9DBBF0;
    color-scheme: dark;
  }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand band */
.band { background: var(--navy); color: #fff; }
.band-inner {
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 16px;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px));
}
.band.wide .band-inner { max-width: 1180px; }
.band img { height: 34px; width: auto; display: block; flex: none; }
.band .titles { display: grid; gap: 1px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,0.2); min-width: 0; }
.band .eyebrow { color: var(--sky); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.band strong { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.band .sub { color: #C9D6F2; font-size: 14px; overflow-wrap: anywhere; }
.band .spacer { flex: 1; }
.band .who { font-size: 13px; color: #C9D6F2; text-align: right; overflow-wrap: anywhere; }
.band .who a { color: #fff; }

/* Phone column */
.column {
  max-width: 560px; margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 16px;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 16px; }
.step { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.card h1 { font-size: 24px; font-weight: 700; }
.card h2 { font-size: 20px; font-weight: 700; }
.lead { color: var(--muted); }

.btn {
  appearance: none; border: 2px solid var(--accent); background: var(--card); color: var(--accent);
  border-radius: 10px; min-height: 52px; padding: 12px 18px; font: 600 17px/1.2 var(--font);
  cursor: pointer; width: 100%; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.link { border-color: transparent; background: transparent; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn.small { width: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; border-width: 1.5px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.busy { opacity: 0.7; pointer-events: none; }
.choice-grid { display: grid; gap: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field .hint { color: var(--muted); font-size: 14px; }
.field input, .field select {
  width: 100%; min-height: 50px; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: 17px/1.3 var(--font); color: var(--fg); background: var(--card); min-width: 0;
}
.field input:focus, .field select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.field.has-error input, .field.has-error select { border-color: var(--bad); }
.field .error { color: var(--bad); font-size: 14px; font-weight: 600; }

.notice { border-radius: 10px; padding: 14px 16px; display: grid; gap: 10px; }
.notice strong { font-size: 17px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); border: 1.5px solid var(--bad); }
.notice.info { background: color-mix(in srgb, var(--pale) 55%, var(--card)); color: var(--fg); border: 1.5px solid var(--sky); }
.notice .actions { display: grid; gap: 8px; }
.notice p { color: var(--fg); }

.ack { border: 1.5px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 10px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.ack ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.tick { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--accent); border-radius: 10px; padding: 14px; cursor: pointer; font-weight: 600; }
.tick input { width: 26px; height: 26px; margin: 0; flex: none; accent-color: var(--accent); }

.done { text-align: center; justify-items: center; }
.done .mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--good-soft); color: var(--good); }
.done .mark.out { background: color-mix(in srgb, var(--pale) 60%, var(--card)); color: var(--accent); }
.done .when { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }

.foot { color: var(--muted); font-size: 14px; text-align: center; display: grid; gap: 4px; padding-bottom: 8px; }
.foot strong { color: var(--fg); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
