/* Freedom Bath installer app. One light theme on purpose: it's used outdoors and in bright bathrooms,
   and it matches the customer emails and the booking page. Big tap targets for work gloves and wet hands. */
:root {
  --ink: #0F1111;
  --muted: #565959;
  --navy: #0B3A63;
  --blue: #007ECA;
  --red: #B12704;
  --green: #0B7A3E;
  --amber: #8A5A00;
  --rule: #D5D9D9;
  --page: #F3F4F4;
  --paper: #FFFFFF;
  --tint: #EDF3F8;
  --new-bg: #FDECEA;
  --ok-bg: #E6F4EC;
  --wait-bg: #FFF4D6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.4;
  padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
a { color: var(--blue); }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 8px; min-height: 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
.logo { height: 30px; width: auto; display: block; }
.app-name { font-weight: 700; color: var(--navy); font-size: 15px; letter-spacing: .02em; text-transform: uppercase; padding-left: 8px; border-left: 1px solid var(--rule); }
.spacer { flex: 1; }
.icon-btn { width: 48px; height: 48px; border: 0; background: none; color: var(--navy); border-radius: 12px; display: grid; place-items: center; }
.icon-btn:active { background: var(--tint); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { font-size: 14px; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--wait-bg); color: var(--amber); border-top: 1px solid #F0DE8C; }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
h1 { font-size: 24px; line-height: 1.2; margin: 4px 0 4px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 8px; font-weight: 700; }
.sub { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; }
.stack { display: grid; gap: 12px; }

/* buttons and fields */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border-radius: 12px; border: 0;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 18px; padding: 0 16px; text-decoration: none; }
.btn:active { filter: brightness(1.15); }
.btn[disabled] { opacity: .5; }
.btn.big { min-height: 64px; font-size: 20px; }
.btn.alt { background: var(--paper); color: var(--navy); border: 1.5px solid var(--navy); }
.btn.go { background: var(--green); }
.btn.link { background: none; color: var(--blue); min-height: 44px; font-weight: 600; font-size: 16px; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input { width: 100%; min-height: 56px; border: 1.5px solid #8D9096; border-radius: 12px; padding: 0 14px; font-size: 22px; background: #fff; }
.field input:focus { outline: 3px solid #9CC9EA; border-color: var(--blue); }
.field input.code { letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.err { color: var(--red); font-weight: 600; margin: 0; }
.note { color: var(--muted); font-size: 15px; margin: 0; }

/* sign-in */
.signin { max-width: 420px; margin: 24px auto 0; }
.signin .mark { width: 72px; height: 72px; display: block; margin: 0 auto 8px; }
.signin h1 { text-align: center; }
.signin .sub { text-align: center; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.chip.new { background: var(--new-bg); color: var(--red); }
.chip.ok { background: var(--ok-bg); color: var(--green); }
.chip.wait { background: var(--wait-bg); color: var(--amber); }
.chip.done { background: var(--tint); color: var(--navy); }

/* month calendar */
.cal { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 8px 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; }
.cal-head strong { font-size: 18px; }
.cal-nav { width: 44px; height: 44px; border: 0; background: none; color: var(--navy); border-radius: 10px; font-size: 22px; }
.cal-nav:active { background: var(--tint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-day { min-height: 46px; border: 0; background: none; border-radius: 10px; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 6px 0 4px; font-size: 16px; }
.cal-day.out { visibility: hidden; }
.cal-day.weekend { color: #9AA0A6; }
.cal-day.today { font-weight: 800; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.cal-day.picked { background: var(--navy); color: #fff; }
.cal-day.picked .dot { background: #fff !important; }
.cal-day:active { background: var(--tint); }
.dots { display: flex; gap: 3px; height: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }
.dot.new { background: var(--red); }
.dot.done { background: var(--green); }

/* job list */
.day-head { font-weight: 700; margin: 20px 0 8px; color: var(--navy); }
.job { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.job:active { background: var(--tint); }
.job.is-new { border-left: 5px solid var(--red); }
.job .who { font-weight: 700; font-size: 18px; }
.job .what { color: var(--muted); font-size: 15px; grid-column: 1 / -1; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

/* job page */
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--blue); font-weight: 600; text-decoration: none; margin-left: -4px; }
.facts { display: grid; gap: 14px; }
.fact { display: grid; gap: 2px; }
.fact .k { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.fact .v { font-size: 18px; }
.ack { background: var(--new-bg); border: 1.5px solid #F2B8B0; border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.ack p { margin: 0; font-weight: 600; color: var(--red); }
.notes { white-space: pre-wrap; margin: 0; }

/* menu sheet */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(15, 17, 17, .4); display: grid; align-items: end; }
.sheet-in { background: var(--paper); border-radius: 18px 18px 0 0; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; max-width: 640px; width: 100%; margin: 0 auto; }
.sheet-in .who { font-weight: 700; font-size: 18px; }
