:root {
  --brand-focus:var(--v2-primary); --brand-gradient:var(--v2-primary); --interactive-selected-bg:var(--v2-selection);
  --v2-primary:#26704d; --v2-primary-hover:#1f6042; --v2-selection:#eaf3ed; --v2-text:#252d29; --v2-secondary:#58665e; --v2-divider:#e1e5e2; --v2-navigation:#f5f6f5; --v2-surface:#fff; --v2-background:#f8f9f8; --v2-warning:#8d642c; --v2-warning-bg:#f8f2e8; --v2-control-border:#7b8980; --v2-font-label:12px; --v2-font-body:14px; --sidebar-rail-width:64px; --sidebar-text-width:144px; --sidebar-expanded-width:calc(var(--sidebar-rail-width) + var(--sidebar-text-width)); --sidebar-width:var(--sidebar-expanded-width);
  --workspace-compact-max:760px; --workspace-standard-max:1180px; --workspace-context-width:392px;
  --text-primary:var(--v2-text); --text-secondary:var(--v2-secondary); --text-muted:var(--v2-secondary); --border:var(--v2-divider); --bg-main:var(--v2-background); --brand-primary:var(--v2-primary); --brand-primary-hover:var(--v2-primary-hover); --brand-primary-soft:var(--v2-selection); --brand-primary-selected:var(--v2-selection);
}
*{box-sizing:border-box} html,body{width:100%;height:100%;overflow:hidden;color:var(--v2-text);background:var(--v2-background)} :where(html, body, .app-shell, dialog, .context-panel, .drawer, .modal, .tooltip, .popover, .view) { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; } :where(button, input, select, textarea, optgroup) { font-family: inherit; } body{margin:0;font-size:14px;line-height:1.4} small{font-size:12px} button,input,select,textarea{color:inherit} button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--v2-primary);outline-offset:2px} [hidden]{display:none!important}

