/* Staff admin (/admin/{businessId}). Wider than the onboarding column; same tokens and components. */
.ad { --ad-max: 1240px; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg-subtle); }
.ad-loading { padding: 48px 16px; color: var(--text-3); text-align: center; }
.ad-page { min-width: 0; }

/* Top bar */
.ad-top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(8px); }
.ad-top-inner { display: flex; align-items: center; gap: 20px; max-width: var(--ad-max); height: 60px; margin: 0 auto; padding: 0 var(--gutter); }
.ad-brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.ad-brand .logo { height: 18px; }
.ad-biz { overflow: hidden; padding-left: 12px; border-left: 1px solid var(--border); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ad-tabs { display: flex; gap: 2px; margin-left: 8px; }
.ad-tab { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.ad-tab:hover { background: var(--bg-muted); color: var(--text); }
.ad-tab.is-on { background: var(--bg-muted); color: var(--text); }
.ad-links { display: flex; gap: 16px; margin-left: auto; }
.ad-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ad-link:hover { color: var(--text); }
.ad-main { flex: 1; width: 100%; max-width: var(--ad-max); margin: 0 auto; padding: 20px var(--gutter) 48px; outline: none; }

/* Shared bits */
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--radius-sm); }
.btn-dark { min-height: 40px; background: var(--text); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #27272a; }
.btn-dark.btn-sm { min-height: 36px; }
.btn-danger { min-height: 40px; background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: var(--danger-bg); color: var(--danger); }
.ad .btn-secondary, .ad-dialog .btn-secondary, .ad .btn-ghost, .ad-dialog .btn-ghost { min-height: 40px; font-size: 14px; }
.ad .btn-sm, .ad-dialog .btn-sm { min-height: 36px; }
.ad-h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.ad-h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.ad-h3 { margin: 0; font-size: 14px; font-weight: 600; }
.ad-sub { margin: 4px 0 0; }
.ad-sub a { color: var(--text-2); }
.ad-summary { margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.ad-note { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--bg-muted); color: var(--text-2); font-size: 13px; }
.ad-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.ad-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--text); }
.ad-check-sm { color: var(--text-2); font-size: 13px; white-space: nowrap; }
.ad-num { width: 84px; }
.ad-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.ad .input-inline { background-color: var(--bg); }
.ad-static { display: flex; align-items: center; height: 44px; color: var(--text-2); font-size: 15px; }

