
:root,#workspace{--ui-bg:light-dark(#f3f7f5,#10201c);--ui-surface:light-dark(#ffffff,#1b2c27);--ui-soft:light-dark(#e8f1ed,#273f35);--ui-text:light-dark(#183f35,#e8f2ec);--ui-muted:light-dark(#5a7167,#acc4b6);--ui-line:light-dark(#dce7e0,#375247);--ui-accent:light-dark(#1c6d51,#a5d8b9);--ui-on:light-dark(#ffffff,#153b28);--ui-warning:light-dark(#855915,#efcb89);--ui-danger:light-dark(#aa3434,#ffb6b1);--ui-radius:14px;font:14px/1.7 "Segoe UI",Tahoma,Arial,sans-serif;color:var(--ui-text)}
:root{color-scheme:light dark}:root[data-theme="dark"],#workspace[data-theme="dark"]{color-scheme:dark}:root[data-theme="light"],#workspace[data-theme="light"]{color-scheme:light}#workspace[data-size="large"]{font-size:16px}
#workspace *{box-sizing:border-box}#workspace [hidden]{display:none!important}#workspace button,#workspace input,#workspace select,#workspace textarea{font:inherit}#workspace button{color:var(--ui-text);background:var(--ui-surface);border:1px solid var(--ui-line);padding:9px 14px;border-radius:9px;cursor:pointer;min-height:42px;max-width:100%}#workspace button:hover{background:var(--ui-soft)}#workspace button:disabled{opacity:.5;cursor:not-allowed}#workspace button:focus-visible,#workspace input:focus-visible,#workspace select:focus-visible,#workspace textarea:focus-visible{outline:3px solid var(--ui-accent);outline-offset:2px}
#workspace .primary{background:var(--ui-accent);color:var(--ui-on);border-color:transparent}#workspace .danger{color:var(--ui-danger)}#workspace .muted{color:var(--ui-muted)}#workspace .warning{color:var(--ui-warning)}#workspace .small{font-size:.88em}
#workspace input:not([type="checkbox"]):not([type="radio"]),#workspace select,#workspace textarea{display:block;width:100%;min-width:0;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:8px;padding:10px 12px}#workspace input[type="checkbox"],#workspace input[type="radio"]{accent-color:var(--ui-accent);width:18px;height:18px;flex-shrink:0}#workspace textarea{resize:vertical;min-height:85px}#workspace label{display:block;margin-bottom:5px}#workspace .field{display:flex;flex-direction:column;gap:5px;min-width:0}#workspace .check{display:flex;align-items:center;gap:10px}#workspace .field label{margin:0}
#workspace .demo-frame{border:1px solid var(--ui-line);background:var(--ui-bg);border-radius:18px;overflow:clip}#workspace .demo-banner{padding:7px 16px;text-align:center;background:var(--ui-soft);color:var(--ui-muted);font-size:.88em}#workspace .topbar{padding:16px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--ui-surface);border-bottom:1px solid var(--ui-line)}#workspace .brand{display:flex;align-items:center;gap:10px}#workspace .brand-mark{display:grid;place-items:center;background:var(--ui-accent);color:var(--ui-on);width:36px;height:36px;border-radius:11px;font-weight:500}#workspace .top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}#workspace .icon-button{padding:8px 10px;display:inline-flex;align-items:center;gap:7px}
#workspace .workspace{display:grid;grid-template-columns:190px minmax(0,1fr);min-height:630px}#workspace .sidebar{background:var(--ui-surface);border-inline-end:1px solid var(--ui-line);padding:18px 12px;display:flex;flex-direction:column;gap:6px}#workspace .sidebar button{display:flex;align-items:center;gap:10px;text-align:start;border-color:transparent;background:transparent;width:100%}#workspace .sidebar button[aria-current="page"],#workspace .sidebar button.current-parent{background:var(--ui-soft);color:var(--ui-accent);font-weight:500}#workspace .subnav{margin:5px 8px 12px;padding-inline-start:10px;border-inline-start:1px solid var(--ui-line)}#workspace .subnav button{font-size:.94em}#workspace .sidebar [data-route="store"]::after{content:'▾';margin-inline-start:auto;font-size:.8em;opacity:.7;flex-shrink:0}#workspace .sidebar [data-route="store"][aria-expanded="true"]::after{content:'▴'}#workspace .sidebar-footer{margin-top:auto;padding-top:22px}#workspace .store-context{padding:14px 8px;margin-bottom:12px;border-bottom:1px solid var(--ui-line)}#workspace .content{padding:24px;min-width:0}#workspace .crumb{font-size:.9em;color:var(--ui-muted);margin-bottom:18px}#workspace .page-head{display:flex;align-items:start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}
#workspace h1,#workspace h2,#workspace h3{font-weight:500;line-height:1.4}#workspace h1,#workspace h2{font-size:24px;margin:0 0 6px}#workspace h3{font-size:17px;margin:0 0 12px}#workspace h4{font-size:15px;font-weight:500;margin:0 0 6px}#workspace p{margin:0 0 14px}#workspace .panel{background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:var(--ui-radius);padding:20px;margin-bottom:18px;min-width:0}#workspace .panel .panel{background:var(--ui-bg);box-shadow:none}#workspace .row{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}#workspace .stack{display:flex;flex-direction:column;gap:14px}#workspace .grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}#workspace .grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}#workspace .badge{display:inline-flex;align-items:center;gap:5px;background:var(--ui-soft);padding:3px 10px;border-radius:20px;font-size:.88em;white-space:normal}#workspace .list-row{padding:14px 0;border-bottom:1px solid var(--ui-line)}#workspace .list-row:last-child{border-bottom:0}#workspace .tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px;background:var(--ui-soft);border-radius:11px;padding:5px}#workspace .tabs button{background:transparent;border-color:transparent;flex:1 1 auto}#workspace .tabs button[aria-selected="true"],#workspace .tabs button[aria-pressed="true"],#workspace .tabs button.active{background:var(--ui-surface);color:var(--ui-accent)}#workspace .actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:18px}#workspace .metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}#workspace .metric{padding:16px 18px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:var(--ui-radius)}#workspace .metric strong{display:block;font-size:25px;font-weight:500}#workspace .hero{background:var(--ui-soft);padding:24px;border-radius:var(--ui-radius);margin-bottom:20px}#workspace .empty{text-align:center;padding:35px 15px}#workspace .notice{padding:12px 16px;border-inline-start:3px solid var(--ui-accent);background:var(--ui-soft);margin:12px 0}#workspace .table-wrap{overflow-x:auto}#workspace table{width:100%;border-collapse:collapse}#workspace th,#workspace td{text-align:start;padding:12px;border-bottom:1px solid var(--ui-line)}#workspace th{font-weight:500}#workspace details{margin-top:12px}#workspace summary{cursor:pointer;padding:8px 0}
#workspace .toast{padding:12px 18px;background:var(--ui-soft);border-top:1px solid var(--ui-line);color:var(--ui-text)}#workspace .save-status{padding:9px 16px;background:var(--ui-soft);color:var(--ui-muted);font-size:.9em}#workspace dialog{color:var(--ui-text);background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:16px;width:min(580px,92%);padding:24px;max-height:85vh;overflow-y:auto;box-shadow:0 18px 60px #0003}#workspace dialog::backdrop{background:#07130faa}#workspace dialog .modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}#workspace .signed-out{padding:60px 20px;text-align:center;background:var(--ui-bg)}
@media(max-width:760px){#workspace .workspace{display:block}#workspace .sidebar{border-inline-end:0;border-bottom:1px solid var(--ui-line);display:block;padding:10px}#workspace .sidebar>nav{display:flex;gap:4px;flex-wrap:wrap}#workspace .sidebar>nav>button{width:auto;flex:1}#workspace .store-context,#workspace .sidebar-footer{display:none}#workspace .subnav{display:flex;flex-wrap:wrap;margin:8px 0 0;padding:0;border:0;gap:4px}#workspace .subnav button{width:auto;flex:1 1 30%}#workspace .content{padding:16px}#workspace .topbar{padding:12px}#workspace .top-actions .search-label{display:none}#workspace .grid2,#workspace .grid3{grid-template-columns:1fr}#workspace .metrics{gap:6px}#workspace .metric{padding:12px 8px;font-size:.9em}#workspace .metric strong{font-size:22px}#workspace .panel{padding:16px}#workspace input:not([type="checkbox"]),#workspace textarea,#workspace select{font-size:16px}}

body{margin:0;background:var(--ui-bg);color:var(--ui-text)}#workspace{min-height:100vh;background:var(--ui-bg);color-scheme:inherit}#workspace .workspace{display:block}#workspace .sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:min(320px,88vw);z-index:20;overflow:auto;box-shadow:0 0 0 100vmax #0007}#workspace .content{max-width:1250px;margin:auto}#workspace fieldset{border:0;padding:0;margin:0;min-width:0}#workspace .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}#workspace .card{background:var(--ui-surface);padding:20px;border:1px solid var(--ui-line);border-radius:14px;margin-bottom:18px}#workspace .shipping-inline,#workspace .section-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}#workspace .shipping-inline input{width:110px}#workspace .shipping-table-wrap{overflow:auto}#workspace .error{color:var(--ui-danger)}#workspace .message{padding:12px;margin:8px 0;border-inline-start:3px solid var(--ui-accent)}#workspace .nav-entry{display:flex;align-items:center;gap:12px;margin-bottom:22px}#workspace .crumb{margin:0}#workspace .full{grid-column:1/-1}@media(max-width:760px){#workspace .grid{grid-template-columns:1fr}#workspace .sidebar{display:flex}#workspace .sidebar>nav,#workspace .subnav{display:block}#workspace .sidebar button{width:100%}#workspace .store-context,#workspace .sidebar-footer{display:block}}
#workspace .topbar{position:sticky;top:0;z-index:30}#workspace .sidebar{inset-block-start:var(--header-height,85px)}#workspace .icon-button i{display:inline-flex}
#workspace .progress{height:8px;background:var(--ui-soft);border-radius:6px;overflow:hidden;margin:4px 0 10px}#workspace .progress-bar{height:100%;width:0;background:var(--ui-accent);transition:width .3s ease}#workspace .step-done{color:var(--ui-accent);font-weight:700;margin-inline-end:6px}#workspace .step-todo{color:var(--ui-muted);margin-inline-end:6px}#workspace .step-pending{color:var(--ui-warning);font-weight:700;margin-inline-end:6px}#workspace .field .req{color:var(--ui-accent);font-size:.82em}#workspace .field .oneof{color:var(--ui-warning);font-size:.82em}#workspace .field .opt{color:var(--ui-muted);font-size:.82em}

#workspace .catalog-head{margin-bottom:14px}
#workspace .catalog-head h2{margin:0 0 2px}
#workspace .catalog-phase{min-height:140px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:12px}
#workspace .catalog-summary{display:flex;flex-direction:column;gap:12px}
#workspace .catalog-summary-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#workspace .catalog-counts{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
#workspace .catalog-counts strong{font-size:28px;font-weight:500;line-height:1.2}
#workspace .catalog-variants{color:var(--ui-muted)}
#workspace .catalog-sync-status{min-height:1.4em}
#workspace .catalog-sync-synced{background:var(--ui-soft);color:var(--ui-accent)}
#workspace .catalog-sync-running,#workspace .catalog-sync-auth_expired,#workspace .catalog-sync-never_synced{background:var(--ui-soft);color:var(--ui-warning)}
#workspace .catalog-sync-failed,#workspace .catalog-sync-rate_limited{background:var(--ui-soft);color:var(--ui-danger)}
#workspace .catalog-sync-empty,#workspace .catalog-sync-unknown{background:var(--ui-soft)}
#workspace .catalog-toolbar{margin:14px 0}
#workspace .catalog-notice{padding:10px 14px;border-inline-start:3px solid var(--ui-accent);background:var(--ui-soft);margin:12px 0}
#workspace .catalog-notice.error{border-inline-start-color:var(--ui-danger)}
#workspace .catalog-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-top:12px}
#workspace .catalog-product{background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:var(--ui-radius);padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
#workspace .catalog-product-head{display:flex;gap:10px;align-items:flex-start;min-width:0}
#workspace .catalog-product-img{width:56px;height:56px;border-radius:10px;object-fit:cover;flex-shrink:0;background:var(--ui-soft)}
#workspace .catalog-product-meta{min-width:0;flex:1}
#workspace .catalog-product-meta h3{margin:0 0 6px;font-size:1.02em;overflow-wrap:anywhere}
#workspace .catalog-product-badges{display:flex;gap:6px;flex-wrap:wrap}
#workspace .catalog-inactive{color:var(--ui-danger)}
#workspace .catalog-product-details{display:flex;flex-direction:column;gap:4px;font-size:.94em}
#workspace .catalog-price{font-weight:500}
#workspace .catalog-link{color:var(--ui-accent);text-decoration:none}
#workspace .catalog-variant-block{margin-top:2px}
#workspace .catalog-variant-toggle{background:transparent;border-color:var(--ui-line);min-height:42px}
#workspace .catalog-variant-list{margin-top:8px;padding-inline-start:10px;border-inline-start:2px solid var(--ui-line);display:flex;flex-direction:column;gap:8px}
#workspace .catalog-variant-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.92em}
#workspace .catalog-list-state{margin-top:14px}
#workspace .catalog-list-retry,#workspace .catalog-retry{margin-top:4px}
#workspace .catalog-load-more{margin-top:16px;width:100%}
#workspace .legacy-catalog{margin-top:24px;border-style:dashed}
@media(max-width:760px){
#workspace .catalog-list{grid-template-columns:1fr}
#workspace .catalog-summary-top{gap:6px}
#workspace .catalog-counts strong{font-size:24px}
#workspace .catalog-product-img{width:48px;height:48px}
#workspace .catalog-search{font-size:16px}
}

#workspace #conversationSearch{flex:1 1 220px;width:auto;min-width:0}


/* WACRM-01: use the existing workspace palette and read-only customer contract. */
#workspace .inbox-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:18px}
#workspace .inbox-toolbar label{flex:1 1 120px;min-width:0;margin:0}
#workspace .inbox-layout{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,2fr) minmax(200px,1fr);gap:16px;align-items:start}
#workspace .inbox-layout>div,#workspace .inbox-layout>aside{min-width:0}
#workspace .inbox-conversation{width:100%;text-align:start;overflow-wrap:anywhere}
#workspace .inbox-conversation[aria-pressed="true"]{border-color:var(--ui-accent);background:var(--ui-soft)}
#workspace .inbox-conversation p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-top:8px}
#workspace .inbox-layout .message,#workspace .inbox-customer-pane{overflow-wrap:anywhere}
#workspace .inbox-customer-pane dl{margin:12px 0}
#workspace .inbox-customer-pane dt{color:var(--ui-muted)}
#workspace .inbox-customer-pane dd{margin:0 0 12px}
#workspace #backToConversations{display:none;margin-bottom:12px}
@media(max-width:1050px) and (min-width:761px){#workspace .inbox-layout{grid-template-columns:minmax(200px,1fr) minmax(0,2fr)}#workspace .inbox-customer-pane{grid-column:2}}
@media(max-width:760px){#workspace .inbox-layout{display:block}#workspace .inbox-detail-pane,#workspace .inbox-customer-pane{display:none}#workspace .inbox-selected .inbox-list-pane{display:none}#workspace .inbox-selected .inbox-detail-pane,#workspace .inbox-selected .inbox-customer-pane{display:block}#workspace #backToConversations{display:inline-block}#workspace .inbox-toolbar label{flex-basis:100px}}
