/* ==========================================================================
   Antralux Cloud — Temi "Futuristic" (scuro) e "Light" (chiaro).
   Le regole Futuristic si attivano SOLO con html[data-theme="futuristic"],
   quelle Light SOLO con html[data-theme="light"].
   Con data-theme="classic" (o attributo assente) il portale resta identico
   al look Bootstrap originale.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --ax-cyan: #22d3ee;
    --ax-cyan-soft: rgba(34, 211, 238, 0.35);
    --ax-orange: #ff6a3c;
    --ax-violet: #8b5cf6;
    --ax-bg-0: #05070f;
    --ax-bg-1: #0a0f1f;
    --ax-bg-2: #101830;
    --ax-glass: rgba(16, 24, 48, 0.62);
    --ax-glass-strong: rgba(13, 20, 40, 0.86);
    --ax-border: rgba(34, 211, 238, 0.18);
    --ax-border-strong: rgba(34, 211, 238, 0.45);
    --ax-text: #dbe7ff;
    --ax-text-dim: #8fa3c8;
}

/* --------------------------------------------------------------------------
   Sfondo animato "deep space" + griglia olografica
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] body {
    background-color: var(--ax-bg-0) !important;
    color: var(--ax-text);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    letter-spacing: 0.015em;
    position: relative;
    min-height: 100vh;
}

html[data-theme="futuristic"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60vw 60vh at 12% -10%, rgba(139, 92, 246, 0.20), transparent 60%),
        radial-gradient(50vw 50vh at 88% 10%, rgba(34, 211, 238, 0.16), transparent 60%),
        radial-gradient(70vw 60vh at 50% 110%, rgba(232, 72, 32, 0.14), transparent 60%),
        linear-gradient(180deg, var(--ax-bg-0) 0%, var(--ax-bg-1) 55%, var(--ax-bg-0) 100%);
    animation: ax-aurora 18s ease-in-out infinite alternate;
}

html[data-theme="futuristic"] body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
}

@keyframes ax-aurora {
    0%   { filter: hue-rotate(0deg) saturate(1); }
    100% { filter: hue-rotate(28deg) saturate(1.25); }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="futuristic"] body::before { animation: none; }
    html[data-theme="futuristic"] * { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Tipografia
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] h1,
html[data-theme="futuristic"] h2,
html[data-theme="futuristic"] h3,
html[data-theme="futuristic"] h4,
html[data-theme="futuristic"] h5,
html[data-theme="futuristic"] h6,
html[data-theme="futuristic"] .card-header h5,
html[data-theme="futuristic"] .navbar-brand {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    letter-spacing: 0.06em;
}

html[data-theme="futuristic"] .text-muted,
html[data-theme="futuristic"] .form-text,
html[data-theme="futuristic"] small.text-muted {
    color: var(--ax-text-dim) !important;
}

html[data-theme="futuristic"] a { color: var(--ax-cyan); }
html[data-theme="futuristic"] a:hover { color: #7ce7f7; }

/* --------------------------------------------------------------------------
   Superfici chiare Bootstrap → scure
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .bg-light,
html[data-theme="futuristic"] body.bg-light {
    background-color: transparent !important;
    color: var(--ax-text);
}

html[data-theme="futuristic"] .bg-white {
    background-color: var(--ax-glass) !important;
    color: var(--ax-text);
}

html[data-theme="futuristic"] .text-dark { color: var(--ax-text) !important; }
html[data-theme="futuristic"] .border { border-color: var(--ax-border) !important; }

/* --------------------------------------------------------------------------
   Navbar — vetro con blur e linea neon
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .navbar.bg-dark {
    background: linear-gradient(180deg, rgba(8, 12, 26, 0.92), rgba(10, 16, 34, 0.78)) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ax-border);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.10), 0 8px 32px rgba(0, 0, 0, 0.45);
    position: sticky;
    top: 0;
    z-index: 1030;
}

html[data-theme="futuristic"] .navbar .btn-outline-light {
    border-color: rgba(219, 231, 255, 0.22);
    color: var(--ax-text);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.22s ease;
}

html[data-theme="futuristic"] .navbar .btn-outline-light:hover,
html[data-theme="futuristic"] .navbar .btn-outline-primary:hover {
    border-color: var(--ax-border-strong);
    background: rgba(34, 211, 238, 0.12);
    color: #ffffff;
    box-shadow: 0 0 14px var(--ax-cyan-soft);
    transform: translateY(-1px);
}

html[data-theme="futuristic"] .navbar-brand img {
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.55));
}

/* --------------------------------------------------------------------------
   Card — glassmorphism con bordo luminoso
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .card {
    background: var(--ax-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--ax-border);
    border-radius: 14px;
    color: var(--ax-text);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

html[data-theme="futuristic"] .card:hover {
    border-color: var(--ax-border-strong);
    box-shadow: 0 14px 48px rgba(0, 0, 0, 0.55), 0 0 22px rgba(34, 211, 238, 0.14);
    transform: translateY(-2px);
}

html[data-theme="futuristic"] .card-header {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.10), rgba(139, 92, 246, 0.08), transparent);
    border-bottom: 1px solid var(--ax-border);
    color: #eaf6ff;
    position: relative;
}

html[data-theme="futuristic"] .card-header::after {
    content: "";
    position: absolute;
    left: 0; bottom: -1px;
    width: 120px; height: 1px;
    background: linear-gradient(90deg, var(--ax-cyan), transparent);
    box-shadow: 0 0 12px var(--ax-cyan);
}

html[data-theme="futuristic"] .card-footer {
    background: rgba(8, 12, 26, 0.5);
    border-top: 1px solid var(--ax-border);
}

/* .bg-white/.bg-light di Bootstrap sono colori statici (a differenza delle varianti
   "-subtle", che seguono gia' data-bs-theme="dark" impostato da theme_head.php) e
   sono scritte con !important nel framework: restano sempre chiare (card-header
   "Periferiche Connesse", tabelle di fallback, sotto-pannelli storico) a meno di
   ricontrastarle qui allo stesso modo. */
