/* Turnli v0.22.5 — launch-readiness sizing, branding, and responsive refinement.
   Additive only: no queue, Supabase, entitlement, or saved floor-coordinate behavior. */

:root{
  --tl-launch-content:1680px;
  --tl-launch-reading:760px;
  --tl-launch-touch:44px;
  --tl-launch-text:14px;
  --tl-launch-meta:12px;
  --tl-launch-radius:16px;
}

/* Shared readability and sizing floor. */
body{font-size:var(--tl-launch-text);line-height:1.5}
:where(button,.btn,.btn-v2,input,select,textarea){line-height:1.25}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),select,textarea){min-height:44px}
:where(.field-help,.prototype-footnote,.modal-footnote,.settings-title p,.panel-head-v2 p,.page-head-v2 p:not(.view-kicker)){line-height:1.5}
:where(.panel-v2,.settings-card-v2,.public-section,.join-card-v2,.status-card-v2,.auth-card){border-radius:var(--tl-launch-radius)}

/* Staff shell: keep dense operational views readable without wasting the viewport. */
body[data-page="live-dashboard"] .app-content-v2,
body[data-page="dashboard"] .app-content-v2{max-width:var(--tl-launch-content);padding:24px clamp(18px,2vw,32px) 40px}
body[data-page="live-dashboard"] .topbar-v2,
body[data-page="dashboard"] .topbar-v2{min-height:66px;padding-inline:clamp(18px,2vw,32px)}
body[data-page="live-dashboard"] .side-link-v2,
body[data-page="dashboard"] .side-link-v2{min-height:42px;font-size:13px}
body[data-page="live-dashboard"] .side-group-label,
body[data-page="dashboard"] .side-group-label{font-size:10px}
body[data-page="live-dashboard"] .workspace-chip strong,
body[data-page="dashboard"] .workspace-chip strong,
body[data-page="live-dashboard"] .location-title strong,
body[data-page="dashboard"] .location-title strong{font-size:13px}
body[data-page="live-dashboard"] .workspace-chip small,
body[data-page="dashboard"] .workspace-chip small,
body[data-page="live-dashboard"] .location-title small,
body[data-page="dashboard"] .location-title small{font-size:11px}
body[data-page="live-dashboard"] .page-head-v2 h1,
body[data-page="dashboard"] .page-head-v2 h1{font-size:clamp(1.9rem,2vw,2.35rem)}
body[data-page="live-dashboard"] .page-head-v2 p:not(.view-kicker),
body[data-page="dashboard"] .page-head-v2 p:not(.view-kicker){font-size:13px}
body[data-page="live-dashboard"] .panel-head-v2 h2,
body[data-page="dashboard"] .panel-head-v2 h2,
body[data-page="live-dashboard"] .settings-title h2,
body[data-page="dashboard"] .settings-title h2{font-size:16px}
body[data-page="live-dashboard"] .panel-head-v2 p,
body[data-page="dashboard"] .panel-head-v2 p,
body[data-page="live-dashboard"] .settings-title p,
body[data-page="dashboard"] .settings-title p{font-size:12px}

/* Queue rows: preserve density but remove launch-blocking microtype. */
body[data-page="live-dashboard"] .queue-header-v2,
body[data-page="dashboard"] .queue-header-v2{font-size:11px;min-height:38px}
body[data-page="live-dashboard"] .queue-row-v2,
body[data-page="dashboard"] .queue-row-v2{min-height:72px}
body[data-page="live-dashboard"] :where(.customer-cell strong,.service-cell strong,.line-time-cell strong,.estimate-cell strong),
body[data-page="dashboard"] :where(.customer-cell strong,.service-cell strong,.line-time-cell strong,.estimate-cell strong){font-size:13px}
body[data-page="live-dashboard"] :where(.customer-cell small,.service-cell small,.line-time-cell small,.estimate-cell small,.queue-mobile-meta-v0145),
body[data-page="dashboard"] :where(.customer-cell small,.service-cell small,.line-time-cell small,.estimate-cell small,.queue-mobile-meta-v0145){font-size:11px}
body[data-page="live-dashboard"] :where(.queue-status-pill,.row-primary,.queue-more-trigger-v0145),
body[data-page="dashboard"] :where(.queue-status-pill,.row-primary,.queue-more-trigger-v0145){font-size:12px}
body[data-page="live-dashboard"] .row-primary,
body[data-page="dashboard"] .row-primary{min-height:40px}
body[data-page="live-dashboard"] .queue-action-items-v0145 button span,
body[data-page="dashboard"] .queue-action-items-v0145 button span{font-size:13px}
body[data-page="live-dashboard"] .queue-action-items-v0145 button small,
body[data-page="dashboard"] .queue-action-items-v0145 button small{font-size:11px;line-height:1.35}
body[data-page="live-dashboard"] :where(.queue-pulse span,.queue-pulse small,.next-card p,.next-meta,.attention-clear-v6 p),
body[data-page="dashboard"] :where(.queue-pulse span,.queue-pulse small,.next-card p,.next-meta,.attention-clear-v6 p){font-size:11px}

