/* Steelcap Pro design system.
   Everything is driven by tokens so a company's own accent colour and look slot in without breaking contrast. */

/* ---------- tokens ---------- */
:root, [data-theme="steelcap"] {
  --bg: #0B0E10; --surface: #12171B; --card: #1F262C; --card-2: #262E35; --field: #161B20;
  --text: #E9ECEF; --text-2: #A9B2BA; --text-3: #7D8790; --text-4: #59626A;
  --border: rgba(233,236,239,.08); --border-2: rgba(233,236,239,.14);
  --accent: #00C2B2; --accent-ink: #061513; --accent-text: #2FD3C4; --acc-rgb: 0,194,178;
  --danger: #F06A5B; --danger-text: #F58C80; --success: #5FC48A; --success-text: #7FD3A3; --warning: #E8B04B; --warning-text: #F0C46E;
  --scrim: rgba(4,6,8,.62); --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.28);
  --hero-fade: linear-gradient(180deg, rgba(11,14,16,.25) 0%, rgba(11,14,16,.55) 45%, #0B0E10 100%);
  color-scheme: dark;
}
[data-theme="espresso"] {
  --bg: #120B07; --surface: #180F0A; --card: #22170F; --card-2: #2A1D14; --field: #1A110B;
  --text: #F3EBDF; --text-2: #BFB3A4; --text-3: #8E8273; --text-4: #665B4F;
  --border: rgba(243,235,223,.08); --border-2: rgba(243,235,223,.14);
  --accent: #E3B873; --accent-ink: #1A1006; --accent-text: #EBC68A; --acc-rgb: 227,184,115;
  --hero-fade: linear-gradient(180deg, rgba(18,11,7,.25) 0%, rgba(18,11,7,.55) 45%, #120B07 100%);
}
[data-theme="steel"] {
  --bg: #0E1215; --surface: #13181C; --card: #1C2329; --card-2: #232B32; --field: #151A1F;
  --text: #EEF2F4; --text-2: #B4BEC5; --text-3: #85909A; --text-4: #5E6870;
  --accent: #FF8A3D; --accent-ink: #1A0C03; --accent-text: #FFA266; --acc-rgb: 255,138,61;
  --hero-fade: linear-gradient(180deg, rgba(14,18,21,.25) 0%, rgba(14,18,21,.55) 45%, #0E1215 100%);
}
[data-theme="daylight"] {
  --bg: #F3F4F6; --surface: #FFFFFF; --card: #FFFFFF; --card-2: #F7F8FA; --field: #FFFFFF;
  --text: #15191D; --text-2: #4A535C; --text-3: #6B747D; --text-4: #9AA2AA;
  --border: rgba(21,25,29,.08); --border-2: rgba(21,25,29,.16);
  --accent: #0A7F75; --accent-ink: #FFFFFF; --accent-text: #0A7F75; --acc-rgb: 10,127,117;
  --danger: #C4402F; --danger-text: #B23A2A; --success: #1F8A4C; --success-text: #1B7A43; --warning: #B7791F; --warning-text: #9A6614;
  --scrim: rgba(10,12,14,.45); --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
  --hero-fade: linear-gradient(180deg, rgba(243,244,246,.62) 0%, rgba(243,244,246,.82) 45%, #F3F4F6 100%);
  color-scheme: light;
}
:root {
  --font: Manrope, Inter, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --tap: 48px; --btn: 54px; --field-h: 52px;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  --accent-soft: rgba(var(--acc-rgb), .12); --accent-line: rgba(var(--acc-rgb), .38);
}

/* ---------- base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 500 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--accent-text); }
svg { display: block; flex: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- type ---------- */
.t-display { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.t-title { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; margin: 0; }
.t-h3 { font-size: 17px; line-height: 1.3; font-weight: 700; margin: 0; }
.t-body { font-size: 15px; color: var(--text-2); margin: 0; }
.t-small { font-size: 13px; color: var(--text-3); }
.t-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.t-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.t-num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent-text); }
.muted { color: var(--text-2); }

/* ---------- splash ---------- */
#splash { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); transition: opacity .4s ease, visibility .4s; }
#splash.gone { opacity: 0; visibility: hidden; }
#splash .mark { width: 64px; height: auto; display: block; margin: 0 auto 18px; }
#splash .bar { width: 96px; height: 2px; margin: 22px auto 0; border-radius: 2px; background: var(--border-2); overflow: hidden; }
#splash .bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: load 1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- brand ---------- */
.wordmark { font-weight: 800; letter-spacing: .06em; font-size: 22px; line-height: 1; white-space: nowrap; }
.wordmark b { color: var(--accent-text); font-weight: 800; }
.tagline { font-size: 10px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--text-2); margin-top: 6px; }
.brand-lockup { display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand-lockup .sc-mark { width: 54px; margin-bottom: 14px; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row .sc-mark { width: 30px; }
[data-theme="daylight"] .sc-mark { filter: brightness(.18) saturate(2); }
.co-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.co-brand img { height: 30px; max-width: 128px; object-fit: contain; display: block; }
.co-brand b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-mono { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }

/* ---------- app shell ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--s5) calc(var(--bot) + var(--nav-h) + 28px); }
.view.has-sticky { padding-bottom: calc(var(--bot) + var(--nav-h) + 104px); }
.view.no-nav { padding-bottom: calc(var(--bot) + 28px); }
.view.no-nav.has-sticky { padding-bottom: calc(var(--bot) + 104px); }
.view.flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.wrap { max-width: 560px; margin: 0 auto; width: 100%; }
@media (min-width: 700px) { .view > *, .gate > * { max-width: 560px; margin-left: auto !important; margin-right: auto !important; } }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--s3); min-height: calc(var(--top) + 60px); padding: calc(var(--top) + 8px) 0 8px; margin: 0 calc(-1 * var(--s5)); padding-left: var(--s4); padding-right: var(--s4); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .tb-title { flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .tb-title.left { text-align: left; }
.topbar .tb-side { width: var(--tap); flex: none; display: flex; justify-content: flex-end; }
.topbar.plain { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.icon-btn { width: var(--tap); height: var(--tap); border-radius: var(--r-pill); border: 0; background: transparent; color: var(--text); display: grid; place-items: center; flex: none; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: var(--card); }
.icon-btn.boxed { border: 1px solid var(--border-2); width: 40px; height: 40px; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--card); color: var(--text); font-weight: 800; font-size: 13px; flex: none; display: grid; place-items: center; }

.page-head { padding: calc(var(--top) + 18px) 0 6px; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s3); }
.page-head .sub { margin-top: 4px; }

/* bottom nav */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + var(--bot)); padding: 6px 4px var(--bot);
  background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: saturate(1.3) blur(18px); backdrop-filter: saturate(1.3) blur(18px); border-top: 1px solid var(--border); }
.bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: 0; color: var(--text-3); font-size: 11px; font-weight: 700; min-height: var(--tap); }
.bottom-nav svg { width: 22px; height: 22px; }
.bottom-nav button[aria-current="page"] { color: var(--accent-text); }
.nav-badge { position: absolute; top: 2px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
@media (min-width: 700px) { .bottom-nav { max-width: 560px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }

/* sticky action bar */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--bot)); z-index: 15; padding: 12px var(--s5) 12px; background: linear-gradient(180deg, transparent, var(--bg) 28%); }
.no-nav-mode .sticky-bar { bottom: 0; padding-bottom: calc(var(--bot) + 14px); }
.sticky-bar > * { max-width: 560px; margin: 0 auto; }