.app-shell{display:grid;width:100%;height:100dvh;grid-template-columns:var(--sidebar-width) minmax(0,1fr);overflow:hidden}.sidebar{display:flex;width:var(--sidebar-width);height:100dvh;min-width:0;flex-direction:column;gap:8px;padding:14px 12px 12px;overflow:hidden;border-right:1px solid var(--v2-divider);background:var(--v2-navigation);box-shadow:none}.sidebar-brand-row{min-height:42px}.brand.v2-brand{display:flex;min-width:0;align-items:center;gap:10px;padding:0;color:inherit;text-decoration:none}.v2-brand-mark{display:grid;width:32px;height:32px;flex:0 0 32px;place-items:center;border-radius:6px;color:#fff;background:var(--v2-primary);font-size:17px;font-weight:600}.v2-brand>span:last-child{display:grid;min-width:0}.v2-brand strong{font-size:14px;font-weight:600}.v2-brand small{overflow:hidden;color:var(--v2-secondary);font-size:12px;line-height:16px;text-overflow:ellipsis;white-space:nowrap}.sidebar .nav{display:flex;min-height:0;flex:1;flex-direction:column;gap:7px;overflow-y:auto;scrollbar-width:thin}.v2-sidebar-search{display:flex;height:34px;flex:0 0 34px;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--v2-divider);border-radius:6px;background:#fff}.v2-sidebar-search svg{width:16px;height:16px;flex:0 0 16px;color:var(--v2-secondary)}.v2-sidebar-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;font-size:13px}.v2-sidebar-search kbd{color:var(--v2-secondary);font:12px Inter,sans-serif;white-space:nowrap}.v2-create{width:100%;height:34px;min-height:34px;padding:0 12px;border-radius:6px;font-size:14px}.v2-nav-primary{display:grid;gap:2px;padding-top:5px}.sidebar .nav-item,.v2-nav-group>summary{display:flex;width:100%;height:34px;min-height:34px;align-items:center;gap:10px;padding:0 10px;border:0;border-radius:6px;color:var(--v2-text);background:transparent;font-size:14px;font-weight:400;text-align:left}.sidebar .nav-item svg,.v2-nav-group>summary svg{width:18px;height:18px;flex:0 0 18px;color:#66736c}.sidebar .nav-item:hover,.v2-nav-group>summary:hover{background:rgba(225,229,226,.68)}.sidebar .nav-item.active{color:var(--v2-primary);background:var(--v2-selection);font-weight:600}.sidebar .nav-item.active svg{color:var(--v2-primary)}.v2-nav-count{margin-left:auto;color:var(--v2-secondary);font-size:12px;font-weight:400}.v2-nav-group{margin:0}.v2-nav-group>summary{list-style:none;cursor:pointer}.v2-nav-group>summary::-webkit-details-marker{display:none}.v2-nav-group>summary span{flex:1}.v2-nav-group>summary b{color:var(--v2-secondary);font-size:12px;transition:transform .15s ease}.v2-nav-group[open]>summary b{transform:rotate(180deg)}.v2-nav-group>div{display:grid}.v2-nav-group>div .nav-item{height:27px;min-height:27px;padding-left:38px;font-size:12px}.sidebar-footer{display:grid;flex:0 0 auto;gap:5px;padding-top:7px;border-top:1px solid var(--v2-divider)}.v2-help{display:flex;width:100%;height:32px;align-items:center;gap:10px;padding:0 10px;border:0;color:var(--v2-text);background:transparent;font-size:13px}.v2-help svg{width:18px;height:18px}.sidebar-footer .user-card{width:100%;min-height:40px;padding:0 8px}.sidebar-footer .avatar{width:30px;height:30px;border-radius:6px}.sidebar-collapse{width:32px;height:32px;min-height:32px;margin:0;border-radius:6px}
.app-shell.sidebar-collapsed{--sidebar-width:var(--sidebar-rail-width)}.app-shell.sidebar-collapsed .sidebar{padding-inline:8px}.app-shell.sidebar-collapsed :is(.v2-brand>span:last-child,.v2-sidebar-search input,.v2-sidebar-search kbd,.v2-create span,.v2-nav-primary .nav-item span,.v2-nav-count,.v2-nav-group>summary span,.v2-nav-group>summary b,.v2-nav-group>div,.v2-help span,.user-card>span:last-child,.sidebar-label){display:none}.app-shell.sidebar-collapsed :is(.v2-sidebar-search,.v2-create,.sidebar .nav-item,.v2-nav-group>summary,.v2-help){width:46px;justify-content:center;padding-inline:0}.app-shell.sidebar-collapsed .v2-brand{justify-content:center}

.main{display:flex;height:100dvh;min-width:0;min-height:0;flex-direction:column;overflow:hidden;background:var(--v2-surface)}.topbar{display:flex;height:64px;min-height:64px;align-items:center;gap:12px;padding:0 24px;border-bottom:1px solid var(--v2-divider);background:#fff}.menu-button{display:none;width:40px;min-width:40px;height:40px;min-height:40px}.v2-topbar-copy{display:flex;min-width:0;flex:1;align-items:baseline;gap:14px}.topbar h1{margin:0;font-size:20px;line-height:28px;font-weight:600;white-space:nowrap}#v2-topbar-meta{overflow:hidden;color:var(--v2-secondary);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.topbar .connection{display:none}.v2-topbar-actions,.v2-route-actions,.v2-route-actions>*{display:flex;min-width:0;align-items:center;gap:8px}.v2-topbar-actions :is(button,select){height:34px;min-height:34px;border-radius:6px;font-size:13px}.v2-topbar-actions select{max-width:180px;padding-block:0}.v2-bell{display:grid;width:34px;min-width:34px;place-items:center;padding:0;border:1px solid var(--v2-divider);background:#fff}.v2-bell svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.work-context-strip{display:flex;height:38px;min-height:38px;align-items:center;gap:8px;padding:0 24px;overflow:hidden;border-bottom:1px solid var(--v2-divider);color:var(--v2-secondary);background:#fff;font-size:12px}.work-context-strip>span{flex:0 0 auto}.work-context-strip button{display:inline-flex;height:28px;min-width:0;align-items:center;gap:8px;padding:0 8px;overflow:hidden;border:0;border-radius:6px;color:var(--v2-text);background:#f4f6f4;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.work-context-strip button:hover{background:var(--v2-selection)}.work-context-strip i{color:var(--v2-secondary);font-style:normal}
.view{display:none;min-width:0;min-height:0;flex:1;padding:16px 20px 20px;overflow:auto;background:#fff;scrollbar-gutter:stable}.view.active{display:block}.view>.panel{min-width:0;margin:0 auto;border:1px solid var(--v2-divider);border-radius:8px;box-shadow:none}.panel-heading{min-height:44px;margin:0 0 12px;padding:0 0 12px;border-bottom:1px solid var(--v2-divider)}.panel-heading h2{margin:0;font-size:20px;line-height:28px;font-weight:600}.panel-heading :is(.eyebrow,p:not(.eyebrow)){display:none}.badge{border-radius:4px;font-size:12px}
.workspace-full{width:100%;max-width:none;margin-inline:0}.workspace-standard{width:100%;max-width:var(--workspace-standard-max);margin-inline:auto}.workspace-compact{width:min(100%,var(--workspace-compact-max));margin-inline:auto}

/* Today */
.v2-today{width:100%;max-width:none;margin:0 auto;padding:0 16px 20px}.v2-today.active{display:block}.v2-page-header{display:none}.today-status-line{display:flex;width:100%;min-height:34px;align-items:center;gap:18px;margin:12px 0 8px;padding:6px 10px;border-radius:6px;color:var(--v2-text);background:var(--v2-background);font-size:14px}.today-status-line strong{font-size:13px}.today-status-line .warning,.v2-warning-count{color:var(--v2-warning);background:var(--v2-warning-bg);padding:2px 6px;border-radius:4px}.today-section{width:100%;margin-top:8px}.v2-section-heading{display:flex;min-height:34px;align-items:center;justify-content:space-between;gap:12px}.v2-section-heading>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px}.v2-section-heading h3{margin:0;font-size:16px;line-height:22px;font-weight:600}.v2-section-heading :is(span,button){color:var(--v2-secondary);font-size:14px}.today-attention-list{overflow:hidden;border:1px solid var(--v2-divider);border-radius:6px}.today-attention-row{display:grid;width:100%;min-height:52px;grid-template-columns:18px minmax(220px,1.4fr) minmax(160px,1fr) auto;align-items:center;gap:10px;padding:0 10px;border:0;border-bottom:1px solid var(--v2-divider);background:#fff;text-align:left}.today-attention-row:last-child{border-bottom:0}.today-attention-row:hover{background:var(--v2-background)}.today-attention-row i{display:grid;width:16px;height:16px;place-items:center;border:1px solid currentColor;border-radius:50%;color:var(--v2-secondary);font-size:12px;font-style:normal}.today-attention-row.warning i{color:var(--v2-warning)}.today-attention-row strong,.today-attention-row span{overflow-wrap:anywhere;white-space:normal}.today-attention-row strong{font-size:14px}.today-attention-row span{color:var(--v2-secondary);font-size:13px}.today-attention-row b{color:var(--v2-primary);font-size:13px;font-weight:500}.today-visits{margin-top:20px}.today-visit-table{width:100%;overflow:hidden;border-top:1px solid var(--v2-divider)}.today-visit-head,.today-visit-row{display:grid;grid-template-columns:58px minmax(110px,1.1fr) minmax(110px,1.1fr) minmax(80px,.8fr) minmax(100px,1fr) minmax(100px,1fr) auto;align-items:center;gap:10px;padding:0 10px}.today-visit-head{height:36px;color:var(--v2-secondary);background:var(--v2-background);font-size:13px}.today-visit-row{width:100%;min-height:56px;border:0;border-bottom:1px solid var(--v2-divider);background:#fff;font-size:14px;text-align:left}.today-visit-row:hover,.today-visit-row.selected{background:var(--v2-selection)}.today-visit-row>strong{font-size:14px}.today-visit-row>span{min-width:0;color:var(--v2-text);overflow-wrap:anywhere;white-space:normal}.visit-client small{display:none}.today-row-actions{display:flex;justify-content:flex-end;gap:5px;overflow:visible!important}.today-row-actions i{display:inline-flex;height:34px;align-items:center;padding:0 7px;border:1px solid var(--v2-divider);border-radius:6px;color:var(--v2-text);background:#fff;font-size:13px;font-style:normal}.v2-empty-row{min-height:52px;padding:16px;color:var(--v2-secondary);font-size:13px}

/* Full-height workspaces */
#view-bookings,#view-clients,#view-messages,#view-products,#view-payments,#view-specialists,#view-services{overflow:hidden}#view-bookings.active,#view-clients.active,#view-messages.active,#view-products.active,#view-payments.active,#view-specialists.active,#view-services.active{display:flex}:is(.bookings-panel,.clients-panel,.messaging-panel,.products-panel,.payments-panel,.resource-manager,.services-panel){display:flex;width:100%;height:100%;max-width:1400px;min-height:0;flex-direction:column;padding:14px 16px;overflow:hidden}#view-bookings .panel-heading,#view-clients .panel-heading,#view-products .panel-heading,#view-payments .panel-heading,#view-specialists .panel-heading,#view-services .panel-heading{display:none}.booking-primary-filters,.payment-query-bar,.notification-toolbar,.booking-filters,.payment-journal-filters,.service-quick-filters{display:flex;flex-wrap:wrap;align-items:end;gap:8px}.booking-primary-filters,.payment-query-bar{flex:0 0 auto;padding:0 0 8px;border-bottom:1px solid var(--v2-divider)}:is(.booking-primary-filters,.payment-query-bar,.notification-toolbar,.booking-filters,.payment-journal-filters,.client-search) label,.client-search{display:grid;gap:4px;color:var(--v2-secondary);font-size:12px}:is(.booking-primary-filters,.payment-query-bar,.notification-toolbar,.booking-filters,.payment-journal-filters,.client-search) :is(select,input){height:34px;min-height:34px;padding-block:0;border:1px solid var(--v2-divider);border-radius:6px;background:#fff;font-size:13px}.booking-extra-filters,.payment-extra-filters{flex:0 0 auto;margin:6px 0;border-bottom:1px solid var(--v2-divider)}.booking-extra-filters>summary,.payment-extra-filters>summary{padding:6px 0;font-size:12px;cursor:pointer}.booking-extra-filters>summary span,.payment-extra-filters>summary span{margin-left:8px;color:var(--v2-secondary)}.booking-filters,.payment-journal-filters{padding:4px 0 8px}.booking-view-toolbar{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 8px}.booking-view-switch{display:inline-flex;border-bottom:1px solid var(--v2-divider)}.booking-view-switch button{height:32px;min-height:32px;padding:0 12px;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--v2-secondary);background:transparent;font-size:12px}.booking-view-switch button.is-active{border-color:var(--v2-primary);color:var(--v2-primary);font-weight:600}.booking-calendar-navigation{display:flex;align-items:center;gap:5px}.booking-calendar-navigation button{height:32px;min-height:32px;padding:0 9px;border:1px solid var(--v2-divider);border-radius:6px;background:#fff;font-size:12px}.booking-calendar-navigation strong{min-width:210px;text-align:center;text-transform:capitalize}#booking-list,#booking-calendar{min-height:0;flex:1;overflow:auto;border:1px solid var(--v2-divider);border-radius:6px}.booking-list{display:grid;align-content:start;gap:0}.booking-card{min-height:52px;border:0;border-bottom:1px solid var(--v2-divider);border-radius:0;box-shadow:none}.booking-calendar-grid{position:relative;display:grid;min-width:max(100%,calc(var(--calendar-columns) * 150px + 42px));grid-template-columns:42px repeat(var(--calendar-columns),minmax(150px,1fr));background:#fff}.booking-calendar-axis{position:sticky;z-index:3;left:0;display:grid;grid-template-rows:46px repeat(14,69px);border-right:1px solid var(--v2-divider);color:var(--v2-secondary);background:#fff;font-size:12px;text-align:center}.booking-calendar-axis span{padding-top:5px;border-bottom:1px solid var(--v2-divider)}.booking-calendar-column{min-width:0;border-right:1px solid var(--v2-divider)}.booking-calendar-column>header{position:sticky;z-index:2;top:0;display:flex;height:46px;align-items:center;justify-content:center;gap:6px;padding:6px;border-bottom:1px solid var(--v2-divider);background:#fff;text-align:center}.booking-calendar-column>header strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.booking-calendar-column>header small{color:var(--v2-secondary);font-size:12px}.booking-calendar-track{position:relative;height:966px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 68px,var(--v2-divider) 68px,var(--v2-divider) 69px)}.booking-calendar-track>i{display:none}.booking-calendar-card{position:absolute;z-index:1;top:var(--booking-top);left:4px;width:calc(100% - 8px);height:var(--booking-height);min-height:24px;display:flex;flex-direction:column;gap:1px;overflow:hidden;padding:4px 6px;border:1px solid #bdd8ca;border-left:3px solid var(--v2-primary);border-radius:5px;color:var(--v2-text);background:#edf6f0;text-align:left;box-shadow:none}.booking-calendar-card:hover,.booking-calendar-card.is-selected{background:#dfeee5;border-color:#7caf95}.booking-calendar-card :is(time,strong,span,small){overflow:hidden;line-height:15px;text-overflow:ellipsis;white-space:nowrap}.booking-calendar-card time{color:var(--v2-primary);font-size:12px;font-weight:600}.booking-calendar-card strong{font-size:12px}.booking-calendar-card :is(span,small){color:var(--v2-secondary);font-size:12px}.booking-calendar-card.pending{border-left-color:#b58a45;background:#fbf6e9}.booking-calendar-card.cancelled,.booking-calendar-card.no-show{opacity:.62}.booking-calendar-now{position:absolute;z-index:2;top:calc(46px + var(--now-top));left:42px;right:0;height:1px;background:#d34e45;pointer-events:none}.booking-calendar-now::before{content:"";position:absolute;left:-3px;top:-3px;width:7px;height:7px;border-radius:50%;background:#d34e45}

/* Directories */
.client-search{flex:0 0 auto;margin:0 0 8px}.client-search input{width:min(360px,100%)}.client-list{min-height:0;flex:1;overflow:auto;border:1px solid var(--v2-divider);border-radius:6px}.client-table-header,.client-row{display:grid;grid-template-columns:minmax(180px,1.35fr) 140px 120px 120px 80px 90px 34px;align-items:center;gap:10px;padding:0 10px}.client-table-header{position:sticky;z-index:2;top:0;height:34px;color:var(--v2-secondary);background:var(--v2-background);font-size:12px}.client-row{width:100%;min-height:52px;border:0;border-bottom:1px solid var(--v2-divider);background:#fff;text-align:left}.client-row:hover,.client-row:focus-visible{background:var(--v2-selection)}.client-identity{display:flex;min-width:0;align-items:center;gap:9px}.client-avatar{display:grid;width:30px;height:30px;flex:0 0 30px;place-items:center;border-radius:50%;color:var(--v2-primary);background:var(--v2-selection);font-weight:600}.client-main{min-width:0}.client-main :is(strong,small){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.client-main small,.client-row>span{color:var(--v2-secondary);font-size:12px}.client-row-action{text-align:right}.clients-panel:has(.v2-client-context:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) 392px;grid-template-rows:auto minmax(0,1fr)}.clients-panel:has(.v2-client-context:not([hidden])) .client-search{grid-column:1}.clients-panel:has(.v2-client-context:not([hidden])) .client-list{grid-column:1}.v2-client-context{grid-column:2;grid-row:1/3;margin:-14px -16px -14px 16px;padding:18px 16px;overflow:auto;border-left:1px solid var(--v2-divider);background:#fff}.v2-client-context header{display:flex;justify-content:space-between;gap:10px}.v2-client-context h2{margin:3px 0;font-size:18px}.v2-client-context header :is(small,span),.v2-client-context section>span{display:block;color:var(--v2-secondary);font-size:12px}.v2-context-tags,.v2-context-actions{display:flex;gap:7px;margin:12px 0}.v2-context-tags span{padding:3px 7px;border-radius:4px;background:var(--v2-selection);font-size:12px}.v2-client-context section{display:grid;gap:4px;padding:13px 0;border-top:1px solid var(--v2-divider)}.v2-client-context section h3{margin:0 0 3px;font-size:12px}.v2-context-metrics{grid-template-columns:repeat(3,1fr)}.v2-context-metrics div{display:grid;gap:2px}
.resource-list,.service-cards{min-height:0;flex:1;overflow:auto;border:1px solid var(--v2-divider);border-radius:6px}.resource-manager .resource-row{width:100%;min-height:52px;border:0;border-bottom:1px solid var(--v2-divider);border-radius:0;background:#fff;box-shadow:none}.resource-manager .resource-row:hover{transform:none;background:var(--v2-background);box-shadow:none}.specialist-table-head{display:grid;grid-template-columns:minmax(220px,1fr) 130px 90px 70px;height:34px;align-items:center;gap:10px;padding:0 12px;color:var(--v2-secondary);background:var(--v2-background);font-size:12px}#view-specialists .specialist-row{grid-template-columns:36px minmax(0,1fr) 90px 70px;min-height:52px;padding:5px 12px}.specialist-row-avatar{display:grid;width:32px;height:32px;place-items:center;overflow:hidden;border-radius:50%;color:var(--v2-primary);background:var(--v2-selection);font-size:13px;font-weight:600}.specialist-row-avatar img{width:100%;height:100%;object-fit:cover}.specialist-row-action{color:var(--v2-primary);font-size:12px}.service-quick-filters{flex:0 0 auto;margin-bottom:8px}.service-quick-filters button{height:30px;min-height:30px;padding:0 10px;border:1px solid var(--v2-divider);border-radius:6px;background:#fff;font-size:12px}.service-quick-filters button.is-active{color:var(--v2-primary);border-color:#b6d2c3;background:var(--v2-selection)}.service-group{border-bottom:1px solid var(--v2-divider)}.service-group-heading{display:flex;min-height:48px;align-items:center;justify-content:space-between;padding:7px 12px;list-style:none;cursor:pointer}.service-group-title h3{margin:0;font-size:14px}.service-group-title small{color:var(--v2-secondary);font-size:12px}.service-table-header,.service-table-row{display:grid;grid-template-columns:minmax(0,1fr) 96px 120px 80px 90px 16px;align-items:center;gap:10px;padding:0 12px}.service-table-header{height:30px;color:var(--v2-secondary);background:var(--v2-background);font-size:12px}.service-table-row{width:100%;min-height:48px;border:0;border-top:1px solid var(--v2-divider);background:#fff;text-align:left}.service-table-row:hover{background:var(--v2-selection)}.service-row-name :is(strong,small){display:block}.service-row-name small{color:var(--v2-secondary);font-size:12px}

/* Messaging */
.messaging-panel{padding:0}.messaging-intro{display:none}.messaging-layout{display:grid;height:100%;min-height:0;grid-template-columns:232px minmax(320px,1fr) 344px;overflow:hidden}.conversation-pane,.message-pane,.v2-message-context{min-width:0;min-height:0;overflow:hidden;border-right:1px solid var(--v2-divider);background:#fff}.conversation-pane{display:flex;flex-direction:column}.conversation-pane-heading{flex:0 0 auto;padding:12px}.conversation-pane-heading strong{display:block;margin-bottom:8px;font-size:14px}.conversation-search input{width:100%;height:34px;min-height:34px;border-radius:6px}.conversation-filters{display:flex;flex:0 0 auto;padding:0 10px 8px;border-bottom:1px solid var(--v2-divider)}.conversation-filters button{height:28px;min-height:28px;padding:0 8px;border:0;background:transparent;font-size:12px}.conversation-filters .is-active{color:var(--v2-primary);background:var(--v2-selection);border-radius:5px}.conversation-list{min-height:0;flex:1;overflow:auto}.conversation-item{min-height:58px;border-radius:0}.conversation-item.is-active{background:var(--v2-selection)}.message-pane{display:flex;flex-direction:column}.message-pane-heading{flex:0 0 auto;min-height:54px;border-bottom:1px solid var(--v2-divider)}.message-history{min-height:0;flex:1;overflow:auto;background:var(--v2-background)}.message-bubble{border-radius:7px;box-shadow:none}.message-row.outgoing .message-bubble{background:var(--v2-selection)}.message-compose{flex:0 0 auto;border-top:1px solid var(--v2-divider);background:#fff}.messaging-back{display:none}.v2-message-context{padding:16px;border-right:0;overflow:auto}.v2-context-heading{display:grid;gap:3px;margin-bottom:12px}.v2-context-heading small,.v2-context-heading span,.v2-message-context section>span{color:var(--v2-secondary);font-size:12px}.v2-context-heading strong{font-size:16px}.v2-context-heading em{width:max-content;padding:2px 6px;border-radius:4px;color:var(--v2-warning);background:var(--v2-warning-bg);font-size:12px;font-style:normal}.v2-message-context>button{width:100%;margin-bottom:7px}.v2-message-context section{display:grid;gap:4px;margin-top:12px;padding-top:12px;border-top:1px solid var(--v2-divider)}.v2-message-context section h3{margin:0;font-size:12px}.v2-context-empty{display:grid;gap:8px;color:var(--v2-secondary);font-size:12px}

/* Products and management */
.products-tabs,.settings-tabs,.notification-tabs{display:flex;flex:0 0 auto;gap:0;margin:0 0 10px;padding:0;overflow-x:auto;border-bottom:1px solid var(--v2-divider);border-radius:0;background:transparent}:is(.products-tabs,.settings-tabs,.notification-tabs)>button{height:34px;min-height:34px;flex:0 0 auto;padding:0 12px;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--v2-secondary);background:transparent;font-size:13px}:is(.products-tabs,.settings-tabs,.notification-tabs)>button:is(.active,.is-active){color:var(--v2-primary);border-color:var(--v2-primary);font-weight:600}.product-card-grid,.payment-journal-list{min-height:0;flex:1;overflow:auto}.product-card{border-radius:0;box-shadow:none}.product-thumbnail{width:48px;height:48px;flex:0 0 48px;object-fit:cover;border:1px solid var(--v2-divider);border-radius:6px}.integration-catalog,.settings-workspace,.notifications-panel{width:100%;max-width:1180px;margin:0 auto}.integration-item,.settings-workspace,.notifications-panel{border-color:var(--v2-divider);border-radius:8px;box-shadow:none}.integration-catalog-row{min-height:64px}
.product-table{width:100%;min-width:0;overflow:hidden;border:1px solid var(--v2-divider);border-radius:6px}.product-table-header,.product-table-row{display:grid;grid-template-columns:minmax(190px,1fr) 86px 68px 92px 88px minmax(330px,max-content);align-items:center;gap:10px;padding:0 12px}.product-table-header{position:sticky;z-index:2;top:0;height:34px;color:var(--v2-secondary);background:var(--v2-background);font-size:12px}.product-table-row{width:100%;min-height:52px;border:0;border-top:1px solid var(--v2-divider);background:#fff;text-align:left}.product-table-row:hover{background:var(--v2-selection)}.product-table-row>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.product-table-row>span{min-width:0;color:var(--v2-secondary);font-size:12px}.product-row-actions{display:flex;min-width:0;justify-content:flex-end;gap:4px}.product-row-actions button{height:28px;min-height:28px;padding:0 7px;border:1px solid var(--v2-divider);border-radius:5px;background:#fff;font-size:12px}.product-table-certificates .product-table-header,.product-table-certificates .product-table-row{grid-template-columns:minmax(220px,1.6fr) 110px 110px 90px 100px 20px}

.certificate-lookup-workspace{display:grid;grid-template-columns:minmax(280px,440px) minmax(0,1fr);align-items:start;gap:16px}.certificate-lookup-workspace>.form-card{padding:16px;border-radius:8px;box-shadow:none}.certificate-lookup-workspace>.source-note{grid-column:1/-1;margin:0}.certificate-lookup-result{margin:0;padding:16px;border:1px solid var(--v2-divider);border-radius:8px;background:#fff}.certificate-lookup-result>div{min-width:0}.certificate-lookup-result strong{overflow-wrap:anywhere}@media(max-width:780px){.certificate-lookup-workspace{grid-template-columns:minmax(0,1fr)}}

/* Schedule */
#view-schedule{padding:16px 20px 20px;overflow:auto}.calendar-panel{display:grid;width:100%;max-width:1180px;min-height:650px;grid-template-columns:minmax(0,1fr) 384px;grid-template-rows:auto minmax(0,1fr) auto;gap:0 20px;margin:0 auto;padding:16px;overflow:hidden;border:1px solid var(--v2-divider);border-radius:8px;background:#fff}.calendar-filters{grid-column:2;grid-row:1;padding:0 0 12px}.schedule-specialist-select{display:grid;width:100%;gap:4px;color:var(--v2-secondary);font-size:13px}.schedule-specialist-select select{width:100%;height:36px;min-height:36px}.schedule-workspace{grid-column:1;grid-row:1/3;min-width:0;min-height:0;margin:0;padding-right:20px;border-right:1px solid var(--v2-divider)}.schedule-calendar-area{height:100%}.calendar-heading{display:flex;min-height:48px;align-items:center;justify-content:space-between;gap:10px}.calendar-heading .eyebrow{display:none}.calendar-heading h2{margin:0;font-size:20px}.calendar-navigation{display:flex;align-items:center;gap:5px}.calendar-navigation button{height:32px;min-height:32px;padding:0 9px;border-radius:6px;font-size:12px}.schedule-quick-actions{display:flex;align-items:center;gap:6px;margin:5px 0 10px;color:var(--v2-secondary);font-size:13px}.schedule-quick-actions button{height:28px;min-height:28px;padding:0 8px;border:1px solid var(--v2-divider);border-radius:5px;background:#fff;font-size:13px}.calendar-weekdays,.month-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.calendar-weekdays{margin-bottom:5px}.calendar-weekdays button{height:28px;min-height:28px;border:0;color:var(--v2-secondary);background:transparent;font-size:13px}.calendar-weekdays button.selected{color:var(--v2-primary);background:var(--v2-selection);border-radius:5px}.calendar-day{position:relative;min-width:0;min-height:76px;padding:7px;border:1px solid var(--v2-divider);border-radius:6px;color:var(--v2-text);background:#fff;text-align:left}.calendar-day:hover{transform:none;border-color:#a9c9b7}.calendar-day .day-number{display:block;font-size:13px;font-weight:600}.calendar-day small{display:block;margin-top:8px;overflow:hidden;color:var(--v2-secondary);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.calendar-day.working{border-color:#7a9e87;background:#f3f8f5}.calendar-day.individual{border-color:#a38447;background:#fcf8ee}.calendar-day.unavailable{color:#72534b;background:#f8f3f2}.calendar-day.selected{padding:6px;border:2px solid var(--v2-primary);background:var(--v2-selection);box-shadow:none}.calendar-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--v2-primary)}.calendar-day.today::after{content:"•";position:absolute;top:4px;right:7px;color:var(--v2-primary)}.calendar-break-indicator{position:absolute;right:7px;bottom:7px;width:6px;height:6px;border-radius:2px;background:#76669a}.calendar-editor{grid-column:2;grid-row:2;display:flex;width:100%;min-width:0;flex-direction:column;gap:12px;padding:0;border:0}.schedule-editor-heading{padding-bottom:10px;border-bottom:1px solid var(--v2-divider)}.schedule-editor-heading h3{margin:0 0 4px;font-size:16px}.selection-summary :is(strong,small){display:block}.selection-summary strong{font-size:12px}.selection-summary small{color:var(--v2-secondary);font-size:13px}.schedule-controls{display:grid;grid-template-columns:1fr;gap:12px;max-width:none}.schedule-section-heading{margin-bottom:8px}.schedule-section-heading :is(strong,small){display:block}.schedule-section-heading small{color:var(--v2-secondary);font-size:12px}.calendar-times,.schedule-break-row{display:grid;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr) 28px;align-items:end;gap:6px}.calendar-times label:first-child{grid-column:1}.calendar-times .schedule-time-separator{grid-column:2}.calendar-times label:nth-of-type(2){grid-column:3}.calendar-times label{display:grid;gap:4px;min-width:0;color:var(--v2-secondary);font-size:12px}.calendar-times input,.schedule-break-row input{width:100%;height:36px;min-height:36px;padding:0 7px;text-align:center}.schedule-time-separator,.schedule-break-separator{align-self:end;padding-bottom:9px;color:var(--v2-secondary);text-align:center}.schedule-boundary-note{grid-column:1/4;color:var(--v2-secondary);font-size:12px}.schedule-break-editor{display:grid;gap:8px;padding:10px;border:1px solid var(--v2-divider);border-radius:7px;background:var(--v2-background)}.schedule-break-editor>div:first-child :is(strong,small){display:block}.schedule-break-editor>div:first-child small,.schedule-break-empty{color:var(--v2-secondary);font-size:12px}.schedule-break-row label{display:grid;gap:4px;min-width:0;margin:0;color:var(--v2-secondary);font-size:12px}.schedule-break-row .text-button{grid-column:4;width:28px;height:36px;min-height:36px;padding:0;font-size:18px}#add-schedule-break{width:100%;height:34px;min-height:34px}.schedule-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:auto}.schedule-actions>button{width:100%;min-height:36px;padding:0 8px;font-size:13px}.schedule-actions .primary{grid-column:1/-1}.schedule-actions #clear-selected-days{grid-column:1/-1;border:0}.calendar-hint{grid-column:1/-1;grid-row:3;margin:12px 0 0;padding-top:10px;border-top:1px solid var(--v2-divider);color:var(--v2-secondary);font-size:12px}

/* Context and editors */
dialog.booking-dialog,dialog.client-dialog{width:min(392px,100vw);max-width:none;height:100dvh;max-height:none;margin:0 0 0 auto;padding:0;border:0;border-left:1px solid var(--v2-divider);border-radius:0;box-shadow:-12px 0 32px rgba(37,45,41,.12)}dialog.booking-dialog::backdrop,dialog.client-dialog::backdrop,dialog.resource-editor::backdrop,dialog.product-editor::backdrop{background:rgba(37,45,41,.12)}.booking-dialog .booking-details,.client-dialog .client-profile{height:100%;overflow:auto;border-radius:0;box-shadow:none}.booking-dialog .dialog-heading,.client-profile-header{position:sticky;z-index:3;top:0;background:#fff;border-bottom:1px solid var(--v2-divider)}.booking-detail-grid{grid-template-columns:1fr}.booking-detail-grid>div{min-height:42px;padding:8px 0;border-bottom:1px solid var(--v2-divider)}.client-profile-tabs{position:sticky;z-index:2;top:72px;background:#fff}dialog.booking-dialog.v2-checkout-open{width:min(1180px,calc(100vw - var(--sidebar-width)));margin:auto}dialog.booking-dialog.v2-checkout-open .booking-details{display:grid;height:100%;grid-template-columns:minmax(0,1fr) 384px;grid-auto-rows:max-content;padding:0;overflow:auto}dialog.booking-dialog.v2-checkout-open .booking-details>.dialog-heading{grid-column:1/-1}dialog.booking-dialog.v2-checkout-open .booking-details>:not(.dialog-heading):not(#payment-panel){grid-column:1;margin-right:20px;margin-left:20px}dialog.booking-dialog.v2-checkout-open #payment-panel{display:block;grid-column:2;grid-row:2/20;min-width:0;height:calc(100dvh - 73px);margin:0;padding:20px;overflow:auto;border-left:1px solid var(--v2-divider);background:var(--v2-background)}dialog.resource-editor,dialog.product-editor{width:min(720px,calc(100vw - 32px));max-height:min(90dvh,820px);padding:0;overflow:hidden;border:0;border-radius:10px}.resource-modal,.product-editor-form{max-height:min(90dvh,820px);overflow:auto;border:0;box-shadow:none}.resource-modal-heading,.product-editor-heading{position:sticky;z-index:3;top:0;background:#fff}.v2-bottom-nav{display:none}

@media (min-width:781px) and (max-width:1100px){
  :root{--sidebar-width:64px}.sidebar{padding-inline:8px}.sidebar :is(.v2-brand>span:last-child,.v2-sidebar-search input,.v2-sidebar-search kbd,.v2-create span,.v2-nav-primary .nav-item span,.v2-nav-count,.v2-nav-group>summary span,.v2-nav-group>summary b,.v2-nav-group>div,.v2-help span,.user-card>span:last-child,.sidebar-label){display:none}.sidebar :is(.v2-sidebar-search,.v2-create,.nav-item,.v2-nav-group>summary,.v2-help){width:46px;justify-content:center;padding-inline:0}.sidebar .v2-brand{justify-content:center}.topbar,.work-context-strip{padding-inline:18px}.view{padding:14px}.today-visit-head,.today-visit-row{grid-template-columns:58px minmax(120px,1.2fr) minmax(105px,1fr) minmax(90px,.8fr) minmax(90px,.75fr) minmax(120px,1fr)}.today-visit-head>span:nth-child(7),.today-visit-row>span:nth-child(7){display:none}.messaging-layout{grid-template-columns:210px minmax(300px,1fr) 280px}.calendar-panel{grid-template-columns:1fr;grid-template-rows:auto auto auto auto;max-width:900px;overflow:visible}.calendar-filters{grid-column:1;grid-row:1}.schedule-workspace{grid-column:1;grid-row:2;padding:0 0 16px;border-right:0;border-bottom:1px solid var(--v2-divider)}.calendar-editor{grid-column:1;grid-row:3;width:min(400px,100%);margin:16px auto 0}.calendar-hint{grid-row:4}
}

@media (max-width:780px){
  html,body{overflow:hidden}.app-shell{display:block;height:100dvh}.sidebar{display:none}.main{height:100dvh;padding-bottom:74px}.topbar{height:56px;min-height:56px;padding:0 12px}.menu-button{display:none}.topbar h1{font-size:18px;line-height:24px}#v2-topbar-meta{display:none}.v2-topbar-actions{margin-left:auto}.v2-route-actions:not([data-v2-route-actions="dashboard"]){display:none}.v2-route-actions[data-v2-route-actions="dashboard"] select{display:none}.v2-route-actions[data-v2-route-actions="dashboard"] button{min-width:36px;padding:0 7px;font-size:0}.v2-route-actions[data-v2-route-actions="dashboard"] button::before{content:"+";font-size:18px}.work-context-strip{height:34px;min-height:34px;padding:0 12px}.work-context-strip>span{display:none}.view{padding:12px 12px 16px;overflow:auto;scrollbar-gutter:auto}.view>.panel{border:0;border-radius:0}.v2-bottom-nav{position:fixed;z-index:80;right:0;bottom:0;left:0;display:grid;height:74px;grid-template-columns:repeat(5,1fr);padding:6px 5px max(6px,env(safe-area-inset-bottom));border-top:1px solid var(--v2-divider);background:rgba(255,255,255,.98)}.v2-bottom-nav button{display:flex;min-width:0;min-height:52px;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:0;border:0;color:var(--v2-secondary);background:transparent;font-size:12px}.v2-bottom-nav svg{width:21px;height:21px}.v2-bottom-nav button.active{color:var(--v2-primary)}
  .v2-today{padding:0 0 10px}.v2-page-header{display:block;min-height:0}.v2-page-header>div:first-child{display:flex;min-height:44px;align-items:center;justify-content:space-between}.v2-page-header h2{display:none}.v2-page-header #today-date{color:var(--v2-text);font-size:13px;font-weight:600;text-transform:capitalize}.v2-page-header .v2-page-actions{display:none}.today-status-line{gap:9px;margin:0 0 8px;padding:6px 8px;overflow-x:auto;white-space:nowrap}.today-status-line span:nth-of-type(2),.today-status-line span:nth-of-type(4){display:none}.v2-section-heading{min-height:38px}.today-attention-row{grid-template-columns:18px minmax(0,1fr) auto;min-height:52px;padding:6px 8px}.today-attention-row span{grid-column:2}.today-attention-row b{grid-column:3;grid-row:1/3}.today-visit-head{display:none}.today-visit-table{border:1px solid var(--v2-divider);border-radius:7px}.today-visit-row{display:grid;grid-template-columns:54px minmax(0,1fr) auto;min-height:68px;gap:3px 8px;padding:8px}.today-visit-row>strong{grid-row:1/3;align-self:start}.today-visit-row>span{display:none}.today-visit-row .visit-client{display:block;grid-column:2;color:var(--v2-text);font-weight:600}.today-visit-row .visit-client small{display:block;margin-top:3px;color:var(--v2-secondary);font-weight:400}.today-visit-row>span:nth-child(3){display:block;grid-column:2}.today-row-actions{display:flex!important;grid-column:3;grid-row:1/3;align-self:center}.today-row-actions i:not(:last-child){display:none}
  #view-bookings,#view-clients,#view-messages,#view-products,#view-payments,#view-specialists,#view-services{padding:0}:is(.bookings-panel,.clients-panel,.messaging-panel,.products-panel,.payments-panel,.resource-manager,.services-panel){padding:10px 12px}.booking-primary-filters,.booking-extra-filters{display:none}.booking-view-toolbar{display:grid;grid-template-columns:1fr;margin:0 0 8px}.booking-view-switch{order:2;justify-content:center}.booking-view-switch [data-booking-view="list"],.booking-view-switch [data-booking-view="week"]{display:none}.booking-calendar-navigation{display:grid;grid-template-columns:36px minmax(0,1fr) 36px}.booking-calendar-navigation strong{min-width:0;font-size:13px}.booking-calendar-navigation [data-booking-calendar-move="today"]{display:none}#booking-calendar{border:0}.booking-mobile-agenda{display:grid;gap:8px}.booking-mobile-agenda-meta{display:flex;align-items:center;justify-content:space-between;padding:5px 2px;text-transform:capitalize}.booking-mobile-agenda-meta span{color:var(--v2-secondary);font-size:12px}.booking-mobile-agenda-list{display:grid;gap:7px}.booking-mobile-card{display:grid;width:100%;min-height:64px;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid var(--v2-divider);border-left:3px solid var(--v2-primary);border-radius:7px;background:#fff;text-align:left}.booking-mobile-card time{color:var(--v2-primary);font-weight:600}.booking-mobile-card span :is(strong,small){display:block}.booking-mobile-card span small{margin-top:3px;color:var(--v2-secondary);font-size:12px;line-height:16px}.booking-mobile-card i{color:var(--v2-secondary);font-size:12px;font-style:normal}
  .client-search input{width:100%}.client-table-header{display:none}.client-row{grid-template-columns:minmax(0,1fr) auto;min-height:58px}.client-row>span:not(.client-identity):not(.client-row-action){display:none}.clients-panel:has(.v2-client-context:not([hidden])){display:flex}.v2-client-context{position:fixed;z-index:70;inset:56px 0 74px;margin:0;padding:16px;border:0}.specialist-table-head,.service-table-header{display:none}#view-specialists .specialist-row{grid-template-columns:36px minmax(0,1fr) auto;min-height:58px}#view-specialists .specialist-row .specialist-row-action{display:none}.service-group-heading{min-height:54px}.service-table-row{grid-template-columns:minmax(0,1fr) auto;min-height:56px}.service-table-row>span:not(.service-row-name):not(.status){display:none}
  .messaging-panel{padding:0}.messaging-layout{display:block;position:relative}.conversation-pane{height:100%;border:0}.message-pane,.v2-message-context{display:none}.messaging-layout.conversation-open .conversation-pane{display:none}.messaging-layout.conversation-open .message-pane{display:flex;position:absolute;inset:0;border:0;background:#fff}.messaging-layout.conversation-open .messaging-back{display:block;flex:0 0 auto;height:40px;border:0;border-bottom:1px solid var(--v2-divider);background:#fff;text-align:left}.message-compose{padding-bottom:8px}.products-tabs{margin-bottom:8px}
  .calendar-panel{display:block;min-height:0;padding:10px;overflow:visible;border:0}#view-schedule{padding:0}.schedule-workspace{padding:0 0 14px;border:0}.calendar-heading{align-items:flex-start}.calendar-navigation{flex-wrap:wrap;justify-content:flex-end}#open-copy-schedule{display:inline-flex}.schedule-quick-actions{overflow-x:auto}.schedule-quick-actions span{display:none}.calendar-weekdays,.month-calendar{gap:3px}.calendar-day{min-height:50px;padding:5px 3px;text-align:center}.calendar-day small{display:none}.calendar-day.selected{padding:4px 2px}.calendar-editor{width:100%;margin-top:12px;padding-top:12px;border-top:1px solid var(--v2-divider)}.calendar-hint{display:none}
  dialog.booking-dialog,dialog.client-dialog,dialog.booking-dialog.v2-checkout-open{width:100vw;height:calc(100dvh - 74px);margin:0;border:0}dialog.booking-dialog.v2-checkout-open .booking-details{display:block;height:100%;overflow:auto}dialog.booking-dialog.v2-checkout-open .booking-details>.dialog-heading{position:sticky;top:0}dialog.booking-dialog.v2-checkout-open .booking-details>:not(.dialog-heading):not(#payment-panel){margin-right:14px;margin-left:14px}dialog.booking-dialog.v2-checkout-open :is(.booking-status-strip,.booking-detail-grid,.booking-comment,.booking-internal-note,.visit-edit-panel,.reschedule-panel,.visit-outcome-actions,#booking-main-actions){display:none!important}dialog.booking-dialog.v2-checkout-open #payment-panel{height:auto;margin:0;padding:14px;border:0;background:#fff}dialog.resource-editor,dialog.product-editor{width:100vw;height:calc(100dvh - 74px);max-height:none;margin:0;border-radius:0}.resource-modal,.product-editor-form{max-height:100%}
}
@media (max-width:380px){.topbar{padding-inline:10px}.view{padding-inline:10px}.today-status-line{gap:7px}.calendar-times,.schedule-break-row{grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr) 26px;gap:4px}.schedule-actions{grid-template-columns:1fr}.schedule-actions .primary,.schedule-actions #clear-selected-days{grid-column:1}}

/* Legacy shell normalization. These selectors counter the pre-V2 rail only;
   all workspace geometry above remains the single V2 source of truth. */
@media (min-width:1101px){
  .app-shell{grid-template-columns:var(--sidebar-expanded-width) minmax(0,1fr)!important}
  .app-shell>.sidebar,.app-shell.sidebar-collapsed>.sidebar{width:var(--sidebar-expanded-width);overflow-x:hidden}
  .sidebar>.sidebar-brand-row,.sidebar>.nav,.sidebar>.sidebar-footer{width:100%}
  .sidebar>.sidebar-brand-row{justify-items:stretch}
  .sidebar>.sidebar-brand-row .brand{width:100%;justify-content:flex-start}
  .sidebar .v2-nav-primary>.main-nav-group,.sidebar .v2-nav-primary>.main-nav-group[open]{position:relative;width:100%}
  .sidebar .v2-nav-primary>.main-nav-group>summary{width:100%;height:34px;min-height:34px;margin:0;padding:0 10px;justify-content:flex-start;gap:10px;overflow:visible;font-family:inherit;font-size:14px!important;font-weight:400!important}
  .sidebar .v2-nav-primary>.main-nav-group>summary>b{display:block!important}
  .sidebar>.sidebar-footer{display:grid;justify-items:stretch}
  .sidebar>.sidebar-footer :is(.v2-help,.user-card,.text-button){width:100%;justify-content:flex-start}
  .sidebar>.sidebar-footer .user-card>span:last-child,.sidebar>.sidebar-footer .sidebar-label{position:static;display:block;width:auto;padding:0;border:0;text-align:left}
  .sidebar>.sidebar-footer .text-button{min-height:32px;padding:0 10px;gap:8px;font-size:12px!important}
}
.calendar-editor{background:#fff}
@media (max-width:780px){
  .v2-route-actions[data-v2-route-actions="dashboard"] label{display:none}
  .v2-route-actions[data-v2-route-actions="dashboard"] #today-create-booking{min-width:78px;padding:0 10px;font-size:12px}
  .v2-route-actions[data-v2-route-actions="dashboard"] #today-create-booking::before{content:none}
  #booking-calendar{display:block;min-width:0;border:0;background:transparent;overflow:auto}
  .work-context-strip{display:none!important}
  body[data-active-view="messages"] .messaging-layout.conversation-open .message-pane{position:fixed;z-index:70;inset:56px 0 74px;height:auto;max-height:none;display:flex!important;visibility:visible;opacity:1;transform:none;background:#fff}
  .v2-bottom-nav button span{font-size:12px!important;line-height:14px;font-weight:500;white-space:nowrap}
  body[data-active-view="messages"] .message-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:8px 10px}
  body[data-active-view="messages"] .message-composer-tools{display:none}
  body[data-active-view="messages"] .message-composer textarea{height:44px;min-height:44px;font-size:16px}
  body[data-active-view="messages"] .message-composer button{width:auto;min-height:44px}
}
.resource-list,#view-specialists .resource-list{display:block}
.service-cards{display:grid;align-content:start}
.product-card-grid{display:block}

/* Manual acceptance fixes: keep these overrides scoped to the four reviewed workspaces. */
.v2-page-actions{display:flex;align-items:center;gap:12px}
.v2-page-filters{display:flex;align-items:center;gap:8px;padding-right:12px;border-right:1px solid var(--v2-divider)}
.v2-page-primary-action{flex:0 0 auto}
.v2-route-actions[data-v2-route-actions="bookings"] .booking-heading-actions{display:flex;align-items:center;gap:8px}
.v2-route-actions[data-v2-route-actions="bookings"] .booking-heading-actions .primary{margin-left:4px}

#view-bookings .booking-calendar-axis{grid-template-rows:46px repeat(14,100px)}
#view-bookings .booking-calendar-track{height:1400px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 49px,#f2f4f2 49px,#f2f4f2 50px,transparent 50px,transparent 99px,var(--v2-divider) 99px,var(--v2-divider) 100px)}
#view-bookings .booking-calendar-card{left:calc(4px + var(--booking-left,0%));width:calc(var(--booking-width,100%) - 8px);min-height:0;gap:4px;padding:8px;overflow:clip;border:1px solid var(--v2-divider);border-radius:6px;background:var(--v2-background)}
#view-bookings .booking-calendar-card:hover,#view-bookings .booking-calendar-card.is-selected{border-color:var(--v2-primary);background:var(--v2-selection)}
#view-bookings .booking-calendar-card :is(time,strong,span,small){min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view-bookings .booking-calendar-card-head{display:flex!important;min-height:15px;align-items:flex-start;justify-content:space-between;gap:6px;color:var(--v2-secondary);font-size:12px;line-height:15px}
#view-bookings .booking-calendar-card-head time{flex:1;color:inherit;font-size:12px;font-weight:600;line-height:15px}
#view-bookings .booking-calendar-status{flex:0 1 auto;text-align:right}
#view-bookings .booking-calendar-client{display:block;font-size:13px;line-height:18px}
#view-bookings .booking-calendar-service{display:block;color:var(--v2-secondary);font-size:12px;line-height:17px}
#view-bookings .booking-calendar-meta{display:block;color:var(--v2-secondary);font-size:12px;line-height:15px}
#view-bookings .booking-calendar-card.is-standard{gap:1px;padding:5px 7px}
#view-bookings .booking-calendar-card.is-standard .booking-calendar-card-head{min-height:14px;font-size:12px;line-height:14px}
#view-bookings .booking-calendar-card.is-standard .booking-calendar-card-head time{font-size:12px;line-height:14px}
#view-bookings .booking-calendar-card.is-standard .booking-calendar-client{font-size:14px;line-height:17px}
#view-bookings .booking-calendar-card.is-standard .booking-calendar-service{font-size:12px;line-height:15px}
#view-bookings .booking-calendar-card.is-compact{gap:1px;padding:4px 6px}
#view-bookings .booking-calendar-card.is-compact .booking-calendar-card-head{min-height:13px;font-size:12px;line-height:13px}
#view-bookings .booking-calendar-card.is-compact .booking-calendar-card-head time{font-size:12px;line-height:13px}
#view-bookings .booking-calendar-card.is-compact .booking-calendar-client{font-size:12px;line-height:15px}
#view-bookings .booking-calendar-card.is-micro{justify-content:center;padding:1px 4px}
#view-bookings .booking-calendar-card.is-micro .booking-calendar-card-head{min-height:13px;font-size:12px;line-height:13px}
#view-bookings .booking-calendar-card.is-micro .booking-calendar-card-head time{font-size:12px;line-height:13px}
#view-bookings .booking-calendar-card.is-expanded .booking-calendar-service.is-full-name{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}
#view-bookings .booking-calendar-card:is(.is-expanded,.is-roomy){gap:2px;padding:6px}
#view-bookings .booking-calendar-card:is(.is-expanded,.is-roomy) .booking-calendar-card-head time{font-size:12px;line-height:16px}
#view-bookings .booking-calendar-card:is(.is-expanded,.is-roomy) .booking-calendar-client{font-size:14px;line-height:18px}
#view-bookings .booking-calendar-card:is(.is-expanded,.is-roomy) .booking-calendar-service{font-size:13px;line-height:18px}
#view-bookings .booking-calendar-card:is(.is-expanded,.is-roomy) .booking-calendar-meta{font-size:12px;line-height:16px}
.service-calendar-name{display:grid;gap:4px}.service-calendar-name small{color:var(--v2-secondary);font-size:12px;font-weight:400}

/* Adapt to the actual lane width, independently of the screen width. Full data
   remains in the button's accessible name, native tooltip and visit drawer. */
#view-bookings .booking-calendar-card{container-type:inline-size}
#view-bookings .booking-calendar-now{z-index:0}
#view-bookings .booking-calendar-card .booking-calendar-status{font-size:12px;line-height:13px}
#view-bookings .booking-calendar-card :is(.calendar-time-full,.calendar-time-start,.calendar-status-full,.calendar-status-symbol,.calendar-client-full,.calendar-client-compact){font:inherit}
#view-bookings .booking-calendar-card-head time,#view-bookings .booking-calendar-status{flex:0 0 auto}
#view-bookings .booking-calendar-card .calendar-time-start,#view-bookings .booking-calendar-card .calendar-status-symbol,#view-bookings .booking-calendar-card .calendar-client-compact{display:none}
.calendar-status-key{padding:8px;color:var(--v2-secondary);font-size:12px;line-height:17px;white-space:normal}
.booking-mobile-visit-date{color:var(--v2-primary);font-size:12px;line-height:18px}
@container (max-width:240px){
  #view-bookings .booking-calendar-card .calendar-status-full{display:none}
  #view-bookings .booking-calendar-card .calendar-status-symbol{display:inline}
}
@container (max-width:180px){
  #view-bookings .booking-calendar-card .calendar-client-full{display:none}
  #view-bookings .booking-calendar-card .calendar-client-compact{display:inline}
}
@container (max-width:110px){
  #view-bookings .booking-calendar-card .calendar-time-full{display:none}
  #view-bookings .booking-calendar-card .calendar-time-start{display:inline}
  #view-bookings .booking-calendar-card-head{gap:3px}
}

@media (max-width:780px){
  /* Legacy .view width:max-content must not size the calendar from its text. */
  .main>#view-bookings{width:100%;max-width:100%;align-self:stretch}
  #view-bookings .bookings-panel{width:100%;max-width:100%;min-width:0}
  #view-bookings :is(.booking-view-toolbar,.booking-calendar-navigation,.booking-mobile-agenda,.booking-mobile-agenda-list){width:100%;min-width:0;grid-template-columns:minmax(0,1fr)}
  #view-bookings .booking-calendar-navigation{grid-template-columns:44px minmax(0,1fr) 44px}
  #view-bookings .booking-calendar-navigation strong{min-width:0;white-space:normal;overflow-wrap:anywhere}
  #view-bookings .booking-mobile-agenda-meta{gap:8px;flex-wrap:wrap}
  #view-bookings .booking-view-switch{flex-wrap:wrap}
  #view-bookings .booking-view-switch [data-booking-view]{display:inline-flex}
  #view-bookings .booking-extra-filters{display:block;min-width:0;margin-bottom:8px}
  #view-bookings .booking-extra-filters .booking-filters{grid-template-columns:minmax(0,1fr)}
  #view-bookings .booking-mobile-card{height:auto;min-height:96px}
  #view-bookings .booking-mobile-card>strong{white-space:normal;overflow-wrap:anywhere}
  #view-bookings .booking-mobile-card-head{flex-wrap:wrap;gap:0 8px}
  #view-bookings .booking-mobile-card-head :is(time,i){flex:0 0 auto;overflow:visible}
}

/* Visit details stay in the browser top layer; the grid track must not grow wider
   than the drawer or focus will horizontally scroll the panel under its backdrop. */
dialog.booking-dialog{overflow:hidden;background:#fff}
dialog.booking-dialog .booking-details{width:100%;min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
dialog.booking-dialog .booking-details>*{min-width:0;max-width:100%}
dialog.booking-dialog .dialog-heading{position:static;width:100%;max-width:100%;margin:0;padding:0 0 12px}
#booking-dialog #booking-main-actions{display:flex;flex-wrap:wrap;width:calc(100% + 20px);max-width:none;align-content:flex-start;align-items:stretch;justify-content:space-between;gap:4px;margin-right:-10px;margin-left:-10px}
#booking-dialog #booking-main-actions>button{flex:0 1 auto;width:auto;min-width:0;max-width:100%;height:auto!important;min-height:36px!important;padding:6px 4px!important;font-size:13px!important;white-space:normal;overflow-wrap:anywhere}
#booking-dialog .visit-outcome-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
#booking-dialog .visit-outcome-actions>div{grid-column:1/-1}
#booking-dialog .visit-outcome-actions>button{width:100%;min-width:0;padding-inline:7px;white-space:normal}

.service-calendar-name-context{display:grid;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--v2-divider)}
#service-dialog .service-calendar-name-context .source-note{margin:0;padding:9px 10px;border:1px solid var(--v2-divider);border-radius:6px;color:var(--v2-secondary);background:var(--v2-background);font-size:12px;line-height:1.45}

@media (max-width:780px){
  #booking-dialog #booking-main-actions{display:grid;width:100%;max-width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-right:0;margin-left:0}
  #booking-dialog #booking-main-actions>button{width:100%;max-width:100%;min-height:46px!important;padding:8px 10px!important;font-size:14px!important}
}

@media (max-width:620px){
  #booking-dialog .visit-outcome-actions{grid-template-columns:1fr}
  #booking-dialog .visit-outcome-actions>div{grid-column:1}
}

@media (max-width:780px){
  .booking-mobile-agenda-list{gap:12px}
  .booking-mobile-card{position:relative;display:flex;width:100%;height:auto;min-height:96px;flex-direction:column;align-items:stretch;gap:0;padding:10px 54px 10px 10px;overflow:clip;border:1px solid var(--v2-divider);border-radius:8px;background:var(--v2-background);text-align:left}
  .booking-mobile-card-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;color:var(--v2-secondary);font-size:12px;line-height:18px}
  .booking-mobile-card-head time{overflow:hidden;color:inherit;font-size:12px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}
  .booking-mobile-card-head i{overflow:hidden;color:var(--v2-secondary);font-size:12px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}
  .booking-mobile-card>strong{font-size:14px;line-height:22px;white-space:normal;overflow-wrap:anywhere}
  .booking-mobile-service{overflow:hidden;color:var(--v2-secondary);font-size:12px;line-height:19px;text-overflow:ellipsis;white-space:nowrap}
  .booking-mobile-card>small{overflow:hidden;color:var(--v2-secondary);font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}
  .booking-mobile-card>b{position:absolute;top:26px;right:10px;display:grid;width:44px;height:44px;place-items:center;color:var(--v2-secondary);font-size:20px;font-weight:400}
}

#view-messages .messaging-layout{grid-template-columns:252px minmax(320px,1fr) 344px}
#view-messages .conversation-pane-heading{display:grid;grid-template-rows:auto 34px;gap:9px;padding:13px 12px 10px}
#view-messages .conversation-pane-heading strong{margin:0;line-height:18px}
#view-messages .conversation-search{display:block;min-width:0;width:100%}
#view-messages .conversation-search>.sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
#view-messages .conversation-search input{display:block;width:100%;height:34px;min-height:34px;margin:0}
#view-messages .conversation-filters{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px;padding:0 10px 9px}
#view-messages .conversation-filters button{width:100%;min-width:0;padding-inline:8px;overflow:visible;font-size:13px;line-height:28px;white-space:nowrap;text-overflow:clip}

#view-schedule .calendar-day{min-height:74px;padding:8px;border-radius:8px;overflow:hidden}
#view-schedule .calendar-day::before,#view-schedule .calendar-day::after{content:none!important}
#view-schedule .calendar-day .day-number{display:inline-grid;min-width:24px;min-height:24px;place-items:center;font-size:13px;line-height:24px}
#view-schedule .calendar-day.today .day-number{border-radius:999px;color:var(--v2-primary);background:var(--v2-selection)}
#view-schedule .calendar-day-status{position:absolute;right:8px;bottom:8px;display:flex;min-width:7px;align-items:center;gap:5px;color:var(--v2-secondary);font-size:12px;line-height:14px}
#view-schedule .calendar-day-status::before{content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#cfd5d1}
#view-schedule .calendar-day-status.working::before{background:#55a884}
#view-schedule .calendar-day-status.modified{color:#8d642c}
#view-schedule .calendar-day-status.modified::before{border-radius:2px;background:#c89d4d}
#view-schedule .calendar-day-status.off{color:#8a625b}
#view-schedule .calendar-day-status.off::before{background:#d8b8b2}
#view-schedule .calendar-day-status b{font-weight:600;white-space:nowrap}
#view-schedule .calendar-break-indicator{right:auto;bottom:8px;left:8px;width:7px;height:7px}

@media (min-width:781px) and (max-width:1100px){
  .app-shell{grid-template-columns:64px minmax(0,1fr)!important}
  .app-shell>.sidebar{width:64px!important}
  .v2-topbar-actions :is(button,select){height:44px;min-height:44px}
  #view-messages .messaging-layout{grid-template-columns:280px minmax(0,1fr)}
  #view-messages .v2-message-context{display:none}
  #view-schedule .calendar-day{min-height:72px}
}

@media (max-width:780px){
  .v2-page-filters{display:none}
  #view-messages .messaging-layout{display:block}
  #view-messages .conversation-pane-heading{grid-template-rows:auto 40px;padding:12px}
  #view-messages .conversation-search input{height:40px;min-height:40px}
  #view-messages .conversation-filters{grid-template-columns:max-content minmax(0,1fr);padding:0 12px 10px}
  #view-schedule .calendar-day{min-height:54px;padding:5px}
  #view-schedule .calendar-day-status{right:5px;bottom:5px}
  #view-schedule .calendar-day-status b{display:none}
  #view-schedule .calendar-break-indicator{bottom:5px;left:5px}
}

/* Shared CRM controls. Decorative separators and meaningful field boundaries
   use separate tokens; public booking does not load this stylesheet. */
.app-shell {
  --text-placeholder:var(--v2-secondary);
}
.app-shell>.main {padding:0}
.app-shell>.main>.view {width:100%;max-width:none;margin:0}
#view-notifications .review-test-panel {grid-template-columns:minmax(0,1fr) auto;min-width:0}
#view-notifications :is(.automation-group-body,.scenario-fields-grid,.scenario-setting-row)>* {min-width:0}
.app-shell :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  min-width:0; max-width:100%; border-color:var(--v2-control-border);
  border-radius:6px; background-color:var(--v2-surface); color:var(--v2-text);
}
.app-shell :is(input,textarea)::placeholder {color:var(--v2-secondary);opacity:1}
.app-shell :is(.primary,.secondary,.danger-secondary) {
  min-height:36px; border-radius:6px; box-shadow:none; font-size:14px; line-height:1.4;
}
.app-shell .primary {background:var(--v2-primary);border-color:var(--v2-primary);color:#fff}
.app-shell .primary:hover:not(:disabled) {background:var(--v2-primary-hover)}
.app-shell .secondary {border:1px solid var(--v2-control-border);background:#fff;color:var(--v2-text)}
.app-shell button:disabled {opacity:1;cursor:not-allowed;color:#748078;background:#e9ecea;border-color:#d2dad5;box-shadow:none}
.app-shell :is(.status,.badge,.integration-state) {font-size:12px;line-height:1.5;border-radius:4px}
.app-shell .status {color:#245e42;background:var(--v2-selection)}
.app-shell .status.inactive {color:#645329;background:#f8f2e8}
.app-shell :is(.form-card,.list-panel,.settings-help) {border-radius:8px;box-shadow:none}
.app-shell :is(.field-hint,.upload-status,.empty-state) {color:var(--v2-secondary);font-size:13px;line-height:1.5}
#view-messages #message-empty-selection {color:var(--v2-secondary)}
:is(#service-dialog,#booking-dialog,#client-dialog,dialog.resource-editor,dialog.product-editor) :is(input:not([type=checkbox]):not([type=radio]),select,textarea):not(:disabled) {border-color:var(--v2-control-border)}
:is(#service-dialog,#booking-dialog,#client-dialog,dialog.resource-editor,dialog.product-editor) :is(input,select,textarea):focus-visible {outline:2px solid var(--v2-primary);outline-offset:2px}
.app-shell :is(.settings-workspace,.notifications-panel) {width:100%;min-width:0;max-width:1180px;margin-inline:auto}
.app-shell :is(.section-grid,.scenario-fields-grid)>* {min-width:0}
.app-shell .settings-tabs {width:100%;max-width:100%;min-width:0}
.app-shell :is(.settings-tabs,.products-tabs,.notification-tabs,.service-quick-filters) {mask-image:none}
.app-shell .today-visits .v2-section-heading>div {flex-wrap:nowrap}
.app-shell .today-visits .v2-section-heading h3 {white-space:nowrap}
.app-shell .today-visits .v2-section-heading {flex-wrap:wrap;padding-block:8px}
#view-clients .client-row>span,#view-specialists .specialist-row-action {font-size:13px}
#view-schedule .calendar-weekdays button {min-width:0;width:100%;padding:4px 0}
.app-shell .form-actions {flex-wrap:wrap}
.app-shell .form-actions>* {max-width:100%}

/* Catalog: a single fluid table, with the same fields in mobile cards. */
/* Full client record and checkout keep every action inside their modal. */
#client-dialog .client-profile-header {position:relative;grid-template-columns:minmax(0,1fr) minmax(160px,.5fr);gap:12px;padding:20px 60px 16px 20px}
#client-dialog .client-profile-identity {min-width:0}
#client-dialog .client-profile-identity h2 {overflow-wrap:anywhere}
#client-dialog .client-profile-identity>div {display:flex;flex-wrap:wrap;gap:8px 12px}
#client-dialog .client-profile-next {min-width:0;max-width:100%}
#client-dialog .client-profile-actions {grid-column:1/-1;min-width:0;width:100%;flex-wrap:wrap;gap:8px}
#client-dialog .client-profile-actions>:not(.dialog-close) {flex:0 1 auto;min-width:0;max-width:100%;white-space:normal;min-height:36px}
#client-dialog .client-profile-actions>.dialog-close {position:absolute;top:14px;right:14px;width:36px;min-width:36px;height:36px;min-height:36px;flex:none;padding:0}
#client-dialog .client-profile-tabs {position:relative;top:0;display:flex;width:100%;min-width:0;flex-wrap:wrap;overflow:visible;mask-image:none}
#client-dialog .client-profile-tabs button {white-space:normal;min-height:40px}
#booking-dialog #payment-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#booking-dialog #payment-fields>label {min-width:0}
#booking-dialog #payment-fields :is(input,select) {width:100%;min-width:0;max-width:100%}
#booking-dialog #payment-fields>#record-payment {grid-column:1/-1;width:100%;min-height:44px;white-space:normal}
#booking-dialog #mixed-payment-fields {grid-column:1/-1;min-width:0}
#booking-dialog.v2-checkout-open #payment-panel {border-radius:0}
#view-products .products-panel,
#view-services .services-panel {width:100%;max-width:none;height:auto;max-height:100%;margin-inline:0;align-self:flex-start;padding:16px}
#view-clients .clients-panel,
#view-branches .resource-manager,
#view-rooms .resource-manager,
#view-equipment .resource-manager,
#view-specialists .resource-manager {max-width:1180px;height:auto;max-height:100%;margin-inline:auto;align-self:flex-start}
#view-clients :is(.client-list,.clients-list),
#view-products :is(.product-card-grid,.products-list),
#view-services :is(.service-cards,.service-list) {flex:0 1 auto;min-height:0;max-height:calc(100dvh - 180px);overflow:auto}
#view-services .service-quick-filters {margin:0 0 12px;overflow:visible}
#view-services .service-quick-filters button {height:auto;min-height:36px;border-radius:6px;font-size:13px}
#view-services .service-quick-filters button.is-active {border-color:var(--v2-primary);color:var(--v2-primary);background:var(--v2-selection)}
#view-services .service-list {display:block}
#view-services .service-table-header {font-size:12px}
#view-services .service-table-row {gap:12px;padding:10px 12px;border-radius:0;box-shadow:none;font-size:14px;font-weight:400}
#view-services .service-table-row>span {min-width:0;white-space:normal;overflow-wrap:anywhere}
#view-services .service-row-name strong {font-weight:600}
#view-services .service-row-name small,.service-group-title small {font-size:12px;line-height:1.5}
#view-services .service-row-price {display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
#view-services .service-row-price strong {white-space:nowrap}
#view-services .service-group-heading {min-height:56px;background:var(--v2-background)}
#view-services .service-group-title h3 {font-size:16px}

/* Schedule editor: remove inherited nested-card chrome and tiny helper text. */
#view-schedule .calendar-panel {max-width:1180px;min-height:0;padding:16px;box-shadow:none;border-radius:8px}
#view-schedule .calendar-editor {align-items:stretch;text-align:left}
#view-schedule .schedule-editor-heading {display:block;text-align:left}
#view-schedule .calendar-day-status {font-size:12px;line-height:16px}
#view-schedule .schedule-interval-block .calendar-times {padding:0;border:0;background:transparent}
#view-notifications .scenario-setting-row {grid-template-columns:minmax(0,1fr) minmax(100px,160px) minmax(0,1fr)}
#view-notifications .scenario-fields-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
.app-shell :is(.products-tabs,.notification-tabs) {width:100%;max-width:100%;min-width:0;flex-wrap:wrap;overflow:visible}
.app-shell :is(.products-tabs,.notification-tabs)>button {height:auto;min-height:36px;white-space:normal;padding:8px 12px}
#view-schedule .schedule-interval-block {padding:0;border:0;background:transparent}
#view-schedule .calendar-times input {min-height:40px;font-size:16px}
#view-schedule .calendar-day {border-color:var(--v2-control-border);border-radius:6px;box-shadow:none}
#view-schedule .calendar-day.working {border-color:#6e8f7b}
#view-schedule .calendar-day.individual {border-color:#a38447}
#view-schedule .calendar-day.selected {border-color:var(--v2-primary)}
#view-schedule .calendar-day-status.working::before {background:#538267}
#view-schedule .calendar-day-status.modified::before {background:#9a762e}
#view-schedule .calendar-day-status.off::before {background:#97665c}
#view-schedule .calendar-day small {white-space:normal;line-height:1.3;overflow-wrap:anywhere}
#view-schedule .calendar-weekdays button {min-height:36px;font-size:13px}
#view-schedule .calendar-hint {display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px;line-height:1.6}
#view-schedule .calendar-navigation {flex-wrap:wrap}
#view-schedule .calendar-navigation button {min-height:36px;height:auto}
#view-schedule .schedule-actions {grid-template-columns:minmax(0,280px);justify-content:center;margin-top:0}
#view-schedule .schedule-actions :is(.primary,#clear-selected-days) {grid-column:1}
#view-schedule .schedule-actions > :is(#make-selected-days-working,#make-selected-days-off,#reset-selected-days,#clear-selected-days) {width:100%;height:36px!important;min-height:36px!important;max-height:36px;padding:0 8px!important;white-space:normal}
#view-schedule .schedule-break-editor {background:var(--v2-background)}
#view-schedule .legend-dot.working {background:#538267}
#view-schedule .legend-dot.individual {background:#9a762e}
#view-schedule .legend-dot.unavailable {background:#97665c}

/* Integrations retain their real state and existing disclosure/actions. */
#view-integrations .integration-catalog {width:100%;max-width:none;margin-inline:0;display:grid;gap:8px}
#view-integrations .integration-item {margin:0;box-shadow:none;border-radius:8px}
#view-integrations .integration-catalog-row {min-height:72px;padding:12px 14px;gap:14px}
#view-integrations .integration-catalog-icon {width:40px;height:40px;border-radius:6px}
#view-integrations .integration-catalog-copy {min-width:0}
#view-integrations .integration-catalog-copy strong {font-size:16px;line-height:1.5}
#view-integrations .integration-catalog-copy>span {white-space:normal;color:var(--v2-secondary);font-size:14px;line-height:1.5}
#view-integrations .integration-catalog-copy .eyebrow {font-size:12px;color:var(--v2-secondary)}
#view-integrations .integration-help-toggle {min-height:36px;display:inline-flex;align-items:center;border-color:var(--v2-control-border);border-radius:6px;color:var(--v2-text)}
#view-integrations .integration-state {color:var(--v2-secondary);background:var(--v2-background)}
#view-integrations .integration-state.connected {color:#245e42;background:var(--v2-selection)}
#view-integrations .integration-state.problem {color:#943a30;background:#fbeae8}
#view-integrations .integration-state.verification {color:#69521f;background:#f7f1df}

/* Calendar geometry is unchanged: strengthen headers, time and card edges. */
#view-bookings .booking-calendar-column>header {background:var(--v2-background);border-bottom-color:#9eada3}
#view-bookings .booking-calendar-column>header strong {font-size:14px;color:var(--v2-text)}
#view-bookings .booking-calendar-column>header small {font-size:12px;color:var(--v2-secondary)}
#view-bookings .booking-calendar-axis {font-size:12px;color:var(--v2-secondary)}
#view-bookings .booking-calendar-axis span {display:flex;align-items:flex-start;justify-content:center;padding-top:0;line-height:1.4}
#view-bookings .booking-calendar-axis span:first-child {align-items:center}
#view-bookings .booking-calendar-column>header {align-items:center;gap:8px;white-space:nowrap}
#view-bookings .booking-calendar-column>header :is(strong,small) {line-height:18px}
#view-bookings .booking-calendar-card {border-color:#6e8f7b;border-left-color:var(--v2-primary)}
#view-bookings .booking-calendar-card.pending {border-color:#a38447;border-left-color:#8d642c}
#view-bookings .booking-calendar-card.cancelled,#view-bookings .booking-calendar-card.no-show {opacity:1;background:#f1f2f1;color:var(--v2-secondary);border-style:dashed}
#view-bookings .booking-calendar-card:focus-visible {outline:2px solid var(--v2-primary);outline-offset:1px}
#view-bookings .booking-calendar-card.is-selected {border-color:var(--v2-primary);box-shadow:inset 0 0 0 1px var(--v2-primary)}

@media (max-width:1100px) {
  .app-shell .settings-tabs {flex-wrap:wrap;overflow:visible}
  .app-shell .settings-tabs>button {height:auto;min-height:40px;white-space:normal;padding:8px 12px}
  #view-notifications .review-test-panel {grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "phone" "action" "hint" "extra" "status"}
  #view-notifications .review-test-panel>button {width:100%}
  .client-table-header,.client-row {grid-template-columns:minmax(160px,1.4fr) 130px minmax(100px,1fr) 80px 34px}
  .client-table-header>span:nth-child(4),.client-row>span:nth-child(4),
  .client-table-header>span:nth-child(6),.client-row>span:nth-child(6) {display:none}
  .clients-panel:has(.v2-client-context:not([hidden])) {display:flex}
  .v2-client-context {position:fixed;z-index:70;inset:64px 0 0 auto;width:min(392px,65vw);margin:0;border-left:1px solid var(--v2-divider);box-shadow:-8px 0 24px #252d2920}
  .product-table-header,.product-table-row {grid-template-columns:minmax(150px,1fr) 90px 64px 84px 78px auto;gap:8px}
  .product-table-certificates .product-table-header,.product-table-certificates .product-table-row {grid-template-columns:minmax(150px,1fr) 90px 90px 70px 78px 16px}
  .app-shell .scenario-fields-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .app-shell :is(.scenario-row,.scenario-controls,.scenario-inline-controls) {flex-wrap:wrap;min-width:0}
  .today-visit-head,.today-visit-row {grid-template-columns:52px minmax(100px,1fr) minmax(100px,1fr) minmax(80px,.8fr) minmax(90px,1fr) minmax(90px,1fr);gap:8px}
}
@media (max-width:900px) {
  #view-notifications .scenario-setting-row {grid-template-columns:minmax(0,1fr)}
  #view-notifications .scenario-fields-grid {grid-template-columns:minmax(0,1fr)}
  #view-services .service-table-header,#view-services .service-table-row {grid-template-columns:minmax(0,1fr) 80px 120px 74px 80px 12px;gap:8px}
  .app-shell .section-grid {grid-template-columns:minmax(0,1fr)}
}
@media (max-width:780px) {
  #view-schedule .schedule-actions > :is(#make-selected-days-working,#make-selected-days-off,#reset-selected-days,#clear-selected-days) {height:44px!important;min-height:44px!important;max-height:44px}
  .app-shell>.main {padding:0 0 74px}
  #client-dialog .client-profile-header {grid-template-columns:minmax(0,1fr);padding:16px 58px 16px 16px}
  #client-dialog .client-profile-actions>:not(.dialog-close) {flex:1 1 130px;min-height:44px}
  #client-dialog .client-profile-tabs button {min-height:44px}
  #booking-dialog #payment-fields {grid-template-columns:minmax(0,1fr)}
  .app-shell>.main>.v2-today {padding-inline:12px}
  .app-shell .topbar:has(.v2-route-actions[data-v2-route-actions="services"]:not([hidden])) .v2-topbar-actions {display:contents}
  .app-shell .topbar .v2-route-actions[data-v2-route-actions="services"] {order:3;flex:1 0 100%;width:100%}
  .app-shell .topbar .v2-route-actions[data-v2-route-actions="services"] .catalog-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .app-shell [data-v2-route-actions="services"] .catalog-actions select {grid-column:1/-1;max-width:none;width:100%}
  .app-shell [data-v2-route-actions="services"] .catalog-actions button {font-size:13px;padding:6px}
  #view-notifications :is(.automation-group-body,.scenario-fields-grid,.scenario-setting-row) {grid-template-columns:minmax(0,1fr)}
  #view-notifications .notifications-panel {padding:12px}
  .app-shell .topbar:has(.v2-route-actions:not([hidden]):not([data-v2-route-actions="dashboard"])) {flex-wrap:wrap;padding-block:10px;gap:8px}
  .app-shell .v2-topbar-actions:has(.v2-route-actions:not([hidden]):not([data-v2-route-actions="dashboard"])) {flex:1 1 100%;flex-wrap:wrap}
  .app-shell .v2-route-actions:not([data-v2-route-actions="dashboard"]) {display:flex;flex:1;flex-wrap:wrap}
  .app-shell .v2-route-actions>* {flex-wrap:wrap;max-width:100%}
  .app-shell .v2-route-actions :is(button,select) {max-width:100%;white-space:normal;height:auto;min-height:44px}
  .app-shell .v2-route-actions .catalog-actions {display:flex;gap:8px}
  .app-shell :is(.primary,.secondary,.danger-secondary) {min-height:44px}
  .app-shell .topbar {height:auto;min-height:56px}
  .app-shell .settings-workspace {padding:12px}
  .app-shell :is(.scenario-fields-grid,.section-grid) {grid-template-columns:minmax(0,1fr)}
  .app-shell :is(.scenario-row,.scenario-controls,.scenario-inline-controls,.settings-section-heading) {display:flex;flex-wrap:wrap;min-width:0;gap:8px}
  .app-shell .settings-tabs {flex-wrap:wrap;overflow:visible}
  .app-shell .settings-tabs>button {flex:1 1 auto;white-space:normal;min-height:44px;height:auto;padding:8px}
  .app-shell :is(.settings-tab-panel,.organization-profile,.organization-profile-copy) {min-width:0;width:100%}
  #view-services .services-panel {padding:12px}
  #view-services .service-table-header {display:none}
  #view-services .service-table-row {grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:12px}
  #view-services .service-table-row>span {display:block}
  #view-services .service-row-name {grid-column:1;grid-row:1}
  #view-services .service-table-row .status {grid-column:2;grid-row:1}
  #view-services .service-row-duration {grid-column:1;grid-row:2;color:var(--v2-secondary);font-size:13px}
  #view-services .service-row-price {grid-column:2;grid-row:2;text-align:right}
  #view-services .service-row-source {grid-column:1;grid-row:3;color:var(--v2-secondary);font-size:12px}
  #view-services .service-table-row .service-row-chevron {grid-column:2;grid-row:3;text-align:right}
  #view-services .service-quick-filters button {min-height:44px;white-space:normal}
  #view-schedule .calendar-heading {flex-wrap:wrap;gap:8px}
  #view-schedule .calendar-navigation {justify-content:flex-start;width:100%}
  #view-schedule .calendar-day {min-height:56px}
  #view-schedule .calendar-day .day-number {font-size:14px}
  #view-schedule .calendar-editor {width:100%;margin-top:16px}
  #view-schedule .calendar-hint {display:flex}
  #view-schedule .schedule-quick-actions {flex-wrap:wrap;overflow:visible}
  #view-schedule .schedule-quick-actions button {min-height:44px}
  #view-integrations .integration-catalog-row {grid-template-columns:40px minmax(0,1fr);padding:12px;gap:8px 12px}
  #view-integrations .integration-catalog-actions {grid-column:2;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px}
  #view-integrations .integration-help-toggle {min-height:44px}
  .today-status-line {flex-wrap:wrap;white-space:normal;overflow:visible;font-size:13px;gap:6px 12px}
  .today-attention-row {grid-template-columns:18px minmax(0,1fr);gap:4px 8px;padding:10px 8px}
  .today-attention-row strong {font-size:14px;white-space:normal}
  .today-attention-row span {font-size:13px;white-space:normal}
  .today-attention-row b {grid-column:2;grid-row:3;font-size:13px}
  .today-visit-row {grid-template-columns:48px minmax(0,1fr) auto;font-size:14px;min-height:76px}
  .today-visit-row .visit-client,.today-visit-row>span:nth-child(3) {white-space:normal;overflow-wrap:anywhere}
  .today-row-actions i {min-height:44px;font-size:13px}
  .client-table-header {display:none}
  .client-row {grid-template-columns:minmax(0,1fr) auto}
  .v2-client-context {inset:56px 0 74px;width:100%}
  .product-table-header {display:none}
  .product-table {min-width:0}
  .product-table-row,.product-table-certificates .product-table-row {grid-template-columns:minmax(0,1fr) auto;padding:12px;gap:8px}
  .product-table-row>strong {grid-column:1/-1;white-space:normal;overflow-wrap:anywhere}
  .product-row-actions {grid-column:1/-1;flex-wrap:wrap;justify-content:flex-start}
  .product-row-actions button {min-height:44px;font-size:13px;padding:8px 12px}
}


/* Full UI remediation: bundled Figma typography and shared workspace primitives. */
.app-shell .main>.topbar {margin:0;padding:0 24px;width:100%;flex:0 0 64px}
.sidebar>.sidebar-brand-row {height:46px;min-height:46px;max-height:46px;flex:0 0 46px}
.sidebar-footer .user-card {display:flex;align-items:center;gap:8px;border:0;background:transparent;padding:4px 0}
.sidebar-footer .user-card>.avatar {flex:0 0 30px}
.sidebar-footer .user-card>span:last-child {display:grid;min-width:0}
.sidebar-footer .user-card :is(strong,small) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
#view-messages .message-composer-tools {display:flex;align-items:center;gap:8px;min-height:28px}
#view-messages .message-composer-tools button {width:auto;min-height:28px;padding:2px 8px;font-size:12px}
#view-messages .messaging-panel {border:0;border-radius:0}
@font-face {font-family:Inter;src:url("./assets/fonts/inter/InterVariable.woff2") format("woff2");font-style:normal;font-weight:100 900;font-display:swap}
.app-shell :is(h1,h2,h3,h4,p,button,input,select,textarea,strong,small,summary,span,time,label,td,th),dialog :is(h1,h2,h3,h4,button,input,select,textarea,strong,small,summary,p,span,label,td,th) {font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;font-synthesis:none}
.app-shell {text-rendering:optimizeLegibility}
.sidebar {padding:18px 12px 14px;gap:8px}
.sidebar .nav {gap:8px}
.v2-sidebar-search,.v2-create {height:34px;min-height:34px}
.v2-sidebar-search {padding:0 10px;gap:8px}
.v2-sidebar-search input {height:32px;min-height:32px;padding:0;font-size:13px}
.v2-nav-primary {display:flex;flex-direction:column;gap:2px;padding-top:8px}
.v2-nav-primary>.nav-item,.v2-nav-group>summary {height:34px;min-height:34px;gap:10px;font-size:14px;font-weight:400}
.sidebar :is(.nav-item,summary)>svg {width:18px;height:18px;flex:0 0 18px;stroke-width:1.7}
.v2-nav-group>div>.nav-item {min-height:27px;padding:4px 10px 4px 37px;font-size:12px}
.v2-nav-compact .v2-nav-group {min-height:var(--nav-group-height,34px)}
.v2-nav-flyout:popover-open {position:fixed!important;display:grid!important;width:208px!important;max-height:min(400px,calc(100dvh - 16px));margin:0;padding:6px!important;border:1px solid var(--v2-control-border);border-radius:8px;background:#fff;box-shadow:0 6px 22px #252d2926;overflow:auto}
.sidebar .v2-nav-flyout:popover-open>.nav-item {display:flex!important;width:100%!important;min-height:36px;justify-content:flex-start;padding:8px 12px!important;font-size:14px;text-align:left}
.sidebar .v2-nav-flyout:popover-open .nav-item span {display:inline!important}
.sidebar-footer {margin-top:auto;flex:0 0 auto}
.v2-nav-primary>.nav-item.active,.v2-nav-group:has(.nav-item.active)>summary {color:var(--v2-primary);background:var(--v2-selection);font-weight:600}

.manual-order-row {display:flex;min-width:0;align-items:stretch;border-top:1px solid var(--v2-divider);background:var(--v2-surface)}
.manual-order-row>.service-table-row,.manual-order-row>.resource-row {flex:1;min-width:0;width:0;border-top:0}
.manual-order-handle {width:28px;flex:0 0 28px;border:0;background:transparent;color:var(--v2-secondary);cursor:grab;touch-action:none;font-size:20px;min-height:44px}
.manual-order-handle:active {cursor:grabbing}
.order-dragging {outline:2px dashed var(--v2-primary);outline-offset:-2px;background:var(--v2-selection);opacity:.8}
.service-group:has(.manual-order-handle) .service-table-header {padding-left:40px}
[data-drag-handle] {touch-action:none}
#product-items {counter-reset:stage}
.product-item-row {counter-increment:stage;min-width:0}
.product-item-row:has([data-drag-handle]:not([hidden]))::before {content:counter(stage);color:var(--v2-secondary);font-size:12px}

#view-messages .messaging-layout {grid-template-columns:var(--conversation-width,280px) minmax(320px,1fr) var(--message-context-width)}
#view-messages .conversation-pane {position:relative}
.v2-conversation-divider {position:absolute;right:0;top:0;bottom:0;width:7px;z-index:3;cursor:col-resize;touch-action:none}
.v2-conversation-divider:hover,.v2-conversation-divider:focus-visible {background:var(--v2-selection);border-right:2px solid var(--v2-primary)}
#view-messages .message-pane {display:flex;flex-direction:column;min-height:0;overflow:hidden}
#view-messages .message-history {flex:1 1 0;min-height:0;overflow-y:auto}
#view-messages .message-composer {position:static;flex:0 0 auto;margin-top:auto;background:var(--v2-surface);border-top:1px solid var(--v2-divider);padding:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
#view-messages .message-composer-tools {grid-column:1/-1}
#view-messages .message-composer textarea {min-width:0;min-height:44px;max-height:120px}

.v2-fixed-editor {display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 48px);min-height:0;padding:0!important;gap:0!important}
.v2-fixed-editor>:first-child,.v2-fixed-editor>:last-child {flex:0 0 auto;margin:0!important;padding:14px 18px!important;background:var(--v2-surface);border-bottom:1px solid var(--v2-divider)}
.v2-fixed-editor>:last-child {border-top:1px solid var(--v2-divider);border-bottom:0}
.v2-editor-body {flex:1 1 auto;min-height:0;overflow:auto;padding:14px 18px;display:grid;gap:12px}
.v2-editor-section {border:1px solid var(--v2-divider);border-radius:6px;min-width:0}
.v2-editor-section>summary {cursor:pointer;padding:12px;font-size:14px;font-weight:600;background:var(--v2-background)}
.v2-editor-section>:not(summary) {margin:12px}
#product-dialog,#certificate-dialog,#service-dialog {padding:0;overflow:hidden;width:min(760px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 48px);border:1px solid var(--v2-divider);border-radius:8px}
#product-dialog .product-form-grid {gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
#product-dialog .product-items-editor {padding:0;border:0;min-width:0}
#product-dialog .product-item-row {display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--v2-divider)}
#product-dialog .product-item-row select {flex:1;min-width:0;width:0}
#product-dialog [data-item-quantity] {width:72px}
#product-dialog .product-price-preview {position:sticky;bottom:0;background:var(--v2-selection);padding:12px;font-size:13px}
.product-row-actions {display:flex;flex-wrap:wrap;gap:4px 10px;justify-content:flex-end}
.product-row-actions button {width:auto;min-height:32px;font-size:12px;padding:2px 7px;white-space:nowrap}

#view-schedule .calendar-day {height:68px;min-height:68px;display:flex;flex-direction:column;align-items:flex-start}
.schedule-day-times {display:block;width:100%;margin-top:6px;overflow:hidden;color:var(--v2-text);font-size:12px;line-height:16px;font-variant-numeric:tabular-nums;text-align:center;text-overflow:ellipsis;white-space:nowrap}
#view-schedule .calendar-day-status,#view-schedule .calendar-break-indicator {display:none}
#view-schedule .schedule-break-editor {justify-items:center}
#view-schedule .schedule-break-editor>div:first-child {width:100%}
#view-schedule #schedule-break-list {display:grid;width:min(100%,276px);gap:8px}
#view-schedule .schedule-break-row {display:grid;grid-template-columns:112px 12px 112px 32px;gap:6px;align-items:end}
#view-schedule .schedule-break-row select {width:100%;min-width:0;height:36px;font-size:13px}
#view-schedule .schedule-break-row button {width:32px;min-width:0;padding:0;height:36px}
#view-schedule #add-schedule-break {width:min(100%,276px)}
#view-schedule .calendar-times {grid-template-columns:112px 18px 112px;justify-content:center;width:max-content;max-width:100%;margin-inline:auto}
.schedule-time-settings-row {align-items:end}
#view-notifications .automation-settings {grid-template-columns:repeat(2,minmax(0,1fr))}
#view-notifications .automation-group {order:0;grid-column:auto;align-self:start}
#view-notifications .automation-group[open] {order:0;grid-column:1/-1;align-self:start}
#view-notifications .automation-group>summary {min-height:66px}
#view-notifications .automation-group-body {padding:8px 12px 10px;display:grid;gap:6px 10px}
#view-notifications .automation-group-body > .toggle-line,
#view-notifications .scenario-setting-row > .toggle-line {min-height:30px;padding:2px 0;line-height:20px}
#view-notifications .scenario-compact-control :is(input,select) {width:min(100%,120px)}
#view-notifications .return-effectiveness-panel {max-width:none;width:100%}
#view-notifications .return-effectiveness-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#notification-list {max-height:55dvh;overflow:auto}
.integration-item-body {display:grid;grid-template-columns:minmax(0,var(--workspace-compact-max));justify-content:start;padding:14px 16px!important;background:var(--v2-background)}
.integration-item-body>.integration-expanded-grid {width:100%;grid-template-columns:minmax(0,1fr);padding-top:0}
.integration-item-body :is(.settings-form,.form-card) {width:100%;max-width:none;margin:0;padding:12px;border:1px solid var(--v2-divider);border-radius:6px;background:#fff}
.integration-item-body :is(input:not([type=checkbox]),select) {min-height:36px}
#view-settings .settings-tab-panel {max-width:none}
#view-settings>.settings-workspace>.panel-heading {display:none}
#view-settings .settings-grid {gap:14px;align-items:start}
#view-settings :is(.settings-vertical-card,.settings-route-card) {padding:16px;border-radius:8px;min-height:0}
#view-settings .settings-card-header {margin-bottom:12px}
#view-settings .settings-card-header h2 {font-size:17px;line-height:24px}
#view-settings .settings-card-header .eyebrow {display:none}
#view-settings .form-actions {gap:8px;justify-content:flex-end}
#view-settings input[type=checkbox]:not([role=switch]) {width:18px;height:18px;min-height:18px;flex:0 0 18px;accent-color:var(--v2-primary)}
#view-settings .discount-matrix-table :is(th,td) {font-size:13px;padding:6px}
#view-settings .discount-matrix-table input {height:32px;min-height:32px;font-size:13px}
#view-clients .client-table-header,
#view-specialists .specialist-table-head,
#view-services .service-table-header,
#view-products .product-table-header {
  height:36px;
  font-size:13px;
  font-weight:500;
}
#settings-panel-schedule .schedule-time-settings-row label {width:112px;min-width:112px;text-align:center;line-height:20px}
#settings-panel-schedule .schedule-time-settings-row .birsuol-time-picker {width:112px;min-width:112px}
#settings-panel-schedule .schedule-time-settings-row .birsuol-time-control {
  width:112px;
  height:40px;
  min-height:40px;
  padding:6px 36px 6px 10px!important;
  font-size:14px;
  text-align:center;
}
#settings-panel-schedule .schedule-time-settings-row .birsuol-time-toggle {height:38px;min-height:38px}
#view-branches .resource-manager,#view-rooms .resource-manager,#view-equipment .resource-manager {height:auto;min-height:0;max-height:100%}
#view-branches .resource-row .content {display:flex;min-width:0;flex-direction:column;align-items:flex-start;gap:2px}
#view-branches .resource-row .content :is(strong,small) {overflow:visible;max-width:100%;margin:0;line-height:1.4;text-overflow:clip;overflow-wrap:anywhere;white-space:normal}
#view-branches .resource-row .status {align-self:center}
#view-branches .resource-list,#view-rooms .resource-list,#view-equipment .resource-list {flex:none;max-height:60dvh}
#view-specialists .resource-manager {height:auto;min-height:0;max-height:100%}
#view-specialists.active {align-items:flex-start}
#view-specialists .resource-list {flex:none;max-height:60dvh;overflow-x:hidden}
#specialist-user-field>.field-hint {margin-top:-4px}
#view-payments .payments-panel {height:100%;display:flex;flex-direction:column;min-height:0;overflow:hidden}
#view-payments .payment-summary article {padding:12px;min-height:0}
#view-payments .payment-summary article strong {font-size:23px}
#view-payments .payment-query-bar {gap:10px;align-items:end}
#view-payments .payment-query-bar :is(input,select,button) {min-height:36px;height:36px}
#view-payments .payment-journal-result {display:flex;flex:1 1 auto;min-height:0;flex-direction:column;overflow:hidden}
#view-payments .payment-journal-list {min-height:0;overflow:auto;flex:1 1 auto;grid-auto-rows:max-content;align-content:start;gap:6px}
#view-payments .payment-operation>summary {padding:10px 12px;min-height:52px}
#view-payments .payment-operation-sign {width:26px;height:26px;font-size:16px}

@media(min-width:1101px) {
 .today-visit-head,.today-visit-row {grid-template-columns:58px minmax(100px,1.1fr) minmax(100px,1.1fr) minmax(80px,.8fr) minmax(90px,.9fr) minmax(100px,1fr) 220px}
 .today-row-actions i {white-space:nowrap}
 .today-visit-head>span:last-child {text-align:right}
 .v2-page-filters {align-items:end}
}
@media(min-width:781px) and (max-width:1100px) {
 #view-messages .messaging-layout {grid-template-columns:min(var(--conversation-width,252px),36%) minmax(0,1fr)}
}
@media(max-width:780px) {
 body[data-active-view] .app-shell>.main {padding-bottom:74px}
 .v2-conversation-divider {display:none}
 #view-messages .messaging-layout {display:block}
 #view-messages .message-composer {padding:8px 10px}
 #view-messages .message-composer-tools {display:none}
 .manual-order-handle {width:32px;flex-basis:32px}
 #view-schedule .calendar-day {height:60px;min-height:60px;padding:4px}
 .schedule-day-times {font-size:12px;line-height:14px}
 #view-notifications .return-effectiveness-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
 #view-notifications .automation-settings {grid-template-columns:minmax(0,1fr)}
 #view-notifications .automation-group[open] {grid-column:auto}
 #product-dialog,#certificate-dialog,#service-dialog {width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
 .v2-fixed-editor {max-height:calc(100dvh - 16px)}
 .v2-editor-body {padding:12px}
 .v2-fixed-editor>:first-child,.v2-fixed-editor>:last-child {padding:12px!important}
 #product-dialog .product-form-grid {grid-template-columns:minmax(0,1fr)}
 #product-dialog .product-item-row {flex-wrap:wrap}
 #product-dialog .product-item-row select {flex-basis:calc(100% - 72px)}
 #product-dialog .product-item-row [data-item-remove] {margin-left:auto}
 .product-row-actions {justify-content:flex-start}
 #view-payments .payment-query-bar {display:flex;flex-wrap:wrap}
 #view-payments .payment-query-bar label {min-width:0;flex:1 1 140px}
 #view-payments .payment-summary article {padding:8px}
}

@media(max-width:520px) {
 #view-schedule #schedule-break-list {width:100%}
 #view-schedule .schedule-break-row {grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr) 32px}
 #settings-panel-schedule .schedule-time-settings-row label,
 #settings-panel-schedule .schedule-time-settings-row .birsuol-time-picker,
 #settings-panel-schedule .schedule-time-settings-row .birsuol-time-control {width:100%;min-width:0}
}

@media(max-width:380px) {
 #view-services .service-table-row {grid-template-columns:minmax(0,1fr)!important;gap:5px;padding:10px}
 #view-services .service-table-row :is(.service-row-name,.service-row-duration,.service-row-price,.service-row-source,.status) {grid-column:1!important;width:max-content;max-width:100%;text-align:left}
 #view-services .service-row-name {grid-row:1!important}
 #view-services .service-row-duration {grid-row:2!important}
 #view-services .service-row-price {grid-row:3!important}
 #view-services .service-row-source {grid-row:4!important}
 #view-services .service-table-row .status {grid-row:5!important}
 #view-services .service-row-chevron {display:none!important}
}

.v2-icon {display:inline-block;width:18px;height:18px;flex:0 0 18px;background:currentColor;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat}
.sidebar.v2-nav-compact .v2-icon {display:inline-block!important}
@media(min-width:1101px) {
 .app-shell.sidebar-collapsed {grid-template-columns:var(--sidebar-rail-width) minmax(0,1fr)!important}
 .app-shell.sidebar-collapsed>.sidebar {width:var(--sidebar-rail-width)}
 .app-shell.sidebar-collapsed .sidebar-footer .user-card>span:last-child {display:none}
 .app-shell.sidebar-collapsed .sidebar-footer .user-card {justify-content:center;padding:4px 0}
 .app-shell.sidebar-collapsed .v2-nav-group>summary {width:46px;justify-content:center;padding:0}
 .app-shell.sidebar-collapsed .v2-nav-group>summary>b {display:none!important}
 .app-shell.sidebar-collapsed .sidebar-footer .text-button {font-size:0!important;padding:0;justify-content:center}
}
@media(min-width:781px) and (max-width:1100px) {
 .sidebar.v2-nav-compact .v2-nav-primary>.nav-item,.sidebar.v2-nav-compact .v2-nav-group>summary {height:44px;min-height:44px}
}

/* Full workspaces follow the Design System edge contract on desktop. */
@media(min-width:1101px) {
 #view-messages .messaging-panel {max-width:none;margin:0}
 #view-schedule .calendar-panel {max-width:none;margin:0;grid-template-columns:minmax(0,1fr) 296px;gap:0 16px;padding:14px}
 #view-schedule .schedule-workspace {padding-right:16px}
 #view-schedule .calendar-day {height:58px;min-height:58px;padding:5px 7px}
 #view-schedule .calendar-day.selected {padding:4px 6px}
 #view-schedule .schedule-day-times {margin-top:3px}
}
.v2-sidebar-search .v2-icon {width:16px;height:16px;flex-basis:16px;color:var(--v2-secondary)}
.v2-bottom-nav .v2-icon {width:21px;height:21px;flex-basis:21px}
#view-specialists .specialist-row .content {display:grid;min-width:0;gap:2px}
#view-specialists .specialist-row .content :is(strong,small) {white-space:normal;overflow-wrap:anywhere}
#view-specialists .specialist-table-head {grid-template-columns:minmax(0,1fr) 90px 70px;padding-left:76px}
#view-specialists .specialist-table-head>span:nth-child(2) {display:none}
#view-messages .conversation-item {position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;padding:10px 12px;box-shadow:none}
#view-messages .conversation-item-heading {grid-column:1/-1;display:flex;gap:8px}
#view-messages .conversation-identity {display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
#view-messages .conversation-identity strong {order:-1;font-size:14px;color:var(--v2-text);font-weight:600;max-width:100%}
#view-messages .conversation-channel,#view-messages .conversation-automation {display:none}
#view-messages .conversation-preview {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--v2-secondary)}
#view-messages .conversation-unread {justify-self:end;align-self:center;min-width:18px;width:auto;max-width:36px;padding:1px 5px;border-radius:4px;color:var(--v2-primary);background:var(--v2-selection)}
@media(max-width:780px) {
 .app-shell .main>.topbar {flex:0 0 56px;height:56px;min-height:56px;padding:0 12px}
 .app-shell .main>.topbar:has(.v2-route-actions:not([hidden]):not([data-v2-route-actions="dashboard"])) {flex-basis:auto;height:auto}
 #view-specialists .specialist-table-head {display:none}
 #view-specialists .specialist-row {grid-template-columns:32px minmax(0,1fr) 70px;gap:8px;padding:8px}
 #view-specialists .specialist-row .status {grid-column:3;font-size:12px}
 #view-specialists .specialist-row-action {display:none}
 .sidebar:not(.open) {display:none}
}

#view-messages .message-send-status {grid-column:1/-1;font-size:12px;line-height:18px;color:var(--v2-warning)}
#view-messages .message-contact-line {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px}
#view-messages #message-contact-name {display:block;grid-row:1;grid-column:1;overflow:visible;font-size:14px;white-space:normal;overflow-wrap:anywhere}
#view-messages .message-contact-channel {grid-row:2;grid-column:1;width:max-content}
#view-messages .message-automation {grid-row:3;grid-column:1;font-size:12px;color:var(--v2-secondary)}
#view-messages .message-handoff-toggle {grid-row:1/3;grid-column:2;width:auto;min-height:32px;padding:4px 8px;font-size:12px}
#view-messages .message-client-link {grid-row:3;grid-column:2;min-height:28px;font-size:12px}
.v2-fixed-editor>:last-child {display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px}
#service-save-status {margin:0!important;font-size:13px}
@media(max-width:780px) {
 #view-messages .message-handoff-toggle {max-width:120px;white-space:normal}
 #view-messages .message-send-status {font-size:12px}
}

/* Whole service groups have their own ordering layer. Moving the wrapper never
   mutates the order of service rows inside the group. */
.service-category-order-row {position:relative;border-bottom:1px solid var(--v2-divider)}
.service-category-order-row>.service-group {border-bottom:0}
.service-category-order-handle {position:absolute;z-index:2;top:6px;left:8px}
.service-category-order-row:has(.service-category-order-handle) .service-group-heading {padding-left:44px}
.service-category-order-row.order-dragging {z-index:4;background:#fff;box-shadow:0 8px 24px rgba(37,45,41,.14)}

/* V2.1 navigation: the 64 px icon rail is a stable coordinate system. The
   textual navigation is a separate column and disappears without reserving width. */
.sidebar {padding:14px 0 12px;overflow:hidden;border-right:0;box-shadow:inset -1px 0 var(--v2-divider)}
.sidebar-brand-row {padding:0 16px}
.sidebar .nav {
  display:grid;
  width:100%;
  grid-template-columns:var(--sidebar-rail-width) var(--sidebar-text-width);
  align-items:start;
  gap:0;
  overflow-y:auto;
  overflow-x:hidden;
}
.v2-nav-rail,.v2-nav-text {display:grid;grid-auto-rows:max-content;gap:2px;padding-top:0}
.v2-nav-rail {position:sticky;z-index:2;top:0;width:var(--sidebar-rail-width);justify-items:center;border-right:1px solid var(--v2-divider);background:var(--v2-navigation)}
.v2-nav-text {width:var(--sidebar-text-width);min-width:0;padding-right:0}
.v2-nav-rail :is(.v2-rail-action,.nav-item,.v2-rail-group) {
  position:relative;
  display:flex;
  width:44px;
  height:34px;
  min-height:34px;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:6px;
  color:#66736c;
  background:transparent;
}
.v2-nav-rail .primary {color:#fff;background:var(--v2-primary)}
.v2-nav-rail :is(.nav-item,.v2-rail-group):hover {background:rgba(225,229,226,.68)}
.v2-nav-rail :is(.nav-item,.v2-rail-group).active {color:var(--v2-primary);background:var(--v2-selection)}
.v2-nav-rail .v2-nav-count {position:absolute;top:2px;right:3px;display:block;min-width:18px;padding:1px 4px;border-radius:7px;color:#fff;background:var(--v2-primary);font-size:12px;line-height:15px;text-align:center}
.app-shell.sidebar-collapsed .v2-nav-rail .v2-nav-count,
.sidebar.v2-nav-compact .v2-nav-rail .v2-nav-count {display:block!important}
.v2-nav-text .v2-sidebar-search {width:100%;padding-left:10px}
.v2-nav-text .v2-create {width:100%;height:34px!important;min-height:34px!important}
.v2-nav-text>.nav-item,.v2-nav-text .v2-nav-group>summary {height:34px;min-height:34px;padding:0 8px;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;font-size:14px!important;font-weight:400!important;line-height:20px;color:var(--v2-text)}
.v2-nav-text>.nav-item {display:flex;align-items:center;border:0;border-radius:6px;background:transparent;text-align:left}
.v2-nav-text>.nav-item>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2-nav-text>.nav-item:hover {background:rgba(225,229,226,.68)}
.v2-nav-text>.nav-item.active {color:var(--v2-primary);background:var(--v2-selection);font-weight:600!important}
.v2-nav-text .v2-nav-group>div .nav-item {padding-left:20px}
.sidebar .v2-nav-text>.v2-nav-group {position:relative;width:100%;margin:0}
.sidebar .v2-nav-text>.v2-nav-group>summary {
  display:flex;
  width:100%;
  min-width:0;
  justify-content:flex-start;
  padding:0 8px;
  font-size:14px!important;
}
.sidebar .v2-nav-text>.v2-nav-group>summary>span {display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar .v2-nav-text>.v2-nav-group>summary>b {display:block;margin-left:auto}
.sidebar .v2-nav-text>.v2-nav-group>div {position:absolute;z-index:8;top:36px;left:0;width:100%;padding:5px;border:1px solid var(--v2-divider);border-radius:7px;background:#fff;box-shadow:0 12px 32px rgba(37,45,41,.14)}
.sidebar .v2-nav-text>.v2-nav-group>div .nav-item {display:flex;width:100%;height:34px;min-height:34px;align-items:center;padding:0 8px;overflow:hidden;color:var(--v2-text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;font-size:14px!important;font-weight:400!important;line-height:20px;text-overflow:ellipsis;white-space:nowrap}
.sidebar .v2-nav-text>.v2-nav-group>div .nav-item>span,.v2-nav-flyout .nav-item>span {display:block!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar .v2-nav-text>.v2-nav-group>div .nav-item:hover {color:var(--v2-text);background:rgba(225,229,226,.68)}
.sidebar .v2-nav-text>.v2-nav-group>div .nav-item.active {color:var(--v2-primary);background:var(--v2-selection);font-weight:600!important}
.sidebar .v2-nav-text>.v2-nav-group[open]>summary {background:rgba(225,229,226,.68)}
.sidebar .v2-nav-text>.v2-nav-group:has(.nav-item.active)>summary {color:var(--v2-primary);background:var(--v2-selection);font-weight:600!important}
.app-shell.sidebar-collapsed .sidebar {width:var(--sidebar-rail-width);padding-inline:0}
.app-shell.sidebar-collapsed .sidebar-brand-row {padding-inline:16px}
.app-shell.sidebar-collapsed .sidebar>.nav {width:var(--sidebar-rail-width);grid-template-columns:var(--sidebar-rail-width);align-items:start;gap:0;overflow-x:hidden;overflow-y:auto}
.app-shell.sidebar-collapsed .v2-nav-text {display:none}
.app-shell.sidebar-collapsed .v2-nav-rail :is(.v2-rail-action,.nav-item,.v2-rail-group) {display:flex;width:44px;padding:0}
.app-shell.sidebar-collapsed .main .text-button {width:auto;font-size:inherit!important}
.sidebar-footer {margin:0 8px;padding-top:7px}
.v2-nav-flyout:popover-open {
  position:fixed;
  display:grid;
  width:224px;
  max-height:min(520px,calc(100dvh - 16px));
  gap:3px;
  margin:0;
  padding:9px;
  overflow:auto;
  border:1px solid var(--v2-divider);
  border-radius:8px;
  background:#fff;
  box-shadow:0 16px 42px rgba(37,45,41,.16);
}
.v2-nav-flyout>strong {padding:6px 8px;color:var(--v2-secondary);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;font-weight:600;line-height:20px}
.v2-nav-flyout .nav-item {display:flex;width:100%;height:34px;min-height:34px;align-items:center;padding:0 8px;overflow:hidden;border:0;border-radius:6px;color:var(--v2-text);background:transparent;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;font-size:14px!important;font-weight:400!important;line-height:20px;text-align:left;text-overflow:ellipsis;white-space:nowrap}
.v2-nav-flyout .nav-item:hover {color:var(--v2-text);background:rgba(225,229,226,.68)}
.v2-nav-flyout .nav-item.active {color:var(--v2-primary);background:var(--v2-selection);font-weight:600!important}

@media(min-width:781px) and (max-width:1100px) {
  .sidebar {padding-inline:0}
  .sidebar-brand-row {padding-inline:16px}
  .sidebar .nav {grid-template-columns:var(--sidebar-rail-width)}
  .v2-nav-text {display:none}
  .v2-nav-rail :is(.v2-rail-action,.nav-item,.v2-rail-group) {display:flex;width:44px;height:34px;min-height:34px;padding:0}
}
@media(max-width:780px) {
  .sidebar.open {width:min(var(--sidebar-expanded-width),calc(100vw - 32px));padding-inline:0}
  .sidebar.open .nav {grid-template-columns:var(--sidebar-rail-width) var(--sidebar-text-width)}
  .sidebar.open .v2-nav-text {display:grid}
}

/* V2.1 residual UI: explicit workspace alignment and specialist context. */
#view-specialists .resource-manager,
#view-branches .resource-manager,
#view-rooms .resource-manager,
#view-equipment .resource-manager {
  width:min(1180px,100%);
  margin-inline:0;
}
#view-products .products-panel,
#view-services .services-panel,
#view-integrations .integration-catalog {width:100%;max-width:none;margin-inline:0}
#view-clients .clients-panel,
#view-settings .settings-workspace,
#view-notifications .notifications-panel {margin-inline:auto}
#view-dashboard.active,
#view-messages.active,
#view-schedule.active,
#view-bookings.active {width:100%;max-width:none}

#view-services.active {flex-direction:column;align-items:stretch}
.specialist-service-context {
  display:flex;
  width:100%;
  min-height:52px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
  padding:9px 12px;
  border:1px solid var(--v2-divider);
  border-radius:8px;
  background:var(--v2-selection);
}
.specialist-service-context[hidden] {display:none}
.specialist-service-context>div:first-child {display:grid;min-width:0;gap:1px}
.specialist-service-context>div:first-child span {color:var(--v2-secondary);font-size:12px}
.specialist-service-context>div:first-child strong {overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
.specialist-service-context-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.specialist-service-context-actions button {width:auto;min-height:34px;padding:5px 10px;font-size:13px}

/* Keep specialist header/actions fixed while the long card body owns scrolling. */
#specialist-editor-panel .resource-modal {
  display:grid!important;
  max-height:min(90dvh,820px);
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
}
#specialist-editor-panel .resource-modal-body {
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#specialist-editor-panel .resource-modal-heading,
#specialist-editor-panel .resource-modal-footer {position:relative;z-index:2}

/* Compact service editor with legible disclosure rows and bounded numeric fields. */
#service-dialog {max-height:min(86dvh,760px)}
#service-dialog .v2-fixed-editor {max-height:min(86dvh,760px)}
#service-dialog .v2-editor-body {align-content:start;grid-auto-rows:max-content;gap:8px;padding:10px 16px;scrollbar-gutter:stable}
#service-dialog .v2-fixed-editor>:first-child,
#service-dialog .v2-fixed-editor>:last-child {padding:12px 16px!important}
#service-dialog .v2-editor-section>summary {min-height:40px;padding:9px 10px}
#service-dialog .v2-editor-section>:not(summary) {margin:8px 10px}
#service-dialog .service-editor-source {grid-template-columns:64px minmax(0,1fr);padding:6px 0 8px}
#service-dialog .service-editor-image,
#service-dialog .service-editor-image-button {width:64px;min-height:64px}
#service-dialog .service-kind-field {padding:6px 0}
#service-dialog .editor-section {padding:7px 0}
#service-dialog .service-time-section {padding:3px 0 5px}
#service-dialog .service-time-section legend {padding-bottom:2px}
#service-dialog .time-fields {
  grid-template-columns:minmax(0,1fr);
  max-width:520px;
  gap:6px;
}
#service-dialog .time-fields>label {width:100%;grid-template-columns:minmax(0,1fr) 120px;grid-template-rows:minmax(40px,auto);align-items:center;gap:12px;white-space:nowrap}
#service-dialog .time-fields input {width:120px;max-width:120px;min-height:40px;justify-self:end}
#service-dialog .service-editor-disclosure>summary,
#service-dialog .optional-service-settings>summary {
  display:flex;
  min-height:44px;
  padding:7px 6px;
  color:var(--v2-text);
  background:#fff;
}
#service-dialog .service-editor-disclosure>summary span,
#service-dialog .optional-service-settings>summary span {min-width:0}
#service-dialog .service-editor-disclosure>summary strong,
#service-dialog .optional-service-settings>summary strong {display:block;color:var(--v2-text);font-size:14px;line-height:20px}
#service-dialog .service-editor-disclosure>summary small,
#service-dialog .optional-service-settings>summary small {display:block;margin-top:0;color:var(--v2-secondary);font-size:12px;line-height:17px}

#view-products .product-table-row>.product-client-name {
  color:var(--v2-text);
  font-size:15px;
  font-weight:600;
  line-height:1.4;
}

/* Schedule time controls share one 112 x 40 visual contract. */
#view-schedule .calendar-times {
  width:236px;
  grid-template-columns:112px 12px 112px;
  justify-content:center;
  gap:6px;
}
#view-schedule .calendar-times label {width:112px}
#view-schedule .calendar-times .birsuol-time-picker,
#view-schedule .calendar-times .birsuol-time-control,
#view-schedule .schedule-break-row select {
  width:112px;
  min-width:112px;
  height:40px;
  min-height:40px;
  border:1px solid var(--v2-control-border);
  border-radius:6px;
  font-size:14px;
  font-variant-numeric:tabular-nums;
  text-align:center;
}
#view-schedule .calendar-times .birsuol-time-control {padding:6px 34px 6px 10px!important}
#view-schedule .calendar-times .birsuol-time-toggle {display:block;height:38px;min-height:38px}
#view-schedule .schedule-break-row select {
  appearance:none;
  padding:0 28px 0 10px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2358665E' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center;
}
#view-schedule .schedule-break-row .text-button {height:40px;min-height:40px}

/* Settings are one coherent centered workspace. */
#settings-panel-schedule {width:100%}
#schedule-settings-form {width:100%;max-width:760px}
.schedule-fixed-step {
  display:grid;
  width:180px;
  min-height:64px;
  align-content:center;
  gap:1px;
  padding:8px 11px;
  border:1px solid var(--v2-divider);
  border-radius:7px;
  background:var(--v2-background);
}
.schedule-fixed-step span,
.schedule-fixed-step small {color:var(--v2-secondary);font-size:12px;line-height:16px}
.schedule-fixed-step strong {font-size:15px;line-height:20px}

#settings-panel-users.users-settings {width:100%;max-width:none;gap:14px;padding:16px}
.users-settings-header {align-items:center;padding-bottom:12px;border-bottom:1px solid var(--v2-divider)}
.users-settings-header>div {min-width:0}
.users-settings-header #open-user-invite {flex:0 0 auto}
#settings-user-list.user-list,
#pending-invitation-list.user-list {gap:0;overflow:hidden;border:1px solid var(--v2-divider);border-radius:8px;background:#fff}
#settings-user-list .user-card,
#pending-invitation-list .user-card {min-height:68px;padding:11px 13px;border:0;border-top:1px solid var(--v2-divider);border-radius:0}
#settings-user-list .user-card:first-child,
#pending-invitation-list .user-card:first-child {border-top:0}
#pending-invitation-list>.muted-copy {margin:0;padding:11px 13px;color:var(--v2-secondary);font-size:13px}
#settings-user-list .user-card h3,
#pending-invitation-list .user-card h3 {font-size:16px;line-height:22px}
#settings-user-list .user-card p,
#pending-invitation-list .user-card p {font-size:13px;line-height:19px}
.pending-invitations {gap:8px;padding-top:14px}
.pending-invitations-heading h3 {font-size:16px}
.pending-invitations-heading p {font-size:13px}

.staff-notification-empty {
  display:grid;
  min-height:88px;
  align-content:center;
  gap:3px;
  padding:14px 16px;
  border:1px solid var(--v2-divider);
  border-radius:8px;
  background:var(--v2-background);
}
.staff-notification-empty strong {font-size:15px;line-height:21px}
.staff-notification-empty span {color:var(--v2-secondary);font-size:13px;line-height:19px}

@media(max-width:780px) {
  .specialist-service-context {align-items:flex-start;flex-direction:column}
  .specialist-service-context-actions {width:100%;justify-content:flex-start}
  #specialist-editor-panel .resource-modal {height:calc(100dvh - 74px);max-height:none}
  #service-dialog,
  #service-dialog .v2-fixed-editor {max-height:calc(100dvh - 90px)}
  #settings-panel-users.users-settings {padding:12px}
}

@media(max-width:520px) {
  #service-dialog .time-fields>label {gap:8px;white-space:normal}
  #service-dialog .time-fields input {width:120px;max-width:100%}
  #view-schedule .calendar-times,
  #view-schedule .schedule-break-row {width:100%;grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr) 32px}
  #view-schedule .calendar-times {grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr)}
  #view-schedule .calendar-times label,
  #view-schedule .calendar-times .birsuol-time-picker,
  #view-schedule .calendar-times .birsuol-time-control,
  #view-schedule .schedule-break-row select {width:100%;min-width:0}
  .schedule-fixed-step {width:100%}
}

/* BirSuol V2.1 unified workspace, fields and state contracts. */
:root {
  --workspace-expanded-max:1600px;
  --workspace-gutter:20px;
  --field-time-width:112px;
  --field-count-width:96px;
  --field-duration-width:112px;
  --field-money-width:144px;
  --field-phone-width:184px;
  --field-name-width:260px;
  --field-email-width:320px;
  --message-unread:#b45309;
  --message-unread-bg:#fff2e2;
  --message-context-width:360px;
}

.workspace-standard,
.view>.workspace-standard {
  width:100%;
  max-width:var(--workspace-standard-max);
  margin-inline:0;
}
.workspace-expanded,
.view>.workspace-expanded {
  width:100%;
  max-width:var(--workspace-expanded-max);
  margin-inline:0;
}
.workspace-compact {margin-inline:0}
#view-dashboard {padding-inline:var(--workspace-gutter)}
#view-dashboard>* {width:100%;max-width:var(--workspace-standard-max)}
#view-clients .clients-panel,
#view-settings .settings-workspace,
#view-notifications .notifications-panel,
#view-products .products-panel,
#view-services .services-panel,
#view-integrations .integration-catalog,
#view-payments .payments-panel {width:100%;max-width:var(--workspace-standard-max);margin-inline:0}
#view-bookings .bookings-panel,
#view-messages .messaging-panel {width:100%;max-width:var(--workspace-standard-max);margin-inline:0}
#view-schedule .calendar-panel {width:100%;max-width:var(--workspace-standard-max);margin-inline:0;grid-template-columns:minmax(0,1fr) 296px}
#view-schedule .schedule-workspace {padding-right:16px}
#view-services .specialist-service-context {width:100%;max-width:var(--workspace-standard-max);margin-right:auto;margin-left:0}

/* Optional right panels are absent from layout until a real panel is rendered. */
.workspace-frame {display:grid;width:100%;max-width:var(--workspace-expanded-max);grid-template-columns:minmax(0,var(--workspace-standard-max));justify-content:start;gap:20px}
.workspace-frame:has(>.birsuol-assistant-panel:not([hidden])) {grid-template-columns:minmax(680px,var(--workspace-standard-max)) minmax(280px,360px)}
.birsuol-assistant-panel[hidden] {display:none}
.birsuol-assistant-panel {min-width:0;border-left:1px solid var(--v2-divider);background:var(--v2-surface)}

.app-shell :is(.field-time,.field-count,.field-duration,.field-money,.field-phone,.field-name,.field-email,.field-title,.field-description) {
  min-height:40px;
  border:1px solid var(--v2-control-border);
  border-radius:6px;
  font:400 14px/1.4 Inter,system-ui,sans-serif;
}
.app-shell .field-time {width:var(--field-time-width);max-width:100%;text-align:center;font-variant-numeric:tabular-nums}
.app-shell .field-count {width:var(--field-count-width);max-width:100%}
.app-shell .field-duration {width:var(--field-duration-width);max-width:100%}
.app-shell .field-money {width:var(--field-money-width);max-width:100%;font-variant-numeric:tabular-nums}
.app-shell .field-phone {width:var(--field-phone-width);max-width:100%}
.app-shell .field-name {width:var(--field-name-width);max-width:100%}
.app-shell .field-email {width:var(--field-email-width);max-width:100%}
.app-shell :is(.field-title,.field-description) {width:100%}

/* Product dialogs sit outside .app-shell; reuse the same semantic field tokens. */
#product-dialog .product-form-grid .field-count {width:min(100%,var(--field-count-width))}
#product-dialog .product-form-grid .field-money {width:min(100%,var(--field-money-width))}
#knowledge-base-form .field-count {width:min(100%,var(--field-count-width));max-width:100%}

#certificate-dialog .certificate-form-grid {
  grid-template-columns:minmax(0,1fr) 136px 120px;
  column-gap:8px;
  align-items:end;
}
#certificate-dialog .certificate-form-grid>label {min-width:0}
#certificate-dialog .certificate-form-grid .field-title {width:100%}
#certificate-dialog .certificate-form-grid .field-money {width:min(100%,136px)}
#certificate-dialog .certificate-form-grid .field-count {width:min(100%,120px)}
#certificate-dialog .certificate-form-grid>.product-wide,
#certificate-dialog .certificate-form-grid>.product-check {grid-column:auto}
#certificate-dialog .certificate-form-grid>.product-wide {grid-column:1/-1}

#view-schedule .calendar-times {
  width:286px;
  max-width:100%;
  grid-template-columns:112px 12px 112px 32px;
}
#view-schedule .calendar-times label {grid-template-rows:34px 40px;align-items:end}
#view-schedule .calendar-times label>span {display:block;min-height:34px;line-height:16px}
#view-schedule .schedule-break-editor {padding:4px}
#view-schedule #schedule-break-list {width:286px;max-width:100%;gap:12px;margin-inline:auto}
#view-schedule .schedule-break-row {
  display:grid;
  width:286px;
  max-width:100%;
  grid-template-columns:minmax(0,1fr);
  gap:4px;
}
#view-schedule .schedule-break-heading {display:flex;min-height:28px;align-items:center;justify-content:space-between;padding-right:4px}
#view-schedule .schedule-break-heading strong {font-size:12px;font-weight:600}
#view-schedule .schedule-break-fields {display:grid;grid-template-columns:112px 12px 112px 32px;gap:6px;align-items:end}
#view-schedule .schedule-break-fields label:nth-of-type(2) {grid-column:3}
#view-schedule .schedule-break-row label {grid-template-rows:24px 40px;align-items:end}
#view-schedule .schedule-break-row label>span {display:flex;min-height:24px;align-items:flex-end;line-height:16px}
#view-schedule .schedule-break-row .schedule-break-remove {
  display:grid;
  grid-column:auto;
  place-items:center;
  width:24px;
  min-width:24px;
  height:24px;
  min-height:24px;
  padding:0;
  border:1px solid var(--v2-divider);
  border-radius:6px;
  color:var(--v2-secondary);
  background:#fff;
}
#view-schedule .schedule-break-row .schedule-break-remove:hover {color:var(--v2-text);border-color:var(--v2-control-border)}
#view-schedule #add-schedule-break {width:auto;min-width:112px;padding-inline:14px}
#view-schedule .schedule-actions {grid-template-columns:minmax(0,280px);justify-content:center;gap:8px}
#view-schedule .schedule-actions>button,
#view-schedule .schedule-actions #clear-selected-days {grid-column:1;width:100%;height:40px;min-height:40px;border-radius:6px;text-align:center}
#view-schedule .schedule-actions #clear-selected-days {border:1px solid var(--v2-control-border);background:#fff;color:var(--v2-text)}

#view-messages .conversation-filters button {display:flex;align-items:center;justify-content:center;gap:6px}
#view-messages .conversation-filters button span {min-width:18px;padding:1px 5px;border-radius:4px;color:var(--v2-secondary);background:var(--v2-background);font-size:12px;font-variant-numeric:tabular-nums}
#view-messages .conversation-filters button[data-conversation-filter="unread"] span:not(:empty),
.v2-message-count:not(:empty),
#view-messages .conversation-unread {color:#fff;background:var(--message-unread)}
#view-messages .conversation-item.is-unread {background:var(--message-unread-bg)}
#view-messages .conversation-item.is-unread .conversation-identity strong {font-weight:700}
#view-messages .conversation-item.is-active {box-shadow:inset 3px 0 var(--v2-primary);background:var(--v2-selection)}
#view-messages .conversation-item.is-active.is-unread {background:linear-gradient(90deg,var(--v2-selection) 0 6px,var(--message-unread-bg) 6px 100%)}
#view-messages .conversation-unread {min-width:20px;max-width:none;border-radius:999px;font-weight:600;text-align:center}
.v2-message-count {min-width:18px;padding:1px 5px;border-radius:999px;font-size:12px;line-height:16px;text-align:center}

/* Button geometry: compact by default; full width is opt-in for workflow rows. */
.button-compact {width:max-content;min-height:36px;padding-inline:14px}
.button-equal-group {display:inline-grid;max-width:100%;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px}
.button-equal-group>button {width:100%;min-width:0;white-space:nowrap}
.button-full {width:100%}
#view-messages .v2-message-context-actions {
  display:grid;
  width:min(100%,296px);
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
#view-messages .v2-message-context-actions>button {width:100%;height:36px!important;min-height:36px!important;margin:0;padding-inline:12px;white-space:nowrap}
#product-discount-matrix>.discount-matrix-add-row {width:auto;min-width:210px;max-width:230px;min-height:36px!important;justify-self:start}
@media(max-width:520px) {
  .button-equal-group {display:grid;grid-auto-flow:row;grid-auto-columns:auto}
}

.birsuol-empty-state {
  display:grid;
  min-height:88px;
  grid-template-columns:28px minmax(0,1fr) auto;
  place-content:center;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border:1px solid var(--v2-divider);
  border-radius:8px;
  color:var(--v2-text);
  background:var(--v2-background);
  text-align:left;
}
.birsuol-empty-icon {display:grid;width:28px;height:28px;place-items:center;border-radius:50%;color:var(--v2-primary);background:var(--v2-selection);font-size:18px}
.birsuol-empty-copy {display:grid;min-width:0;gap:2px}
.birsuol-empty-copy strong {margin:0;color:var(--v2-text);font-size:14px;line-height:20px}
.birsuol-empty-copy>span {color:var(--v2-secondary);font-size:13px;line-height:18px}
.birsuol-empty-state>button {width:auto;min-height:36px}
.birsuol-empty-state[data-empty-kind="error"] .birsuol-empty-icon {color:#943a30;background:#fbeae8}
.birsuol-empty-state[data-empty-kind="filter"] .birsuol-empty-icon {color:var(--v2-secondary);background:#eef1ef}

@media(max-width:1100px) {
  .workspace-frame:has(>.birsuol-assistant-panel:not([hidden])) {display:block}
  .workspace-frame>.birsuol-assistant-panel:not([hidden]) {position:fixed;z-index:70;inset:64px 0 0 auto;width:min(392px,65vw);box-shadow:-8px 0 24px #252d2920}
}

@media(max-width:780px) {
  .app-shell :is(.field-time,.field-count,.field-duration,.field-money,.field-phone,.field-name,.field-email,.field-title,.field-description) {width:100%;max-width:none;min-height:44px}
  #view-schedule .calendar-times,
  #view-schedule #schedule-break-list {width:100%;max-width:none;margin-left:0}
  #view-schedule .calendar-times,
  #view-schedule .schedule-break-row {width:100%}
  #view-schedule .schedule-break-row .schedule-break-remove {width:28px;min-width:28px;height:28px;min-height:28px}
  #view-schedule .schedule-actions {grid-template-columns:minmax(0,1fr)}
  #view-schedule .schedule-actions>button,
  #view-schedule .schedule-actions #clear-selected-days {height:44px;min-height:44px}
  .birsuol-empty-state {grid-template-columns:28px minmax(0,1fr);min-height:96px}
  .birsuol-empty-state>button {grid-column:1/-1;width:100%;min-height:44px}
  .workspace-frame>.birsuol-assistant-panel:not([hidden]) {inset:56px 0 74px;width:100%;border-left:0}
}

/* One grid and one painted control for all four schedule times. The custom
   work-time picker keeps its keyboard/listbox behavior; its wrapper has no
   second border, and the native break select uses the same visual contract. */
#view-schedule .schedule-time-grid {
  display:grid;
  width:248px;
  max-width:100%;
  grid-template-columns:112px 12px 112px;
  column-gap:6px;
  align-items:end;
  margin-inline:auto;
}
#view-schedule .schedule-break-fields.schedule-time-grid label:nth-of-type(2) {grid-column:3}
#view-schedule .schedule-time-grid .birsuol-time-picker {width:100%;min-width:0;border:0;background:transparent;box-shadow:none}
#view-schedule .schedule-time-grid :is(.birsuol-time-control,select.field-time) {
  width:100%;min-width:0;height:40px;min-height:40px;
  padding:0 28px 0 10px!important;
  border:1px solid var(--v2-control-border);border-radius:6px;
  color:var(--v2-text);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2358665E' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center;
  box-shadow:none;appearance:none;font-size:14px;font-variant-numeric:tabular-nums;text-align:center;
}
#view-schedule .schedule-time-grid .birsuol-time-toggle {top:0;right:0;width:30px;height:40px;min-height:40px;transform:none;border:0;background:transparent;color:transparent;font-size:0}
#view-schedule .schedule-time-grid .birsuol-time-toggle:hover {background:transparent}
#view-schedule .schedule-time-grid :is(.birsuol-time-control,select.field-time):hover:not(:disabled) {border-color:var(--v2-primary)}
#view-schedule .schedule-time-grid :is(.birsuol-time-control,select.field-time):focus-visible {outline:2px solid var(--v2-primary);outline-offset:2px;border-color:var(--v2-primary)}
#view-schedule .schedule-time-grid :is(.birsuol-time-control,select.field-time):disabled {opacity:1;color:#748078;background-color:#e9ecea;border-color:#d2dad5}
@media(max-width:600px) {
  #view-schedule .schedule-time-grid {grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr)}
  #view-schedule .calendar-times.schedule-time-grid {width:calc(100% - 10px)}
  #view-schedule .schedule-break-fields.schedule-time-grid {width:100%;margin-inline:0}
}

.product-cover-field{display:grid;gap:8px}
.product-cover-field>img{display:block;width:min(320px,100%);aspect-ratio:16/9;object-fit:cover;border:1px solid var(--v2-divider);border-radius:14px;background:var(--v2-background)}
.product-cover-field>img[hidden]{display:none}
.product-cover-field .form-actions{justify-content:flex-start;margin:0}

/* V2.2 certificate redemption and QR keep BirSuol separate from the UDS panel. */
.booking-certificate-details {border:1px solid var(--v2-divider);border-radius:8px;background:#f8fbf9}
.booking-certificate-details>summary {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;cursor:pointer;list-style:none}
.booking-certificate-details>summary span,.booking-certificate-details-body {display:grid;gap:6px}
.booking-certificate-details-body {padding:0 14px 14px}
.certificate-qr-card {grid-row:span 2;display:grid;min-width:190px;justify-items:center;gap:6px}
.certificate-qr-card img {width:176px;height:176px;padding:8px;border:1px solid var(--v2-divider);border-radius:8px;background:#fff}
.certificate-qr-card code {max-width:190px;overflow-wrap:anywhere;font-size:12px}
.certificate-history {grid-column:1/-1}
.certificate-history ul {display:grid;gap:6px;margin:8px 0 0;padding:0;list-style:none}
.certificate-history li {display:flex;justify-content:space-between;gap:12px;padding-top:6px;border-top:1px solid var(--v2-divider)}
@media(max-width:600px){.certificate-history li{display:grid;gap:3px}.certificate-qr-card{grid-column:1/-1}}
.product-order-table .product-table-row {align-items:center}
.product-order-table .text-button {width:auto;min-height:32px;padding:4px 8px;white-space:normal}
@media(min-width:1101px) {
  #view-products .products-panel {padding:18px 20px}
  #view-products .products-heading {margin-bottom:12px}
  #view-products .products-tabs {gap:4px;margin-bottom:12px}
  #view-products .products-tabs button {min-height:34px;padding:6px 10px}
  #view-products .product-table-row,#view-products .product-table-header {min-height:42px;padding-block:7px}
}

/* The modal top layer is viewport-centered. Context drawers retain their
   right edge; workspace alignment must never leak into dialog positioning. */
:root {--modal-sm-width:440px;--modal-md-width:560px;--modal-lg-width:720px}
dialog:modal:not(.booking-dialog):not(.client-dialog) {box-sizing:border-box;margin:auto;max-height:min(90dvh,820px)}
dialog:modal:is(.booking-cancel-dialog,#copy-schedule-dialog,#user-link-dialog,.sale-dialog) {width:min(var(--modal-sm-width),calc(100vw - 32px))}
dialog:modal:is(.resource-editor:not(#specialist-editor-panel),.specialist-child-dialog,.user-dialog,.user-invite-dialog,#local-service-dialog) {width:min(var(--modal-md-width),calc(100vw - 32px))}
dialog:modal:is(#specialist-editor-panel,#service-dialog,#product-dialog,#certificate-dialog,#create-booking-dialog,#gis-selection-dialog) {width:min(var(--modal-lg-width),calc(100vw - 32px))}
dialog:modal :is(.v2-fixed-editor,.resource-modal,.specialist-child-shell) {max-height:min(90dvh,820px)}

/* Results use one compact row on desktop and two equal columns below it. */
#notification-panel-results .return-effectiveness-panel {width:100%;max-width:860px;margin:0;padding:14px;gap:10px}
#notification-panel-results .return-effectiveness-heading {display:flex;flex-wrap:wrap;align-items:start;justify-content:space-between;gap:12px}
#notification-panel-results .return-effectiveness-heading h3 {margin:0;font-size:18px}
#notification-panel-results .return-effectiveness-subtitle {margin:3px 0 0;color:var(--v2-secondary);font-size:13px}
#notification-panel-results .return-effectiveness-controls {display:flex;flex-direction:row;align-items:end;gap:8px}
#notification-panel-results .return-effectiveness-controls select {width:132px}
#notification-panel-results .return-effectiveness-controls button {width:auto;white-space:nowrap}
#notification-panel-results .return-effectiveness-metrics {display:grid;width:100%;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#notification-panel-results .return-effectiveness-metrics article {display:flex;min-width:0;min-height:88px;flex-direction:column;justify-content:space-between;gap:2px;padding:8px 10px}
#notification-panel-results .return-effectiveness-metrics small {font-size:12px;line-height:1.2}
#notification-panel-results .return-effectiveness-metrics strong {margin:0;font-size:22px;line-height:1.1}
#notification-panel-results .return-effectiveness-metrics span {font-size:12px;line-height:1.2}
#notification-panel-results .return-effectiveness-empty {max-width:560px}
#notification-panel-results .return-effectiveness-method {font-size:13px;color:var(--v2-secondary)}
#notification-panel-results .return-effectiveness-method>summary {width:max-content;max-width:100%;color:var(--v2-primary);cursor:pointer}
#notification-panel-results .return-effectiveness-method>p {max-width:560px;margin:7px 0 0;line-height:1.45}
#notification-panel-results .return-effectiveness-note {padding:0;border:0;background:transparent;font-size:12px}
@media(max-width:1100px) {
  #notification-panel-results .return-effectiveness-panel {max-width:680px}
  #notification-panel-results .return-effectiveness-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px) {
  #certificate-dialog .certificate-form-grid {grid-template-columns:minmax(0,1fr)}
  #certificate-dialog .certificate-form-grid>* {grid-column:1}
  #notification-panel-results .return-effectiveness-heading {display:grid;grid-template-columns:minmax(0,1fr)}
  #notification-panel-results .return-effectiveness-metrics article {min-height:96px;padding:8px}
  #notification-panel-results .return-effectiveness-metrics small {font-size:12px}
}

/* Course composition in the current compact CRM client card. */
.v2-client-context .v2-context-stat {display:grid;min-width:0;gap:4px}
.v2-client-context .client-course-composition {min-width:0;margin:6px 0 10px}
.v2-client-context .client-course-composition li {grid-template-columns:minmax(0,1fr);gap:2px}
.v2-client-context .client-course-composition li span {white-space:normal}
/* Read-only data migration preflight. */
.data-import-card { max-width: 900px; }
.data-import-fields, .data-import-mapping { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.data-import-mapping h3, .data-import-mapping > p { grid-column: 1 / -1; margin: 0; }
.data-import-form label { display: grid; gap: 5px; min-width: 0; }
.data-import-form input, .data-import-form select { width: 100%; min-width: 0; }
.data-import-preview-list { max-height: 320px; overflow: auto; padding-left: 22px; }
.data-import-preview-list li { margin: 4px 0; overflow-wrap: anywhere; }
.data-import-card #data-import-status { overflow-wrap: anywhere; }
.data-import-journal { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border, #dfe5e2); }
.data-import-journal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.data-import-journal-heading h3, .data-import-journal-heading p { margin: 0 0 6px; }
.data-import-journal-list { display: grid; gap: 8px; }
.data-import-journal-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border, #dfe5e2); border-radius: 10px; }
.data-import-journal-item > div { min-width: 0; }
.data-import-journal-item strong, .data-import-journal-item small { display: block; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .data-import-journal-heading, .data-import-journal-item { align-items: stretch; flex-direction: column; }
}

/* BS-28 — shared admin design-system contract from Figma handoff 15:1020,
   15:1058 and 15:1062. Existing semantic classes remain the public API. */
:root {
  --ui-primary:#26704d;
  --ui-primary-hover:#1f6042;
  --ui-selection:#eaf3ed;
  --ui-text:#252d29;
  --ui-secondary:#58665e;
  --ui-border:#e1e5e2;
  --ui-background:#f8f9f8;
  --ui-navigation:#f5f6f5;
  --ui-surface:#fff;
  --ui-space-1:4px;
  --ui-space-2:8px;
  --ui-space-3:12px;
  --ui-space-4:16px;
  --ui-space-5:24px;
  --ui-radius-sm:6px;
  --ui-radius-md:8px;
  --ui-radius-lg:10px;
  --ui-control-compact:36px;
  --ui-control-touch:44px;
  --ui-row-compact:44px;
  --ui-row-two-line:56px;
  --workspace-wide-max:1400px;
  --workspace-medium-max:960px;
  --workspace-compact-max:680px;
  --modal-xl-width:960px;
  --v2-primary:var(--ui-primary);
  --v2-primary-hover:var(--ui-primary-hover);
  --v2-selection:var(--ui-selection);
  --v2-text:var(--ui-text);
  --v2-secondary:var(--ui-secondary);
  --v2-divider:var(--ui-border);
  --v2-navigation:var(--ui-navigation);
  --v2-surface:var(--ui-surface);
  --v2-background:var(--ui-background);
}

/* Button, Input, Select and FormField reuse the current semantic markup. */
:where(.app-shell,dialog) :is(button.primary,button.secondary,a.primary,a.secondary,.action-link) {
  min-height:var(--ui-control-compact);
  border-radius:var(--ui-radius-sm);
}
:where(.app-shell,dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  border-color:var(--ui-border);
  border-radius:var(--ui-radius-sm);
}
:where(.app-shell,dialog) label {min-width:0}
:where(.app-shell,dialog) label>span:first-child,
:where(.app-shell,dialog) .field-label {color:var(--ui-text);font-size:12px;font-weight:500}

/* Modal, Card, Tabs, Badge, TableRow and EmptyState primitives. */
:where(.form-card,.settings-route-card,.panel,.return-effectiveness-panel,.ui-card) {
  border-color:var(--ui-border);
  border-radius:var(--ui-radius-md);
  box-shadow:none;
}
:where(.products-tabs,.settings-tabs,.notification-tabs,.ui-tabs)>button {
  min-height:var(--ui-control-compact);
}
:where(.badge,.status,.ui-badge) {max-width:100%;border-radius:4px;white-space:normal}
:where(.product-table-row,.user-card,.resource-row,.ui-table-row) {min-height:var(--ui-row-compact)}
:where(.birsuol-empty-state,.ui-empty-state) {border-radius:var(--ui-radius-md)}

/* Sales — full names, explicit quantities and a large description editor. */
dialog:modal#product-dialog {width:min(var(--modal-xl-width),calc(100vw - 32px))}
#product-dialog form {max-height:min(90dvh,820px);overflow:auto;scrollbar-gutter:stable}
#product-dialog form>header {position:sticky;z-index:4;top:-16px;background:var(--ui-surface)}
#product-dialog form>footer {position:sticky;z-index:4;bottom:-16px;padding-block:12px;background:var(--ui-surface);border-top:1px solid var(--ui-border)}
#product-dialog .product-description-field textarea {min-height:144px;resize:vertical;line-height:1.5}
#product-dialog .product-items-heading {display:flex;align-items:center;justify-content:space-between;gap:12px}
#product-dialog .product-items-heading h3 {margin:0}
#product-dialog #product-items-count {flex:0 0 auto;padding:3px 8px;color:var(--ui-primary);background:var(--ui-selection);font-size:12px;font-weight:600}
#product-dialog .product-item-row {display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:var(--ui-space-2);padding:6px 0}
#product-dialog .product-item-row.is-course {grid-template-columns:20px minmax(0,1fr)}
#product-dialog .product-item-row.is-course::before {grid-column:1;grid-row:1;align-self:center;text-align:center;font-variant-numeric:tabular-nums}
#product-dialog .product-item-controls {display:flex;width:100%;min-width:0;grid-column:1/-1;align-items:flex-start;gap:var(--ui-space-2)}
#product-dialog .product-item-row.is-course .product-item-controls {grid-column:2;grid-row:1}
#product-dialog .product-item-service {display:grid;min-width:0;flex:1 1 auto;gap:4px}
#product-dialog .product-item-service select {width:100%;min-width:0;min-height:40px}
#product-dialog .product-item-quantity {display:grid;width:92px;flex:0 0 92px;gap:4px;color:var(--ui-secondary);font-size:12px}
#product-dialog .product-item-quantity input {width:100%;min-height:40px;text-align:center;font-variant-numeric:tabular-nums}
#product-dialog .product-item-controls>[data-item-remove] {width:auto;min-height:40px;flex:0 0 auto;margin-top:0}
#view-products .product-table-row>strong {overflow:visible;text-overflow:clip;overflow-wrap:anywhere;white-space:normal}
#view-products .product-table-row>span {overflow-wrap:anywhere}
@media(min-width:781px) and (max-width:1100px) {
  #view-products .product-table-header,
  #view-products .product-table-row {grid-template-columns:minmax(140px,1fr) 70px 82px 80px 78px minmax(180px,240px);gap:6px}
  #view-products .product-table-certificates .product-table-header,
  #view-products .product-table-certificates .product-table-row {grid-template-columns:minmax(180px,1fr) 100px 92px 72px 78px 16px;gap:6px}
}

#certificate-dialog .certificate-form-grid {grid-template-columns:minmax(240px,1fr) 136px 120px;gap:12px}
#certificate-dialog .certificate-form-grid .field-money,
#certificate-dialog .certificate-form-grid .field-count {width:100%}

.certificate-lookup-workspace {grid-template-columns:minmax(0,760px);gap:12px}
.certificate-lookup-card {display:grid;gap:12px;padding:16px}
.certificate-lookup-card .settings-card-header {margin:0}
.certificate-lookup-card .settings-card-header h3 {margin:0;font-size:17px;line-height:24px}
.certificate-lookup-card .settings-card-header p:last-child {margin:3px 0 0;color:var(--ui-secondary);font-size:13px}
.certificate-lookup-controls {display:flex;align-items:end;gap:8px}
.certificate-lookup-controls>label {display:grid;min-width:200px;flex:1;gap:4px;color:var(--ui-secondary);font-size:12px}
.certificate-lookup-controls input,
.certificate-lookup-controls button {height:var(--ui-control-compact);min-height:var(--ui-control-compact)}
.certificate-lookup-controls .form-actions {flex:0 0 auto;gap:8px;margin:0}
.certificate-lookup-controls .form-actions button {min-width:112px}
.certificate-lookup-workspace>.source-note {max-width:760px}

/* Notifications — all tabs share the journal workspace width. */
@media(max-width:1100px) {
  #notification-panel-results .return-effectiveness-panel {width:100%;max-width:none}
}
#notification-panel-results .return-effectiveness-panel {width:100%;max-width:none;margin:0;padding:16px}
#notification-panel-results .return-effectiveness-heading {align-items:end}
#notification-panel-results .return-effectiveness-controls :is(select,button) {
  height:var(--ui-control-compact)!important;
  min-height:var(--ui-control-compact)!important;
  padding-block:0!important;
}
#notification-panel-results .return-effectiveness-controls button {min-width:108px}
#notification-panel-results .return-effectiveness-controls label {display:grid;gap:4px}
#notification-panel-results .return-effectiveness-metrics {gap:12px}
#notification-panel-results .return-effectiveness-metrics article {min-height:96px;padding:12px}

/* Settings — medium forms, compact people rows, separated state/actions. */
#settings-panel-users.users-settings {max-width:var(--workspace-medium-max);padding:16px}
#settings-user-list .user-card,
#pending-invitation-list .user-card {min-height:56px;grid-template-columns:minmax(0,1fr) auto;padding:8px 12px;gap:12px}
#settings-user-list .user-card h3,
#pending-invitation-list .user-card h3 {font-size:14px;line-height:20px}
#settings-user-list .user-card p,
#pending-invitation-list .user-card p {font-size:12px;line-height:17px}
.user-card-identity {display:grid;min-width:0;grid-template-columns:minmax(160px,.75fr) minmax(220px,1.25fr);grid-template-rows:auto auto;align-items:center;column-gap:12px}
.user-card-identity h3 {grid-column:1;grid-row:1}
.user-card-identity p {grid-column:1;grid-row:2}
.user-card-identity .user-card-meta {grid-column:2;grid-row:1/3;align-self:center;gap:6px;margin:0}
.user-card-state {display:flex;align-items:center;justify-content:flex-end;gap:8px;padding-left:12px;border-left:1px solid var(--ui-border)}
.user-card-state>button {width:auto;min-width:96px}
#schedule-settings-form {max-width:860px;padding:16px}
#schedule-settings-form>h3 {margin:20px -16px 0;padding:16px 16px 0;border-top:1px solid var(--ui-border);font-size:16px}
#schedule-settings-form>h3+p {margin:4px 0 12px}
#schedule-settings-form>.schedule-time-settings-row:has(button) {display:grid;grid-template-columns:124px 124px auto;align-items:end;justify-content:start;gap:12px}
#schedule-settings-form>.schedule-time-settings-row:has(button)>label {width:124px;min-width:124px;white-space:nowrap}
#schedule-settings-form>.schedule-time-settings-row:has(button)>button {height:40px;min-height:40px;justify-self:start}
#schedule-settings-form>.schedule-time-settings-row:not(:has(button)) {display:grid;grid-template-columns:112px 112px 180px;align-items:end;gap:12px}

@media(max-width:780px) {
  :where(.app-shell,dialog) :is(button.primary,button.secondary,a.primary,a.secondary,.action-link) {min-height:var(--ui-control-touch)}
  :where(.products-tabs,.settings-tabs,.notification-tabs,.ui-tabs)>button {min-height:var(--ui-control-touch)}
  dialog:modal#product-dialog {width:calc(100vw - 16px)}
  #product-dialog form {max-height:calc(100dvh - 16px)}
  #product-dialog form>header {top:-16px}
  #product-dialog form>footer {bottom:-16px;flex-wrap:wrap}
  #product-dialog .product-description-field textarea {min-height:168px}
  #product-dialog .product-item-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start}
  #product-dialog .product-item-service {width:100%;max-width:none;grid-column:1/-1}
  #product-dialog .product-item-row.is-course .product-item-controls {grid-template-columns:28px minmax(0,1fr) auto}
  #product-dialog .product-item-row.is-course .product-item-service {grid-column:2}
  #product-dialog .product-item-row.is-course .product-item-controls>[data-item-remove] {grid-column:3;grid-row:1}
  #product-dialog .product-item-quantity {width:112px;grid-column:1;grid-row:2}
  #product-dialog .product-item-controls>[data-item-remove] {grid-column:2;grid-row:2;margin-left:auto}
  #certificate-dialog .certificate-form-grid {grid-template-columns:minmax(0,1fr)}
  #certificate-dialog .certificate-form-grid>* {grid-column:1}
  .certificate-lookup-controls {align-items:stretch;flex-direction:column}
  .certificate-lookup-controls>label,
  .certificate-lookup-controls .form-actions {width:100%}
  .certificate-lookup-controls input,
  .certificate-lookup-controls button {height:var(--ui-control-touch);min-height:var(--ui-control-touch)}
  .certificate-lookup-controls .form-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .certificate-lookup-controls .form-actions button {width:100%;min-width:0}
  #notification-panel-results .return-effectiveness-controls :is(select,button) {height:var(--ui-control-touch);min-height:var(--ui-control-touch)}
  #settings-panel-users.users-settings {padding:12px}
  .app-shell .settings-tabs {display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
  .app-shell .settings-tabs>button {height:auto;min-height:var(--ui-control-touch);flex:0 0 auto;padding:8px 12px;white-space:nowrap;scroll-snap-align:start}
  #schedule-settings-form>.schedule-time-settings-row:has(button),
  #schedule-settings-form>.schedule-time-settings-row:not(:has(button)) {grid-template-columns:repeat(2,minmax(0,1fr))}
  #schedule-settings-form>.schedule-time-settings-row:has(button)>label {width:100%;min-width:0}
  #schedule-settings-form>.schedule-time-settings-row:has(button)>button,
  #schedule-settings-form>.schedule-time-settings-row:not(:has(button))>.schedule-fixed-step {grid-column:1/-1}
  #schedule-settings-form>.schedule-time-settings-row:has(button)>button {width:100%}
}

@media(max-width:520px) {
  #notification-panel-results .return-effectiveness-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%}
  #notification-panel-results .return-effectiveness-controls select {width:100%}
  #settings-user-list .user-card,
  #pending-invitation-list .user-card {grid-template-columns:minmax(0,1fr)}
  .user-card-state {justify-content:space-between;padding:8px 0 0;border-top:1px solid var(--ui-border);border-left:0}
  .user-card-identity {grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
  .user-card-identity :is(h3,p,.user-card-meta) {grid-column:1;grid-row:auto}
  .user-card-identity .user-card-meta {margin-top:5px}
  #schedule-settings-form>.schedule-time-settings-row:has(button),
  #schedule-settings-form>.schedule-time-settings-row:not(:has(button)) {grid-template-columns:minmax(0,1fr)}
  #schedule-settings-form>.schedule-time-settings-row>* {grid-column:1}
}
/* BS-UI-05: Bottom nav text protection and mobile dialog containment */
.v2-bottom-nav button span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.2; }
@media (max-width: 350px) {
  .v2-bottom-nav { padding-inline: 2px; }
  .v2-bottom-nav button { letter-spacing: -0.3px; }
}
@media (max-width: 780px) {
  dialog:modal:not(.booking-dialog):not(.client-dialog) {
    max-width: min(calc(100vw - 16px), 640px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    box-sizing: border-box;
  }
}