/* Forms, settings, history, team, and Command Center-adjacent operational copy. */
body[data-page="live-dashboard"] :where(.field label,.setting-row-v2 strong,.rule-toggle-v15 strong,.team-row-v5 strong,.activity-item-v15 strong),
body[data-page="dashboard"] :where(.field label,.setting-row-v2 strong,.rule-toggle-v15 strong,.team-row-v5 strong,.activity-item-v15 strong){font-size:13px}
body[data-page="live-dashboard"] :where(.field-help,.setting-row-v2 small,.rule-toggle-v15 small,.team-row-v5 small,.activity-item-v15 small),
body[data-page="dashboard"] :where(.field-help,.setting-row-v2 small,.rule-toggle-v15 small,.team-row-v5 small,.activity-item-v15 small){font-size:12px}
body[data-page="live-dashboard"] :where(.settings-card-v2,.expansion-card-v15,.readiness-card-v15),
body[data-page="dashboard"] :where(.settings-card-v2,.expansion-card-v15,.readiness-card-v15){padding:20px}
body[data-page="live-dashboard"] .command-item-v5 strong,
body[data-page="dashboard"] .command-item-v5 strong{font-size:13px}
body[data-page="live-dashboard"] .command-item-v5 small,
body[data-page="dashboard"] .command-item-v5 small{font-size:11px}

