/* V21 UI-only theme preview; preserves yellow primary actions */
:root{color-scheme:dark}
html[data-pirelli-theme="light"]{color-scheme:light;--bg:#f5f6f8;--card:#fff;--line:#d9dce2;--muted:#535966;--white:#1b1d23}
html[data-pirelli-theme="light"] body{background:#f5f6f8!important;color:#1b1d23!important}
html[data-pirelli-theme="light"] .card,html[data-pirelli-theme="light"] .c,html[data-pirelli-theme="light"] .auditCard{background:#fff!important;color:#1b1d23!important;border-color:#d9dce2!important}
html[data-pirelli-theme="light"] .head,html[data-pirelli-theme="light"] .top{border-color:#d9dce2!important}
html[data-pirelli-theme="light"] input,html[data-pirelli-theme="light"] select,html[data-pirelli-theme="light"] textarea{background:#fff!important;color:#1b1d23!important;border-color:#b9bec8!important}
html[data-pirelli-theme="light"] input::placeholder{color:#707784!important}
html[data-pirelli-theme="light"] .secondary,html[data-pirelli-theme="light"] .tabs.auth-tabs,html[data-pirelli-theme="light"] .status-filter,html[data-pirelli-theme="light"] .msg,html[data-pirelli-theme="light"] .pill,html[data-pirelli-theme="light"] .tag{background:#e9ebf0!important;color:#22252c!important;border-color:#d9dce2!important}
html[data-pirelli-theme="light"] .muted,html[data-pirelli-theme="light"] .auth-sub,html[data-pirelli-theme="light"] .field-label,html[data-pirelli-theme="light"] .hint{color:#555d6a!important}
html[data-pirelli-theme="light"] td,html[data-pirelli-theme="light"] th{border-color:#e0e2e8!important}
html[data-pirelli-theme="light"] .brand b{color:#1b1d23!important}
html[data-pirelli-theme="light"] .btn.primary,html[data-pirelli-theme="light"] button:not(.secondary):not(.danger):not(.linkbtn){color:#111}
/* React/Tailwind admin and customer: override only dark surface/text utilities. */
html[data-pirelli-theme="light"] .bg-zinc-950,html[data-pirelli-theme="light"] .bg-zinc-900,html[data-pirelli-theme="light"] .bg-zinc-900\/50{background-color:#f5f6f8!important}
html[data-pirelli-theme="light"] .bg-zinc-800,html[data-pirelli-theme="light"] .bg-zinc-800\/50{background-color:#fff!important}
html[data-pirelli-theme="light"] .text-zinc-100,html[data-pirelli-theme="light"] .text-white,html[data-pirelli-theme="light"] .text-zinc-200{color:#1b1d23!important}
html[data-pirelli-theme="light"] .text-zinc-400,html[data-pirelli-theme="light"] .text-zinc-500{color:#565e69!important}
html[data-pirelli-theme="light"] .border-zinc-800,html[data-pirelli-theme="light"] .border-zinc-700{border-color:#d9dce2!important}
/* Keep branding buttons yellow with dark lettering. */
html[data-pirelli-theme="light"] .bg-\[\#FFDE00\],html[data-pirelli-theme="light"] .bg-yellow-400{color:#111!important}
/* Theme control stays at top right; does not interfere with footer or form. */
#pirelli-theme-switch{position:fixed;right:18px;top:14px;bottom:auto;z-index:2147483640;display:flex;align-items:center;background:#19191b;border:1px solid #555;border-radius:30px;padding:3px;box-shadow:0 2px 10px #0005}
#pirelli-theme-toggle{appearance:none;border:0!important;border-radius:50%;width:33px;height:33px;min-width:33px;padding:0!important;background:#303035!important;color:#ffdf00!important;font-size:21px!important;line-height:1;cursor:pointer}
/* Customer portal: retain the original black header/footer and make the form white. */
html[data-pirelli-theme="light"] body.customer-route header,html[data-pirelli-theme="light"] body.customer-route footer{background:#09090b!important;color:#fff!important}
html[data-pirelli-theme="light"] body.customer-route header *,html[data-pirelli-theme="light"] body.customer-route footer *{color:inherit}
html[data-pirelli-theme="light"] body.customer-route header .text-yellow-400,html[data-pirelli-theme="light"] body.customer-route footer .text-yellow-400{color:#ffdf00!important}
html[data-pirelli-theme="light"] body.customer-route main>div>div.bg-zinc-900,html[data-pirelli-theme="light"] body.customer-route main .bg-zinc-900,html[data-pirelli-theme="light"] body.customer-route main .bg-zinc-900\/50,html[data-pirelli-theme="light"] body.customer-route main .bg-zinc-800{background:#fff!important;color:#1b1d23!important}
html[data-pirelli-theme="light"] body.customer-route main input{background:#f7f8fa!important;color:#1b1d23!important}
html[data-pirelli-theme="light"] body.customer-route main label,html[data-pirelli-theme="light"] body.customer-route main h1,html[data-pirelli-theme="light"] body.customer-route main h2{color:#1b1d23!important}
/* Never recolor branding bars when switching to light. */
html[data-pirelli-theme="light"] body.customer-route header .bg-zinc-950,html[data-pirelli-theme="light"] body.customer-route footer .bg-zinc-950{background:#09090b!important}
@media(max-width:700px){#pirelli-theme-switch{right:8px;top:8px}#pirelli-theme-toggle{width:29px;height:29px;min-width:29px}}

/* V21 admin light palette: scoped surfaces, readable text and controls. */
html[data-pirelli-theme="light"] body:not(.customer-route) {background:#f4f5f7!important;color:#17191e!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(.bg-zinc-950,.bg-zinc-950\/80,.bg-zinc-950\/60,.bg-zinc-950\/85,.bg-zinc-950\/40){background-color:#f4f5f7!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(.bg-zinc-900,.bg-zinc-900\/80,.bg-zinc-900\/90,.bg-zinc-900\/60,.bg-zinc-900\/50,.bg-zinc-900\/40,.bg-zinc-800,.bg-zinc-800\/80,.bg-zinc-800\/50,.bg-zinc-800\/40,.bg-zinc-700,.bg-zinc-700\/80){background-color:#fff!important;border-color:#dfe2e7!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(.text-zinc-100,.text-zinc-200,.text-zinc-300,.text-white,.text-zinc-950,.text-zinc-900){color:#1d222b!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(.text-zinc-400,.text-zinc-500,.text-zinc-600,.text-zinc-700,.text-neutral-400){color:#535d6b!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(.border-zinc-700,.border-zinc-800,.border-zinc-900){border-color:#e0e3e9!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(input,select,textarea){background:#fff!important;color:#1c2430!important;border-color:#cdd2db!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(input,textarea)::placeholder{color:#66717f!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(table,thead,tbody,tr,td,th){color:#1d2633}
html[data-pirelli-theme="light"] body:not(.customer-route) tbody tr{border-color:#e6e8ec!important}
html[data-pirelli-theme="light"] body:not(.customer-route) tbody tr:nth-child(even){background:#f8f9fb!important}
html[data-pirelli-theme="light"] body:not(.customer-route) :is(.bg-\[\#FFDE00\],.bg-yellow-400){background-color:#ffde00!important;color:#111!important}
/* Fixed dark brand header and footer in all themes. */
html[data-pirelli-theme="light"] body header,html[data-pirelli-theme="light"] body footer{background:#09090b!important;color:#f6f6f7!important}
html[data-pirelli-theme="light"] body header :is(.bg-zinc-950,.bg-zinc-900,.bg-zinc-800),html[data-pirelli-theme="light"] body footer :is(.bg-zinc-950,.bg-zinc-900,.bg-zinc-800){background:#09090b!important}
html[data-pirelli-theme="light"] body header :is(.text-zinc-100,.text-zinc-200,.text-zinc-300,.text-white,.text-zinc-950),html[data-pirelli-theme="light"] body footer :is(.text-zinc-100,.text-zinc-200,.text-zinc-300,.text-white,.text-zinc-950){color:#f6f6f7!important}
html[data-pirelli-theme="light"] body header :is(.text-zinc-400,.text-zinc-500,.text-zinc-600),html[data-pirelli-theme="light"] body footer :is(.text-zinc-400,.text-zinc-500,.text-zinc-600){color:#c1c5ce!important}
/* Customer form: preserve yellow CTA and white surfaces in light mode. */
html[data-pirelli-theme="light"] body.customer-route main :is(.bg-zinc-900,.bg-zinc-900\/80,.bg-zinc-900\/90,.bg-zinc-800,.bg-zinc-800\/80){background:#fff!important}
html[data-pirelli-theme="light"] body.customer-route main :is(.text-zinc-100,.text-zinc-200,.text-zinc-300,.text-zinc-950,.text-zinc-900){color:#1d222b!important}
html[data-pirelli-theme="light"] body.customer-route main :is(.text-zinc-400,.text-zinc-500,.text-zinc-600){color:#596371!important}
html[data-pirelli-theme="light"] body.customer-route main .bg-\[\#FFDE00\]{background:#ffde00!important;color:#111!important}

/* V21 final: consistent dark chrome in light mode, including React utility backgrounds. */
html[data-pirelli-theme="light"] body header,html[data-pirelli-theme="light"] body footer,
html[data-pirelli-theme="light"] body header[class],html[data-pirelli-theme="light"] body footer[class]{background-color:#09090b!important;color:#f5f5f5!important;border-color:#29292e!important}
html[data-pirelli-theme="light"] body header :is(.text-zinc-950,.text-zinc-900,.text-zinc-800,.text-zinc-700,.text-zinc-600,.text-zinc-500,.text-zinc-400,.text-zinc-300,.text-zinc-200,.text-zinc-100,.text-white),
html[data-pirelli-theme="light"] body footer :is(.text-zinc-950,.text-zinc-900,.text-zinc-800,.text-zinc-700,.text-zinc-600,.text-zinc-500,.text-zinc-400,.text-zinc-300,.text-zinc-200,.text-zinc-100,.text-white){color:#d7d9de!important}
html[data-pirelli-theme="light"] body header :is(.bg-zinc-950,.bg-zinc-900,.bg-zinc-800,.bg-zinc-700),
html[data-pirelli-theme="light"] body footer :is(.bg-zinc-950,.bg-zinc-900,.bg-zinc-800,.bg-zinc-700){background-color:#09090b!important}
/* Uniform yellow dashboard actions: target the six actions by their known labels, no changes to handlers. */
html[data-pirelli-theme="light"] body button[data-pirelli-action-yellow="true"]{background:#ffde00!important;color:#111!important;border:1px solid #ffde00!important;box-shadow:none!important;font-weight:600!important}
html[data-pirelli-theme="light"] body button[data-pirelli-action-yellow="true"]:disabled{opacity:.45!important;cursor:not-allowed!important}

/* V21 chrome correction: override the earlier broad light palette with greater specificity. */
html[data-pirelli-theme="light"] body header[class],
html[data-pirelli-theme="light"] body footer[class],
html[data-pirelli-theme="light"] body:not(.customer-route) header[class],
html[data-pirelli-theme="light"] body:not(.customer-route) footer[class],
html[data-pirelli-theme="light"] body.customer-route header[class],
html[data-pirelli-theme="light"] body.customer-route footer[class]{background:#09090b!important;color:#f5f5f5!important;border-color:#29292e!important}
html[data-pirelli-theme="light"] body :is(header,footer) :is(.text-zinc-100,.text-zinc-200,.text-zinc-300,.text-zinc-400,.text-zinc-500,.text-zinc-600,.text-zinc-700,.text-zinc-900,.text-zinc-950,.text-white){color:#d7d9de!important}
html[data-pirelli-theme="light"] body :is(header,footer) :is(.bg-zinc-950,.bg-zinc-950\/80,.bg-zinc-950\/85,.bg-zinc-900,.bg-zinc-800){background:#09090b!important}
/* Admin actions: use existing stable button IDs, no JavaScript handler changes. */
html[data-pirelli-theme="light"] body :is(#admin-import-csv-btn,#admin-add-code-btn,#admin-export-csv-btn,#admin-universal-sticker-btn){background:#ffde00!important;color:#111!important;border:1px solid #ffde00!important;box-shadow:none!important;font-weight:700!important}
html[data-pirelli-theme="light"] body :is(#admin-import-csv-btn,#admin-add-code-btn,#admin-export-csv-btn,#admin-universal-sticker-btn) :is(span,svg){color:#111!important}
html[data-pirelli-theme="light"] body :is(#admin-import-csv-btn,#admin-add-code-btn,#admin-export-csv-btn,#admin-universal-sticker-btn):disabled{opacity:.45!important;cursor:not-allowed!important}
