/* SMS ICON document workspace: shared tokens, stable navigation and customer context. */
:root{--sms-ink:#182f49;--sms-secondary:#4d647c;--sms-muted:#657a8f;--sms-disabled:#8190a0;--sms-canvas:#f4f7fb;--sms-paper:#fff;--sms-inset:#f0f4f8;--sms-line:rgba(24,47,73,.12);--sms-soft-line:rgba(24,47,73,.07);--sms-action:#007bbd;--sms-action-hover:#00689f;--sms-selection:#e4f2fc;--sms-danger:#b42318;--sms-success:#207653;--sms-wait:#8b6014;--sms-focus:#009fe8;--sms-radius:8px;--sms-card-radius:12px;--sms-navigation:224px}
html:has(body.workspace){background:var(--sms-canvas)}
body.workspace{background:var(--sms-canvas);color:var(--sms-ink);font:14px/1.6 Arial,sans-serif;display:block;min-height:100dvh;-webkit-font-smoothing:antialiased}
html[lang=ar] body.workspace{font-family:Tahoma,Arial,sans-serif;letter-spacing:0}
body.workspace *,body.workspace *::before,body.workspace *::after{box-sizing:border-box}
body.workspace [hidden]{display:none!important}
body.workspace>aside{position:fixed;inset-block:0;inset-inline-start:0;inset-inline-end:auto;width:var(--sms-navigation);height:100dvh;max-height:100dvh;background:var(--sms-canvas);color:var(--sms-secondary);border-inline-end:1px solid var(--sms-line);padding:24px 16px;overflow:auto;display:flex;flex-direction:column;z-index:30}
body.workspace>aside .brand{color:var(--sms-ink);margin:0 4px 28px;font-size:24px;letter-spacing:-.8px;display:flex;align-items:center;gap:8px}
body.workspace>aside .brand-icon{width:36px;height:40px;border-radius:10px;background:var(--sms-action);color:var(--sms-paper);font-size:24px;box-shadow:none}
body.workspace>aside .brand small{font-size:10px;letter-spacing:.8px;color:var(--sms-muted)}
body.workspace>aside .brand span{color:inherit}
body.workspace>main{margin:0;margin-inline-start:var(--sms-navigation);padding:0 32px 32px;min-width:0;max-width:none}
html[dir=rtl] body.workspace>main{margin-left:0;margin-right:var(--sms-navigation)}
body.workspace>main>*{max-width:1600px;margin-inline:auto}
body.workspace>main>header{min-height:72px;height:auto;gap:12px;padding-block:12px;border-bottom:1px solid var(--sms-line);margin-bottom:0;flex-wrap:wrap;align-items:center}
body.workspace header #user,body.workspace header #admin-name{direction:ltr;unicode-bidi:isolate;color:var(--sms-secondary);overflow-wrap:anywhere;font-size:12px}
body.workspace .breadcrumb{font-size:12px;color:var(--sms-muted)}
body.workspace .breadcrumb span{margin-inline:8px}
body.workspace .header-user,body.workspace .header-actions{gap:8px;flex-wrap:wrap;min-width:0}
body.workspace .workspace-menu{border:0;min-width:0;flex:1}
body.workspace .workspace-menu>summary{display:none}
body.workspace .workspace-menu nav{display:grid;grid-template-columns:1fr;gap:4px;margin:0;overflow:visible}
body.workspace .workspace-menu nav>a,body.workspace .workspace-menu nav>button,body.workspace .workspace-menu nav details>a,body.workspace .workspace-menu nav details>button{width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:var(--sms-radius);display:flex;gap:8px;align-items:center;justify-content:flex-start;text-align:start;color:var(--sms-secondary);font-size:14px;background:transparent;box-shadow:none;white-space:normal;line-height:1.6}
body.workspace .workspace-menu nav button span{font-size:14px}
body.workspace .workspace-menu nav .active,body.workspace .workspace-menu nav .selected,body.workspace .workspace-menu nav [aria-current=page]{background:var(--sms-selection);color:var(--sms-action);font-weight:700;box-shadow:none}
body.workspace .workspace-menu nav>a:hover,body.workspace .workspace-menu nav>button:hover{background:var(--sms-inset)}
body.workspace .workspace-menu nav>details{border-top:1px solid var(--sms-line);padding-top:8px;margin-top:16px}
body.workspace .workspace-menu nav summary{color:var(--sms-muted);padding:10px 12px;min-height:44px;font-size:12px;cursor:pointer}
body.workspace .workspace-menu .sidebar-bottom,body.workspace .workspace-menu .aside-note{margin:24px 0 0;padding:16px 8px;border-top:1px solid var(--sms-line);font-size:12px;display:block;color:var(--sms-muted)}
body.workspace .workspace-note{border:0;padding:8px 0;margin:0;color:var(--sms-muted)}
body.workspace .sidebar-bottom>a{color:var(--sms-action);padding:12px 0;margin:0;font-weight:600}
body.workspace .nav-label{display:none}
body.workspace h1{font-size:28px;font-weight:700;line-height:1.4;letter-spacing:-.5px;margin:0 0 8px;text-wrap:balance}
html[lang=ar] body.workspace h1{letter-spacing:0;line-height:1.65}
body.workspace h2{font-size:18px;font-weight:700;line-height:1.6}
body.workspace h3{font-size:16px;font-weight:700;line-height:1.6}
body.workspace p{font-size:14px;color:var(--sms-secondary);line-height:1.75;text-wrap:pretty}
body.workspace small,body.workspace .hint,body.workspace .footnote{font-size:12px;line-height:1.7;color:var(--sms-muted)}
body.workspace .page-heading{margin-block:24px 20px;align-items:center;gap:16px}
body.workspace .panel,body.workspace .card{background:var(--sms-paper);border:1px solid var(--sms-line);border-radius:var(--sms-card-radius);box-shadow:none;min-width:0}
body.workspace .card{padding:20px}
body.workspace .panel-heading{padding:16px 20px;border-bottom:1px solid var(--sms-soft-line);gap:12px}
body.workspace .panel-heading p{font-size:12px;margin-block:4px 0}
body.workspace .page-heading .actions{gap:8px;flex-wrap:wrap}
body.workspace button:where(:not(.ql-toolbar button)),body.workspace a.primary{font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;min-height:44px;border-radius:var(--sms-radius);padding:10px 16px;border-color:var(--sms-line);box-shadow:none;transition:background-color 120ms,color 120ms}
body.workspace button:where(:not(.ql-toolbar button)){color:var(--sms-secondary);background:var(--sms-paper)}
body.workspace button.primary,body.workspace a.primary{color:var(--sms-paper);background:var(--sms-action);border-color:var(--sms-action)}
body.workspace .primary:hover{background:var(--sms-action-hover)}
body.workspace button:disabled{cursor:not-allowed;color:var(--sms-disabled);opacity:.65}
body.workspace .primary:disabled{color:var(--sms-paper)}
body.workspace button.link,body.workspace a.link{min-height:44px;display:inline-flex;align-items:center;padding:8px;color:var(--sms-action);background:transparent;font-size:13px}
body.workspace :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--sms-focus);outline-offset:3px}
body.workspace :is(input,select,textarea):not([type=checkbox]):not([type=radio]){font-family:inherit;font-size:14px;min-height:44px;background:var(--sms-inset);color:var(--sms-ink);border:1px solid var(--sms-line);border-radius:var(--sms-radius);padding:10px 12px;max-width:100%;min-width:0}
body.workspace input[type=email],body.workspace input[type=tel]{direction:ltr;text-align:left}
body.workspace input[type=checkbox],body.workspace input[type=radio]{accent-color:var(--sms-action);width:18px;height:18px;flex-shrink:0}
body.workspace label{font-size:14px;line-height:1.65;color:var(--sms-secondary)}
body.workspace .field-grid,body.workspace .fields{gap:16px}
body.workspace .toolbar{gap:8px;align-items:center;flex-wrap:wrap;margin-block:16px}
body.workspace .table-wrap{overflow:auto;max-width:100%;overscroll-behavior-inline:contain;scrollbar-width:thin}
body.workspace table{font-size:14px;text-align:start;font-variant-numeric:tabular-nums}
body.workspace th{font-size:12px;letter-spacing:0;text-transform:none;background:var(--sms-inset);color:var(--sms-secondary);padding:12px 16px;font-weight:600;text-align:start}
body.workspace td{font-size:14px;padding:12px 16px;border-color:var(--sms-soft-line);text-align:start}
body.workspace td small{font-size:12px;color:var(--sms-muted)}
body.workspace tbody tr:hover{background:#fafcff}
body.workspace .pill,body.workspace .badge,body.workspace .message-state{font-size:12px;border-radius:6px;padding:4px 8px;font-weight:600}
body.workspace .metrics{gap:12px;margin-block:16px 24px}
body.workspace .metric,body.workspace .metrics article{border:0;border-inline-start:2px solid var(--sms-line);border-radius:0;background:transparent;padding:8px 16px;box-shadow:none}
body.workspace .metric:first-child{border-top:0;border-inline-start-color:var(--sms-action)}
body.workspace .metric-label{font-size:12px;color:var(--sms-secondary)}
body.workspace .metric strong{font-size:28px;font-weight:700;letter-spacing:-.4px;margin:4px 0;font-variant-numeric:tabular-nums}
body.workspace .metric small{font-size:12px}
body.workspace .focus-details{background:var(--sms-paper);border-color:var(--sms-line);border-radius:var(--sms-radius)}
body.workspace .focus-details>summary{font-size:14px;color:var(--sms-secondary);padding:12px 16px;min-height:48px}
body.workspace dialog{border:1px solid var(--sms-line);border-radius:16px;padding:20px;max-width:calc(100vw - 24px);max-height:90dvh;overflow:auto;color:var(--sms-ink)}
body.workspace dialog::backdrop{background:rgba(11,30,50,.38)}
body.workspace #notice:empty{display:none}
body.workspace #notice:not(:empty){padding:12px 16px;margin-block:12px;background:var(--sms-selection);border-radius:var(--sms-radius);color:var(--sms-ink);overflow-wrap:anywhere}
body.workspace .workspace-journey{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;padding:12px 16px;margin-block:16px;background:var(--sms-paper);border:1px solid var(--sms-line);border-radius:var(--sms-card-radius)}
body.workspace .workspace-journey .journey-caption{font-size:12px;color:var(--sms-muted);margin-inline-end:8px}
body.workspace .workspace-journey a{display:inline-flex;gap:8px;align-items:center;font-size:13px;min-height:44px;color:var(--sms-secondary);padding:8px}
body.workspace .workspace-journey a span:first-child{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--sms-inset);font-size:12px;font-variant-numeric:tabular-nums}
body.workspace .workspace-journey a[aria-current=page]{color:var(--sms-action);font-weight:700}
body.workspace .workspace-journey a[aria-current=page] span:first-child{background:var(--sms-selection)}
body.workspace .workspace-section-nav{display:flex;flex-wrap:wrap;gap:4px;padding:4px;border-bottom:1px solid var(--sms-line);margin-block:16px}
body.workspace .workspace-section-nav a,body.workspace .workspace-section-nav button{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border:0;background:transparent;color:var(--sms-secondary);font-size:14px}
body.workspace .workspace-section-nav .active,body.workspace .workspace-section-nav [aria-pressed=true]{background:var(--sms-selection);color:var(--sms-action);border-radius:8px;font-weight:700}
body.workspace .workspace-action-menu{position:relative;min-width:0}
body.workspace .workspace-action-menu>summary{cursor:pointer;min-height:44px;border:1px solid var(--sms-line);border-radius:8px;padding:10px 16px;color:var(--sms-action);font-weight:600}
body.workspace .workspace-action-menu[open]{flex-basis:100%;padding-bottom:12px}
body.workspace .workspace-action-menu a{display:inline-flex;align-items:center;padding:12px;min-height:44px;color:var(--sms-action)}
body.workspace .workspace-required{color:var(--sms-danger)!important}
body.workspace .workspace-help{font-size:12px;color:var(--sms-muted);margin-block:8px}
/* Grid cards need stacked content; the legacy list row squeezed headings
   between a fixed thumbnail and an action group at half the card width. */
