        /* ===== DYRECT Design System · Monochrome (v2.0) ===== */
        /* Inspired by DYRECT logo: bold geometric type, oval frame, pure black/white, directional energy */
        @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@700;800;900&display=swap');

        :root {
            --bg: #E4E2DC;
            --bg-elevated: #F3F1EB;
            --surface: #F7F5F0;
            --surface-2: #EDEBE4;
            --surface-3: #E2E0D8;
            --border: #D4D1C8;
            --border-strong: #B8B5AA;
            --text: #121212;
            --muted: #5C5A54;
            --primary: #121212;
            --primary-inv: #121212;
            --accent: #2A2A28;
            --accent-soft: #EAE7DF;
            --success: #0F7A3F;
            --success-bg: #E8F6EE;
            --danger: #C62828;
            --danger-bg: #FCEAEA;
            --warning: #B86E00;
            --warning-bg: #FFF4E0;
            --info-bg: #EEF2F6;
            --radius: 16px;
            --radius-sm: 12px;
            --radius-btn: 9999px;
            --shadow-soft: 0 4px 20px rgba(18, 18, 18, 0.06);
            --shadow-card: 0 1px 2px rgba(18,18,18,0.04), 0 8px 24px rgba(18,18,18,0.06);
        }

        body {
            font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
            background:
                radial-gradient(1200px 600px at 10% -10%, #F5F3ED 0%, transparent 55%),
                radial-gradient(900px 500px at 100% 0%, #E0DDD4 0%, transparent 50%),
                linear-gradient(180deg, #E8E6E0 0%, #E2E0D9 40%, #E4E2DC 100%) !important;
            background-attachment: fixed !important;
            color: var(--text);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Header glass — warm white + blur */
        .bg-glass {
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(18px) saturate(1.2);
            -webkit-backdrop-filter: blur(18px) saturate(1.2);
            border: 1px solid rgba(226, 226, 220, 0.9);
            box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 4px 20px rgba(18,18,18,0.04);
        }

        /* ===== DYRECT-style logo (oval + bold geometric) ===== */
        .logo-en-container {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
            font-weight: 900;
            font-size: 1.15rem;
            letter-spacing: -0.04em;
            line-height: 1;
            position: relative;
        }
        .logo-e {
            color: #FFFFFF;
        }
        .logo-n {
            color: #FFFFFF;
            margin-left: 1px;
        }
        /* Oval frame around logo mark — direct recall of DYRECT oval */
        .logo-oval {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.75rem;
            height: 2.75rem;
            border: 2px solid #FFFFFF;
            border-radius: 50%;
            position: relative;
            background: #0A0A0A;
            transition: border-color 0.2s, transform 0.2s;
        }
        .logo-oval::after {
            /* subtle directional arrow tip at top-right of the oval */
            content: '';
            position: absolute;
            top: -3px;
            right: -1px;
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-bottom: 7px solid #FFFFFF;
            transform: rotate(45deg);
        }
        .group:hover .logo-oval {
            border-color: #FFFFFF;
            transform: scale(1.04);
        }

        body.desktop-mode {
            min-width: 1200px !important;
            overflow-x: auto !important;
        }
        body.desktop-mode .max-w-7xl {
            max-width: 1200px !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }

        /* Allinea max-w-7xl al container 1200px del Design System */
        .max-w-7xl {
            max-width: 1200px !important;
        }

        /* Card / superfici admin */
        #admin-section .admin-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 1.25rem;
            box-shadow: var(--shadow-soft);
        }
        @media (min-width: 640px) {
            #admin-section .admin-card { padding: 1.5rem; }
        }
        #admin-section table thead th {
            position: sticky;
            top: 0;
            z-index: 5;
            background: var(--surface-2);
        }
        #admin-section .overflow-x-auto {
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
        }
        #admin-section input, #admin-section select, #admin-section textarea {
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
            background-color: var(--surface-2);
            border-color: var(--border);
            color: var(--text);
            min-height: 44px;
        }
        #admin-section input:focus, #admin-section select:focus, #admin-section textarea:focus {
            border-color: #0A0A0A;
            outline: 2px solid rgba(10, 10, 10, 0.2);
            outline-offset: 0;
        }
        #admin-section label {
            letter-spacing: 0.01em;
            color: var(--muted);
        }

        @media (max-width: 767px) {
            header .logo-en-container { font-size: 1.15rem !important; }
            #public-section section { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
            #events-grid { gap: 1rem !important; }
            #public-team-grid { gap: 1rem !important; }
            .max-w-7xl { padding-left: 1rem !important; padding-right: 1rem !important; }
            #admin-section { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
            #admin-section table { font-size: 11px; }
            #admin-section input, #admin-section select, #admin-section textarea, #admin-section button {
                min-height: 44px;
            }
            #nav-dropdown { max-height: 70vh; overflow-y: auto; }
        }
        @media (hover: none) {
            a, button { -webkit-tap-highlight-color: transparent; }
        }

        /* Toolbar formattazione stile Docs */
        .rt-toolbar {
            display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
            background: var(--surface-2); border: 1px solid var(--border); border-bottom: none;
            border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 6px 8px;
        }
        .rt-toolbar button {
            background: var(--border); color: #e4e4e7; border: none; border-radius: 6px;
            width: 32px; height: 32px; font-size: 13px; cursor: pointer;
            display: inline-flex; align-items: center; justify-content: center;
        }
        .rt-toolbar button:hover { background: #0A0A0A; color: #FFFFFF; }
        .rt-toolbar select {
            background: var(--border); color: #e4e4e7; border: none; border-radius: 6px;
            height: 32px; font-size: 11px; padding: 0 6px;
        }
        .rt-editor {
            min-height: 100px; background: var(--surface); border: 1px solid var(--border);
            border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 12px; color: var(--text);
            font-size: 13px; line-height: 1.6; outline: none; overflow-y: auto;
        }
        .rt-editor:focus { border-color: #0A0A0A; }
        .rt-editor b, .rt-editor strong { font-weight: 800; color: #fff; }
        .rt-editor i, .rt-editor em { font-style: italic; }
        .rt-editor u { text-decoration: underline; }
        .rt-editor ul { list-style: disc; padding-left: 1.25rem; }
        .rt-editor ol { list-style: decimal; padding-left: 1.25rem; }
        .story-html h1, .story-html h2, .story-html h3 { color: #fff; font-weight: 800; margin: 0.5em 0 0.25em; }
        .story-html h1 { font-size: 1.5rem; }
        .story-html h2 { font-size: 1.25rem; }
        .story-html h3 { font-size: 1.1rem; }
        .story-html p { margin-bottom: 0.75em; }
        .story-html ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.75em; }
        .story-html ol { list-style: decimal; padding-left: 1.25rem; margin-bottom: 0.75em; }
        .story-html b, .story-html strong { color: #fff; font-weight: 800; }

        /* Scanner QR mobile — NON usare object-fit:cover (sballa decodifica vs preview) */
        #qr-reader {
            width: 100% !important;
            max-width: 420px;
            margin: 0 auto;
            min-height: 280px;
            position: relative;
            background: #000;
            border-radius: var(--radius-sm);
            overflow: hidden;
        }
        #qr-reader video {
            width: 100% !important;
            height: auto !important;
            min-height: 280px;
            max-height: 70vh;
            border-radius: var(--radius-sm);
            object-fit: contain !important; /* critico: cover taglia e il decoder non vede il QR centrato */
            background: #000;
            display: block !important;
        }
        #qr-reader canvas {
            display: none !important; /* canvas interno di decode, non UI */
        }
        /* Non nascondere img generici della libreria se usati per overlay */
        #qr-reader__dashboard_section,
        #qr-reader__dashboard_section_csr,
        #qr-reader__dashboard_section_swaplink {
            display: none !important;
        }
        #qr-reader__scan_region {
            min-height: 280px !important;
            background: #000 !important;
        }
        #qr-reader__scan_region > img {
            /* la libreria a volte mette uno snapshot: lascialo se serve, ma preferisci video */
            max-width: 100%;
        }
        #qr-reader__camera_selection {
            width: 100%;
            margin: 8px 0;
            background: var(--surface);
            color: #fff;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            padding: 6px;
            font-size: 12px;
        }
        body.admin-lock-scanner #tab-events,
        body.admin-lock-scanner #tab-prs,
        body.admin-lock-scanner #tab-accounting,
        body.admin-lock-scanner #tab-news,
        body.admin-lock-scanner #tab-about,
        body.admin-lock-scanner #tab-passlayout,
        body.admin-lock-scanner #btn-admin-public-site,
        body.admin-lock-scanner #btn-lock-scanner-mode { display: none !important; }
        body.admin-lock-scanner #admin-tabs-bar { justify-content: center; }
        .object-cover-force { object-fit: cover; object-position: center; width: 100%; height: 100%; }
        #qrcode-container {
            width: 112px; height: 112px; overflow: hidden;
            display: flex; align-items: center; justify-content: center;
        }
        #qrcode-container img, #qrcode-container canvas {
            width: 112px !important; height: 112px !important;
            display: block !important; margin: 0 auto;
            max-width: 112px; max-height: 112px;
        }
        #qrcode-container table { display: none !important; }
        #pass-modal {
            -webkit-overflow-scrolling: touch;
            overflow-x: hidden !important;
            overflow-y: auto !important;
            align-items: flex-start;
            padding: 0.5rem !important;
        }
        #pass-modal > div {
            max-width: min(100%, 22rem);
            width: 100%;
            overflow-x: hidden;
            max-height: calc(100vh - 1rem);
            max-height: calc(100dvh - 1rem);
            margin: auto;
        }
        #public-booking-modal {
            -webkit-overflow-scrolling: touch;
            align-items: flex-start;
            padding: 0.5rem !important;
        }
        #public-booking-modal > div {
            max-width: min(100%, 32rem);
            width: 100%;
            max-height: calc(100vh - 1rem);
            max-height: calc(100dvh - 1rem);
            overflow-y: auto;
            overflow-x: hidden;
            margin: auto;
            padding: 1rem !important;
        }
        @media (max-width: 480px) {
            #pass-modal > div {
                max-width: 100%;
                border-radius: var(--radius);
                padding: 0.75rem !important;
                padding-top: 2.5rem !important;
            }
            #printable-pass-card {
                font-size: 11px;
            }
            #public-booking-modal > div {
                padding: 0.85rem !important;
                border-radius: var(--radius);
            }
            #public-booking-form input,
            #public-booking-form select {
                font-size: 16px !important; /* evita zoom iOS */
            }
        }
        body.modal-open { overflow: hidden !important; }
        .modal-shell {
            overflow-x: hidden;
            max-width: 100vw;
        }

        /* ===== Hero sobrio (Design System: nessun gradiente forte, nessuna animazione invasiva) ===== */
        .hero-stage {
            position: relative;
            isolation: isolate;
            background: var(--bg);
            overflow: hidden;
        }
        .hero-stage::before {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 0;
            background:
                radial-gradient(900px 480px at 15% 0%, rgba(0, 0, 0, 0.04), transparent 60%),
                radial-gradient(700px 400px at 90% 20%, rgba(0, 0, 0, 0.02), transparent 55%);
            pointer-events: none;
        }
        .hero-stage::after {
            content: none;
        }
        .hero-orb {
            display: none;
        }
        .hero-stage > .max-w-7xl {
            position: relative;
            z-index: 2;
        }
        @media (prefers-reduced-motion: reduce) {
            .hero-stage::after, .hero-orb { animation: none !important; }
            * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
        }

        /* ===== Design System: bottoni, focus, card, form ===== */
        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        /* CTA primario — nero su bianco (logo DYRECT) */
        .bg-brand-red {
            background-color: #0A0A0A !important;
            color: #FFFFFF !important;
            border: 1.5px solid #0A0A0A !important;
        }
        .hover\:bg-brand-darkRed:hover {
            background-color: #FFFFFF !important;
            color: #0A0A0A !important;
            border-color: #0A0A0A !important;
        }
        .text-brand-red {
            color: #0A0A0A !important;
        }
        .border-brand-red {
            border-color: #0A0A0A !important;
        }
        a.text-brand-red, span.text-brand-red, i.text-brand-red {
            color: #0A0A0A !important;
        }

        /* Tinte brand → nero leggero */
        .bg-brand-red\/5, .bg-brand-red\/10, .bg-brand-red\/15, .bg-brand-red\/20 {
            background-color: rgba(10, 10, 10, 0.06) !important;
        }
        .bg-brand-red\/30, .bg-brand-red\/40 {
            background-color: rgba(10, 10, 10, 0.10) !important;
        }
        .border-brand-red\/20, .border-brand-red\/30, .border-brand-red\/40, .border-brand-red\/50 {
            border-color: rgba(10, 10, 10, 0.25) !important;
        }
        .shadow-brand-red\/20, .shadow-brand-red\/30 {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
        }
        .text-brand-red\/80, .text-brand-red\/90 {
            color: rgba(10, 10, 10, 0.8) !important;
        }
        #admin-section input:focus, #admin-section select:focus, #admin-section textarea:focus,
        #public-section input:focus, #public-section select:focus, #public-section textarea:focus {
            border-color: #0A0A0A !important;
            outline: 2px solid rgba(10, 10, 10, 0.2) !important;
            outline-offset: 0;
        }
        button:focus-visible, a:focus-visible {
            outline: 2px solid #0A0A0A !important;
            outline-offset: 2px;
        }

        /* Superfici card pubbliche → light */
        #public-section .bg-zinc-900 {
            background-color: var(--surface) !important;
        }
        #public-section .bg-zinc-950\/50,
        #public-section .bg-zinc-950 {
            background-color: #FAFAFA !important;
        }
        #public-section .border-zinc-800 {
            border-color: var(--border) !important;
        }
        #public-section .text-zinc-400,
        #public-section .text-zinc-500 {
            color: var(--muted) !important;
        }
        #public-section .bg-zinc-800 {
            background-color: var(--surface-2) !important;
        }
        #public-section .border-zinc-700 {
            border-color: var(--border) !important;
        }

        /* Input pubblici */
        #public-section input,
        #public-section select,
        #public-section textarea {
            background-color: var(--surface-2);
            border-color: var(--border);
            color: var(--text);
            min-height: 44px;
            border-radius: var(--radius-btn);
        }
        #public-section input::placeholder,
        #public-section textarea::placeholder {
            color: var(--muted);
        }
        #public-section input:focus,
        #public-section select:focus,
        #public-section textarea:focus {
            border-color: var(--primary);
            outline: 2px solid rgba(255, 255, 255, 0.25);
            outline-offset: 0;
        }

        /* Bottoni primari: full pill (oval) + crisp monochrome shadow */
        #public-section a.bg-brand-red,
        #public-section button.bg-brand-red,
        #sponsor-submit-btn,
        #organizer-submit-btn {
            border-radius: var(--radius-btn) !important;
            min-height: 48px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            letter-spacing: 0.02em;
            font-weight: 800;
        }
        #public-section a.bg-brand-red:hover,
        #public-section button.bg-brand-red:hover {
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        /* Card: ombra soft neutra + geometric radius */
        #public-section .rounded-3xl,
        #public-section .rounded-2xl {
            box-shadow: var(--shadow-soft);
            border-radius: 20px !important;
        }
        /* Force primary CTAs to full oval/pill (DYRECT) */
        .bg-brand-red, .hover\:bg-brand-darkRed {
            border-radius: 9999px !important;
        }
        #public-section .rounded-xl {
            border-radius: 14px !important;
        }

        /* Badge Live / stati */
        .animate-pulse {
            animation: ds-pulse 2.4s ease-in-out infinite;
        }
        @keyframes ds-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.65; }
        }
        @media (prefers-reduced-motion: reduce) {
            .animate-pulse { animation: none !important; }
        }

        /* Tipografia sezioni */
        #public-section h1 {
            font-weight: 800;
            letter-spacing: -0.02em;
            line-height: 1.1;
        }
        #public-section h2 {
            font-weight: 800;
            letter-spacing: -0.015em;
            line-height: 1.2;
        }
        #public-section h3 {
            font-weight: 700;
            line-height: 1.3;
        }

        ::selection {
            background: #0A0A0A;
            color: #FFFFFF;
        }

        button:disabled,
        a[aria-disabled="true"] {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Admin: light surfaces */
        #admin-section .bg-zinc-900,
        #admin-section .bg-zinc-900\/95 {
            background-color: var(--surface) !important;
        }
        #admin-section .border-zinc-800 {
            border-color: var(--border) !important;
        }
        #admin-section .bg-zinc-800 {
            background-color: var(--surface-2) !important;
        }
        #admin-section .border-zinc-700 {
            border-color: var(--border) !important;
        }
        #admin-section .text-zinc-400,
        #admin-section .text-zinc-500 {
            color: var(--muted) !important;
        }

        /* Header sticky border */
        header.bg-glass {
            border-bottom-color: var(--border);
        }

        /* Modal overlay consistency */
        [id$="-modal"]:not(.hidden) {
            background-color: rgba(0, 0, 0, 0.75);
        }

        /* ===== LIGHT THEME — warm hierarchy (DYRECT) ===== */
        body {
            color: var(--text) !important;
        }
        #public-section, #admin-section {
            background-color: transparent !important;
            color: var(--text) !important;
        }

        /* Alternating section bands */
        #tornei, #chi-siamo, #contatti {
            background: linear-gradient(180deg, #DEDCD5 0%, #E4E2DC 100%) !important;
            border-color: var(--border) !important;
        }
        #feste, #sponsor, #organizzatore {
            background: transparent !important;
        }
        section.border-t {
            border-color: var(--border) !important;
        }

        /* Cards */
        #public-section .bg-zinc-900,
        #public-section .bg-zinc-900\/90,
        #public-section .bg-zinc-900\/95,
        #admin-section .bg-zinc-900,
        #admin-section .bg-zinc-900\/95,
        #admin-section .admin-card {
            background: linear-gradient(180deg, #FFFFFF 0%, #FCFCFB 100%) !important;
            border: 1px solid var(--border) !important;
            box-shadow: var(--shadow-card) !important;
        }
        #public-section .rounded-3xl,
        #public-section .rounded-2xl {
            border: 1px solid var(--border) !important;
        }

        /* Nested surfaces */
        .bg-zinc-950, .bg-zinc-950\/50 {
            background-color: #F3F2EE !important;
        }
        .bg-zinc-800, .bg-zinc-800\/90, .bg-zinc-800\/50 {
            background-color: var(--surface-2) !important;
        }
        .border-zinc-800, .border-zinc-700, .border-zinc-600 {
            border-color: var(--border) !important;
        }

        /* Text hierarchy */
        #public-section h1, #public-section h2, #public-section h3,
        #admin-section h1, #admin-section h2, #admin-section h3 {
            color: var(--text) !important;
        }
        .text-zinc-200, .text-zinc-300 { color: #3F3F3A !important; }
        .text-zinc-400, .text-zinc-500 { color: var(--muted) !important; }
        .text-zinc-600 { color: #52524C !important; }

        #public-section .text-white:not(.bg-brand-red):not(.bg-brand-red *):not([class*="bg-emerald"]):not([class*="bg-rose"]):not([class*="bg-amber"]):not([class*="bg-brand"]),
        #admin-section .text-white:not(.bg-brand-red):not(.bg-brand-red *):not([class*="bg-emerald"]):not([class*="bg-rose"]):not([class*="bg-amber"]),
        header .text-white,
        footer .text-white {
            color: var(--text) !important;
        }

        /* Primary CTAs */
        a.bg-brand-red, button.bg-brand-red,
        .bg-brand-red.text-white,
        .admin-tab.bg-brand-red {
            background: linear-gradient(180deg, #1A1A18 0%, #0E0E0D 100%) !important;
            color: #FFFFFF !important;
            border: 1px solid #0A0A0A !important;
            box-shadow: 0 4px 14px rgba(18,18,18,0.18) !important;
        }
        a.bg-brand-red *, button.bg-brand-red *,
        .admin-tab.bg-brand-red * {
            color: #FFFFFF !important;
        }
        a.bg-brand-red:hover, button.bg-brand-red:hover,
        a.hover\:bg-brand-darkRed:hover, button.hover\:bg-brand-darkRed:hover {
            background: #FFFFFF !important;
            color: #121212 !important;
            border-color: #121212 !important;
            box-shadow: 0 4px 16px rgba(18,18,18,0.1) !important;
        }
        a.bg-brand-red:hover *, button.bg-brand-red:hover * {
            color: #121212 !important;
        }

        /* Header */
        header.bg-glass {
            border-bottom: 1px solid var(--border) !important;
        }
        header nav a, header nav button {
            color: #4A4A45 !important;
        }
        header nav a:hover, header nav button:hover {
            color: #121212 !important;
            background-color: rgba(18, 18, 18, 0.05) !important;
        }
        #view-mode-btn, #admin-header-btn {
            background: #FFFFFF !important;
            border: 1px solid var(--border-strong) !important;
            color: #121212 !important;
        }
        #view-mode-btn:hover, #admin-header-btn:hover {
            background: #121212 !important;
            color: #FFFFFF !important;
            border-color: #121212 !important;
        }
        #nav-dropdown {
            background: #FFFFFF !important;
            border: 1px solid var(--border) !important;
            box-shadow: var(--shadow-card) !important;
        }
        #nav-dropdown a, #nav-dropdown button { color: #3F3F3A !important; }
        #nav-dropdown a:hover, #nav-dropdown button:hover {
            background: var(--surface-2) !important;
            color: #121212 !important;
        }

        /* Inputs */
        #public-section input, #public-section select, #public-section textarea,
        #admin-section input, #admin-section select, #admin-section textarea {
            background-color: #FFFFFF !important;
            border: 1px solid var(--border-strong) !important;
            color: var(--text) !important;
        }
        #public-section input:focus, #public-section select:focus, #public-section textarea:focus,
        #admin-section input:focus, #admin-section select:focus, #admin-section textarea:focus {
            border-color: #121212 !important;
            box-shadow: 0 0 0 3px rgba(18,18,18,0.08) !important;
            background: #FFFFFF !important;
        }
        #public-section input::placeholder,
        #public-section textarea::placeholder,
        #admin-section input::placeholder,
        #admin-section textarea::placeholder {
            color: #9A9A94 !important;
        }

        /* Footer */
        footer {
            background: linear-gradient(180deg, #DEDCD5 0%, #D6D3CB 100%) !important;
            border-top: 1px solid var(--border) !important;
            color: var(--muted) !important;
        }

        /* Modals */
        [id$="-modal"]:not(.hidden) {
            background-color: rgba(18, 18, 18, 0.35) !important;
            backdrop-filter: blur(4px);
        }
        [id$="-modal"] > div,
        #app-dialog .relative.bg-zinc-900,
        [id$="-modal"] .bg-zinc-900,
        [id$="-modal"] .bg-zinc-900\/95 {
            background: #FFFFFF !important;
            border-color: var(--border) !important;
            color: var(--text) !important;
            box-shadow: 0 24px 64px rgba(18,18,18,0.18) !important;
        }

        /* Testi dei modali (prenotazione, pass, ecc.): mai chiari su fondo bianco */
        [id$="-modal"] .text-white:not(button):not(button *):not(a.bg-brand-red):not([class*="bg-brand"]):not([class*="bg-emerald"]):not([class*="bg-rose"]):not([class*="bg-amber"]):not(.bg-zinc-700):not(.bg-zinc-800),
        [id$="-modal"] h2,
        [id$="-modal"] h3,
        [id$="-modal"] h4,
        [id$="-modal"] label,
        [id$="-modal"] .text-zinc-100,
        [id$="-modal"] .text-zinc-200,
        [id$="-modal"] .text-zinc-300 {
            color: #0A0A0A !important;
        }
        [id$="-modal"] button.bg-zinc-700,
        [id$="-modal"] button.bg-zinc-700.text-white {
            background: #1A1A18 !important;
            color: #FFFFFF !important;
        }

        /* Schede tipologia biglietto (Standard ecc.): testo nero, selezionata evidenziata */
        .bk-tt-card { background: #FFFFFF !important; border-color: #D4D1C8 !important; }
        .bk-tt-card.border-brand-red { background: #F3F1EB !important; border-color: #0A0A0A !important; }
        .bk-tt-card, .bk-tt-card span { color: #0A0A0A !important; }
        .bk-tt-card .text-emerald-400 { color: #0F7A3F !important; }
        .bk-tt-card .text-zinc-500 { color: #5C5A54 !important; }

        /* ========== ADMIN PANEL ========== */
        #admin-section {
            background: transparent !important;
        }
        #admin-section .admin-card,
        #admin-section .bg-zinc-900\/95 {
            background: linear-gradient(165deg, #FFFFFF 0%, #F9F9F6 100%) !important;
            border: 1px solid var(--border) !important;
            box-shadow: var(--shadow-card) !important;
        }
        /* Admin tabs bar */
        #admin-tabs-bar, #admin-section .flex.gap-2.overflow-x-auto {
            gap: 0.4rem !important;
        }
        .admin-tab {
            border: 1px solid transparent !important;
            border-radius: 9999px !important;
            transition: background 0.15s, color 0.15s, border-color 0.15s !important;
        }
        .admin-tab.bg-transparent {
            background: #FFFFFF !important;
            color: var(--muted) !important;
            border-color: var(--border) !important;
        }
        .admin-tab.bg-transparent:hover {
            background: var(--surface-2) !important;
            color: #121212 !important;
            border-color: var(--border-strong) !important;
        }
        .admin-tab.bg-brand-red {
            background: linear-gradient(180deg, #1A1A18 0%, #0E0E0D 100%) !important;
            color: #FFFFFF !important;
            border-color: #0A0A0A !important;
        }

        /* Tables */
        #admin-section table thead th {
            background: linear-gradient(180deg, #F3F2EE 0%, #EDECE7 100%) !important;
            color: #3F3F3A !important;
            font-weight: 700 !important;
            border-bottom: 1px solid var(--border-strong) !important;
        }
        #admin-section table tbody tr {
            border-bottom: 1px solid var(--border) !important;
        }
        #admin-section table tbody tr:nth-child(even) {
            background-color: rgba(243, 242, 238, 0.55) !important;
        }
        #admin-section table tbody tr:hover,
        #admin-section .hover\:bg-zinc-800\/50:hover,
        tr.hover\:bg-zinc-800\/50:hover {
            background-color: #EFEDE6 !important;
        }
        #admin-section .overflow-x-auto {
            border: 1px solid var(--border) !important;
            border-radius: 12px !important;
            background: #FFFFFF !important;
        }

        /* Status chips in admin */
        #admin-section .text-emerald-400,
        #admin-section .text-emerald-300 { color: var(--success) !important; }
        #admin-section .text-rose-400,
        #admin-section .text-rose-500,
        #admin-section .text-rose-300 { color: var(--danger) !important; }
        #admin-section .text-amber-400,
        #admin-section .text-amber-300 { color: var(--warning) !important; }

        .bg-emerald-500\/10, .bg-emerald-500\/20 {
            background-color: var(--success-bg) !important;
        }
        .bg-rose-500\/10, .bg-rose-500\/15, .bg-rose-500\/20 {
            background-color: var(--danger-bg) !important;
        }
        .bg-amber-500\/10, .bg-amber-500\/15, .bg-amber-500\/20 {
            background-color: var(--warning-bg) !important;
        }
        .border-emerald-500\/20, .border-emerald-500\/30, .border-emerald-500\/40 {
            border-color: rgba(15, 122, 63, 0.3) !important;
        }
        .border-rose-500\/20, .border-rose-500\/30 {
            border-color: rgba(198, 40, 40, 0.3) !important;
        }
        .border-amber-500\/20, .border-amber-500\/30, .border-amber-500\/40 {
            border-color: rgba(184, 110, 0, 0.3) !important;
        }

        /* KPI / summary cards in accounting */
        #admin-section #total-income,
        #admin-section #total-expenses,
        #admin-section #total-recurring,
        #admin-section #net-profit {
            letter-spacing: -0.02em;
        }

        /* Secondary outline CTA */
        a.bg-transparent.border-2 {
            border-color: #121212 !important;
            color: #121212 !important;
            background: rgba(255,255,255,0.6) !important;
        }
        a.bg-transparent.border-2:hover {
            background-color: #121212 !important;
            color: #FFFFFF !important;
        }

        .bg-white\/5, .bg-white\/10 {
            background-color: rgba(18, 18, 18, 0.04) !important;
        }
        .border-white\/20, .border-white\/30, .border-white\/40 {
            border-color: rgba(18, 18, 18, 0.16) !important;
        }
        .hover\:bg-white\/5:hover {
            background-color: rgba(18, 18, 18, 0.06) !important;
        }

        .text-emerald-400, .text-emerald-300 { color: var(--success) !important; }
        .text-rose-400, .text-rose-500, .text-rose-300 { color: var(--danger) !important; }
        .text-amber-400, .text-amber-300 { color: var(--warning) !important; }

        .hover\:bg-zinc-800:hover, .hover\:bg-zinc-700:hover {
            background-color: var(--surface-2) !important;
        }

        .story-html, .story-html p { color: #4A4A45 !important; }
        .story-html h1, .story-html h2, .story-html h3,
        .story-html b, .story-html strong { color: var(--text) !important; }
        .rt-toolbar {
            background: var(--surface-2) !important;
            border-color: var(--border) !important;
        }
        .rt-toolbar button, .rt-toolbar select {
            background: #FFFFFF !important;
            color: var(--text) !important;
            border: 1px solid var(--border) !important;
        }
        .rt-editor {
            background: #FFFFFF !important;
            border-color: var(--border) !important;
            color: var(--text) !important;
        }

        .underline.decoration-white\/40 {
            text-decoration-color: rgba(18, 18, 18, 0.28) !important;
        }

        #qr-reader, #qr-reader video {
            background: #000 !important;
        }

        button:disabled, a[aria-disabled="true"] {
            opacity: 0.45 !important;
        }

        /* Section pills / badges */
        .bg-brand-red\/10, .bg-brand-red\/15, .bg-brand-red\/20 {
            background-color: var(--accent-soft) !important;
            color: var(--text) !important;
        }
        .border-brand-red\/20, .border-brand-red\/30, .border-brand-red\/40 {
            border-color: rgba(18, 18, 18, 0.18) !important;
        }

        /* Hero soft wash */
        .hero-stage {
            background: transparent !important;
        }
        .hero-stage::before {
            background:
                radial-gradient(800px 420px at 12% 0%, rgba(245,243,237,0.95), transparent 60%),
                radial-gradient(600px 360px at 90% 20%, rgba(210, 206, 195, 0.75), transparent 55%) !important;
        }


        /* ===== USABILITY LAYER (non troppo minimal) ===== */
        /* CTA secondarie più evidenti */
        #public-section a.border-2, #public-section button.border {
            min-height: 48px;
        }

        /* Badge sezione: chip più visibili */
        #public-section span.rounded-full.border,
        #public-section .uppercase.tracking-widest {
            background-color: #EFEDE6 !important;
            border-color: #D4D0C6 !important;
            color: #2A2A28 !important;
            font-weight: 800 !important;
        }

        /* Card evento: hover leggibile */
        #public-section .rounded-3xl:hover,
        #public-section .rounded-2xl:hover {
            border-color: #C8C4B8 !important;
            box-shadow: 0 8px 28px rgba(18,18,18,0.1) !important;
            transform: translateY(-1px);
            transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
        }

        /* Link e azioni in testo */
        #public-section a.text-brand-red,
        #admin-section a.text-brand-red {
            text-decoration-thickness: 1.5px;
        }

        /* Admin: barre azione e form più “tool” */
        #admin-section label {
            color: #5C5C56 !important;
            font-weight: 600 !important;
        }
        #admin-section button.bg-brand-red,
        #admin-section a.bg-brand-red {
            min-height: 42px;
        }

        /* Stati pagamento / ingresso: pill più chiare */
        #admin-section select {
            font-weight: 700 !important;
        }
        #admin-section .text-emerald-400,
        #admin-section .text-emerald-300 {
            background: #E8F6EE;
            padding: 0.15rem 0.45rem;
            border-radius: 6px;
        }
        #admin-section .text-rose-400,
        #admin-section .text-rose-500 {
            background: #FCEAEA;
            padding: 0.15rem 0.45rem;
            border-radius: 6px;
        }
        #admin-section .text-amber-400,
        #admin-section .text-amber-300 {
            background: #FFF4E0;
            padding: 0.15rem 0.45rem;
            border-radius: 6px;
        }

        /* Notifiche scadenze contabilità */
        #notifications-container > div {
            background: #FFF4E0 !important;
            border-color: rgba(184, 110, 0, 0.35) !important;
            color: #8A5200 !important;
        }

        /* KPI admin: card con leggera tinta */
        #admin-section #total-income { color: #0F7A3F !important; }
        #admin-section #total-expenses { color: #C62828 !important; }
        #admin-section #total-recurring { color: #B86E00 !important; }

        /* Focus ring più visibile (accessibilità) */
        button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
            outline: 2px solid #121212 !important;
            outline-offset: 2px !important;
        }

        /* Scanner result box contrast */
        #scanner-result {
            border-width: 2px !important;
        }

        /* Mobile nav più tappabile */
        header nav a, header nav button {
            min-height: 36px;
            display: inline-flex;
            align-items: center;
        }
        /* Primary buttons always white text on black */
        a.bg-brand-red, button.bg-brand-red,
        a.bg-brand-red span, button.bg-brand-red span,
        a.bg-brand-red i, button.bg-brand-red i {
            color: #FFFFFF !important;
        }
        a.bg-brand-red:hover, button.bg-brand-red:hover,
        a.hover\:bg-brand-darkRed:hover, button.hover\:bg-brand-darkRed:hover {
            background-color: #FFFFFF !important;
            color: #0A0A0A !important;
            border-color: #0A0A0A !important;
        }
        a.bg-brand-red:hover *, button.bg-brand-red:hover *,
        a.hover\:bg-brand-darkRed:hover *, button.hover\:bg-brand-darkRed:hover * {
            color: #0A0A0A !important;
        }
        /* Admin active tab */
        .admin-tab.bg-brand-red { color: #FFFFFF !important; }


        /* Login admin: testo sempre nero leggibile */
        #admin-modal input[type="email"],
        #admin-modal input[type="password"],
        #admin-modal input[type="text"] {
            background: #FFFFFF !important;
            color: #121212 !important;
            -webkit-text-fill-color: #121212 !important;
            caret-color: #121212 !important;
            border-color: #C8C8C0 !important;
        }
        #admin-modal input::placeholder {
            color: #9A9A94 !important;
            -webkit-text-fill-color: #9A9A94 !important;
            opacity: 1 !important;
        }
        #admin-modal h3 { color: #121212 !important; }


        /* ===== INPUT TEXT NERO (leggibile su tema chiaro) ===== */
        input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
        select,
        textarea,
        #public-section input,
        #public-section select,
        #public-section textarea,
        #admin-section input,
        #admin-section select,
        #admin-section textarea,
        [id$="-modal"] input,
        [id$="-modal"] select,
        [id$="-modal"] textarea,
        #public-booking-form input,
        #public-booking-form select,
        #public-booking-form textarea {
            color: #121212 !important;
            -webkit-text-fill-color: #121212 !important;
            caret-color: #121212 !important;
            background-color: #FFFFFF !important;
        }
        input::placeholder,
        textarea::placeholder {
            color: #9A9A94 !important;
            -webkit-text-fill-color: #9A9A94 !important;
            opacity: 1 !important;
        }
        select option {
            color: #121212 !important;
            background: #FFFFFF !important;
        }
        /* Autofill browser (Chrome) non deve diventare bianco */
        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        textarea:-webkit-autofill,
        select:-webkit-autofill {
            -webkit-text-fill-color: #121212 !important;
            caret-color: #121212 !important;
            box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
            transition: background-color 99999s ease-in-out 0s;
        }
        /* contenteditable editor */
        .rt-editor, [contenteditable="true"] {
            color: #121212 !important;
            -webkit-text-fill-color: #121212 !important;
        }


        /* Residual dark shells → warm usable surfaces */
        #public-section .bg-zinc-950\/50,
        #public-section .bg-zinc-950 {
            background-color: #DEDCD5 !important;
        }
        #admin-section .bg-zinc-950,
        #admin-section .bg-zinc-950\/50 {
            background-color: #EDEBE4 !important;
        }
        [id$="-modal"] .bg-zinc-950,
        [id$="-modal"] .bg-zinc-900 {
            background: #F7F5F0 !important;
            color: #121212 !important;
        }


        /* Admin: Copia PR + Notizie file = nero unificato */
        #admin-section button.bg-brand-red,
        button[onclick="copyPrsFromAnotherEvent()"] {
            background-color: #0A0A0A !important;
            color: #FFFFFF !important;
            border: 1.5px solid #0A0A0A !important;
        }
        button[onclick="copyPrsFromAnotherEvent()"]:hover {
            background-color: #FFFFFF !important;
            color: #0A0A0A !important;
        }
        #news-file-input::file-selector-button,
        #edit-news-file-input::file-selector-button,
        .news-file-btn::file-selector-button {
            background-color: #0A0A0A !important;
            color: #FFFFFF !important;
            border: none !important;
            border-radius: 12px !important;
            padding: 0.55rem 1rem !important;
            font-weight: 700 !important;
            font-size: 11px !important;
            cursor: pointer !important;
        }
        #news-file-input:hover::file-selector-button,
        #edit-news-file-input:hover::file-selector-button,
        .news-file-btn:hover::file-selector-button {
            background-color: #FFFFFF !important;
            color: #0A0A0A !important;
            outline: 1.5px solid #0A0A0A !important;
        }

        /* Pass digitale — elegante, sobrio */
        #printable-pass-card {
            background: #FFFEFB !important;
            color: #121212 !important;
            border: 1.5px solid #121212 !important;
            border-radius: 16px !important;
            box-shadow: 0 8px 24px rgba(18,18,18,0.08) !important;
        }
        #printable-pass-card .pass-brand-name {
            font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
            font-weight: 900;
            color: #121212 !important;
        }
        #pass-modal-code {
            color: #C62828 !important;
            font-weight: 900 !important;
        }
        #pass-modal > div { color: #121212 !important; }
        /* Pass: tutte le scritte in nero (il codice resta rosso) */
        #printable-pass-card,
        #printable-pass-card *:not(#pass-modal-code):not(#pass-modal-code *),
        #pass-modal h3,
        #pass-modal-event {
            color: #0A0A0A !important;
        }
        /* ===== Event cards: high contrast usable light theme ===== */
        #events-grid > div {
            background: #FFFFFF !important;
            box-shadow: 0 4px 24px rgba(18,18,18,0.08) !important;
        }
        #events-grid h3 {
            color: #121212 !important;
        }
        #hero-mini-dashboard-list > div {
            background: #FFFFFF !important;
        }
        #hero-mini-dashboard-list h4 {
            color: #121212 !important;
        }
        /* Admin list cards readable on light */
        #admin-events-list > div {
            background: #FFFFFF !important;
            border-color: #E2E2DC !important;
        }
        #admin-events-list h4 {
            color: #121212 !important;
        }

        /* Barre indice dell'admin (tab, menu Eventi, riordino): chiare come il resto del tema */
        #admin-section .bg-zinc-900\/80 {
            background: #FFFFFF !important;
            border-color: var(--border) !important;
        }
        /* Totale / Entrati accanto a Iscritti: ben leggibili */
        .ev-count-chip {
            background: #FFFFFF !important;
            border: 1.5px solid #0A0A0A !important;
            color: #0A0A0A !important;
        }
        .ev-count-chip strong { color: #0A0A0A !important; font-weight: 900 !important; font-size: 13px; }
        .ev-count-chip strong.ent { color: #0F7A3F !important; }
        .ev-count-chip .sep { color: #5C5A54 !important; }
        /* Contatori nella tabella iscritti */
        #attendees-stats-bar > span { color: #0A0A0A !important; border-width: 1.5px !important; font-weight: 800 !important; background: #FFFFFF !important; }
        #attendees-stats-bar .text-emerald-400 { color: #0B6B36 !important; border-color: #0B6B36 !important; }
        #attendees-stats-bar .text-rose-400 { color: #B3261E !important; border-color: #B3261E !important; }
        #attendees-stats-bar .text-amber-400 { color: #8A5A00 !important; border-color: #8A5A00 !important; }
        #attendees-stats-bar .text-sky-400 { color: #0B5A8A !important; border-color: #0B5A8A !important; }