/* ---------- cards & surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); }
.card.pad-0 { padding: 0; overflow: hidden; }
.card.accent-card { background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--card); border-color: var(--accent-line); }
.card.danger-card { border-color: rgba(240,106,91,.35); }
.card + .card { margin-top: var(--s3); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row.between { justify-content: space-between; }
.spacer { height: var(--s6); }
.divider { height: 1px; background: var(--border); margin: var(--s4) 0; }

/* section header */
.section { display: flex; justify-content: space-between; align-items: baseline; margin: var(--s8) 0 var(--s3); }
.section h2 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.section .link { font-size: 13px; }

/* metric card */
.metric { display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; min-height: 96px; width: 100%; }
button.metric:active { background: var(--card-2); }
.metric .m-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: 13px; font-weight: 700; }
.metric .m-top svg { width: 18px; height: 18px; color: var(--accent-text); }
.metric .m-val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric .m-val small { font-size: 14px; font-weight: 700; color: var(--text-3); margin-left: 2px; }
.metric .m-sub { font-size: 12px; color: var(--text-3); font-weight: 600; }
.metric.tone-danger .m-val { color: var(--danger-text); }
.metric.tone-accent .m-val { color: var(--accent-text); }

/* task tile (today) */
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 92px; padding: 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); color: var(--text); text-align: left; width: 100%; }
.tile svg { width: 22px; height: 22px; color: var(--text-2); }
.tile b { display: block; font-size: 15px; font-weight: 800; }
.tile small { display: block; font-size: 12px; font-weight: 700; color: var(--warning-text); margin-top: 2px; }
.tile.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile.done svg, .tile.done small { color: var(--accent-ink); }
.tile.done small { opacity: .8; }
.tile:active { transform: scale(.985); }