.ad-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--bg-muted); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.ad-pill.is-confirmed { background: #eff6ff; color: #1d4ed8; }
.ad-pill.is-completed { background: var(--success-bg); color: #15803d; }
.ad-pill.is-cancelled { background: var(--bg-muted); color: var(--text-3); }
.ad-pill.is-no_show { background: #fff7ed; color: #c2410c; }
.ad-pill.is-session { background: #f5f3ff; color: #6d28d9; }

/* Toolbar */
.ad-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.ad-datenav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ad-datenav .btn { margin-right: 6px; }
.ad-date-title { position: relative; margin-left: 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer; }
.ad-date-title:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border-strong); }
.ad-date-input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.ad-date-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.ad-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-seg { padding: 2px; }
.ad-seg .segment { height: 32px; padding: 0 14px; }

/* Day timeline */
[data-board] { transition: opacity .15s; }
[data-board].is-loading { opacity: .5; }
.ad-day { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); overflow: hidden; }
.ad-day-scroll { max-height: calc(100dvh - 210px); min-height: 360px; overflow: auto; }
.ad-day-grid { --gutter-w: 56px; min-width: calc(var(--gutter-w) + var(--cols) * 150px); }
.ad-day-head, .ad-day-body { display: grid; grid-template-columns: var(--gutter-w) repeat(var(--cols), minmax(150px, 1fr)); }
.ad-day-head { position: sticky; top: 0; z-index: 6; border-bottom: 1px solid var(--border); background: var(--bg); }
.ad-gutter-head { position: sticky; left: 0; z-index: 1; background: var(--bg); }
.ad-col-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 10px 12px; border-left: 1px solid var(--border); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-col-head span { color: var(--text-3); font-weight: 500; }
.ad-day-body { position: relative; }
.ad-gutter { position: sticky; left: 0; z-index: 4; background: var(--bg); }
.ad-gutter span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.ad-gutter span:first-child { transform: translateY(2px); }
.ad-col { position: relative; border-left: 1px solid var(--border); cursor: copy; background-image: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--hour)), repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2), var(--bg-muted) calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour)); }
.ad-closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(244, 244, 245, .9) 0 6px, rgba(250, 250, 250, .9) 6px 12px); pointer-events: none; }
.ad-off { position: absolute; left: 0; right: 0; z-index: 1; padding: 6px 8px; background: repeating-linear-gradient(135deg, #fef2f2 0 6px, #fff 6px 12px); border-block: 1px dashed var(--danger-border); color: var(--danger); font-size: 11px; font-weight: 500; cursor: default; overflow: hidden; }
.ad-break { position: absolute; left: 0; right: 0; padding: 4px 8px; background: repeating-linear-gradient(135deg, var(--bg-muted) 0 6px, var(--bg-subtle) 6px 12px); color: var(--text-3); font-size: 11px; font-weight: 500; pointer-events: none; overflow: hidden; }
.ad-lunch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ad-lunch .time-range[hidden] { display: none; }
.ad-block { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding: 4px 8px; border: 1px solid #bfdbfe; border-left: 3px solid #2563eb; border-radius: 6px; background: #eff6ff; color: #1e3a8a; font-size: 12px; line-height: 1.3; text-align: left; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: box-shadow .12s, transform .12s; }
.ad-block:hover { z-index: 3; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.ad-block strong { max-width: 100%; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ad-block strong small { font-weight: 500; opacity: .75; }
.ad-block span { max-width: 100%; overflow: hidden; color: inherit; opacity: .8; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-block.is-completed { border-color: #bbf7d0; border-left-color: #16a34a; background: #f0fdf4; color: #14532d; }
.ad-block.is-no_show { border-color: #fed7aa; border-left-color: #ea580c; background: #fff7ed; color: #7c2d12; }
.ad-block.is-cancelled { border-color: var(--border); border-left-color: var(--border-strong); background: var(--bg-subtle); color: var(--text-3); text-decoration: line-through; }
.ad-block.is-session { border-color: #ddd6fe; border-left-color: #7c3aed; background: #f5f3ff; color: #4c1d95; }
.ad-block.is-session.is-full { background: #ede9fe; }
.ad-now { position: absolute; left: var(--gutter-w); right: 0; z-index: 5; height: 2px; background: var(--danger); pointer-events: none; }
.ad-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.ad-tip { margin: 0; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--bg-subtle); }

/* Week agenda + rows */
.ad-week { display: grid; gap: 10px; }
.ad-week-day { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.ad-week-day.is-today { border-color: var(--text); }
.ad-week-head { display: flex; align-items: center; gap: 12px; }
.ad-week-date { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 8px; margin: -4px 0 -4px -8px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 13px; font-weight: 500; }
.ad-week-date strong { color: var(--text); font-size: 18px; font-weight: 600; }
.ad-week-date:hover { background: var(--bg-muted); }
.ad-week-add { margin: 0 0 0 auto; font-size: 13px; }
.ad-week-day .ad-rows { margin-top: 10px; }
.ad-rows { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.ad-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 180px) auto; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; text-align: left; font-size: 14px; }
.ad-row + .ad-row { border-top: 1px solid var(--border); }
.ad-row:hover { background: var(--bg-subtle); }
.ad-row.is-muted { color: var(--text-3); }
.ad-row.is-muted strong { color: var(--text-3); font-weight: 500; text-decoration: line-through; }
.ad-row-time { display: grid; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.ad-row-main { display: grid; min-width: 0; }
.ad-row-main strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ad-row-main .muted-sm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-row-staff { overflow: hidden; color: var(--text-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

/* Customers */
.ad-search { position: relative; display: flex; align-items: center; }
.ad-search .icon { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.ad-search .input { width: 280px; height: 38px; padding-left: 36px; font-size: 14px; }
.ad-table { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); overflow: hidden; }
.ad-tr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 12px; padding: 10px 16px; color: var(--text); font-size: 14px; text-decoration: none; }
.ad-tr + .ad-tr { border-top: 1px solid var(--border); }
a.ad-tr:hover { background: var(--bg-subtle); }
.ad-th { padding-block: 8px; background: var(--bg-subtle); color: var(--text-3); font-size: 12px; font-weight: 500; }
.ad-td-main { display: grid; min-width: 0; }
.ad-td-main strong, .ad-td-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-tr [role=cell] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.ad-tr .ad-td-main { display: grid; }
.ad-back { margin: 0 0 12px; }
.ad-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.ad-stats div { padding: 12px 16px; }
.ad-stats div + div { border-left: 1px solid var(--border); }
.ad-stats dt { color: var(--text-2); font-size: 12px; }
.ad-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.ad-customer .ad-h2 { margin: 20px 0 10px; }
.ad-customer .ad-row { grid-template-columns: 150px minmax(0, 1fr) auto; }

/* Setup */
.ad-setup { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; }
.ad-setup-nav { position: sticky; top: 80px; display: grid; gap: 2px; }
.ad-setup-nav a { padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.ad-setup-nav a:hover { background: var(--bg-muted); color: var(--text); }
.ad-setup-body { display: grid; gap: 16px; max-width: 760px; min-width: 0; }
.ad-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); scroll-margin-top: 80px; }
.ad-card > .ad-h2 { margin-bottom: 12px; }
.ad-card > .muted-sm { margin: -4px 0 12px; }
.ad-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ad-items { display: grid; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ad-item { padding: 12px 14px; }
.ad-item + .ad-item { border-top: 1px solid var(--border); }
.ad-item.is-off .ad-item-head strong { color: var(--text-3); }
.ad-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ad-item-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
form.ad-item.ad-item-form { margin: 0 0 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); }
.ad-stack { display: grid; gap: 22px; }
.ad-stack > form + form { padding-top: 18px; border-top: 1px solid var(--border); }
.ad-textarea { min-height: 72px; }
.ad-hours { border: 1px solid var(--border); border-radius: var(--radius); }
.ad-hours-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 12px; }
.ad-hours-row + .ad-hours-row { border-top: 1px solid var(--border); }
.ad-hours-day { display: flex; align-items: center; gap: 10px; width: 84px; font-size: 14px; font-weight: 500; cursor: pointer; }
.ad-hours-row.is-closed .time-range { opacity: .35; pointer-events: none; }
.ad-hours-row.is-closed .ad-hours-day { color: var(--text-3); }
.ad-timeoff { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ad-timeoff li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--radius-sm); background: var(--bg-subtle); font-size: 13px; }
.ad-session-day + .ad-session-day { margin-top: 14px; }
.ad-session-day .ad-h3 { margin-bottom: 8px; }
.ad-session-day .ad-row { grid-template-columns: 120px minmax(0, 1fr) auto; }

/* Forms */
.ad-form, .ad-form [data-when] { display: grid; gap: 14px; }
.ad-field { display: grid; gap: 6px; min-width: 0; margin: 0; }
.ad-fieldset { padding: 0; border: 0; }
.ad-fieldset legend { padding: 0; margin-bottom: 6px; }
.ad-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ad-checks .ad-check { padding: 6px 10px; border: 1px solid var(--border); border-radius: 99px; }
.ad-checks .ad-check:has(input:checked) { border-color: var(--text); background: var(--bg-subtle); }
.ad-grid-2, .ad-grid-3, .ad-grid-4 { display: grid; gap: 12px; align-items: end; }
.ad-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ad-span-2 { grid-column: span 2; }
.ad-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ad-actions-wrap { justify-content: flex-start; }
.ad-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-inline-form .input-inline { height: 34px; }
.ad .toggle-row, .ad-dialog .toggle-row { padding: 2px 0; }

/* Dialogs */
.ad-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .18); overflow: auto; }
.ad-dialog.is-wide { width: min(640px, calc(100vw - 24px)); }
.ad-dialog::backdrop { background: rgba(9, 9, 11, .35); backdrop-filter: blur(2px); }
.ad-dialog[open] { animation: ad-pop .16s ease both; }
@keyframes ad-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.ad-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 10px 20px; background: var(--bg); }
.ad-dialog-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.ad-dialog-body { padding: 4px 20px 20px; }
.ad-confirm-text { margin: 0 0 18px; color: var(--text-2); }
.ad-booking { display: grid; gap: 16px; }
.ad-booking-customer { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ad-customer-link { font-size: 16px; font-weight: 600; text-decoration-color: var(--border-strong); }
.ad-facts { display: grid; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.ad-facts div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 10px 14px; font-size: 14px; }
.ad-facts div + div { border-top: 1px solid var(--border); }
.ad-facts dt { color: var(--text-2); }
.ad-facts dd { margin: 0; font-weight: 500; }
.ad-history ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.ad-history li { display: grid; }
.ad-danger-zone { display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.ad-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.ad-slot { height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ad-slot:hover { border-color: var(--text); }
.ad-slot.is-on { border-color: var(--text); background: var(--text); color: #fff; }
.ad-slot-list { display: grid; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.ad-slot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; text-align: left; font-size: 14px; }
.ad-slot-row + .ad-slot-row { border-top: 1px solid var(--border); }
.ad-slot-row:hover { background: var(--bg-subtle); }
.ad-slot-row.is-on { background: var(--text); color: #fff; }
.ad-slot-row.is-on .muted-sm { color: rgba(255, 255, 255, .7); }
.ad-booked { display: grid; gap: 16px; }
.ad-booked p { margin: 0; }
.ad-copy { display: flex; gap: 8px; }
.ad-copy .input { flex: 1; font-size: 13px; color: var(--text-2); }

/* Toast */
.ad-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: var(--radius); background: var(--text); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, .2); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .18s, transform .18s; }
.ad-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ad-toast[data-tone=error] { background: var(--danger); }

/* Onboarding success: admin entry point */
.preview-actions { display: flex; gap: 8px; flex: none; }
.preview-actions .btn-primary { min-height: 34px; }

@media (max-width: 900px) {
  .ad-links { display: none; }
  .ad-setup { grid-template-columns: 1fr; }
  .ad-setup-nav { position: static; display: flex; gap: 4px; overflow-x: auto; }
  .ad-setup-nav a { white-space: nowrap; }
  .ad-tr { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .ad-tr > :nth-child(4), .ad-tr > :nth-child(5) { display: none; }
}
@media (max-width: 640px) {
  .ad-top-inner { gap: 8px; }
  .ad-top-inner #fabslots-language-control select { min-height: 32px; padding: 0 20px 0 7px; font-size: 11px; }
  .ad-brand .logo { display: none; }
  .ad-biz { padding-left: 0; border-left: 0; }
  .ad-tabs { margin-left: auto; }
  .ad-tab { padding: 0 9px; }
  .ad-tab span { display: none; }
  .ad-tab.is-on span { display: inline; }
  .ad-main { padding-top: 14px; }
  .ad-date-title { font-size: 16px; }
  .ad-tools { width: 100%; }
  .ad-tools .btn-dark { margin-left: auto; }
  .ad-search { flex: 1; }
  .ad-search .input { width: 100%; }
  .ad-day-grid { --gutter-w: 44px; min-width: calc(var(--gutter-w) + var(--cols) * 130px); }
  .ad-day-head, .ad-day-body { grid-template-columns: var(--gutter-w) repeat(var(--cols), minmax(130px, 1fr)); }
  .ad-row, .ad-customer .ad-row, .ad-session-day .ad-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .ad-row-time { grid-column: 1 / -1; display: flex; gap: 8px; }
  .ad-row-staff { display: none; }
  .ad-tr { grid-template-columns: minmax(0, 1fr) auto; }
  .ad-tr > :nth-child(3) { display: none; }
  .ad-tr [data-label="Visits"]::before { content: "Visits"; margin-right: 2px; color: var(--text-3); font-size: 12px; }
  .ad-th { display: none; }
  .ad-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-stats div + div { border-left: 0; }
  .ad-stats div:nth-child(even) { border-left: 1px solid var(--border); }
  .ad-stats div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .ad-grid-3, .ad-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-grid-2 { grid-template-columns: 1fr; }
  .ad-span-2 { grid-column: 1 / -1; }
  .ad-card { padding: 16px; }
  .ad-dialog-body { padding: 4px 16px 16px; }
  .ad-actions { justify-content: stretch; }
  .ad-actions .btn { flex: 1; }
  .ad-actions-wrap .btn { flex: 1 1 auto; }
  .preview-head { flex-direction: column; }
}

/* Install-as-app banner (install-prompt.js) */
.ad-install { width: 100%; max-width: var(--ad-max); margin: 0 auto; padding: 0 var(--gutter); }
.ad-install:empty { display: none; }
.ip { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 10px 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.ip img { flex: none; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--border); }
.ip-copy { display: grid; flex: 1; min-width: 0; font-size: 13px; }
.ip-copy strong { font-size: 14px; font-weight: 600; }
.ip-copy span { color: var(--text-2); }
.ad-notes { margin: 0 0 8px; }
.ad-notes .ad-actions { align-items: center; }
.ad-outbox-title { margin: 22px 0 10px; }
.ad-email-row { grid-template-columns: 150px minmax(0, 1fr) auto; }
.ad-email-frame { display: block; width: 100%; height: min(70dvh, 760px); border: 1px solid var(--border); border-radius: var(--radius); background: #f4f4f5; }
.ad-fp-status { margin-right: auto; align-self: center; text-align: left; }
