:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #1d2939;
  background: #f2f5fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #182b49;
  --blue: #3156d8;
  --blue-dark: #223fb0;
  --line: #e0e6f0;
  --muted: #63718a;
  --teal: #12a89a;
  --violet: #7357dc;
  --amber: #e59a34;
  --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 750; letter-spacing: -.02em; }
.brand small { display: block; color: #8290a4; font-size: 9px; letter-spacing: .15em; margin-top: 2px; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; background: linear-gradient(145deg, var(--blue), var(--violet)); color: #fff; border-radius: 12px; font-size: 13px; box-shadow: 0 5px 12px #3156d83b; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.connection-state { color: var(--muted); font-size: 12px; }
.mode-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: #f1f4f8; border: 1px solid var(--line); border-radius: 9px; }
.mode-option { padding: 8px 11px; color: #637187; background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mode-option[aria-pressed="true"] { color: var(--ink); background: #fff; border-color: #e3e8ef; box-shadow: 0 1px 2px #182b4910; }
.demo-mode .mode-option[aria-pressed="true"] { color: #795611; }
.shell { max-width: 1180px; padding: 42px 24px 70px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 26px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; color: var(--ink); font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; color: var(--ink); font-size: 20px; letter-spacing: -.02em; }
.page-heading p { margin-bottom: 0; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .17em; margin-bottom: 9px; }
.muted { color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 9px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: #43536b; font-size: 12px; white-space: nowrap; }
.user-dot { width: 8px; height: 8px; background: #25a56a; border-radius: 50%; }
.demo-mode .user-dot { background: #c58a19; }

.notice { padding: 14px 17px; border-radius: 10px; font-size: 13px; line-height: 1.55; margin: 18px 0; }
.notice-info { color: #31517d; background: #eaf2ff; border: 1px solid #d6e5fb; }
.notice-warning { color: #76551c; background: #fff8e9; border: 1px solid #f3e4bf; }
.notice-demo { color: #62420c; background: #fff3d6; border: 1px solid #f1d590; }
.notice-demo strong { display: block; margin-bottom: 3px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 29px 0 17px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 2px solid transparent; color: #8290a4; background: transparent; padding: 13px 18px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.tab span { margin-left: 7px; color: #46556a; font-size: 13px; }
.tab.active { border-color: var(--blue); color: var(--blue); }
.tab.active span { color: var(--ink); }
.tab-panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tab-panel { padding: 27px; min-height: 310px; box-shadow: 0 3px 12px #172b4908; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.search-row { display: flex; gap: 13px; align-items: flex-end; max-width: 720px; }
.field-grow { flex: 1; }
label { display: block; font-size: 12px; font-weight: 700; color: #41516a; margin-bottom: 8px; }
input, textarea, select { width: 100%; color: #26364d; background: #fff; border: 1px solid #d6deea; border-radius: 8px; outline: none; padding: 12px 13px; }
input:focus, textarea:focus, select:focus { border-color: #6993d6; box-shadow: 0 0 0 3px #2557a71c; }
input::placeholder { color: #a0aabb; }
textarea { resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.5; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 11px 17px; font-size: 12px; font-weight: 750; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--blue); }
.button-primary:hover { background: var(--blue-dark); }
.button-quiet { color: #596b84; background: #fff; border-color: var(--line); }
.button-wide { width: 100%; margin-top: 8px; }
.form-message { min-height: 19px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.form-message.error { color: #b42318; }
.form-message.success { color: #14764c; }
.helper { font-size: 12px; margin: 13px 0 0; }
.form-grid { display: grid; grid-template-columns: minmax(180px, .45fr) 1fr; gap: 18px; align-items: start; }
.field-full { grid-column: 1 / -1; }
.field-help { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 7px; }
.work-items-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.work-items-heading label { margin-bottom: 0; }
.work-items { display: grid; gap: 10px; }
.work-item-row { display: grid; grid-template-columns: 1fr .75fr 1.6fr .65fr .75fr 32px; align-items: end; gap: 9px; padding: 13px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.work-item-row label { font-size: 10px; }
.work-item-row input { padding: 10px; font-size: 12px; }
.icon-button { width: 32px; height: 38px; color: #728097; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 18px; }
.icon-button:disabled { cursor: not-allowed; opacity: .35; }
.dealer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dealer-card { padding: 15px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; }
.dealer-card h3 { color: var(--ink); font-size: 14px; margin: 0 0 9px; }
.dealer-card p { color: var(--muted); font-size: 12px; margin: 0 0 5px; }
.dealer-card button { margin-top: 9px; padding: 7px 10px; font-size: 11px; }
.result-card { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.result-card h3 { margin: 0 0 13px; color: var(--ink); font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-grid .result-card { margin-top: 0; }
.service-detail { color: #43536b; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.vehicle-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.data-cell { padding: 11px; background: white; border: 1px solid #e9edf3; border-radius: 8px; }
.data-cell span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.data-cell strong { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.result-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.result-table th, .result-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.result-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.result-table td { color: #34445a; }
.availability-filters { display: grid; grid-template-columns: 170px 170px minmax(200px, 1fr); gap: 12px; margin-top: 23px; }
.availability-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 17px 0 20px; }
.availability-summary > div { padding: 13px; background: #f4f7fb; border: 1px solid #e8edf5; border-radius: 9px; }
.availability-summary strong { display: block; color: var(--ink); font-size: 20px; }
.availability-summary span { color: var(--muted); font-size: 10px; }
.availability-day { margin-top: 14px; padding: 18px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 11px; }
.availability-day[hidden] { display: none; }
.availability-day h3 { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 13px; color: var(--ink); font-size: 15px; }
.availability-day h3 span { color: var(--muted); font-size: 11px; font-weight: 500; }
.slot-group { margin-top: 13px; }
.slot-group h4 { margin: 0 0 7px; color: #43536b; font-size: 11px; }
.slot-list { display: flex; flex-wrap: wrap; gap: 7px; }
.slot-chip { padding: 7px 10px; color: #285784; background: #eef5ff; border: 1px solid #d9e7f8; border-radius: 7px; font-size: 11px; }
button.slot-chip { cursor: pointer; }
button.slot-chip:hover, button.slot-chip.selected { color: #fff; background: var(--blue); border-color: var(--blue); }
.confirm-date:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.confirmation-result { margin-top: 13px; color: #14764c; font-size: 12px; }
.roadmap { display: flex; gap: 15px; align-items: flex-start; margin-top: 20px; padding: 19px; }
.roadmap h2 { font-size: 14px; margin: 0 0 7px; }
.roadmap p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.roadmap-icon { flex: 0 0 27px; height: 27px; display: grid; place-items: center; color: var(--blue); background: #eaf2ff; border-radius: 50%; font-size: 13px; font-weight: 800; }
.booking-context { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.booking-context-item { min-width: 0; padding: 13px; background: #f5f8fc; border: 1px solid var(--line); border-radius: 9px; }
.booking-context-item span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.booking-context-item strong { display: block; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.status-pill { display: inline-flex; align-items: center; padding: 8px 11px; border-radius: 99px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-pending { color: #795611; background: #fff5dd; }
.status-ready { color: #126b46; background: #e5f6ed; }
.booking-options { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr); align-items: end; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; margin: 0; }
.check-row input { width: auto; accent-color: var(--blue); }
.check-row span { color: #41516a; font-size: 12px; font-weight: 650; }
.booking-submit-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.booking-submit-row .form-message { margin: 0; }
.button:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.continue-booking { margin-top: 10px; }

.login-layout { min-height: 65vh; display: grid; grid-template-columns: 1fr minmax(320px, 410px); align-items: center; gap: 70px; }
.public-availability-panel { min-height: 78vh; }
.public-view-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.public-frame-shell { position: relative; overflow: hidden; min-height: 76vh; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px #273c6712; }
.public-frame-shell iframe { display: block; width: 100%; height: max(76vh, 760px); border: 0; background: #fff; }
.frame-loading { position: absolute; z-index: 2; top: 18px; left: 50%; width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 10px 15px; transform: translateX(-50%); color: #2843a6; background: #eef2ffed; border: 1px solid #d8e0ff; border-radius: 999px; box-shadow: 0 5px 18px #182b4915; font-size: 12px; font-weight: 700; text-align: center; }
.custom-availability-panel { min-height: 78vh; }
.custom-region-tabs { display: flex; gap: 7px; overflow-x: auto; margin: 23px 0 14px; padding: 5px; background: linear-gradient(110deg, #e9edff, #e6f8f5); border: 1px solid #e0e6ef; border-radius: 12px; }
.region-tab { flex: 0 0 auto; padding: 9px 14px; color: #617189; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.region-tab:hover { color: var(--ink); background: #ffffffa6; }
.region-tab.active { color: #fff; background: linear-gradient(120deg, var(--blue), var(--violet)); box-shadow: 0 4px 11px #3156d84a; }
.custom-availability-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 18px; }
.custom-availability-summary .summary-card { position: relative; min-height: 104px; padding: 16px 18px; overflow: hidden; background: linear-gradient(135deg, #fff 35%, #eef2ff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 17px #273c6710; }
.custom-availability-summary .summary-card:nth-child(2) { background: linear-gradient(135deg, #fff 35%, #e7f8f3); }
.custom-availability-summary .summary-card:nth-child(3) { background: linear-gradient(135deg, #fff 35%, #fff3e4); }
.custom-availability-summary .summary-card::after { position: absolute; right: -18px; bottom: -32px; width: 100px; height: 100px; content: ""; background: #cbd5ff; border-radius: 50%; opacity: .55; }
.custom-availability-summary .summary-card:nth-child(2)::after { background: #b9eee0; }
.custom-availability-summary .summary-card:nth-child(3)::after { background: #ffddb1; }
.custom-availability-summary .summary-card span, .custom-availability-summary .summary-card small { position: relative; z-index: 1; display: block; color: var(--muted); font-size: 10px; }
.custom-availability-summary .summary-card strong { position: relative; z-index: 1; display: block; margin: 5px 0 2px; color: var(--ink); font-size: 25px; letter-spacing: -.03em; }
.custom-availability-summary .summary-card:last-child strong { font-size: 20px; }
.snapshot-freshness { display: flex; align-items: center; gap: 12px; margin: 13px 0 0; padding: 12px 16px; color: #1c3d75; background: linear-gradient(110deg, #eaf1ff, #f1f5ff); border: 1px solid #cbd9ff; border-radius: 11px; }
.snapshot-freshness-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--blue); border-radius: 10px; font-size: 19px; font-weight: 700; }
.snapshot-freshness-label, .snapshot-freshness strong, .snapshot-freshness small { display: block; }
.snapshot-freshness-label { color: #596b8e; font-size: 10px; font-weight: 750; }
.snapshot-freshness strong { margin-top: 2px; color: #1e3470; font-size: 15px; }
.snapshot-freshness small { margin-top: 3px; color: #657594; font-size: 10px; line-height: 1.4; }
.snapshot-freshness-note.is-error { color: #a32335; font-weight: 650; }
.custom-availability-filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr)); gap: 12px; align-items: end; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.custom-availability-filters label { font-size: 11px; }
.custom-availability-filters input, .custom-availability-filters select { padding: 11px 12px; font-size: 12px; }
.date-filter-label { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.date-filter-label label { margin: 0; }
.filter-help-wrap { position: relative; display: inline-flex; }
.filter-help-trigger { display: grid; width: 16px; height: 16px; padding: 0; place-items: center; color: #667795; background: #f1f4fa; border: 1px solid #d9e0eb; border-radius: 50%; font: inherit; font-size: 10px; font-weight: 750; cursor: help; }
.filter-help-trigger:hover, .filter-help-trigger:focus-visible { color: #fff; background: var(--blue); border-color: var(--blue); outline: none; }
.filter-help-tooltip { position: absolute; z-index: 5; bottom: calc(100% + 9px); left: 50%; width: 240px; padding: 10px 12px; transform: translate(-50%, 4px); color: #fff; background: #1e2d49; border-radius: 8px; box-shadow: 0 6px 18px #17223b30; font-size: 11px; font-weight: 450; line-height: 1.5; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.filter-help-tooltip::after { position: absolute; top: 100%; left: calc(50% - 5px); width: 10px; height: 10px; content: ""; transform: rotate(45deg) translate(-3px, -3px); background: #1e2d49; }
.filter-help-trigger:hover + .filter-help-tooltip, .filter-help-trigger:focus-visible + .filter-help-tooltip { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; visibility: visible; }
.custom-week-planner { margin-top: 14px; padding: 16px; background: linear-gradient(135deg, #fff, #f1f5ff); border: 1px solid var(--line); border-radius: 12px; }
.custom-week-heading { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; margin-bottom: 13px; }
.custom-week-heading h2 { margin: 0 0 3px; font-size: 15px; }
.custom-week-heading p { margin: 0; font-size: 10px; line-height: 1.5; }
.custom-week-heading .button { min-width: 40px; padding: 8px 12px; font-size: 15px; }
.custom-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.week-day { display: flex; min-height: 103px; flex-direction: column; align-items: flex-start; gap: 5px; padding: 9px; color: var(--ink); text-align: left; background: #fff; border: 1px solid #e1e7f0; border-radius: 9px; cursor: pointer; }
.week-day:hover { border-color: #9badef; background: #f8f9ff; }
.week-day.active { background: #e9eeff; border-color: #aabaf5; box-shadow: inset 0 0 0 1px #c4d0ff; }
.week-day-name { color: var(--blue); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.week-day > strong { font-size: 12px; }
.week-day-count { color: #354765; font-size: 9px; font-weight: 750; }
.week-day-workshops { color: #718096; font-size: 8px; line-height: 1.4; }
.custom-results-count { margin: 17px 2px 9px; color: var(--muted); font-size: 12px; }
.custom-dealer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.custom-dealer-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 16px #172b4909; transition: border-color .16s, box-shadow .16s, transform .16s; }
.custom-dealer-card:hover { border-color: #c8d8ee; box-shadow: 0 8px 24px #172b4914; transform: translateY(-1px); }
.custom-dealer-card-header { display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 15px 17px; border-bottom: 1px solid #edf0f4; }
.dealer-index { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; color: var(--blue); background: linear-gradient(145deg, #e9edff, #dce4ff); border-radius: 11px; font-size: 11px; font-weight: 800; }
.custom-dealer-heading { flex: 1; min-width: 0; }
.custom-dealer-heading h2 { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.custom-dealer-region { margin: 0 0 3px; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.dealer-freshness { display: inline-flex; align-items: center; gap: 6px; color: #66758d; font-size: 9px; line-height: 1.45; white-space: nowrap; }
.dealer-freshness-dot { flex: 0 0 6px; width: 6px; height: 6px; background: #7387aa; border-radius: 50%; }
.dealer-availability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.slot-option { position: relative; display: flex; min-height: 112px; flex-direction: column; align-items: flex-start; padding: 12px; color: var(--ink); text-align: left; background: linear-gradient(155deg, #f4fffc, #e8f8f3); border: 1px solid #c8ebdf; border-radius: 10px; }
button.slot-option { cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
button.slot-option:hover { background: #dcf7ed; border-color: #80d0b0; transform: translateY(-2px); }
.slot-type { margin-bottom: 13px; color: #63748c; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.slot-option strong { color: #11724a; font-size: 17px; letter-spacing: -.02em; }
.slot-option small { margin-top: 4px; color: #51816a; font-size: 9px; }
.slot-option-action { display: flex; width: 100%; justify-content: space-between; margin-top: auto; padding-top: 10px; color: #267250; font-size: 9px; font-weight: 750; }
.slot-option-none { color: #922d37; background: linear-gradient(145deg, #fff5f4, #ffe8e6); border-color: #f0b8b8; }
.slot-option-none .slot-type { color: #a7464f; }
.slot-option-none strong { color: #a12e3b; font-size: 12px; }
.slot-option-none small { color: #a85b61; font-size: 9px; }
.slot-option-past { background: #fff8ed; border-color: #f1ddba; }
.slot-option-past strong { color: #996111; }
.slot-option-past small, .slot-option-past .slot-option-action { color: #956a26; }
.slot-option-date-match { background: linear-gradient(150deg, #edf3ff, #e4ecff); border-color: #aabdf8; box-shadow: inset 0 0 0 1px #c6d2ff; }
.slot-option-date-match strong { color: #2949bd; }
.slot-option-date-match small, .slot-option-date-match .slot-option-action { color: #405cb9; }
.slot-option-group { overflow: hidden; background: linear-gradient(155deg, #f4fffc, #e8f8f3); border: 1px solid #c8ebdf; border-radius: 10px; }
.slot-option-group .slot-option { width: 100%; min-height: 0; padding-bottom: 8px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.slot-option-group .slot-option:hover { background: #dcf7ed; transform: none; }
.slot-option-group.slot-option-past { background: #fff8ed; border-color: #f1ddba; }
.slot-option-group.slot-option-date-match { background: linear-gradient(150deg, #edf3ff, #e4ecff); border-color: #aabdf8; }
.slot-option-group .slot-option-date-match { background: transparent; }
.slot-schedule-preview { display: grid; gap: 7px; margin: 0 10px 10px; padding-top: 8px; border-top: 1px solid #cfdfd9; }
.slot-schedule-daily { color: #54657a; font-size: 9px; line-height: 1.5; }
.slot-schedule-daily strong { color: #354765; font-size: 11px; }
.slot-schedule-daily small { display: block; color: #78869a; font-size: 8px; }
.slot-advisor { display: grid; gap: 4px; }
.slot-advisor > strong { color: #354765; font-size: 9px; }
.slot-time-list { display: flex; flex-wrap: wrap; gap: 4px; }
.slot-time-list span { padding: 3px 5px; color: #12624c; background: #fff; border: 1px solid #cce7db; border-radius: 5px; font-size: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot-snapshot-source { color: #6b7787; font-size: 8px; line-height: 1.45; }
.custom-empty-state { padding: 30px 18px; color: var(--muted); text-align: center; font-size: 13px; }
.custom-detail-dialog { width: min(960px, calc(100vw - 32px)); max-width: 960px; max-height: min(92vh, 900px); padding: 22px; overflow: auto; color: var(--ink); background: #f5f7fa; border: 1px solid #dfe5ed; border-radius: 16px; box-shadow: 0 24px 80px #10233a3d; }
.custom-detail-dialog::backdrop { background: #10233a8c; backdrop-filter: blur(3px); }
.custom-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.custom-detail-header h2 { margin-bottom: 6px; font-size: 23px; }
.custom-detail-header .muted { margin: 0; font-size: 12px; }
.custom-detail-header .eyebrow { margin-bottom: 6px; }
.custom-detail-note { margin: 16px 0 11px; padding: 10px 12px; color: #31517d; background: #eaf2ff; border: 1px solid #d6e5fb; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.custom-detail-frame-shell { position: relative; overflow: hidden; min-height: 370px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.custom-detail-frame-shell iframe { display: block; width: 100%; height: min(58vh, 540px); min-height: 370px; border: 0; background: #fff; }
.custom-detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 12px; }
.custom-detail-actions a { text-decoration: none; }
.custom-detail-snapshot { min-height: 260px; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.custom-detail-timeout { margin: 0; padding: 20px; color: #7a4d10; background: #fff8e8; border: 1px solid #f0d9a8; border-radius: 10px; font-size: 12px; line-height: 1.6; text-align: center; }
.snapshot-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #edf0f4; }
.snapshot-detail-heading span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.snapshot-detail-heading strong { color: var(--ink); font-size: 14px; }
.snapshot-daily-time { margin: 13px 0; color: #40536d; font-size: 12px; }
.snapshot-daily-time strong { color: var(--ink); }
.snapshot-daily-time span { color: var(--muted); }
.snapshot-advisors { display: grid; gap: 9px; }
.snapshot-advisor { padding: 12px; background: #f7f9fc; border: 1px solid #e6ebf2; border-radius: 9px; }
.snapshot-advisor h3 { margin: 0 0 9px; font-size: 12px; }
.snapshot-slot-list { display: flex; flex-wrap: wrap; gap: 6px; }
.snapshot-slot-list span { padding: 5px 8px; color: #17634c; background: #e8f7f0; border: 1px solid #ccebdd; border-radius: 999px; font-size: 10px; font-weight: 750; }
.snapshot-disclaimer { margin: 13px 0 0; color: #78602c; font-size: 10px; line-height: 1.5; }
.login-copy #back-to-public-view { margin-top: 14px; }
.login-copy h1 { max-width: 570px; font-size: clamp(36px, 5vw, 55px); }
.login-copy > p:not(.eyebrow) { max-width: 500px; color: var(--muted); line-height: 1.7; }
.login-copy .notice { max-width: 510px; }
.login-card { padding: 29px; box-shadow: 0 12px 35px #172b4910; }
.login-card h2 { margin-bottom: 24px; }
.login-card label:not(:first-of-type) { margin-top: 15px; }
.login-card .muted { font-weight: 400; }
.form-message:empty { margin: 4px 0 0; }
footer { padding: 19px 24px; color: #94a0b0; text-align: center; font-size: 10px; }

@media (max-width: 720px) {
  .topbar { height: 64px; padding: 0 17px; }
  .topbar-right { gap: 8px; }
  .mode-option { padding: 7px 8px; font-size: 10px; }
  .shell { padding: 27px 15px 45px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .tabs { margin-top: 21px; }
  .tab-panel { padding: 19px 16px; }
  .search-row { align-items: stretch; flex-direction: column; }
  .search-row .button { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .availability-filters { grid-template-columns: 1fr 1fr; }
  .availability-filters .filter-keyword { grid-column: 1 / -1; }
  .availability-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-options { grid-template-columns: 1fr; }
  .work-item-row { grid-template-columns: 1fr 1fr; }
  .work-item-name { grid-column: 1 / -1; }
  .work-items-heading { align-items: flex-start; flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; }
  .login-layout { min-height: 0; grid-template-columns: 1fr; gap: 23px; padding: 25px 0; }
  .public-view-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .public-view-actions > * { text-align: center; }
  .public-frame-shell { min-height: 70vh; }
  .public-frame-shell iframe { height: 76vh; min-height: 620px; }
  .custom-availability-summary { grid-template-columns: 1fr 1fr; }
  .custom-availability-summary .summary-card:last-child { grid-column: 1 / -1; }
  .custom-availability-filters { grid-template-columns: 1fr 1fr; padding: 13px; }
  .custom-availability-filters .field-grow { grid-column: 1 / -1; }
  .custom-week-planner { padding: 12px; }
  .custom-week-heading { gap: 8px; }
  .custom-week-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .week-day { min-height: 95px; padding: 8px; }
  .custom-dealer-grid { grid-template-columns: 1fr; }
  .custom-detail-dialog { padding: 16px; }
  .custom-detail-frame-shell iframe { height: 60vh; min-height: 320px; }
  .login-copy h1 { font-size: 36px; }
  .login-card { padding: 23px; }
  .connection-state { display: none; }
}

@media (max-width: 420px) {
  .availability-summary { grid-template-columns: 1fr 1fr; }
  .custom-availability-summary { grid-template-columns: 1fr; }
  .custom-availability-summary .summary-card:last-child { grid-column: auto; }
  .custom-availability-filters { grid-template-columns: 1fr; }
  .custom-availability-filters .field-grow { grid-column: auto; }
  .custom-week-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dealer-availability-grid { grid-template-columns: 1fr; }
  .dealer-freshness { font-size: 8px; }
  .booking-context { grid-template-columns: 1fr 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .availability-day h3 { flex-direction: column; }
  .slot-chip span { display: block; margin-top: 3px; }
}
