/* One charcoal surface scale for the administration area, including dialogs
   mounted outside the layout. Storefront and customer themes stay independent. */
:root:not([data-theme=light]):has(body[data-view=admin]){background:#252525}
:root:not([data-theme=light]) body[data-view=admin]{
 --page:#252525;--bg:#252525;--bg-alt:#202020;
 --card:#2d2d2d;--card-hover:#353535;--input:#333333;
 --table-head:#333333;--admin-row-alt:#303030;--sidebar-bg:#202020;
 --text:#f2f2f2;--muted:#b8b8b8;--line:#404040;--soft:#ffffff08;
 --shadow:0 16px 40px #0004;
 background:var(--page);color:var(--text);color-scheme:dark;
 scrollbar-color:#626262 var(--page);
}
:root:not([data-theme=light]) body[data-view=admin] .admin-topbar{background:var(--sidebar-bg)}
:root:not([data-theme=light]) body[data-view=admin] :is(.admin-profile-menu,.admin-alert-menu){background:var(--card-hover)}
:root:not([data-theme=light]) body[data-view=admin] :is(.admin-table,.cp-table,.inventory-table) th{background:var(--table-head);color:var(--muted)}
:root:not([data-theme=light]) body[data-view=admin] :is(.admin-table,.cp-table,.inventory-table) tbody tr:hover{background:var(--card-hover)}

/* Editable surfaces are one step lighter than the panels around them. */
:root:not([data-theme=light]) body[data-view=admin] :is(.field,.cp-field) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select,textarea),
:root:not([data-theme=light]) body[data-view=admin] :is(.search-input,.inventory-search,.product-picker-trigger,.inventory-product-filter .product-picker-trigger){background:var(--input);color:var(--text);border-color:var(--line)}
:root:not([data-theme=light]) body[data-view=admin] .admin-form-dialog .field :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select,textarea),
:root:not([data-theme=light]) body[data-view=admin] .credential-editor-dialog .credential-input :is(input,textarea){background:var(--input);color:var(--text);border-color:var(--line)}
:root:not([data-theme=light]) body[data-view=admin] :is(input,textarea)::placeholder{color:#ababab;opacity:1}
:root:not([data-theme=light]) body[data-view=admin] :is(.dialog.admin-form-dialog,.admin-form-dialog .form-actions){background:var(--card);border-color:var(--line)}
:root:not([data-theme=light]) body[data-view=admin] .admin-form-dialog :is(.toggle-field,.icon-picker){background:var(--input);border-color:var(--line)}
:root:not([data-theme=light]) body[data-view=admin] select :is(option,optgroup){background:var(--input);color:var(--text)}
:root:not([data-theme=light]) body[data-view=admin] :is(.credential-card,.receipt-preview){--credential-surface:var(--input);background:var(--card);color:var(--text);border-color:var(--line)}
:root:not([data-theme=light]) body[data-view=admin] .receipt-preview-body img{background:var(--page)}

/* Support uses the same scale, with distinct incoming/outgoing messages. */
:root:not([data-theme=light]) body[data-view=admin] :is(.sc-workspace,.sc-chat){
 --sc-bg:#2d2d2d;--sc-soft:#333333;--sc-ink:#f2f2f2;--sc-muted:#b8b8b8;
 --sc-line:#444444;--sc-own:#473034;--sc-own-line:#795057;--sc-red:#ff858c;
}
:root:not([data-theme=light]) body[data-view=admin] .sc-messages{background:#292929}
:root:not([data-theme=light]) body[data-view=admin] .sc-chat-head{background:#303030}