/* list rows */
.list { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; padding: 12px var(--s4); background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); text-align: left; text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
button.list-row:active, a.list-row:active { background: var(--card-2); }
.list-row .lr-ic { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.list-row .lr-ic svg { width: 20px; height: 20px; }
.list-row .lr-ic.neutral { background: var(--card-2); color: var(--text-2); }
.list-row .lr-ic.danger { background: rgba(240,106,91,.14); color: var(--danger-text); }
.list-row .lr-ic.warn { background: rgba(232,176,75,.14); color: var(--warning-text); }
.list-row .lr-ic.ok { background: rgba(95,196,138,.14); color: var(--success-text); }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-sub { font-size: 13px; color: var(--text-3); font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-sub.wrap { white-space: normal; }
.list-row .lr-end { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; font-weight: 700; flex: none; }
.list-row .chev { width: 18px; height: 18px; color: var(--text-4); }
.list-row img.thumb { width: 52px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card-2); }

/* avatars */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--card-2); color: var(--text); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; border: 1px solid var(--border); }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 15px; }
.avatar.me { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.avatar.grp { background: var(--accent-soft); color: var(--accent-text); }
.avatar.grp svg { width: 20px; height: 20px; }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge.ok { background: rgba(95,196,138,.14); color: var(--success-text); }
.badge.warn { background: rgba(232,176,75,.15); color: var(--warning-text); }
.badge.bad { background: rgba(240,106,91,.15); color: var(--danger-text); }
.badge.info { background: var(--accent-soft); color: var(--accent-text); }
.badge.neutral { background: var(--card-2); color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--btn); padding: 0 22px; border-radius: var(--r-md); border: 1px solid transparent; font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .08s ease, opacity .15s; }
.btn svg { width: 20px; height: 20px; }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.full { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: var(--card); color: var(--text); border-color: var(--border-2); }
.btn.ghost { background: transparent; color: var(--accent-text); height: var(--tap); padding: 0 12px; }
.btn.danger { background: transparent; color: var(--danger-text); border-color: rgba(240,106,91,.4); }
.btn.sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--accent-ink); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn.secondary.loading::after { border-color: var(--text); border-top-color: transparent; }
.btn + .btn { margin-top: var(--s3); }
.btn-row { display: flex; gap: var(--s3); }
.btn-row .btn { flex: 1; margin: 0; }
.link { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 700; font-size: 14px; min-height: 32px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--s4); }
.form-field > label, .form-field > .ff-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.form-field .req { color: var(--danger-text); margin-left: 2px; }
.input, .select, .textarea { width: 100%; height: var(--field-h); padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--field); color: var(--text); font-size: 16px; font-weight: 600; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s; }
.textarea { height: auto; min-height: 112px; padding: 14px 16px; line-height: 1.5; font-weight: 500; resize: vertical; }
.select { padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237D8790' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.select option { background: var(--surface); color: var(--text); }
.input::placeholder, .textarea::placeholder { color: var(--text-4); font-weight: 500; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input[type="date"], .input[type="time"] { color-scheme: inherit; }
.form-field.has-error .input, .form-field.has-error .select, .form-field.has-error .textarea { border-color: var(--danger); }
.ff-error { font-size: 13px; font-weight: 700; color: var(--danger-text); display: flex; gap: 6px; align-items: center; }
.ff-hint { font-size: 12px; color: var(--text-3); font-weight: 600; }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 46px; }
.input-icon .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.form-msg { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--text-2); margin-top: var(--s3); }
.form-msg.bad { color: var(--danger-text); } .form-msg.ok { color: var(--success-text); }

