/* Casona Atelier — semantic materials shared by every administrative module.
   Public-site canvases and template thumbnails retain their own palettes. */
:root[data-theme]{--ink:#242729;--muted:#61666b;--line:#d8d9d7;--green:#344e43;--glass:#fdfcf9;--radius:20px;--surface:#fdfcf9;--surface-2:#f0efeb;--surface-3:#e5e5df;--input:#ffffff;--stroke:#89918b;--accent:#735537;--accent-soft:#eee4d7;--selected:#e4ebe6;--positive:#326247;--positive-bg:#e5efe7;--warning:#79551d;--warning-bg:#f7edda;--negative:#a03636;--negative-bg:#f9e7e5;--button:#344e43;--button-ink:#fff;--shadow:0 2px 3px #25292503,0 14px 38px #25292508;--backdrop:rgba(243,242,238,.91);--side:rgba(252,251,247,.90);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink)}
:root[data-theme=dark]{--ink:#f1f0eb;--muted:#b4b7b6;--line:#383d3f;--green:#d5bea0;--glass:#222629;--surface:#222629;--surface-2:#2a2f32;--surface-3:#353b3e;--input:#191d20;--stroke:#6e777b;--accent:#ddc4a2;--accent-soft:#3d352c;--selected:#3b3932;--positive:#b0d8bc;--positive-bg:#293e33;--warning:#edcd94;--warning-bg:#453927;--negative:#ffb7af;--negative-bg:#492e2d;--button:#d5bea0;--button-ink:#222421;--shadow:0 2px 3px #00000010,0 14px 40px #00000025;--backdrop:rgba(14,17,19,.92);--side:rgba(27,31,33,.94)}
:root[data-theme] body{color:var(--ink);background-color:var(--surface-2);font-size:14px;-webkit-font-smoothing:antialiased}
:root[data-theme] body:before{background:var(--backdrop)}
:root[data-theme] .shell{gap:26px}
:root[data-theme] .sidebar{background:var(--side);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:22px}
:root[data-theme] .brand strong{font-size:28px;letter-spacing:-1.5px;font-weight:650}
:root[data-theme] .brand small{color:var(--muted);font-size:8px;line-height:1.5;letter-spacing:1.3px}
:root[data-theme] .brand img{border-radius:10px}
:root[data-theme] .nav-label{font-size:10px;letter-spacing:1.2px;color:var(--muted);margin-top:24px}
:root[data-theme] .nav button{color:var(--muted);font-size:12px;min-height:44px;border-radius:10px;position:relative}
:root[data-theme] .nav button:hover{background:var(--surface-2);color:var(--ink)}
:root[data-theme] .nav button.active{background:var(--selected);color:var(--ink);box-shadow:none;font-weight:650}
:root[data-theme] .nav button.active:before{content:'';position:absolute;left:0;top:13px;bottom:13px;width:3px;border-radius:3px;background:var(--accent)}
:root[data-theme] :is(.topbar,.breadcrumb,.user,.field,.check-row,.stat-inline,.role-button,.op-product-add,.op-cart-line,.prep-item-title,.customer-card,.tenant-card,.section-control,.catalog-choices){color:var(--ink)}
:root[data-theme] .top-actions button{background:var(--side);border-color:var(--line);color:var(--ink)}
:root[data-theme] .topbar{padding-right:6px}
:root[data-theme] .page-head h1{font-size:34px;letter-spacing:-1.25px;font-weight:650;line-height:1.15}
:root[data-theme] .page-head p{font-size:14px;line-height:1.6;color:var(--muted)}
:root[data-theme] .eyebrow{font-size:10px;color:var(--accent);font-weight:650;letter-spacing:1.6px}
:root[data-theme] .demo-banner{background:var(--side);border-color:var(--line);color:var(--muted);font-size:11px;border-radius:8px}
:root[data-theme] .demo-banner strong{color:var(--ink)}
:root[data-theme] :is(.glass,.op-product,.op-ticket,.prep-card,.entity-header,.design-card,.saved-designs,.product,.cart){background:var(--surface);border-color:var(--line);box-shadow:var(--shadow);color:var(--ink)}
:root[data-theme] .panel{border-radius:18px}
:root[data-theme] .panel-head h2{font-size:19px;letter-spacing:-.5px}
:root[data-theme] :is(.panel-head p,.metric-title,.metric-foot,.tenant-meta,.progress-label,.detail-value>span,.form-section p,.wizard-footer .muted,.customer-card p,.credential-tile p,.credential-tile code,.scan-total>span,.consent,.library-count,.library-heading p,.design-card-info p,.design-card-info small,.builder-help,.quick-ready p,.quick-ready .ready-caption,.preview-toolbar>span,.release-status p,.local-publication small,.op-hint,.op-product-add small,.op-product-add p,.op-cart-line small,.op-total>span,.op-total small,.prep-card header small,.prep-card header span:first-child,.prep-item small,.prep-item-title span,.prep-card-tools button,.op-detail-line span,.op-timeline small,.op-order-detail .detail-grid small,.payment-success>span,.checkout-summary small,.checkout-summary span,.checkout-steps,.legend,.bar-group span,.empty,.legal-text,.tour-text){color:var(--muted)}
:root[data-theme] :is(.metric-value,.customer-balance,.detail-value strong,.progress-label strong,td strong,.quick-ready .ready-count,.op-total>strong,.checkout-summary>strong){color:var(--ink)}
:root[data-theme] :is(.metric-foot,.op-product-add small,.op-product-add p,.op-hint,.op-cart-line small,.op-total small,.prep-item small,.prep-card header small,.prep-card header span:first-child,.prep-item-title span,.prep-card-tools button,.op-timeline small,.design-card-info p){font-size:11px;line-height:1.55}
:root[data-theme] :is(.metric-title,.field,.op-global-note,.op-guest .field){font-size:12px}
:root[data-theme] :is(.avatar,.tenant-avatar,.entity-avatar,.metric-icon,.credential-symbol,.check-dot,.step-number){background:var(--accent-soft);color:var(--accent)}
:root[data-theme] .hero{background:linear-gradient(110deg,var(--surface) 30%,var(--surface-2));border-color:var(--line);padding:32px;min-height:215px}
:root[data-theme] .hero h2{font-size:36px;letter-spacing:-1.3px;line-height:1.12;font-weight:600;max-width:530px}
:root[data-theme] :is(.hero p,.wallet-intro p){font-size:14px;color:var(--muted)}
:root[data-theme] .hero-ring{border-radius:34% 34% 12px 12px;background:var(--accent-soft);border-color:var(--line);box-shadow:0 0 0 15px color-mix(in srgb,var(--accent-soft),transparent 55%)}
:root[data-theme] .float-label{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:var(--shadow)}
:root[data-theme] :is(.wallet-intro,.credential-tile,.review-card,.faq-editor,.release-status,.local-publication,.scanner-box,#scan-form .scanner-box,.checkout-summary,.payment-success-mark,.prep-wait,.message){background:var(--surface-2);border-color:var(--line);color:var(--ink)}
:root[data-theme] .wallet-intro-symbol{background:var(--surface);border-color:var(--line)}
:root[data-theme] .wallet-intro-symbol .icon{color:var(--accent)}
:root[data-theme] .wallet-card{background:linear-gradient(120deg,#34473f,#192722);border-color:#526a5a;color:#fff9ec}
:root[data-theme] .wallet-card :is(small,.eyebrow){color:#d5dfd5}
:root[data-theme] .wallet-card button{background:#f4eee4;color:#273d31;border-color:#f4eee4}
:root[data-theme] :is(button,input,select,textarea):where(:not(.public-site *):not(.design-thumb *)){border-color:var(--stroke)}
:root[data-theme] button:where(:not(.public-site *):not(.design-thumb):not(.op-product-add)){color:var(--ink);background-color:var(--surface)}
:root[data-theme] button:hover:where(:not(:disabled):not(.public-site *):not(.design-thumb):not(.op-product-add)){background-color:var(--surface-2)}
:root[data-theme] :is(input,select,textarea):where(:not(.public-site *)){background-color:var(--input);color:var(--ink);font-size:14px;box-shadow:inset 0 1px 2px #00000005;border-color:var(--stroke)}
:root[data-theme] input::placeholder,:root[data-theme] textarea::placeholder{color:var(--muted);opacity:1}
:root[data-theme] :is(input,select,textarea):disabled{background-color:var(--surface-2);color:var(--muted);opacity:1}
:root[data-theme] :is(input,select,textarea):focus-visible,:root[data-theme] button:focus-visible,:root[data-theme] a:focus-visible,:root[data-theme] summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
:root[data-theme] select{color-scheme:inherit}
:root[data-theme] .primary{background:var(--button)!important;border-color:var(--button)!important;color:var(--button-ink)!important;font-weight:600;box-shadow:none}
:root[data-theme] .primary:hover{background:var(--button)!important;filter:brightness(1.08)}
:root[data-theme] .danger,:root[data-theme] .error,:root[data-theme] .badge.red{background:var(--negative-bg)!important;border-color:var(--negative-bg)!important;color:var(--negative)!important}
:root[data-theme] :is(.badge,.check-dot.done,#scan-form .identified,.identified){background:var(--positive-bg);color:var(--positive);border-color:var(--line)}
:root[data-theme] :is(.badge.amber,.notice.amber,.prep-note,.prep-item p,.op-recovery-banner,.connection-warning){background:var(--warning-bg);border-color:var(--warning-bg);color:var(--warning)}
:root[data-theme] :is(.badge.gray,.notice:not(.amber)){background:var(--surface-2);color:var(--muted);border-color:var(--line)}
:root[data-theme] :is(.amount-in strong,.prep-item.is-ready b,.prep-age,#scan-result){color:var(--positive)!important}
:root[data-theme] .prep-age.late,:root[data-theme] .prep-card-tools button.priority-active{color:var(--warning)!important}
:root[data-theme] th{background:var(--surface-2);color:var(--muted);font-size:11px;letter-spacing:.6px}
:root[data-theme] td{color:var(--ink);font-size:13px}
:root[data-theme] :is(td,th,.detail-value,.check-row,.prep-item,.op-cart-line,.op-detail-line,.prep-config section,.catalog-choices label,.hour-editor){border-color:var(--line)}
:root[data-theme] tbody tr:hover{background:var(--surface-2)}
:root[data-theme] .modal-backdrop{background:#070a0d99;backdrop-filter:blur(14px)}
:root[data-theme] .modal{background:var(--surface);border:1px solid var(--line);color:var(--ink);box-shadow:0 30px 120px #0006;border-radius:24px}
:root[data-theme] .modal-head{padding-bottom:16px;border-bottom:1px solid var(--line)}
:root[data-theme] .modal-head h2{font-size:25px;line-height:1.2}
:root[data-theme] .modal-body>.actions:last-child,:root[data-theme] .modal-body form>.actions:last-child{background:var(--surface);border-top:1px solid var(--line);padding-top:13px}
:root[data-theme] :is(.segmented,.op-service,.builder-preview){background:var(--surface-2);border-color:var(--line)}
:root[data-theme] :is(.segmented button,.op-service button,.op-categories button,.prep-tabs button,.builder-tabs button,.preview-toolbar button){color:var(--muted);background:transparent;border-color:var(--line)}
:root[data-theme] :is(.segmented button.active,.op-service button.selected,.builder-tabs button.active,.preview-toolbar button.active,.chip.active,.role-button.active){background:var(--selected)!important;color:var(--ink)!important;box-shadow:none;border-color:var(--stroke)}
:root[data-theme] :is(.op-categories button.selected,.prep-tabs button.selected,.mobile-bottom button.active){background:var(--button)!important;color:var(--button-ink)!important;border-color:var(--button)}
:root[data-theme] .op-search{background:var(--surface);border-color:var(--stroke);border-radius:12px}
:root[data-theme] .op-search input{background:none;box-shadow:none}
:root[data-theme] .op-search>span{color:var(--muted)}
:root[data-theme] .op-product{border-radius:16px}
:root[data-theme] .op-product:hover{transform:none;box-shadow:0 0 0 1px var(--stroke),var(--shadow)}
:root[data-theme] .op-product-add h3{font-size:18px;font-weight:600;letter-spacing:-.5px}
:root[data-theme] .op-product-add>img{filter:saturate(.8);height:148px}
:root[data-theme] .op-favorite{background:var(--surface)!important;color:var(--accent);border:1px solid var(--line)!important}
:root[data-theme] :is(.op-add-symbol,.op-quantity button,.prep-item-actions button){background:var(--surface-2);color:var(--ink);border-color:var(--stroke)}
:root[data-theme] .op-ticket{border-radius:20px}
:root[data-theme] .op-ticket-head .eyebrow{color:var(--accent)}
:root[data-theme] .op-ticket-head h2{font-weight:600;letter-spacing:-.8px}
:root[data-theme] .op-payment{background:var(--surface);border-color:var(--line)}
:root[data-theme] .op-cart-line strong{font-size:13px}
:root[data-theme] .op-cart-line p{color:var(--warning)}
:root[data-theme] :is(.text-button,.op-cart-actions button){color:var(--accent);background:none!important;font-size:11px}
:root[data-theme] .op-empty{font-family:inherit;font-size:24px;line-height:1.4;color:var(--ink)}
:root[data-theme] .op-empty span{color:var(--muted);font-size:12px}
:root[data-theme] .prep-card>header{background:var(--surface-2)}
:root[data-theme] .prep-card.urgent{border-color:var(--accent)}
:root[data-theme] .prep-empty{background:var(--surface-2);border-color:var(--stroke);color:var(--muted)}
:root[data-theme] .prep-column-title h2{font-size:17px}
:root[data-theme] .prep-dot{background:var(--muted)}
:root[data-theme] .prep-dot.preparing{background:var(--accent)}
:root[data-theme] .prep-dot.ready{background:var(--positive)}
:root[data-theme] .prep-item-title b{font-size:14px}
:root[data-theme] .op-timeline li{border-color:var(--stroke)}
:root[data-theme] .op-order-detail .detail-grid strong{font-size:15px}
:root[data-theme] .op-detail-line p{color:var(--warning)}
:root[data-theme] .checkout-summary{border:1px solid var(--line)}
:root[data-theme] .checkout-steps{font-size:12px;flex-wrap:wrap}
:root[data-theme] .payment-recovery small{color:var(--warning)}
:root[data-theme] .progress,:root[data-theme] .tour-progress span{background:var(--surface-3)}
:root[data-theme] .progress>span,:root[data-theme] .tour-progress span.current{background:var(--accent)}
:root[data-theme] .bar{background:var(--accent)}
:root[data-theme] .bar.secondary{background:var(--stroke)}
:root[data-theme] .message.user-message{background:var(--button);color:var(--button-ink)}
:root[data-theme] .wizard-steps>span{color:var(--muted)}
:root[data-theme] .wizard-steps i{background:var(--surface-2);color:var(--muted)}
:root[data-theme] .wizard-steps .current{color:var(--ink)}
:root[data-theme] .wizard-steps .current i{background:var(--button);color:var(--button-ink)}
:root[data-theme] .wizard-steps .complete i{background:var(--positive-bg);color:var(--positive)}
:root[data-theme] .method-options{border-color:var(--stroke)}
:root[data-theme] .method-options legend{color:var(--muted)}
:root[data-theme] .builder-tabs{background:var(--surface)}
:root[data-theme] .preview-frame.mobile{border-color:var(--stroke)}
:root[data-theme] .cover-upload{color:var(--accent);border-color:var(--stroke)}
:root[data-theme] .cover-upload input::file-selector-button{background:var(--surface-3);color:var(--ink)}
:root[data-theme] .public-site{color-scheme:light}
:root[data-theme] .design-thumb{color-scheme:light}
:root[data-theme] :is(.receipt,.credential-print){background:#fff;color:#242729;border-color:#a7ada6}
:root[data-theme] :is(.receipt,.credential-print) :is(small,p,code,.brand small){color:#545c55}
:root[data-theme] .mobile-bottom{background:var(--side);border-color:var(--line);box-shadow:var(--shadow)}
:root[data-theme] #toast{background:var(--ink);color:var(--surface)}
:root[data-theme] .appearance-toggle{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.appearance-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
[data-theme=light] .theme-moon,[data-theme=dark] .theme-sun{display:none}
:root[data-theme] *{scrollbar-color:var(--stroke) transparent}
@media(max-width:1150px){:root[data-theme] .shell{gap:16px}:root[data-theme] .hero h2{font-size:30px}}
@media(max-width:800px){:root[data-theme] .shell{display:block}:root[data-theme] .top-actions{gap:5px}:root[data-theme] .appearance-toggle{min-width:38px;width:38px;padding:8px!important}:root[data-theme] .appearance-toggle span{display:none}:root[data-theme] .topbar .breadcrumb{max-width:92px}:root[data-theme] .page-head h1{font-size:29px}:root[data-theme] .hero{padding:24px}:root[data-theme] .hero h2{font-size:29px}:root[data-theme] .metric-value{font-size:25px}:root[data-theme] .metric-title{font-size:12px}:root[data-theme] .metric-foot{font-size:11px}:root[data-theme] .op-product-add>img{height:132px}:root[data-theme] .op-product-add h3{font-size:16px}:root[data-theme] .op-product-add>div{padding:13px}:root[data-theme] .op-hint{font-size:11px}:root[data-theme] .op-guest input,:root[data-theme] .op-global-note input{font-size:16px}:root[data-theme] .modal :is(input,select,textarea){font-size:16px}:root[data-theme] .modal-head h2{font-size:23px}}
@media(min-width:1200px){:root[data-theme] .main:has(.pos-pro) .page-head h1{font-size:28px}:root[data-theme] .op-product-add small{font-size:11px}:root[data-theme] .op-service button{font-size:11px}:root[data-theme] .op-hint{font-size:10px}}
@media(min-width:1200px) and (max-height:850px){:root[data-theme] .main:has(.pos-pro) .page-head h1{font-size:24px}:root[data-theme] .op-guest .field,:root[data-theme] .op-global-note{font-size:11px}:root[data-theme] .op-guest input,:root[data-theme] .op-global-note input{font-size:12px}:root[data-theme] .op-product-add>img{height:125px}:root[data-theme] .op-cart-line strong{font-size:12px}:root[data-theme] .op-cart-line small,:root[data-theme] .text-button{font-size:10px}:root[data-theme] .op-payment>.op-hint{display:none}}
@media print{:root[data-theme] body,:root[data-theme] .modal,:root[data-theme] .modal-body>.actions:last-child{background:white;color:#222}:root[data-theme] .modal{border:0;box-shadow:none}:root[data-theme] .appearance-toggle{display:none!important}:root[data-theme] body:before{display:none}}
/* Remaining semantic labels and navigation must not inherit legacy greens. */
:root[data-theme] .nav button{background:transparent}
:root[data-theme] .nav button.active{background:var(--selected)}
:root[data-theme] .nav button:hover{background:var(--surface-2)}
:root[data-theme] .op-global-note,:root[data-theme] .prep-column-title>span{color:var(--muted)}

/* Printable artifacts stay dark on white, including inherited totals/links. */
:root[data-theme] :is(.receipt,.credential-print) :is(.stat-inline,strong,h2,h3){color:#242729}
:root[data-theme] :is(.receipt,.credential-print) a{color:#344e43}
:root[data-theme] .legend>span:first-child i{background:var(--accent)!important}
:root[data-theme] .legend>span:last-child i{background:var(--stroke)!important}
:root[data-theme] .design-thumb{--ink:var(--thumb-ink);--muted:var(--thumb-ink)}
:root[data-theme] .design-thumb .thumb-hero>small{color:inherit}
:root[data-theme] .public-site{--ink:var(--site-ink);--muted:var(--site-muted);--green:var(--site-accent)}
