/* The crew app in the owners' app's look (Jon, 2026-12-01): the same page colour, white cards with soft corners and
   shadows, capsule switches, rounded big buttons and a quiet header. The colours and fonts were already the same
   (brand-*.css); this sets the shapes. Loaded after app.css, myday.css and the brand file. */
:root {
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px; --radius: var(--r-md);
  --sh-1: 0 1px 2px rgba(24,20,20,.05); --sh-2: 0 8px 24px rgba(24,20,20,.12), 0 1px 3px rgba(24,20,20,.08);
  --glass: color-mix(in srgb, var(--surface) 86%, transparent); --glass-filter: blur(20px) saturate(180%);
  --header-bg: var(--bg); --header-ink: var(--text);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sh-1: 0 1px 2px rgba(0,0,0,.3); --sh-2: 0 8px 24px rgba(0,0,0,.45); } }

/* header: the page colour, the logo, your initials; no charcoal band */
.topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.top { background: none; color: var(--text); padding: calc(10px + env(safe-area-inset-top)) 16px 8px; }
.top picture, .top img { height: 34px; }
.band { display: none; }
.avatar { background: var(--accent); color: var(--accent-ink); font-family: var(--font-body); font-weight: 700; }
.pill { background: var(--surface-2); color: var(--text); font-family: var(--font-body); letter-spacing: .02em; }
.pill.wait { background: var(--accent); color: var(--accent-ink); }

/* the bottom tab bar (Jon, 2026-12-01): Photos · Receipts · My Day, a floating glass pill like the owners' phone tab bar.
   Shown on each page's first screen (and Billing); hidden inside a send (its Send bar is there), with the camera open
   or the keyboard up. */
:root { --tb-h: 64px; --tb-bottom: max(10px, calc(env(safe-area-inset-bottom) - 4px)); }
.tabs.pages { position: fixed; z-index: 15; left: 50%; transform: translateX(-50%); bottom: var(--tb-bottom); width: min(440px, calc(100% - 24px));
  height: var(--tb-h); display: flex; gap: 4px; padding: 5px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 76%, transparent); -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); box-shadow: 0 1px 3px rgba(0,0,0,.10), 0 12px 34px rgba(0,0,0,.18); }
.tabs.pages[hidden], body:not([data-tabbar="yes"]) .tabs.pages, body.cam-open .tabs.pages, body.kb-open .tabs.pages { display: none; }
.tabs.pages button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); padding: 0 6px; cursor: pointer;
  font: 700 12px/1.1 var(--font-body); letter-spacing: 0; text-transform: none; -webkit-tap-highlight-color: transparent; }
.tabs.pages button svg { width: 24px; height: 24px; flex: none; }
.tabs.pages button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs.pages button[aria-current="true"] { color: var(--accent-strong); background: color-mix(in srgb, var(--text) 8%, rgba(255,255,255,.55)); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 4px rgba(0,0,0,.10); }
.tabs.pages button:active { transform: scale(.96); }
.tabs.pages button:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: -3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs.pages button[aria-current="true"] { background: rgba(255,255,255,.10); box-shadow: none; } }
body[data-tabbar="yes"]:not(.cam-open) { padding-bottom: calc(var(--tb-h) + var(--tb-bottom) + 28px); }   /* the last card clears the bar */
body[data-tabbar="yes"]:not(.cam-open):not(.kb-open) .demo-ribbon { bottom: calc(var(--tb-h) + var(--tb-bottom) + 8px) !important; }   /* demo only: sits above the bar */
body[data-tabbar="yes"] .toast { bottom: calc(var(--tb-h) + var(--tb-bottom) + 16px); }

/* the steps of a send (Job · Photos · Voice note): small and quiet */
.steps { background: none; border: 0; margin: 0 16px 4px; gap: 6px; }
.steps button { border: 0; border-radius: var(--r-pill); padding: 8px 4px; font: 600 12px/1.2 var(--font-body); letter-spacing: .02em; text-transform: none; }
.steps button[aria-current="step"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); border: 1px solid var(--border); }
body[data-home="yes"] .steps { display: none; }   /* a page's first screen: the big action says what to do */

/* titles and text */
main { gap: 16px; padding-top: 12px; }
.title { font-size: 24px; margin-top: 6px; }