html[data-theme="futuristic"] .bg-white:not(body),
html[data-theme="futuristic"] .bg-light:not(body) { background-color: var(--ax-glass) !important; }

/* --------------------------------------------------------------------------
   Bottoni — gradiente e glow
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.22s ease;
}

html[data-theme="futuristic"] .btn-primary {
    background: linear-gradient(135deg, #0ea5c9, #2563eb);
    border: 1px solid rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
}

html[data-theme="futuristic"] .btn-primary:hover {
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.5);
    transform: translateY(-1px);
}

html[data-theme="futuristic"] .btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

html[data-theme="futuristic"] .btn-danger {
    background: linear-gradient(135deg, #dc2626, #f43f5e);
    border-color: rgba(244, 63, 94, 0.6);
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.22);
}

html[data-theme="futuristic"] .btn-warning {
    background: linear-gradient(135deg, #d97706, var(--ax-orange));
    border-color: rgba(255, 106, 60, 0.6);
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 106, 60, 0.25);
}

html[data-theme="futuristic"] .btn-outline-secondary,
html[data-theme="futuristic"] .btn-outline-dark {
    color: var(--ax-text);
    border-color: rgba(143, 163, 200, 0.4);
}

html[data-theme="futuristic"] .btn-outline-secondary:hover,
html[data-theme="futuristic"] .btn-outline-dark:hover {
    background: rgba(143, 163, 200, 0.15);
    color: #fff;
    border-color: var(--ax-border-strong);
}

/* --------------------------------------------------------------------------
   Form — input scuri con focus neon
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .form-control,
html[data-theme="futuristic"] .form-select,
html[data-theme="futuristic"] textarea.form-control {
    background: rgba(8, 13, 28, 0.72);
    border: 1px solid rgba(143, 163, 200, 0.28);
    color: var(--ax-text);
    border-radius: 10px;
}

html[data-theme="futuristic"] .form-control:focus,
html[data-theme="futuristic"] .form-select:focus {
    background: rgba(8, 13, 28, 0.9);
    border-color: var(--ax-cyan);
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.18), 0 0 18px rgba(34, 211, 238, 0.18);
    color: #fff;
}

html[data-theme="futuristic"] .form-control::placeholder { color: rgba(143, 163, 200, 0.55); }
html[data-theme="futuristic"] .form-control[readonly] { background: rgba(20, 28, 52, 0.55); color: var(--ax-text-dim); }
/* Il popup nativo delle opzioni (aperto al click) e' un layer separato dal box chiuso:
   niente sfondo/trasparenza CSS (rgba/backdrop-filter) non e' rispettata li', serve un
   colore pieno esplicito sull'<option>, altrimenti resta bianco anche a tema scuro. */
html[data-theme="futuristic"] .form-select option,
html[data-theme="futuristic"] select option {
    background: var(--ax-bg-1);
    color: var(--ax-text);
}

html[data-theme="futuristic"] .input-group-text {
    background: rgba(20, 28, 52, 0.8);
    border-color: rgba(143, 163, 200, 0.28);
    color: var(--ax-text-dim);
}

html[data-theme="futuristic"] .form-check-input {
    background-color: rgba(8, 13, 28, 0.9);
    border-color: rgba(143, 163, 200, 0.5);
}

html[data-theme="futuristic"] .form-check-input:checked {
    background-color: var(--ax-cyan);
    border-color: var(--ax-cyan);
    box-shadow: 0 0 10px var(--ax-cyan-soft);
}

