/* The marketplace's dotted canvas surrounds the CRM frame. */
:root{--crm-frame-width:100%;--crm-frame-inset:0px;--crm-canvas:#dedede;--crm-dot:rgb(38 38 38 / 8%);color-scheme:light}
html,body{background:radial-gradient(circle at 1px 1px,var(--crm-dot) 1px,transparent 0) 0 0 / 18px 18px,var(--crm-canvas)}
.app{width:var(--crm-frame-width);margin-inline:auto;background:var(--core-workspace,#f4f5f7);box-shadow:0 0 28px #1728200d}
.workspace{container:workspace / inline-size}
.theme-toggle{flex:none}.theme-toggle>span{display:flex}.theme-icon-sun{display:none!important}
:root[data-theme=dark] .theme-icon-moon{display:none!important}:root[data-theme=dark] .theme-icon-sun{display:flex!important}
.public-theme-tools{position:fixed;top:16px;right:18px;z-index:5;color:var(--core-text,#263238)}
@media(min-width:1280px){
    :root{--crm-frame-width:min(80vw,1600px);--crm-frame-inset:calc((100vw - var(--crm-frame-width))/2)}
    .app{border-radius:16px}.topbar{border-radius:16px 16px 0 0}.sidebar{border-bottom-left-radius:16px}
    .request-search-dialog{left:calc(var(--crm-frame-inset) + 12px)}
}
/* Container width, rather than monitor width, determines dense page layouts. */
@container workspace (max-width:900px){
    .request-list-head{display:none}.request-summary.compact-request{grid-template-columns:1fr 1fr;min-height:0;gap:12px 20px}
    .compact-request h3{display:block;font-size:10px;color:var(--core-muted,#91a0a8);font-weight:500;margin:0 0 5px}
    .compact-request .request-preview-main{grid-column:1/-1}.workspace-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container workspace (max-width:700px){.product-editor-grid,.position-editor-grid,.settings-grid{grid-template-columns:1fr}.metric-grid{grid-template-columns:1fr}.request-work-actions{grid-template-columns:1fr}}
@container workspace (max-width:470px){.request-summary.compact-request,.workspace-grid{grid-template-columns:1fr}}
/* Shared semantic palette: light values remain in base.css as fallbacks. */
:root[data-theme=dark]{
    color-scheme:dark;
    --crm-canvas:#171717;--crm-dot:rgb(255 255 255 / 5.5%);
    --core-workspace:#191f1d;--core-sidebar:#1e2522;--core-topbar:#262e2b;
    --core-surface:#242d28;--core-surface-soft:#29332e;--core-input:#1c2520;
    --core-text:#e0e7e3;--core-text-secondary:#b3c1b9;--core-muted:#98aaa0;
    --core-line:#3a4940;--core-accent-line:#537d65;--core-accent-text:#91d5b1;--core-accent-soft:#2b4135;
    --core-danger-text:#efa4a6;--core-danger-line:#945d62;--core-danger-soft:#42292e;--core-warning-soft:#453d26;
}
:root[data-theme=dark] .public-layout{background:transparent}
:root[data-theme=dark] .request-search-dialog{background:rgb(30 39 34 / 90%);border-color:var(--core-line)}
:root[data-theme=dark] .request-search-dialog input{background:var(--core-input)}
:root[data-theme=dark] .request-title-line .request-search-toggle{background:var(--core-surface-soft)}
:root[data-theme=dark] .two-column-select-trigger,:root[data-theme=dark] .product-group-field select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23b3c1b9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
:root[data-theme=dark] input::placeholder,:root[data-theme=dark] textarea::placeholder{color:#94a69b;opacity:1}
:root[data-theme=dark] input:autofill{box-shadow:0 0 0 1000px var(--core-input) inset;-webkit-text-fill-color:var(--core-text)}
:root[data-theme=dark] :is(.queue-color-active,.queue-color-trash,.queue-color-closed){--queue-color:#bdc8c2;--queue-bg:#303a34}
:root[data-theme=dark] .queue-color-callback{--queue-color:#edbd86;--queue-bg:#473625}
:root[data-theme=dark] .queue-color-overdue{--queue-color:#eaa9b4;--queue-bg:#482b33}
:root[data-theme=dark] .queue-color-deferred{--queue-color:#ddcc85;--queue-bg:#453e27}
:root[data-theme=dark] .queue-color-sent{--queue-color:#9cd2ad;--queue-bg:#2b4232}
:root[data-theme=dark] .queue-color-negative{--queue-color:#f2a8aa;--queue-bg:#492c2f}
:root[data-theme=dark] .status-option-callback{--option-bg:#473625;--option-text:#edbd86}
:root[data-theme=dark] .status-option-negative{--option-bg:#492c2f;--option-text:#f2a8aa}
:root[data-theme=dark] .status-option-refusal{--option-bg:#303a34;--option-text:#bdc8c2}
:root[data-theme=dark] .status-option-new{--option-bg:#303a34;--option-text:#bdc8c2}
:root[data-theme=dark] .status-option-handoff{--option-bg:#2b4232;--option-text:#9cd2ad}

/* The independent chat keeps its approved light palette and native controls. */
#chat-app{color-scheme:light}