/* the big buttons: rounded, the main action red with a soft shadow */
.big { border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-height: 60px; font-size: 19px; }
.big.primary { border: 0; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.big.hero { min-height: 76px; font-size: 22px; }
.big.hero svg { width: 30px; height: 30px; }

/* cards: job rows, notes, sends, forms */
.job-row, .note, .batch, .newjob, .install, .mock, .md-job, .md-clock, .md-picker, .md-total { border-radius: var(--r-md); border-width: 1px; box-shadow: var(--sh-1); }
.job-row { min-height: 68px; border: 1px solid var(--border); }
.job-row[aria-current="true"] { border: 2px solid var(--accent-strong); }
.job-row.no-job { border-style: dashed; }
.thumb .pick, .cam-last, .files pre, .note textarea { border-radius: var(--r-sm); }
.login input, .newjob input, .md-other input { border-radius: var(--r-md); border-width: 1px; }
.login input:focus, .newjob input:focus { outline-offset: 1px; }

/* the send bar: glass, the button rounded */
.send-bar { background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.toast { border-radius: var(--r-md); box-shadow: var(--sh-2); }

/* swiping between pages (app/pages.js) */
main { will-change: transform; touch-action: pan-y; }
body.cam-open main { touch-action: auto; }

/* My Day's switches (Today / Yesterday, quick picks) as capsules too; the install banner as a plain card */
.md-seg { gap: 2px !important; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); }
.md-seg button { border: 0 !important; border-radius: var(--r-pill) !important; background: none !important; color: var(--muted) !important; min-height: 42px;
  font: 700 15px/1 var(--font-body) !important; text-transform: none !important; letter-spacing: 0 !important; box-shadow: none !important; }
.md-seg button[aria-checked="true"], .md-seg button[aria-pressed="true"] { background: var(--text) !important; color: var(--surface) !important; box-shadow: var(--sh-1) !important; }
.md-chip { border-radius: var(--r-pill); }
.install { border: 1px solid var(--border); }

/* Time off tab (2026-12-01): the request form as one card */
.md-toform { display: grid; gap: 12px; margin: 0 0 18px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06); }
.md-toform[hidden] { display: none; }
.md-toform .md-two, .md-toform .md-seg, .md-toform .big, .md-toform .label { margin: 0; }
.md-toform .md-types { display: grid; grid-template-columns: repeat(4, 1fr); }
.md-toform .md-types button, .md-toform .md-parts button { padding-left: 4px; padding-right: 4px; }
.md-toform .alt { margin: -4px 0 0; text-align: center; }
.md-toform .alt .link { border: 0; background: none; font-size: 15px; }
[data-screen="timeoff"] .md-tt { margin-top: 14px; }

/* Simplicity pass (Jon, 2026-12-01: "this app is for non-tech people, it should be simple"): no step strip (the
   Send bar says what's next; the back gesture and "Change" go back), one heading per screen. */
.steps { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.md-practice-line { margin: 0 0 4px; }

/* Time off form: From and To side by side, never wider than the card (iOS Safari's date input ignores width alone) */
.md-toform .md-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.md-toform .md-field { min-width: 0; display: grid; gap: 6px; }
.md-toform input[type="date"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; display: block;
  -webkit-appearance: none; appearance: none; min-height: 52px; padding: 0 12px; font-size: 16px; text-align: left; }
.md-toform input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.md-toform input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 4px; }

/* the iPhone install line: the Share icon inline, like Safari shows it */
.share-ic { display: inline-block; vertical-align: -3px; margin: 0 2px; color: #0a84ff; }

/* My sends (2026-12-01): one line per send, newest first */
.my-sends { margin: 22px 0 8px; }
.my-sends .label { margin: 0 0 8px; }
.sends { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }   /* never wider than the phone */
.sends li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); font-size: 15px; min-height: 48px; }
.sends li { min-width: 0; }
.sends li span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }   /* long job IDs wrap, never push the page sideways */
.sends small { color: var(--muted); }
.sends .st { flex: none; font-weight: 700; font-size: 14px; }
.sends .st.ok { color: #1f8a3b; }
.sends .st.wait { color: var(--muted); }
.sends li.bad { cursor: pointer; border-color: var(--accent-strong); }
.sends .st.bad { color: var(--accent-strong); }

/* never sideways scroll on a phone (2026-12-01 bug); clip, not hidden, so the sticky header still works */
html, body { overflow-x: clip; max-width: 100%; }
