:root {
  --brand: #173c36;
  --brand-2: color-mix(in srgb, var(--brand) 84%, #000000);
  --brand-soft: color-mix(in srgb, var(--brand) 7%, #ffffff);
  --brand-line: color-mix(in srgb, var(--brand) 20%, #ffffff);
  --accent: #d8ad64;
  --canvas: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #f3f5f1;
  --ink: #202b28;
  --muted: #54615b;
  --line: #dfe5df;
  --control-line: #829188;
  --success: #1d694a;
  --warning: #855410;
  --danger: #aa3933;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  --font-display: var(--font-body);
  color-scheme: light;
  font-family: var(--font-body);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .upload-dropzone:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100dvh; display: grid; grid-template: 64px 1fr / 224px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 224px; display: flex; flex-direction: column; gap: 28px; padding: 22px 12px 16px; border-right: 1px solid var(--line); background: #f0f2ee; }
.brand-lockup, .mobile-brand { display: flex; align-items: center; gap: 10px; }
.brand-lockup { padding: 0 10px; }
.brand-lockup > div:last-child { display: grid; }
.brand-lockup strong, .mobile-brand strong { font-size: 19px; font-weight: 700; letter-spacing: -.04em; }
.brand-lockup small { color: var(--muted); font-size: 12px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: var(--radius-sm); background: var(--accent); color: #173c36; }
.brand-mark span { margin-top: -3px; font-family: Georgia, serif; font-size: 28px; font-weight: 700; line-height: 1; }
.side-nav { display: grid; gap: 3px; }
.nav-item { min-height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; }
.side-nav .nav-item { display: flex; align-items: center; gap: 12px; padding: 0 12px; color: var(--muted); text-align: left; font-weight: 500; }
.side-nav .nav-item:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.side-nav .nav-item.is-active { background: var(--surface); color: var(--brand-2); font-weight: 650; }
.side-nav .nav-item svg { width: 19px; height: 19px; }
.company-switcher { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 9px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.company-switcher > span:nth-child(2) { min-width: 0; flex: 1; display: grid; }
.company-switcher strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.company-switcher small { color: var(--muted); font-size: 12px; }
.company-switcher > svg { width: 17px; color: var(--muted); }
.company-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--brand-2); font-size: 12px; font-weight: 700; }

.topbar { grid-area: 1 / 2; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 clamp(22px, 3.5vw, 52px); border-bottom: 1px solid var(--line); background: var(--canvas); }
.mobile-brand { display: none; }
.topbar-spacer { flex: 1; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.sync-status:hover { background: var(--surface-2); }
.sync-status svg { width: 18px; height: 18px; color: var(--success); }
.sync-status.is-pending svg { color: var(--warning); }
.sync-status.is-offline svg { color: var(--muted); }
.icon-button, .profile-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.icon-button:hover, .profile-button:hover { background: var(--surface-2); }
.profile-button { color: var(--brand-2); font-size: 13px; font-weight: 700; }
.view-root { grid-area: 2 / 2; width: 100%; max-width: 1400px; min-width: 0; margin: 0 auto; padding: 34px clamp(22px, 3.5vw, 52px) 72px; }
.bottom-nav { display: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 25px; }
.page-header h1 { margin: 1px 0 0; font-size: clamp(28px, 3vw, 36px); font-weight: 650; line-height: 1.15; letter-spacing: -.045em; }
.page-header p { max-width: 560px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.page-enter { animation: page-in .18s ease both; }
@keyframes page-in { from { opacity: .7; transform: translateY(3px); } }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); grid-template-areas: "active summary" "actions attention" "planning ."; gap: 20px; align-items: start; }
.stack { display: grid; gap: 22px; min-width: 0; }
.active-job-card { grid-area: active; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--brand-line); border-radius: var(--radius-lg); background: var(--brand-soft); }
.quick-section { grid-area: actions; }
.timeline-card { grid-area: planning; }
.summary-card { grid-area: summary; }
.attention-card { grid-area: attention; }
.active-job-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.active-job-card .text-button { color: var(--brand-2); }
.job-status { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); font-size: 13px; font-weight: 600; }
.job-status i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--success); }
.active-job-card h2 { max-width: 720px; margin: 22px 0 10px; font-size: clamp(24px, 3vw, 33px); font-weight: 650; line-height: 1.2; letter-spacing: -.04em; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; }
.job-meta span { display: inline-flex; align-items: center; gap: 7px; }
.job-meta svg { width: 17px; height: 17px; }
.timer-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 29px; padding-top: 20px; border-top: 1px solid var(--brand-line); }
.timer-readout span { display: block; color: var(--muted); font-size: 13px; }
.timer-readout strong { display: block; margin-top: 2px; font-size: clamp(28px, 3vw, 34px); font-variant-numeric: tabular-nums; font-weight: 650; line-height: 1.1; letter-spacing: -.03em; }
.timer-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 142px; min-height: 48px; padding: 0 16px; border: 1px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; }
.timer-button:hover, .primary-button:hover { background: var(--brand-2); }
.timer-button:active, .primary-button:active { transform: translateY(1px); }
.timer-button.is-running { border-color: var(--danger); background: var(--surface); color: var(--danger); }
.timer-button .stop-square { width: 11px; height: 11px; border-radius: 2px; background: currentColor; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2, .section-heading h3, .timeline-card > header h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--brand-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button svg { width: 15px; height: 15px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-action { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 68px; padding: 12px; border: 1px solid var(--control-line); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; }
.quick-action:hover, .settings-card:hover, .job-list-card:hover, .favorite-option:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.quick-action:active, .settings-card:active, .job-list-card:active { background: var(--surface-2); }
.quick-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; color: var(--brand-2); }
.quick-icon.accent { color: var(--brand-2); }
.quick-icon svg { width: 21px; height: 21px; }
.quick-action strong { display: block; font-size: 14px; font-weight: 600; }
.quick-action small { display: none; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-card, .attention-card, .inventory-card { padding: 20px; }
.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { min-width: 0; padding: 6px 10px; border-left: 1px solid var(--line); }
.metric:first-child { padding-left: 0; border-left: 0; }
.metric strong { display: block; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.metric span { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }
.attention-list { display: grid; }
.attention-row { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) 18px; align-items: center; gap: 10px; min-height: 58px; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.attention-row:hover { background: var(--surface-2); }
.attention-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-sm); background: #f5ead6; color: var(--warning); font-size: 13px; font-weight: 700; }
.attention-row strong, .attention-row small { display: block; }
.attention-row strong { font-size: 14px; font-weight: 600; }
.attention-row small { color: var(--muted); font-size: 12px; }
.attention-row > svg { width: 17px; color: var(--muted); }
.timeline-card { overflow: hidden; }
.timeline-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; }
.visit-row { width: 100%; display: grid; grid-template-columns: 50px 10px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 70px; padding: 10px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.visit-row:hover { background: var(--surface-2); }
.visit-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.visit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.visit-dot.upcoming { border: 1px solid var(--muted); background: transparent; }
.visit-main { min-width: 0; }
.visit-main strong, .visit-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-main strong { font-size: 14px; font-weight: 600; }
.visit-main small { color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pill.is-muted { background: var(--surface-2); color: var(--muted); }
.status-pill.is-warning { background: #f5ead6; color: var(--warning); }
.status-pill.is-danger { background: #f9e6e3; color: var(--danger); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.search-field { position: relative; min-width: min(230px, 100%); flex: 1; }
.search-field svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search-field input { width: 100%; min-height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 16px; }
.search-field input::placeholder, .form-field input::placeholder, .form-field textarea::placeholder { color: #6b7670; }
.filter-button, .secondary-button, .primary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 15px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; }
.filter-button, .secondary-button { border: 1px solid var(--control-line); background: var(--surface); }
.filter-button:hover, .secondary-button:hover { background: var(--surface-2); }
.primary-button { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.danger-button { border: 1px solid #e8c5c1; background: #fff6f4; color: var(--danger); }
.primary-button svg, .secondary-button svg, .filter-button svg { width: 17px; height: 17px; }
.button-wide { width: 100%; }
.job-list, .material-list { overflow: hidden; display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.job-list-card { width: 100%; display: grid; grid-template-columns: 54px minmax(0,1fr) minmax(130px,auto) 18px; align-items: center; gap: 14px; min-height: 78px; padding: 12px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.job-list-card:first-child, .material-row:first-child { border-top: 0; }
.job-number { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.job-list-main { min-width: 0; }
.job-list-main strong, .job-list-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-list-main strong { font-size: 14px; font-weight: 600; }
.job-list-main span { margin-top: 2px; color: var(--muted); font-size: 13px; }
.job-list-meta { display: grid; justify-items: end; gap: 5px; text-align: right; }
.job-list-meta > span { color: var(--muted); font-size: 12px; }
.job-list-card > svg { width: 17px; color: var(--muted); }
.empty-state { display: grid; justify-items: center; padding: 44px 20px; color: var(--muted); text-align: center; }
.empty-state .quick-icon { margin-bottom: 10px; }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 17px; }
.empty-state p { max-width: 360px; margin: 0 0 16px; font-size: 14px; }
.order-list { display: grid; gap: 10px; }
.order-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; padding: 18px 20px; }
.order-card h3 { margin: 5px 0 2px; font-size: 16px; font-weight: 600; }
.order-card p { margin: 0; color: var(--muted); font-size: 13px; }
.order-card footer { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.order-card aside { min-width: 130px; display: grid; justify-items: end; align-content: center; gap: 4px; }
.order-total { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.03em; }

.planner-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: -4px 0 16px; }
.planner-nav, .planner-resource-actions { display: flex; align-items: center; gap: 6px; }
.planner-nav .secondary-button:first-child, .planner-nav .secondary-button:last-child { width: 44px; padding: 0; }
.planner-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.planner-filter select { min-height: 44px; max-width: 220px; padding: 7px 10px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; }
.planner-resource-actions { margin-left: auto; }
.planner-day-strip { display: none; }
.planner-week { overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.planner-week-head, .planner-week-body { display: grid; grid-template-columns: 52px repeat(7,minmax(0,1fr)); }
.planner-week-head { min-height: 61px; border-bottom: 1px solid var(--line); }
.planner-week-date { display: grid; align-content: center; justify-items: center; gap: 1px; min-width: 0; padding: 6px 2px; border: 0; border-left: 1px solid var(--line); background: var(--surface); text-align: center; cursor: pointer; }
.planner-week-date:hover, .planner-week-date.is-selected { background: var(--brand-soft); }
.planner-week-date strong { font-size: 12px; font-weight: 650; text-transform: capitalize; }
.planner-week-date span { color: var(--muted); font-size: 12px; }
.planner-hour-axis { position: relative; }
.planner-hour-axis span { position: absolute; right: 7px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; transform: translateY(-7px); }
.planner-day-track { position: relative; min-width: 0; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom,var(--line) 1px,transparent 1px); background-size: 100% 60px; }
.planner-day-track.is-today { background-color: var(--brand-soft); }
.planner-event { position: absolute; z-index: 1; display: grid; align-content: start; gap: 2px; overflow: hidden; min-width: 0; padding: 5px 6px; border: 0; border-left: 3px solid var(--brand); border-radius: 4px; background: var(--brand-soft); color: var(--ink); text-align: left; cursor: pointer; }
.planner-event:hover { z-index: 2; background: var(--brand-line); }
.planner-event.is-completed { border-left-color: var(--muted); background: var(--surface-2); }
.planner-event small, .planner-event strong, .planner-event span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planner-event small { font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; }
.planner-event strong { font-size: 12px; font-weight: 650; }
.planner-event span { color: var(--muted); font-size: 11px; }
.planner-day-agenda { display: none; }
.planner-today-orders { padding: 18px 20px; }
.planner-today-orders .section-heading { margin-bottom: 4px; }
.today-orders-list { display: grid; }
.today-order-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto 18px; align-items: center; gap: 12px; min-height: 62px; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.today-order-row:hover { background: var(--brand-soft); }
.today-order-row > span:first-child { display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 0 7px; min-width: 0; }
.today-order-row > span:first-child svg { grid-row: 1 / 3; width: 18px; height: 18px; color: var(--brand-2); }
.today-order-row strong, .today-order-row small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-order-row strong { font-size: 13px; font-weight: 600; }
.today-order-row small { color: var(--muted); font-size: 12px; }
.today-order-row > svg { width: 17px; color: var(--muted); }
.order-planning-section { margin-bottom: 22px; padding: 16px 20px; }
.order-planning-section h2 { margin: 0; font-size: 17px; font-weight: 650; }
.order-stop-list { display: grid; }
.order-stop-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.order-stop-row:hover { background: var(--brand-soft); }
.order-stop-row > span { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 0 7px; min-width: 0; }
.order-stop-row > span svg { grid-row: 1 / 3; width: 18px; height: 18px; color: var(--brand-2); }
.order-stop-row strong, .order-stop-row small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-stop-row strong { font-size: 13px; font-weight: 600; }
.order-stop-row small { color: var(--muted); font-size: 12px; }
.order-stop-row > svg { width: 16px; height: 16px; color: var(--muted); }
.planner-technician-field { display: grid; gap: 3px; margin: 0; padding: 0; border: 0; }
.planner-technician-field legend { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.planner-technician-field label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.planner-technician-field input { width: 18px; height: 18px; accent-color: var(--brand); }
.planner-travel-input { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.planner-travel-input input { min-width: 0; }
.planner-conflict { color: var(--danger) !important; font-weight: 600; }
.customer-list { overflow: hidden; display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.customer-row { width: 100%; display: grid; grid-template-columns: 40px minmax(0,1fr) 18px; align-items: center; gap: 12px; min-height: 76px; padding: 12px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.customer-row:first-child { border-top: 0; }
.customer-row:hover { background: var(--brand-soft); }
.customer-row > span:nth-child(2) { min-width: 0; }
.customer-row strong, .customer-row small { display: block; }
.customer-row strong { font-size: 14px; font-weight: 600; }
.customer-row small { color: var(--muted); font-size: 12px; }
.customer-row > svg { width: 17px; color: var(--muted); }
.customer-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--brand-2); font-weight: 650; }

.back-button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin: -10px 0 12px; padding: 0 4px; border: 0; background: transparent; color: var(--brand-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.back-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-button svg { width: 17px; height: 17px; }
.job-workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.job-workspace-header > div:first-child { min-width: 0; }
.job-workspace-header h1 { max-width: 800px; margin: 8px 0 5px; font-size: clamp(28px,3vw,38px); font-weight: 650; line-height: 1.14; letter-spacing: -.045em; }
.job-workspace-header p { margin: 0; color: var(--muted); font-size: 14px; }
.customer-link { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin-left: -4px; padding: 0 4px; border: 0; background: transparent; color: var(--brand-2); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.customer-link svg { width: 15px; height: 15px; }
.customer-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.order-jobs-section { margin-bottom: 22px; padding: 16px 20px; }
.order-jobs-section .section-heading { margin-bottom: 8px; }
.order-jobs-section h2 { margin: 0; font-size: 17px; font-weight: 650; }
.order-jobs-section h2 span { color: var(--muted); font-size: 13px; }
.order-job-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 8px; }
.order-job-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 66px; padding: 9px 12px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: var(--surface); text-align: left; cursor: pointer; }
.order-job-button:hover { background: var(--surface-2); }
.order-job-button.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.order-job-button > span:first-child { min-width: 0; }
.order-job-button strong, .order-job-button small { display: block; }
.order-job-button strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.order-job-button small { color: var(--muted); font-size: 12px; }
.selected-job-header { align-items: center; margin-bottom: 14px; }
.selected-job-header h2 { margin: 2px 0 3px; font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.job-heading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 600; }
.workspace-timer { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.workspace-timer > span { text-align: right; }
.workspace-timer small, .workspace-timer strong { display: block; }
.workspace-timer small { color: var(--muted); font-size: 12px; font-weight: 500; }
.workspace-timer strong { font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.03em; }
.workspace-action-section { margin-bottom: 20px; }
.workspace-action-section .section-heading { margin-bottom: 9px; }
.workspace-context { color: var(--muted); font-size: 12px; font-weight: 600; }
.workspace-action-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.workspace-action-grid .quick-action { min-height: 72px; }
.workspace-action-grid .quick-action > span:last-child { min-width: 0; }
.workspace-action-grid .quick-action strong, .workspace-action-grid .quick-action small { display: block; }
.workspace-action-grid .quick-action small { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.job-workspace-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(260px,.6fr); gap: 20px; align-items: start; }
.workspace-main { display: grid; gap: 20px; min-width: 0; }
.workspace-card { padding: 20px; }
.workspace-card > .section-heading { align-items: flex-start; }
.workspace-card > .section-heading h2, .job-overview-card .section-heading h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.workspace-card > .section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.registration-group { margin-top: 18px; }
.registration-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--line); }
.registration-heading h3 { margin: 0; font-size: 14px; font-weight: 650; }
.registration-heading h3 span { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.registration-list { display: grid; }
.registration-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 62px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.registration-row > span:nth-child(2) { min-width: 0; }
.registration-row strong, .registration-row small { display: block; }
.registration-row strong { font-size: 13px; font-weight: 600; }
.registration-row small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.registration-row > b { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }
.registration-icon { display: grid; place-items: center; width: 28px; height: 28px; color: var(--brand-2); }
.registration-icon svg { width: 18px; height: 18px; }
.compact-empty { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.work-order-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 4px; }
.work-order-summary > div { min-width: 0; }
.work-order-summary span, .work-order-summary strong, .work-order-summary small { display: block; }
.work-order-summary span { color: var(--muted); font-size: 12px; font-weight: 600; }
.work-order-summary strong { margin-top: 4px; font-size: 14px; font-weight: 600; }
.work-order-summary small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.work-order-summary .primary-button { flex: 0 0 auto; }
.job-overview-card { position: sticky; top: 84px; padding: 20px; }
.overview-block { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.overview-block > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.overview-block strong { font-size: 13px; font-weight: 600; }
.overview-block p { margin: 2px 0 0; font-size: 13px; }
.overview-block a { width: fit-content; min-height: 32px; display: inline-flex; align-items: center; color: var(--brand-2); font-size: 13px; font-weight: 600; }
.materials-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(250px,.65fr); gap: 20px; align-items: start; }
.materials-mobile { display: none; }
.materials-management-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.material-tabs { display: flex; align-items: center; gap: 3px; }
.material-tabs button { min-height: 46px; padding: 8px 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.material-tabs button.is-active { border-bottom-color: var(--brand); color: var(--brand-2); }
.material-tabs button span { margin-left: 5px; color: var(--muted); font-size: 12px; }
.material-catalog { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.catalog-head, .catalog-row { display: grid; grid-template-columns: 42px minmax(140px,1fr) minmax(105px,150px) 85px 16px; align-items: center; gap: 10px; }
.material-catalog.has-stock .catalog-head, .material-catalog.has-stock .catalog-row { grid-template-columns: 42px minmax(140px,1fr) minmax(105px,150px) 85px 86px 16px; }
.catalog-head { min-height: 37px; padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; }
.catalog-head > span:first-child { grid-column: 1 / 3; }
.catalog-row { width: 100%; min-height: 69px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row:hover, .stock-row:hover, .purchase-row:hover { background: var(--brand-soft); }
.catalog-row > svg { width: 16px; color: var(--muted); }
.catalog-product { min-width: 0; }
.catalog-product strong, .catalog-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-product strong { font-size: 13px; font-weight: 650; }
.catalog-product small, .catalog-supplier { color: var(--muted); font-size: 12px; }
.catalog-supplier { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-price { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }
.favorite-star { color: var(--warning); font-size: 13px; }
.stock-pill { width: fit-content; padding: 3px 7px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.stock-pill.is-low { background: #f5ead6; color: var(--warning); }
.inventory-card > p { margin: 2px 0 16px; color: var(--muted); font-size: 13px; }
.inventory-card .button-wide { margin-top: 12px; }
.stock-section, .purchasing-section { padding: 20px; }
.stock-section .section-heading, .purchasing-section .section-heading { margin-bottom: 14px; }
.stock-section .section-heading p, .purchasing-section .section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.stock-section h3 { margin: 25px 0 9px; font-size: 15px; }
.stock-table, .purchase-list { border-top: 1px solid var(--line); }
.stock-row { display: grid; grid-template-columns: 42px minmax(130px,1fr) 92px 92px 78px 65px; align-items: center; gap: 9px; min-height: 64px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.stock-row > span:nth-child(2) { min-width: 0; }
.stock-row strong, .stock-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-row strong { font-size: 13px; font-weight: 600; }
.stock-row small { color: var(--muted); font-size: 12px; }
.stock-row .text-button { justify-content: flex-start; padding: 0; }
.stock-history > div { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.stock-history strong { font-variant-numeric: tabular-nums; }
.stock-history small { color: var(--muted); }
.purchase-row { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto 18px; align-items: center; gap: 14px; min-height: 68px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.purchase-row > span:first-child { display: grid; min-width: 0; }
.purchase-row strong { font-size: 14px; font-weight: 600; }
.purchase-row small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.purchase-row > svg { width: 17px; color: var(--muted); }
.product-detail > .material-thumb { width: 100%; height: 140px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface-2); }
.product-detail > .material-thumb img { object-fit: contain; }
.product-detail-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.product-photo-field { display: grid; grid-template-columns: 84px auto auto; align-items: center; justify-content: start; gap: 8px 12px; }
.product-photo-field > #productPhotoPreview { grid-row: 1 / 3; }
.product-photo-field .material-thumb { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.material-thumb img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.product-photo-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-photo-field small { grid-column: 2 / -1; color: var(--muted); font-size: 12px; }
.product-photo-field label { cursor: pointer; }
.product-favorite { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.product-favorite input { width: 18px; height: 18px; accent-color: var(--brand); }
.purchase-lines { display: grid; gap: 12px; }
.purchase-line { display: grid; grid-template-columns: minmax(150px,1fr) 85px 105px 44px; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.purchase-line .form-field { min-width: 0; }
.material-row { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-height: 70px; padding: 11px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.material-row:is(button):hover { background: var(--brand-soft); }
.material-row:not(button) { cursor: default; }
.material-thumb { display: grid; place-items: center; width: 32px; height: 32px; color: var(--brand-2); }
.material-thumb svg { width: 19px; height: 19px; }
.material-row strong, .material-row small { display: block; }
.material-row strong { font-size: 14px; font-weight: 600; }
.material-row small { color: var(--muted); font-size: 12px; }
.material-price { text-align: right; }
.material-price strong { font-variant-numeric: tabular-nums; }
.inventory-card { position: sticky; top: 84px; }
.inventory-card h3 { margin: 0 0 10px; font-size: 17px; }
.inventory-stat { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.inventory-stat strong { font-variant-numeric: tabular-nums; }
.settings-grid { width: min(100%,820px); overflow: hidden; display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-card { min-height: 78px; display: grid; grid-template-columns: 24px minmax(0,1fr) 18px; grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 14px; padding: 12px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.settings-card:first-child { border-top: 0; }
.settings-card .quick-icon { grid-column: 1; grid-row: 1 / 3; }
.settings-card strong { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 600; }
.settings-card p { grid-column: 2; grid-row: 2; margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.settings-card footer { grid-column: 3; grid-row: 1 / 3; color: var(--muted); }
.settings-card footer span { display: none; }
.settings-card footer svg { width: 17px; height: 17px; }
.version-note { margin-top: 20px; color: var(--muted); font-size: 12px; }

.sheet-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(18,30,26,.5); opacity: 0; transition: opacity .2s ease; }
.sheet-overlay.is-open { opacity: 1; }
.bottom-sheet { position: fixed; z-index: 90; top: 0; right: 0; width: min(470px,100%); height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; background: var(--surface); box-shadow: -12px 0 38px rgba(20,35,29,.16); transform: translateX(100%); transition: transform .24s ease; }
.bottom-sheet.is-open { transform: translateX(0); }
.sheet-grabber { display: none; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.sheet-header h2 { margin: 2px 0 0; font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.sheet-body { overflow: auto; padding: 22px 24px 30px; overscroll-behavior: contain; }
.sheet-footer { display: flex; gap: 10px; padding: 15px 24px max(15px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-footer:empty { display: none; }
.sheet-footer > button { flex: 1; }
.form-stack { display: grid; gap: 18px; }
.form-field { display: grid; gap: 7px; }
.form-field > span, .field-label { color: var(--ink); font-size: 13px; font-weight: 600; }
.form-field small { color: var(--muted); font-size: 12px; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 16px; }
.form-field textarea { min-height: 108px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--brand); }
.form-row, .choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-card { position: relative; display: grid; align-content: center; gap: 4px; min-height: 76px; padding: 12px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card strong { font-size: 14px; font-weight: 600; }
.choice-card small { color: var(--muted); font-size: 12px; }
.favorite-picker { display: grid; gap: 7px; }
.favorite-option { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 64px; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: var(--surface); text-align: left; cursor: pointer; }
.favorite-option.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.favorite-option .material-thumb { width: 30px; height: 30px; }
.favorite-option strong, .favorite-option small { display: block; }
.favorite-option strong { font-size: 13px; font-weight: 600; }
.favorite-option small, .favorite-option > span:last-child { color: var(--muted); font-size: 12px; }
.quantity-stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.quantity-stepper button { width: 44px; height: 44px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); background: var(--surface); font-size: 20px; cursor: pointer; }
.quantity-stepper input { min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.upload-dropzone { display: grid; justify-items: center; min-height: 154px; padding: 25px 18px; border: 1px dashed #9daaa1; border-radius: var(--radius); background: var(--surface-2); text-align: center; cursor: pointer; }
.upload-dropzone .quick-icon { margin-bottom: 8px; }
.upload-dropzone strong { font-size: 14px; }
.upload-dropzone small { max-width: 280px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.upload-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.selected-file { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px; border-radius: var(--radius-sm); background: var(--brand-soft); }
.selected-file strong, .selected-file small { display: block; font-size: 12px; }
.selected-file small { color: var(--muted); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 14px; font-weight: 600; }
.toggle-row small { color: var(--muted); font-size: 12px; }
.toggle { position: relative; width: 44px; height: 26px; flex: 0 0 auto; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: #b3bcb6; transition: background .18s ease; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform .18s ease; }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.detail-hero { margin: -22px -24px 20px; padding: 24px; border-bottom: 1px solid var(--line); background: var(--brand-soft); }
.detail-hero h3 { margin: 13px 0 5px; font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.detail-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.detail-section { margin-top: 22px; }
.detail-section h4 { margin: 0 0 9px; font-size: 14px; font-weight: 650; }
.detail-section > p { margin: 0; color: var(--muted); font-size: 13px; }
.detail-list { border-top: 1px solid var(--line); }
.detail-list-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-list-row > * { min-width: 0; overflow-wrap: anywhere; }
.detail-list-row span { color: var(--muted); }
.detail-list-row strong { text-align: right; font-weight: 600; }
.detail-note { padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-note span { color: var(--muted); font-size: 12px; font-weight: 600; }
.detail-note p { margin: 3px 0 0; font-size: 14px; }
.check-list { display: grid; }
.check-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.check-icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--success); }
.check-icon svg { width: 17px; height: 17px; }
.check-row strong, .check-row small { display: block; }
.check-row strong { font-size: 13px; font-weight: 600; }
.check-row small { color: var(--muted); font-size: 12px; }
.brand-preview { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.brand-preview-head { padding: 17px; background: var(--preview-color,var(--brand)); color: #fff; }
.brand-preview-head strong, .brand-preview-head small { display: block; }
.brand-preview-head small { opacity: .9; font-size: 12px; }
.brand-preview-body { padding: 14px; }
.brand-preview-body span { min-height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--preview-color,var(--brand)); color: #fff; font-size: 13px; font-weight: 600; }
.color-row { display: flex; gap: 10px; }
.color-row input[type="color"] { width: 56px; padding: 5px; }
.color-row input[type="text"] { min-width: 0; flex: 1; }
.field-hint { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.review-reopen { width: 100%; margin-top: 16px; }
.field-group > :not(:first-child) { margin-top: 8px; }
.info-empty { padding: 30px 10px; }

.toast-region { position: fixed; z-index: 120; right: 24px; bottom: 24px; display: grid; gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 11px; min-width: 290px; max-width: 390px; padding: 13px 15px; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: 0 12px 28px rgba(20,35,29,.2); animation: toast-in .2s ease both; pointer-events: auto; }
.toast svg { width: 18px; height: 18px; color: #a6dfbf; }
.toast span { flex: 1; font-size: 13px; }
.toast button { min-height: 32px; padding: 0 4px; border: 0; background: transparent; color: #f0cd8b; font-size: 13px; font-weight: 600; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } }

@media (max-width: 1100px) {
  .catalog-head, .catalog-row { grid-template-columns: 38px minmax(100px,1fr) 78px 16px; gap: 7px; }
  .material-catalog.has-stock .catalog-head, .material-catalog.has-stock .catalog-row { grid-template-columns: 38px minmax(100px,1fr) 78px 75px 16px; gap: 7px; }
  .catalog-head > span:nth-child(2), .catalog-supplier { display: none; }
  .stock-row { grid-template-columns: 36px minmax(110px,1fr) 78px 70px; gap: 6px; }
  .stock-row > small { display: none; }
  .stock-row .text-button { min-height: 34px; font-size: 12px; }
  .stock-row .text-button:last-child { grid-column: 2 / -1; }
  .planner-week { display: none; }
  .planner-day-strip { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; margin-bottom: 18px; }
  .planner-day-choice { display: grid; align-content: center; justify-items: center; gap: 1px; min-width: 0; min-height: 58px; padding: 5px 2px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
  .planner-day-choice.is-selected { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-2); }
  .planner-day-choice.is-today:not(.is-selected) { color: var(--brand-2); }
  .planner-day-choice span { font-size: 11px; font-weight: 600; text-transform: capitalize; }
  .planner-day-choice strong { font-size: 17px; font-variant-numeric: tabular-nums; font-weight: 650; }
  .planner-day-agenda { display: block; margin-bottom: 20px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .planner-day-agenda .section-heading { margin-bottom: 2px; }
  .planner-day-agenda .section-heading h2 { text-transform: capitalize; }
  .planner-day-agenda .section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
  .planner-stop-row { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
  .planner-time { display: grid; align-content: start; padding-top: 5px; font-variant-numeric: tabular-nums; }
  .planner-time strong { font-size: 15px; font-weight: 650; }
  .planner-time small { color: var(--muted); font-size: 12px; }
  .planner-stop-content { min-width: 0; }
  .planner-stop-main { width: 100%; display: grid; gap: 3px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
  .planner-stop-main > strong { font-size: 15px; font-weight: 650; }
  .planner-stop-main > small { color: var(--muted); font-size: 13px; }
  .planner-stop-main > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
  .planner-stop-main > span svg { width: 15px; height: 15px; }
  .planner-stop-content > .text-button { min-height: 36px; margin-top: 4px; }
  .planner-unlinked { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
  .planner-empty { display: grid; gap: 2px; padding: 20px 0 8px; border-top: 1px solid var(--line); }
  .planner-empty strong { font-size: 14px; }
  .planner-empty span { color: var(--muted); font-size: 13px; }
  .today-grid { display: flex; flex-direction: column; gap: 22px; }
  .active-job-card { order: 1; }
  .attention-card { order: 2; }
  .quick-section { order: 3; }
  .timeline-card { order: 4; }
  .summary-card { order: 5; }
  .today-grid > * { width: 100%; }
  .materials-grid { grid-template-columns: 1fr; }
  .inventory-card { position: static; }
  .job-workspace-grid { grid-template-columns: 1fr; }
  .job-overview-card { position: static; }
}

@media (max-width: 760px) {
  .materials-desktop, .materials-desktop-only { display: none; }
  .materials-mobile { display: block; }
  .materials-mobile .search-field { display: block; margin-bottom: 10px; }
  .materials-mobile .field-hint { margin: 0 0 14px; }
  .materials-mobile > .button-wide { margin-top: 14px; }
  .product-photo-field { grid-template-columns: 72px 1fr; }
  .product-photo-field > #productPhotoPreview { grid-row: 1 / 4; }
  .product-photo-field .material-thumb { width: 72px; height: 72px; }
  .product-photo-field small { grid-column: 2; }
  .purchase-line { grid-template-columns: minmax(0,1fr) 80px 44px; }
  .purchase-line .form-field:first-child { grid-column: 1 / -1; }
  .purchase-line .form-field:nth-child(3) { grid-column: 1; }
  .purchase-line .icon-button { grid-column: 3; grid-row: 2 / 4; align-self: end; }
  .planner-toolbar { gap: 8px 12px; }
  .planner-filter { width: 100%; justify-content: space-between; }
  .planner-filter select { flex: 1; max-width: none; }
  .planner-resource-actions { width: 100%; justify-content: space-between; margin-left: 0; }
  .planner-resource-actions .text-button { padding: 0; }
  .planner-day-agenda, .planner-today-orders, .order-planning-section { padding: 14px 16px; }
  .today-order-row { grid-template-columns: minmax(0,1fr) 18px; }
  .today-order-row .status-pill { display: none; }
  .app-shell { display: block; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .topbar { height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; }
  .mobile-brand { display: flex; }
  .mobile-brand .brand-mark { width: 32px; height: 32px; }
  .mobile-brand .brand-mark span { font-size: 25px; }
  .mobile-brand strong { font-size: 18px; }
  .topbar .sync-status { width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  .topbar .sync-status span { display: none; }
  .view-root { min-height: calc(100dvh - 124px); padding: 24px 16px 30px; }
  .bottom-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); min-height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--surface); }
  .bottom-nav .nav-item { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 56px; padding: 2px; color: var(--muted); }
  .bottom-nav .nav-item svg { width: 20px; height: 20px; }
  .bottom-nav .nav-item span { font-size: 12px; font-weight: 500; }
  .bottom-nav .nav-item.is-active { color: var(--brand-2); font-weight: 600; }
  .bottom-nav .nav-item.is-active span { font-weight: 650; }
  .page-header { align-items: flex-start; margin-bottom: 20px; }
  .page-header h1 { font-size: 29px; }
  .page-header p { font-size: 14px; }
  .page-header > .primary-button { margin-top: 2px; }
  .active-job-card { padding: 20px; }
  .active-job-card h2 { margin-top: 19px; font-size: 25px; }
  .job-meta { display: grid; gap: 5px; font-size: 13px; }
  .timer-panel { margin-top: 20px; }
  .quick-grid { gap: 7px; }
  .quick-action { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 78px; padding: 8px 2px; text-align: center; }
  .quick-action strong { font-size: 12px; }
  .summary-card, .attention-card { padding: 18px; }
  .visit-row { grid-template-columns: 44px 8px minmax(0,1fr); padding: 10px 14px; }
  .visit-row .status-pill { display: none; }
  .job-list-card { grid-template-columns: 48px minmax(0,1fr) 18px; gap: 10px; padding: 12px; }
  .job-list-meta { display: none; }
  .order-card { grid-template-columns: 1fr; gap: 10px; }
  .order-card aside { display: flex; justify-content: space-between; align-items: center; justify-items: stretch; flex-wrap: wrap; }
  .job-workspace-header { align-items: stretch; flex-direction: column; gap: 16px; }
  .job-workspace-header > .primary-button { width: 100%; }
  .workspace-timer { justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
  .workspace-timer > span { text-align: left; }
  .workspace-action-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-action-grid .quick-action { display: flex; justify-items: start; min-height: 68px; padding: 10px; text-align: left; }
  .order-jobs-section { padding: 14px 16px; }
  .order-job-list { grid-template-columns: 1fr; }
  .workspace-card, .job-overview-card { padding: 16px; }
  .work-order-summary { align-items: stretch; flex-direction: column; }
  .work-order-summary .primary-button { width: 100%; }
  .material-row { grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; padding: 10px 12px; }
  .material-row > .status-pill { display: none; }
  .settings-card { min-height: 78px; padding: 12px; }
  .bottom-sheet { top: auto; bottom: 0; width: 100%; height: min(88dvh,760px); border-radius: var(--radius-lg) var(--radius-lg) 0 0; transform: translateY(100%); }
  .bottom-sheet.is-open { transform: translateY(0); }
  .sheet-grabber { display: block; width: 36px; height: 4px; margin: 10px auto 0; border-radius: 99px; background: #abb5ad; }
  .sheet-header { padding: 12px 18px 15px; }
  .sheet-body { padding: 18px 18px 28px; }
  .sheet-footer { padding: 13px 18px max(13px,env(safe-area-inset-bottom)); }
  .detail-hero { margin: -18px -18px 20px; padding: 20px 18px; }
  .toast-region { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; max-width: none; width: 100%; }
}

@media (max-width: 380px) {
  .planner-travel-input { grid-template-columns: 1fr; }
  .planner-stop-row { grid-template-columns: 48px minmax(0,1fr); gap: 8px; }
  .view-root { padding-inline: 12px; }
  .timer-panel { align-items: stretch; flex-direction: column; }
  .timer-button { width: 100%; }
  .quick-grid { gap: 5px; }
  .quick-action strong { font-size: 12px; }
  .favorite-option { grid-template-columns: 30px minmax(0,1fr); }
  .favorite-option > span:last-child { grid-column: 2; }
  .choice-grid, .form-row { grid-template-columns: 1fr; }
  .metric { padding-inline: 6px; }
  .metric strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; color: #202b28; }
  .app-shell, .sheet-overlay, .sheet-grabber, .sheet-header .icon-button, .sheet-footer, .toast-region { display: none !important; }
  .bottom-sheet { position: static; width: 100%; height: auto; display: block; box-shadow: none; transform: none; }
  .sheet-header { padding: 0 0 18px; }
  .sheet-body { overflow: visible; padding: 20px 0 0; }
  .detail-hero { margin: 0 0 20px; padding: 20px; print-color-adjust: exact; }
}