/* segmented control */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--border); }
.segmented button { min-height: 42px; border-radius: 9px; border: 0; background: none; color: var(--text-2); font-weight: 800; font-size: 14px; }
.segmented button[aria-pressed="true"] { background: var(--card-2); color: var(--text); box-shadow: 0 0 0 1px var(--border-2) inset; }
.tabs-line { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin: 0 0 var(--s4); overflow-x: auto; }
.tabs-line button { background: none; border: 0; padding: 12px 0; color: var(--text-3); font-weight: 800; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: var(--tap); }
.tabs-line button[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }

/* radio cards */
.radio-list { display: flex; flex-direction: column; gap: var(--s2); }
.radio-card { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 700; text-align: left; width: 100%; }
.radio-card .rc-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-4); flex: none; display: grid; place-items: center; }
.radio-card[aria-checked="true"] { border-color: var(--accent-line); }
.radio-card[aria-checked="true"] .rc-dot { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.radio-card .rc-dot svg { width: 13px; height: 13px; opacity: 0; }
.radio-card[aria-checked="true"] .rc-dot svg { opacity: 1; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font-weight: 700; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.chip svg { width: 15px; height: 15px; }

/* option picker (trucks) */
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pick { min-height: 52px; border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--field); color: var(--text-2); font-weight: 800; font-size: 15px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pick small { font-size: 11px; font-weight: 700; color: var(--text-3); }
.pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }

/* stepper */
.stepper { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; }
.stepper .st-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.stepper button { width: 42px; height: var(--tap); border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--field); color: var(--text); font-size: 22px; font-weight: 700; display: grid; place-items: center; flex: none; }
.stepper button svg { width: 18px; height: 18px; }
.stepper input { flex: 1; min-width: 0; width: 0; height: var(--tap); text-align: center; border: 0; background: transparent; font-size: 28px; font-weight: 800; letter-spacing: -.02em; outline: none; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* checklist */
.checklist { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.check-row { border-bottom: 1px solid var(--border); padding: 10px 12px 10px 16px; }
.check-row:last-child { border-bottom: 0; }
.check-row .cr-top { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check-row .cr-label { flex: 1; font-size: 15px; font-weight: 700; }
.okdef { display: flex; gap: 6px; flex: none; }
.okdef button { min-width: 72px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--field); color: var(--text-2); font-weight: 800; font-size: 14px; }
.okdef button.ok[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.okdef button.def[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #1a0703; }
.check-row.is-defect { background: rgba(240,106,91,.06); }
.cr-defect { padding: 10px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.cr-defect .input { border-color: rgba(240,106,91,.45); height: 48px; }
.photo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.photo-row img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.photo-add { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px dashed var(--border-2); background: none; color: var(--accent-text); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.photo-add svg { width: 18px; height: 18px; }

/* crew picker */
.people-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px; border-radius: var(--r-pill); border: 1px solid var(--border-2); background: var(--field); color: var(--text-2); font-weight: 700; font-size: 14px; }
.person-chip .avatar { width: 34px; height: 34px; font-size: 11px; }
.person-chip[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.person-chip[aria-pressed="true"] .avatar { background: var(--accent); color: var(--accent-ink); }

/* switch */
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--border-2); transition: background .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--accent-ink); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px var(--s4); border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting .s-main b { display: block; font-size: 15px; font-weight: 700; }
.setting .s-main small { display: block; font-size: 13px; color: var(--text-3); font-weight: 600; margin-top: 2px; }

/* photo capture */
.capture { width: 100%; min-height: 168px; border-radius: var(--r-lg); border: 1.5px dashed var(--accent-line); background: var(--accent-soft); color: var(--accent-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 16px; overflow: hidden; position: relative; padding: 0; }
.capture svg { width: 30px; height: 30px; }
.capture small { color: var(--text-3); font-weight: 600; font-size: 13px; }
.capture img { width: 100%; max-height: 320px; object-fit: contain; display: block; background: #000; }
.capture .cap-tag { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.reading { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--accent-text); margin-top: var(--s3); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; flex: none; }

/* code boxes */
.code-boxes { display: flex; gap: 8px; justify-content: center; }
.code-boxes input { width: 56px; height: 64px; border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--field); text-align: center; font-size: 28px; font-weight: 800; text-transform: uppercase; outline: none; color: var(--text); }
.code-boxes input:focus { border-color: var(--accent); }
.code-display { display: flex; gap: 8px; justify-content: center; }
.code-display span { width: 52px; height: 64px; border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--field); display: grid; place-items: center; font-size: 30px; font-weight: 800; }

/* ---------- empty / skeleton / states ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--text-3); }
.empty .e-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-3); }
.empty .e-ic svg { width: 24px; height: 24px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty p { margin: 0 auto 16px; font-size: 14px; max-width: 280px; }
.skel { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.success-state { text-align: center; padding: 48px 8px 8px; display: flex; flex-direction: column; align-items: center; }
.success-state .ss-ic { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 12px var(--accent-soft); }
.success-state .ss-ic svg { width: 34px; height: 34px; }
.success-state h2 { margin: 28px 0 6px; font-size: 24px; font-weight: 800; }
.success-state p { margin: 0; color: var(--text-2); max-width: 300px; }
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r-md); padding: 12px 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 14px; color: var(--text-2); }
.banner svg { width: 18px; height: 18px; color: var(--accent-text); margin-top: 1px; }
.banner b { color: var(--text); }
.banner.warn { background: rgba(232,176,75,.10); border-color: rgba(232,176,75,.35); }
.banner.warn svg { color: var(--warning-text); }
.offline-pill { position: fixed; left: 50%; top: calc(var(--top) + 8px); transform: translateX(-50%); z-index: 30; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--card-2); border: 1px solid var(--border-2); font-size: 12px; font-weight: 800; color: var(--warning-text); box-shadow: var(--shadow); }
.offline-pill svg { width: 15px; height: 15px; }

/* ---------- sheet & toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .22s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow-y: auto; padding: 10px var(--s5) calc(var(--bot) + 24px); border-radius: 22px 22px 0 0; background: var(--surface); border-top: 1px solid var(--border-2); transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 0 auto 16px; }
.sheet h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.sheet .sh-sub { margin: 0 0 18px; color: var(--text-2); font-size: 15px; }
@media (min-width: 700px) { .sheet { max-width: 560px; margin: 0 auto; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--bot) + var(--nav-h) + 20px); z-index: 60; transform: translate(-50%, 16px); opacity: 0; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; transition: all .22s; pointer-events: none; width: max-content; max-width: calc(100vw - 40px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--accent-text); }
.viewer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.94); display: grid; place-items: center; }
.viewer img { max-width: 100%; max-height: 100%; }
.viewer button { position: absolute; top: calc(var(--top) + 12px); right: 12px; }

/* ---------- gate (signed out / setup) ---------- */
.gate { position: fixed; inset: 0; overflow-y: auto; background: var(--bg); padding: calc(var(--top) + 16px) var(--s5) calc(var(--bot) + 28px); display: flex; flex-direction: column; }
.gate.hero-mode { padding: 0; }
.hero { position: relative; min-height: 46vh; background: var(--hero-img, none) center 35%/cover no-repeat; display: flex; align-items: flex-end; justify-content: center; padding: calc(var(--top) + 24px) 20px 18px; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-fade); }
.hero > * { position: relative; }
.gate-body { padding: 8px var(--s5) calc(var(--bot) + 28px); display: flex; flex-direction: column; flex: 1; }
.gate h1 { font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; margin: 18px 0 10px; }
.gate .lead { margin: 0 0 24px; color: var(--text-2); font-size: 16px; line-height: 1.5; }
.gate .foot { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-3); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-4); font-size: 12px; font-weight: 700; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.progress { display: flex; gap: 6px; margin: 4px 0 14px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--border-2); }
.progress i.on { background: var(--accent); }
.wiz-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin: 0 -8px; }
.look-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.look { border-radius: var(--r-lg); border: 1.5px solid var(--border-2); padding: 10px; background: var(--card); text-align: left; color: var(--text); position: relative; }
.look[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.look .lk-sw { height: 64px; border-radius: 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; padding: 10px; }
.look .lk-sw i { display: block; height: 7px; border-radius: 4px; }
.look b { display: block; margin-top: 8px; font-size: 14px; font-weight: 800; }
.look .lk-check { position: absolute; top: 16px; left: 16px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.look .lk-check svg { width: 13px; height: 13px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--border-2); padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.logo-drop { width: 100%; min-height: 112px; border-radius: var(--r-lg); border: 1.5px dashed var(--border-2); background: var(--field); color: var(--accent-text); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; padding: 12px; }
.logo-drop img { max-height: 84px; max-width: 70%; object-fit: contain; }
.logo-drop svg { width: 22px; height: 22px; }
.truck-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); }
.truck-card + .truck-card { margin-top: 8px; }
.truck-card .tc-img { width: 64px; height: 48px; border-radius: 10px; background: var(--card-2); object-fit: cover; display: grid; place-items: center; color: var(--text-3); flex: none; overflow: hidden; }
.truck-card .tc-img svg { width: 22px; height: 22px; }
.truck-card .tc-main { flex: 1; min-width: 0; }
.truck-card > svg { width: 18px; height: 18px; color: var(--text-4); }
.truck-card .avatar { flex: none; }
.truck-card b { display: block; font-size: 15px; } .truck-card small { color: var(--text-3); font-weight: 600; }

