/* Owner-managed business appearance. Loaded after the base light/dark theme. */
:root{--surface:#fff;--primary-button:#5b50d8;--primary-button-text:#fff;--secondary-button:#fff;--secondary-button-text:#45434e;--sidebar-text:#f5f5f7;--label-text:#5c5c65;--input-background:#fff;--input-text:#202027}
html[data-theme="dark"]{--surface:#222229;--primary-button:#665add;--primary-button-text:#fff;--secondary-button:#222229;--secondary-button-text:#f0eff5;--sidebar-text:#f0eff5;--label-text:#c7c5ce;--input-background:#282830;--input-text:#f0eff5}
html[data-business-theme] body{color:var(--ink);background:var(--paper)}
html[data-business-theme] :is(.metric,.panel,.command,.modal,.row,.lead,.schedule-card,.routine-row,.calendar-day,.chat-list>button,.direct-people button,.permissions span,.upload-button,.quote-card,.line-item,.checklist-row){border-color:var(--line);color:var(--ink);background:var(--surface)}
html[data-business-theme] :is(.column,.job-summary>span,.detail-section>header,.form-note,.calendar-day.outside,.api-key-empty,.quote-builder>header,.quote-builder>footer){background:color-mix(in srgb,var(--surface) 82%,var(--paper))}
html[data-business-theme] :is(.panel-head,.row,.member-row,.table-tools,td,.form-actions,.modal>header,.command>div,.api-key-row,.quote-builder,.quote-builder>header,.quote-builder>footer,.line-item,.detail-section,.detail-row,.checklist-row,.add-task,.schedule-card,.calendar-weekdays,.calendar-day,.chat-list,.chat-list>header,.chat-room>header,.chat-list>button,.chat-composer,.direct-people,.direct-people button,.map-panel>aside,.map-stop){border-color:var(--line)}
html[data-business-theme] :is(.page-head h1,.settings-card h2,.panel-head h2,.row-text b,.row-side b,td b,.lead h3,.job-summary b,.detail-row b,.detail-row strong,.chat-list button b,.direct-people b,.map-panel aside b,.map-empty b){color:var(--ink)}
html[data-business-theme] :is(.topbar>p,.page-head p,.panel-head p,.metric header,.metric small,.list-empty,.row-text small,.row-side small,.revenue-total small,td,td small,.lead p,.settings-card>p,.settings-card-title p,.form-note,.logo-form>span:nth-child(2)>small,.api-key-row small,.generated-key p,.quote-card>p,.job-summary small,.detail-section>header small,.detail-row small,.detail-notes,.schedule-card small,.map-panel>aside>p,.map-panel aside small,.chat-list button small,.chat-room>header small,.chat-message>div>small,.direct-people small,.invoice-line-grid small){color:var(--muted)}
html[data-business-theme] label{color:var(--label-text)}
html[data-business-theme] :is(input,select,textarea){border-color:var(--line);color:var(--input-text);background:var(--input-background)}
html[data-business-theme] :is(input,textarea)::placeholder{color:color-mix(in srgb,var(--input-text) 48%,transparent)}
html[data-business-theme] :is(input,select,textarea):focus{border-color:var(--purple);box-shadow:0 0 0 3px color-mix(in srgb,var(--purple) 19%,transparent)}
html[data-business-theme] .primary{color:var(--primary-button-text);background:var(--primary-button)}
html[data-business-theme] .primary:hover{background:color-mix(in srgb,var(--primary-button) 88%,var(--primary-button-text))}
html[data-business-theme] :is(.secondary,.search,.icon,.upload-button){border-color:var(--line);color:var(--secondary-button-text);background:var(--secondary-button)}
html[data-business-theme] :is(.secondary,.search,.icon,.upload-button):hover{border-color:var(--purple);background:color-mix(in srgb,var(--secondary-button) 90%,var(--purple))}
html[data-business-theme] .topbar{border-color:var(--line);background:color-mix(in srgb,var(--surface) 90%,transparent)}
html[data-business-theme] .sidebar{color:var(--sidebar-text);background:var(--sidebar)}
html[data-business-theme] .sidebar :is(.brand,.business,.nav,.sidebar-foot>a,.profile-details){color:var(--sidebar-text)}
html[data-business-theme] .sidebar :is(.business small,.profile small,.sidebar nav>small){color:color-mix(in srgb,var(--sidebar-text) 60%,transparent)}
html[data-business-theme] .business{background:color-mix(in srgb,var(--sidebar) 88%,var(--sidebar-text))}
html[data-business-theme] .nav.active{color:var(--primary-button-text);background:var(--primary-button)}
html[data-business-theme] :is(.business:hover,.business[aria-expanded="true"],.nav:hover,.profile-details:hover){background:color-mix(in srgb,var(--sidebar) 78%,var(--sidebar-text))}
html[data-business-theme] .business-menu{border-color:color-mix(in srgb,var(--sidebar-text) 20%,var(--sidebar));color:var(--sidebar-text);background:color-mix(in srgb,var(--sidebar) 90%,var(--surface))}
html[data-business-theme] :is(.workspace-option,.create-workspace){color:var(--sidebar-text)}
html[data-business-theme] :is(.workspace-option:hover,.workspace-option.active,.create-workspace:hover){background:color-mix(in srgb,var(--sidebar) 76%,var(--sidebar-text))}
html[data-business-theme] :is(.business>span:first-child,.workspace-mark,.avatar){color:var(--primary-button-text);background:var(--primary-button)}
html[data-business-theme] .profile{border-color:color-mix(in srgb,var(--sidebar-text) 18%,var(--sidebar))}
html[data-business-theme] .badge{color:var(--sidebar-text);background:color-mix(in srgb,var(--sidebar) 72%,var(--sidebar-text))}
html[data-business-theme] .badge.amber{color:var(--warning)}
html[data-business-theme] .badge.red{color:var(--danger)}
html[data-business-theme] :is(.eyebrow,.table-link,.panel-head button,.link-button,.schedule-time){color:var(--purple)}
html[data-business-theme] :is(.row-icon,.metric header i,.routine-row>span:first-child>em){color:var(--purple);background:var(--purple-soft)}
html[data-business-theme] .metric header i.blue{color:var(--purple);background:var(--purple-soft)}
html[data-business-theme] .pill{color:var(--purple);background:var(--purple-soft)}
html[data-business-theme] :is(.pill.green,.metric header i.green){color:var(--green);background:color-mix(in srgb,var(--green) 15%,var(--surface))}
html[data-business-theme] :is(.pill.orange,.metric header i.orange,.attention .row-icon){color:var(--orange);background:color-mix(in srgb,var(--orange) 15%,var(--surface))}
html[data-business-theme] :is(.pill.red,.attention .row-icon.red,.error-banner,.danger-button){color:var(--red);border-color:color-mix(in srgb,var(--red) 35%,var(--line));background:color-mix(in srgb,var(--red) 11%,var(--surface))}
html[data-business-theme] .bars div{background:color-mix(in srgb,var(--purple) 28%,var(--surface))}
html[data-business-theme] .bars div.current{background:var(--purple)}
html[data-business-theme] :is(th,.calendar-weekdays){color:var(--label-text);background:color-mix(in srgb,var(--surface) 82%,var(--paper))}
html[data-business-theme] kbd{border-color:var(--line);color:var(--muted);background:var(--input-background)}
html[data-business-theme] .list-empty b{color:var(--ink)}
html[data-business-theme] :is(.command-result,.quote-line.addon){color:var(--ink);background:var(--surface)}
html[data-business-theme] :is(.command-result:hover,.schedule-card:hover,.routine-row:hover,.chat-list>button:hover,.direct-people button:hover){background:color-mix(in srgb,var(--surface) 84%,var(--purple))}
html[data-business-theme] :is(.routine-row.current,.chat-list>button.active,.quote-card.selected){border-color:color-mix(in srgb,var(--purple) 42%,var(--line));background:color-mix(in srgb,var(--surface) 82%,var(--purple))}
html[data-business-theme] :is(.permission-tags span,.permissions input:checked+span){border-color:color-mix(in srgb,var(--purple) 42%,var(--line));color:var(--purple);background:var(--purple-soft);box-shadow:none}
html[data-business-theme] :is(.generated-key,.integration-links a){border-color:var(--line);color:var(--purple);background:color-mix(in srgb,var(--surface) 86%,var(--purple))}
html[data-business-theme] .security-note{color:var(--green)!important;background:color-mix(in srgb,var(--surface) 86%,var(--green))}
html[data-business-theme] .stripe-connect-status{border-color:var(--line);background:color-mix(in srgb,var(--surface) 86%,var(--paper))}
html[data-business-theme] .stripe-connect-status span{color:var(--muted);background:var(--surface)}
html[data-business-theme] .stripe-connect-status span.complete{color:var(--green);background:color-mix(in srgb,var(--surface) 84%,var(--green))}
html[data-business-theme] .chat-message p{color:var(--ink);background:color-mix(in srgb,var(--surface) 75%,var(--paper))}
html[data-business-theme] .chat-message.mine p{color:var(--primary-button-text);background:var(--primary-button)}
html[data-business-theme] .schedule-card.compact{color:var(--purple);background:var(--purple-soft)}
html[data-business-theme] #schedule-map{background-color:color-mix(in srgb,var(--paper) 88%,var(--purple))!important;background-image:linear-gradient(color-mix(in srgb,var(--purple) 8%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--purple) 8%,transparent) 1px,transparent 1px),radial-gradient(circle at 28% 20%,color-mix(in srgb,var(--purple) 14%,transparent),transparent 30%),radial-gradient(circle at 76% 72%,color-mix(in srgb,var(--green) 12%,transparent),transparent 35%)}
html[data-business-theme] .map-pin{border-color:color-mix(in srgb,var(--purple) 36%,var(--line));color:var(--purple);background:var(--surface)}
html[data-business-theme] .toast{color:var(--primary-button-text);background:var(--primary-button)}
.theme-settings{padding:0}.theme-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;cursor:pointer;list-style:none}.theme-disclosure>summary::-webkit-details-marker{display:none}.theme-disclosure>summary>span{display:flex;align-items:center;gap:11px}.theme-disclosure>summary b{display:block;color:var(--ink);font-size:12px}.theme-disclosure>summary small{display:block;margin-top:3px;color:var(--muted);font-size:8px}.theme-summary-icon{display:grid;width:34px;height:34px;place-items:center;border-radius:9px;color:var(--purple);background:var(--purple-soft)}.theme-summary-icon svg{width:16px}.theme-summary-side>svg{width:15px;color:var(--muted);transition:transform .2s}.theme-disclosure[open] .theme-summary-side>svg{transform:rotate(180deg)}.theme-summary-swatches{display:flex;gap:0}.theme-summary-swatches i{width:22px;height:22px;border:3px solid var(--surface);border-radius:50%;background:var(--swatch);box-shadow:0 0 0 1px var(--line)}.theme-summary-swatches i+i{margin-left:-8px}.theme-settings-body{display:grid;gap:18px;padding:0 20px 20px;border-top:1px solid var(--line)}.theme-settings-body>p{margin:18px 0 0;color:var(--muted);font-size:9px;line-height:1.6}.theme-settings form{gap:18px}.theme-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px}.theme-mode{overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.theme-mode>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface) 82%,var(--paper))}.theme-mode>header>span{display:grid;gap:2px}.theme-mode>header b{font-size:11px}.theme-mode>header small{color:var(--muted);font-size:8px}.theme-mode>header .secondary{min-height:29px;padding:0 9px}.theme-mode>header svg{width:12px}.theme-color-grid{display:grid}.theme-color{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px;border-top:1px solid var(--line)}.theme-color:first-child{border-top:0}.theme-color>span:first-child{display:grid;gap:2px}.theme-color b{color:var(--ink);font-size:9px}.theme-color small{color:var(--muted);font-size:7px;font-weight:500}.color-control{display:flex;align-items:center;gap:7px}.color-control input[type="color"]{width:31px;height:31px;padding:3px;border-radius:8px;cursor:pointer}.color-control code{min-width:56px;color:var(--muted);font:8px 'DM Mono'}.theme-preview{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:11px;background:var(--surface)}.theme-preview-mark{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:9px;color:var(--primary-button-text);background:var(--primary-button);font-weight:800}.theme-preview>span:nth-child(2){display:grid;gap:2px;min-width:0;margin-right:auto}.theme-preview b{font-size:10px}.theme-preview small{color:var(--muted);font-size:8px}.theme-readonly{display:flex;align-items:center;gap:8px;padding:13px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.theme-readonly span{width:24px;height:24px;border:3px solid var(--surface);border-radius:50%;background:var(--swatch);box-shadow:0 0 0 1px var(--line)}.theme-readonly span+span{margin-left:-14px}.theme-readonly b{margin-left:5px;font-size:9px}
@media(max-width:900px){.theme-modes{grid-template-columns:1fr}.theme-preview{align-items:stretch;flex-wrap:wrap}.theme-preview>span:nth-child(2){flex:1 1 calc(100% - 50px)}.theme-preview>button{flex:1}}