/* --------------------------------------------------------------------------
   Tabelle — righe traslucide, hover neon
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .table {
    color: var(--ax-text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--ax-text);
    --bs-table-border-color: rgba(143, 163, 200, 0.16);
    --bs-table-striped-bg: rgba(34, 211, 238, 0.035);
    --bs-table-striped-color: var(--ax-text);
    --bs-table-hover-bg: rgba(34, 211, 238, 0.08);
    --bs-table-hover-color: #ffffff;
}

html[data-theme="futuristic"] .table thead th,
html[data-theme="futuristic"] .table-light th,
html[data-theme="futuristic"] .table > thead {
    background: rgba(13, 20, 40, 0.92) !important;
    color: var(--ax-cyan) !important;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    border-bottom: 1px solid var(--ax-border-strong) !important;
}

html[data-theme="futuristic"] .table td,
html[data-theme="futuristic"] .table th {
    border-color: rgba(143, 163, 200, 0.14);
}

html[data-theme="futuristic"] .table-responsive { border-radius: 12px; }

/* --------------------------------------------------------------------------
   Badge / Alert / Modal / Dropdown
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .badge { letter-spacing: 0.05em; }

html[data-theme="futuristic"] .badge.bg-success { box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
html[data-theme="futuristic"] .badge.bg-danger { box-shadow: 0 0 12px rgba(244, 63, 94, 0.5); }
html[data-theme="futuristic"] .badge.bg-warning { box-shadow: 0 0 12px rgba(255, 106, 60, 0.45); }

html[data-theme="futuristic"] .alert {
    background: var(--ax-glass-strong);
    border: 1px solid var(--ax-border);
    color: var(--ax-text);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[data-theme="futuristic"] .alert-success { border-left: 3px solid #10b981; }
html[data-theme="futuristic"] .alert-danger { border-left: 3px solid #f43f5e; }
html[data-theme="futuristic"] .alert-warning { border-left: 3px solid var(--ax-orange); }
html[data-theme="futuristic"] .alert-info { border-left: 3px solid var(--ax-cyan); }

html[data-theme="futuristic"] .modal-content {
    background: var(--ax-glass-strong);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--ax-border-strong);
    border-radius: 16px;
    color: var(--ax-text);
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.12), 0 24px 80px rgba(0, 0, 0, 0.7);
}

html[data-theme="futuristic"] .modal-header,
html[data-theme="futuristic"] .modal-footer { border-color: var(--ax-border); }

html[data-theme="futuristic"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-theme="futuristic"] .dropdown-menu {
    background: var(--ax-glass-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ax-border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

html[data-theme="futuristic"] .dropdown-item { color: var(--ax-text); }
html[data-theme="futuristic"] .dropdown-item:hover {
    background: rgba(34, 211, 238, 0.12);
    color: #fff;
}
html[data-theme="futuristic"] .dropdown-item.active { background: rgba(34, 211, 238, 0.22); }
html[data-theme="futuristic"] .dropdown-divider { border-color: var(--ax-border); }

/* --------------------------------------------------------------------------
   List group / pagination / nav-tabs / accordion
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .list-group-item {
    background: rgba(13, 20, 40, 0.55);
    border-color: rgba(143, 163, 200, 0.16);
    color: var(--ax-text);
}

html[data-theme="futuristic"] .nav-tabs { border-color: var(--ax-border); }
html[data-theme="futuristic"] .nav-tabs .nav-link { color: var(--ax-text-dim); }
html[data-theme="futuristic"] .nav-tabs .nav-link.active {
    background: rgba(34, 211, 238, 0.10);
    border-color: var(--ax-border) var(--ax-border) transparent;
    color: var(--ax-cyan);
}

html[data-theme="futuristic"] .accordion-item {
    background: var(--ax-glass);
    border-color: var(--ax-border);
    color: var(--ax-text);
}
html[data-theme="futuristic"] .accordion-button {
    background: rgba(13, 20, 40, 0.7);
    color: var(--ax-text);
}
html[data-theme="futuristic"] .accordion-button:not(.collapsed) {
    background: rgba(34, 211, 238, 0.1);
    color: var(--ax-cyan);
}

html[data-theme="futuristic"] .progress {
    background: rgba(8, 13, 28, 0.8);
    border: 1px solid var(--ax-border);
}
html[data-theme="futuristic"] .progress-bar {
    background: linear-gradient(90deg, var(--ax-cyan), var(--ax-violet));
    box-shadow: 0 0 14px var(--ax-cyan-soft);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] footer.bg-dark {
    background: rgba(6, 9, 20, 0.85) !important;
    border-top: 1px solid var(--ax-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* --------------------------------------------------------------------------
   Scrollbar personalizzata
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="futuristic"] ::-webkit-scrollbar-track { background: var(--ax-bg-1); }
html[data-theme="futuristic"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.5), rgba(139, 92, 246, 0.5));
    border-radius: 6px;
    border: 2px solid var(--ax-bg-1);
}
html[data-theme="futuristic"] ::-webkit-scrollbar-thumb:hover { background: var(--ax-cyan); }

/* --------------------------------------------------------------------------
   Login card (login.php, verify_2fa.php, ecc.)
   -------------------------------------------------------------------------- */
html[data-theme="futuristic"] .login-card {
    background: var(--ax-glass-strong) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--ax-border-strong);
    border-radius: 18px !important;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.14), 0 30px 80px rgba(0, 0, 0, 0.7) !important;
    color: var(--ax-text);
    animation: ax-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ax-card-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

html[data-theme="futuristic"] .login-card .logo,
html[data-theme="futuristic"] img[alt="AntraluxCloud"] {
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45));
}

/* ==========================================================================
   Tema "Light" — variante chiara con la stessa identità grafica Antralux
   ========================================================================== */

