/* Management layout reuses the storefront's shared theme tokens. */
body { height:100dvh; overflow:hidden; color:var(--ink); background:var(--paper); }
.auth-shell { height:100dvh; overflow:auto; }
.admin-shell { height:100dvh; display:flex; }
.sidebar { position:fixed; inset:0 auto 0 0; width:224px; height:100dvh; padding:var(--space-5) var(--space-3); overflow-y:auto; border-right:1px solid var(--line); background:var(--white); z-index:10; }
.sidebar>.brand { margin-bottom:var(--space-4); }
.sidebar-label,.sidebar-tip,.workspace-footer,.page-heading .eyebrow,.page-heading>.muted,.stat-card small,.heading-dot { display:none; }
.sidebar-nav { display:flex; flex-direction:column; gap:var(--space-1); }
.nav-group { color:var(--muted); font-size:var(--text-xs); padding:var(--space-4) var(--space-3) var(--space-1); }
.sidebar .nav-link { width:100%; min-height:42px; padding:var(--space-2) var(--space-3); font-size:var(--text-sm); color:var(--ink); border-radius:var(--radius-input); }
.sidebar .nav-link.active { color:var(--brand-strong); background:var(--brand-soft); font-weight:600; }
.sidebar .nav-link:hover { background:var(--surface-subtle); }
.sidebar-bottom { margin-top:var(--space-5); padding-top:var(--space-3); border-top:1px solid var(--line); }
.sidebar-bottom .nav-link { font-size:var(--text-xs); }
.workspace { margin-left:224px; width:calc(100% - 224px); height:100dvh; min-width:0; display:flex; flex-direction:column; overflow:hidden; }
.workspace-header { height:64px; min-height:64px; padding:var(--space-3) var(--space-5); border-bottom:1px solid var(--line); background:var(--white); z-index:8; display:flex; justify-content:space-between; align-items:center; gap:var(--space-3); }
.header-path { font-size:var(--text-sm); color:var(--muted); }.header-path strong { color:var(--ink); }
.view { padding:var(--space-5); min-height:0; overflow-y:auto; flex:1; width:100%; max-width:1600px; margin-inline:auto; }
.page-heading { margin:0 0 var(--space-4); gap:var(--space-3); align-items:center; }
.page-heading h1 { font-size:24px!important; line-height:1.35; margin:0 0 var(--space-2); }
.page-heading .muted { font-size:var(--text-sm); line-height:1.6; max-width:850px; }
.page-heading>.button { margin:0; }
.button { border-radius:var(--radius-input); font-size:var(--text-sm); min-height:40px; transition:background var(--motion-fast),transform var(--motion-fast); }
.button:active:not(:disabled) { transform:translateY(1px); }.button:disabled { opacity:.55; cursor:not-allowed; }
.button.small { font-size:var(--text-xs); min-height:32px; padding:var(--space-1) var(--space-2); }
input,select,textarea { color:var(--ink); }input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.field { font-size:var(--text-sm); }.field input,.field select,.field textarea { font-size:var(--text-sm); min-height:40px; border-radius:var(--radius-input); }
.panel-heading,.form-content { padding:var(--space-4); }.panel-heading h2 { font-size:var(--text-base); }.panel-heading p { font-size:var(--text-xs); }.step-number { width:28px; height:28px; font-size:var(--text-xs); }
.stat-grid { margin-bottom:var(--space-4); gap:var(--space-3); }.stat-card { padding:var(--space-3) var(--space-4); gap:var(--space-1); }.stat-card strong { font-size:26px; }.stat-card>span { font-size:var(--text-xs); }
.catalog-tools { padding:var(--space-3); gap:var(--space-3); }.filter-tab { font-size:var(--text-sm); }.search-box { height:40px; max-width:400px; }.search-box input { font-size:var(--text-sm); }
.catalog-extra-tools { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-3); padding:var(--space-3); border-bottom:1px solid var(--line); font-size:var(--text-xs); }.catalog-extra-tools label { display:flex; gap:var(--space-2); align-items:center; }.catalog-extra-tools select { min-height:34px; border:1px solid var(--line); border-radius:var(--radius-input); background:var(--white); padding:var(--space-1); }.catalog-model-note { font-size:var(--text-xs); color:var(--muted); padding:var(--space-2) var(--space-3); }
.product-list-head,.product-row { grid-template-columns:28px minmax(190px,1fr) 100px 100px 72px 120px minmax(170px,230px); gap:var(--space-3); padding:var(--space-3); }
.product-list-head { font-size:var(--text-xs); }.product-thumbnail { width:56px; height:56px; object-fit:contain; }.product-info { gap:var(--space-3); }.product-name { font-size:var(--text-sm); }.product-subtitle,.product-updated,.product-stock { font-size:var(--text-xs); color:var(--muted); }.product-price { font-size:var(--text-base); }.product-row .product-status { font-size:var(--text-xs); }.product-actions { display:flex; flex-wrap:wrap; gap:var(--space-1); }.product-actions .button { padding:var(--space-1) var(--space-2); }
.workbench-panel { padding:var(--space-4); background:var(--white); border:1px solid var(--line); border-radius:var(--radius-card); margin-bottom:var(--space-4); min-width:0; }.workbench-panel h2 { font-size:var(--text-base); margin:0 0 var(--space-3); }.workbench-panel p { line-height:1.7; font-size:var(--text-sm); }
.dashboard-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:var(--space-3); margin-bottom:var(--space-4); }.metric-card { display:flex; flex-direction:column; align-items:flex-start; gap:var(--space-2); padding:var(--space-4); background:var(--white); border:1px solid var(--line); border-radius:var(--radius-card); text-align:left; color:var(--ink); }.metric-card strong { font-size:28px; }.metric-card span,.metric-card small { font-size:var(--text-xs); color:var(--muted); }.metric-card:hover:not(:disabled) { border-color:var(--brand); }.dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-4); }.dashboard-grid .workbench-panel { margin:0; }.workbench-row { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); padding:var(--space-3) 0; border:0; border-bottom:1px solid var(--line); font-size:var(--text-sm); color:var(--ink); width:100%; text-align:left; background:none; }.workbench-row:last-child { border:0; }.workbench-row small { color:var(--muted); font-size:var(--text-xs); }.workbench-actions { display:flex; flex-wrap:wrap; gap:var(--space-2); }
.staff-menu { position:relative; font-size:var(--text-sm); }.staff-menu summary { cursor:pointer; color:var(--ink); }.staff-menu[open] { background:var(--white); border:1px solid var(--line); padding:var(--space-2); border-radius:var(--radius-input); box-shadow:var(--shadow-card); }.staff-menu p { margin-block:var(--space-2); font-size:var(--text-xs); }.staff-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; align-items:end; gap:var(--space-3); }.staff-form h2,.staff-form p { grid-column:1/-1; }.staff-form .field { margin:0; }.staff-row { display:grid; grid-template-columns:minmax(130px,1fr) 130px 140px 90px; gap:var(--space-3); align-items:center; padding:var(--space-3); border-bottom:1px solid var(--line); font-size:var(--text-sm); }.staff-row select { width:100%; min-height:36px; }.audit-row { display:grid; grid-template-columns:145px 120px minmax(0,1fr) 110px; gap:var(--space-3); padding:var(--space-3); border-bottom:1px solid var(--line); font-size:var(--text-xs); overflow-wrap:anywhere; }
.workflow-editor { display:flex; flex-wrap:wrap; gap:var(--space-2); align-items:center; padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--line); background:var(--surface-subtle); font-size:var(--text-xs); }.workflow-editor select { min-height:32px; max-width:180px; padding:var(--space-1); border:1px solid var(--line); border-radius:var(--radius-input); background:var(--white); }.workflow-editor label { display:flex; align-items:center; gap:var(--space-2); }
#consultations-view,#orders-view,#customers-view,#inquiries-view { display:flex; flex-direction:column; overflow:hidden; }.consultation-workspace,.order-admin-workspace,.customer-admin-workspace,.inquiry-admin-workspace { flex:1; min-height:0; max-height:none; height:auto; }.conversation-content { display:grid; grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto; }.conversation-messages { min-height:0; font-size:var(--text-sm); }.conversation-header,.conversation-product,.conversation-composer { padding:var(--space-3) var(--space-4); }.conversation-header h2 { font-size:var(--text-base); }.conversation-bubble { font-size:var(--text-sm); }.conversation-list-title strong { font-size:var(--text-sm); }.conversation-list-preview { font-size:var(--text-xs); }.conversation-product { max-height:130px; overflow-y:auto; }.conversation-product-info>p,.conversation-product-info>strong { font-size:var(--text-xs); }.conversation-composer>textarea { min-height:64px; max-height:110px; resize:none; font-size:var(--text-sm); }
.order-detail-panel,.customer-detail-panel,.inquiry-admin-detail { overscroll-behavior:contain; }.order-detail-header,.customer-detail-header,.inquiry-detail-header { padding:var(--space-4); }.order-detail-body,.customer-detail-body,.inquiry-detail-body { padding:var(--space-4); }.order-record-item,.customer-record-item { gap:var(--space-2); }.order-record-item strong,.customer-record-item strong { font-size:var(--text-sm); }.customer-detail-cell strong,.inquiry-detail-cell strong { color:var(--ink); font-size:var(--text-sm); }.customer-detail-cell span,.inquiry-detail-cell span { color:var(--muted); font-size:var(--text-xs); }.order-list-item,.inquiry-admin-item,.customer-list-item { padding:var(--space-3); }.order-list-item strong,.inquiry-admin-item strong,.customer-list-item strong { font-size:var(--text-sm); }
.editor-note,.settings-note { font-size:var(--text-sm); }.editor-note h3 { font-size:var(--text-base); }.editor-note p { font-size:var(--text-sm); }.workbench-dialog { width:min(720px,calc(100% - 32px)); max-height:90dvh; padding:var(--space-5); border:1px solid var(--line); border-radius:var(--radius-dialog); background:var(--white); }.workbench-dialog::backdrop { background:#1c293566; }.workbench-dialog img { width:100%; max-height:320px; object-fit:contain; }.workbench-dialog h2 { margin-block:var(--space-4); }.workbench-dialog p { white-space:pre-wrap; line-height:1.7; }
#sidebar-toggle { display:none; }.toast-region { left:calc(50% + 112px); }
.conversation-orders { padding:var(--space-2) var(--space-4); border-bottom:1px solid var(--line); font-size:var(--text-xs); background:var(--surface-subtle); }
.conversation-orders summary { cursor:pointer; color:var(--ink); }.conversation-orders[open] { max-height:140px; overflow-y:auto; }.conversation-orders .workbench-actions { margin-top:var(--space-2); }.conversation-orders small { display:block; width:100%; }
/* Retire low-contrast legacy helper colours without changing status semantics. */
.workspace .stat-card>span,.workspace .filter-tab,.workspace .search-box>span,.workspace .product-list-head,.workspace .header-path>span,.workspace .tiny-tag { color:var(--muted); }
.workspace .filter-tab.active,.workspace .tiny-tag.featured { color:var(--brand-strong); background:var(--brand-soft); }
.workspace .tiny-tag:not(.featured) { background:var(--surface-subtle); }
.workspace .product-status.draft { color:var(--warning); background:var(--warning-soft); }
.workspace :is(.conversation-header p,.conversation-message-meta,.conversation-character-count,.conversation-composer-footer>span,.conversation-list-product,.conversation-list-preview,.conversation-list-title time,.conversation-product-label,.conversation-product-info>p,.inquiry-detail-header p,.customer-detail-header p,.order-detail-header p,.inquiry-detail-cell span,.order-detail-cell span,.inquiry-admin-item small,.inquiry-admin-item time,.customer-list-item span,.customer-list-item small,.customer-list-item time,.order-list-item span,.order-list-item small,.order-list-item time,.customer-record-item span,.customer-record-item time,.order-record-item span,.order-record-item time,.panel-heading p,.field-note,.field small,.image-count,.catalog-footer) { color:var(--muted); font-size:var(--text-xs); }
.workspace .inquiry-status-badge.contacted { color:var(--info); background:var(--info-soft); }.workspace .inquiry-status-badge.quoted { color:var(--warning); background:var(--warning-soft); }
.workspace .inquiry-detail-product p { color:var(--muted); font-size:var(--text-xs); }
.workspace .step-number { color:var(--ink); background:var(--surface-subtle); }.workspace .settings-note :is(p,span) { color:var(--ink); }
.workspace :is(.conversation-list-heading,.inquiry-admin-list-heading,.customer-list-heading,.order-list-heading)>span { color:var(--muted); font-size:var(--text-xs); }
@media(max-width:1280px) { .product-list-head { display:none; }.product-row { grid-template-columns:28px minmax(180px,1fr) 100px 100px; }.product-info { grid-row:span 2; }.product-actions { grid-column:3/5; }.product-updated { grid-column:2; }.product-status { grid-column:3; }.dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.staff-form { grid-template-columns:repeat(2,minmax(0,1fr)); }.conversation-content { grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto; } }
@media(max-width:800px) { .sidebar { display:block; width:224px; visibility:hidden; transform:translateX(-100%); transition:none; z-index:7; box-shadow:var(--shadow-card); padding-top:70px; }.sidebar-open .sidebar { visibility:visible; transform:translateX(0); }.sidebar .sidebar-nav { flex-direction:column; }.sidebar-bottom { display:block; }.sidebar-bottom #export-button,.sidebar-bottom .logout-link { display:flex; font-size:var(--text-xs); }.workspace { width:100%; margin:0; }.workspace-header { padding-inline:var(--space-3); }#sidebar-toggle { display:inline-flex; z-index:11; }.view { padding:var(--space-3); }.dashboard-grid { grid-template-columns:1fr; }.dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.staff-row { grid-template-columns:1fr 100px; }.audit-row { grid-template-columns:1fr 1fr; }.toast-region { left:50%; }.product-row { grid-template-columns:24px minmax(0,1fr) 80px; }.product-info { grid-column:2/4; grid-row:auto; }.product-price { grid-column:2; grid-row:auto; text-align:left; }.product-stock { grid-column:3; }.product-row .product-status { grid-column:2; grid-row:auto; justify-self:start; }.product-updated { grid-column:3; }.product-actions { grid-column:2/4; }.product-thumbnail { width:56px; height:56px; }.staff-form { grid-template-columns:1fr; }.page-heading h1 { font-size:22px!important; }.consultation-workspace { min-height:0; }.conversation-list-panel { min-height:0; }.conversation-content { height:100%; }.workflow-editor { padding:var(--space-2); }.conversation-header h2 { font-size:var(--text-sm); }.conversation-product { max-height:95px; }.conversation-composer-footer { flex-wrap:wrap; }.conversation-composer-footer>span:first-child { display:none; }.order-admin-workspace,.inquiry-admin-workspace,.customer-admin-workspace { min-height:0; }.order-list-panel,.inquiry-admin-list-panel,.customer-list-panel { min-height:0; }.order-detail-panel,.inquiry-admin-detail,.customer-detail-panel { min-height:0; height:100%; }.header-path { font-size:var(--text-xs); } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } }
@media(max-width:650px) { #consultations-view .page-heading .muted { display:none; }.conversation-product { padding:var(--space-2) var(--space-3); max-height:none; overflow:visible; }.conversation-product>img { width:44px; height:44px; }.conversation-product-label { display:none; }.conversation-product-info { gap:var(--space-1); }.conversation-header p { margin-top:var(--space-1); } }
/* Password recovery shares the existing dialog and form design tokens. */
.password-reset-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid var(--border, #e2e8f0); border-radius: 16px; }
.password-reset-dialog form { display: grid; gap: 16px; margin: 16px 0; }
.password-reset-dialog input:not([type="checkbox"]) { width: 100%; min-width: 0; }
.password-reset-dialog > button { margin: 8px 8px 0 0; }