/* Business branding: stronger preview, clearer upload states, and useful logo proportions. */
.branding-grid-v19{grid-template-columns:minmax(0,1fr) minmax(380px,.92fr);gap:20px}
.branding-upload-v19{grid-template-columns:104px minmax(0,1fr);gap:18px}
.branding-asset-preview-v19{width:104px;height:96px;padding:8px;background:#fbfaff}
.branding-asset-preview-v19.wide{height:82px}
.branding-asset-preview-v19 img{object-fit:contain;object-position:center}
.branding-upload-copy-v19 strong{font-size:14px}
.branding-upload-copy-v19 small,.branding-note-v19,.branding-save-state-v19,.branding-warning-v19{font-size:12px}
.branding-upload-actions-v19 .btn{min-height:42px}
.branding-preview-card-v19{top:82px}
.branding-preview-stage-v19{min-height:500px;padding:28px}
.branding-preview-device-v19{width:min(100%,400px);padding:24px}
.branding-preview-device-v19.tv{max-width:580px}
.branding-preview-device-v19 p{font-size:13px}
.branding-preview-tabs-v19 button{min-height:42px;font-size:12px}
.branding-save-state-v19.is-saving{color:#5b47cf}
.branding-save-state-v19.is-error{color:#a3384d}
.branding-save-state-v19.is-success{color:#187253}

/* Do not crush horizontal tenant logos into a small square. */
.workspace-logo.has-business-logo-v19{width:42px;height:38px;flex:0 0 42px}
.workspace-logo.has-business-logo-v19:has(.logo-wide){width:58px;flex-basis:58px}
.workspace-logo-render-v21{width:100%;height:100%;border-radius:10px;padding:3px}
.workspace-logo-render-v21.logo-wide{padding:4px 3px}
.status-business-mini .business-logo-v19.logo-wide{width:min(104px,28vw);height:42px}
.join-business-head .business-logo-v19.logo-wide{width:min(132px,38vw);height:64px}
.kiosk-business-lockup-v19 .business-logo-v19.logo-wide{width:min(220px,58vw)}
.business-logo-v19 img{max-width:100%;max-height:100%;object-fit:contain!important}

/* Public Join: readable fields and a clean reflow before text begins clipping. */
.join-shell{width:min(calc(100% - 32px),var(--tl-launch-reading))}
.join-card-v2{overflow:hidden}
.join-business-head h1{font-size:clamp(1.55rem,1.25rem + 1vw,2rem)}
.join-business-head p,.join-estimate span,.field-help,.join-trust{font-size:12px}
.join-step legend{font-size:14px;line-height:1.35}
.join-card-v2 .field label{font-size:13px}
.join-card-v2 :where(input,select,textarea){font-size:15px}
.join-card-v2 .form-row{grid-template-columns:minmax(180px,.72fr) minmax(260px,1.28fr);gap:12px}
.join-summary span{font-size:12px}
.join-summary strong{font-size:14px}
.service-option strong{font-size:14px}
.service-option small{font-size:12px}

/* Customer Status and public queue surfaces. */
.status-shell{width:min(calc(100% - 32px),800px)}
.virtual-line-status .status-copy{font-size:15px}
.virtual-line-head p,.virtual-line-person-copy small,.status-refresh-note,.status-footnote{font-size:12px}
.virtual-line-person-copy strong,.status-details strong{font-size:14px}
.status-details span{font-size:12px}
.public-section-head p,.public-service-card p,.public-info-grid p{font-size:13px}

/* Short laptops: keep actions reachable without compressing type. */
@media (min-width:821px) and (max-height:800px){
  body[data-page="live-dashboard"] .app-content-v2,
  body[data-page="dashboard"] .app-content-v2{padding-top:18px;padding-bottom:24px}
  body[data-page="live-dashboard"] .queue-row-v2,
  body[data-page="dashboard"] .queue-row-v2{min-height:68px}
  .branding-preview-stage-v19{min-height:390px}
}

@media(max-width:1180px){
  .branding-grid-v19{grid-template-columns:1fr}
  .branding-preview-card-v19{position:static}
  .branding-preview-stage-v19{min-height:420px}
}

@media(max-width:900px){
  .join-card-v2 .form-row{grid-template-columns:1fr}
  .join-shell,.status-shell{width:min(calc(100% - 24px),760px)}
}

@media(max-width:820px){
  body[data-page="live-dashboard"] .app-content-v2,
  body[data-page="dashboard"] .app-content-v2{padding:16px 14px calc(92px + env(safe-area-inset-bottom))}
  body[data-page="live-dashboard"] .page-head-v2 h1,
  body[data-page="dashboard"] .page-head-v2 h1{font-size:1.75rem}
  body[data-page="live-dashboard"] .queue-row-v2,
  body[data-page="dashboard"] .queue-row-v2{min-height:0;padding:14px!important}
  body[data-page="live-dashboard"] .row-primary,
  body[data-page="dashboard"] .row-primary{min-height:var(--tl-launch-touch)}
  .branding-upload-v19{grid-template-columns:88px minmax(0,1fr)}
  .branding-asset-preview-v19{width:88px;height:82px}
  .branding-upload-actions-v19{display:grid;grid-template-columns:1fr 1fr}
  .branding-upload-actions-v19 .btn{width:100%;min-width:0}
}

@media(max-width:640px){
  :root{--tl-launch-radius:14px}
  body{font-size:14px}
  body[data-page="live-dashboard"] .app-content-v2,
  body[data-page="dashboard"] .app-content-v2{padding-inline:max(10px,env(safe-area-inset-left),env(safe-area-inset-right))}
  body[data-page="live-dashboard"] :where(.settings-card-v2,.expansion-card-v15,.readiness-card-v15),
  body[data-page="dashboard"] :where(.settings-card-v2,.expansion-card-v15,.readiness-card-v15){padding:16px}
  .branding-upload-v19{grid-template-columns:72px minmax(0,1fr);gap:12px}
  .branding-asset-preview-v19{width:72px;height:68px}
  .branding-upload-actions-v19{grid-template-columns:1fr}
  .branding-control-grid-v19{grid-template-columns:1fr}
  .branding-preview-stage-v19{min-height:360px;padding:14px}
  .branding-preview-device-v19{padding:18px;border-radius:18px}
  .branding-savebar-v19{display:grid;grid-template-columns:1fr 1fr}
  .branding-save-state-v19{grid-column:1/-1;margin:0}
  .join-shell,.status-shell{width:auto;margin-left:max(10px,env(safe-area-inset-left));margin-right:max(10px,env(safe-area-inset-right))}
  .join-business-head{padding:18px 16px 14px}
  .join-form-v2{padding:4px 16px 18px}
  .join-estimate{margin-inline:16px}
  .join-card-v2 :where(input,select,textarea){font-size:16px}
  .join-summary{grid-template-columns:1fr}
  .join-summary>div{border-right:0}
}

@media(max-width:390px){
  .branding-preview-tabs-v19{grid-template-columns:1fr 1fr}
  .branding-savebar-v19{grid-template-columns:1fr}
  .branding-save-state-v19{grid-column:auto}
  .join-business-head .business-logo-v19.logo-wide{width:min(104px,34vw)}
  .virtual-line-status .status-copy{font-size:14px}
}

@media(min-width:1920px){
  body[data-page="live-dashboard"] .app-content-v2,
  body[data-page="dashboard"] .app-content-v2{padding-inline:36px}
  .branding-preview-stage-v19{min-height:540px}
}

@media(prefers-reduced-motion:reduce){
  .branding-preview-card-v19,.business-logo-v19{scroll-behavior:auto;transition:none!important}
}

@media(forced-colors:active){
  .business-logo-v19,.branding-asset-preview-v19,.branding-preview-device-v19{border:1px solid CanvasText}
}