:root {
    --axl-bg-0: #eef3f9;
    --axl-bg-1: #f7fafd;
    --axl-card: #ffffff;
    --axl-border: #dbe4f0;
    --axl-border-strong: rgba(8, 145, 178, 0.45);
    --axl-accent: #0e7490;
    --axl-accent-soft: rgba(8, 145, 178, 0.12);
    --axl-violet: #7c3aed;
    --axl-orange: #e84820;
    --axl-text: #22314a;
    --axl-text-dim: #64748b;
}

/* Sfondo chiaro con aurore tenui */
html[data-theme="light"] body {
    background-color: var(--axl-bg-0) !important;
    color: var(--axl-text);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    letter-spacing: 0.015em;
    position: relative;
    min-height: 100vh;
}

html[data-theme="light"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(55vw 45vh at 10% -10%, rgba(34, 211, 238, 0.14), transparent 60%),
        radial-gradient(45vw 40vh at 90% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
        radial-gradient(60vw 50vh at 50% 115%, rgba(232, 72, 32, 0.07), transparent 60%),
        linear-gradient(180deg, var(--axl-bg-1) 0%, var(--axl-bg-0) 60%, #e7edf6 100%);
}

/* Tipografia coerente col brand */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .card-header h5,
html[data-theme="light"] .navbar-brand {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    letter-spacing: 0.05em;
}

html[data-theme="light"] .text-muted,
html[data-theme="light"] .form-text,
html[data-theme="light"] small.text-muted {
    color: var(--axl-text-dim) !important;
}

html[data-theme="light"] a { color: var(--axl-accent); }
html[data-theme="light"] a:hover { color: #155e75; }

html[data-theme="light"] .bg-light,
html[data-theme="light"] body.bg-light {
    background-color: transparent !important;
    color: var(--axl-text);
}

html[data-theme="light"] .card .bg-light,
html[data-theme="light"] .card .card-body.bg-light {
    background-color: #f1f5fb !important;
}

/* Navbar: resta scura (il logo ha sfondo scuro) ma rifinita */
html[data-theme="light"] .navbar.bg-dark {
    background: linear-gradient(180deg, #131c2e, #1a2740) !important;
    border-bottom: 2px solid rgba(34, 211, 238, 0.35);
    box-shadow: 0 6px 22px rgba(30, 41, 59, 0.18);
    position: sticky;
    top: 0;
    z-index: 1030;
}

html[data-theme="light"] .navbar .btn-outline-light {
    border-color: rgba(219, 231, 255, 0.28);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.22s ease;
}

html[data-theme="light"] .navbar .btn-outline-light:hover,
html[data-theme="light"] .navbar .btn-outline-primary:hover {
    background: rgba(34, 211, 238, 0.16);
    border-color: rgba(34, 211, 238, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Card: bianche con bordo tenue e ombra morbida */
html[data-theme="light"] .card {
    background: var(--axl-card);
    border: 1px solid var(--axl-border);
    border-radius: 14px;
    color: var(--axl-text);
    box-shadow: 0 8px 28px rgba(30, 41, 59, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

html[data-theme="light"] .card:hover {
    border-color: var(--axl-border-strong);
    box-shadow: 0 12px 36px rgba(30, 41, 59, 0.12);
    transform: translateY(-2px);
}

html[data-theme="light"] .card-header {
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.08), rgba(124, 58, 237, 0.05), transparent);
    border-bottom: 1px solid var(--axl-border);
    color: #1c2b45;
    position: relative;
}

html[data-theme="light"] .card-header::after {
    content: "";
    position: absolute;
    left: 0; bottom: -1px;
    width: 120px; height: 2px;
    background: linear-gradient(90deg, var(--axl-accent), transparent);
}

html[data-theme="light"] .card-header.bg-primary,
html[data-theme="light"] .card-header.bg-dark {
    color: #ffffff;
}

html[data-theme="light"] .card-footer {
    background: #f6f9fd;
    border-top: 1px solid var(--axl-border);
}

/* Bottoni */
html[data-theme="light"] .btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.22s ease;
}

html[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #0891b2, #2563eb);
    border: 1px solid rgba(8, 145, 178, 0.55);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.25);
}

html[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #06a6cc, #3b82f6);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.35);
    transform: translateY(-1px);
}

html[data-theme="light"] .btn-warning {
    background: linear-gradient(135deg, #f59e0b, var(--axl-orange));
    border-color: rgba(232, 72, 32, 0.5);
    color: #fff;
}

/* Form: focus ciano coerente */
html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] textarea.form-control {
    border-color: #c9d6e8;
    border-radius: 10px;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.15);
}

html[data-theme="light"] .form-check-input:checked {
    background-color: #0891b2;
    border-color: #0891b2;
}

/* Tabelle */
html[data-theme="light"] .table {
    --bs-table-hover-bg: rgba(8, 145, 178, 0.06);
    --bs-table-striped-bg: rgba(8, 145, 178, 0.03);
}

html[data-theme="light"] .table thead th,
html[data-theme="light"] .table-light th,
html[data-theme="light"] .table > thead {
    background: #eef4fb !important;
    color: var(--axl-accent) !important;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    border-bottom: 1px solid var(--axl-border-strong) !important;
}

html[data-theme="light"] .table-responsive { border-radius: 12px; }

/* Alert / Modal / Dropdown */
html[data-theme="light"] .alert {
    border-radius: 12px;
    border: 1px solid var(--axl-border);
}

html[data-theme="light"] .alert-success { border-left: 3px solid #10b981; }
html[data-theme="light"] .alert-danger { border-left: 3px solid #f43f5e; }
html[data-theme="light"] .alert-warning { border-left: 3px solid var(--axl-orange); }
html[data-theme="light"] .alert-info { border-left: 3px solid #0891b2; }

html[data-theme="light"] .modal-content {
    border: 1px solid var(--axl-border);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(30, 41, 59, 0.25);
}

html[data-theme="light"] .dropdown-menu {
    border: 1px solid var(--axl-border);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(30, 41, 59, 0.14);
}

html[data-theme="light"] .dropdown-item:hover {
    background: var(--axl-accent-soft);
    color: var(--axl-accent);
}

html[data-theme="light"] .nav-tabs .nav-link.active {
    color: var(--axl-accent);
}

html[data-theme="light"] .progress-bar {
    background: linear-gradient(90deg, #0891b2, var(--axl-violet));
}

/* Footer: scuro rifinito */
html[data-theme="light"] footer.bg-dark {
    background: #131c2e !important;
    border-top: 2px solid rgba(34, 211, 238, 0.25);
}

/* Scrollbar chiara */
html[data-theme="light"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #e7edf6; }
html[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(8, 145, 178, 0.45), rgba(124, 58, 237, 0.35));
    border-radius: 6px;
    border: 2px solid #e7edf6;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #0891b2; }

/* Login card */
html[data-theme="light"] .login-card {
    background: #ffffff !important;
    border: 1px solid var(--axl-border);
    border-radius: 18px !important;
    box-shadow: 0 24px 70px rgba(30, 41, 59, 0.18) !important;
    animation: ax-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] .ax-theme-toggle {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(8, 145, 178, 0.45);
    color: var(--axl-accent);
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="light"] * { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Toggle tema (iniettato da antralux-theme.js)
   -------------------------------------------------------------------------- */
.ax-theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(120, 130, 160, 0.45);
    background: rgba(30, 36, 54, 0.92);
    color: #e8eefc;
    font: 600 13px/1 'Rajdhani', 'Segoe UI', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    user-select: none;
}

.ax-theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(34, 211, 238, 0.35);
    border-color: var(--ax-cyan);
}

.ax-theme-toggle svg { width: 15px; height: 15px; }

html[data-theme="futuristic"] .ax-theme-toggle {
    background: rgba(10, 16, 34, 0.9);
    border-color: var(--ax-border-strong);
    color: var(--ax-cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
}

@media print {
    .ax-theme-toggle { display: none !important; }
}

/* ==========================================================================
   Componenti "impianto" — schema fotorealistico CTA, hotspot periferiche,
   card impianto, pannello periferica. Layout sempre attivo (regole di
   seguito); i colori sono affinati sotto data-theme="futuristic"/"light" e
   restano neutri sotto "classic" (nessun override qui sotto), secondo la
   stessa convenzione del resto di questo file.
   ========================================================================== */

/* ---- schema fotorealistico ---- */
.ax-cta-stage { position: relative; width: 100%; aspect-ratio: 814 / 398; overflow: visible; }
.ax-cta-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.ax-cta-glow { opacity: .92; animation: ax-cta-breathe 3.2s ease-in-out infinite; }
.ax-cta-glow.off { opacity: 0; animation: none; }
.ax-cta-glow.tint-cyan { filter: hue-rotate(150deg) saturate(1.6) brightness(1.25); }
.ax-cta-fault { opacity: 0; }
.ax-cta-fault.show { opacity: 1; animation: ax-halo-pulse 1.3s ease-in-out infinite; }
@keyframes ax-cta-breathe { 0%, 100% { opacity: .68; } 50% { opacity: 1; } }
@keyframes ax-halo-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.ax-cta-flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---- hotspot periferica sullo schema ---- */
.ax-hotspot-wrap { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.ax-hotspot { position: relative; width: 30px; height: 30px; border-radius: 50%; border: none; padding: 0; background: transparent; cursor: pointer; color: #8a94a6; }
.ax-hotspot .ax-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed currentColor; opacity: .8; animation: ax-halo-pulse 2.4s ease-in-out infinite; }
.ax-hotspot .ax-core { position: absolute; inset: 9px; border-radius: 50%; background: currentColor; opacity: .9; }
.ax-hotspot.ok { color: #34d399; }
.ax-hotspot.warn { color: #fbbf24; }
.ax-hotspot.crit { color: #fb7185; }
.ax-hotspot-label {
    position: absolute; left: 50%; top: 38px; transform: translateX(-50%); opacity: 0; transition: opacity .15s;
    font-size: 11px; font-weight: 700; white-space: nowrap; padding: 3px 8px; border-radius: 6px;
    background: rgba(5, 7, 14, .82); color: #e8eefc; border: 1px solid rgba(120, 130, 160, .35); z-index: 3;
}
.ax-hotspot-wrap:hover .ax-hotspot-label, .ax-hotspot-wrap:focus-within .ax-hotspot-label { opacity: 1; }

/* ---- hotspot comandabile (Elettrostatico/UVC): stesso anello (stato comunicazione),
   ma il nucleo riflette lo stato ON/OFF reale del relay e il click lo comanda
   subito (vedi ecCtaHotspotToggle/ec-command-widget.js) ---- */
.ax-cmd-hotspot input.ec-cmd-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.ax-cmd-hotspot input.ec-cmd-input:disabled { cursor: not-allowed; }
.ax-cmd-hotspot .ax-core { background: #5b6478; opacity: .85; transition: background-color .15s, opacity .15s; }
.ax-cmd-hotspot.ax-tint-ele input.ec-cmd-input:checked ~ .ax-core { background: #fbbf24; opacity: 1; }
.ax-cmd-hotspot.ax-tint-uvc input.ec-cmd-input:checked ~ .ax-core { background: #a78bfa; opacity: 1; }
.ax-cmd-status-dot {
    position: absolute; left: 50%; top: -8px; transform: translate(-50%, -100%); white-space: nowrap; z-index: 4;
    font-size: 11px; pointer-events: none;
}
.ax-cmd-status-dot:empty { display: none; }

/* ---- segnalino di allarme sicurezza (safety_fault): lampeggiante, sovrapposto
   all'hotspot/badge della periferica in allarme — vedi ecCtaAlarmBadgeHtml() ---- */
.ax-alarm-badge {
    position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
    background: #ef4444; color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 10px; z-index: 6; box-shadow: 0 0 0 2px rgba(5, 7, 14, .78); pointer-events: none;
    animation: ax-alarm-blink 1s ease-in-out infinite;
}
.ax-hotspot-wrap .ax-alarm-badge { top: -2px; right: -2px; }
@keyframes ax-alarm-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.82); } }
.ax-pressure-badge {
    position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: rgba(5, 7, 14, .82); border: 1px solid rgba(120, 130, 160, .4); border-radius: 8px; padding: 4px 9px;
    cursor: pointer; z-index: 2; font-family: 'Rajdhani', sans-serif;
}
.ax-pressure-badge .ax-val { font-family: 'Courier New', monospace; font-size: 13px; color: #e8eefc; line-height: 1.1; }
.ax-pressure-badge .ax-lab { font-size: 9px; color: #9aa4b8; letter-spacing: .05em; }
.ax-pressure-badge.warn .ax-val { color: #fbbf24; }
.ax-pressure-badge.crit .ax-val { color: #fb7185; }

/* ---- schema + riquadri esterni: affiancati se c'e' spazio, altrimenti impilati
   e centrati rispetto al centro dell'immagine (mai il cassone a destra e le
   periferiche "fuori cassone" a sinistra) ---- */
.ax-cta-visual { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.ax-cta-visual .ax-cta-stage { width: auto; flex: 3 1 380px; max-width: 620px; }
.ax-cta-visual .ax-ext-badges { flex: 1 1 200px; max-width: 260px; margin-top: 0; }
.ax-schematic-hint { font-size: 12px; opacity: .6; margin-top: 10px; text-align: center; }

/* ---- riquadri esterni allo schema (periferiche "fuori dal cassone di
   filtrazione": Luce, Gas, Temp/Umidita — nessun overlay sul disegno) ----
   Stato a 3 livelli: grigio = spenta/valore normale, giallo = accesa, rosso = offline/errore. */
.ax-ext-badges { display: flex; flex-direction: column; flex-wrap: wrap; gap: 8px; margin-top: 10px; text-decoration: none; }
.ax-ext-badge {
    position: relative;
    display: flex; align-items: center; gap: 9px; border-radius: 14px; padding: 7px 13px 7px 7px;
    border: 1px solid rgba(120, 130, 160, .32); background: rgba(120, 130, 160, .10);
    cursor: pointer; text-decoration: none; color: inherit; min-width: 150px;
}
.ax-ext-badge img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.ax-ext-badge .ax-ext-text { display: flex; flex-direction: column; line-height: 1.25; }
.ax-ext-badge .ax-ext-label { font-size: 11px; font-weight: 700; opacity: .75; text-transform: uppercase; letter-spacing: .03em; }
.ax-ext-badge .ax-ext-val { font-family: 'Courier New', monospace; font-size: 15px; font-weight: 700; }
.ax-ext-badge.off .ax-ext-val { color: #6b7488; }
.ax-ext-badge.on { border-color: rgba(251, 191, 36, .55); background: rgba(251, 191, 36, .12); }
.ax-ext-badge.on .ax-ext-val { color: #b45309; }
.ax-ext-badge.crit { border-color: rgba(251, 113, 133, .55); background: rgba(251, 113, 133, .1); }
.ax-ext-badge.crit .ax-ext-val { color: #c53434; }

/* ---- chip periferica (elenco sotto lo schema) ---- */
.ax-device-chip-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.ax-device-chip {
    display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 5px 12px 5px 5px;
    border: 1px solid rgba(120, 130, 160, .3); background: rgba(120, 130, 160, .08); cursor: pointer;
}
.ax-device-chip .ax-thumb { width: 32px; height: 26px; object-fit: contain; border-radius: 5px; flex-shrink: 0; }
.ax-device-chip .ax-thumb.ax-iconbox { display: flex; align-items: center; justify-content: center; background: rgba(120, 130, 160, .12); }
.ax-device-chip .ax-name { font-size: 12.5px; font-weight: 600; }
.ax-device-chip .ax-dot2 { width: 7px; height: 7px; border-radius: 50%; margin-left: 1px; }
.ax-device-chip.ok .ax-dot2 { background: #34d399; }
.ax-device-chip.warn .ax-dot2 { background: #fbbf24; }
.ax-device-chip.crit .ax-dot2 { background: #fb7185; }

/* ---- griglia card impianto ---- */
.ax-plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ax-plant-card {
    text-align: left; border-radius: 16px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; width: 100%;
    border: 1px solid rgba(120, 130, 160, .3); background: rgba(120, 130, 160, .06);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.ax-plant-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.ax-plant-card.warn { border-color: #fbbf24; }
.ax-plant-card.crit { border-color: #fb7185; }
.ax-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ax-card-head h3 { font-size: 16.5px; font-weight: 700; margin: 0; }
.ax-card-head .ax-site { font-size: 12.5px; margin-top: 3px; opacity: .7; }
.ax-card-schematic { border-radius: 10px; background: rgba(0, 0, 0, .12); border: 1px solid rgba(120, 130, 160, .18); padding: 6px 4px; overflow: hidden; }
.ax-metric-row { display: flex; gap: 16px; font-size: 12.5px; opacity: .8; }
.ax-metric-row b { font-family: 'Courier New', monospace; font-weight: 600; }
.ax-dot-row { display: flex; gap: 7px; align-items: center; }
.ax-pdot {
    width: 22px; height: 22px; border-radius: 7px; font-size: 10px; font-weight: 700; font-family: 'Courier New', monospace;
    display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; flex-shrink: 0; cursor: pointer;
}
.ax-pdot.ok { background: rgba(52, 211, 153, .16); color: #0f9d68; }
.ax-pdot.warn { background: rgba(251, 191, 36, .18); color: #92660a; }
.ax-pdot.crit { background: rgba(251, 113, 133, .18); color: #c53434; }
.ax-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; opacity: .75; }
.ax-card-foot .ax-go { font-weight: 700; display: inline-flex; align-items: center; gap: 5px; color: var(--ax-cyan, #0e7490); }

/* ---- pillole di stato ---- */
.ax-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; flex-shrink: 0; white-space: nowrap; }
.ax-pill .ax-dot { width: 7px; height: 7px; border-radius: 50%; }
.ax-pill.ok { background: rgba(52, 211, 153, .16); color: #0f9d68; } .ax-pill.ok .ax-dot { background: #0f9d68; }
.ax-pill.warn { background: rgba(251, 191, 36, .18); color: #92660a; } .ax-pill.warn .ax-dot { background: #d97706; animation: ax-halo-pulse 1.6s ease-in-out infinite; }
.ax-pill.crit { background: rgba(251, 113, 133, .18); color: #c53434; } .ax-pill.crit .ax-dot { background: #c53434; animation: ax-halo-pulse 1.1s ease-in-out infinite; }

/* ---- pannello laterale periferica ---- */
.ax-drawer-backdrop { position: fixed; inset: 0; background: rgba(4, 6, 14, .55); backdrop-filter: blur(2px); z-index: 1049; }
.ax-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw; z-index: 1050;
    backdrop-filter: blur(16px); padding: 22px 22px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px;
    border-left: 1px solid rgba(120, 130, 160, .35);
}
@media (max-width: 640px) {
    .ax-drawer { top: auto; left: 0; right: 0; width: auto; max-width: none; height: auto; max-height: 82vh; border-left: none; border-top: 1px solid rgba(120, 130, 160, .35); border-radius: 18px 18px 0 0; }
}
.ax-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ax-drawer-head .ax-titles { display: flex; align-items: center; gap: 12px; }
.ax-drawer-head .ax-thumb { width: 46px; height: 36px; object-fit: contain; border-radius: 7px; flex-shrink: 0; }
.ax-drawer-head .ax-thumb.ax-iconbox { display: flex; align-items: center; justify-content: center; background: rgba(34, 211, 238, .12); color: #0e7490; }
.ax-drawer-head h3 { font-size: 18px; margin: 0; }
.ax-drawer-head .ax-kind { font-size: 12.5px; opacity: .7; margin-top: 4px; }
.ax-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ax-kv { border-radius: 11px; padding: 11px 13px; border: 1px solid rgba(120, 130, 160, .3); background: rgba(120, 130, 160, .06); }
.ax-kv .ax-k { font-size: 11px; opacity: .65; text-transform: uppercase; letter-spacing: .05em; }
.ax-kv .ax-v { font-family: 'Courier New', monospace; font-size: 15px; margin-top: 4px; }
.ax-spark-box { border-radius: 12px; padding: 14px 14px 10px; border: 1px solid rgba(120, 130, 160, .3); background: rgba(120, 130, 160, .06); }
.ax-spark-box .ax-label { font-size: 12px; opacity: .65; text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; }
.ax-spark-box svg { width: 100%; height: auto; margin-top: 8px; display: block; }
.ax-alert-banner { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.ax-alert-banner.warn { background: rgba(251, 191, 36, .16); color: #92660a; border: 1px solid #d97706; }
.ax-alert-banner.crit { background: rgba(251, 113, 133, .16); color: #c53434; border: 1px solid #c53434; }
.ax-switch { width: 46px; height: 26px; border-radius: 999px; background: rgba(120, 130, 160, .28); border: 1px solid rgba(120, 130, 160, .4); position: relative; flex-shrink: 0; padding: 0; cursor: pointer; }
.ax-switch .ax-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #8a94a6; transition: all .18s; }
.ax-switch.on { background: rgba(52, 211, 153, .3); border-color: #0f9d68; }
.ax-switch.on .ax-knob { left: 22px; background: #0f9d68; }
.ax-bar-track { height: 8px; border-radius: 999px; background: rgba(120, 130, 160, .2); overflow: hidden; margin-top: 8px; }
.ax-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ax-cyan, #0e7490), var(--ax-violet, #7c3aed)); }
.ax-bar-fill.warn { background: linear-gradient(90deg, #fbbf24, #fb7185); }

/* ---- ribbon demo (welcome.php) ---- */
.ax-demo-ribbon {
    display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .03em;
    border-radius: 999px; padding: 5px 12px; white-space: nowrap;
    color: var(--ax-orange, #ff6a3c); background: rgba(255, 106, 60, .12); border: 1px solid rgba(255, 106, 60, .32);
}
.ax-demo-ribbon .ax-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: ax-blink 1.8s ease-in-out infinite; }
@keyframes ax-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---- themed refinements: futuristic ---- */
html[data-theme="futuristic"] .ax-device-chip,
html[data-theme="futuristic"] .ax-plant-card,
html[data-theme="futuristic"] .ax-kv,
html[data-theme="futuristic"] .ax-spark-box,
html[data-theme="futuristic"] .slave-details {
    /* .slave-details (pannello dettaglio impianto in dashboard): sfondo chiaro fisso
       ereditato dal Bootstrap originale (mai adattato ai temi) sostituito qui. */
    background: var(--ax-glass); border-color: var(--ax-border); color: var(--ax-text);
}
html[data-theme="futuristic"] .ax-device-chip:hover,
html[data-theme="futuristic"] .ax-plant-card:hover { border-color: var(--ax-border-strong); }
html[data-theme="futuristic"] .ax-drawer { background: var(--ax-glass-strong); border-color: var(--ax-border-strong); color: var(--ax-text); }
html[data-theme="futuristic"] .ax-card-head .ax-site,
html[data-theme="futuristic"] .ax-metric-row,
html[data-theme="futuristic"] .ax-card-foot,
html[data-theme="futuristic"] .ax-kv .ax-k,
html[data-theme="futuristic"] .ax-spark-box .ax-label,
html[data-theme="futuristic"] .ax-drawer-head .ax-kind { color: var(--ax-text-dim); }
html[data-theme="futuristic"] .ax-hotspot { color: #536080; }

/* ---- themed refinements: light ---- */
html[data-theme="light"] .ax-device-chip,
html[data-theme="light"] .ax-plant-card,
html[data-theme="light"] .ax-kv,
html[data-theme="light"] .ax-spark-box,
html[data-theme="light"] .slave-details {
    background: var(--axl-card); border-color: var(--axl-border); color: var(--axl-text);
    box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
}
html[data-theme="light"] .ax-device-chip:hover,
html[data-theme="light"] .ax-plant-card:hover { border-color: var(--axl-border-strong); }
html[data-theme="light"] .ax-drawer { background: rgba(255, 255, 255, .97); border-color: var(--axl-border-strong); color: var(--axl-text); }
html[data-theme="light"] .ax-card-head .ax-site,
html[data-theme="light"] .ax-metric-row,
html[data-theme="light"] .ax-card-foot,
html[data-theme="light"] .ax-kv .ax-k,
html[data-theme="light"] .ax-spark-box .ax-label,
html[data-theme="light"] .ax-drawer-head .ax-kind { color: var(--axl-text-dim); }
html[data-theme="light"] .ax-hotspot { color: #9aa7bd; }
html[data-theme="light"] .ax-card-foot .ax-go { color: var(--axl-accent); }
html[data-theme="light"] .ax-bar-fill { background: linear-gradient(90deg, var(--axl-accent), var(--axl-violet)); }

/* ---- scorciatoia hotspot -> card periferica (index.php) ---- */
.ax-peripheral-card { scroll-margin-top: 90px; transition: box-shadow .3s, border-color .3s; }
.ax-peripheral-card.ax-flash { box-shadow: 0 0 0 3px var(--ax-cyan, #22d3ee); border-color: var(--ax-cyan, #22d3ee) !important; }
.ax-peripheral-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
    .ax-cta-glow, .ax-cta-fault, .ax-hotspot .ax-ring, .ax-pill .ax-dot, .ax-demo-ribbon .ax-dot { animation: none !important; }
    .ax-peripheral-card { transition: none; }
}
