/* Shared theme control */
.theme-toggle{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;
  padding:8px 12px;border:1px solid #38697b;border-radius:999px;background:transparent;color:#c6dcdf;
  font:600 10px Montserrat,Arial,sans-serif;cursor:pointer;transition:background-color .2s,border-color .2s,color .2s,box-shadow .2s
}
.theme-toggle:hover{background:#0b3957;border-color:#4e8296}.theme-toggle:focus-visible{outline:3px solid rgba(8,175,170,.35);outline-offset:2px}
.theme-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-icon-moon{fill:currentColor;stroke:none}.theme-icon-sun{display:none}
html[data-theme="dark"] .theme-icon-moon{display:none}html[data-theme="dark"] .theme-icon-sun{display:block}
.login-brand-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.login-card .login-brand-row img{margin:0}.login-card .theme-toggle{width:auto;min-height:44px;padding:8px 11px}

/* Light mode is the public default; dark mode remains available. */
html[data-theme="light"]{color-scheme:light}
html[data-theme="light"]:root{
  --navy:#0b3652;--navy2:#ffffff;--panel:#ffffff;--teal:#078f8b;--text:#102f43;--muted:#526b79;--line:#d6e2e8;--danger:#b42318
}
html[data-theme="light"] body{
  background:radial-gradient(circle at 82% 7%,rgba(8,175,170,.12),transparent 28%),linear-gradient(180deg,#f6fbfc,#edf5f7);
  color:var(--text)
}
html[data-theme="light"] .network{opacity:.055}
html[data-theme="light"] .network span{background:#078f8b;box-shadow:0 0 14px rgba(8,175,170,.45)}
html[data-theme="light"] header{background:rgba(255,255,255,.92);border-bottom-color:#d6e2e8;box-shadow:0 8px 28px rgba(15,47,67,.06)}
html[data-theme="light"] .header-copy,html[data-theme="light"] .saved{color:#526b79}
html[data-theme="light"] .theme-toggle{background:#f5fafb;border-color:#c2d4dc;color:#163f58}
html[data-theme="light"] .theme-toggle:hover{background:#e8f5f5;border-color:#078f8b;color:#066e6b}
html[data-theme="light"] .hero>div>p:last-child,html[data-theme="light"] .head>span,html[data-theme="light"] .nfc-info>p:not(.eyebrow),html[data-theme="light"] .complete>span{color:#526b79}
html[data-theme="light"] .product-card{background:linear-gradient(135deg,#0d6677,#073653);border-color:#3b7b8d;box-shadow:0 24px 55px rgba(20,67,87,.2);color:#fff}
html[data-theme="light"] .steps{background:rgba(255,255,255,.94);border-color:#d6e2e8;box-shadow:0 10px 32px rgba(15,47,67,.06)}
html[data-theme="light"] .steps button{color:#526b79}html[data-theme="light"] .steps button b{border-color:#9fb6c1}
html[data-theme="light"] .steps button.active,html[data-theme="light"] .steps button.done{color:#12374e}
html[data-theme="light"] .steps>i{background:#cfdee4}
html[data-theme="light"] .panel,html[data-theme="light"] aside{background:rgba(255,255,255,.97);border-color:#d6e2e8;box-shadow:0 18px 48px rgba(15,47,67,.09)}
html[data-theme="light"] label>span{color:#294b5e}
html[data-theme="light"] input,html[data-theme="light"] textarea,html[data-theme="light"] select{background:#fbfdfe;border-color:#b9ccd5;color:#102f43}
html[data-theme="light"] input:focus,html[data-theme="light"] textarea:focus,html[data-theme="light"] select:focus{border-color:#078f8b;box-shadow:0 0 0 3px rgba(8,143,139,.16)}
html[data-theme="light"] ::placeholder{color:#708995}
html[data-theme="light"] .upload{background:#f2f8f9;border-color:#9fbec8}
html[data-theme="light"] .upload span{color:#526b79}
html[data-theme="light"] .feature{background:#f7fafb;border-color:#c7d8df}
html[data-theme="light"] .feature small{color:#526b79}
html[data-theme="light"] .feature i,html[data-theme="light"] .payment-method>i{border-color:#819ba7;background:#fff}
html[data-theme="light"] .feature:has(input:checked),html[data-theme="light"] .payment-method:has(input:checked){background:#e4f5f3;border-color:#078f8b}
html[data-theme="light"] .feature:has(input:checked) i,html[data-theme="light"] .payment-method:has(input:checked)>i{background:#078f8b;box-shadow:inset 0 0 0 4px #e4f5f3}
html[data-theme="light"] .quantity button{background:#fff;border-color:#9db3bd;color:#12374e}
html[data-theme="light"] .nfc-price{border-color:#d6e2e8}
html[data-theme="light"] .summary article{background:#f5f9fa;border-color:#d1e0e6}
html[data-theme="light"] .summary article span{color:#067f7b}
html[data-theme="light"] .summary article p,html[data-theme="light"] .summary article li{color:#526b79}
html[data-theme="light"] .consent{border-color:#d6e2e8}
html[data-theme="light"] .secondary{background:#fff;border-color:#8ca7b2;color:#163f58}
html[data-theme="light"] .aside-title,html[data-theme="light"] .aside-row{border-color:#d6e2e8}
html[data-theme="light"] .aside-title span,html[data-theme="light"] .aside-row span,html[data-theme="light"] .aside-total span{color:#526b79}
html[data-theme="light"] .aside-title b{background:#e3f4f2;color:#067a76}
html[data-theme="light"] .aside-total small{color:#526b79}

/* Purchase, payment, color-picker and NFC preview surfaces */
html[data-theme="light"] .purchase-status,html[data-theme="light"] .included-banner{background:#e6f6f4;border-color:#8ac9c4}
html[data-theme="light"] .purchase-status span,html[data-theme="light"] .purchase-status small,html[data-theme="light"] .included-banner span{color:#456672}
html[data-theme="light"] .purchase-status strong{color:#12374e}
html[data-theme="light"] .payment-config{background:#f2f8f9;border-color:#c3d8df}
html[data-theme="light"] .payment-head>span,html[data-theme="light"] .fee-note{color:#526b79}
html[data-theme="light"] .payment-method{background:#fff;border-color:#c7d8df}
html[data-theme="light"] .payment-method span,html[data-theme="light"] .payment-method small{color:#526b79}
html[data-theme="light"] .payment-method strong{color:#067c78}
html[data-theme="light"] .bank-fields,html[data-theme="light"] .fee-note{border-color:#d6e2e8}
html[data-theme="light"] .color-section{background:#f2f8f9;border-color:#c7d8df}
html[data-theme="light"] .color-section>div>span{color:#526b79}
html[data-theme="light"] .color-choice{background:#fff;border-color:#c0d2da}
html[data-theme="light"] .color-choice small,html[data-theme="light"] .nfc-stage>p{color:#526b79}
html[data-theme="light"] .color-choice:has(input:checked){background:#e4f5f3;border-color:#078f8b;box-shadow:0 0 0 2px rgba(8,143,139,.12)}

/* Admin and login */
html[data-theme="light"] .login-view{background:radial-gradient(circle at 70% 20%,rgba(8,175,170,.14),transparent 34%)}
html[data-theme="light"] .login-card{background:#fff;border-color:#d1e0e6;box-shadow:0 28px 70px rgba(15,47,67,.15)}
html[data-theme="light"] .login-card>p:not(.eyebrow){color:#526b79}
html[data-theme="light"] .logout{background:#fff;border-color:#a9bdc6;color:#294b5e}
html[data-theme="light"] .metric{background:#fff;border-color:#d1e0e6;box-shadow:0 12px 30px rgba(15,47,67,.07)}
html[data-theme="light"] .metric span,html[data-theme="light"] .metric small,html[data-theme="light"] .admin-hero>div>p:last-child{color:#526b79}
html[data-theme="light"] .metric strong{color:#078f8b}
html[data-theme="light"] .admin-tabs button{background:#fff;border-color:#c7d8df;color:#45616f}
html[data-theme="light"] .admin-tabs button.active{background:#078f8b;border-color:#078f8b;color:#fff}
html[data-theme="light"] .admin-panel,html[data-theme="light"] .add-panel{background:#fff;border-color:#d1e0e6;box-shadow:0 15px 40px rgba(15,47,67,.07)}
html[data-theme="light"] .admin-head,html[data-theme="light"] .catalog-row{border-color:#d8e4e9}
html[data-theme="light"] .admin-head p,html[data-theme="light"] .catalog-row .desc-edit,html[data-theme="light"] .empty{color:#526b79}
html[data-theme="light"] .catalog-row .name-edit,html[data-theme="light"] .catalog-row .desc-edit{background:transparent;color:#102f43}
html[data-theme="light"] .type-mark{background:#e5f4f3;color:#067a76;border-color:#b9d8d5}
html[data-theme="light"] .row-meta>span{color:#067a76}
html[data-theme="light"] .status{background:#e9f0f3;color:#45616f}
html[data-theme="light"] .status.active{background:#d9f2ec;color:#076a5d}
html[data-theme="light"] .remove{background:#feebe9;color:#a5261e}
html[data-theme="light"] .admin-note{background:#f1f7f8;border-color:#c8dce2}
html[data-theme="light"] .admin-note b{color:#067a76}html[data-theme="light"] .admin-note p{color:#526b79}

@media(max-width:720px){
  .theme-toggle span{display:none}
  html[data-theme="light"] .actions{background:rgba(246,251,252,.96);border-top:1px solid #d6e2e8}
}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}

/* Animated neural network background. The old CSS network remains as a no-JS fallback. */
.neural-network-canvas{
  position:fixed;inset:0;z-index:0;width:100vw;height:100vh;pointer-events:none;
  opacity:.92;transition:opacity .25s ease
}
body.neural-canvas-ready>.network{display:none}
body>.neural-network-canvas~header,
body>.neural-network-canvas~main,
body>.neural-network-canvas~#loginView,
body>.neural-network-canvas~#dashboard,
body>.neural-network-canvas~.toast{position:relative;z-index:1}
body>.neural-network-canvas~.toast{position:fixed;z-index:20}
html[data-theme="light"] .neural-network-canvas{opacity:1}
html[data-theme="dark"] .neural-network-canvas{opacity:.88}
@media(max-width:640px){.neural-network-canvas{opacity:.8}html[data-theme="light"] .neural-network-canvas{opacity:.88}}
@media(prefers-reduced-motion:reduce){.neural-network-canvas{transition:none}}