body.workspace .cycle-template{border:1px solid var(--sms-line);box-shadow:none;border-radius:12px;padding:16px;min-width:0;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:16px}
body.workspace .cycle-template-summary{flex:0 0 auto;flex-direction:column;align-items:stretch;width:100%;gap:16px}
body.workspace .cycle-template-summary>div{width:100%;overflow-wrap:break-word}
body.workspace .cycle-template-image{width:100%;height:auto;aspect-ratio:2/1;object-fit:cover;border-radius:8px;outline:1px solid rgba(0,0,0,.1)}
body.workspace .cycle-template h3{font-size:16px}
body.workspace #template-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px}
body.workspace .cycle-template>.cycle-actions{width:100%;max-width:100%;margin: auto 0 0;gap:8px;flex-wrap:wrap}
body.workspace .cycle-template>.cycle-actions>button{flex:1 1 140px;min-width:0;max-width:100%;white-space:normal}
body.workspace .workspace-template-filters{display:flex;gap:12px;padding:0 20px 16px;flex-wrap:wrap}
body.workspace .workspace-template-filters label{flex:1;min-width:160px}
body.workspace .workspace-template-filters input,body.workspace .workspace-template-filters select{width:100%}
body.workspace .cycle-library-hint{margin:16px 20px;font-size:13px}
body.workspace .mailbox-message{border-color:var(--sms-line);border-radius:12px;margin-block:12px;overflow:hidden}
body.workspace .mailbox-message.is-unread{border-inline-start:3px solid var(--sms-action)}
body.workspace .mailbox-message>summary{padding:16px}
body.workspace .mailbox-summary-line{font-size:12px}
body.workspace .mail-message{padding:16px;min-width:0}
body.workspace .mail-test-controls{background:var(--sms-inset);border-color:var(--sms-line)}
body.workspace .mail-test-controls label{color:var(--sms-danger)}
body.workspace .mail-form,body.workspace .form-body{padding:20px}
body.workspace .quote-total{font-size:22px;font-weight:700;color:var(--sms-ink);font-variant-numeric:tabular-nums}
body.workspace .workspace-admin-tabs{margin-block:16px}
body.workspace .workspace-admin-tabs>summary{font-size:16px;font-weight:700;padding:16px;cursor:pointer;color:var(--sms-ink);min-height:48px}
body.workspace .workspace-admin-tabs>.card{margin:0;border:0;border-radius:0}
body.workspace .workspace-login-note{max-width:460px;margin:16px auto;color:var(--sms-muted);font-size:12px}
body.workspace .workspace-skip{position:fixed;inset-block-start:-100px;inset-inline-start:16px;z-index:100000;background:var(--sms-paper);padding:12px;border:2px solid var(--sms-focus)}
body.workspace .workspace-skip:focus{inset-block-start:8px}
@media(max-width:1100px){body.workspace>main{padding-inline:20px}.focus-today-grid{grid-template-columns:1fr}}
@media(max-width:800px){
 body.workspace>aside{position:relative;inset:auto;width:100%;height:auto;max-height:none;padding:12px 16px;border-inline-end:0;border-bottom:1px solid var(--sms-line);display:grid;grid-template-columns:1fr auto;gap:8px;overflow:visible}
 body.workspace>aside .brand{margin:0;font-size:22px;min-height:40px}.workspace>aside .brand small{display:none}
 body.workspace>aside .brand-icon{width:32px;height:36px;font-size:22px;border-radius:8px}
 body.workspace .workspace-menu>summary{display:block;list-style:none;cursor:pointer;padding:8px 12px;min-height:44px;border:1px solid var(--sms-line);border-radius:8px;background:var(--sms-paper);color:var(--sms-ink);font-size:14px;font-weight:600}
 body.workspace .workspace-menu>summary::-webkit-details-marker{display:none}
 body.workspace .workspace-menu[open]{grid-column:1/-1;grid-row:2}
 body.workspace .workspace-menu[open]>summary{margin-bottom:8px;width:max-content;margin-inline-start:auto}
 body.workspace .workspace-menu nav{grid-template-columns:1fr 1fr;gap:4px;max-height:60dvh;overflow:auto}
 body.workspace .workspace-menu nav>details{grid-column:1/-1;margin-top:8px}
 body.workspace .workspace-menu nav>a,body.workspace .workspace-menu nav>button{text-align:start;justify-content:flex-start;font-size:14px;padding:10px 12px}
 body.workspace .workspace-menu .sidebar-bottom,body.workspace .workspace-menu .aside-note{margin-top:12px;padding:8px;display:block}
 body.workspace .workspace-menu:not([open]) .sidebar-bottom{display:none}
 body.workspace>main,html[dir=rtl] body.workspace>main{margin:0;padding:0 16px 24px}
 body.workspace>main>header{min-height:64px;padding-block:12px;gap:8px;margin:0}
 body.workspace header .breadcrumb{display:none}
 body.workspace header .header-user{flex:1;justify-content:space-between}
 body.workspace .page-heading{margin-block:20px 16px;display:block}
 body.workspace h1{font-size:24px}
 body.workspace .page-heading .actions{margin-top:16px}
 body.workspace .panel-heading{padding:16px;flex-wrap:wrap}
 body.workspace .toolbar .search-wrap{flex-basis:100%}
 body.workspace .toolbar input{width:100%}
 body.workspace .toolbar select{flex:1;min-width:0}
 body.workspace .metrics,body.workspace .focus-today-metrics{grid-template-columns:1fr;gap:4px}
 body.workspace .metric{display:grid;grid-template-columns:1fr auto;gap:4px;padding:8px 12px}
 body.workspace .metric strong{grid-column:2;grid-row:1/3;margin:0;align-self:center;font-size:24px}
 body.workspace .metric small{grid-column:1}
 body.workspace .field-grid,body.workspace .fields{grid-template-columns:1fr}
 body.workspace .workspace-journey{gap:4px;padding:8px 12px}
 body.workspace .workspace-journey .journey-caption{width:100%}
 body.workspace .workspace-journey a{padding:6px;gap:4px;font-size:12px}
 body.workspace .workspace-section-nav{gap:0;padding:0}
 body.workspace .workspace-section-nav a,body.workspace .workspace-section-nav button{padding:10px 12px;font-size:13px}
 body.workspace .workspace-template-filters{padding:0 16px 16px;gap:8px}
 body.workspace .mail-form,body.workspace .form-body{padding:16px}
 body.workspace #threads{max-height:240px}
 body.workspace .form-body .actions{flex-wrap:wrap}
 body.workspace .form-body .actions>.primary{flex-basis:100%}
 body.workspace dialog{padding:16px}
}
@media(prefers-reduced-motion:reduce){body.workspace *{scroll-behavior:auto!important;transition:none!important}}

