:root{--text:#192734;--text-muted:#546772;--text-soft:#5c6d79;--bg:#f4f6f8;--surface:#fff;--border:#dfe6ea}html[data-theme="dark"]{--text:#e4edf2;--text-muted:#a7b7c0;--text-soft:#9eafb9;--bg:#0e161d;--surface:#16232d;--border:#2b3a44}:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);font-size:16px;line-height:1.5}*{box-sizing:border-box}body{margin:0}body>header{min-height:76px;background:#fff;border-bottom:1px solid #dfe6ea;padding:16px max(24px,calc((100vw - 1240px)/2));display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{font-size:23px;font-weight:750;color:#152d40;text-decoration:none}.brand small{font-size:10px;letter-spacing:2px;display:inline-block;margin-left:10px;color:var(--text-muted)}nav,.actions,.heading{display:flex;gap:14px;align-items:center;flex-wrap:wrap}nav form{margin:0}main{max-width:1240px;margin:36px auto;min-height:65vh;padding:0 24px}h1{font-size:30px;line-height:1.2;margin:0 0 12px}h2{font-size:21px;margin:0 0 14px}h3{font-size:16px;margin:0 0 10px}p{margin:10px 0 16px}.eyebrow{font-size:12px;font-weight:650;letter-spacing:1.6px;color:var(--text-muted)}.heading{justify-content:space-between;margin-bottom:24px}section{padding:24px;border:1px solid #dfe6ea;background:white;border-radius:9px;margin-bottom:22px}.narrow{max-width:650px;margin-left:auto;margin-right:auto}.grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.grid section{min-width:0}label{display:block;font-weight:600;margin:15px 0}input,textarea,select{font:inherit}input,textarea{display:block;width:100%;padding:10px 12px;border:1px solid #adbcc6;border-radius:5px;margin-top:6px;background:#fff;color:inherit}select{padding:9px 10px;border:1px solid #adbcc6;border-radius:5px;background:#fff;color:inherit}textarea{resize:vertical;min-height:96px}input:focus,textarea:focus,select:focus{outline:3px solid #c7e4ea;border-color:#1c6878}.check{display:flex;align-items:flex-start;gap:10px;font-weight:400}.check input{width:auto;margin-top:5px}button,.button{display:inline-block;border:1px solid #165c70;background:#165c70;color:white;font:inherit;font-weight:600;padding:10px 15px;border-radius:5px;text-decoration:none;cursor:pointer}button:disabled{opacity:.55;cursor:wait}.secondary{background:#fff;color:#234453;border-color:#b8c8d1}.danger{background:#a83237;border-color:#a83237;color:white}.disabled{opacity:.55;cursor:not-allowed;pointer-events:none}a{color:#165c70}form+form,.actions{margin-top:18px}.actions form{margin:0}.notice,.warning{border-left:4px solid #267b72;background:#e9f3f0;padding:14px 18px;margin-bottom:22px;overflow-wrap:anywhere}.warning{background:#fff3e5;border-color:#bb721f}.warning p:last-child{margin-bottom:0}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:14px}th{color:#5c6d79;font-weight:650;font-size:12px;letter-spacing:.3px;background:#f6f8f9}td,th{padding:13px 12px;border-bottom:1px solid #e4eaee;vertical-align:top}code{font-size:13px;overflow-wrap:anywhere}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#f7f9fa;border:1px solid #e4eaee;border-radius:6px;padding:12px}article{border-bottom:1px solid #dfe6ea;padding:15px 0}small,footer{color:var(--text-muted)}footer{padding:22px;text-align:center;font-size:12px}.filter-bar{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr)) auto;gap:12px;align-items:end;margin-bottom:20px}.filter-bar label{margin:0}.filter-bar input,.filter-bar select{width:100%;margin-top:6px}.filter-actions{display:flex;gap:8px;align-items:center;padding-bottom:1px}.filter-actions .button,.filter-actions button{white-space:nowrap}.campaign-grid{grid-template-columns:minmax(320px,.8fr) minmax(0,1.2fr)}.metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.metric{background:#fff;border:1px solid #dfe6ea;border-radius:9px;padding:18px}.metric small{display:block;margin-bottom:6px}.metric strong{font-size:28px;line-height:1}.status-pill{display:inline-block;padding:4px 9px;border-radius:999px;background:#edf2f4;color:#425865;font-size:12px;font-weight:700;white-space:nowrap}.status-active,.status-qualified,.status-succeeded{background:#e7f4ee;color:#176044}.status-paused,.status-ready,.status-awaiting_reply,.status-unknown{background:#fff3d8;color:#805800}.status-handoff,.status-uncertain{background:#fff0dc;color:#8b5310}.status-failed,.status-cancelled{background:#fae7e8;color:#8d2e34}.status-engaged,.status-opening_queued,.status-resolving{background:#e8f1f8;color:#245d82}.row-attention td{background:#fffaf3}.account-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:28px}.account-summary h2{margin-bottom:6px}.account-facts{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:12px;min-width:55%}.account-facts span{background:#f7f9fa;border:1px solid #e4eaee;border-radius:7px;padding:11px 13px;min-width:0}.account-facts small,.account-facts strong{display:block}.account-facts strong{margin-top:4px;font-size:13px;overflow-wrap:anywhere}.account-grid section{margin-bottom:0}.account-grid{margin-bottom:22px}.account-grid details summary{cursor:pointer;font-size:21px}.account-grid details[open] summary{margin-bottom:12px}.state-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.state-grid.compact{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.state-card{border:1px solid #e4eaee;background:#f8fafb;border-radius:8px;padding:13px;min-width:0}.state-card small,.state-card strong,.state-card code{display:block}.state-card strong{margin:5px 0;overflow-wrap:anywhere}.decision-card{border:1px solid #dfe6ea;border-radius:8px;margin:12px 0;background:#fff}.decision-card summary{cursor:pointer;padding:14px 16px;display:flex;justify-content:space-between;gap:18px;align-items:center}.decision-card[open] summary{border-bottom:1px solid #e4eaee}.decision-body{padding:18px}.decision-body .grid{align-items:start}.transport-box{background:#f7f9fa;border:1px solid #e4eaee;border-radius:8px;padding:14px;margin-top:18px}.transport-box dl{display:grid;grid-template-columns:minmax(150px,.35fr) minmax(0,1fr);gap:8px 14px;margin:0}.transport-box dt{font-weight:650;color:#5c6d79}.transport-box dd{margin:0;overflow-wrap:anywhere}.observability-note{color:#5c6d79;font-size:13px}@media(max-width:1000px){.filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-actions{grid-column:1/-1}.state-grid,.state-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.metrics-grid{grid-template-columns:1fr 1fr}.campaign-grid{grid-template-columns:1fr}.account-summary{display:block}.account-facts{min-width:0;margin-top:16px}}@media(max-width:760px){body>header{align-items:flex-start;flex-direction:column;padding:16px 24px}.grid{grid-template-columns:1fr;gap:0}main{margin-top:24px;padding:0 16px}section{padding:18px}h1{font-size:26px}.heading{align-items:flex-start}.metrics-grid{grid-template-columns:1fr 1fr}.account-grid{gap:16px}.account-facts{grid-template-columns:1fr}.filter-bar{grid-template-columns:1fr}.state-grid,.state-grid.compact{grid-template-columns:1fr}.decision-card summary{align-items:flex-start;flex-direction:column}.transport-box dl{grid-template-columns:1fr;gap:4px}.transport-box dd{margin-bottom:8px}}

.accounts-shell{padding:0;overflow:visible}.accounts-auth-warning{margin:0;border-left:0;border-bottom:1px solid #f0c7ca;border-radius:9px 9px 0 0;background:#fff1f2;color:#8d2e34;display:flex;gap:8px 14px;align-items:center;flex-wrap:wrap}.accounts-auth-warning span{color:#70474a}.accounts-table{font-size:14px}.accounts-table th{background:#fff;padding:15px 20px;border-bottom:1px solid #dfe6ea}.accounts-table td{padding:16px 20px;vertical-align:middle}.accounts-table tbody tr:last-child td{border-bottom:0}.accounts-table .row-attention td{background:#fffafa}.account-channel{display:flex;align-items:center;gap:12px;min-width:0}.account-channel-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:0 0 34px;background:#229ed9;color:#fff;font-weight:800;font-size:13px}.account-channel-copy{display:flex;flex-direction:column;min-width:0}.account-channel-name{font-weight:700;color:#192734;text-decoration:none;line-height:1.3}.account-channel-copy span,.account-last-activity{font-size:13px;color:#5c6d79}.account-channel-copy small{margin-top:2px}.account-status-note{display:block;margin-top:5px;color:#8d2e34}.accounts-actions-heading,.accounts-actions-cell{text-align:right}.accounts-actions-cell{white-space:nowrap}.accounts-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.account-auth-button{padding:8px 14px;font-size:13px}.account-menu{position:relative;display:inline-block}.account-menu>summary{list-style:none;width:38px;height:34px;display:grid;place-items:center;border:1px solid #9ec4df;border-radius:6px;background:#fff;color:#17608f;font-weight:800;letter-spacing:1px;cursor:pointer}.account-menu>summary::-webkit-details-marker{display:none}.account-menu-popover{position:absolute;right:0;top:40px;z-index:30;min-width:190px;padding:6px;background:#fff;border:1px solid #dfe6ea;border-radius:8px;box-shadow:0 12px 30px rgba(31,48,60,.14);text-align:left}.account-menu-popover a,.account-menu-popover .menu-action{display:block;width:100%;padding:9px 10px;border:0;border-radius:5px;background:#fff;color:#234453;text-align:left;text-decoration:none;font:inherit;font-weight:500;white-space:nowrap}.account-menu-popover a:hover,.account-menu-popover .menu-action:hover{background:#f4f7f8}.account-menu-popover form{margin:0}.account-menu-popover input{display:none}
@media(max-width:760px){.accounts-auth-warning{align-items:flex-start;flex-direction:column}.accounts-table th:nth-child(3),.accounts-table td:nth-child(3){display:none}.accounts-table th,.accounts-table td{padding:13px 12px}.account-channel-icon{display:none}.accounts-row-actions{gap:6px}.account-auth-button{padding:7px 10px}}

.account-detail .heading{margin-bottom:16px}.account-detail section{padding:18px;margin-bottom:16px}.account-detail .account-grid{gap:16px;margin-bottom:16px}.account-detail .account-grid label{margin:10px 0}.account-detail .account-grid p{margin:7px 0 12px}.account-detail .actions{gap:10px;margin-top:12px}.account-detail button,.account-detail .button{padding:8px 12px}.account-detail .account-facts{gap:8px}.account-detail .account-facts span{padding:9px 11px}

/* Application shell / collapsible sidebar */
:root{--sidebar-width:252px;--sidebar-collapsed-width:76px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.nav-icon{width:21px;height:21px;display:block;flex:0 0 21px}
.has-sidebar{min-height:100vh;background:#f4f6f8}
.app-sidebar{position:fixed;inset:0 auto 0 0;z-index:80;width:var(--sidebar-width);display:flex;flex-direction:column;background:#fff;border-right:1px solid #dfe6ea;box-shadow:2px 0 10px rgba(21,45,64,.03);transition:width .2s ease,transform .2s ease}
.app-workspace{min-width:0;min-height:100vh}
.has-sidebar .app-workspace{padding-left:var(--sidebar-width);transition:padding-left .2s ease}
.has-sidebar main{width:100%;max-width:1680px;margin:0 auto;min-height:calc(100vh - 58px);padding:32px clamp(20px,2vw,34px)}
.guest-layout .app-workspace main{max-width:1240px;margin:36px auto;min-height:65vh;padding:0 24px}
.sidebar-head{height:82px;display:flex;align-items:center;gap:10px;padding:14px 12px 14px 16px;border-bottom:1px solid #edf1f3}
.sidebar-brand{display:flex;align-items:center;gap:11px;min-width:0;flex:1;color:#152d40;text-decoration:none}
.sidebar-brand-mark{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border-radius:10px;background:#165c70;color:#fff;font-size:13px;font-weight:800;letter-spacing:.04em}
.sidebar-brand-copy{font-size:21px;font-weight:780;white-space:nowrap;overflow:hidden}
.sidebar-brand-copy small{display:block;margin:1px 0 0;font-size:11px;letter-spacing:1.4px;color:var(--text-muted)}
.sidebar-toggle,.sidebar-mobile-trigger{width:38px;height:38px;display:grid;place-items:center;padding:0;border:1px solid #d7e1e6;border-radius:9px;background:#fff;color:#536a77}
.sidebar-toggle:hover,.sidebar-mobile-trigger:hover{background:#f2f6f8;color:#17485d}
.sidebar-nav{display:flex;flex-direction:column;align-items:stretch;gap:5px;flex-wrap:nowrap;padding:14px 10px;overflow-y:auto}
.sidebar-nav-link{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;margin:0;padding:10px 12px;border:0;border-radius:9px;background:transparent;color:#405965;text-decoration:none;font-size:14px;font-weight:620;text-align:left;white-space:nowrap;overflow:hidden}
.sidebar-nav-link:hover{background:#f2f6f8;color:#17485d}
.sidebar-nav-link.is-active{background:#eaf3f6;color:#14566a;box-shadow:inset 3px 0 0 #1b7084}
.sidebar-label{overflow:hidden;text-overflow:ellipsis}
.sidebar-footer{margin-top:auto;padding:12px 10px 16px;border-top:1px solid #edf1f3}
.sidebar-footer form{margin:0}
.sidebar-logout{cursor:pointer}
.sidebar-mobile-trigger{display:none;position:fixed;top:12px;left:12px;z-index:90;box-shadow:0 6px 18px rgba(21,45,64,.12)}
html[data-sidebar="collapsed"] .app-sidebar{width:var(--sidebar-collapsed-width)}
html[data-sidebar="collapsed"] .has-sidebar .app-workspace{padding-left:var(--sidebar-collapsed-width)}
html[data-sidebar="collapsed"] .sidebar-brand-copy,
html[data-sidebar="collapsed"] .sidebar-label{display:none}
html[data-sidebar="collapsed"] .sidebar-head{padding-left:10px;padding-right:10px;justify-content:center;flex-direction:column;height:106px;gap:8px}
html[data-sidebar="collapsed"] .sidebar-brand{flex:0}
html[data-sidebar="collapsed"] .sidebar-toggle .nav-icon{transform:rotate(180deg)}
html[data-sidebar="collapsed"] .sidebar-nav-link{justify-content:center;padding-left:10px;padding-right:10px}
html[data-sidebar="collapsed"] .sidebar-nav-link.is-active{box-shadow:none;background:#eaf3f6}
html[data-sidebar="collapsed"] .sidebar-footer{padding-left:10px;padding-right:10px}
html[data-sidebar="collapsed"] .sidebar-logout{justify-content:center}
@media(max-width:820px){
    :root{--sidebar-width:260px}
    .app-sidebar{width:var(--sidebar-width);box-shadow:10px 0 28px rgba(21,45,64,.16)}
    .has-sidebar .app-workspace,
    html[data-sidebar="collapsed"] .has-sidebar .app-workspace{padding-left:0}
    .has-sidebar main{padding:74px 16px 24px}
    html[data-sidebar="collapsed"] .app-sidebar{width:var(--sidebar-width);transform:translateX(-100%)}
    html[data-sidebar="collapsed"] .sidebar-head{height:82px;padding:14px 12px 14px 16px;justify-content:initial;flex-direction:row}
    html[data-sidebar="collapsed"] .sidebar-brand{flex:1}
    html[data-sidebar="collapsed"] .sidebar-brand-copy,
    html[data-sidebar="collapsed"] .sidebar-label{display:block}
    html[data-sidebar="collapsed"] .sidebar-nav-link,
    html[data-sidebar="collapsed"] .sidebar-logout{justify-content:flex-start;padding-left:12px;padding-right:12px}
    html[data-sidebar="collapsed"] .sidebar-toggle .nav-icon{transform:rotate(180deg)}
    .sidebar-mobile-trigger{display:none}
    html[data-sidebar="collapsed"] .sidebar-mobile-trigger{display:grid}
}

.page-heading-main{display:flex;align-items:flex-start;gap:13px;min-width:0}
.page-heading-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px;margin-top:2px;border-radius:11px;background:#eaf3f6;color:#165c70}
.page-heading-icon .nav-icon{width:22px;height:22px}
.page-heading-main .eyebrow{margin-top:0}
@media(max-width:520px){.page-heading-icon{width:38px;height:38px;flex-basis:38px}}

.account-menu-popover .menu-action-danger{color:#8d2e34;font-weight:650}
.account-menu-popover .menu-action-danger:hover{background:#fff1f2;color:#8d2e34}


/* Settings page */
.settings-heading{margin-bottom:22px}
.settings-lead{max-width:720px;margin-bottom:0}
.settings-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:24px;align-items:start}
.settings-sidebar-stack{display:grid;gap:18px;align-self:start}
.settings-card{margin:0;min-width:0}
.settings-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.settings-card-heading.compact{margin-bottom:12px}
.settings-card-heading .eyebrow{margin:0 0 5px}
.settings-card-heading h2,.settings-card-heading h3{margin-bottom:0}
.settings-card-heading p:last-child{margin-bottom:0}
.settings-inline-fact{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 13px;margin:16px 0;border:1px solid #e4eaee;border-radius:7px;background:#f8fafb}
.settings-inline-fact span{color:#5c6d79;font-size:13px}
.settings-inline-fact strong{white-space:nowrap}
.settings-generation-form{display:grid;gap:18px}
.settings-generation-form label{margin:0}
.settings-form-block{min-width:0}
.settings-example-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.settings-generation-form textarea{width:100%;min-height:150px;max-height:420px}
.settings-example-grid textarea{min-height:210px}
.settings-auto-panel{padding:18px;border:1px solid #dfe6ea;border-radius:8px;background:#f8fafb}
.settings-primary-toggle{display:flex;align-items:flex-start;gap:11px;margin:4px 0 18px;padding:11px 12px;border:1px solid #dfe6ea;border-radius:7px;background:#fff}
.settings-primary-toggle input,.settings-sender-option input{width:auto;flex:0 0 auto;margin:4px 0 0}
.settings-senders-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:4px 0 10px}
.settings-senders-heading small{font-weight:400;text-align:right}
.settings-sender-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.settings-sender-option{display:flex;align-items:flex-start;gap:10px;margin:0;padding:10px 11px;border:1px solid #dfe6ea;border-radius:7px;background:#fff;font-weight:400;min-width:0}
.settings-sender-option>span{display:flex;flex-direction:column;min-width:0}
.settings-sender-option strong,.settings-sender-option small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-sender-option.is-disabled{opacity:.55;background:#f3f5f6}
.settings-senders-help{margin:12px 0 0;font-size:13px}
.settings-form-actions{display:flex;justify-content:flex-end;padding-top:2px}
@media(max-width:1100px){
    .settings-layout{grid-template-columns:300px minmax(0,1fr);gap:18px}
    .settings-example-grid,.settings-sender-grid{grid-template-columns:1fr}
}
@media(max-width:820px){
    .settings-layout{grid-template-columns:1fr}
    .settings-sidebar-stack{grid-template-columns:1fr}
    .settings-form-actions{justify-content:stretch}
    .settings-form-actions button{width:100%}
}


/* Theme selector */
.theme-choice{display:grid;grid-template-columns:1fr;gap:9px;margin:4px 0 12px}
.theme-option{position:relative;display:grid;grid-template-columns:auto 48px minmax(0,1fr);align-items:center;gap:11px;margin:0;padding:11px 12px;border:1px solid #dfe6ea;border-radius:8px;background:#fff;cursor:pointer}
.theme-option:hover{border-color:#9fb4c0;background:#f9fbfc}
.theme-option:has(input:checked){border-color:#2a8194;box-shadow:0 0 0 2px rgba(42,129,148,.12)}
.theme-option input{width:auto;margin:0}
.theme-option>span:last-child{display:flex;flex-direction:column;min-width:0}
.theme-option small{font-weight:400}
.theme-option-preview{width:48px;height:30px;border-radius:6px;border:1px solid #c9d4da;overflow:hidden;display:grid;grid-template-columns:13px 1fr;background:#f6f8f9}
.theme-option-preview i{display:block;background:#fff;border-right:1px solid #dfe6ea}
.theme-option-preview b{display:block;margin:6px;border-radius:3px;background:#dce7eb}
.theme-option-preview-dark{border-color:#3b4d59;background:#101a22}
.theme-option-preview-dark i{background:#182630;border-color:#344854}
.theme-option-preview-dark b{background:#31505e}
.settings-theme-help{font-size:13px}

/* Global dark theme */
:root[data-theme="dark"]{
    color-scheme:dark;
    color:#e4edf2;
    background:#0e161d;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .has-sidebar,
html[data-theme="dark"] .app-workspace{background:#0e161d;color:#e4edf2}
html[data-theme="dark"] body>header,
html[data-theme="dark"] section,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .decision-card,
html[data-theme="dark"] .account-menu-popover,
html[data-theme="dark"] .app-sidebar,
html[data-theme="dark"] .settings-sender-option,
html[data-theme="dark"] .settings-primary-toggle,
html[data-theme="dark"] .theme-option{background:#16232d;border-color:#2d3e49;color:#e4edf2}
html[data-theme="dark"] .sidebar-head,
html[data-theme="dark"] .sidebar-footer,
html[data-theme="dark"] article,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] .decision-card[open] summary{border-color:#293944}
html[data-theme="dark"] .brand,
html[data-theme="dark"] .sidebar-brand,
html[data-theme="dark"] .account-channel-name,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] strong{color:#edf4f7}
html[data-theme="dark"] a{color:#72bfd1}
html[data-theme="dark"] small,
html[data-theme="dark"] footer,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .observability-note,
html[data-theme="dark"] .account-channel-copy span,
html[data-theme="dark"] .account-last-activity,
html[data-theme="dark"] .transport-box dt,
html[data-theme="dark"] .settings-inline-fact span{color:#9eafb9}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{background:#101b23;border-color:#40525e;color:#eaf1f5}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#738690}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus{outline-color:#275c69;border-color:#69b6c7}
html[data-theme="dark"] button,
html[data-theme="dark"] .button{background:#247387;border-color:#247387;color:#f7fbfc}
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .sidebar-toggle,
html[data-theme="dark"] .sidebar-mobile-trigger{background:#16232d;border-color:#3a4c57;color:#c9d8df}
html[data-theme="dark"] .secondary:hover,
html[data-theme="dark"] .sidebar-toggle:hover,
html[data-theme="dark"] .sidebar-mobile-trigger:hover{background:#1c2d38;color:#f1f7f9}
html[data-theme="dark"] th{background:#13202a;color:#aebcc4}
html[data-theme="dark"] pre,
html[data-theme="dark"] .account-facts span,
html[data-theme="dark"] .state-card,
html[data-theme="dark"] .transport-box,
html[data-theme="dark"] .settings-inline-fact,
html[data-theme="dark"] .settings-auto-panel{background:#111d25;border-color:#2d3e49}
html[data-theme="dark"] .panel{background:#111d25;border-color:#2d3e49}
html[data-theme="dark"] .notice{background:#12302e;border-color:#42a99b;color:#d9f3ee}
html[data-theme="dark"] .warning{background:#332616;border-color:#d08a35;color:#f2dec3}
html[data-theme="dark"] .accounts-auth-warning{background:#311c21;border-color:#593038;color:#f3c4c9}
html[data-theme="dark"] .accounts-auth-warning span{color:#d7aeb2}
html[data-theme="dark"] .accounts-table th{background:#16232d;border-color:#2d3e49}
html[data-theme="dark"] .accounts-table .row-attention td,
html[data-theme="dark"] .row-attention td{background:#241a1d}
html[data-theme="dark"] .account-menu>summary{background:#16232d;border-color:#3c708c;color:#79bfdc}
html[data-theme="dark"] .account-menu-popover a,
html[data-theme="dark"] .account-menu-popover .menu-action{background:#16232d;color:#d5e2e8}
html[data-theme="dark"] .account-menu-popover a:hover,
html[data-theme="dark"] .account-menu-popover .menu-action:hover{background:#20313c}
html[data-theme="dark"] .account-menu-popover .menu-action-danger{color:#f19aa0}
html[data-theme="dark"] .account-menu-popover .menu-action-danger:hover{background:#3b2025;color:#ffc2c7}
html[data-theme="dark"] .sidebar-nav-link{color:#b8c8d0}
html[data-theme="dark"] .sidebar-nav-link:hover{background:#1d2d37;color:#e6f2f5}
html[data-theme="dark"] .sidebar-nav-link.is-active{background:#18333d;color:#83cfdf;box-shadow:inset 3px 0 0 #4daabd}
html[data-theme="dark"] .sidebar-brand-mark{background:#2b7f92}
html[data-theme="dark"] .page-heading-icon{background:#18333d;color:#7bc5d5}
html[data-theme="dark"] .status-pill{background:#26343d;color:#c3d0d6}
html[data-theme="dark"] .status-active,
html[data-theme="dark"] .status-qualified,
html[data-theme="dark"] .status-succeeded{background:#18382e;color:#82d4ad}
html[data-theme="dark"] .status-paused,
html[data-theme="dark"] .status-ready,
html[data-theme="dark"] .status-awaiting_reply,
html[data-theme="dark"] .status-unknown{background:#3a3018;color:#e4c46d}
html[data-theme="dark"] .status-handoff,
html[data-theme="dark"] .status-uncertain{background:#3a2818;color:#efb36c}
html[data-theme="dark"] .status-failed,
html[data-theme="dark"] .status-cancelled{background:#3b2025;color:#f2a0a6}
html[data-theme="dark"] .status-engaged,
html[data-theme="dark"] .status-opening_queued,
html[data-theme="dark"] .status-resolving{background:#1c3040;color:#8fc3e4}
html[data-theme="dark"] .theme-option:hover{background:#1b2b35;border-color:#516774}
html[data-theme="dark"] .theme-option:has(input:checked){border-color:#64b1c2;box-shadow:0 0 0 2px rgba(100,177,194,.16)}
html[data-theme="dark"] .theme-option-preview-light{opacity:.85}
html[data-theme="dark"] .settings-sender-option.is-disabled{background:#101920}
html[data-theme="dark"] ::selection{background:#2b6f80;color:#fff}


/* Account health / warmup workspace */
.accounts-health-table th:nth-child(3),.accounts-health-table th:nth-child(4){min-width:150px}
.account-health-link{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-decoration:none;color:inherit}
.account-health-link small{color:var(--text-muted)}
.health-pill{display:inline-flex;align-items:center;width:max-content;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:750;line-height:1.2;white-space:nowrap}
.warmup-cold{background:#e9f0f6;color:#315f7d}.warmup-warming{background:#fff3d8;color:#8b6415}.warmup-warm{background:#e4f5ec;color:#28724f}
.health-clean{background:#e4f5ec;color:#28724f}.health-caution{background:#fff3d8;color:#8b6415}.health-elevated{background:#ffead8;color:#9b5518}.health-high_risk{background:#fde5e7;color:#a43b45}
.account-detail-heading{align-items:flex-end}.account-tabs{display:flex;gap:6px;margin:0 0 18px;padding:5px;border:1px solid #dfe6ea;border-radius:10px;background:#fff;overflow-x:auto}
.account-tabs a{padding:9px 13px;border-radius:7px;color:#526873;text-decoration:none;font-size:13px;font-weight:680;white-space:nowrap}
.account-tabs a:hover{background:#f2f6f8;color:#17485d}.account-tabs a.is-active{background:#eaf3f6;color:#14566a}
.account-health-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.account-health-overview section{margin:0}.health-card{display:flex;flex-direction:column;gap:8px;min-height:156px}
.health-card-primary{border-color:#b8d4df}.health-card-label{font-size:12px;font-weight:760;letter-spacing:.08em;text-transform:uppercase;color:#70818c}.health-card>strong{font-size:26px}
.health-progress{height:8px;border-radius:999px;background:#e5ecef;overflow:hidden}.health-progress i{display:block;height:100%;border-radius:inherit;background:#2b8194}.health-progress-large{height:10px;margin:18px 0 8px}
.health-signal-grid,.health-activity-times{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.health-signal-grid>span,.health-activity-times>span{display:flex;flex-direction:column;gap:4px;padding:13px;border:1px solid #e1e8ec;border-radius:8px;background:#f8fafb}
.health-signal-grid small,.health-activity-times small{color:var(--text-muted)}.health-signal-grid strong{font-size:22px}
.account-section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}.account-section-heading .eyebrow{margin:0 0 4px}.account-section-heading h2{margin:0}
.health-metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.health-metrics-grid article{display:flex;flex-direction:column;gap:5px;padding:15px;border:1px solid #e1e8ec;border-radius:9px;background:#f8fafb}.health-metrics-grid article strong{font-size:26px}.health-metrics-grid article small,.health-metrics-grid article span{color:var(--text-muted)}
.health-score{font-size:28px}.health-incidents-table code{font-size:12px;white-space:nowrap}.severity-pill{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:750;text-transform:uppercase}
.severity-low{background:#e9f0f6;color:#315f7d}.severity-medium{background:#fff3d8;color:#8b6415}.severity-high{background:#ffead8;color:#9b5518}.severity-critical{background:#fde5e7;color:#a43b45}
@media(max-width:1100px){.account-health-overview,.health-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.health-signal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.accounts-health-table th:nth-child(5),.accounts-health-table td:nth-child(5){display:none}.account-health-overview,.health-metrics-grid,.health-signal-grid,.health-activity-times{grid-template-columns:1fr}.account-tabs{margin-left:-4px;margin-right:-4px}.account-section-heading{align-items:flex-start;flex-direction:column}}
html[data-theme="dark"] .account-tabs,
html[data-theme="dark"] .health-metrics-grid article,
html[data-theme="dark"] .health-signal-grid>span,
html[data-theme="dark"] .health-activity-times>span{background:#111d25;border-color:#2d3e49}
html[data-theme="dark"] .account-tabs a{color:#aebdc5}html[data-theme="dark"] .account-tabs a:hover{background:#1d2d37;color:#e6f2f5}html[data-theme="dark"] .account-tabs a.is-active{background:#18333d;color:#83cfdf}
html[data-theme="dark"] .health-progress{background:#283944}html[data-theme="dark"] .health-progress i{background:#55a8b9}
html[data-theme="dark"] .account-health-link small,
html[data-theme="dark"] .health-card-label,
html[data-theme="dark"] .health-metrics-grid article small,
html[data-theme="dark"] .health-metrics-grid article span,
html[data-theme="dark"] .health-signal-grid small,
html[data-theme="dark"] .health-activity-times small{color:#9eafb9}

/* Info hint: a small "i" that explains a field or button (component x-hint). */
.hint{position:relative;display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;margin-left:2px;border-radius:50%;border:1px solid #9fb3be;color:#4f6c7b;background:#fff;font:700 11px/1 Georgia,serif;font-style:italic;cursor:help;vertical-align:middle;user-select:none}
.hint:hover,.hint:focus-visible{border-color:#165c70;color:#fff;background:#165c70;outline:none}
.hint::after{content:attr(data-hint);position:absolute;left:50%;bottom:calc(100% + 9px);z-index:30;width:max-content;max-width:min(300px,80vw);padding:9px 12px;border-radius:8px;background:#192734;color:#f3f7f9;font:500 13px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;font-style:normal;text-align:left;white-space:normal;box-shadow:0 10px 24px rgba(15,30,40,.22);transform:translate(-50%,4px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,transform .12s}
.hint-bottom::after{top:calc(100% + 9px);bottom:auto;transform:translate(-50%,-4px)}
.hint:hover::after,.hint:focus-visible::after,.hint:focus::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
html[data-theme="dark"] .hint{background:#16232d;border-color:#4c6270;color:#a9c4d0}
html[data-theme="dark"] .hint:hover,html[data-theme="dark"] .hint:focus-visible{background:#247387;border-color:#247387;color:#fff}
html[data-theme="dark"] .hint::after{background:#e8f0f3;color:#13202a}
@media(max-width:640px){
  .hint::after{left:auto;right:-8px;transform:translateY(4px)}
  .hint:hover::after,.hint:focus-visible::after,.hint:focus::after{transform:none}
}
.settings-moved-note{display:flex;align-items:center;gap:10px;margin:0 0 18px;padding:12px 16px;border:1px solid #dfe6ea;border-radius:10px;background:#fff;font-size:14px}
html[data-theme="dark"] .settings-moved-note{background:#16232d;border-color:#2d3e49}
.user-project-roles{display:grid;gap:8px;margin:12px 0}
.user-project-role{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:10px 14px;border:1px solid #dfe6ea;border-radius:9px;font-weight:400}
.user-project-role>span{display:flex;flex-direction:column}
.user-project-role select{width:auto;min-width:11rem;margin:0}
.user-project-roles-help{margin:0 0 18px;font-size:14px}
.user-project-roles-help summary{cursor:pointer;color:#165c70;font-weight:600}
html[data-theme="dark"] .user-project-role{border-color:#2d3e49}
html[data-theme="dark"] .user-project-roles-help summary{color:#83cfdf}
/* Short automatic proxy notices for administrators (proxy-alerts.js). */
.proxy-alerts{display:grid;gap:6px;margin-bottom:18px;padding:12px 16px;border:1px solid #c9dfe5;border-left:4px solid #1c7c8c;border-radius:8px;background:#f1f8fa;font-size:14px}
.proxy-alerts.is-failed{border-color:#ecd3d4;border-left-color:#a83237;background:#fdf4f4}
.proxy-alerts ul{margin:0;padding-left:18px}
.proxy-alerts-actions{display:flex;align-items:center;gap:12px}
.proxy-alerts-actions button{padding:5px 11px;font-size:13px}
html[data-theme="dark"] .proxy-alerts{background:#12262c;border-color:#2d4a52;border-left-color:#55a8b9}
html[data-theme="dark"] .proxy-alerts.is-failed{background:#2a1a1d;border-color:#593038;border-left-color:#f19aa0}
.proxy-alerts[hidden]{display:none}
/* Sidebar group captions; hidden when the menu is collapsed to icons. */
.sidebar-group{margin:12px 12px 2px;color:#7f9099;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.sidebar-nav .sidebar-group:first-child{margin-top:0}
.sidebar-nav-link{min-height:40px}
html[data-sidebar="collapsed"] .sidebar-group{height:1px;margin:8px 10px;overflow:hidden;background:#dfe6ea;color:transparent}
html[data-theme="dark"] .sidebar-group{color:#71858f}
html[data-theme="dark"][data-sidebar="collapsed"] .sidebar-group{background:#2d3e49}
@media(max-width:900px){html[data-sidebar="collapsed"] .sidebar-group{height:auto;margin:12px 12px 2px;background:none;color:#7f9099}}

/* Messenger of the conversation: used by the inbox and lead cards. */
.inbox-channel{display:inline-block;padding:.08rem .42rem;border-radius:.35rem;font-size:.68rem;font-weight:700;letter-spacing:.02em;vertical-align:.08em;background:#e6f1f8;color:#1d5f86}
.inbox-channel-max{background:#efe8fb;color:#5b3a99}
html[data-theme="dark"] .inbox-channel{background:#183447;color:#9fd0ee}
html[data-theme="dark"] .inbox-channel-max{background:#2c2342;color:#cdb8f2}

/* Readability: secondary text uses the theme token; tables scroll with a visible edge on phones. */
.muted,small,footer,.eyebrow,th{color:var(--text-muted)}
html[data-theme="dark"] .muted,html[data-theme="dark"] small,html[data-theme="dark"] footer,html[data-theme="dark"] .eyebrow{color:var(--text-muted)}
.table-wrap{position:relative;-webkit-overflow-scrolling:touch;background:linear-gradient(90deg,var(--surface) 30%,transparent),linear-gradient(90deg,transparent,var(--surface) 70%) 100% 0,radial-gradient(farthest-side at 0 50%,rgba(0,0,0,.18),transparent),radial-gradient(farthest-side at 100% 50%,rgba(0,0,0,.18),transparent) 100% 0;background-repeat:no-repeat;background-size:40px 100%,40px 100%,14px 100%,14px 100%;background-attachment:local,local,scroll,scroll}
@media(max-width:760px){small,.eyebrow,th,.status-pill{font-size:12px}td,th{padding:11px 10px}input,textarea,select{font-size:16px}}

/* Pre-send review dialog and lead calls. */
.review-dialog{border:1px solid var(--border);border-radius:12px;padding:22px 24px;max-width:min(520px,92vw);background:var(--surface);color:var(--text)}.review-dialog::backdrop{background:rgba(10,20,28,.55)}.review-dialog h2{margin-top:0}.review-lead{font-weight:600}.review-reasons{margin:10px 0 6px;padding-left:20px}.review-reasons li{margin:4px 0}.review-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}
.lead-call-buttons{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}.lead-call-buttons form{margin:0}
/* Account profile form (Telegram and MAX): two columns, one on phones */
.profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px;align-items:start}
.profile-form label{margin:8px 0}
.profile-form .profile-bio,.profile-form .profile-note,.profile-form>button,.profile-form .inline{grid-column:1/-1}
.profile-form small{display:block;color:var(--text-muted)}
.profile-form>button{justify-self:start}
@media(max-width:760px){.profile-form{grid-template-columns:1fr}}

/* Client base: warning before writing from another account, read-only conversation */
.client-warning{border-left:4px solid var(--warning,#d98c00);margin:12px 0}
.client-warning-list{margin:8px 0 0;padding-left:18px}
.client-warning-list li{margin:4px 0}
.client-warning-resubmit{margin-top:10px}
.client-conversation .conversation-stream{display:flex;flex-direction:column;gap:8px}
.client-conversation .conversation-message{display:flex}
.client-conversation .conversation-message.is-outgoing{justify-content:flex-end}
.client-conversation .conversation-bubble{max-width:min(720px,92%);padding:8px 12px;border-radius:12px;background:var(--surface);border:1px solid var(--border)}
.client-conversation .is-outgoing .conversation-bubble{background:var(--surface-accent,var(--surface))}
.client-conversation .conversation-bubble p{margin:0;white-space:pre-wrap;word-break:break-word}
.client-conversation .conversation-meta,.client-conversation .conversation-sender{display:block;color:var(--text-muted)}
/* Ad post reviews (creatives) */
.creative-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:960px){.creative-grid{grid-template-columns:1fr}}
.creative-post{white-space:pre-wrap;word-break:break-word;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.creative-report{white-space:pre-wrap;word-break:break-word}
.creative-score{display:inline-flex;align-items:center;gap:10px}
.creative-overall{font-size:30px;font-weight:750;line-height:1}
.creative-bar{display:inline-block;width:90px;height:8px;border-radius:999px;background:var(--border);overflow:hidden;vertical-align:middle}
.creative-bar i{display:block;height:100%;background:#3f8f5a}
.creative-bar.is-mid i{background:#d8a034}
.creative-bar.is-low i{background:#c4463f}
.creative-disputed{color:#9b5518;font-weight:650}
.creative-variant{border:1px solid var(--border);border-radius:12px;padding:12px;margin:8px 0;background:var(--surface)}
.creative-variant pre{white-space:pre-wrap;word-break:break-word;margin:8px 0;font:inherit}
.creative-opinion{margin:8px 0}
.creative-opinion summary{cursor:pointer}
.verdict-ready{background:#e3f5e8;color:#245f37}
.verdict-minor_fixes{background:#fff3d8;color:#8b6415}
.verdict-rework{background:#fde5e7;color:#a43b45}

/* «Оценить как рекламный пост» under a chat message */
.chat-review-post{margin-top:.15rem}
.chat-review-post button{background:none;border:0;padding:0;font:inherit;font-size:.68rem;color:var(--text-muted);text-decoration:underline;cursor:pointer}
.chat-review-post button:hover{color:var(--text)}

/* Full-text search hits */
.search-hit{padding:.6rem 0;border-bottom:1px solid var(--border)}
.search-hit p{margin:.15rem 0}
.search-snippet mark{background:rgba(255,200,0,.35);color:inherit;padding:0 .1em;border-radius:.2em}
/* Picture attached to an outgoing message (messages/_image_field). */
.compose-image{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 .3rem .4rem}
.compose-image-pick{display:inline-flex;align-items:center;gap:6px;cursor:pointer;margin:0}
.compose-image-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:2px 4px 2px 2px;border:1px solid var(--border,#d8e2e7);border-radius:10px;font-size:.76rem;overflow-wrap:anywhere}
.compose-image-chip img{width:44px;height:44px;object-fit:cover;border-radius:8px;background:var(--surface-muted,#f2f5f7)}
.compose-image-chip button{margin:0;padding:0 6px;min-height:0;border:0;background:transparent;color:var(--text-muted,#6a7b86);box-shadow:none;cursor:pointer}
.compose-image-chip button:hover{color:#b42318}
.compose-image.is-compact{margin:0;flex:0 1 auto;align-self:center}
.compose-image.is-compact .compose-image-pick{padding:.5rem .6rem;border-radius:999px}
.compose-image.is-compact .compose-image-chip span{max-width:9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.creative-image-field{display:flex;flex-direction:column;gap:.35rem;margin:.6rem 0}
.creative-image{display:block;max-width:100%;max-height:420px;margin:0 0 .8rem;border-radius:10px;border:1px solid var(--border,#d8e2e7);object-fit:contain;background:#f4f7f8}
.sidebar-badge{margin-left:auto;min-width:1.4rem;padding:.05rem .45rem;border-radius:999px;background:#b42318;color:#fff;font-size:.75rem;font-weight:700;text-align:center;line-height:1.3}
html[data-sidebar="collapsed"] .sidebar-badge{position:absolute;top:4px;right:6px;margin:0;padding:0 .3rem;font-size:.65rem}
html[data-sidebar="collapsed"] .sidebar-nav-link{position:relative}
.lead-no-task-hint{margin:.4rem 0 0}
.lead-no-task-filter{align-self:flex-end}
.lead-score{display:inline-block;min-width:1.9rem;padding:.05rem .4rem;border-radius:.6rem;font-size:.75rem;font-weight:700;text-align:center;background:#eef0f3;color:#405965;vertical-align:middle}
.lead-score.is-hot{background:#fde8e8;color:#b42318}
.lead-score.is-warm{background:#fff4d6;color:#9a6700}
.lead-score.is-cold{background:#e6f1ff;color:#1848a8}
.lead-score-line{margin:0 0 .6rem}
.reply-label{display:inline-block;padding:.02rem .45rem;border-radius:.6rem;font-size:.74rem;font-weight:700;margin-right:.3rem;background:#eef0f3;color:#405965;vertical-align:middle}
.reply-label.is-interest{background:#e3f6ea;color:#0f6b3a}
.reply-label.is-question{background:#e6f1ff;color:#1848a8}
.reply-label.is-later{background:#fff4d6;color:#9a6700}
.reply-label.is-refusal{background:#fde8e8;color:#b42318}
.reply-label.is-wrong_person{background:#f3e8ff;color:#6f42c1}
/* Calls: SIP lines, the test call, outbound calls by hour (docs/telephony-sip.md, docs/call-stats.md) */
.call-line-form{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0}.call-line-form select,.call-line-form input{max-width:16rem}
.telephony-status{margin-bottom:16px}
.call-hours td,.call-hours th{text-align:center;padding:4px 6px;min-width:1.8rem}.call-hours td:first-child,.call-hours th:first-child{text-align:left}
.call-hours .heat-1{background:#e6f1ff}.call-hours .heat-2{background:#c7defd}.call-hours .heat-3{background:#9cc3fb}.call-hours .heat-4{background:#6aa3f5}.call-hours .heat-5{background:#3b7fe8;color:#fff}
/* Softphone (docs/softphone.md): the settings page and the dialer window */
.softphone-card{margin-bottom:18px}.softphone-settings th{text-align:left;white-space:nowrap;padding-right:16px}
.softphone-window{display:block;margin:0;padding:16px}.softphone{max-width:360px;margin:0 auto}
.softphone h1{margin:0 0 4px;font-size:1.3rem}.softphone-line{margin:0 0 8px;color:var(--muted,#667085)}
.softphone-status{min-height:1.4em;font-weight:600}.softphone-status.error{color:#b42318}
.softphone-number{width:100%;font-size:1.4rem;padding:8px 10px;margin:8px 0;box-sizing:border-box;text-align:center}
.softphone-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:10px}.softphone-keypad button{font-size:1.2rem;padding:10px 0}
.softphone-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}.softphone-actions .danger{background:#b42318;color:#fff;border-color:#b42318}
.softphone-timer{font-size:1.4rem;text-align:center;min-height:1.6em;margin:10px 0 0}.softphone-hint{font-size:.85rem}
/* Lead groups (docs/lead-groups.md): temperature colours — red hot, amber warm, blue cold — and the deferred stage */
.lead-temperature{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.lead-temperature.is-hot{background:#fde8e8;color:#b42318}.lead-temperature.is-warm{background:#fff4d6;color:#9a6700}.lead-temperature.is-cold{background:#e6f1ff;color:#1848a8}
.lead-board-card.temp-hot{border-left:4px solid #d92d20}.lead-board-card.temp-warm{border-left:4px solid #e0a106}.lead-board-card.temp-cold{border-left:4px solid #2e6fd8}
.status-deferred{background:#f1ecfb;color:#5b3fa0}.lead-temperature-legend{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.lead-score-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.lead-score-reasons{flex-basis:100%}.lead-temperature-form{margin:0}
html[data-theme="dark"] .lead-temperature.is-hot,html[data-theme="dark"] .lead-score.is-hot{background:#3a1c1c;color:#f5a3a3}
html[data-theme="dark"] .lead-temperature.is-warm,html[data-theme="dark"] .lead-score.is-warm{background:#3a2f12;color:#f1c75b}
html[data-theme="dark"] .lead-temperature.is-cold,html[data-theme="dark"] .lead-score.is-cold{background:#152a45;color:#9cc3fb}
html[data-theme="dark"] .status-deferred{background:#2a2240;color:#c9b8f5}
/* Uploaded call recordings on the lead card (docs/call-uploads.md) */
.lead-recording-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end;margin-bottom:16px}.lead-recording-form label{margin:0}
@media(max-width:900px){.lead-recording-form{grid-template-columns:1fr}}
/* Left menu: favourites, folding sections, stars (App\Support\Navigation) */
.sidebar-nav .sidebar-section{display:flex;flex-direction:column;gap:5px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.sidebar-nav .sidebar-section[hidden]{display:none}
.sidebar-section-toggle{display:flex;align-items:center;justify-content:space-between;gap:6px;width:calc(100% - 24px);border:0;background:transparent;cursor:pointer;font:inherit;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;text-align:left}
.sidebar-section-toggle:hover{color:#17485d}
.sidebar-section-toggle .nav-icon{width:16px;height:16px;flex-basis:16px;transition:transform .15s ease}
.sidebar-section.is-closed .sidebar-section-toggle .nav-icon{transform:rotate(-90deg)}
.sidebar-section.is-closed .sidebar-section-items{display:none}
.sidebar-section-items{display:flex;flex-direction:column;gap:5px}
.sidebar-favorites-title{display:flex;align-items:center;gap:8px}
.sidebar-favorites-title .nav-icon{width:14px;height:14px;flex-basis:14px;fill:#d99514;stroke:#d99514}
.sidebar-nav .sidebar-favorites{padding-bottom:8px;border-bottom:1px solid #edf1f3}
.sidebar-item{position:relative;display:flex;align-items:center}
.sidebar-item .sidebar-nav-link{padding-right:36px}
.sidebar-star{position:absolute;right:6px;top:50%;width:28px;height:28px;transform:translateY(-50%);display:grid;place-items:center;padding:0;border:0;border-radius:7px;background:transparent;color:#9fb0b8;cursor:pointer;opacity:0;transition:opacity .12s ease}
.sidebar-star .nav-icon{width:16px;height:16px;flex-basis:16px}
.sidebar-item:hover .sidebar-star,.sidebar-star:focus-visible,.sidebar-item.is-favorite .sidebar-star{opacity:1}
.sidebar-star:hover{background:#f2f6f8;color:#d99514}
.sidebar-item.is-favorite .sidebar-star{color:#d99514}
.sidebar-item.is-favorite .sidebar-star .nav-icon{fill:#d99514}
.sidebar-item .sidebar-badge{margin-left:auto}
/* Collapsed menu: icons only, every section open, stars and titles hidden */
html[data-sidebar="collapsed"] .sidebar-section-toggle{display:none}
html[data-sidebar="collapsed"] .sidebar-section{position:relative;padding-top:9px}
html[data-sidebar="collapsed"] .sidebar-section::before{content:"";position:absolute;top:0;left:10px;right:10px;height:1px;background:#dfe6ea}
html[data-sidebar="collapsed"] .sidebar-section.is-closed .sidebar-section-items{display:flex}
html[data-sidebar="collapsed"] .sidebar-favorites{padding-bottom:4px;border-bottom:0}
html[data-sidebar="collapsed"] .sidebar-favorites::before{display:none}
html[data-sidebar="collapsed"] .sidebar-favorites-title{justify-content:center;margin:0 10px 2px;height:auto;background:none}
html[data-sidebar="collapsed"] .sidebar-star{display:none}
html[data-sidebar="collapsed"] .sidebar-item .sidebar-nav-link{padding-right:10px}
html[data-theme="dark"] .sidebar-section-toggle:hover{color:#cfe3ea}
html[data-theme="dark"] .sidebar-favorites{border-color:#2d3e49}
html[data-theme="dark"] .sidebar-star:hover{background:#243640}
html[data-theme="dark"][data-sidebar="collapsed"] .sidebar-section::before{background:#2d3e49}
@media(max-width:900px){
    html[data-sidebar="collapsed"] .sidebar-section-toggle{display:flex}
    html[data-sidebar="collapsed"] .sidebar-section{padding-top:0}
    html[data-sidebar="collapsed"] .sidebar-section::before{display:none}
    html[data-sidebar="collapsed"] .sidebar-section.is-closed .sidebar-section-items{display:none}
    html[data-sidebar="collapsed"] .sidebar-star{display:grid}
    html[data-sidebar="collapsed"] .sidebar-item .sidebar-nav-link{padding-right:36px}
    .sidebar-star{opacity:1}
}
/* Телефония (docs/telephony-settings.md) */
.telephony-form .form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px 18px;margin:12px 0}
.telephony-form fieldset{border:1px solid #dfe6ea;border-radius:9px;padding:8px 12px;margin:0}
.telephony-form fieldset label{display:block;margin:4px 0}
.telephony-lines input,.telephony-lines select{min-width:0;width:100%}
.telephony-lines td{vertical-align:top}
.telephony-lines td input+input{margin-top:4px}
.own-account{padding:12px 0;border-top:1px solid #edf1f3}.own-account:first-of-type{border-top:0}.own-account-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0}.own-account-form{display:grid;gap:12px;max-width:560px}
/* Account page: «[Отдыхает] до 19.11, 14:00 — ограничение Telegram на рассылку» under the project pills. */
.account-rest-status{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 8px;margin:8px 0 0}

/* The hidden attribute always hides, whatever display a component sets: file inputs, image chips, badges. */
[hidden]{display:none!important}
