/* The system variant also works on the script-free login and without JavaScript. */
:root[data-theme=dark]{color-scheme:dark;--paper:#111b17;--ink:#e5efe9;--muted:#afc0b5;--line:#3a4c41;--admin-bg:#111b17;--admin-surface:#1a2820;--admin-ink:#e5efe9;--admin-muted:#afc0b5;--admin-line:#3a4c41;--admin-accent:#a6c7b5;--admin-accent-light:#30483a;--theme-surface:#1a2820;--theme-subtle:#263c2e;--theme-control:#15241b;--theme-text:#e5efe9;--theme-muted:#afc0b5;--theme-link:#b7d7c5;--theme-button:#a6c7b5;--theme-button-text:#10251b;--theme-hero:linear-gradient(110deg,#19281f,#253b2c)}
@media(prefers-color-scheme:dark){:root[data-theme=system]{color-scheme:dark;--paper:#111b17;--ink:#e5efe9;--muted:#afc0b5;--line:#3a4c41;--admin-bg:#111b17;--admin-surface:#1a2820;--admin-ink:#e5efe9;--admin-muted:#afc0b5;--admin-line:#3a4c41;--admin-accent:#a6c7b5;--admin-accent-light:#30483a;--theme-surface:#1a2820;--theme-subtle:#263c2e;--theme-control:#15241b;--theme-text:#e5efe9;--theme-muted:#afc0b5;--theme-link:#b7d7c5;--theme-button:#a6c7b5;--theme-button-text:#10251b;--theme-hero:linear-gradient(110deg,#19281f,#253b2c)}}
:root[data-theme=light]{color-scheme:light}
.theme-switch{display:inline-flex;align-items:center;flex:0 0 auto;gap:2px;padding:3px;background:var(--theme-surface,#fff);color:var(--theme-text,#263e35);border:1px solid var(--line,var(--admin-line,#dce0d6));border-radius:99px;vertical-align:middle}
.theme-switch[hidden]{display:none}.theme-switch button{display:grid;place-items:center;position:relative;width:40px;height:40px;min-height:40px;border:0;border-radius:50%;padding:0;background:transparent;color:inherit;cursor:pointer;transition:background-color .18s,color .18s,transform .18s}.theme-switch button:hover{background:var(--theme-subtle,#eef2ef)}.theme-switch button[aria-pressed=true]{background:var(--theme-button,#284f43);color:var(--theme-button-text,#fff)}.theme-switch button:focus-visible{outline:3px solid var(--theme-link,#8c632a);outline-offset:2px}.theme-switch svg{display:block;width:19px;height:19px;pointer-events:none}.theme-choice-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.site-header nav{flex-wrap:wrap}.admin-topbar-right{flex-wrap:wrap}.admin-topbar .theme-switch{margin-left:auto}
/* Semantic surfaces use dark tokens only when supplied; light defaults stay intact. */
.site-header{background:var(--theme-surface,transparent)}.hero{background:var(--theme-hero,linear-gradient(110deg,#f4f1e9,#e9eddf))}.dev-note,.story,.notice{background:var(--theme-subtle,#e6ebdf);color:var(--theme-text,inherit)}
input:not([type=checkbox]),textarea,select{background-color:var(--theme-control,#fffefa);color:var(--theme-text,inherit);border-color:var(--line,var(--admin-line,#b8c2b4))}.shop-search{color:var(--theme-text,#4a4a4a);--search-ink:var(--theme-text,#4a4a4a)}.shop-search-field input,.shop-search-field input:focus{background:var(--theme-control,#00000008);color:var(--theme-text,#4a4a4a)}.shop-search-field input::placeholder{color:var(--theme-muted,#777)}
.shop-search-dropdown{background:var(--theme-surface,#fffffff2);color:var(--theme-text,#111);border-color:var(--line,#0000000d)}.search-meta,.search-tax,.search-message{color:var(--theme-muted,#777)}.search-product:hover,.search-suggestion:hover,.shop-search-dropdown [aria-selected=true],.search-all{background:var(--theme-subtle,#f7f7f7)}.search-all:hover{background:var(--theme-control,#e9eeec)}.search-product,.search-suggestion,.search-all{border-color:var(--line,#0000000d)}
.button{background:var(--theme-button,var(--ink));color:var(--theme-button-text,#fff)}.button:hover{background:var(--theme-button,#3d584b)}.button.secondary{background:var(--theme-surface,transparent);color:var(--theme-text,var(--ink))}
.admin-sidebar,.admin-panel,.dashboard-panel,.dashboard-kpi,.admin-profile-panel,.login-panel,.icon-button{background:var(--theme-surface,#fff);color:var(--theme-text,inherit)}.admin-topbar{background:var(--theme-surface,#ffffffed)}
.admin-nav-item,.admin-subnav a,.admin-breadcrumbs,.admin-breadcrumbs [aria-current=page],.admin-nav-item svg{color:var(--theme-muted,#5f6b75)}.admin-nav-item:not(.is-unavailable):hover,.admin-subnav a:hover,.admin-subnav a[aria-current=page],.admin-avatar,.admin-logout,.admin-planned{background:var(--theme-subtle,#f3f6f4);color:var(--theme-text,#294f41)}.admin-nav-item.is-active,.admin-nav-group.is-active>summary{color:var(--admin-accent);background:var(--admin-accent-light)}
.admin-app .button,.admin-auth .button{background:var(--theme-button,#284f43);color:var(--theme-button-text,#fff)}.admin-app .button.secondary{background:var(--theme-surface,#fff);color:var(--theme-text,var(--admin-ink))}.admin-app input,.admin-app select,.admin-app textarea,.admin-auth input{background:var(--theme-control,#fff);color:var(--theme-text,var(--admin-ink));border-color:var(--admin-line)}
.admin-app th,.admin-app thead,.admin-flash{background:var(--theme-subtle,#f5f7f5);color:var(--theme-text,inherit)}.admin-app tbody tr:hover{background:var(--theme-subtle,#f5f7f5)}.customer-filters input,.customer-filters select{background:var(--theme-control,var(--admin-surface));color:var(--theme-text,var(--admin-ink))}
/* White image backgrounds stay intact; only catalogue photos are dimmed below. */
.article-image,.image-gallery img,.category-image-card img{background:#fff}
/* CSS also covers newly inserted cards and theme changes without image listeners. */
:root[data-theme=dark]{--catalog-photo-filter:brightness(.88) contrast(1.04);--catalog-photo-hover-filter:brightness(.96) contrast(1.02)}
@media(prefers-color-scheme:dark){:root[data-theme=system]{--catalog-photo-filter:brightness(.88) contrast(1.04);--catalog-photo-hover-filter:brightness(.96) contrast(1.02)}}
.category-image-card img,.product-art img{filter:var(--catalog-photo-filter,none);transition:filter .3s ease}
.category-image-card:hover img,.category-image-card:focus-visible img,.product-art:hover img,.product-art:focus-visible img{filter:var(--catalog-photo-hover-filter,none)}
@media(prefers-reduced-motion:reduce){.category-image-card img,.product-art img{transition:none}}
@media(max-width:760px){.admin-topbar{flex-wrap:wrap}.admin-topbar .theme-switch{margin-left:0}.site-header nav{gap:14px}}
@media(prefers-reduced-motion:reduce){.theme-switch button{transition:none}}
.editor-form,.image-editor-card,.contact-request,.contact-image-preview,.contact-image-close{background:var(--theme-surface,#fffefa);color:var(--theme-text,inherit)}
.admin-welcome{color:var(--theme-text,inherit)}.admin-welcome .button{background:var(--theme-button,#fff);color:var(--theme-button-text,#284f43)}
.admin-auth{background:var(--theme-hero,radial-gradient(ellipse at top,#e8eee5,transparent 65%)),var(--admin-bg)}

/* Preserve the official Ambiente colours; outline only in the active dark theme. */
:root[data-theme=dark] .brand-logo[src*="/ambiente-europe-b-v-"]{filter:drop-shadow(.6px 0 0 var(--ink)) drop-shadow(-.6px 0 0 var(--ink)) drop-shadow(0 .6px 0 var(--ink)) drop-shadow(0 -.6px 0 var(--ink))}
@media(prefers-color-scheme:dark){:root[data-theme=system] .brand-logo[src*="/ambiente-europe-b-v-"]{filter:drop-shadow(.6px 0 0 var(--ink)) drop-shadow(-.6px 0 0 var(--ink)) drop-shadow(0 .6px 0 var(--ink)) drop-shadow(0 -.6px 0 var(--ink))}}