body.workspace .workspace-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px;flex-wrap:wrap;color:var(--sms-secondary);font-size:12px}
body.workspace .customer-name-link{color:var(--sms-action);text-decoration:none;font-weight:700;display:inline-block;padding-block:6px}

body.workspace .dashboard-language-switch{padding:3px;border:1px solid var(--sms-line);border-radius:8px;background:var(--sms-inset)}
body.workspace .dashboard-language-switch button{min-width:44px;padding:8px;background:transparent;color:var(--sms-secondary)}
body.workspace .dashboard-language-switch button[aria-pressed=true]{color:var(--sms-paper);background:var(--sms-action)}
body.workspace .mobile-field-label{display:none}
@media(max-width:800px){
 body.workspace>main>header .header-user{gap:8px;justify-content:space-between}
 body.workspace>main>header #user{flex-basis:100%;order:-1}
 body.workspace .dashboard-language-switch{margin:0}
 body.workspace .workspace-journey{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:4px;gap:0}
 body.workspace .workspace-journey .journey-caption{display:none}
 body.workspace .workspace-journey a{flex-direction:column;justify-content:center;text-align:center;padding:8px 2px;font-size:11px;line-height:1.6}
 body.workspace .workspace-customer-table{display:block;min-width:0!important;width:100%!important;white-space:normal}
 body.workspace .workspace-customer-table thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
 body.workspace .workspace-customer-table tbody{display:block}
 body.workspace .workspace-customer-table tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;padding:16px;border-bottom:1px solid var(--sms-line)}
 body.workspace .workspace-customer-table td{display:block;padding:0;border:0;overflow-wrap:anywhere;min-width:0;font-size:13px}
 body.workspace .workspace-customer-table td:first-child,body.workspace .workspace-customer-table .customer-owner,body.workspace .workspace-customer-table td:last-child{grid-column:1/-1}
 body.workspace .workspace-customer-table td:first-child .cycle-row-check{float:inline-end;margin:8px}
 body.workspace .workspace-customer-table td:last-child{text-align:end}
 body.workspace .workspace-customer-table .mobile-field-label{display:block;font-size:11px;color:var(--sms-muted);margin-block:4px}
}

