/* CRM theme. Storefront documents and iframe content own their separate styles. */
@font-face{font-family:Manrope;src:url('/crm-assets/manrope-regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Manrope;src:url('/crm-assets/manrope-medium.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:Manrope;src:url('/crm-assets/manrope-semibold.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:Manrope;src:url('/crm-assets/manrope-bold.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:dark;--ink:#f5f2ff;--muted:#c8c4dc;--brand:#c4b5fc;--line:rgba(222,213,255,.16);--bg:#10132c;--glass:rgba(27,26,60,.64);--glass-deep:rgba(19,21,47,.91);--glass-soft:rgba(221,210,255,.075);--glass-selected:rgba(217,202,255,.14);font-family:Manrope,sans-serif;color:var(--ink);background:var(--bg)}
body{background:#14152e url('/crm-assets/mountains.png') center/cover fixed no-repeat;font-family:Manrope,sans-serif;font-size:14px;line-height:1.5;min-height:100svh}
body:before{content:'';position:fixed;inset:0;background:rgba(8,10,32,.28);pointer-events:none;z-index:-1}
::selection{background:#9986cf;color:#fff}
button,input,textarea,select{font-family:Manrope,sans-serif;caret-color:#ddd0ff}
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid #e4d5ff;outline-offset:3px}
button:disabled{opacity:.45;cursor:not-allowed}
input,select,textarea,.connection-detail input,.connection-detail input[readonly]{background:rgba(15,17,40,.55);color:var(--ink);border:1px solid var(--line);border-radius:11px;padding:11px 13px}
input::placeholder,textarea::placeholder,.connection-detail input::placeholder{color:#b3adc9;opacity:1}
input:focus,select:focus,textarea:focus{border-color:#c4b5fc;box-shadow:0 0 0 3px #c4b5fc20}
select option{background:#25233e;color:#f5f2ff}
input[type=checkbox]{accent-color:#bba5f7}
input[type=color]{padding:3px;min-height:38px}
::-webkit-scrollbar{width:7px;height:7px}
::-webkit-scrollbar-thumb{background:#bfb0e54d;border-radius:8px}
::-webkit-scrollbar-track{background:transparent}
*{scrollbar-color:#bfb0e54d transparent;scrollbar-width:thin}
h1,h2,h3{color:var(--ink);font-weight:700;letter-spacing:-.025em}
h1{font-size:30px;line-height:1.2}
small,code,.muted{color:var(--muted)}
.primary,.shell .businScenario .darkButton,.shell .site-builder .builder-primary{background:#a590dc;color:#14132c;border:1px solid #c6b3f3;border-radius:11px;font-weight:700;box-shadow:0 5px 16px #08091820}
.primary:hover,.shell .businScenario .darkButton:hover,.shell .site-builder .builder-primary:hover{background:#c2b0f0}
.secondary,.link-button,.shell .businScenario .outlineButton,.shell .businScenario .scenarioReviewActions button,.shell .site-builder button,.shell .builder-actions a,.shell .preview-links a{background:rgba(224,211,255,.08);color:var(--ink);border:1px solid var(--line);border-radius:11px}
.secondary:hover,.shell .businScenario .outlineButton:hover,.shell .site-builder button:hover{background:rgba(224,211,255,.15)}
.text-button,.connection-help,.shell .builder-preview-link a{color:#d4c4ff}
.text-button:hover{color:#ede4ff}
.danger,.form-error,.dangerText{color:#ffb4c4}
.icon-button{color:#d0c7e5;border-radius:9px}
.icon-button:hover{background:var(--glass-selected)}
.shell{padding:24px 24px 24px 0;min-height:100svh;gap:0}
.shell>.sidebar{position:fixed;inset:24px auto 24px 24px;width:260px;padding:0 16px 18px;border:0;border-radius:34px;background:rgba(244,229,255,.025);backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px);box-shadow:inset 0 1px 1px #ffffff59,inset 0 -1px 1px #ffffff1a,inset 0 0 60px #ffffff0f,0 24px 60px #00000040;overflow:hidden;transition:width .3s ease}
.sidebar-header{display:flex;align-items:center;gap:8px;min-height:84px;border-bottom:1px solid #ffffff14;padding:10px 10px 0;flex-shrink:0}
.shell .brand{padding:0;font-size:20px;font-weight:600;letter-spacing:0;min-width:0;flex:1}
.shell .brand>svg{width:24px;height:28px;background:transparent;padding:0;color:#f6f1ff;border-radius:0}
.shell .brand-small{font-size:11px;letter-spacing:.02em;color:#d1c7e3;font-weight:400;margin-top:1px}
.sidebar-toggle{width:32px;height:42px;flex-shrink:0;color:#e9ddf5;border-radius:10px}
.sidebar-toggle:hover{background:#ffffff0f}
.sidebar-toggle svg{width:17px;height:17px}
.shell .company-label{padding:14px 10px 12px;margin:0;color:#ded4eb;font-size:12px;border:0;background:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shell .sidebar nav{display:flex;flex-direction:column;gap:4px;overflow:auto;min-height:0;margin:8px 0 0;flex:1}
.shell .sidebar nav button{font-size:15px;font-weight:500;min-height:50px;border-radius:12px;padding:12px 14px;color:#f2eefa;gap:14px;text-align:left;flex-shrink:0}
.shell .sidebar nav button svg{width:19px;height:19px}
.shell .sidebar nav button.active{background:#ffffff1a;color:#fff;font-weight:600;box-shadow:inset 0 1px 0 #ffffff0a}
.shell .sidebar nav button:hover{background:#ffffff0c}
.shell .sidebar nav button[data-nav=settings]{margin-top:auto}
.shell .sidebar nav button b{background:#ffffff1a;border-radius:7px;color:#fff;min-width:22px;height:22px;display:grid;place-items:center;font-size:11px;line-height:1;padding:0}
.shell .sidebar nav small{color:#e0d6f2;font-size:12px}
.shell .sidebar-bottom{padding:15px 14px 0;margin:0;border-top:1px solid #ffffff14;flex-shrink:0}
.shell .sidebar-bottom p{font-size:10px;color:#c7bcd8;margin:6px 0 12px;line-height:1.5}
.shell .local-dot{color:#d3e8e0;font-size:11px}
.shell .sidebar-bottom button{font-size:13px;color:#e4ddf0}
.shell>.main{margin-left:308px;width:calc(100% - 308px);min-width:0;transition:margin-left .3s ease,width .3s ease}
.shell .topbar{height:70px;border:1px solid var(--line);border-radius:22px;background:rgba(47,34,73,.43);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);padding:0 24px;box-shadow:inset 0 1px 0 #ffffff12,0 12px 32px #070a2015}
.shell .breadcrumb{color:#eee8fb;font-size:12px;line-height:1.5}
.shell .breadcrumb>span{color:#cbbbe1}
.shell .manager-name,.shell .manager-name small{color:#e9e2f7}
.shell .demo-pill{border-color:#ecd79c44;background:#f3cf8312;color:#f4dfae}
.shell .content{padding:28px 0 0}
.shell .content.scenario-page{padding:24px 0 0!important}
.shell .page-heading{margin-bottom:22px;gap:20px}
.shell .page-heading p,.shell .table-toolbar>span,.shell .catalog-summary,.shell .footnote{color:var(--muted)}
.shell.sidebar-collapsed>.sidebar{width:88px}
.sidebar-collapsed .sidebar-header{padding-inline:0;flex-direction:column;justify-content:center;gap:4px;min-height:104px}
.sidebar-collapsed .brand{flex:0}
.sidebar-collapsed .brand>span,.sidebar-collapsed .company-label,.sidebar-collapsed .sidebar nav button>span,.sidebar-collapsed .sidebar nav b,.sidebar-collapsed .sidebar nav small,.sidebar-collapsed .sidebar-bottom p,.sidebar-collapsed .local-dot{display:none}
.shell.sidebar-collapsed .sidebar nav button{justify-content:center;padding:12px 0}
.sidebar-collapsed .sidebar-bottom{padding:14px 0 0}
.sidebar-collapsed .sidebar-bottom button{font-size:0;width:100%;gap:0}
.shell.sidebar-collapsed>.main{margin-left:136px;width:calc(100% - 136px)}
/* Shared glass surfaces and foregrounds. */
.shell :is(.inbox,.table-wrap,.task-list,.people-list,.client-detail,.connection-workspace,.settings-section,.scenarioOverviewCard,.builder-workspace,.builder-settings-grid,.builder-orders){background:var(--glass);color:var(--ink);border:1px solid var(--line);border-radius:20px;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);box-shadow:inset 0 1px 0 #ffffff0a,0 16px 40px #04081d1c}
.shell :is(.dialog-list,.client-context,.chat,.list-head,.list-footer,.chat-header,.reply,.simulate-inbound,.connection-list,.connection-detail){background:transparent;border-color:var(--line);color:var(--ink)}
.shell .inbox{height:max(400px,calc(100dvh - 240px));grid-template-columns:260px minmax(280px,1fr) 255px}
.shell .messages{background:rgba(7,10,30,.17)}
.shell .search{background:#ffffff06;border-color:var(--line);border-radius:11px;color:#c7c0dd}
.shell .search input{background:transparent;box-shadow:none;color:var(--ink)}
.shell :is(.row-title strong,.client-name h2,.context-head,.chat-header strong,.client-context h3,.product-cell strong,.task-row .text-button,.person-row strong,.client-detail h2,.client-detail h3,.settings-section h2,.deal-title){color:var(--ink)}
.shell :is(.row-top time,.row-foot,.dialog-row p,.list-footer,.detail-line,.detail-label,.identity,.note,.date-separator,.chat-notice,.chat-header small,.reply span,.context-task small,.client-detail p,.client-detail dt,.timeline small,.task-row small,.task-row time,.task-row.done,.deal-card p,.deal-card footer,.kanban-column>header small,.column-empty,.settings-section p,.connection-list>p,.connection-detail header p,.connection-detail label,.connection-detail p,.connection-evidence dt,.connection-account span,.connection-status,.connection-empty p){color:var(--muted)}
.shell .dialog-row{border-color:var(--line);border-radius:0}
.shell .dialog-row.selected,.shell .dialog-row:hover,.shell .person-row.selected,.shell .person-row:hover,.shell .connection-account.selected,.shell .connection-account:hover{background:var(--glass-selected);border-color:var(--line)}
.shell .chat-notice{background:#dcc9ff0b;border-color:var(--line);padding:10px 18px;line-height:1.6}
.shell .message{background:rgba(223,211,255,.085);border:1px solid var(--line);border-radius:16px;color:var(--ink);box-shadow:0 4px 12px #080a1910}
.shell .message.outbound{background:rgba(188,164,249,.16);border-color:#d7bfff25}
.shell .message footer{color:#cec6e1}
.shell .message footer span{color:#d9d2ec}
.shell .avatar{color:#f2ebff;background:#c9aff52b}
.shell .avatar.telegram{background:#72cfff26;color:#bce8ff}
.shell .avatar.avito{background:#83d8b32b;color:#c1efdb}
.shell .avatar.instagram{background:#f4a5da26;color:#fbd2ee}
.shell .channel.telegram{color:#a7dcff}.shell .channel.max{color:#dbc8ff}.shell .channel.avito{color:#a6e4c9}.shell .channel.instagram{color:#f5bfdc}.shell .channel.vk{color:#b8ceff}
.shell .source-tag,.shell .markup{background:#d5bcff15;color:#e3d4ff;border-radius:7px;overflow-wrap:anywhere}
.shell .client-context select,.shell .deal-card select{background:#d5bcff10;border-color:var(--line);color:var(--ink)}
.shell :is(.context-divider,.timeline i){background:var(--line)}
.shell th,.shell .builder-orders th{background:#ffffff07;color:#d8cee9;border-color:var(--line);font-size:12px}
.shell td,.shell .builder-orders td{color:var(--ink);border-color:#dacfff12;font-size:13px}
.shell tr:hover td{background:#ffffff05}
.shell .stock,.shell .product-cell code{color:#c8bfdc}
.shell .stock.available{background:#96e8b518;color:#b9eaca}
.shell .device-thumbnail{background:#ded0ff0d;color:#d2c3ec;border:1px solid var(--line);border-radius:10px}
.shell .kanban-column{background:rgba(25,23,57,.5);border:1px solid var(--line);border-radius:18px;min-width:235px;backdrop-filter:blur(20px)}
.shell .kanban-column>header{border-color:var(--line);color:var(--ink);font-size:13px}
.shell .kanban-column>header b{color:#ded3ed}
.shell .deal-card{background:#dacaff0b;color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 20px #080b251c}
.shell .deal-card:hover{background:#dacaff12}
.shell .task-row,.shell .person-row,.shell .client-detail dl>div{border-color:var(--line)}
.shell .task-row time.overdue{color:#f2cca0}
.shell .empty h3,.shell .empty{color:#e1d8f1}
.shell .empty p{color:var(--muted)}
.shell .catalog-summary{border-color:var(--line)}
.shell .channel-tabs{border-color:var(--line)}
.shell .channel-tabs button{color:var(--muted);border-color:transparent}
.shell .channel-tabs button[aria-selected=true]{color:#ece2ff;border-color:#d5c2ff;background:#cdb3ff12}
.shell .connection-account strong,.shell .connection-evidence dd,.shell .connection-list-title h2{color:var(--ink)}
.shell .connection-status.active,.shell .builder-status{color:#b4e8ce}
.shell .connection-status.paused{color:#f5d8a4}
.shell .connection-control{border-color:var(--line)}
.shell .connection-error,.shell .builder-error{background:#ec81921a;color:#ffb7c6!important;border:1px solid #ffadc52b}
.shell .connection-help{color:#ded0ff}
/* Native and React dialogs, login and notifications. */
dialog#editor,dialog.scenarioConfirmation{background:var(--glass-deep);color:var(--ink);border:1px solid #ddd1ff33;border-radius:24px;box-shadow:0 28px 90px #04061780;backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px)}
dialog#editor header,dialog#editor footer{border-color:var(--line)}
dialog#editor label,dialog.scenarioConfirmation p{color:#ded6ed}
#editor::backdrop,dialog.scenarioConfirmation::backdrop{background:#070a2380;backdrop-filter:blur(6px)}
#toast,#toast.error{background:rgba(35,29,65,.96);color:#f2eaff;border:1px solid #d7c5ff3d;border-radius:14px;box-shadow:0 12px 40px #0005}
#toast.error{border-color:#ed9bae66;color:#ffbdcc}
.login{background:transparent;padding:65px 24px;min-height:100svh}
.login-brand,.login-brand svg{color:#f2eaff}
.login-box{background:rgba(34,28,64,.6);border:1px solid #ffffff24;border-radius:30px;backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px);box-shadow:inset 0 1px 0 #ffffff22,0 24px 70px #05081d44}
.login-box>p,.login-note{color:var(--muted)}
.login-note{border-color:var(--line)}
/* React scenario workspace: keep node type colors and graph behavior. */
.shell .businScenario{font-family:Manrope,sans-serif!important;--ink:#f5f2ff;--muted:#c8c4dc;--blue:#c4b5fc;--nav:#1c1b3d;color:var(--ink);background:transparent}
.shell .businScenario :is(.card,.scenarioStudio,.scenarioManager,.studioPreviewPanel,.localTester){background:var(--glass-deep);color:var(--ink);border-color:var(--line);border-radius:20px;box-shadow:0 18px 45px #070a2528}
.shell .businScenario :is(.scenarioTopbar,.scenarioReviewActions,.scenarioSafetyNote,.nodeLibrary,.scenarioInspector,.scenarioManagerGrid>aside){background:rgba(41,35,73,.83);color:var(--ink);border-color:var(--line)}
.shell .businScenario .scenarioCanvas{background-color:rgba(15,17,42,.5);background-image:linear-gradient(#b8a6e90a 1px,transparent 1px),linear-gradient(90deg,#b8a6e90a 1px,transparent 1px);background-size:24px 24px}
.shell .businScenario :is(.nodeLibraryList>button,.phoneGiftTemplate,.canvasNode,.scenarioManagerList>button,.branchPreview span,.scenarioMediaPreview,.scenarioMediaDrop,.messageFormatToolbar,.studioChecks,.testEvent,.runStatus){--ink:#f5f2ff;--muted:#c8c4dc;--blue:#c4b5fc;background:rgba(60,49,89,.86);color:var(--ink);border-color:var(--line);box-shadow:0 7px 22px #04081d20}
.shell .businScenario .canvasStartNode{background:#544077;color:#fff}
.shell .businScenario .canvasNode{border-left-width:2px}
.shell .businScenario .canvasNode.selected{border-color:var(--node-color);box-shadow:0 0 0 2px #d8c0ff25,0 12px 30px #03071b40}
.shell .businScenario :is(.pageHeader h1,.scenarioOverviewRow>div:first-child strong,.canvasNode>strong,.nodeLibraryList strong,.phoneGiftTemplate strong,.inspectorContent h2,.nodeLibrary h2){color:var(--ink)}
.shell .businScenario :is(.pageHeader p,.scenarioOverviewRow time,.scenarioOverviewRow small,.scenarioSafetyNote,.libraryHint span,.nodeLibrary>div>p,.nodeLibraryList small,.phoneGiftTemplate small,.canvasNode>p,.canvasStatus span,.canvasHelp,.inspectorContent label,.fieldHint,.inspectorEmpty p,.scenarioMediaTitle small,.scenarioMediaDrop small,.scenarioMediaPreview small,.messageRichEditor>small,.localTestLog small,.localTestLog code){color:var(--muted)}
.shell .businScenario :is(input,select,textarea,.messageEditorContent){background:#14162a9c;color:var(--ink);border-color:var(--line);border-radius:10px}
.shell .businScenario .scenarioOverviewHead{background:#ffffff09;color:#d6cce6}
.shell .businScenario .scenarioOverviewRow{border-color:var(--line)}
.shell .businScenario .scenarioStatus{background:#ffdd9a15;color:#f6d9a5}
.shell .businScenario .scenarioStatus.active{background:#a6e8c419;color:#b9f0d2}
.shell .businScenario .scenarioToast{background:#f3d58b12;color:#f5dfac;border-color:var(--line)}
.shell .businScenario .messageRichEditor button,.shell .businScenario .canvasControls button,.shell .businScenario .localTestLog footer>button,.shell .businScenario .localTestLog footer>a{background:#cdb9ff12;color:#e7d9ff;border:1px solid var(--line)}
.shell .businScenario .canvasControls{background:#29223fdd;color:#ded2f6;border-color:var(--line)}
.shell .businScenario .scenarioManagerBackdrop,.shell .businScenario .studioPreview{background:#090b2988;backdrop-filter:blur(5px)}
.shell .businScenario .studioPreviewMessages{background:#19172e;color:var(--ink)}
.shell .businScenario .studioPreviewBubble{background:#cab4ff18;color:var(--ink);border-color:var(--line)}
.shell .businScenario .scenarioStudio[aria-busy=true] .scenarioTopbar{background:#3d3354}
/* Site builder chrome only; iframe preview keeps the actual site's design. */
.shell .site-builder{color:var(--ink);font-family:Manrope,sans-serif}
.shell :is(.builder-tree,.builder-inspector,.builder-preview,.builder-toolbar,.preview-host-label){background:transparent;color:var(--ink);border-color:var(--line)}
.shell .builder-preview{background:#0d10243d}
.shell .site-builder :is(p,label,small,.builder-orders small,.builder-orders th){color:var(--muted)}
.shell .site-builder :is(input,textarea,select){background:#12132b7d;color:var(--ink);border-color:var(--line)}
.shell .builder-tabs{border-color:var(--line)}
.shell .builder-tabs button{background:transparent;border-radius:0;color:var(--muted)}
.shell .builder-tabs button.active{color:#e7d7ff;border-bottom-color:#cab5f6}
.shell .tree-row,.shell .array-item{background:#c6b0f610;color:var(--ink);border-color:var(--line)}
.shell .tree-row.selected{background:#c6b0f626;border-color:#c6b0f66b}
.shell .builder-preview-link{border-color:var(--line)}
.shell .preview-host-label{background:#d3baff0c;border-radius:12px}
/* Keep functional workspaces inside the viewport at every breakpoint. */
@media(max-width:1350px){.shell .inbox{grid-template-columns:230px minmax(240px,1fr)}.shell .client-context{display:none}.shell .clients-layout{grid-template-columns:1.1fr 1fr}.shell .site-builder .builder-workspace{grid-template-columns:170px minmax(250px,1fr)}.shell .builder-inspector{grid-column:1/-1;max-height:none;border-left:0;border-top:1px solid var(--line)}}
@media(max-width:1180px){.shell>.sidebar{width:230px}.shell>.main{margin-left:278px;width:calc(100% - 278px)}.shell .sidebar nav button{font-size:14px;padding:12px 10px}.shell .topbar{padding:0 18px}.shell .manager-name{display:none}.shell .breadcrumb{font-size:11px}.shell .businScenario .scenarioWorkspace{grid-template-columns:160px minmax(280px,1fr)}.shell .businScenario .scenarioInspector{display:none;position:absolute;right:12px;top:12px;bottom:12px;width:320px;z-index:9}.shell .businScenario .scenarioInspector.open{display:block}.shell .businScenario .scenarioWorkspace{position:relative}}
@media(max-width:700px){body{background-position:60% center}.shell{display:block;padding:12px}.shell>.sidebar,.shell.sidebar-collapsed>.sidebar{position:relative;inset:auto;width:100%;padding:0 10px 10px;border-radius:24px;display:block}.shell .sidebar-header{min-height:62px;padding:8px 8px 10px;flex-direction:row;justify-content:flex-start}.shell .brand{font-size:18px;flex:1}.shell .brand>span{display:block}.shell .brand-small{display:block;font-size:10px}.shell .brand>svg{width:23px}.shell .company-label,.shell .sidebar-toggle,.shell .sidebar-bottom{display:none}.shell .sidebar nav{display:flex;flex-direction:row;gap:5px;margin-top:10px;overflow-x:auto;padding-bottom:2px}.shell .sidebar nav button,.shell.sidebar-collapsed .sidebar nav button{width:auto;min-height:42px;padding:10px 12px;gap:8px;white-space:nowrap;font-size:12px;justify-content:flex-start}.shell .sidebar nav button>span{display:block;font-size:12px}.shell .sidebar nav button svg{width:16px;height:16px}.shell .sidebar nav button[data-nav=settings]{margin:0}.shell .sidebar nav b,.shell .sidebar nav small{display:none}.shell>.main,.shell.sidebar-collapsed>.main{margin:14px 0 0;width:100%}.shell .topbar{height:auto;min-height:54px;padding:12px 14px;border-radius:17px;gap:10px;flex-wrap:wrap}.shell .top-right{gap:8px}.shell .top-right .avatar,.shell .manager-name{display:none}.shell .demo-pill{font-size:10px;max-width:100%}.shell .content,.shell .content.scenario-page{padding:22px 0 0!important}.shell .page-heading{flex-wrap:wrap;gap:14px}.shell h1{font-size:27px}.shell .page-heading p{font-size:13px}.shell .heading-actions{flex-wrap:wrap}.shell .inbox{display:flex;flex-direction:column;height:auto;min-height:0;overflow:hidden}.shell .dialog-list{width:100%;border-right:0;border-bottom:1px solid var(--line)}.shell .conversation-rows{display:flex;flex-direction:row;overflow:auto;height:auto}.shell .dialog-row{min-width:240px;max-width:240px;flex-shrink:0;border-right:1px solid var(--line)}.shell .chat{width:100%;min-width:0}.shell .messages{height:clamp(280px,50dvh,500px);flex:0 0 auto}.shell .chat-header{flex-wrap:wrap;gap:12px}.shell .chat-tools{gap:12px}.shell .client-context{display:block;border-left:0;border-top:1px solid var(--line)}.shell .clients-layout{grid-template-columns:1fr}.shell .table-toolbar,.shell .catalog-summary{flex-wrap:wrap;gap:12px}.shell .catalog-summary span:last-child{margin-left:0}.shell .task-row{padding:16px;flex-wrap:wrap;gap:12px}.shell .task-row time{margin:0}.shell .settings-columns{grid-template-columns:1fr}.shell .connection-workspace{display:block}.shell .connection-list{border-right:0;border-bottom:1px solid var(--line)}.shell .connection-fields{grid-template-columns:1fr}.shell .site-builder .builder-workspace{display:block;min-height:0}.shell .builder-tree{max-height:300px;border-right:0;border-bottom:1px solid var(--line)}.shell .builder-preview{padding:10px}.shell .builder-inspector{padding:18px}.shell .builder-settings-grid{grid-template-columns:minmax(0,1fr);padding:18px}.shell .builder-tabs{overflow:auto}.shell .builder-tabs button{white-space:nowrap}.shell .builder-actions{flex-wrap:wrap}.shell .builder-preview-link input{flex-basis:100%}.shell .businScenario .pageHeader{flex-wrap:wrap}.shell .businScenario .scenarioOverviewRow{grid-template-columns:minmax(0,1fr)}.shell .businScenario .scenarioStudio{min-height:640px}.shell .businScenario .scenarioTopbar{height:auto;min-height:120px;flex-wrap:wrap}.shell .businScenario .scenarioWorkspace{grid-template-columns:minmax(0,1fr);min-height:520px}.shell .businScenario .nodeLibrary{position:absolute;left:12px;right:12px;bottom:12px;display:block;padding:8px;z-index:6}.shell .businScenario .nodeLibrary>div:first-child,.shell .businScenario .libraryHint{display:none}.shell .businScenario .nodeLibraryList{grid-template-columns:repeat(4,1fr);gap:5px}.shell .businScenario .nodeLibraryList>button{display:flex;justify-content:center;padding:7px}.shell .businScenario .nodeLibraryList>button span,.shell .businScenario .nodeLibraryList>button b{display:none}.shell .businScenario .scenarioInspector{inset:12px;width:auto;max-width:100%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Explicit adapters for the imported studio's more specific light styles. */
.shell .brand{display:flex}
.shell .chat-header small>span{color:#c8c4dc}
.shell .channel-tabs button{background:#d8c6ff0b;border:1px solid var(--line);border-radius:12px}
.shell .channel-tabs button[aria-selected=true]{background:#d8c6ff20;border-color:#cbb9f780}
.shell .channel-tabs button small{color:#ddd1f2}
.shell .settings-section{padding:24px}
.shell .site-builder .preview-host-frame{background:#1f1b38;border-color:var(--line)}
.shell .site-builder .preview-host-label{background:#211d3e;color:#eee3ff;border-radius:0;border-color:var(--line)}
.shell .site-builder .preview-host-label span{color:#c8c4dc}
#scenario-root .scenarioIdentity input,#scenario-root .scenarioLibraryButton{color:var(--ink)!important}
#scenario-root .scenarioIdentity input{background:#14162a9c!important}
#scenario-root .scenarioTopActions .outlineButton,#scenario-root .canvasStatus button{background:#cdb9ff12!important;color:#e7d9ff!important;border:1px solid var(--line)!important}
#scenario-root .scenarioTopActions .darkButton{background:#a590dc!important;color:#14132c!important;border:1px solid #c6b3f3!important}
#scenario-root .canvasStatus span,#scenario-root .canvasHelp,#scenario-root .draftSaved{background:#2b2445e6;color:#e5dcf4;border:1px solid var(--line)}
#scenario-root .draftSaved{background:#a5e9c318;color:#c1ecd6}
#scenario-root .nodeOutputRow{background:#cdb9ff12;color:#e7d9ff;border-color:var(--line)}
#scenario-root .nodeKind>span,#scenario-root .nodeKind button,#scenario-root .libraryEyebrow,#scenario-root .phoneGiftTemplate>span{color:#d9c7ff}
#scenario-root .nodeLibraryList>button i{background:#d7c5ff14;color:#e2d4ff}
#scenario-root .inspectorContent footer{background:#2b2445;border-color:var(--line)}
#scenario-root .inspectorContent header>button{color:#e5dcf4}
#scenario-root .messageFormatToolbar,#scenario-root .messageFormatToolbar select,#scenario-root .messageEditorContent{background:#211d3e;color:#f5f2ff;border-color:var(--line)}
#scenario-root .scenarioButtonFields input,#scenario-root .scenarioButtonFields select{background:#14162a9c!important;color:#f5f2ff!important;border-color:var(--line)}
#scenario-root .scenarioTransferActions,#scenario-root .inlineOptions button,#scenario-root .editorOptions button,#scenario-root .checkRow,#scenario-root .scenarioButtonFields{background:#d4beff0c;color:#e9dfff;border-color:var(--line)}
#scenario-root .scenarioTemplatePicker,#scenario-root .scenarioTemplateOption{background:#29243f;color:#f5f2ff;border-color:var(--line)}
@media(max-width:700px){.shell .brand{display:flex}.shell .settings-section{padding:18px}.shell .channel-tabs{gap:6px;overflow:auto;flex-wrap:nowrap}.shell .channel-tabs button{flex-shrink:0}.shell .topbar .breadcrumb{overflow-wrap:anywhere}}
#scenario-root .messageRichEditor,#scenario-root .messageLinkForm{background:#211d3e;color:var(--ink);border-color:var(--line)}
#scenario-root .messageRichEditor button[aria-pressed=true]{background:#a590dc;color:#14132c;border-color:#c6b3f3}
#scenario-root .messageLinkForm label{color:var(--ink)!important}
#scenario-root .messageEditorContent a{color:#dbc6ff;text-underline-offset:3px}
#scenario-root .scenarioManagerList>button span,#scenario-root .scenarioManagerList>button small,#scenario-root .scenarioManagerGrid aside>p{color:var(--muted)}
#scenario-root .scenarioManager>header>button,#scenario-root .studioPreviewContent>button{color:var(--ink)}
#scenario-root .nodeLibraryList>button{min-width:0;grid-template-columns:30px minmax(0,1fr) 10px;padding:10px 8px;gap:7px}
#scenario-root .nodeLibraryList>button i{width:30px;height:30px}
#scenario-root .secureNotice,#scenario-root .localSuccess{background:#cdb9ff12;color:#e7d9ff;border-color:var(--line)}
#scenario-root .saveState{background:#d5b9ff18;color:#e4d4ff;border:1px solid var(--line)}
#scenario-root .saveState.saved{background:#a5e9c318;color:#c1ecd6}
/* Imported inspector fields have their own important foreground declarations. */
#scenario-root .scenarioInspector :is(input,select,textarea){background:#14162ae6!important;color:#f5f2ff!important;border-color:var(--line)!important}
#scenario-root .scenarioInspector header>button{background:#d8c6ff12!important;color:#e9dcff!important;border-color:var(--line)}
#scenario-root .inspectorContent>header{border-color:var(--line)}
@media(max-width:700px){#scenario-root .scenarioInspector.open{position:fixed;inset:8px;width:auto;max-width:none;max-height:calc(100dvh - 16px);z-index:70;background:#25203bf5;backdrop-filter:blur(30px)}.shell .businScenario .horizontalStudio .scenarioTopActions{display:flex;flex-wrap:wrap}.shell .businScenario .scenarioTopActions select{width:100%}}
#scenario-root .scenarioMediaTitle span,#scenario-root .scenarioMediaDrop,#scenario-root .scenarioMediaDrop b{color:#dfd3f3!important}
#scenario-root .studioPreviewPanel header>button,#scenario-root .studioPreviewBubble footer button,#scenario-root .scenarioManager header>button,#scenario-root .scenarioButtonFields>button{background:#d4beff14;color:#e9dfff;border:1px solid var(--line);border-radius:10px}
#scenario-root .studioPreviewBubble a{color:#ddcaff;text-decoration:underline;text-underline-offset:3px}
#scenario-root .scenarioManager :is(input,select){background:#14162ae6;color:#f5f2ff;border-color:var(--line)}
/* Appearance choice is independent of CRM navigation and unsaved forms. */
.theme-picker{display:flex;align-items:center;gap:8px;flex-shrink:0;font-size:12px;color:var(--muted)}
.theme-picker .theme-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:72px;min-width:72px;height:44px;padding:4px;border:0;border-radius:22px;background:transparent;color:var(--ink);box-shadow:none;cursor:pointer;touch-action:pan-y;user-select:none}
.theme-toggle-track{position:relative;display:flex;align-items:center;justify-content:space-between;width:64px;height:32px;padding:0 8px;border:1px solid var(--line);border-radius:18px;background:var(--glass-deep);box-shadow:inset 0 1px 3px #100a251a;pointer-events:none}
.theme-toggle-track svg{position:relative;z-index:1;width:16px;height:16px;flex-shrink:0}
.theme-toggle-thumb{position:absolute;left:3px;top:3px;width:24px;height:24px;border-radius:50%;background:#eee7ff;box-shadow:0 2px 5px #100a253d;transform:translateX(0);transition:transform 180ms cubic-bezier(.22,1,.36,1)}
.theme-toggle[aria-checked=true] .theme-toggle-thumb{transform:translateX(32px)}
.theme-toggle .theme-sun{color:var(--muted)}
.theme-toggle .theme-moon{color:#413258}
.theme-toggle[aria-checked=false] .theme-sun{color:#413258}
.theme-toggle[aria-checked=false] .theme-moon{color:var(--muted)}
.theme-picker .theme-toggle:hover .theme-toggle-track{border-color:var(--brand)}
.theme-picker .theme-toggle:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.theme-current{min-width:54px;color:var(--ink)}
@media(prefers-reduced-motion:reduce){.theme-toggle-thumb{transition:none}}
.login-theme{position:absolute;top:24px;right:24px}
@media(max-width:700px){.shell .top-right{flex-wrap:wrap}.shell .topbar{align-items:flex-start}.login-theme{position:static;align-self:flex-end;margin-bottom:20px}}
/* Light glass: the same mountains, layout and controls, with a lighter ground. */
html[data-theme=light]{color-scheme:light;--ink:#29213c;--muted:#645773;--brand:#7053ab;--line:rgba(88,64,126,.2);--bg:#e9e4f2;--glass:rgba(255,252,255,.84);--glass-deep:rgba(249,245,255,.98);--glass-soft:rgba(98,68,150,.05);--glass-selected:rgba(109,77,160,.13)}
html[data-theme=light] body{background-image:linear-gradient(rgba(245,239,252,.78),rgba(240,239,249,.83)),url('/crm-assets/mountains.png');color:var(--ink)}
html[data-theme=light] body:before{background:transparent}
html[data-theme=light] ::selection{background:#d4c4eb;color:#29213c}
html[data-theme=light] :is(button,input,textarea,select){caret-color:#7053ab}
html[data-theme=light] :is(input,select,textarea),html[data-theme=light] .connection-detail input,html[data-theme=light] .connection-detail input[readonly]{background:rgba(255,255,255,.7);color:var(--ink);border-color:var(--line)}
html[data-theme=light] :is(input,textarea)::placeholder{color:#776a87}
html[data-theme=light] select option{background:#f9f5ff;color:#29213c}
html[data-theme=light] :is(button,a,summary,[tabindex]):focus-visible{outline-color:#7856b4}
html[data-theme=light] .primary,html[data-theme=light] .shell .businScenario .darkButton,html[data-theme=light] .shell .site-builder .builder-primary{background:#795ab0;color:#fff;border-color:#7856b4}
html[data-theme=light] .primary:hover,html[data-theme=light] .shell .businScenario .darkButton:hover,html[data-theme=light] .shell .site-builder .builder-primary:hover{background:#644499}
html[data-theme=light] :is(.secondary,.link-button),html[data-theme=light] .shell .businScenario :is(.outlineButton,.scenarioReviewActions button),html[data-theme=light] .shell .site-builder button,html[data-theme=light] .shell :is(.builder-actions a,.preview-links a){background:rgba(255,255,255,.55);color:var(--ink);border-color:var(--line)}
html[data-theme=light] .shell .site-builder .builder-primary{background:#795ab0;color:#fff}
html[data-theme=light] :is(.secondary:hover,.icon-button:hover),html[data-theme=light] .shell .site-builder button:hover{background:#cbb6e52b}
html[data-theme=light] :is(.text-button,.connection-help,.icon-button),html[data-theme=light] .shell .builder-preview-link a{color:#694797}
html[data-theme=light] :is(.danger,.form-error){color:#a53355}
html[data-theme=light] .shell>.sidebar{background:rgba(255,247,255,.48);box-shadow:inset 0 1px 1px #ffffffcc,inset 0 -1px 1px #ffffff66,inset 0 0 60px #ffffff40,0 24px 60px #3d245520}
html[data-theme=light] .shell :is(.brand,.brand>svg,.sidebar-toggle,.sidebar nav button,.sidebar-bottom button,.breadcrumb,.manager-name,.manager-name small){color:var(--ink)}
html[data-theme=light] .shell :is(.brand-small,.company-label,.sidebar nav small,.sidebar-bottom p,.breadcrumb>span){color:var(--muted)}
html[data-theme=light] .shell :is(.sidebar-header,.sidebar-bottom){border-color:var(--line)}
html[data-theme=light] .shell .sidebar nav button.active{background:#805baa22;color:#402662}
html[data-theme=light] .shell .sidebar nav button:hover{background:#805baa12}
html[data-theme=light] .shell .sidebar nav button b{background:#795ab0;color:white}
html[data-theme=light] .shell .local-dot{color:#306c55}
html[data-theme=light] .shell .topbar{background:rgba(255,247,255,.62);box-shadow:inset 0 1px 0 #fff8,0 12px 32px #3d24550a}
html[data-theme=light] .shell .demo-pill{background:#fff0d980;color:#78551b;border-color:#a17a393d}
html[data-theme=light] .shell .messages{background:#b2a0d009}
html[data-theme=light] .shell .search{background:#fff4;color:var(--muted)}
html[data-theme=light] .shell .search input{background:transparent}
html[data-theme=light] .shell :is(.message,.deal-card){background:#fff7;color:var(--ink);border-color:var(--line)}
html[data-theme=light] .shell .message.outbound{background:#b6a0df33;border-color:#a288c64d}
html[data-theme=light] .shell :is(.message footer,.message footer span,.chat-header small>span){color:var(--muted)}
html[data-theme=light] .shell .chat-notice{background:#ab8edc0c}
html[data-theme=light] .shell .avatar{background:#a88ad22b;color:#53357c}
html[data-theme=light] .shell .avatar.telegram{background:#5fa9d226;color:#235b7d}
html[data-theme=light] .shell .avatar.avito{background:#77ba9f2b;color:#2b604b}
html[data-theme=light] .shell .avatar.instagram{background:#ce90b726;color:#873564}
html[data-theme=light] .shell .channel.telegram{color:#235b7d}html[data-theme=light] .shell .channel.max{color:#694797}html[data-theme=light] .shell .channel.avito{color:#2b604b}html[data-theme=light] .shell .channel.instagram{color:#873564}html[data-theme=light] .shell .channel.vk{color:#385a95}
html[data-theme=light] .shell :is(.source-tag,.markup){background:#ab8bc81a;color:#5d3e81}
html[data-theme=light] .shell :is(.client-context select,.deal-card select){background:#fff8;color:var(--ink)}
html[data-theme=light] .shell :is(th,.builder-orders th){background:#ad8dc511;color:var(--muted)}
html[data-theme=light] .shell td{border-color:var(--line)}
html[data-theme=light] .shell tr:hover td{background:#ab8dc50b}
html[data-theme=light] .shell :is(.stock,.product-cell code){color:var(--muted)}
html[data-theme=light] .shell .stock.available{background:#83bc9f22;color:#2b604b}
html[data-theme=light] .shell .device-thumbnail{background:#d2c2e526;color:#735a90}
html[data-theme=light] .shell .kanban-column{background:#fff7}
html[data-theme=light] .shell .kanban-column>header b{color:var(--muted)}
html[data-theme=light] .shell :is(.empty,.empty h3){color:var(--ink)}
html[data-theme=light] .shell .task-row time.overdue{color:#986026}
html[data-theme=light] .shell .channel-tabs button{background:#fff5;color:var(--muted)}
html[data-theme=light] .shell .channel-tabs button[aria-selected=true]{background:#b49acc33;border-color:#8c70b080;color:#553179}
html[data-theme=light] .shell .channel-tabs button small{color:var(--muted)}
html[data-theme=light] .shell :is(.connection-status.active,.builder-status){color:#2b694e}
html[data-theme=light] .shell .connection-status.paused{color:#8c6328}
html[data-theme=light] .shell :is(.connection-error,.builder-error){background:#f5c4d326;color:#a53355!important}
html[data-theme=light] :is(dialog#editor,dialog.scenarioConfirmation,.login-box){background:var(--glass-deep);color:var(--ink);border-color:var(--line);box-shadow:0 24px 70px #3d245530}
html[data-theme=light] :is(dialog#editor label,dialog.scenarioConfirmation p,.login-brand,.login-brand svg){color:var(--ink)}
html[data-theme=light] :is(#editor,dialog.scenarioConfirmation)::backdrop{background:#45345355}
html[data-theme=light] #toast{background:#f5edfe;color:#3c2b53;border-color:var(--line)}
html[data-theme=light] #toast.error{color:#a53355;border-color:#a5335555}
html[data-theme=light] .shell .businScenario{--ink:#29213c;--muted:#645773;--blue:#7053ab;--nav:#e9e0f2;color:var(--ink)}
html[data-theme=light] .shell .businScenario :is(.scenarioTopbar,.scenarioReviewActions,.scenarioSafetyNote,.nodeLibrary,.scenarioInspector,.scenarioManagerGrid>aside){background:rgba(245,238,253,.9);color:var(--ink)}
html[data-theme=light] .shell .businScenario .scenarioCanvas{background-color:#f5f0fa80;background-image:linear-gradient(#7053ab12 1px,transparent 1px),linear-gradient(90deg,#7053ab12 1px,transparent 1px)}
html[data-theme=light] .shell .businScenario :is(.nodeLibraryList>button,.phoneGiftTemplate,.canvasNode,.scenarioManagerList>button,.branchPreview span,.scenarioMediaPreview,.scenarioMediaDrop,.messageFormatToolbar,.studioChecks,.testEvent,.runStatus){--ink:#29213c;--muted:#645773;--blue:#7053ab;background:rgba(255,252,255,.95);color:var(--ink)}
html[data-theme=light] .shell .businScenario .canvasStartNode{background:#795ab0;color:#fff}
html[data-theme=light] .shell .businScenario .canvasStartNode :is(strong,p){color:#fff}
html[data-theme=light] .shell .businScenario .scenarioStatus{background:#c498291a;color:#886025}
html[data-theme=light] .shell .businScenario .scenarioStatus.active{background:#699e791a;color:#286546}
html[data-theme=light] .shell .businScenario .scenarioOverviewHead{background:#ab8dc51a;color:var(--muted)}
html[data-theme=light] .shell .businScenario .scenarioToast{background:#d1a73b17;color:#7b571e}
html[data-theme=light] .shell .businScenario :is(.messageRichEditor button,.canvasControls button,.localTestLog footer>button,.localTestLog footer>a){background:#b99ddd1a;color:#5b347f}
html[data-theme=light] .shell .businScenario .canvasControls{background:#f5edfeee;color:var(--ink)}
html[data-theme=light] .shell .businScenario :is(.scenarioManagerBackdrop,.studioPreview){background:#45345355}
html[data-theme=light] .shell .businScenario :is(.studioPreviewMessages,.studioPreviewBubble){background:#e9ddf355;color:var(--ink)}
html[data-theme=light] .shell .businScenario .scenarioStudio[aria-busy=true] .scenarioTopbar{background:#e9dff3}
html[data-theme=light] .shell .site-builder :is(input,textarea,select){background:#fff9;color:var(--ink)}
html[data-theme=light] .shell .builder-preview{background:#b99ddd14}
html[data-theme=light] .shell :is(.tree-row,.array-item){background:#b99ddd12;color:var(--ink)}
html[data-theme=light] .shell .tree-row.selected{background:#b99ddd33;border-color:#9472b880}
html[data-theme=light] .shell .builder-tabs button.active{color:#553179;border-bottom-color:#795ab0}
html[data-theme=light] .shell .site-builder :is(.preview-host-frame,.preview-host-label){background:#f4eef9;color:var(--ink)}
html[data-theme=light] .shell .site-builder .preview-host-label span{color:var(--muted)}
html[data-theme=light] #scenario-root :is(input,select,textarea,.messageEditorContent,.messageFormatToolbar,.messageRichEditor,.messageLinkForm,.scenarioButtonFields input,.scenarioButtonFields select,.scenarioManager input,.scenarioManager select){background:#fffcffe6!important;color:#29213c!important;border-color:var(--line)!important}
html[data-theme=light] #scenario-root .scenarioIdentity input{background:#fffcffe6!important;color:#29213c!important}
html[data-theme=light] #scenario-root .scenarioLibraryButton{color:var(--ink)!important}
html[data-theme=light] #scenario-root :is(.scenarioTopActions .outlineButton,.canvasStatus button,.scenarioInspector header>button){background:#b99ddd1a!important;color:#5b347f!important;border-color:var(--line)!important}
html[data-theme=light] #scenario-root .scenarioTopActions .darkButton{background:#795ab0!important;color:#fff!important;border-color:#7856b4!important}
html[data-theme=light] #scenario-root :is(.canvasStatus span,.canvasHelp,.saveState,.nodeOutputRow,.scenarioTransferActions,.inlineOptions button,.editorOptions button,.checkRow,.scenarioButtonFields,.secureNotice,.localSuccess){background:#b99ddd1a;color:var(--ink)}
html[data-theme=light] #scenario-root :is(.saveState.saved,.draftSaved){background:#99c6ae22;color:#286546}
html[data-theme=light] #scenario-root :is(.nodeKind>span,.nodeKind button,.libraryEyebrow,.phoneGiftTemplate>span,.scenarioMediaTitle span,.scenarioMediaDrop,.scenarioMediaDrop b){color:#694797!important}
html[data-theme=light] #scenario-root .nodeLibraryList>button i{background:#b99ddd26;color:#694797}
html[data-theme=light] #scenario-root .inspectorContent footer{background:#f3eaf9}
html[data-theme=light] #scenario-root .messageRichEditor button[aria-pressed=true]{background:#795ab0;color:#fff}
html[data-theme=light] #scenario-root :is(.messageEditorContent a,.studioPreviewBubble a){color:#694797}
html[data-theme=light] #scenario-root :is(.studioPreviewPanel header>button,.studioPreviewBubble footer button,.scenarioManager header>button,.scenarioButtonFields>button){background:#b99ddd1a;color:#5b347f}
@media(max-width:700px){html[data-theme=light] #scenario-root .scenarioInspector.open{background:#f9f4fffa}}
html[data-theme=light] #scenario-root .canvasStartNode{background:#795ab0!important;color:#fff}
html[data-theme=light] #scenario-root .canvasStartNode :is(strong,p,.nodeKind>span){color:#fff!important}

/* Sales and company administration extend the existing CRM surfaces. */
.company-label select{display:block;width:100%;margin-top:6px;min-height:38px;font:inherit;color:var(--ink,#f5f2ff);background:rgba(25,24,59,.8);border:1px solid rgba(222,213,255,.28);border-radius:8px;padding:6px;max-width:100%}
.sales-filter{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:20px 0 10px}.sales-filter label{display:grid;gap:6px;font-size:12px;min-width:140px}.sales-filter select,.sales-filter input{min-height:40px}.sales-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:24px 0;border-block:1px solid rgba(222,213,255,.2);padding:24px 0;gap:20px}.sales-summary dt{font-size:13px}.sales-summary dd{margin:12px 0 6px;font-size:25px;font-weight:650;letter-spacing:-.02em}.sales-summary small,.sales-table small,.sales-row small{display:block;color:var(--muted,#c8c4dc);font-size:12px}.sales-section{margin:24px 0;padding:22px;background:rgba(20,22,48,.7);border:1px solid rgba(222,213,255,.16);border-radius:20px;min-width:0}.sales-section h2{font-size:19px;margin:0 0 14px}.sales-section h3{font-size:15px;margin:24px 0 8px}.sales-section p{line-height:1.6}.sales-table-scroll{overflow:auto}.sales-table{border-collapse:collapse;width:100%;min-width:580px;font-variant-numeric:tabular-nums}.sales-table td,.sales-table th{padding:13px 12px;text-align:left;border-bottom:1px solid rgba(222,213,255,.18);font-size:13px}.sales-table thead th{color:var(--muted,#c8c4dc);font-weight:500}.sales-funnel{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:16px;overflow:auto;padding:8px 0}.sales-funnel div{display:grid;gap:10px;border-top:1px solid rgba(222,213,255,.3);padding-top:12px}.sales-funnel strong{font-size:24px}.sales-funnel span,.sales-funnel small{font-size:12px}.sales-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sales-columns .sales-section{margin:0}.sales-row{padding:16px 0;border-bottom:1px solid rgba(222,213,255,.18)}.sales-row>strong,.sales-row>small{display:block;margin-bottom:7px}.sales-row button{padding-left:0;margin-right:14px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.member-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid rgba(222,213,255,.18)}.member-row strong{flex:1;overflow-wrap:anywhere}.sales-section summary{cursor:pointer;font-weight:600}.workspace-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px}.sales-summary dd,.sales-table td{font-variant-numeric:tabular-nums}.sales-filter input:focus-visible,.sales-filter select:focus-visible{outline:3px solid #c2b0f0;outline-offset:3px}
html[data-theme="light"] .sales-section{background:rgba(255,255,255,.8);border-color:#d3cadf}html[data-theme="light"] .sales-row,html[data-theme="light"] .member-row,html[data-theme="light"] .sales-table td,html[data-theme="light"] .sales-table th,html[data-theme="light"] .sales-summary{border-color:#c6bcd5}html[data-theme="light"] .sales-row small,html[data-theme="light"] .sales-summary small,html[data-theme="light"] .sales-table small{color:#514967}
@media(max-width:1250px){.sales-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.sales-columns{grid-template-columns:1fr}}@media(max-width:700px){.sales-summary{grid-template-columns:1fr 1fr;gap:22px 14px}.sales-summary dd{font-size:22px}.sales-section{padding:16px}.sales-filter label{flex:1;min-width:125px}.sales-filter button{flex:1}.section-heading{flex-wrap:wrap}.member-row{gap:10px}.member-row strong{flex-basis:100%}.sidebar-collapsed .company-label{display:none}}

/* Company directory: stable rows keep names, roles and actions aligned. */
.shell .workspace-section h2{margin:0}.workspace-total{font-size:13px;color:var(--muted)}.shell .workspace-list{display:block;margin-top:18px}.workspace-row{display:grid;grid-template-columns:minmax(180px,1fr) 130px minmax(230px,auto);align-items:center;gap:24px;padding:20px 16px;border-bottom:1px solid var(--line);min-width:0}.workspace-row:last-child{border-bottom:0}.workspace-row.is-current{background:var(--selected,rgba(217,202,255,.14));border-radius:12px}.workspace-identity{min-width:0}.workspace-identity strong{display:block;font-size:16px;line-height:1.45;overflow-wrap:anywhere}.workspace-identity small{display:block;font-size:12px;color:var(--muted);margin-top:6px}.workspace-role{font-size:13px;color:var(--muted)}.workspace-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px}.shell .workspace-actions button{margin:0;padding:10px 14px;min-height:40px;font-size:13px;white-space:nowrap}.workspace-current{font-size:13px;padding:10px 14px;min-height:40px;color:var(--ink);display:inline-flex;align-items:center}.shell .workspace-delete{border:1px solid rgba(235,135,150,.5);border-radius:11px;background:transparent;color:#ffb8c4}.shell .workspace-delete:hover{background:rgba(190,80,100,.15)}.workspace-hint{padding-top:18px;margin:0!important;color:var(--muted);font-size:13px}.workspace-delete-confirm{background:#a42d48!important;color:#fff!important}html[data-theme=light] .shell .workspace-delete{color:#9a203c;border-color:#c6a1ad}html[data-theme=light] .shell .workspace-delete:hover{background:#9a203c0c}@media(max-width:1100px){.workspace-row{grid-template-columns:minmax(150px,1fr) 100px;gap:12px 20px}.workspace-actions{grid-column:1/-1;justify-content:flex-start}.workspace-role{text-align:right}}@media(max-width:600px){.workspace-row{padding:18px 10px;grid-template-columns:minmax(0,1fr);gap:10px}.workspace-role{text-align:left}.workspace-actions{flex-wrap:wrap;gap:10px}.shell .workspace-actions button,.workspace-current{flex:1}.workspace-identity strong{font-size:16px}}

/* Utilities live with navigation; the workspace starts directly at its content. */
.shell>.main>.content,.shell>.main>.content.scenario-page{padding-top:0!important}
.shell>.sidebar{display:flex;flex-direction:column}
.shell .sidebar nav{margin-top:4px;scrollbar-width:thin}
.shell .sidebar nav button{min-height:44px;padding-block:10px}
.shell .sidebar nav button[data-nav=settings]{margin-top:0}
.shell .sidebar-bottom{padding:12px 8px 0}
.sidebar-tools{display:grid;gap:10px}
.sidebar-tools .theme-picker{justify-content:space-between;gap:4px}
.sidebar-tools .theme-current{font-size:12px;min-width:52px}
.shell .sidebar-channel-status{display:flex;align-items:center;gap:8px;width:100%;min-height:32px;padding:4px 0;font-size:12px;text-align:left}
.sidebar-channel-status>svg{width:16px;height:16px;flex-shrink:0}
.sidebar-channel-status>i{width:6px;height:6px;border-radius:50%;background:var(--muted);margin-left:auto;flex-shrink:0}
.sidebar-channel-status>i.is-connected{background:#91d5b4}
.sidebar-account{display:flex;align-items:center;gap:9px;min-width:0;padding-top:8px;border-top:1px solid var(--line)}
.sidebar-account .avatar{width:30px;height:30px;font-size:12px;flex-shrink:0}
.sidebar-account>div{min-width:0}
.sidebar-account strong{display:block;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-account small{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.sidebar-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.shell .sidebar-footer button{min-height:32px;font-size:12px;gap:5px}
.sidebar-footer svg{width:14px;height:14px}
.sidebar-tools-expand,.sidebar-company-compact,.mobile-menu-toggle,.mobile-menu-backdrop{display:none}
.shell.sidebar-collapsed .sidebar-tools{display:none}
.shell.sidebar-collapsed .sidebar-tools-expand,.shell.sidebar-collapsed .sidebar-company-compact{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:8px;gap:0}
.sidebar-tools-expand svg,.sidebar-company-compact svg{width:20px;height:20px}
.shell.sidebar-collapsed .sidebar-company-compact{order:1;margin-top:4px}
.shell.sidebar-collapsed .sidebar nav{order:2}
.shell.sidebar-collapsed .sidebar-bottom{order:3}
.shell .inbox{height:max(400px,calc(100dvh - 142px))}
@media(max-width:700px){
 .shell{padding-bottom:80px}
 .shell>.sidebar,.shell.sidebar-collapsed>.sidebar{display:flex;position:fixed;inset:12px auto 12px 12px;width:min(280px,calc(100vw - 24px));padding:0 14px 14px;z-index:82;transform:translateX(calc(-100% - 24px));visibility:hidden;background:var(--glass-deep);transition:transform 220ms cubic-bezier(.22,1,.36,1),visibility 220ms}
 .shell.mobile-menu-open>.sidebar{transform:translateX(0);visibility:visible}
 .shell .sidebar-header,.shell.sidebar-collapsed .sidebar-header{min-height:76px;flex-direction:row;padding:10px 6px;gap:8px}
 .shell .sidebar-header .sidebar-toggle{display:flex;align-items:center;justify-content:center}
 .shell .company-label,.shell.sidebar-collapsed .company-label{display:block;padding:12px 6px}
 .shell .sidebar nav{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;flex:1;gap:3px}
 .shell .sidebar nav button,.shell.sidebar-collapsed .sidebar nav button{width:100%;min-height:44px;font-size:14px;padding:10px 12px}
 .shell .sidebar nav button>span{font-size:14px}
 .shell .sidebar-bottom{display:block;padding:10px 6px 0}
 .shell.sidebar-collapsed .sidebar-tools{display:grid}
 .shell.sidebar-collapsed .sidebar-tools-expand,.shell.sidebar-collapsed .sidebar-company-compact{display:none}
 .shell .sidebar-footer .local-dot{display:block}
 .shell.sidebar-collapsed .sidebar-bottom button{width:auto;font-size:12px;gap:5px}
 .shell>.main,.shell.sidebar-collapsed>.main{margin:0;width:100%}
 .shell .inbox{height:auto}
 .mobile-menu-toggle{position:fixed;left:16px;bottom:16px;z-index:80;display:flex;align-items:center;gap:9px;min-height:46px;max-width:calc(100vw - 32px);padding:10px 15px;border:1px solid var(--line);border-radius:16px;background:var(--glass-deep);color:var(--ink);box-shadow:0 5px 18px #100a2533}
 .mobile-menu-toggle svg{width:20px;height:20px;flex-shrink:0}
 .mobile-menu-toggle span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
 .mobile-menu-open .mobile-menu-backdrop{display:block;position:fixed;inset:0;z-index:81;width:100%;height:100%;background:#100a2570;backdrop-filter:blur(3px)}
 .mobile-menu-open .mobile-menu-toggle{visibility:hidden}
}
@media(prefers-reduced-motion:reduce){.shell>.sidebar{transition:none}}