/* ---------- home ---------- */
.home-hero { position: relative; margin: 0 calc(-1 * var(--s5)); padding: calc(var(--top) + 10px) var(--s5) 22px; background: var(--hero-img, none) center 40%/cover no-repeat; }
.home-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-fade); }
.home-hero > * { position: relative; }
.home-hero .hh-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.home-hero .hh-greet { margin-top: 64px; }
.home-hero h1 { margin: 6px 0 4px; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
.pay-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.pay-strip > div { padding: 14px 16px; }
.pay-strip > div + div { border-left: 1px solid var(--border); }
.pay-strip .ps-val { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.pay-strip .ps-val small { font-size: 14px; color: var(--text-3); font-weight: 700; }
.order-card .oc-when { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.order-card h3 { margin: 6px 0 0; font-size: 18px; font-weight: 800; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.kv > div span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.kv > div b { display: block; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.kv .wide { grid-column: 1 / -1; }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.week .wd { font-size: 12px; font-weight: 700; color: var(--text-3); }
.week .wc { margin: 8px auto 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-2); color: var(--text-3); }
.week .wc svg { width: 16px; height: 16px; }
.week .wc.done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.week .wc.today { border-color: var(--accent); color: var(--accent-text); }
.week .wc.future { border-style: dashed; opacity: .6; }
.week .today-l { color: var(--accent-text); }

/* calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.dow, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { font-size: 11px; font-weight: 700; color: var(--text-4); text-align: center; margin-bottom: 6px; }
.cal div { position: relative; height: 58px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding-bottom: 7px; }
.cal .n { font-size: 12px; font-weight: 700; color: var(--text-2); }
.cal .h { font-size: 13px; font-weight: 800; min-height: 16px; font-variant-numeric: tabular-nums; }
.cal .w { background: var(--card); }
.cal .t { box-shadow: 0 0 0 1.5px var(--accent) inset; }
.cal .t .n { color: var(--accent-text); }
.cal .f .n { color: var(--text-4); }
.cal .pay::after { content: "$"; position: absolute; top: 3px; right: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 800; line-height: 15px; text-align: center; }
.cal .cut::before { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--warning) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M20 4L8.1 15.9M14.5 14.5L20 20M8.1 8.1L12 12'/%3E%3C/svg%3E") center/9px no-repeat; }
.legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--text-3); font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 15px; height: 15px; border-radius: 50%; font-style: normal; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.legend .lp { background: var(--accent); color: var(--accent-ink); }
.legend .lc { background: var(--warning); }

/* fuel / day groups */
.day-group + .day-group { margin-top: var(--s5); }
.day-group .dg-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.day-group .dg-head b { letter-spacing: 0; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

/* defects */
.defect-card .dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.defect-card ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.defect-card li { display: flex; gap: 10px; font-size: 15px; }
.defect-card li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; margin-top: 7px; }
.defect-card.fixed li::before { background: var(--success); }
.defect-card.fixed { opacity: .72; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumbs img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; cursor: zoom-in; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------- chat ---------- */
.thread-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 8px) 12px 8px; border-bottom: 1px solid var(--border); background: var(--bg); }
.thread-head .th-main { flex: 1; min-width: 0; }
.thread-head b { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-head small { display: block; font-size: 12px; color: var(--text-3); font-weight: 600; }
.msgs { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 4px; }
.day-sep { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-4); margin: 14px 0 6px; }
.m { display: flex; gap: 8px; align-items: flex-end; max-width: 84%; }
.m.me { align-self: flex-end; flex-direction: row-reverse; }
.m .avatar { width: 28px; height: 28px; font-size: 10px; }
.m .avatar.sp { visibility: hidden; }
.m .col { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m.me .col { align-items: flex-end; }
.m .who { font-size: 11px; font-weight: 700; color: var(--text-3); margin: 6px 0 0 12px; }
.bub { border-radius: 18px; padding: 9px 14px; font-size: 15px; line-height: 1.4; background: var(--card); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.m.me .bub { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.m.me .bub a { color: var(--accent-ink); }
.m .tm { font-size: 10px; color: var(--text-4); font-weight: 600; margin: 0 8px; }
.sending { opacity: .55; }
.media { display: block; max-width: 240px; max-height: 320px; border-radius: 16px; object-fit: cover; background: var(--card); }
video.media { width: 240px; }
.file-att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; max-width: 250px; }
.file-att svg { width: 22px; height: 22px; color: var(--accent-text); }
.file-att b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.file-att small { font-size: 12px; color: var(--text-3); }
.link-card { display: block; width: 240px; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.link-card img { display: block; width: 100%; height: 135px; object-fit: cover; }
.link-card .lc { padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.link-card .lc svg { width: 16px; height: 16px; color: var(--accent-text); }
.link-card .lc small { display: block; font-weight: 600; color: var(--text-3); font-size: 11px; }
.sys-msg { align-self: center; max-width: 92%; margin: 8px 0; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 14px; text-align: center; white-space: pre-wrap; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(var(--bot) + 10px); border-top: 1px solid var(--border); background: var(--bg); }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 11px 16px; border-radius: 22px; border: 1px solid var(--border-2); background: var(--field); font-size: 16px; line-height: 1.35; resize: none; outline: none; }
.composer textarea:focus { border-color: var(--accent); }
.send-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.send-btn svg { width: 18px; height: 18px; }
.send-btn:disabled { opacity: .4; }
.tray { display: flex; gap: 8px; padding: 8px 12px 0; overflow-x: auto; }
.tray div { position: relative; flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--card); display: grid; place-items: center; overflow: hidden; font-size: 10px; color: var(--text-3); text-align: center; }
.tray img, .tray video { width: 100%; height: 100%; object-fit: cover; }
.tray button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; line-height: 22px; padding: 0; }
.unread-dot { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }

/* ai */
.ai-msgs { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ai-q { align-self: flex-end; max-width: 86%; background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 4px 18px; padding: 10px 14px; font-weight: 700; white-space: pre-wrap; }
.ai-a { align-self: flex-start; max-width: 92%; background: var(--card); border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; padding: 12px 14px; line-height: 1.5; white-space: pre-wrap; }
.ai-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--bot)); z-index: 15; padding: 10px var(--s5); display: flex; gap: 8px; background: linear-gradient(180deg, transparent, var(--bg) 30%); }
.ai-bar .input { border-radius: var(--r-pill); background: var(--surface); }
.ai-bar .send-btn { width: var(--field-h); height: var(--field-h); }
@media (min-width: 700px) { .ai-bar, .sticky-bar { max-width: 560px; margin: 0 auto; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.select:has(option[value=""]:checked) { color: var(--text-4); font-weight: 500; }

/* numbered setup steps */
.steps { list-style: none; counter-reset: st; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: st; position: relative; padding: 2px 0 0 40px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--card-2, var(--card)); border: 1px solid var(--border-2); color: var(--text); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.steps li .btn { margin-top: 8px; display: inline-flex; }