body.workspace:not(:has(>aside))>main,html[dir=rtl] body.workspace:not(:has(>aside))>main{margin:0;padding:24px}

body.workspace>aside .brand{flex-wrap:wrap}body.workspace>aside .brand small{flex-basis:100%;margin-top:0}

body.workspace .workspace-recent-customers>a{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;min-height:80px;border-bottom:1px solid var(--sms-soft-line);color:var(--sms-ink)}
body.workspace .workspace-recent-customers strong{color:var(--sms-action);font-size:14px}body.workspace .workspace-recent-customers small{display:block;margin-top:4px}
body.workspace .workspace-recent-customers>a:hover{background:var(--sms-inset)}body.workspace .workspace-recent-customers>a>div{min-width:0;overflow-wrap:anywhere}

/* Optional appearance: same hierarchy, controls and data in both modes. */
:root{--sms-on-action:#fff;--sms-hover:#fafcff;--sms-danger-surface:#fff1f0;--sms-success-surface:#eaf5ef;--sms-wait-surface:#fff6e3;color-scheme:light}
html[data-theme=dark]{color-scheme:dark;--sms-ink:#e9f1fa;--sms-secondary:#bdcbda;--sms-muted:#95a8bd;--sms-disabled:#738499;--sms-canvas:#0c1623;--sms-paper:#142235;--sms-inset:#1b2c42;--sms-line:rgba(197,218,242,.17);--sms-soft-line:rgba(197,218,242,.09);--sms-action:#69c7ff;--sms-action-hover:#8ed4ff;--sms-selection:#1c3a53;--sms-danger:#ff9a91;--sms-success:#7bd4ab;--sms-wait:#f0c574;--sms-focus:#9bd9ff;--sms-on-action:#092035;--sms-hover:#192c41;--sms-danger-surface:#3a242b;--sms-success-surface:#19392f;--sms-wait-surface:#3b3322}
body.workspace .workspace-theme{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--sms-line);border-radius:var(--sms-radius);background:var(--sms-paper);flex-shrink:0}
body.workspace .workspace-theme button{display:inline-flex;align-items:center;gap:6px;background:transparent;min-height:36px;padding:6px 10px;border:0;font-size:12px}
body.workspace .workspace-theme button[aria-pressed=true]{background:var(--sms-selection);color:var(--sms-action)}
body.workspace .workspace-theme button>span:first-child{font-size:16px;line-height:1}
body.workspace button.primary,body.workspace a.primary,body.workspace .primary:disabled{color:var(--sms-on-action)}
body.workspace tbody tr:hover{background:var(--sms-hover)}
body.workspace :is(dialog,.setup-card,.login-card,.login-panel,.loader-card,.mailbox-message,.cycle-template,.quote-item,.thread-item,.document-item,.kanban-column,.kanban-card,.deal-card){background:var(--sms-paper);color:var(--sms-ink);border-color:var(--sms-line)}
body.workspace :is(h1,h2,h3,h4,strong,.dialog-heading h2,.permission-row strong):not(#preview-body *, .formatted-mail *, .smsicon-product-email *){color:var(--sms-ink)}
body.workspace :is(.permission-row,.permission-notice,.scope-note,.workspace-note,.aside-note,.form-section,.cycle-source,.cycle-guide,.cycle-info){background:var(--sms-inset);color:var(--sms-secondary);border-color:var(--sms-line)}
body.workspace :is(.permission-row small,.permission-summary,.mail-meta,.quote-item small,.thread-item small,.document-item small,.breadcrumb){color:var(--sms-muted)}
body.workspace #permissions-form .dialog-actions{background:var(--sms-paper);border-color:var(--sms-line)}
body.workspace .dashboard-language-switch{background:var(--sms-paper);border-color:var(--sms-line)}
body.workspace .dashboard-language-switch button{color:var(--sms-secondary)}
body.workspace .dashboard-language-switch button[aria-pressed=true]{background:var(--sms-selection);color:var(--sms-action)}
body.workspace :is(.permission-error,.field-error,.validation-summary){color:var(--sms-danger)}
body.workspace :is(.required-caption,.required-star){color:var(--sms-danger)!important}
html[data-theme=dark] body.workspace :is(.badge,.pill,.message-state){background:var(--sms-inset);color:var(--sms-secondary)}
html[data-theme=dark] body.workspace :is(.badge.active,.badge.enabled,.badge.allowed,.pill.won,.message-state.sent){background:var(--sms-success-surface);color:var(--sms-success)}
html[data-theme=dark] body.workspace :is(.badge.pending,.pill.proposal,.message-state.queued){background:var(--sms-wait-surface);color:var(--sms-wait)}
html[data-theme=dark] body.workspace :is(.badge.disabled,.badge.rejected,.pill.lost,.message-state.failed){background:var(--sms-danger-surface);color:var(--sms-danger)}
html[data-theme=dark] body.workspace :is(.team-charts meter,.chart-row meter){color-scheme:dark}
body.workspace{--muted:var(--sms-muted);--blue:var(--sms-action);--border:var(--sms-line)}
body.workspace :is(.deal,.cycle-email-card,.mail-message,.mailbox-message>summary,.quote-item.active){background:var(--sms-paper);border-color:var(--sms-line)}
body.workspace :is(.column,.mailbox-message>summary:hover,.mailbox-message[open]>summary,.thread-item.active){background:var(--sms-inset)}
body.workspace :is(.mail-health,.send-blocked-hint,.delivery-result,.mailbox-error,.mail-form details,.setup-key,.invite-link){background:var(--sms-inset);color:var(--sms-secondary);border-color:var(--sms-line)}
body.workspace :is(.mail-health.warning,.send-blocked-hint,.delivery-result.delayed){background:var(--sms-wait-surface);color:var(--sms-wait)}
body.workspace :is(.delivery-result.rejected,.mailbox-error){background:var(--sms-danger-surface);color:var(--sms-danger)}
body.workspace :is(.delivery-result.remote_accepted,.compose-actions #save-draft){background:var(--sms-success-surface);color:var(--sms-success)}
body.workspace :is(.mail-message pre,.policy-bottom span,.delivery-check,.draft-status,.delivery-result small){color:var(--sms-secondary)}
body.workspace .mail-folders button[aria-pressed=true]{background:var(--sms-selection);border-color:var(--sms-action);color:var(--sms-action)}
body.workspace .task-row .overdue{color:var(--sms-danger)}
body.workspace .bar,body.workspace .chart-row meter::-webkit-meter-bar{background:var(--sms-inset)}
body.workspace .bar i,body.workspace .chart-row meter::-webkit-meter-optimum-value{background:var(--sms-action)}
/* Email content stays on paper so saved formatting and customer-facing previews are unchanged. */
body.workspace :is(#preview-body,#mail-rich-editor,.smsicon-product-email){--sms-ink:#182f49;--sms-secondary:#4d647c;--sms-muted:#657a8f;--sms-paper:#fff;--sms-inset:#f0f4f8;--sms-line:rgba(24,47,73,.12);--sms-action:#007bbd;color-scheme:light;background:#fff;color:#182f49}
body.workspace #preview-body{padding:16px;border-radius:8px}
body.workspace #mail-editor-shell{--editor-tools:var(--sms-inset);--editor-edge:var(--sms-line);--editor-ink:var(--sms-ink)}
body.workspace .mail-format-toolbar :is(b,i,u,s){color:var(--sms-ink)}
body.workspace .mail-format-toolbar button:hover{background:var(--sms-selection)!important}
body.workspace :is(.quotation-modes,.registration-fees,details){border-color:var(--sms-line)}
body.workspace :is(.quotation-modes label,.registration-fees,.components){background:var(--sms-inset);color:var(--sms-ink)}
body.workspace .quotation-modes small{color:var(--sms-secondary)}
body.workspace :is(.quote-total,summary){color:var(--sms-action)}
body.workspace .invoice-preview{background:var(--sms-inset);color:var(--sms-secondary);border-color:var(--sms-line)}
body.workspace #cycle-editor :is(input,select,textarea){color:var(--sms-ink)}
body.workspace #cycle-editor label:has([required]){color:var(--sms-danger)}
body.workspace .cycle-library-hint{color:var(--sms-secondary)}
body.workspace .cycle-template .cycle-approval-note{color:var(--sms-wait)}
body.workspace :is(.document-hash,.document-empty){color:var(--sms-muted)}
html[data-theme=dark] body.workspace :is(.document-state.state-current,.document-state.state-issued){background:var(--sms-success-surface);color:var(--sms-success)}
html[data-theme=dark] body.workspace :is(.document-state.state-void,.document-state.state-revoked){background:var(--sms-danger-surface);color:var(--sms-danger)}
html[data-theme=dark] body.workspace :is(.document-state.state-draft,.document-state.state-superseded,.document-state.state-expired){background:var(--sms-wait-surface);color:var(--sms-wait)}
body.workspace dialog::backdrop{background:rgba(3,10,20,.58)}
@media(max-width:800px){body.workspace main>header{gap:8px;align-items:center}body.workspace main>header .workspace-theme{margin:0}body.workspace .workspace-theme button{min-height:40px}}
@media(prefers-reduced-motion:reduce){body.workspace *,body.workspace *::before,body.workspace *::after{scroll-behavior:auto!important;transition-duration:0ms!important}}
