:root {
    --bg-color: #070913;
    --glass-bg: rgba(15, 23, 42, 0.55);
    --glass-border: rgba(0, 242, 254, 0.15);
    --text-color: #f1f5f9;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.25);
    --secondary: #00b4db;
    --secondary-glow: rgba(0, 180, 219, 0.25);
    --accent: #ffd700;
    --danger: #ff416c;
    --danger-glow: rgba(255, 65, 108, 0.25);
    --header-bg: rgba(10, 14, 26, 0.88);
    --table-header-bg: #0e0e16;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --cyan-stroke: #00f2fe;
}

:root[data-theme="light"] {
    --bg-color: #eaedf2;
    --glass-bg: rgba(248, 250, 252, 0.94);
    --glass-border: rgba(0, 180, 219, 0.22);
    --text-color: #0f172a;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.15);
    --secondary: #00b4db;
    --secondary-glow: rgba(0, 180, 219, 0.15);
    --accent: #d97706;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    --header-bg: rgba(248, 250, 252, 0.94);
    --table-header-bg: #e2e8f0;
    --card-shadow: 0 10px 30px -5px rgba(0, 110, 150, 0.07), 0 0 1px 1px rgba(0, 242, 254, 0.15);
    --cyan-stroke: #0284c7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color) !important;
    background-image: none !important;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header {
    background: var(--header-bg);

            backdrop-filter: blur(12px);

            border-bottom: 1px solid var(--glass-border);

            padding: 1.2rem 2rem;

            position: sticky;

            top: 0;

            z-index: 100;

            display: flex;

            justify-content: space-between;

            align-items: center;

        }



        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo h1 {
            font-size: 1.25rem;
            font-weight: 800;
            letter-spacing: 0.5px;
            background: linear-gradient(135deg, #00f2fe 0%, #00b4db 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 0;
            line-height: 1.1;
            display: inline-block;
        }

        .logo span {
            font-size: 0.70rem;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 600;
            color: #00f2fe;
            background: rgba(0, 242, 254, 0.1);
            border: 1px solid rgba(0, 242, 254, 0.3);
            padding: 2px 7px;
            border-radius: 4px;
            letter-spacing: 0.5px;
            display: inline-flex;
            align-items: center;
            line-height: 1.2;
            vertical-align: middle;
        }

        :root[data-theme="light"] .logo h1 {
            background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important;
        }

        :root[data-theme="light"] .logo span {
            color: #0284c7 !important;
            background: rgba(2, 132, 199, 0.1) !important;
            border-color: rgba(2, 132, 199, 0.3) !important;
        }

        :root[data-theme="light"] .logo img {
            filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.25)) !important;
        }



        .status-indicators {

            display: flex;

            align-items: center;

            gap: 20px;

        }



        .indicator {

            display: flex;

            align-items: center;

            gap: 8px;

            font-size: 0.9rem;

            font-weight: 600;

            padding: 6px 14px;

            border-radius: 20px;

            background: rgba(255,255,255,0.02);

            border: 1px solid var(--glass-border);

        }



        .dot, .cyan-dot {
            width: 8px !important;
            height: 8px !important;
            min-width: 8px !important;
            min-height: 8px !important;
            max-width: 8px !important;
            max-height: 8px !important;
            border-radius: 50% !important;
            display: inline-block !important;
            flex-shrink: 0 !important;
            aspect-ratio: 1 / 1 !important;
            box-sizing: border-box !important;
        }

        .active-dot { 
            background-color: #00f2fe !important; 
            box-shadow: 0 0 10px #00f2fe, 0 0 4px #ffffff !important; 
            animation: pulse-cyan 2s infinite ease-in-out;
        }

        .inactive-dot { background-color: var(--danger) !important; box-shadow: 0 0 10px var(--danger) !important; }

        .standby-dot { background-color: var(--secondary) !important; box-shadow: 0 0 10px var(--secondary) !important; }



        .container {
            max-width: min(96%, 1680px);
            width: 100%;
            margin: 1.5rem auto 0 auto;
            padding: 0 1.5rem;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }



        .glass-card {

            background: var(--glass-bg);

            border: 1px solid var(--glass-border);

            border-radius: 16px;

            backdrop-filter: blur(16px);

            -webkit-backdrop-filter: blur(16px);

            padding: 1.5rem;

            margin-bottom: 24px;

            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

            min-width: 0;

        }



        .controls-grid {

            display: flex;

            flex-wrap: wrap;

            gap: 12px;

        }



        button {

            font-family: 'Outfit', sans-serif;

            font-weight: 600;

            font-size: 0.95rem;

            padding: 10px 20px;

            border-radius: 10px;

            border: 1px solid var(--glass-border);

            cursor: pointer;

            transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);

            color: var(--text-color);

            background: rgba(255, 255, 255, 0.03);

            display: flex;

            align-items: center;

            gap: 8px;

        }



        button:hover {

            transform: translateY(-2px);

            box-shadow: 0 5px 15px rgba(0,0,0,0.4);

            border-color: rgba(255,255,255,0.15);

        }



        .btn-green { background: linear-gradient(135deg, rgba(0,255,135,0.1), rgba(0,242,254,0.1)); border-color: rgba(0,255,135,0.25); }

        .btn-green:hover { border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }



        .btn-red { background: linear-gradient(135deg, rgba(255,65,108,0.1), rgba(255,75,43,0.1)); border-color: rgba(255,65,108,0.25); }

        .btn-red:hover { border-color: var(--danger); box-shadow: 0 0 15px var(--danger-glow); }



        .btn-blue { background: linear-gradient(135deg, rgba(0,180,219,0.1), rgba(0,131,176,0.1)); border-color: rgba(0,180,219,0.25); }

        .btn-blue:hover { border-color: var(--secondary); box-shadow: 0 0 15px var(--secondary-glow); }

        .btn-blue.active {
            background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(0, 180, 219, 0.25)) !important;
            border-color: #00f2fe !important;
            color: #00f2fe !important;
            box-shadow: 0 0 15px rgba(0, 242, 254, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
            font-weight: 700 !important;
        }



        .main-grid {

            display: grid;

            grid-template-columns: 1fr 1fr;

            gap: 2rem;

        }



        @media (max-width: 1200px) {

            .main-grid {

                grid-template-columns: 1fr;

            }

        }



        .card-header {

            display: flex;

            justify-content: space-between;

            align-items: center;

            margin-bottom: 1.2rem;

            border-bottom: 1px solid rgba(255,255,255,0.05);

            padding-bottom: 0.8rem;

        }



        .card-header h2 {

            font-size: 1.2rem;

            font-weight: 700;

            display: flex;

            align-items: center;

            gap: 8px;

        }



        table {

            width: 100%;

            border-collapse: collapse;

            min-width: 600px;

            font-size: 0.80rem;

        }

        .deck-table,
        .trade-table {
            min-width: 0 !important;
            width: 100% !important;
            table-layout: fixed;
        }

        .deck-table th,
        .trade-table th {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .deck-table td,
        .trade-table td {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }



        th {

            text-align: left;

            color: var(--text-muted);

            font-weight: 600;

            padding: 6px 4px;

            white-space: nowrap;

            font-size: 0.74rem;

            text-transform: uppercase;

            letter-spacing: 0.5px;

            position: sticky;

            top: 0;

            background-color: #0e0e16;

            z-index: 10;

        }



        td {
            padding: 3px 6px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.02);
        }

        tbody tr:hover td {
            background-color: rgba(0, 242, 254, 0.035) !important;
        }

        

        td button {

            white-space: nowrap;

        }



        tr:last-child td {

            border-bottom: none;

        }



        .country-flag {

            background: rgba(255,255,255,0.05);

            padding: 2px 6px;

            border-radius: 4px;

            font-size: 0.75rem;

            font-weight: 700;

        }



        .badge-discount {
            color: var(--primary);
            font-weight: 700;
            font-size: 0.9rem;
        }



        .stats-strip {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

            gap: 1.5rem;

        }



        .stat-box {

            display: flex;

            flex-direction: column;

            gap: 5px;

        }



        .stat-value {

            font-size: 1.8rem;

            font-weight: 700;

            color: var(--text-color);

        }



        .stat-label {

            font-size: 0.85rem;

            color: var(--text-muted);

            text-transform: uppercase;

            letter-spacing: 0.5px;

        }



        .logs-card {

            display: flex;

            flex-direction: column;

            gap: 10px;

        }



        .terminal-screen {

            background: #040406;

            border: 1px solid var(--glass-border);

            border-radius: 10px;

            padding: 1rem;

            height: 250px;

            overflow-y: auto;

            font-family: 'JetBrains Mono', monospace;

            font-size: 0.85rem;

            line-height: 1.5;

            color: #d1d5db;

            display: flex;

            flex-direction: column;

        }



        .log-entry {

            margin-bottom: 4px;

            word-break: break-all;

        }



        .log-time { color: var(--secondary); margin-right: 8px; }

        .log-err { color: var(--danger); }



        .overlay {

            position: fixed;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(8, 8, 12, 0.8);

            backdrop-filter: blur(8px);

            z-index: 1000;

            display: none;

            justify-content: center;

            align-items: center;

            flex-direction: column;

            gap: 20px;

        }



        .spinner {

            width: 50px;

            height: 50px;

            border: 3px solid rgba(255,255,255,0.05);

            border-top-color: var(--primary);

            border-radius: 50%;

            animation: spin 1s infinite linear;

        }



        @keyframes spin {

            0% { transform: rotate(0deg); }

            100% { transform: rotate(360deg); }

        }



        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(20, 20, 35, 0.95);
            border: 1px solid var(--primary);
            color: #ffffff;
            padding: 12px 24px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.5);
            display: none;
            z-index: 1000;
            font-weight: 600;
        }

        :root[data-theme="light"] .toast,
        body.light-theme .toast,
        .light-theme .toast {
            background: #ffffff !important;
            border: 1px solid var(--primary) !important;
            color: #0f172a !important;
            box-shadow: 0 5px 20px rgba(0,0,0,0.15) !important;
        }

    

        .modal {

            display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;

            background: rgba(8,8,12,0.9); backdrop-filter: blur(8px); z-index: 2000; align-items: center; justify-content: center;

        }

        .modal-content {

            background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px;

            padding: 2rem; width: 90%; max-width: 800px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);

        }

        .close-modal { float: right; cursor: pointer; font-size: 1.5rem; color: var(--danger); font-weight: bold; }

        

        .wishlist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

        @media (max-width: 1200px) { .wishlist-grid { grid-template-columns: 1fr; } }

        .input-dark {

            background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: #fff;

            padding: 8px 12px; border-radius: 6px; font-family: 'Outfit'; margin-top: 4px;

        }

        .wl-res-item { display: flex; justify-content: space-between; padding: 5px; border-bottom: 1px solid rgba(255,255,255,0.05); }



        @media (max-width: 768px) {

            header { flex-direction: column; align-items: flex-start; gap: 15px; padding: 1rem; }

            .status-indicators { flex-wrap: wrap; width: 100%; gap: 8px; }

            .controls-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }

            .controls-grid button { width: 100%; justify-content: center; }

            .stats-strip { grid-template-columns: 1fr 1fr; gap: 1rem; }

            .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }

            .card-header h2 { font-size: 1.1rem; }

            .card-header button { width: 100%; justify-content: center; }

            .indicator { font-size: 0.75rem; padding: 6px 10px; width: 100%; justify-content: center; }

            .container { padding: 0 10px; margin: 1rem auto; gap: 1.5rem; }

            th, td { font-size: 0.7rem; padding: 6px 4px;

            white-space: nowrap; }

            .glass-card { padding: 1rem; }

            .glass-card > div[style*="overflow-x"] { -webkit-overflow-scrolling: touch; }

        }

        .clickable-row:hover {
            background: rgba(255, 255, 255, 0.03) !important;
        }
        .selected-row {
            background: rgba(0, 180, 219, 0.08) !important;
            border-left: 3px solid var(--primary);
        }

        .data-table th, .data-table td {
            white-space: nowrap !important;
            padding: 4px 6px !important;
            font-size: 0.75rem !important;
            line-height: 1.2 !important;
        }

        .data-table td:nth-child(1) {
            max-width: 0 !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

        .data-table td:nth-child(2) {
            max-width: 0 !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }

        .btn-action-table {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            color: var(--text-muted);
            padding: 5px 9px;
            font-size: 0.72rem;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin: 0;
            margin-right: 4px;
            margin-bottom: 4px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.25s ease;
        }
        .btn-action-table:hover {
            background: rgba(255, 255, 255, 0.05);
            transform: translateY(-1px);
        }
        .btn-action-table.action-green:hover {
            border-color: var(--primary);
            color: var(--primary);
            box-shadow: 0 0 10px rgba(0, 242, 254, 0.12);
        }
        .btn-action-table.action-blue:hover {
            border-color: var(--secondary);
            color: var(--secondary);
            box-shadow: 0 0 10px rgba(0, 180, 219, 0.12);
        }
        .btn-action-table.action-cart:hover {
            border-color: #3b82f6;
            color: #3b82f6;
            box-shadow: 0 0 10px rgba(59, 130, 246, 0.12);
        }

        /* Hide stepper arrows for specific inputs */
        .no-spinner::-webkit-outer-spin-button,
        .no-spinner::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .no-spinner {
            -moz-appearance: textfield;
        }

/* Metagame Harmonization */
#metagame-module {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--card-shadow) !important;
    border-radius: 16px;
    overflow: hidden;
}

#metagame-module thead th {
    background-color: var(--table-header-bg) !important;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 12px 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}

#body-metagame tr:hover td {
    background-color: rgba(0, 242, 254, 0.035) !important;
}

#metagame-format-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-meta-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-meta-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.btn-meta-tab.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(0, 180, 219, 0.2)) !important;
    border-color: #00f2fe !important;
    color: #00f2fe !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
}

/* Custom modern scrollbar for the table responsive container */
.metagame-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.metagame-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.metagame-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: background 0.2s;
}

.metagame-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Color Capsule Indicator */
.meta-color-capsule {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    height: auto;
}

/* Minimalist Outline Squares Style */
.mana-gem {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    box-sizing: border-box;
    margin-right: 4px;
    position: relative;
    z-index: 1;
    border: 1.5px solid transparent;
}

.mana-gem:last-child {
    margin-right: 0;
}

/* Bright Outline Square Colors */
.mana-gem.gem-w {
    border-color: #f0f2f5;
    background: transparent;
}
.mana-gem.gem-u {
    border-color: #00f0ff;
    background: transparent;
}
.mana-gem.gem-b {
    border-color: #a1a1aa;
    background: transparent;
}
.mana-gem.gem-r {
    border-color: #ff476c;
    background: transparent;
}
.mana-gem.gem-g {
    border-color: #00ff87;
    background: transparent;
}
.mana-gem.gem-c {
    border-color: #cbd5e1;
    background: transparent;
}
.mana-gem.gem-y {
    border-color: #facc15;
    background: transparent;
}
.mana-gem.gem-p {
    border-color: #c084fc;
    background: transparent;
}

/* Tier Badges styling */
.meta-tier-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Meta share percentage badge styling */
.meta-share-badge {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(0, 180, 219, 0.12));
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.75rem;
    color: #00f2fe;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.05);
    display: inline-block;
}

/* Visualizza Lista Button Redesign */
.btn-meta-action {
    background: rgba(0, 180, 219, 0.15) !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    color: #00b4db !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    line-height: 1.2 !important;
}

.btn-meta-action:hover {
    background: rgba(0, 180, 219, 0.3) !important;
    border-color: #00b4db !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(0, 180, 219, 0.35) !important;
    transform: translateY(-1px);
}

.btn-meta-action.btn-meta-action-close {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #ef4444 !important;
}

.btn-meta-action.btn-meta-action-close:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35) !important;
}

.btn-meta-action:active {
    transform: translateY(0);
}

/* --- ORACLE PREMIUM CARD & WIDGETS REDESIGN --- */

#oracle-card-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
}

#oracle-card-image-wrapper.glow-normal {
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 15px rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

#oracle-card-image-wrapper.glow-foil {
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(245, 175, 25, 0.2);
    border: 1px solid rgba(245, 175, 25, 0.35);
}

#oracle-card-image-wrapper:hover {
    transform: translateY(-6px) scale(1.025) rotate(0.5deg);
}

#oracle-card-image-wrapper.glow-normal:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 25px rgba(0, 242, 254, 0.35);
    border-color: rgba(0, 242, 254, 0.4);
}

#oracle-card-image-wrapper.glow-foil:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 35px rgba(245, 175, 25, 0.45);
    border-color: rgba(245, 175, 25, 0.6);
}

#oracle-card-image-wrapper:hover #oracle-card-image {
    transform: scale(1.03);
}

/* Foil Shimmer Overlay Animation */
.shimmer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0) 30%, 
        rgba(255,255,255,0.08) 50%, 
        rgba(255,255,255,0) 70%
    );
    background-size: 200% 200%;
    background-position: -150% -150%;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
    opacity: 0;
}

#oracle-card-image-wrapper.glow-foil:hover .shimmer-overlay {
    opacity: 1;
    animation: foil-shimmer 1.8s ease-in-out infinite;
}

@keyframes foil-shimmer {
    0% { background-position: -150% -150%; }
    100% { background-position: 150% 150%; }
}

/* EMA HUD Ticker Cards */
.ema-hud-card {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 5px 10px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.ema-hud-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.ema-hud-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.ema-hud-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.05);
}

.ema-hud-trend {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: monospace;
}

.ema-hud-trend.bullish {
    color: #00ff87;
    text-shadow: 0 0 8px rgba(0, 255, 135, 0.3);
}

.ema-hud-trend.bearish {
    color: #ff416c;
    text-shadow: 0 0 8px rgba(255, 65, 108, 0.3);
}

.ema-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.ema-status-dot.glow-normal {
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: ema-pulse-cyan 2s infinite ease-in-out;
}

.ema-status-dot.glow-secondary {
    background-color: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
    animation: ema-pulse-blue 2s infinite ease-in-out;
}

@keyframes ema-pulse-cyan {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes ema-pulse-blue {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Rulings Accordion Header Interaction */
.accordion-card {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.accordion-card:hover {
    border-color: rgba(0, 242, 254, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.accordion-header:hover h3 {
    color: #fff !important;
}

.accordion-header:hover svg {
    stroke: var(--primary);
}

/* --- TOP NAVIGATION BAR (SUBPAGE TABS) STYLES --- */
.top-nav-tabs-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid rgba(0, 242, 254, 0.15);
    padding-bottom: 10px;
    margin-bottom: 25px;
    gap: 12px;
}

.top-nav-tabs {
    display: flex;
    gap: 8px;
    background: rgba(8, 12, 20, 0.75);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(0, 242, 254, 0.2);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.05);
}

.top-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 10px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
    user-select: none;
}

.top-tab-btn:hover {
    color: #00f2fe;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.08), rgba(0, 180, 219, 0.08));
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
    transform: translateY(-1px);
}

.top-tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(0, 180, 219, 0.15));
    color: #00f2fe;
    border-color: rgba(0, 242, 254, 0.5);
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.3), inset 0 0 8px rgba(0, 242, 254, 0.1);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.main-subpage-content {
    display: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.main-subpage-content.active {
    display: block;
    opacity: 1;
}

.oracle-game-select option {
    background-color: #09101d !important;
    color: #f1f5f9 !important;
    font-family: 'Outfit', sans-serif;
    padding: 6px 10px;
}

:root[data-theme="light"] .top-nav-game-box {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .oracle-game-select {
    color: #0284c7 !important;
}

:root[data-theme="light"] .oracle-game-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Override globale anti-autofill bianco per browser/password manager */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #0b0f19 inset !important;
    box-shadow: 0 0 0px 1000px #0b0f19 inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* ==========================================================================
   EXECUTIVE DARK SELECT & OPTION STYLING (GLOBAL)
   ========================================================================== */
select, .wh-prop-select, .wh-tier-select {
    color-scheme: dark !important;
    background-color: #0b1329 !important;
    color: #00f2fe !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.input-dark {
    color-scheme: dark !important;
    background-color: #0b1329 !important;
    color: #00f2fe !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

input.input-dark, textarea.input-dark {
    cursor: text !important;
}

select.input-dark {
    cursor: pointer !important;
}

.totem-manual-card label {
    cursor: default !important;
}

select:hover, select:focus,
.wh-prop-select:hover, .wh-prop-select:focus,
.wh-tier-select:hover, .wh-tier-select:focus {
    border-color: #00f2fe !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25) !important;
}

select option, .wh-prop-select option, .wh-tier-select option {
    background-color: #070d1a !important;
    color: #cbd5e1 !important;
    padding: 8px 12px !important;
    font-weight: 600;
}

select option:checked, select option:hover, select option:focus {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700;
}

/* ==========================================================================
   SELETTORE TEMA MINIMALE & ICONE VETTORIALI OUTLINE CIANO
   ========================================================================== */
.theme-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.theme-toggle-btn:hover {
    transform: scale(1.08) !important;
    border-color: #00b4db !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.4) !important;
}

.theme-toggle-btn .svg-outline-cyan {
    width: 17px !important;
    height: 17px !important;
    stroke: var(--cyan-stroke) !important;
    fill: none !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    filter: drop-shadow(0 0 3px rgba(0, 242, 254, 0.45)) !important;
    transition: stroke 0.2s ease, filter 0.2s ease, transform 0.2s ease !important;
}

/* Dark mode predefinito: mostra icona Sole (per passare a Light) */
:root:not([data-theme="light"]) .theme-toggle-btn .theme-icon-moon {
    display: none !important;
}
:root:not([data-theme="light"]) .theme-toggle-btn .theme-icon-sun {
    display: block !important;
}

/* Light mode: mostra icona Luna (per passare a Dark) */
:root[data-theme="light"] .theme-toggle-btn .theme-icon-sun {
    display: none !important;
}
:root[data-theme="light"] .theme-toggle-btn .theme-icon-moon {
    display: block !important;
}

/* Adattamenti specifici Modalità Chiara (Cyber-Ice Luxury) */
:root[data-theme="light"] header {
    background: var(--header-bg) !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.25) !important;
    box-shadow: 0 4px 20px rgba(0, 110, 150, 0.08) !important;
}

:root[data-theme="light"] .glass-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--card-shadow) !important;
    color: var(--text-color) !important;
}

/* Neutralizzazione Globale Headings e Testi Bianchi/Chiari */
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4,
:root[data-theme="light"] h5 {
    color: #0f172a !important;
}

:root[data-theme="light"] .glass-card [style*="color: #fff"],
:root[data-theme="light"] .glass-card [style*="color: #ffffff"],
:root[data-theme="light"] .glass-card [style*="color: white"],
:root[data-theme="light"] .glass-card [style*="color: rgb(255, 255, 255)"],
:root[data-theme="light"] [style*="color: #fff;"],
:root[data-theme="light"] [style*="color: #ffffff;"],
:root[data-theme="light"] [style*="color: white;"],
:root[data-theme="light"] [style*="color: #f8fafc"],
:root[data-theme="light"] [style*="color: #f8fafc;"],
:root[data-theme="light"] #deck-token-title {
    color: #0f172a !important;
}

/* Palette Cyber-Ice ad Alto Contrasto: Ciano tenue -> Cobalto Profondo WCAG AAA */
:root[data-theme="light"] [style*="color: #00f2fe"],
:root[data-theme="light"] [style*="color: #00e5ff"],
:root[data-theme="light"] [style*="color: #00f0ff"],
:root[data-theme="light"] [style*="color: #38bdf8"],
:root[data-theme="light"] [style*="color: #7dd3fc"] {
    color: #0284c7 !important;
}

:root[data-theme="light"] svg[style*="stroke: #00f0ff"],
:root[data-theme="light"] svg[style*="stroke: #00f2fe"],
:root[data-theme="light"] svg[style*="stroke: #00e5ff"] {
    stroke: #0284c7 !important;
}

:root[data-theme="light"] [style*="color: #00ff87"],
:root[data-theme="light"] [style*="color: #10b981"],
:root[data-theme="light"] [style*="color: #38ef7d"] {
    color: #059669 !important;
}

:root[data-theme="light"] [style*="color: #cad3f5"],
:root[data-theme="light"] [style*="color: #cbd5e1"],
:root[data-theme="light"] [style*="color: #e2e8f0"] {
    color: #334155 !important;
}

/* Neutralizzazione Sfondi Scuri Interni delle Schede e Moduli */
:root[data-theme="light"] div[style*="background: rgba(0,0,0"],
:root[data-theme="light"] div[style*="background: rgba(0, 0, 0"],
:root[data-theme="light"] div[style*="background: rgba(7,"],
:root[data-theme="light"] div[style*="background: rgba(8,"],
:root[data-theme="light"] div[style*="background: rgba(10,"],
:root[data-theme="light"] div[style*="background: rgba(15,"],
:root[data-theme="light"] div[style*="background: rgba(20,"],
:root[data-theme="light"] div[style*="background: #0b1329"],
:root[data-theme="light"] div[style*="background: #070d1a"],
:root[data-theme="light"] div[style*="background: #0d172a"],
:root[data-theme="light"] div[style*="background: #0f172a"],
:root[data-theme="light"] div[style*="background: #181926"] {
    background: rgba(241, 245, 249, 0.85) !important;
    border-color: rgba(0, 180, 219, 0.22) !important;
    color: #0f172a !important;
}

/* Navigation Bar & Subpage Tabs */
:root[data-theme="light"] .top-nav-tabs-container {
    border-bottom-color: rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] .top-nav-tabs {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 180, 219, 0.28) !important;
    box-shadow: 0 4px 20px rgba(0, 110, 150, 0.08) !important;
}

:root[data-theme="light"] .top-tab-btn {
    color: #475569 !important;
}

:root[data-theme="light"] .top-tab-btn:hover {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
}

:root[data-theme="light"] .top-tab-btn.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(0, 180, 219, 0.12)) !important;
    color: #0284c7 !important;
    border-color: rgba(2, 132, 199, 0.45) !important;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.15) !important;
    text-shadow: none !important;
}

/* Sottotitolo Manifesto Oracolo - Giustificato e contrasto tipografico */
#oracle-main-header-subtitle {
    text-align: justify;
    color: #94a3b8;
}

:root[data-theme="light"] #oracle-main-header-subtitle {
    color: #334155 !important;
    text-align: justify !important;
}

/* Selettore Modalità Oracolo: Singles vs Set Completi (Layout Identico a Salva e Riblocca) */
#btn-oracle-mode-singles,
#btn-oracle-mode-sets {
    transition: all 0.2s ease;
}

:root[data-theme="light"] div:has(> #btn-oracle-mode-singles) {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.3) !important;
}

/* Barra di Ricerca Oracolo & Autocompletamento */
:root[data-theme="light"] #oracle-search-input {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid rgba(0, 180, 219, 0.4) !important;
    box-shadow: 0 2px 10px rgba(0, 110, 150, 0.08) !important;
}

:root[data-theme="light"] #oracle-search-input::placeholder {
    color: #64748b !important;
}

:root[data-theme="light"] #oracle-search-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2) !important;
}

:root[data-theme="light"] #oracle-autocomplete-dropdown {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] #oracle-autocomplete-dropdown div {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

:root[data-theme="light"] #oracle-autocomplete-dropdown div:hover {
    background: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
}

/* Light Mode - Modulo Oracolo, Grafico e Ticker EMA HUD */
:root[data-theme="light"] .ema-hud-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .ema-hud-card:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

:root[data-theme="light"] .ema-hud-label {
    color: #64748b !important;
}

:root[data-theme="light"] .ema-hud-value {
    color: #0f172a !important;
    text-shadow: none !important;
}

:root[data-theme="light"] .oracle-history-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .oracle-history-title {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-legend-text {
    color: #334155 !important;
}

:root[data-theme="light"] #oracle-cheapest-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

#oracle-card-content {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#oracle-cheapest-box {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

:root[data-theme="light"] #oracle-card-cheapest-price {
    color: #0369a1 !important;
}

:root[data-theme="light"] #oracle-card-cheapest-set,
:root[data-theme="light"] #oracle-card-real-value-label {
    color: #64748b !important;
}

/* --- ORACLE EDITIONS TABLE & PANEL COMPACT STYLING --- */
.oracle-editions-panel {
    background: rgba(7, 13, 25, 0.45);
    border: 1px solid rgba(0, 242, 254, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    box-sizing: border-box;
}

.oracle-editions-title {
    font-size: 0.88rem;
    margin-top: 0;
    margin-bottom: 8px;
    color: #bbb;
    display: inline-flex;
    align-items: center;
}

.oracle-editions-table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.15);
}

.oracle-editions-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.15;
}

.oracle-editions-table thead tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.35);
    font-size: 0.70rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oracle-editions-table th {
    padding: 4px 8px;
    font-weight: 700;
}

.oracle-editions-table td {
    padding: 3px 8px !important;
    vertical-align: middle !important;
}

.oracle-editions-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
}

.oracle-editions-table tbody tr:hover {
    background: rgba(0, 242, 254, 0.06);
}

/* Light Mode Styling for Oracle Editions Panel & Table */
:root[data-theme="light"] .oracle-editions-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .oracle-editions-title {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-editions-table-wrapper {
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

:root[data-theme="light"] .oracle-editions-table thead tr {
    background: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

:root[data-theme="light"] .oracle-editions-table th {
    color: #475569 !important;
}

:root[data-theme="light"] .oracle-editions-table tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
}

:root[data-theme="light"] .oracle-editions-table tbody tr:hover {
    background: rgba(2, 132, 199, 0.05) !important;
}

:root[data-theme="light"] .oracle-editions-table td {
    color: #0f172a !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

:root[data-theme="light"] .oracle-edition-name {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-edition-version {
    color: #64748b !important;
}

:root[data-theme="light"] .oracle-edition-stock {
    color: #334155 !important;
}


/* Light Mode - Gestione Utenti / Clienti (Admin) */
:root[data-theme="light"] #table-users {
    color: #0f172a !important;
}

:root[data-theme="light"] #table-users th {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #475569 !important;
}

:root[data-theme="light"] #table-users td {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.table-users-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-users-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="light"] .table-users-row {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

:root[data-theme="light"] .table-users-row:hover {
    background: rgba(2, 132, 199, 0.08) !important;
}

:root[data-theme="light"] #users-management-body {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

:root[data-theme="light"] #users-management-body > div {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

:root[data-theme="light"] #users-management-body input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* Tabelle & Griglie Dati */
:root[data-theme="light"] th {
    background-color: var(--table-header-bg) !important;
    color: #334155 !important;
    font-weight: 700 !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] tr:hover td {
    background-color: rgba(2, 132, 199, 0.04) !important;
}

/* Input, Select, Textarea */
:root[data-theme="light"] input[type="text"],
:root[data-theme="light"] input[type="search"],
:root[data-theme="light"] input[type="number"],
:root[data-theme="light"] input[type="time"],
:root[data-theme="light"] input[type="date"],
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .input-dark,
:root[data-theme="light"] .wh-prop-select,
:root[data-theme="light"] .wh-tier-select {
    color-scheme: light !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

:root[data-theme="light"] select option,
:root[data-theme="light"] .wh-prop-select option,
:root[data-theme="light"] .wh-tier-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Professional Tools: KPI Cards, Segmented Controls & Box Gerarchia */
:root[data-theme="light"] .kpi-card,
:root[data-theme="light"] div[style*="border: 1px solid rgba(255,255,255,0.08)"] {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
    box-shadow: 0 4px 16px rgba(0, 110, 150, 0.06) !important;
}

:root[data-theme="light"] .segmented-control {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] .segment-btn {
    color: #475569 !important;
}

:root[data-theme="light"] .segment-btn.active {
    background: #ffffff !important;
    color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Tutti i Modali e Pop-up */
:root[data-theme="light"] #modal-user-profile,
:root[data-theme="light"] #first-login-coc-modal,
:root[data-theme="light"] #wh-withdraw-confirm-modal,
:root[data-theme="light"] #coc-modal,
:root[data-theme="light"] #wh-price-info-modal,
:root[data-theme="light"] #wh-manual-add-modal,
:root[data-theme="light"] #stock-history-modal,
:root[data-theme="light"] #repricer-simulation-warn-modal,
:root[data-theme="light"] #danger-delete-modal,
:root[data-theme="light"] .modal-backdrop {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
}

:root[data-theme="light"] #modal-user-profile > div,
:root[data-theme="light"] #first-login-coc-modal > div,
:root[data-theme="light"] #wh-withdraw-confirm-modal > div,
:root[data-theme="light"] #coc-modal > div,
:root[data-theme="light"] #wh-price-info-modal > div,
:root[data-theme="light"] #wh-manual-add-modal > div,
:root[data-theme="light"] #stock-history-modal > div,
:root[data-theme="light"] #repricer-simulation-warn-modal > div {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] #first-login-coc-modal div[style*="background: rgba(0, 0, 0, 0.4)"] {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

:root[data-theme="light"] #csv-pricer-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 8px 32px rgba(0, 110, 150, 0.1) !important;
}

:root[data-theme="light"] #csv-pricer-card .waterfall-hierarchy-box {
    background: rgba(241, 245, 249, 0.9) !important;
    border-color: rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] #csv-pricer-card .waterfall-tier-card {
    background: #ffffff !important;
    border-color: rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] #csv-pricer-card #csv-pricer-dropzone {
    background: rgba(248, 250, 252, 0.8) !important;
    border: 2px dashed rgba(0, 180, 219, 0.4) !important;
}

:root[data-theme="light"] #csv-pricer-card .csv-pricer-desc {
    color: #475569 !important;
}

:root[data-theme="light"] #card-hover-preview-container,
:root[data-theme="light"] #oracle-hover-card-preview {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] #oracle-hover-card-preview > div {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

:root[data-theme="light"] #oracle-hover-title {
    color: #0f172a !important;
}

:root[data-theme="light"] #oracle-hover-subtitle {
    color: #0284c7 !important;
}

:root[data-theme="light"] .indicator {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
    color: #1e293b !important;
}

/* Warehouse Toolbar & Filters */
:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.28) !important;
    box-shadow: 0 8px 30px -4px rgba(0, 110, 150, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] div[style*="background: rgba(3, 7, 18, 0.6)"] {
    background: rgba(241, 245, 249, 0.95) !important;
    border-color: rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] button.btn-blue {
    background: transparent !important;
    color: #475569 !important;
    border: 1px solid transparent !important;
}

:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] button.btn-blue:hover {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
}

:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] button.btn-blue.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] div[style*="background: rgba(15, 23, 42, 0.8)"] {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
    color: #334155 !important;
}

:root[data-theme="light"] div[style*="linear-gradient(180deg, rgba(15, 23, 42, 0.85)"] div[style*="background: rgba(3, 7, 18, 0.55)"] {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

:root[data-theme="light"] #wh-search-input {
    color: #0f172a !important;
}

:root[data-theme="light"] #wh-search-input::placeholder {
    color: #94a3b8 !important;
}

:root[data-theme="light"] #btn-wh-price-cards,
:root[data-theme="light"] #btn-wh-bulk-receive,
:root[data-theme="light"] #btn-wh-bulk-publish,
:root[data-theme="light"] #btn-wh-bulk-restore {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

:root[data-theme="light"] #btn-wh-price-cards:hover,
:root[data-theme="light"] #btn-wh-bulk-receive:hover,
:root[data-theme="light"] #btn-wh-bulk-publish:hover,
:root[data-theme="light"] #btn-wh-bulk-restore:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
}

:root[data-theme="light"] #wh-bulk-delete-lock {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

/* Repricer Rules 4 Columns & Controls */
:root[data-theme="light"] .repricer-pill-container {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] .repricer-pill-button {
    color: #475569 !important;
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 18px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

:root[data-theme="light"] .repricer-pill-button span {
    white-space: nowrap !important;
}

:root[data-theme="light"] .repricer-pill-button:hover {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.06) !important;
}

:root[data-theme="light"] .repricer-pill-button.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] .repricer-pill-button.active .tab-icon {
    stroke: #ffffff !important;
    filter: none !important;
}

:root[data-theme="light"] .repricer-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.28) !important;
    box-shadow: 0 4px 15px rgba(0, 110, 150, 0.06) !important;
}

:root[data-theme="light"] .repricer-card-title {
    color: #0284c7 !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.2) !important;
}

:root[data-theme="light"] .repricer-control-label {
    color: #334155 !important;
}

:root[data-theme="light"] .repricer-checkbox-label,
:root[data-theme="light"] .repricer-radio-label {
    color: #1e293b !important;
}

:root[data-theme="light"] .repricer-control-group input[type="radio"],
:root[data-theme="light"] .repricer-checkbox-label input[type="checkbox"] {
    accent-color: #0284c7 !important;
    outline: none !important;
    box-shadow: none !important;
}

:root[data-theme="light"] .repricer-card select,
:root[data-theme="light"] .repricer-card input[type="number"],
:root[data-theme="light"] .repricer-card input[type="text"],
:root[data-theme="light"] .repricer-control-group select,
:root[data-theme="light"] #repricer-schedule-mode {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

:root[data-theme="light"] .repricer-card select option,
:root[data-theme="light"] .repricer-control-group select option,
:root[data-theme="light"] #repricer-schedule-mode option {
    background: #ffffff !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .repricer-segment-control {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] .repricer-segment-btn {
    color: #475569 !important;
}

:root[data-theme="light"] .repricer-segment-btn:hover {
    color: #0284c7 !important;
}

:root[data-theme="light"] .repricer-segment-btn.active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
}

/* Metagame Module & Table Redesign */
:root[data-theme="light"] #metagame-module {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 110, 150, 0.08) !important;
}

:root[data-theme="light"] #metagame-module thead th {
    background: #eef2f8 !important;
    color: #334155 !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] .btn-meta-tab {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
    color: #475569 !important;
}

:root[data-theme="light"] .btn-meta-tab:hover {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
}

:root[data-theme="light"] .btn-meta-tab.active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
    text-shadow: none !important;
}

:root[data-theme="light"] .btn-meta-action {
    background: rgba(2, 132, 199, 0.1) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

:root[data-theme="light"] .btn-meta-action:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] .meta-tier-badge {
    background: rgba(2, 132, 199, 0.1) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.3) !important;
    box-shadow: none !important;
}

:root[data-theme="light"] #body-metagame tr td {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

:root[data-theme="light"] #body-metagame tr td div[style*="background: rgba(0, 0, 0, 0.4)"] {
    background: #e2e8f0 !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

/* Oracolo Switch Pills */
:root[data-theme="light"] #oracle-foil-switch-container,
:root[data-theme="light"] #oracle-condition-switch-container,
:root[data-theme="light"] #oracle-lang-switch-container {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] #oracle-switch-normal,
:root[data-theme="light"] #oracle-switch-foil,
:root[data-theme="light"] #oracle-switch-nm,
:root[data-theme="light"] #oracle-switch-sp,
:root[data-theme="light"] #oracle-switch-mp,
:root[data-theme="light"] #oracle-switch-hp,
:root[data-theme="light"] #oracle-switch-lang-ita-eng,
:root[data-theme="light"] #oracle-switch-lang-eng,
:root[data-theme="light"] #oracle-switch-lang-it,
:root[data-theme="light"] #oracle-switch-lang-jp,
:root[data-theme="light"] #oracle-switch-lang-fr,
:root[data-theme="light"] #oracle-switch-lang-de,
:root[data-theme="light"] #oracle-switch-lang-all {
    color: #334155 !important;
}

:root[data-theme="light"] #oracle-switch-normal.active,
:root[data-theme="light"] #oracle-switch-foil.active,
:root[data-theme="light"] #oracle-switch-nm.active,
:root[data-theme="light"] #oracle-switch-sp.active,
:root[data-theme="light"] #oracle-switch-mp.active,
:root[data-theme="light"] #oracle-switch-hp.active,
:root[data-theme="light"] #oracle-switch-lang-ita-eng.active,
:root[data-theme="light"] #oracle-switch-lang-eng.active,
:root[data-theme="light"] #oracle-switch-lang-it.active,
:root[data-theme="light"] #oracle-switch-lang-jp.active,
:root[data-theme="light"] #oracle-switch-lang-fr.active,
:root[data-theme="light"] #oracle-switch-lang-de.active,
:root[data-theme="light"] #oracle-switch-lang-all.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}

/* Modals */
:root[data-theme="light"] #first-login-coc-modal,
:root[data-theme="light"] #modal-withdraw-confirm {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
}

:root[data-theme="light"] #first-login-coc-modal > div,
:root[data-theme="light"] #modal-withdraw-confirm > div {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

/* Base AutoBuy Switch & Deal Pills */
.ab-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}
.ab-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.ab-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    transition: background-color .25s ease, border-color .25s ease;
    border-radius: 22px;
}
.ab-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3.5px;
    bottom: 3.5px;
    background-color: #a0aec0;
    transition: transform .25s ease, background-color .25s ease;
    border-radius: 50%;
}
.ab-switch input:checked + .ab-slider {
    background-color: rgba(0, 229, 255, 0.2);
    border-color: var(--primary, #00f2fe);
}
.ab-switch input:checked + .ab-slider:before {
    transform: translateX(22px);
    background-color: var(--primary, #00f2fe);
}

.deal-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.deal-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.deal-pill:hover {
    background: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.2);
}
.deal-pill input {
    display: none !important;
}
.deal-pill .pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    font-weight: bold;
    color: transparent;
    transition: all 0.25s ease;
}
.deal-pill .pill-badge::after {
    content: '';
}
.deal-pill input:checked + .pill-badge {
    background: var(--primary, #00f2fe);
    border-color: var(--primary, #00f2fe);
    color: #050b14;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.deal-pill input:checked + .pill-badge::after {
    content: '✓';
    color: #050b14;
}
.deal-pill:has(input:checked) {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 110, 255, 0.08) 100%) !important;
    border-color: rgba(0, 240, 255, 0.45) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

/* Deal Pills Light Theme Overrides */
:root[data-theme="light"] .deal-pill {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
    color: #475569 !important;
}

:root[data-theme="light"] .deal-pill:hover {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

:root[data-theme="light"] .deal-pill input:checked + .pill-badge {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}
:root[data-theme="light"] .deal-pill input:checked + .pill-badge::after {
    color: #ffffff !important;
}

/* Repricer Simulate Button & Modal (Cyber-Ice Light) */
:root[data-theme="light"] #btn-simulate-repricer {
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12) !important;
}

:root[data-theme="light"] #btn-simulate-repricer:hover {
    background: rgba(2, 132, 199, 0.16) !important;
    border-color: #0284c7 !important;
    color: #0369a1 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22) !important;
}

:root[data-theme="light"] #btn-simulate-repricer span:last-child {
    color: #475569 !important;
}

:root[data-theme="light"] #repricer-simulation-warn-modal {
    background: rgba(15, 23, 42, 0.45) !important;
}

:root[data-theme="light"] #repricer-simulation-warn-modal > div {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

:root[data-theme="light"] #repricer-simulation-warn-modal h3 {
    color: #0f172a !important;
}

:root[data-theme="light"] #repricer-simulation-warn-modal p {
    color: #475569 !important;
}

/* Warehouse Action Column & Completed Badge */
.wh-action-completed {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4ade80;
}

:root[data-theme="light"] .wh-action-completed {
    color: #15803d !important;
    font-weight: 700 !important;
}

:root[data-theme="light"] .wh-action-cell button {
    background: rgba(241, 245, 249, 0.9) !important;
    border: 1px solid rgba(148, 163, 184, 0.45) !important;
}

:root[data-theme="light"] .wh-action-cell button svg {
    color: #475569 !important;
}

:root[data-theme="light"] .wh-action-cell button:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

:root[data-theme="light"] .wh-action-cell button:hover svg {
    color: #ef4444 !important;
}

:root[data-theme="light"] .wh-action-cell button[onclick*="restoreWarehouseItem"] {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

:root[data-theme="light"] .wh-action-cell button[onclick*="restoreWarehouseItem"]:hover {
    background: rgba(2, 132, 199, 0.2) !important;
    border-color: #0284c7 !important;
}

/* CSV / Excel Drag & Drop Zone */
#csv-pricer-dropzone {
    border: 2px dashed rgba(0, 240, 255, 0.35);
    background: rgba(5, 15, 30, 0.4);
}

#csv-pricer-dropzone:hover,
#csv-pricer-dropzone.dragover {
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.08);
}

:root[data-theme="light"] #csv-pricer-dropzone {
    background: rgba(241, 245, 249, 0.85) !important;
    border: 2px dashed rgba(2, 132, 199, 0.45) !important;
}

:root[data-theme="light"] #csv-pricer-dropzone:hover,
:root[data-theme="light"] #csv-pricer-dropzone.dragover {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: #0284c7 !important;
}

:root[data-theme="light"] #csv-pricer-dropzone svg {
    stroke: #0284c7 !important;
}

:root[data-theme="light"] #csv-pricer-dropzone div[style*="font-size: 1rem"] {
    color: #0f172a !important;
    font-weight: 700 !important;
}

:root[data-theme="light"] #csv-pricer-dropzone div[style*="font-size: 0.8rem"] {
    color: #475569 !important;
}

:root[data-theme="light"] #csv-pricer-selected-file-info {
    color: #0284c7 !important;
}

/* Sorcerer Tools Deal Type Badges */
.badge-deal-type {
    font-weight: 700;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 5px;
    white-space: nowrap;
    display: inline-block;
}

.badge-deal-both {
    color: #a5f3fc;
    background: transparent;
    border: 1px solid rgba(165, 243, 252, 0.4);
}

.badge-deal-mg {
    color: #00e5ff;
    background: transparent;
    border: 1px solid rgba(0, 229, 255, 0.35);
}

.badge-deal-sf {
    color: #ff5e62;
    background: transparent;
    border: 1px solid rgba(255, 94, 98, 0.35);
}

.badge-deal-sets {
    color: #00f2fe;
    background: transparent;
    border: 1px solid rgba(0, 242, 254, 0.35);
}

.badge-deal-spikes {
    color: #ffb300;
    background: transparent;
    border: 1px solid rgba(255, 179, 0, 0.35);
}

:root[data-theme="light"] .badge-deal-both {
    color: #0369a1 !important;
    background: rgba(2, 132, 199, 0.1) !important;
    border: 1px solid rgba(2, 132, 199, 0.45) !important;
}

:root[data-theme="light"] .badge-deal-mg {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
}

:root[data-theme="light"] .badge-deal-sf {
    color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.08) !important;
    border: 1px solid rgba(220, 38, 38, 0.35) !important;
}

:root[data-theme="light"] .badge-deal-sets {
    color: #0369a1 !important;
    background: rgba(3, 105, 161, 0.08) !important;
    border: 1px solid rgba(3, 105, 161, 0.35) !important;
}

:root[data-theme="light"] .badge-deal-spikes {
    color: #d97706 !important;
    background: rgba(217, 119, 6, 0.08) !important;
    border: 1px solid rgba(217, 119, 6, 0.35) !important;
}

/* ========================================================
   ORACLE TRADE CALCULATOR (CALCOLATORE EQUITA' SCAMBI)
   ======================================================== */
.cyan-icon {
    fill: none;
    stroke: #00f0ff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trade-panel {
    background: rgba(10, 20, 38, 0.78);
    border: 1px solid rgba(0, 240, 255, 0.22);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    min-height: 480px;
}

.verdict-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    min-height: 480px;
}

.verdict-green {
    background: radial-gradient(circle at 50% 25%, rgba(16, 185, 129, 0.35) 0%, rgba(6, 78, 59, 0.85) 55%, rgba(4, 30, 25, 0.98) 100%) !important;
    border: 1.5px solid rgba(52, 211, 153, 0.7) !important;
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.35), inset 0 0 25px rgba(52, 211, 153, 0.18) !important;
}

.verdict-red {
    background: radial-gradient(circle at 50% 25%, rgba(239, 68, 68, 0.35) 0%, rgba(127, 29, 29, 0.85) 55%, rgba(40, 10, 15, 0.98) 100%) !important;
    border: 1.5px solid rgba(248, 113, 113, 0.7) !important;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.35), inset 0 0 25px rgba(248, 113, 113, 0.18) !important;
}

.verdict-cyan {
    background: radial-gradient(circle at 50% 25%, rgba(0, 240, 255, 0.28) 0%, rgba(3, 105, 161, 0.8) 55%, rgba(8, 25, 45, 0.98) 100%) !important;
    border: 1.5px solid rgba(0, 240, 255, 0.65) !important;
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.3), inset 0 0 25px rgba(0, 240, 255, 0.15) !important;
}

.verdict-neutral {
    background: rgba(13, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(0, 240, 255, 0.25) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) !important;
}

.trade-foil-btn {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    outline: none;
}

.trade-foil-btn.active-foil {
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.trade-foil-btn.active-reg {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
}

/* Light mode overrides per Trade Calculator */
:root[data-theme="light"] .trade-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
}

:root[data-theme="light"] .trade-foil-btn.active-reg {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

:root[data-theme="light"] .trade-foil-btn.active-foil {
    background: rgba(2, 132, 199, 0.15) !important;
    border: 1px solid #0284c7 !important;
    color: #0369a1 !important;
}

:root[data-theme="light"] .verdict-neutral {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .verdict-neutral #status-title,
:root[data-theme="light"] .verdict-neutral #status-delta-eur {
    color: #0f172a !important;
}

:root[data-theme="light"] .verdict-green {
    background: radial-gradient(circle at 50% 25%, rgba(16, 185, 129, 0.2) 0%, rgba(209, 250, 229, 0.9) 60%, rgba(240, 253, 244, 0.98) 100%) !important;
    border: 1.5px solid #10b981 !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.2) !important;
}

:root[data-theme="light"] .verdict-red {
    background: radial-gradient(circle at 50% 25%, rgba(239, 68, 68, 0.18) 0%, rgba(254, 226, 226, 0.9) 60%, rgba(255, 241, 242, 0.98) 100%) !important;
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.2) !important;
}

:root[data-theme="light"] .verdict-cyan {
    background: radial-gradient(circle at 50% 25%, rgba(2, 132, 199, 0.18) 0%, rgba(224, 242, 254, 0.9) 60%, rgba(240, 249, 255, 0.98) 100%) !important;
    border: 1.5px solid #0284c7 !important;
    box-shadow: 0 0 25px rgba(2, 132, 199, 0.2) !important;
}

:root[data-theme="light"] .cyan-icon {
    stroke: #0284c7 !important;
}

@media (max-width: 1024px) {
    .trade-panel,
    .verdict-card {
        grid-column: span 12 !important;
    }
}

/* ==========================================================================
   SMART DECK COMPOSER EMBEDDED DASHBOARD STYLES
   ========================================================================== */
.deck-composer-card {
    border: 1px solid rgba(0, 242, 254, 0.3);
    background: rgba(0, 242, 254, 0.02);
    margin-top: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.composer-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    width: 100%;
}
.composer-grid-2 > div {
    min-width: 0;
    max-width: 100%;
}
@media (max-width: 1200px) {
    .composer-grid-2 {
        grid-template-columns: 1fr;
    }
}

.deck-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-top: 10px;
    box-sizing: border-box !important;
}
.deck-table th, .deck-table td {
    box-sizing: border-box !important;
    padding: 6px 6px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    font-size: 0.82rem;
    overflow: hidden;
}
.deck-table-container {
    overflow-x: hidden !important;
    width: 100%;
    box-sizing: border-box !important;
}
.deck-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    padding-bottom: 8px;
    white-space: nowrap;
}
.deck-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.strategy-card {
    transition: all 0.2s ease-in-out;
}
.strategy-card:hover {
    border-color: rgba(0, 242, 254, 0.4) !important;
    background: rgba(0, 242, 254, 0.02) !important;
}

.summary-box {
    background: rgba(10, 15, 26, 0.6);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.summary-row span:last-child {
    color: #fff;
    font-weight: 600;
}
.summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #00ff87;
}
.summary-row:last-child span:last-child {
    color: #00ff87;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 8px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.autocomplete-item:hover {
    background: rgba(0, 242, 254, 0.1);
}
.autocomplete-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}
.autocomplete-subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.oracle-search-card-name {
    display: flex;
    align-items: baseline;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    gap: 6px;
}
.oracle-search-card-expansion {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}
.modal-box {
    background: #0f172a;
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 12px;
    padding: 24px;
    width: 550px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.8);
}

/* Light mode overrides for embedded deck composer */
:root[data-theme="light"] .deck-composer-card {
    border: 1px solid rgba(0, 180, 219, 0.3) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}
:root[data-theme="light"] .deck-table th {
    background: #eef2f8 !important;
    color: #334155 !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.25) !important;
}
:root[data-theme="light"] .deck-table td {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}
:root[data-theme="light"] .summary-box {
    background: rgba(241, 245, 249, 0.85) !important;
    border: 1px solid rgba(0, 180, 219, 0.22) !important;
}
:root[data-theme="light"] .summary-row span:last-child {
    color: #0f172a !important;
}
:root[data-theme="light"] .autocomplete-results {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.4) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}
:root[data-theme="light"] .autocomplete-item {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}
:root[data-theme="light"] .autocomplete-item:hover {
    background: rgba(2, 132, 199, 0.08) !important;
}
:root[data-theme="light"] .autocomplete-title {
    color: #0f172a !important;
}
:root[data-theme="light"] .modal-overlay {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
}
:root[data-theme="light"] .modal-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .strategy-card {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}
:root[data-theme="light"] #strategy-card-mix {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: #059669 !important;
}
:root[data-theme="light"] #comparison-box {
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid rgba(0, 180, 219, 0.3) !important;
}
:root[data-theme="light"] #comparison-box > div:first-child {
    color: #0284c7 !important;
}
:root[data-theme="light"] #checkout-limit-badge {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] #res-zero-cards-qty,
:root[data-theme="light"] #res-standard-cards-qty {
    color: #0f172a !important;
}
:root[data-theme="light"] #checkout-status-text {
    color: #0f172a !important;
}

/* --- DECK COMPOSER FULLSCREEN BUTTON & LIGHT MODE CONTAINER --- */
.btn-deck-fullscreen,
a.btn-deck-fullscreen,
a.btn-deck-fullscreen:visited {
    color: #00f2fe !important;
    background: rgba(0, 242, 254, 0.08) !important;
    border: 1px solid rgba(0, 242, 254, 0.35) !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15) !important;
    transition: all 0.25s ease;
}
.btn-deck-fullscreen:hover,
a.btn-deck-fullscreen:hover {
    background: rgba(0, 242, 254, 0.18) !important;
    border-color: #00f2fe !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.35) !important;
}
:root[data-theme="light"] .btn-deck-fullscreen,
:root[data-theme="light"] a.btn-deck-fullscreen,
:root[data-theme="light"] a.btn-deck-fullscreen:visited {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.1) !important;
}
:root[data-theme="light"] .btn-deck-fullscreen:hover,
:root[data-theme="light"] a.btn-deck-fullscreen:hover {
    background: rgba(2, 132, 199, 0.16) !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2) !important;
}

:root[data-theme="light"] .deck-table-container {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}
:root[data-theme="light"] .deck-table thead {
    background: #e2e8f0 !important;
}
:root[data-theme="light"] .deck-table thead th {
    color: #1e293b !important;
    background-color: #e2e8f0 !important;
    border-bottom: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .deck-table tbody tr td {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

/* --- TRADE CALCULATOR BASE & LIGHT MODE STYLING --- */
.trade-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.25);
    transition: all 0.2s ease;
}
.trade-search-box:focus-within {
    border-color: #00f0ff !important;
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2) !important;
}
.trade-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #ffffff;
    font-size: 0.82rem;
    font-family: inherit;
    padding: 2px 0 !important;
}
.trade-search-dropdown {
    background: rgba(10, 14, 26, 0.98);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
:root[data-theme="light"] .trade-search-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
}
:root[data-theme="light"] .trade-search-box:focus-within {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}
:root[data-theme="light"] .trade-search-input,
:root[data-theme="light"] .trade-search-box input {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .trade-search-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}
:root[data-theme="light"] .trade-dropdown-item {
    border-bottom-color: #f1f5f9 !important;
}
:root[data-theme="light"] .trade-dropdown-item:hover {
    background: #f1f5f9 !important;
}
:root[data-theme="light"] .trade-dropdown-name {
    color: #0f172a !important;
}
:root[data-theme="light"] .trade-dropdown-set {
    color: #64748b !important;
}
:root[data-theme="light"] .trade-dropdown-price div:first-child {
    color: #0284c7 !important;
}
.trade-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}
.trade-table th,
.trade-table td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
:root[data-theme="light"] .trade-table-container {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px;
}
:root[data-theme="light"] .trade-thead {
    background: #e2e8f0 !important;
}
:root[data-theme="light"] .trade-thead-row th {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
    border-bottom: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .trade-row {
    border-bottom-color: #e2e8f0 !important;
}
:root[data-theme="light"] .trade-card-name {
    color: #0f172a !important;
}
:root[data-theme="light"] .trade-card-meta {
    color: #64748b !important;
}
:root[data-theme="light"] .trade-col-price {
    color: #334155 !important;
}
:root[data-theme="light"] .trade-col-subtot {
    color: #0284c7 !important;
}
:root[data-theme="light"] .trade-stepper {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .trade-qty-val {
    color: #0f172a !important;
}
:root[data-theme="light"] #oracle-trade-empty-a,
:root[data-theme="light"] #oracle-trade-empty-b {
    color: #64748b !important;
}
:root[data-theme="light"] #oracle-trade-calculator-card {
    background: rgba(238, 242, 246, 0.96) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 110, 150, 0.05) !important;
}
:root[data-theme="light"] .trade-panel {
    background: #edf2f7 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    padding: 12px;
}
:root[data-theme="light"] #oracle-trade-side-a-header-total,
:root[data-theme="light"] #oracle-trade-side-b-header-total {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] #oracle-trade-side-a-bottom-total,
:root[data-theme="light"] #oracle-trade-side-b-bottom-total {
    color: #0284c7 !important;
}
:root[data-theme="light"] .verdict-card {
    background: #edf2f7 !important;
    border: 1px solid #e2e8f0 !important;
}
:root[data-theme="light"] .verdict-card div[style*="border-radius: 50%"] {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
:root[data-theme="light"] #oracle-trade-status-title {
    color: #0f172a !important;
}
:root[data-theme="light"] #oracle-trade-status-delta-eur {
    color: #0f172a !important;
    text-shadow: none !important;
}
:root[data-theme="light"] #oracle-trade-status-delta-pct {
    color: #0284c7 !important;
}
:root[data-theme="light"] button[onclick*="copyTradeReport"] {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] #oracle-trade-reset-btn {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

/* --- METAGAME DECKLIST DETAIL EXPANDED LIGHT MODE --- */
:root[data-theme="light"] .decklist-detail-cell {
    background: #f8fafc !important;
}
:root[data-theme="light"] .decklist-detail-cell > div {
    background: #f8fafc !important;
}
:root[data-theme="light"] .decklist-title {
    border-bottom-color: #cbd5e1 !important;
}
:root[data-theme="light"] .decklist-title-main {
    color: #0284c7 !important;
}
:root[data-theme="light"] .decklist-title-side {
    color: #0369a1 !important;
}
:root[data-theme="light"] .decklist-header-row {
    border-bottom-color: #cbd5e1 !important;
    color: #64748b !important;
}
:root[data-theme="light"] .decklist-item-row {
    border-bottom: 1px dotted #e2e8f0 !important;
}
:root[data-theme="light"] .decklist-card-qty {
    color: #0f172a !important;
}
:root[data-theme="light"] .decklist-card-name a.meta-card-link {
    color: #0284c7 !important;
    font-weight: 600 !important;
}
:root[data-theme="light"] .decklist-card-name a.meta-card-link:hover {
    color: #0369a1 !important;
}
:root[data-theme="light"] .decklist-price-scry {
    color: #0369a1 !important;
}
:root[data-theme="light"] .decklist-price-ct0 {
    color: #0284c7 !important;
    font-weight: 600 !important;
}

/* Selettori Switch Auto-Buy (Allineamento con Command Center e Matrice) */
:root[data-theme="light"] .ab-slider,
:root[data-theme="light"] .switch-slider {
    background-color: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
}

:root[data-theme="light"] .ab-slider:before,
:root[data-theme="light"] .switch-slider:before {
    background-color: #94a3b8 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

:root[data-theme="light"] .ab-switch input:checked + .ab-slider,
:root[data-theme="light"] .switch-track input:checked + .switch-slider {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.3) !important;
}

:root[data-theme="light"] .ab-switch input:checked + .ab-slider:before,
:root[data-theme="light"] .switch-track input:checked + .switch-slider:before {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

:root[data-theme="light"] .ab-switch input:disabled + .ab-slider,
:root[data-theme="light"] .switch-track input:disabled + .switch-slider {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Valutatore Liste Carte (3-Tier Waterfall) Light Mode */
:root[data-theme="light"] #csv-pricer-card {
    background: var(--glass-bg) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 20px rgba(0, 110, 150, 0.05) !important;
}
:root[data-theme="light"] .csv-pricer-desc {
    color: #475569 !important;
}
:root[data-theme="light"] .waterfall-hierarchy-box {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .waterfall-hierarchy-title {
    color: #0284c7 !important;
}
:root[data-theme="light"] .waterfall-tier-grid {
    color: #334155 !important;
}
:root[data-theme="light"] .waterfall-tier-card.tier-ct0 {
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #1e293b !important;
}
:root[data-theme="light"] .waterfall-tier-card.tier-ct0 .tier-title {
    color: #0284c7 !important;
}
:root[data-theme="light"] .waterfall-tier-card.tier-oracle {
    background: rgba(0, 180, 219, 0.08) !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    color: #1e293b !important;
}
:root[data-theme="light"] .waterfall-tier-card.tier-oracle .tier-title {
    color: #0369a1 !important;
}
:root[data-theme="light"] .waterfall-tier-card.tier-scryfall {
    background: rgba(99, 102, 241, 0.08) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #1e293b !important;
}
:root[data-theme="light"] .waterfall-tier-card.tier-scryfall .tier-title {
    color: #4338ca !important;
}

/* --- WISHLIST SUBTABLES (DEFAULT & LIGHT MODE) --- */
.wl-subtable-box {
    background: rgba(18, 26, 44, 0.88);
}
.wl-subtable-header {
    background: rgba(26, 38, 64, 0.95);
}
.wl-subtable-tr-head {
    background: rgba(30, 42, 70, 0.85);
}

:root[data-theme="light"] .wl-subtable-box {
    background: #ffffff !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}
:root[data-theme="light"] .wl-subtable-header {
    background: #f1f5f9 !important;
    border-bottom-color: rgba(2, 132, 199, 0.25) !important;
}
:root[data-theme="light"] .wl-subtable-header span[style*="color: #00f2fe"],
:root[data-theme="light"] .wl-subtable-header span[style*="color: #cbd5e1"] {
    color: #0f172a !important;
}
:root[data-theme="light"] .wl-subtable-tr-head {
    background: #f8fafc !important;
    border-bottom-color: rgba(226, 232, 240, 0.9) !important;
}
:root[data-theme="light"] .wl-subtable-tr-head th {
    color: #475569 !important;
}
:root[data-theme="light"] #wl-table-body td,
:root[data-theme="light"] #wl-deals-body td {
    color: #0f172a !important;
    border-bottom-color: #f1f5f9 !important;
}

/* --- MODULO IN EVIDENZA ORACOLO - LIGHT MODE --- */
:root[data-theme="light"] .oracle-featured-wrapper {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(2, 132, 199, 0.28) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}
:root[data-theme="light"] .oracle-featured-wrapper .subtable-card {
    background: #f8fafc !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}
:root[data-theme="light"] .oracle-featured-wrapper h3,
:root[data-theme="light"] .oracle-featured-wrapper [style*="color: #ffffff"],
:root[data-theme="light"] .oracle-featured-wrapper [style*="color: #fff"] {
    color: #0f172a !important;
}
:root[data-theme="light"] .oracle-featured-wrapper [style*="color: #00f0ff"] {
    color: #0284c7 !important;
}
:root[data-theme="light"] .oracle-featured-wrapper #rec-set-logo,
:root[data-theme="light"] .oracle-featured-wrapper #rising-set-logo,
:root[data-theme="light"] .oracle-featured-wrapper img[id*="-set-logo"] {
    filter: none !important;
}
:root[data-theme="light"] .oracle-featured-wrapper .rec-spikes-badge {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .oracle-featured-wrapper button[id*="btn-inspect"] {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

/* ==========================================================================
   MANASENTRY DASHBOARD FOOTER & MODALS (DARK & LIGHT THEMES)
   ========================================================================== */
.ms-footer {
    width: 100%;
    margin-top: 35px;
    margin-bottom: 0;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(8, 12, 22, 0.95) 0%, rgba(4, 7, 14, 1) 100%);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--text-color);
    padding: 24px 0 18px 0;
    position: relative;
    z-index: 10;
}

:root[data-theme="light"] .ms-footer {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-top: 1px solid rgba(0, 180, 219, 0.3);
    color: #0f172a;
}

.ms-footer-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ms-footer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .ms-footer-header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.ms-footer-brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ms-header-logo,
.ms-footer-logo {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.5));
    vertical-align: middle;
    transition: all 0.2s ease;
}

:root[data-theme="light"] .ms-header-logo,
:root[data-theme="light"] .ms-footer-logo {
    filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.25));
}

.ms-brand-title,
.ms-footer-brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.1;
    display: inline-block;
    font-family: 'Outfit', sans-serif;
}

.ms-brand-title .mana-part,
.ms-footer-brand-title .mana-part {
    background: linear-gradient(135deg, #e0f2fe 0%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.ms-brand-title .sentry-part,
.ms-footer-brand-title .sentry-part {
    background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

:root[data-theme="light"] .ms-brand-title .mana-part,
:root[data-theme="light"] .ms-footer-brand-title .mana-part {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

:root[data-theme="light"] .ms-brand-title .sentry-part,
:root[data-theme="light"] .ms-footer-brand-title .sentry-part {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.ms-brand-version,
.ms-footer-version {
    font-size: 0.70rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    vertical-align: middle;
}

:root[data-theme="light"] .ms-brand-version,
:root[data-theme="light"] .ms-footer-version {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
}

.ms-footer-tagline {
    margin: 0;
    font-size: 0.80rem;
    color: var(--text-muted);
    max-width: 100%;
    line-height: 1.4;
}

/* Banner Suite Pro orizzontale compatto in alto a destra */
.ms-footer-pro-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.06) 0%, rgba(0, 110, 255, 0.03) 100%);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 8px;
    padding: 8px 14px;
    max-width: 500px;
    flex: 0 1 500px;
    transition: all 0.25s ease;
}

.ms-footer-pro-banner:hover {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.12);
}

:root[data-theme="light"] .ms-footer-pro-banner {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(3, 105, 161, 0.04) 100%);
    border-color: rgba(2, 132, 199, 0.3);
}

:root[data-theme="light"] .ms-footer-pro-banner:hover {
    border-color: rgba(2, 132, 199, 0.5);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.15);
}

.ms-footer-pro-banner-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ms-footer-pro-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.35);
    padding: 1px 5px;
    border-radius: 4px;
}

:root[data-theme="light"] .ms-footer-pro-badge {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.12);
    border-color: rgba(2, 132, 199, 0.35);
}

.ms-footer-pro-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
}

:root[data-theme="light"] .ms-footer-pro-title {
    color: #0f172a;
}

.ms-footer-pro-desc {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

:root[data-theme="light"] .ms-footer-pro-desc {
    color: #64748b;
}

.ms-footer-pro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: #00f0ff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.ms-footer-pro-btn:hover {
    background: rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    color: #ffffff;
}

:root[data-theme="light"] .ms-footer-pro-btn {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

:root[data-theme="light"] .ms-footer-pro-btn:hover {
    background: #0369a1;
}

/* Griglia 4 Colonne a larghezza piena */
.ms-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2.8fr 0.8fr;
    gap: 32px;
    width: 100%;
}

.ms-footer-features-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    align-items: center;
    margin: 0;
    height: 17px;
}

.ms-footer-features-grid,
.ms-footer-triple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.ms-footer-community-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.ms-footer-dual-grid {
    display: grid;
    gap: 6px 18px;
}

@media (max-width: 1150px) {
    .ms-footer-container {
        padding: 0 20px;
    }
    .ms-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .ms-footer-col-features {
        grid-column: span 2;
    }
    .ms-footer-pro-banner {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .ms-footer-features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ms-footer-community-cols {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .ms-footer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ms-footer-col-features {
        grid-column: span 1;
    }
    .ms-footer-dual-grid {
        grid-template-columns: 1fr;
    }
    .ms-footer-pro-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .ms-footer-col-title-center,
    .ms-footer-community-header-center {
        justify-content: flex-start !important;
        text-align: left !important;
    }
}

.ms-footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ms-footer-col-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #00f0ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

:root[data-theme="light"] .ms-footer-col-title {
    color: #0284c7;
}

.ms-footer-col-title-center {
    justify-content: center;
    text-align: center;
    width: 100%;
}

.ms-footer-head-svg,
.ms-footer-col-title svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

.ms-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-footer-links li a {
    font-size: 0.79rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

:root[data-theme="light"] .ms-footer-links li a {
    color: #475569;
    font-weight: 500;
}

.ms-footer-links li a:hover {
    color: #00f2fe;
    transform: translateX(4px);
}

:root[data-theme="light"] .ms-footer-links li a:hover {
    color: #0284c7;
}

/* Sotto-colonne Funzionalità */
.ms-footer-subcol,
.ms-footer-group-community,
.ms-footer-group-pro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-footer-subcol-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ms-footer-community-header-center {
    justify-content: center;
    text-align: center;
    width: 100%;
}

:root[data-theme="light"] .ms-footer-subcol-header {
    color: #64748b;
}

.ms-dot-cyan {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00f0ff;
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
    display: inline-block;
}

:root[data-theme="light"] .ms-dot-cyan {
    background-color: #0284c7;
    box-shadow: 0 0 4px rgba(2, 132, 199, 0.4);
}

/* Badge in testata alla colonna Pro */
.ms-footer-pro-col-header {
    margin: 0;
    display: flex;
    align-items: center;
    height: 17px;
}

.ms-badge-pro-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    background: rgba(0, 240, 255, 0.12);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

:root[data-theme="light"] .ms-badge-pro-tag {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #7dd3fc;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1);
}

.ms-badge-star-icon {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    flex-shrink: 0;
}

/* Link voci footer con animazione e icone vettoriali ciano */
.ms-footer-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.79rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

:root[data-theme="light"] .ms-footer-feature-link {
    color: #334155;
    font-weight: 500;
}

.ms-footer-feature-link:hover {
    color: #00f0ff;
    transform: translateX(4px);
}

:root[data-theme="light"] .ms-footer-feature-link:hover {
    color: #0284c7;
}

.ms-feature-icon-cyan {
    width: 9px;
    height: 9px;
    fill: none;
    stroke: #00f0ff;
    stroke-width: 2.2;
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

:root[data-theme="light"] .ms-feature-icon-cyan {
    stroke: #0284c7;
}

/* POPOVER FUMETTO INFORMATIVO CIANO (Interactive Speech Bubble) */
.ms-feature-bubble {
    position: absolute;
    z-index: 1050;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #08121e;
    border: 1.5px solid #00f0ff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.25), 0 12px 32px rgba(0, 0, 0, 0.8);
    color: #e2e8f0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    animation: bubbleFadeIn 0.2s ease-out;
}

:root[data-theme="light"] .ms-feature-bubble {
    background: #ffffff;
    border: 1.5px solid #0284c7;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.22), 0 4px 14px rgba(0, 0, 0, 0.08);
    color: #1e293b;
}

@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ms-bubble-arrow {
    display: none !important;
}

.ms-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ms-bubble-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ms-bubble-badge-pro {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.35);
}

:root[data-theme="light"] .ms-bubble-badge-pro {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #7dd3fc;
}

.ms-bubble-badge-community {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

:root[data-theme="light"] .ms-bubble-badge-community {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.ms-bubble-title {
    margin: 0;
    font-size: 0.90rem;
    font-weight: 700;
    color: #ffffff;
    flex-grow: 1;
    line-height: 1.3;
}

:root[data-theme="light"] .ms-bubble-title {
    color: #0f172a;
}

.ms-bubble-close-btn {
    background: transparent;
    border: none;
    color: #00f0ff;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

:root[data-theme="light"] .ms-bubble-close-btn {
    color: #0284c7;
}

.ms-bubble-close-btn:hover {
    background: rgba(0, 240, 255, 0.15);
}

:root[data-theme="light"] .ms-bubble-close-btn:hover {
    background: #e0f2fe;
}

.ms-bubble-close-svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
}

.ms-bubble-content {
    font-size: 0.78rem;
    line-height: 1.48;
    color: #cbd5e1;
    margin-bottom: 12px;
}

:root[data-theme="light"] .ms-bubble-content {
    color: #334155;
}

/* Badge requisito scanner in prima riga */
.ms-scanner-req-badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: #38bdf8;
}

:root[data-theme="light"] .ms-scanner-req-badge {
    background: #f0f9ff;
    border: 1px solid #7dd3fc;
    color: #0369a1;
}

.ms-bubble-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 240, 255, 0.18);
    margin-top: 4px;
}

:root[data-theme="light"] .ms-bubble-footer {
    border-top-color: rgba(2, 132, 199, 0.2);
}

.ms-bubble-brand-tag {
    font-size: 0.68rem;
    font-weight: 600;
    color: #00f0ff;
    letter-spacing: 0.4px;
}

:root[data-theme="light"] .ms-bubble-brand-tag {
    color: #0284c7;
}

.ms-bubble-action-btn {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ms-bubble-btn-open {
    background: #00f0ff;
    color: #08121e;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.ms-bubble-btn-open:hover {
    background: #38bdf8;
    transform: translateY(-1px);
}

:root[data-theme="light"] .ms-bubble-btn-open {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

:root[data-theme="light"] .ms-bubble-btn-open:hover {
    background: #0369a1;
}

.ms-bubble-btn-pro {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border: 1px solid #00f0ff;
}

.ms-bubble-btn-pro:hover {
    background: #00f0ff;
    color: #08121e;
}

:root[data-theme="light"] .ms-bubble-btn-pro {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #0284c7;
}

:root[data-theme="light"] .ms-bubble-btn-pro:hover {
    background: #0284c7;
    color: #ffffff;
}

/* Compatibilità con .ms-footer-pro-card come alias */
.ms-footer-pro-card {
    display: none;
}

/* Bottom Bar */
.ms-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .ms-footer-bottom {
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.ms-footer-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
    color: #64748b;
    flex: 1;
    min-width: 300px;
    max-width: 100%;
}

.ms-footer-disclaimer {
    font-size: 0.70rem;
    line-height: 1.4;
    color: #475569;
}

:root[data-theme="light"] .ms-footer-disclaimer {
    color: #64748b;
}

.ms-footer-scroll-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    color: #00f0ff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ms-footer-scroll-top:hover {
    background: rgba(0, 240, 255, 0.18);
    border-color: #00f0ff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
    transform: translateY(-2px);
}

:root[data-theme="light"] .ms-footer-scroll-top {
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.3);
    color: #0284c7;
}

/* Modals Stili Generali */
.footer-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 8, 18, 0.88);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.footer-modal-box {
    background: linear-gradient(180deg, #0e1626 0%, #070b14 100%);
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.25), 0 20px 40px rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    padding: 26px;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 88vh;
    animation: wlModalPop 0.25s ease-out;
}

:root[data-theme="light"] .footer-modal-box {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.4);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.18), 0 0 20px rgba(2, 132, 199, 0.15);
    color: #0f172a;
}

.footer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding-bottom: 14px;
}

:root[data-theme="light"] .footer-modal-header {
    border-bottom: 1px solid rgba(2, 132, 199, 0.2);
}

.footer-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #00f0ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

:root[data-theme="light"] .footer-modal-title {
    color: #0284c7;
}

.footer-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.footer-modal-close:hover {
    color: #ff416c;
}

.footer-modal-body {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 18px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #cbd5e1;
    overflow-y: auto;
    max-height: 55vh;
}

:root[data-theme="light"] .footer-modal-body {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.footer-modal-body p {
    margin-bottom: 12px;
}

.footer-modal-body strong {
    color: #ffffff;
}

:root[data-theme="light"] .footer-modal-body strong {
    color: #0f172a;
}

.footer-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .footer-modal-footer {
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

/* ================================================================= */
/* ORACLE SETS VIEW - THEME SYSTEM (DARK & LIGHT MODE)               */
/* ================================================================= */
.oracle-sets-controls-card {
    background: rgba(13, 23, 42, 0.7);
    border: 1px solid rgba(0, 180, 219, 0.25);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

:root[data-theme="light"] .oracle-sets-controls-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

.oracle-sets-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #070d19;
    border: 1px solid rgba(0, 180, 219, 0.35);
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}
.oracle-sets-search-box:focus-within {
    border-color: #00e5ff !important;
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25) !important;
}

:root[data-theme="light"] .oracle-sets-search-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
:root[data-theme="light"] .oracle-sets-search-box:focus-within {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}

.oracle-sets-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 700;
    outline: none !important;
    box-shadow: none !important;
    padding: 2px 0 !important;
}

:root[data-theme="light"] .oracle-sets-search-input,
:root[data-theme="light"] .oracle-sets-search-box input {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-sets-search-input::placeholder {
    color: #94a3b8 !important;
}

.oracle-sets-pill-group-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    text-align: center;
}

:root[data-theme="light"] .oracle-sets-pill-group-label {
    color: #64748b !important;
}

.oracle-sets-pill-box {
    display: inline-flex;
    background: rgba(7, 13, 25, 0.9);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 2px 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

:root[data-theme="light"] .oracle-sets-pill-box {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}

.oracle-sets-pill {
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    background: transparent;
    transition: all 0.2s ease;
}

.oracle-sets-pill.active {
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%) !important;
    box-shadow: 0 1px 6px rgba(0, 180, 219, 0.35) !important;
}

:root[data-theme="light"] .oracle-sets-pill {
    color: #64748b !important;
}

:root[data-theme="light"] .oracle-sets-pill.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3) !important;
}

.oracle-sets-btn-csv {
    padding: 6px 14px;
    background: rgba(0, 180, 219, 0.15);
    border: 1px solid rgba(0, 180, 219, 0.4);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

:root[data-theme="light"] .oracle-sets-btn-csv {
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

:root[data-theme="light"] .oracle-sets-btn-csv:hover {
    background: rgba(2, 132, 199, 0.16) !important;
    border-color: #0284c7 !important;
}

/* 4 CARD KPI */
.oracle-sets-kpi-card {
    background: rgba(13, 23, 42, 0.6);
    border: 1px solid rgba(0, 180, 219, 0.25);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

:root[data-theme="light"] .oracle-sets-kpi-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

.oracle-sets-kpi-label {
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

:root[data-theme="light"] .oracle-sets-kpi-label {
    color: #64748b !important;
}

.oracle-sets-kpi-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    font-family: monospace;
}

:root[data-theme="light"] .oracle-sets-kpi-val {
    color: #0f172a !important;
}

.oracle-sets-kpi-subrow {
    margin-top: 8px;
    font-size: 0.72rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

:root[data-theme="light"] .oracle-sets-kpi-subrow {
    color: #64748b !important;
    border-top: 1px solid #f1f5f9 !important;
}

.oracle-sets-kpi-subval {
    color: #ffffff;
    font-weight: 700;
}

:root[data-theme="light"] .oracle-sets-kpi-subval {
    color: #0f172a !important;
}

:root[data-theme="light"] #oracle-kpi-mode-tag {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] #oracle-kpi-chase-names {
    color: #475569 !important;
    border-top: 1px solid #f1f5f9 !important;
}

/* TABELLA CARTE A 6 COLONNE */
.oracle-sets-table-card {
    background: rgba(13, 23, 42, 0.7);
    border: 1px solid rgba(0, 180, 219, 0.25);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

:root[data-theme="light"] .oracle-sets-table-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

.oracle-sets-table-header {
    padding: 12px 16px;
    background: #070d19;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

:root[data-theme="light"] .oracle-sets-table-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.oracle-sets-table-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

:root[data-theme="light"] .oracle-sets-table-title {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-sets-table-title svg {
    stroke: #0284c7 !important;
}

:root[data-theme="light"] #oracle-table-card-counter {
    color: #0284c7 !important;
}

.oracle-sets-input-control {
    background: #0d172a;
    border: 1px solid rgba(0, 180, 219, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    color: #ffffff;
    outline: none;
}

:root[data-theme="light"] .oracle-sets-input-control {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-sets-input-control::placeholder {
    color: #94a3b8 !important;
}

.oracle-sets-table thead {
    background: #070d19;
    color: #94a3b8;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    user-select: none;
}

:root[data-theme="light"] .oracle-sets-table thead {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

:root[data-theme="light"] .oracle-sets-table thead th div {
    color: #475569 !important;
}

:root[data-theme="light"] .oracle-sets-table thead th.th-price-calc {
    background: rgba(2, 132, 199, 0.08) !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
}

:root[data-theme="light"] .oracle-sets-table thead th.th-price-calc div {
    color: #0284c7 !important;
}

:root[data-theme="light"] #oracle-sort-icon-price {
    color: #0284c7 !important;
}

/* RIGHE TABELLA CARTE */
.oracle-card-row-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.78rem;
    font-family: sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

:root[data-theme="light"] .oracle-card-row-title {
    color: #0f172a !important;
}

.oracle-card-row-sub {
    color: #94a3b8;
    font-size: 0.67rem;
    font-family: sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
    display: inline-block;
    max-width: 100%;
}

:root[data-theme="light"] .oracle-card-row-sub {
    color: #64748b !important;
}

.oracle-card-row-price {
    font-weight: 800;
    color: #ffffff;
    font-size: 0.82rem;
}

:root[data-theme="light"] .oracle-card-row-price {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-sets-table tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
}

:root[data-theme="light"] .oracle-sets-table tbody tr:hover {
    background: #f8fafc !important;
}

:root[data-theme="light"] .oracle-sets-table tbody tr td.td-price-calc {
    background: rgba(2, 132, 199, 0.03) !important;
    border-left: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
}

/* FOOTER TABELLA */
.oracle-sets-table-footer {
    padding: 10px 16px;
    background: #070d19;
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 10px;
}

:root[data-theme="light"] .oracle-sets-table-footer {
    background: #f8fafc !important;
    color: #64748b !important;
    border-top: 1px solid #e2e8f0 !important;
}

:root[data-theme="light"] #oracle-table-showing-info {
    color: #475569 !important;
    font-weight: 600 !important;
}

:root[data-theme="light"] .oracle-sets-page-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-sets-page-indicator {
    color: #0284c7 !important;
}

/* EMPTY STATE & DROPDOWN */
:root[data-theme="light"] .oracle-sets-empty-title {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-sets-empty-desc {
    color: #64748b !important;
}

:root[data-theme="light"] .oracle-sets-empty-icon {
    stroke: #0284c7 !important;
    filter: drop-shadow(0 0 6px rgba(2, 132, 199, 0.25)) !important;
}

:root[data-theme="light"] #oracle-set-autocomplete-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12) !important;
}

:root[data-theme="light"] .oracle-set-drop-title {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-set-drop-sub {
    color: #64748b !important;
}

:root[data-theme="light"] .oracle-set-drop-code {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] .oracle-set-symbol-img {
    filter: none !important;
}

.oracle-set-symbol-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

/* Dropdown Voci Autocomplete */
.oracle-set-drop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.oracle-set-drop-item:hover {
    background: rgba(0, 180, 219, 0.2);
}

.oracle-set-drop-item.selected {
    background: rgba(0, 180, 219, 0.15);
}

:root[data-theme="light"] .oracle-set-drop-item {
    border-bottom: 1px solid #f1f5f9 !important;
}

:root[data-theme="light"] .oracle-set-drop-item:hover {
    background: rgba(2, 132, 199, 0.08) !important;
}

:root[data-theme="light"] .oracle-set-drop-item.selected {
    background: rgba(2, 132, 199, 0.12) !important;
}

.oracle-set-drop-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.82rem;
}

.oracle-set-drop-sub {
    color: #94a3b8;
    font-size: 0.70rem;
}

.oracle-set-drop-code {
    font-family: monospace;
    font-weight: 700;
    color: #00e5ff;
    font-size: 0.72rem;
    background: #070d19;
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Etichette Rarità KPI */
.oracle-rarity-lbl-mythic { color: #ff3b30; font-weight: 800; }
.oracle-rarity-lbl-rare { color: #ffd700; font-weight: 800; }
:root[data-theme="light"] .oracle-rarity-lbl-rare { color: #b45309 !important; }
.oracle-rarity-lbl-uncommon { color: #cbd5e1; font-weight: 600; }
:root[data-theme="light"] .oracle-rarity-lbl-uncommon { color: #475569 !important; }
.oracle-rarity-lbl-common { color: #64748b; font-weight: 600; }
:root[data-theme="light"] .oracle-rarity-lbl-common { color: #64748b !important; }

/* Badge Fonte Prezzo */
.oracle-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
}

.oracle-source-badge-ct0 {
    font-weight: 700;
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.3);
}

:root[data-theme="light"] .oracle-source-badge-ct0 {
    background: rgba(2, 132, 199, 0.1) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.3) !important;
}

.oracle-source-badge-scryfall {
    font-weight: 600;
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

:root[data-theme="light"] .oracle-source-badge-scryfall {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.oracle-source-badge-na {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

:root[data-theme="light"] .oracle-source-badge-na {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Colonne Tabella Extra */
.oracle-card-row-cn {
    color: #94a3b8;
}

:root[data-theme="light"] .oracle-card-row-cn {
    color: #64748b !important;
}

.oracle-card-row-rarity {
    color: #cad3f5;
    font-weight: 500;
}

:root[data-theme="light"] .oracle-card-row-rarity {
    color: #334155 !important;
}

.oracle-card-stock-pos {
    color: #00e5ff;
    font-weight: 700;
}

:root[data-theme="light"] .oracle-card-stock-pos {
    color: #0284c7 !important;
}

.oracle-card-stock-zero {
    color: #64748b;
}

:root[data-theme="light"] .oracle-card-stock-zero {
    color: #94a3b8 !important;
}

.oracle-price-na {
    color: #64748b;
    font-weight: 600;
}

:root[data-theme="light"] .oracle-price-na {
    color: #94a3b8 !important;
}

/* ==========================================================================
   TOTEM DI VENDITA (BUYLIST MANASENTRY) - DARK & LIGHT THEMES
   ========================================================================== */
.totem-dropzone {
    border: 2px dashed rgba(0, 242, 254, 0.35);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(0, 242, 254, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.totem-dropzone:hover,
.totem-dropzone.dragover {
    border-color: #00f2fe;
    background: rgba(0, 242, 254, 0.07);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.18);
}

:root[data-theme="light"] .totem-dropzone {
    background: #f8fafc;
    border-color: #0284c7;
}

:root[data-theme="light"] .totem-dropzone:hover,
:root[data-theme="light"] .totem-dropzone.dragover {
    background: #f0f9ff;
    border-color: #0369a1;
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.2);
}

.totem-dropzone-svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: #00f2fe;
    stroke-width: 1.8;
    margin-bottom: 8px;
}

:root[data-theme="light"] .totem-dropzone-svg {
    stroke: #0284c7;
}

.totem-dropzone-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 4px;
}

:root[data-theme="light"] .totem-dropzone-title {
    color: #0f172a !important;
}

.totem-dropzone-subtitle {
    font-size: 0.80rem;
    color: var(--text-muted, #94a3b8);
    max-width: 600px;
    line-height: 1.4;
}

:root[data-theme="light"] .totem-dropzone-subtitle {
    color: #475569 !important;
}

.totem-manual-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px;
    margin-top: 15px;
}

:root[data-theme="light"] .totem-manual-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.totem-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.totem-kpi-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
}

:root[data-theme="light"] .totem-kpi-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.totem-kpi-highlight {
    border-color: rgba(0, 242, 254, 0.4);
    background: rgba(0, 242, 254, 0.05);
}

:root[data-theme="light"] .totem-kpi-highlight {
    background: #f0f9ff;
    border-color: #0284c7;
}

.totem-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 4px;
    font-weight: 600;
}

:root[data-theme="light"] .totem-kpi-label {
    color: #64748b !important;
}

.totem-kpi-value {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: monospace;
    color: var(--text-primary, #ffffff);
}

:root[data-theme="light"] .totem-kpi-value {
    color: #0f172a !important;
}

#totem-draft-table th,
#totem-draft-table td {
    vertical-align: middle !important;
}

#totem-draft-table td {
    padding: 6px 8px !important;
}

.totem-submit-panel {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px;
    margin-top: 15px;
}

:root[data-theme="light"] .totem-submit-panel {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Vignetta Avviso Prezzo Desiderato: Blu con scritte ciano e SVG outline */
.totem-desired-callout {
    background: #0a192f;
    border: 1px solid #00f2fe;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.22);
}

:root[data-theme="light"] .totem-desired-callout {
    background: #e0f2fe;
    border: 1px solid #0284c7;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.18);
}

.totem-callout-svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    fill: none;
    stroke: #00f2fe;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

:root[data-theme="light"] .totem-callout-svg {
    stroke: #0284c7;
}

.totem-callout-text {
    color: #00f2fe;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

:root[data-theme="light"] .totem-callout-text {
    color: #0369a1;
}

/* Badge ammissibilità / stato */
.totem-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.totem-badge-accepted {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

:root[data-theme="light"] .totem-badge-accepted {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.totem-badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

:root[data-theme="light"] .totem-badge-rejected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.totem-row-rejected {
    opacity: 0.45;
}

.totem-set-pill {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
}

:root[data-theme="light"] .totem-set-pill {
    background: #e2e8f0;
    color: #0f172a;
}

.totem-cond-pill {
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 242, 254, 0.08);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.25);
}

:root[data-theme="light"] .totem-cond-pill {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.totem-foil-tag {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.70rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: inline-block;
}

.totem-btn-del {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.totem-btn-del:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

/* Status badges */
.totem-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
}

.totem-status-submitted, .totem-status-evaluating {
    background: rgba(0, 242, 254, 0.12);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.3);
}

.totem-status-ready {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.totem-status-accepted {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.totem-status-shipped {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.totem-status-verifying {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.totem-status-paid {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.totem-status-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

:root[data-theme="light"] .totem-status-submitted,
:root[data-theme="light"] .totem-status-evaluating {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
}

:root[data-theme="light"] .totem-status-ready {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

:root[data-theme="light"] .totem-status-accepted {
    background: #d1fae5;
    color: #047857;
    border-color: #a7f3d0;
}

:root[data-theme="light"] .totem-status-shipped {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

:root[data-theme="light"] .totem-status-verifying {
    background: #f3e8ff;
    color: #7e22ce;
    border-color: #d8b4fe;
}

:root[data-theme="light"] .totem-status-paid {
    background: #d1fae5;
    color: #065f46;
    border-color: #34d399;
}

:root[data-theme="light"] .totem-status-rejected {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* --- TOTEM SEARCH AUTOCOMPLETE & HOVER PREVIEW --- */
.totem-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 320px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

.totem-search-item {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}

.totem-search-item:last-child {
    border-bottom: none;
}

.totem-search-item:hover {
    background: rgba(0, 242, 254, 0.12);
}

.totem-search-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.totem-search-meta {
    font-size: 0.70rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.totem-set-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.totem-search-price {
    font-family: monospace;
    font-size: 0.84rem;
    font-weight: 700;
    color: #00f2fe;
    text-align: right;
    white-space: nowrap;
    margin-left: 10px;
}

.totem-card-preview-link {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.15s ease;
}

.totem-card-preview-link:hover {
    color: #00f2fe !important;
    text-decoration: underline;
}

/* Light Mode Overrides */
:root[data-theme="light"] .totem-search-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

:root[data-theme="light"] .totem-search-item {
    border-bottom-color: #f1f5f9 !important;
}

:root[data-theme="light"] .totem-search-item:hover {
    background: #f0f9ff !important;
}

:root[data-theme="light"] .totem-search-name {
    color: #0f172a !important;
}

:root[data-theme="light"] .totem-search-meta {
    color: #64748b !important;
}

:root[data-theme="light"] .totem-set-logo {
    filter: brightness(0.2) !important;
}

:root[data-theme="light"] .totem-search-price {
    color: #0284c7 !important;
}

:root[data-theme="light"] .totem-card-preview-link:hover {
    color: #0284c7 !important;
}

/* ==========================================================================
   TOTEM DI VENDITA: MODALE VERSIONI ED ANTEPRIMA FLUTTUANTE
   ========================================================================== */
#card-image-preview {
    z-index: 999999 !important;
}

.totem-lock-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: #00f2fe;
}

.totem-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.totem-modal-box {
    background: #0b1329;
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 242, 254, 0.2);
    width: 100%;
    max-width: 780px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: totemFadeIn 0.2s ease-out;
}

@keyframes totemFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.totem-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.9);
}

.totem-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.totem-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.totem-versions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 10px;
    padding: 16px;
    overflow-y: auto;
    max-height: 60vh;
}

.totem-version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: all 0.2s ease;
}

.totem-version-item:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: rgba(0, 242, 254, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.15);
}

.totem-version-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.totem-version-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.totem-version-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.totem-version-price-tag {
    text-align: right;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8;
    white-space: nowrap;
}

:root[data-theme="light"] .totem-modal-box {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

:root[data-theme="light"] .totem-modal-header {
    background: #f8fafc !important;
}

:root[data-theme="light"] #totem-versions-modal-title {
    color: #0f172a !important;
}

:root[data-theme="light"] .totem-version-item {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

:root[data-theme="light"] .totem-version-item:hover {
    background: #f0f9ff !important;
    border-color: #0284c7 !important;
}

:root[data-theme="light"] .totem-version-title {
    color: #0f172a !important;
}

/* ========================================================
   TOTEM THUMBNAILS & FLOATING PREVIEW (HOVER)
   ======================================================== */
#card-image-preview {
    position: fixed !important;
    z-index: 9999999 !important;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(0, 242, 254, 0.2);
    display: none;
}

.totem-card-table-thumb {
    width: 28px;
    height: 39px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    transition: transform 0.15s ease;
    cursor: pointer;
}

.totem-card-table-thumb:hover {
    transform: scale(1.08);
    border-color: #00f2fe;
}

#totem-draft-table td,
#totem-draft-table th {
    padding: 6px 6px !important;
    vertical-align: middle !important;
}

#totem-draft-table th {
    line-height: 1.1 !important;
    font-size: 0.74rem !important;
}

#totem-draft-table td:nth-child(1),
#totem-draft-table td:nth-child(2) {
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

#totem-draft-table .totem-set-pill {
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

/* Totem Draft Filter Pills */
.totem-filter-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.totem-filter-pill:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: rgba(0, 242, 254, 0.3);
    color: #ffffff;
}

.totem-filter-pill.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

:root[data-theme="light"] .totem-filter-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

:root[data-theme="light"] .totem-filter-pill:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0f172a;
}

:root[data-theme="light"] .totem-filter-pill.active {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0284c7;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.2);
}

:root[data-theme="light"] #totem-rejected-summary-alert {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}

:root[data-theme="light"] #totem-rejected-summary-alert svg {
    stroke: #dc2626 !important;
}

.totem-version-thumb {
    width: 48px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.totem-version-thumb:hover {
    transform: scale(1.04);
    border-color: #00f2fe;
}

.totem-search-thumb {
    width: 32px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* Totem Dynamic Multi-Factor Badges */
.totem-badge-container {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 4px;
}

.totem-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

.totem-badge-staple {
    background: rgba(0, 242, 254, 0.15) !important;
    color: #00f2fe !important;
    border: 1px solid rgba(0, 242, 254, 0.45) !important;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.25) !important;
}

.totem-badge-variant {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
}

.totem-badge-foil {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
}

.totem-badge-mp {
    background: rgba(249, 115, 22, 0.15) !important;
    color: #fb923c !important;
    border: 1px solid rgba(249, 115, 22, 0.45) !important;
}

.totem-badge-gd {
    background: rgba(234, 179, 8, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

.totem-badge-lang {
    background: rgba(250, 204, 21, 0.12) !important;
    color: #facc15 !important;
    border: 1px solid rgba(250, 204, 21, 0.35) !important;
}

.totem-badge-qty-decay {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
}

.totem-badge-overstock {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    font-weight: 800 !important;
}

.totem-badge-excess-warning {
    background: rgba(220, 38, 38, 0.25) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(220, 38, 38, 0.6) !important;
    font-weight: 700 !important;
}

/* Oracolo Set Icons: invertite in Dark Mode, native nere in Light Mode */
.oracle-set-icon {
    filter: brightness(0.9) invert(1);
    transition: filter 0.2s ease;
}

:root[data-theme="light"] .oracle-set-icon,
body.light-theme .oracle-set-icon,
[data-theme="light"] .oracle-set-icon {
    filter: none !important;
}

/* Contrasto testi Oracolo in Light Mode */
:root[data-theme="light"] #oracle-singles-view,
body.light-theme #oracle-singles-view,
[data-theme="light"] #oracle-singles-view {
    color: #1e293b;
}

/* ================================================================= */
/* MODULO NOTIZIE E MODALE EDITORIALE ORACOLO (LIGHT MODE CYBER-ICE) */
/* ================================================================= */
:root[data-theme="light"] .oracle-news-wrapper,
body.light-theme .oracle-news-wrapper,
[data-theme="light"] .oracle-news-wrapper {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 180, 219, 0.28) !important;
    box-shadow: 0 8px 30px rgba(0, 110, 150, 0.08) !important;
}

:root[data-theme="light"] .oracle-news-card,
body.light-theme .oracle-news-card,
[data-theme="light"] .oracle-news-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.22) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .oracle-news-card h3,
body.light-theme .oracle-news-card h3,
[data-theme="light"] .oracle-news-card h3 {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-news-card p,
body.light-theme .oracle-news-card p,
[data-theme="light"] .oracle-news-card p {
    color: #475569 !important;
}

:root[data-theme="light"] .oracle-news-card:hover,
body.light-theme .oracle-news-card:hover,
[data-theme="light"] .oracle-news-card:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.15) !important;
}

:root[data-theme="light"] .oracle-track-card-pill,
body.light-theme .oracle-track-card-pill,
[data-theme="light"] .oracle-track-card-pill {
    color: #0369a1 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}

/* Base styles per Card Modale Editoriale Oracolo (Default Dark Mode) */
.oracle-modal-card-item {
    background: rgba(10, 18, 32, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.2s ease;
}
.oracle-modal-card-item:hover {
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(10, 18, 32, 0.9);
}
.oracle-modal-card-name {
    color: #ffffff;
}
.oracle-modal-card-meta {
    color: #94a3b8;
}
.oracle-modal-card-price {
    color: #00f0ff;
}

/* Modale Lettura Articolo Integrale Oracolo */
:root[data-theme="light"] #oracle-article-modal,
body.light-theme #oracle-article-modal,
[data-theme="light"] #oracle-article-modal {
    background: rgba(15, 23, 42, 0.55) !important;
}

:root[data-theme="light"] #oracle-article-modal-box,
body.light-theme #oracle-article-modal-box,
[data-theme="light"] #oracle-article-modal-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 25px rgba(0, 180, 219, 0.1) !important;
}

:root[data-theme="light"] #oracle-article-modal-header,
body.light-theme #oracle-article-modal-header,
[data-theme="light"] #oracle-article-modal-header {
    background: #f8fafc !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.2) !important;
}

:root[data-theme="light"] #modal-article-title,
body.light-theme #modal-article-title,
[data-theme="light"] #modal-article-title {
    color: #0f172a !important;
}

:root[data-theme="light"] #modal-article-subtitle,
body.light-theme #modal-article-subtitle,
[data-theme="light"] #modal-article-subtitle {
    color: #475569 !important;
}

:root[data-theme="light"] #modal-article-body,
body.light-theme #modal-article-body,
[data-theme="light"] #modal-article-body {
    background: #ffffff !important;
    color: #334155 !important;
}

:root[data-theme="light"] #modal-article-summary,
body.light-theme #modal-article-summary,
[data-theme="light"] #modal-article-summary {
    background: rgba(2, 132, 199, 0.08) !important;
    border-left: 3px solid #0284c7 !important;
    color: #0369a1 !important;
}

:root[data-theme="light"] #modal-article-cards-section,
body.light-theme #modal-article-cards-section,
[data-theme="light"] #modal-article-cards-section {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 180, 219, 0.22) !important;
}

:root[data-theme="light"] .oracle-modal-card-item,
body.light-theme .oracle-modal-card-item,
[data-theme="light"] .oracle-modal-card-item {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

:root[data-theme="light"] .oracle-modal-card-name,
body.light-theme .oracle-modal-card-name,
[data-theme="light"] .oracle-modal-card-name {
    color: #0f172a !important;
}

:root[data-theme="light"] .oracle-modal-card-meta,
body.light-theme .oracle-modal-card-meta,
[data-theme="light"] .oracle-modal-card-meta {
    color: #64748b !important;
}

:root[data-theme="light"] .oracle-modal-card-price,
body.light-theme .oracle-modal-card-price,
[data-theme="light"] .oracle-modal-card-price {
    color: #0284c7 !important;
}

:root[data-theme="light"] .article-markdown-body,
body.light-theme .article-markdown-body,
[data-theme="light"] .article-markdown-body {
    color: #334155 !important;
}

:root[data-theme="light"] .article-markdown-body h1,
:root[data-theme="light"] .article-markdown-body h2,
:root[data-theme="light"] .article-markdown-body h3,
:root[data-theme="light"] .article-markdown-body h4 {
    color: #0f172a !important;
}

:root[data-theme="light"] .article-markdown-body p,
:root[data-theme="light"] .article-markdown-body li {
    color: #334155 !important;
}

:root[data-theme="light"] .article-markdown-body strong {
    color: #0f172a !important;
}

:root[data-theme="light"] .article-markdown-body a {
    color: #0284c7 !important;
}

:root[data-theme="light"] .article-markdown-body blockquote {
    background: rgba(2, 132, 199, 0.06) !important;
    border-left: 3px solid #0284c7 !important;
    color: #334155 !important;
}

:root[data-theme="light"] #oracle-article-modal-footer,
body.light-theme #oracle-article-modal-footer,
[data-theme="light"] #oracle-article-modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid rgba(0, 180, 219, 0.2) !important;
}

:root[data-theme="light"] #modal-article-author,
body.light-theme #modal-article-author,
[data-theme="light"] #modal-article-author {
    color: #64748b !important;
}

/* ========================================================================== */
/* MODALI, DIALOGS E POPUP: REGOLAZIONE CROMATICA CYBER-ICE LIGHT MODE        */
/* ========================================================================== */

/* 1. Backdrop Overlay Traslucido Satinato */
:root[data-theme="light"] #manasentry-confirm-modal-overlay,
:root[data-theme="light"] #modal-admin-totem-evaluate,
:root[data-theme="light"] #modal-admin-totem-verify,
:root[data-theme="light"] #modal-admin-totem-payout,
:root[data-theme="light"] #modal-totem-proposal,
:root[data-theme="light"] #modal-totem-ship,
:root[data-theme="light"] #modal-withdraw-confirm,
:root[data-theme="light"] #repricer-session-modal,
:root[data-theme="light"] #repricer-simulation-warn-modal,
:root[data-theme="light"] #wh-price-info-modal,
:root[data-theme="light"] #wh-manual-add-modal,
:root[data-theme="light"] #stock-history-modal,
:root[data-theme="light"] #oracle-article-modal {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* 2. Contenitori Box Modali (Card Principale Chiara) */
:root[data-theme="light"] #manasentry-confirm-modal-overlay > div,
:root[data-theme="light"] #modal-admin-totem-evaluate > div,
:root[data-theme="light"] #modal-admin-totem-verify > div,
:root[data-theme="light"] #modal-admin-totem-payout > div,
:root[data-theme="light"] #modal-totem-proposal > div,
:root[data-theme="light"] #modal-totem-ship > div,
:root[data-theme="light"] #modal-withdraw-confirm > div,
:root[data-theme="light"] #repricer-session-modal > div,
:root[data-theme="light"] #repricer-simulation-warn-modal > div,
:root[data-theme="light"] #wh-price-info-modal > div,
:root[data-theme="light"] #wh-manual-add-modal > div,
:root[data-theme="light"] #stock-history-modal > div,
:root[data-theme="light"] #oracle-article-modal-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

/* 3. Intestazioni e Testi Modali */
:root[data-theme="light"] #modal-admin-totem-evaluate h3,
:root[data-theme="light"] #modal-admin-totem-verify h3,
:root[data-theme="light"] #modal-admin-totem-payout h3,
:root[data-theme="light"] #modal-totem-proposal h3,
:root[data-theme="light"] #modal-totem-ship h3,
:root[data-theme="light"] #stock-history-title,
:root[data-theme="light"] #wh-manual-add-modal h3 {
    color: #0284c7 !important;
}

:root[data-theme="light"] #modal-admin-totem-evaluate > div > div:first-child,
:root[data-theme="light"] #modal-admin-totem-verify > div > div:first-child,
:root[data-theme="light"] #modal-admin-totem-payout > div > div:first-child,
:root[data-theme="light"] #modal-totem-proposal > div > div:first-child,
:root[data-theme="light"] #modal-totem-ship > div > div:first-child,
:root[data-theme="light"] #stock-history-modal > div > div:first-child,
:root[data-theme="light"] #wh-manual-add-modal > div > div:first-child {
    border-bottom: 1px solid rgba(0, 180, 219, 0.2) !important;
}

:root[data-theme="light"] #modal-admin-totem-evaluate > div > div:last-child,
:root[data-theme="light"] #modal-admin-totem-verify > div > div:last-child,
:root[data-theme="light"] #modal-admin-totem-payout > div > div:last-child,
:root[data-theme="light"] #modal-totem-proposal > div > div:last-child,
:root[data-theme="light"] #modal-totem-ship form > div:last-child,
:root[data-theme="light"] #stock-history-modal > div > div:last-child {
    border-top: 1px solid rgba(0, 180, 219, 0.2) !important;
}

/* 4. Tabelle nei Modali e Totem (Data Table Chiara) */
:root[data-theme="light"] #modal-admin-totem-evaluate .data-table th,
:root[data-theme="light"] #modal-admin-totem-verify .data-table th,
:root[data-theme="light"] #modal-totem-proposal .data-table th,
:root[data-theme="light"] #stock-history-modal .data-table th,
:root[data-theme="light"] #totem-draft-table th {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-bottom: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] #modal-admin-totem-evaluate .data-table td,
:root[data-theme="light"] #modal-admin-totem-verify .data-table td,
:root[data-theme="light"] #modal-totem-proposal .data-table td,
:root[data-theme="light"] #stock-history-modal .data-table td,
:root[data-theme="light"] #totem-draft-table td {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

:root[data-theme="light"] .totem-card-name {
    color: #0f172a !important;
}

:root[data-theme="light"] #modal-admin-totem-evaluate .data-table tr:hover,
:root[data-theme="light"] #modal-admin-totem-verify .data-table tr:hover,
:root[data-theme="light"] #modal-totem-proposal .data-table tr:hover,
:root[data-theme="light"] #stock-history-modal .data-table tr:hover,
:root[data-theme="light"] #totem-draft-table tr:hover {
    background: rgba(2, 132, 199, 0.04) !important;
}

/* 5. Input e Campi di Testo nei Modali */
:root[data-theme="light"] #modal-admin-totem-evaluate input,
:root[data-theme="light"] #modal-admin-totem-verify input,
:root[data-theme="light"] #modal-admin-totem-payout input,
:root[data-theme="light"] #modal-totem-ship input,
:root[data-theme="light"] #wh-manual-add-modal input,
:root[data-theme="light"] #wh-manual-add-modal select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

:root[data-theme="light"] #modal-admin-totem-evaluate input:focus,
:root[data-theme="light"] #modal-admin-totem-verify input:focus,
:root[data-theme="light"] #modal-admin-totem-payout input:focus,
:root[data-theme="light"] #modal-totem-ship input:focus,
:root[data-theme="light"] #wh-manual-add-modal input:focus,
:root[data-theme="light"] #wh-manual-add-modal select:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* 6. Sub-card e Box Informativi nei Modali Totem */
:root[data-theme="light"] #modal-totem-proposal > div > div > div:first-child {
    background: rgba(2, 132, 199, 0.06) !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] #totem-proposal-notes {
    color: #475569 !important;
}

:root[data-theme="light"] #modal-totem-ship form > div:nth-child(5) {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 180, 219, 0.25) !important;
}

:root[data-theme="light"] #modal-totem-ship form label span,
:root[data-theme="light"] #modal-totem-ship label {
    color: #334155 !important;
}

:root[data-theme="light"] #modal-admin-totem-payout > div > div:nth-child(2) {
    background: rgba(2, 132, 199, 0.05) !important;
    border: 1px solid rgba(2, 132, 199, 0.2) !important;
    color: #334155 !important;
}

:root[data-theme="light"] #admin-payout-holder {
    color: #0f172a !important;
}

:root[data-theme="light"] #modal-admin-totem-evaluate > div > div:nth-child(3) {
    border: 1px solid #e2e8f0 !important;
}

:root[data-theme="light"] #admin-eval-desired {
    color: #d97706 !important;
}

/* 7. Magazzino e Autocomplete */
:root[data-theme="light"] #wh-manual-card-autocomplete {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

:root[data-theme="light"] #wh-manual-add-modal label {
    color: #334155 !important;
}

/* 8. Modale Ritiro Stock CardTrader (Pericolo / Slider) */
:root[data-theme="light"] #modal-withdraw-confirm p {
    color: #334155 !important;
    background: rgba(239, 68, 68, 0.06) !important;
    border-left-color: #ef4444 !important;
}

:root[data-theme="light"] #withdraw-slide-track {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
}

:root[data-theme="light"] #withdraw-slide-label {
    color: #64748b !important;
}

/* 9. Repricer Session Criteria & Warn Modals */
:root[data-theme="light"] #repricer-session-modal p,
:root[data-theme="light"] #repricer-simulation-warn-modal p {
    color: #334155 !important;
}

:root[data-theme="light"] #repricer-simulation-warn-modal h3 {
    color: #0f172a !important;
}

:root[data-theme="light"] #repricer-simulation-warn-modal > div > div:nth-child(3) {
    background: rgba(2, 132, 199, 0.06) !important;
    border: 1px solid rgba(2, 132, 199, 0.2) !important;
    color: #475569 !important;
}

/* 10. Warehouse Price Info Modal */
:root[data-theme="light"] #wh-price-info-modal p {
    color: #334155 !important;
}

/* ==========================================================================
   LANGUAGE SELECTOR DROPDOWN (CYBER-ICE DARK & LIGHT THEMES)
   ========================================================================== */
.lang-dropdown-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 180, 219, 0.35);
    color: #ffffff;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.lang-btn:hover {
    border-color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.lang-flag svg,
.lang-option-flag svg,
.flag-icon {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Visibilità automatica contenuti modali multilingua */
.modal-lang-body {
    display: none;
}
:root[data-lang="it"] .modal-lang-body[data-lang="it"],
:root:not([data-lang]) .modal-lang-body[data-lang="it"] {
    display: block;
}
:root[data-lang="en"] .modal-lang-body[data-lang="en"] {
    display: block;
}
:root[data-lang="es"] .modal-lang-body[data-lang="es"] {
    display: block;
}
:root[data-lang="de"] .modal-lang-body[data-lang="de"] {
    display: block;
}
:root[data-lang="fr"] .modal-lang-body[data-lang="fr"] {
    display: block;
}

.lang-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lang-chevron {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.lang-dropdown-container .lang-menu.show + .lang-btn .lang-chevron,
.lang-btn:focus .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 165px;
    background: rgba(13, 20, 36, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 180, 219, 0.35);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    z-index: 10050 !important;
    flex-direction: column;
    gap: 2px;
}

.lang-menu.show {
    display: flex;
    animation: fadeInLang 0.18s ease-out forwards;
}

@keyframes fadeInLang {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s ease;
    user-select: none;
}

.lang-option:hover {
    background: rgba(0, 180, 219, 0.15);
    color: #00f2fe;
}

.lang-option.active {
    background: rgba(0, 180, 219, 0.18);
    color: #00f2fe;
    font-weight: 700;
}

.lang-option-flag {
    font-size: 1.05rem;
    line-height: 1;
}

.lang-option-name {
    flex: 1;
}

.lang-option-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.lang-option.active .lang-option-badge {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
}

.lang-check {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: #00f2fe;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: none;
}

.lang-option.active .lang-check {
    display: block;
}

/* Regole Esplicite per Light Mode (Cyber-Ice Luxury) */
:root[data-theme="light"] .lang-btn {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.45) !important;
    color: #0f172a !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

:root[data-theme="light"] .lang-btn:hover {
    background: #f0f9ff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.22) !important;
}

:root[data-theme="light"] .lang-chevron {
    stroke: #475569 !important;
}

:root[data-theme="light"] .lang-menu {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12) !important;
}

:root[data-theme="light"] .lang-option {
    color: #1e293b !important;
    font-weight: 600 !important;
}

:root[data-theme="light"] .lang-option:hover {
    background: #f1f5f9 !important;
    color: #0284c7 !important;
}

:root[data-theme="light"] .lang-option.active {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 700 !important;
}

:root[data-theme="light"] .lang-option-badge {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

:root[data-theme="light"] .lang-option.active .lang-option-badge {
    background: #bae6fd !important;
    color: #0369a1 !important;
}

:root[data-theme="light"] .lang-check {
    stroke: #0284c7 !important;
}

/* Stili di supporto per Scanner Fotografico & Modale Blueprint */
.btn-cyan {
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid #00f2fe;
    color: #00f2fe;
    padding: 8px 22px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-cyan:hover {
    background: rgba(0, 242, 254, 0.28);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}
:root[data-theme="light"] .btn-cyan,
[data-theme="light"] .btn-cyan,
:root[data-theme="light"] .btn-save-cluster,
[data-theme="light"] .btn-save-cluster {
    background: #0284c7 !important;
    border: 1px solid #0369a1 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
:root[data-theme="light"] .btn-cyan:hover,
[data-theme="light"] .btn-cyan:hover,
:root[data-theme="light"] .btn-save-cluster:hover,
[data-theme="light"] .btn-save-cluster:hover {
    background: #0369a1 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35) !important;
}
:root[data-theme="light"] .btn-cyan svg,
[data-theme="light"] .btn-cyan svg,
:root[data-theme="light"] .btn-save-cluster svg,
[data-theme="light"] .btn-save-cluster svg {
    stroke: #ffffff !important;
}

:root[data-theme="light"] #search-blueprint-modal {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
}

:root[data-theme="light"] #search-blueprint-modal > div {
    background: #ffffff !important;
    border: 1px solid rgba(0, 180, 219, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

/* ========================================================================= */
/* BARRA AVVISI 100% FULL-WIDTH A SCORRIMENTO CONTINUO (OUT-AND-IN)         */
/* ========================================================================= */
@keyframes tickerFullScroll {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ms-announcement-bar {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: rgba(11, 19, 41, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px var(--ticker-glow, rgba(0, 0, 0, 0.4));
    padding: 8px 0;
    overflow: hidden;
    z-index: 90;
    position: relative;
    transition: all 0.3s ease;
}

.ms-ticker-track {
    width: 100vw;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ms-ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: tickerFullScroll var(--ticker-duration, 25s) linear infinite;
    will-change: transform;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ticker-accent, #f59e0b);
    text-shadow: 0 0 10px var(--ticker-glow, rgba(245, 158, 11, 0.32));
    letter-spacing: 0.3px;
    cursor: default;
}

.ms-ticker-content:hover {
    animation-play-state: paused;
}

:root[data-theme="light"] .ms-announcement-bar {
    background: #ffffff !important;
    border-top: 1px solid rgba(203, 213, 225, 0.9) !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.9) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

/* Stili pills colore gestore avvisi */
.announcement-color-btn {
    transition: all 0.2s ease;
}
.announcement-color-btn:hover {
    transform: translateY(-1px);
}
.announcement-color-btn.active {
    box-shadow: 0 0 10px currentColor;
}
:root[data-theme="light"] .announcement-color-btn {
    background: #f8fafc !important;
}

/* ========================================================================= */
/* LEGALITÀ FORMATI UFFICIALI (ORACOLO, CARTA STORICA & DECK COMPOSER)      */
/* ========================================================================= */
.oracle-leg-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.5);
    transition: all 0.2s ease;
}

.oracle-leg-fmt {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #cbd5e1;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oracle-leg-status {
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

/* Badge Stati Legalità (Dark Mode) */
.leg-legal {
    border-color: rgba(16, 185, 129, 0.35) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    color: #34d399 !important;
}
.leg-legal .oracle-leg-status {
    color: #34d399 !important;
}

.leg-banned {
    border-color: rgba(239, 68, 68, 0.35) !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #f87171 !important;
}
.leg-banned .oracle-leg-status {
    color: #f87171 !important;
}

.leg-restricted {
    border-color: rgba(0, 240, 255, 0.35) !important;
    background: rgba(0, 240, 255, 0.08) !important;
    color: #00f0ff !important;
}
.leg-restricted .oracle-leg-status {
    color: #00f0ff !important;
}

.leg-not-legal {
    border-color: rgba(148, 163, 184, 0.15) !important;
    background: rgba(148, 163, 184, 0.05) !important;
    color: #94a3b8 !important;
}
.leg-not-legal .oracle-leg-status {
    color: #94a3b8 !important;
}

/* Light Mode Stati Legalità */
:root[data-theme="light"] .oracle-leg-item {
    background: #ffffff !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
}
:root[data-theme="light"] .oracle-leg-fmt {
    color: #334155 !important;
}
:root[data-theme="light"] .leg-legal {
    background: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
    color: #059669 !important;
}
:root[data-theme="light"] .leg-legal .oracle-leg-status {
    color: #059669 !important;
}
:root[data-theme="light"] .leg-banned {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}
:root[data-theme="light"] .leg-banned .oracle-leg-status {
    color: #dc2626 !important;
}
:root[data-theme="light"] .leg-restricted {
    background: #f0f9ff !important;
    border-color: #7dd3fc !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .leg-restricted .oracle-leg-status {
    color: #0284c7 !important;
}
:root[data-theme="light"] .leg-not-legal {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}
:root[data-theme="light"] .leg-not-legal .oracle-leg-status {
    color: #64748b !important;
}

/* Deck Composer Badges & Banner */
.badge-banned {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    line-height: 1.2;
    flex-shrink: 0;
}
:root[data-theme="light"] .badge-banned {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}

.badge-not-legal {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
    line-height: 1.2;
    flex-shrink: 0;
}
:root[data-theme="light"] .badge-not-legal {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

.badge-restricted {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: #00f0ff;
    line-height: 1.2;
    flex-shrink: 0;
}
:root[data-theme="light"] .badge-restricted {
    background: #f0f9ff !important;
    border-color: #7dd3fc !important;
    color: #0284c7 !important;
}

.deck-ban-warning-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}
:root[data-theme="light"] .deck-ban-warning-banner {
    background: #fff5f5 !important;
    border-color: #feb2b2 !important;
    color: #c53030 !important;
}

/* --- ORACLE GLOBAL GAME ICON LIGHT MODE HARMONIZATION (REGOLA 7 & 8) --- */
:root[data-theme="light"] #oracle-global-game-icon-wrap {
    color: #0284c7 !important;
}
:root[data-theme="light"] #oracle-global-game-icon {
    filter: none !important;
}
:root[data-theme="light"] #oracle-global-game-icon circle {
    fill: none !important;
    stroke: #0284c7 !important;
}
:root[data-theme="light"] #oracle-global-game-icon line {
    fill: none !important;
    stroke: #0284c7 !important;
}
:root[data-theme="light"] #oracle-global-game-icon path {
    stroke: #0284c7 !important;
}
:root[data-theme="light"] #oracle-global-game-icon[fill="none"] path {
    fill: none !important;
}
:root[data-theme="light"] #oracle-global-game-icon:not([fill="none"]) path {
    fill: #0284c7 !important;
}

/* --- CONTRASTO PULSANTI SPIKE RILEVATI / WATCHLIST IN LIGHT MODE --- */
:root[data-theme="light"] #btn-pred-tab-history.active,
:root[data-theme="light"] #btn-pred-tab-watchlist.active,
:root[data-theme="light"] .btn-blue.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35) !important;
    font-weight: 700 !important;
}
:root[data-theme="light"] #btn-pred-tab-history:not(.active),
:root[data-theme="light"] #btn-pred-tab-watchlist:not(.active) {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

/* --- CUSTOM GLASSMORPHIC GAME DROPDOWN (REGOLA 7 & 8) --- */
.custom-game-dropdown-container {
    position: relative;
    display: inline-block;
}
.custom-game-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 12, 20, 0.75);
    padding: 7px 16px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 242, 254, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.custom-game-dropdown-trigger:hover {
    border-color: #00f2fe;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}
.custom-game-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: rgba(13, 20, 36, 0.94);
    border: 1.5px solid rgba(0, 242, 254, 0.35);
    border-radius: 10px;
    padding: 6px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 4px;
}
.custom-game-dropdown-menu.show {
    display: flex;
}
.custom-game-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.custom-game-dropdown-item:hover {
    background: rgba(0, 242, 254, 0.12);
    color: #00f2fe;
}
.custom-game-dropdown-item.active {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
}
.custom-game-dropdown-item.coming-soon-item {
    opacity: 0.88;
}
.custom-game-dropdown-item.coming-soon-item:hover {
    background: rgba(245, 158, 11, 0.08);
}
.game-badge-coming-soon {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.2;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

:root[data-theme="light"] .custom-game-dropdown-trigger {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .custom-game-dropdown-trigger:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 2px 12px rgba(2, 132, 199, 0.2) !important;
}
:root[data-theme="light"] .custom-game-dropdown-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}
:root[data-theme="light"] .custom-game-dropdown-item {
    color: #1e293b !important;
}
:root[data-theme="light"] .custom-game-dropdown-item:hover {
    background: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .custom-game-dropdown-item.active {
    background: rgba(2, 132, 199, 0.14) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .game-badge-coming-soon {
    background: rgba(217, 119, 6, 0.12) !important;
    color: #b45309 !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
}
:root[data-theme="light"] .custom-game-dropdown-item.coming-soon-item:hover {
    background: rgba(217, 119, 6, 0.08) !important;
}

/* --- WISHLIST INPUTS LIGHT MODE HARMONIZATION --- */
:root[data-theme="light"] #wl-add-card-input,
:root[data-theme="light"] #wl-add-max-price,
:root[data-theme="light"] #wl-add-min-discount,
:root[data-theme="light"] #wl-telegram-channel-input {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
:root[data-theme="light"] #wl-autocomplete-dropdown {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}
:root[data-theme="light"] #wl-autocomplete-dropdown > div {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
:root[data-theme="light"] #wl-autocomplete-dropdown > div:hover {
    background: #f1f5f9 !important;
}

/* --- DECK SIMULATOR (GOLDFISH) LIGHT MODE HARMONIZATION --- */
:root[data-theme="light"] .goldfish-action-log-box {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .goldfish-log-entry {
    color: #334155 !important;
    border-bottom-color: #f1f5f9 !important;
}
:root[data-theme="light"] .goldfish-zone-tray {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}
:root[data-theme="light"] .goldfish-zone-title {
    color: #0284c7 !important;
}

/* --- REPRICER CONTROLS & RADIO BUTTONS LIGHT MODE --- */
:root[data-theme="light"] .repricer-control-group input[type="radio"],
:root[data-theme="light"] .repricer-checkbox-label input[type="checkbox"] {
    accent-color: #0284c7 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* --- AUTO-BUY PANEL LIGHT MODE HARMONIZATION --- */
:root[data-theme="light"] .autobuy-tcg-grid {
    background: rgba(241, 245, 249, 0.85) !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .autobuy-tcg-label-pk {
    color: #b45309 !important;
    font-weight: 700 !important;
}
:root[data-theme="light"] .autobuy-tcg-label-op {
    color: #dc2626 !important;
    font-weight: 700 !important;
}
:root[data-theme="light"] .ab-slider {
    background-color: #cbd5e1 !important;
    border: 1px solid #94a3b8 !important;
}
:root[data-theme="light"] .ab-slider:before {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}
:root[data-theme="light"] .ab-switch input:checked + .ab-slider {
    background-color: rgba(2, 132, 199, 0.3) !important;
    border-color: #0284c7 !important;
}
:root[data-theme="light"] .ab-switch input:checked + .ab-slider:before {
    background-color: #0284c7 !important;
}
:root[data-theme="light"] #sorcerer-wl-box {
    background: rgba(241, 245, 249, 0.85) !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] #sorcerer-wl-types-label {
    color: #0284c7 !important;
}

/* --- ORACLE WISHLIST QUOTA BADGE LIGHT MODE --- */
:root[data-theme="light"] #wl-quota-badge {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
}

/* --- REPRINT SCARCITY RADAR BADGES & LIGHT MODE --- */
.badge-rarity {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
    font-family: 'Outfit', sans-serif;
}
.badge-rarity.rarity-mythic {
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.badge-rarity.rarity-rare {
    background: rgba(14, 165, 233, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.38);
}
.badge-rarity.rarity-uncommon {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge-rarity.rarity-common {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.28);
}
.badge-rarity.rarity-special {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.35);
}
.badge-rarity.rarity-unknown {
    color: var(--text-muted);
}
:root[data-theme="light"] .badge-rarity.rarity-mythic {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}
:root[data-theme="light"] .badge-rarity.rarity-rare {
    background: #f0f9ff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
}
:root[data-theme="light"] .badge-rarity.rarity-uncommon {
    background: #f8fafc !important;
    color: #0369a1 !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .badge-rarity.rarity-common {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .badge-rarity.rarity-special {
    background: #ecfeff !important;
    color: #0891b2 !important;
    border: 1px solid #a5f3fc !important;
}

.badge-printings.print-1 {
    background: rgba(0, 242, 254, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 242, 254, 0.35);
}
.badge-printings.print-2 {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.badge-printings.print-3 {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.badge-printings.print-multi {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.2);
}
:root[data-theme="light"] .badge-printings.print-1 {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
}
:root[data-theme="light"] .badge-printings.print-2 {
    background: #f0f9ff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
}
:root[data-theme="light"] .badge-printings.print-3 {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] .badge-printings.print-multi {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.badge-drought.drought-extreme {
    background: rgba(0, 242, 254, 0.18);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.45);
}
.badge-drought.drought-high {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.38);
}
.badge-drought.drought-medium {
    background: rgba(96, 165, 250, 0.14);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.32);
}
.badge-drought.drought-low {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.22);
}
:root[data-theme="light"] .badge-drought.drought-extreme {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
}
:root[data-theme="light"] .badge-drought.drought-high {
    background: #f0f9ff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
}
:root[data-theme="light"] .badge-drought.drought-medium {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
}
:root[data-theme="light"] .badge-drought.drought-low {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

:root[data-theme="light"] #scarcity-expansion-input {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
:root[data-theme="light"] #scarcity-expansion-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    color: #0f172a !important;
}
:root[data-theme="light"] #scarcity-expansion-dropdown div {
    border-bottom-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   SKELETON LOADERS - SUB-SECOND FLUID UI (DARK & LIGHT MODE)
   ========================================================================== */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(0, 242, 254, 0.12) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    user-select: none;
}

:root[data-theme="light"] .skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.06) 0%,
        rgba(2, 132, 199, 0.16) 50%,
        rgba(15, 23, 42, 0.06) 100%
    );
    background-size: 200% 100%;
}

.skeleton-row {
    height: 48px;
    border-bottom: 1px solid var(--glass-border);
}

.skeleton-row td {
    border-bottom: 1px solid var(--glass-border);
}

.skeleton-box {
    border-radius: 6px;
}

.skeleton-circle {
    border-radius: 50%;
}

/* ==========================================================================
   MODULO DESIGN SYSTEM TOP-TIER (Scoped per Cluster & Governance)
   Linear/Vercel standard: controlli a 34px, pillole di stato e alto contrasto
   ========================================================================== */
.cluster-glass-card {
    transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.control-h34 {
    height: 34px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    user-select: none !important;
}

.control-h34:active {
    transform: scale(0.98) !important;
}

.input-num-34 {
    height: 34px !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.input-num-34:focus {
    border-color: #00f2fe !important;
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.25) !important;
}

.select-34 {
    height: 34px !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.select-34:focus {
    border-color: #00f2fe !important;
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.25) !important;
}

.btn-solid-primary {
    background: #00f2fe !important;
    color: #060913 !important;
    border: 1px solid transparent !important;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.35) !important;
}

.btn-solid-primary:hover {
    filter: brightness(1.1) !important;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.5) !important;
}

.btn-solid-primary svg {
    stroke: #060913 !important;
}

/* Light Mode Overrides Scoped */
:root[data-theme="light"] .btn-solid-primary,
[data-theme="light"] .btn-solid-primary {
    background: #0284c7 !important;
    color: #ffffff !important;
    border: 1px solid #0369a1 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
}

:root[data-theme="light"] .btn-solid-primary:hover,
[data-theme="light"] .btn-solid-primary:hover {
    background: #0369a1 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
}

:root[data-theme="light"] .btn-solid-primary svg,
[data-theme="light"] .btn-solid-primary svg {
    stroke: #ffffff !important;
}

:root[data-theme="light"] .input-num-34:focus,
[data-theme="light"] .input-num-34:focus,
:root[data-theme="light"] .select-34:focus,
[data-theme="light"] .select-34:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25) !important;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 8px;
    border-radius: 9999px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.status-pill .dot {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    min-height: 6px !important;
    border-radius: 50% !important;
    display: inline-block !important;
}

.status-pill.up {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.status-pill.up .dot {
    background: #10b981 !important;
    box-shadow: 0 0 6px #10b981 !important;
}

.status-pill.burst {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.status-pill.burst .dot {
    background: #f59e0b !important;
    box-shadow: 0 0 6px #f59e0b !important;
}

.status-pill.standby {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.status-pill.standby .dot {
    background: #94a3b8 !important;
    box-shadow: none !important;
}

:root[data-theme="light"] .status-pill.standby,
[data-theme="light"] .status-pill.standby {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

:root[data-theme="light"] .status-pill.standby .dot,
[data-theme="light"] .status-pill.standby .dot {
    background: #94a3b8 !important;
}

/* ==========================================================================
   CLUSTER REPRICER DUAL-VPS (TURBO PALETTE INTEGRATION)
   ========================================================================== */
.repricer-pill-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.15s ease;
}

.repricer-pill-title {
    color: #bae6fd;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-cluster-burst {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    transition: all 0.15s ease;
}
.btn-cluster-burst:hover {
    background: rgba(245, 158, 11, 0.25);
    filter: brightness(1.1);
}

.btn-cluster-save {
    background: #00f2fe;
    border: 1px solid #00f2fe;
    color: #0b1120;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 242, 254, 0.25);
    transition: all 0.15s ease;
}
.btn-cluster-save:hover {
    background: #38bdf8;
    border-color: #38bdf8;
    filter: brightness(1.08);
}

.dark-accent-text {
    color: #38bdf8;
}

/* Light Mode Overrides Scoped for Repricer Cluster */
:root[data-theme="light"] .repricer-pill-card {
    background: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.04) !important;
}

:root[data-theme="light"] .repricer-pill-title {
    color: #0369a1 !important;
}

:root[data-theme="light"] .btn-refresh-cluster {
    background: #ffffff !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .btn-refresh-cluster:hover {
    background: rgba(2, 132, 199, 0.06) !important;
}

:root[data-theme="light"] .btn-cluster-burst {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #d97706 !important;
}
:root[data-theme="light"] .btn-cluster-burst:hover {
    background: rgba(245, 158, 11, 0.18) !important;
}

:root[data-theme="light"] .btn-cluster-save {
    background: #0284c7 !important;
    border: 1px solid #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25) !important;
}
:root[data-theme="light"] .btn-cluster-save:hover {
    background: #0369a1 !important;
    border-color: #0369a1 !important;
}

:root[data-theme="light"] .dark-accent-text {
    color: #0284c7 !important;
}

:root[data-theme="light"] .repricer-cluster-input {
    color: #0284c7 !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

/* ==========================================================================
   ORACLE SUITE: TOP-TIER FILTER BAR & BALANCED 3-METRIC PRICING GRID
   ========================================================================== */
.segmented-filter-bar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-sizing: border-box;
}

:root[data-theme="light"] .segmented-filter-bar {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.25);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.price-liquidity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .price-liquidity-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: rgba(0, 180, 219, 0.04);
    border: 1px solid rgba(0, 180, 219, 0.18);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    min-width: 0;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.08);
}

:root[data-theme="light"] .kpi-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .kpi-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

:root[data-theme="light"] #oracle-card-price {
    color: #0284c7 !important;
}

:root[data-theme="light"] #oracle-card-real-value {
    color: #0284c7 !important;
}

:root[data-theme="light"] #oracle-card-cheapest-price {
    color: #0369a1 !important;
}

:root[data-theme="light"] #oracle-card-cheapest-set {
    color: #475569 !important;
}

:root[data-theme="light"] .oracle-filter-label {
    color: #64748b !important;
}

/* --- WAREHOUSE SEARCH BAR & HARMONIZATION --- */
.wh-search-box-wrap {
    background: rgba(3, 7, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}
.wh-search-box-wrap:focus-within,
.wh-search-box-wrap:hover {
    border-color: rgba(0, 242, 254, 0.45);
}
#wh-search-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 4px !important;
    height: 100% !important;
    color: #ffffff !important;
}
:root[data-theme="light"] .wh-search-box-wrap {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
:root[data-theme="light"] .wh-search-box-wrap:focus-within,
:root[data-theme="light"] .wh-search-box-wrap:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}
:root[data-theme="light"] #wh-search-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
}

/* --- WAREHOUSE EXPANSION FILTER & AUTOCOMPLETE --- */
.wh-expansion-box-wrap {
    background: rgba(3, 7, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}
.wh-expansion-box-wrap:focus-within,
.wh-expansion-box-wrap:hover {
    border-color: rgba(0, 242, 254, 0.45);
}
#wh-expansion-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 4px !important;
    height: 100% !important;
    color: #ffffff !important;
    font-size: 0.78rem !important;
}
.wh-expansion-menu {
    background: #0b1329 !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.5);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0,0,0,0.9), 0 0 20px rgba(0, 242, 254, 0.35);
    z-index: 9999 !important;
}
.wh-expansion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: #cbd5e1;
    transition: all 0.15s ease;
}
.wh-expansion-item:hover {
    background: rgba(0, 242, 254, 0.15);
    color: #ffffff;
}
.wh-expansion-title {
    font-weight: 600;
    font-size: 0.80rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wh-expansion-code {
    font-family: monospace;
    font-size: 0.68rem;
    color: #94a3b8;
}
.wh-set-count-badge {
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: monospace;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #00f2fe;
    white-space: nowrap;
}
:root[data-theme="light"] .wh-expansion-box-wrap {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
:root[data-theme="light"] .wh-expansion-box-wrap:focus-within,
:root[data-theme="light"] .wh-expansion-box-wrap:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}
:root[data-theme="light"] #wh-expansion-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .wh-expansion-menu {
    background: #ffffff !important;
    border: 1px solid #0284c7 !important;
    box-shadow: 0 16px 36px rgba(0,0,0,0.18), 0 0 20px rgba(2, 132, 199, 0.25) !important;
}
:root[data-theme="light"] .wh-expansion-item {
    color: #0f172a !important;
}
:root[data-theme="light"] .wh-expansion-item:hover {
    background: rgba(2, 132, 199, 0.1) !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .wh-expansion-title {
    color: #0f172a !important;
}
:root[data-theme="light"] .wh-expansion-code {
    color: #64748b !important;
}
:root[data-theme="light"] .wh-set-count-badge {
    background: rgba(2, 132, 199, 0.1) !important;
    border: 1px solid rgba(2, 132, 199, 0.3) !important;
    color: #0284c7 !important;
}

/* Tooltips Wishlist Affari & Telegram */
.wl-info-container:hover .wl-info-tooltip,
.wl-info-container:focus-within .wl-info-tooltip,
.wl-tg-info-container:hover .wl-tg-info-tooltip,
.wl-tg-info-container:focus-within .wl-tg-info-tooltip {
    display: block !important;
}
.wl-info-container:hover .wl-info-icon {
    box-shadow: 0 0 8px #00f2fe;
    border-color: #00f2fe;
}
.wl-tg-info-container:hover .wl-tg-info-icon {
    box-shadow: 0 0 8px #38bdf8;
    border-color: #38bdf8;
}
:root[data-theme="light"] .wl-info-tooltip,
:root[data-theme="light"] .wl-tg-info-tooltip {
    background: #ffffff !important;
    color: #1e293b !important;
    border-color: #0284c7 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}
:root[data-theme="light"] .wl-info-tooltip strong,
:root[data-theme="light"] .wl-tg-info-tooltip strong {
    color: #0284c7 !important;
}
:root[data-theme="light"] .wl-info-icon {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}
:root[data-theme="light"] .wl-tg-info-icon {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}

/* ==========================================================================
   CLASSIFICA VENDITORI LOTTI: Token Repository, Search Bar, Min Discount Input
   ========================================================================== */
.lots-token-repo {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
:root[data-theme="light"] .lots-token-repo {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.input-lots-token {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-lots-token:focus {
    border-color: var(--primary);
    box-shadow: 0 0 6px var(--primary-glow);
}
:root[data-theme="light"] .input-lots-token {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .input-lots-token:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

#btn-lots-token-lock {
    transition: color 0.2s, transform 0.1s;
}
#btn-lots-token-lock:hover {
    color: #f1f5f9 !important;
}
:root[data-theme="light"] #btn-lots-token-lock:hover {
    color: #0f172a !important;
}

#btn-lots-token-save {
    background: var(--primary);
    color: #0b101b;
    border: none;
    transition: opacity 0.2s, transform 0.1s;
}
#btn-lots-token-save:not(:disabled):hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}
:root[data-theme="light"] #btn-lots-token-save {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.lots-search-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s, width 0.2s;
}
.lots-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 6px var(--primary-glow);
}
:root[data-theme="light"] .lots-search-input {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .lots-search-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

.lot-min-discount-input {
    width: 60px;
    height: 26px;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 242, 254, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #f1f5f9;
    font-size: 11px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lot-min-discount-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px var(--primary-glow);
}
:root[data-theme="light"] .lot-min-discount-input {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    color: #0f172a !important;
}
:root[data-theme="light"] .lot-min-discount-input:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15) !important;
}

/* ==========================================================================
   REGOLA 9: MS-TOOLTIP GLASSMORPHIC CIANO (UNIVERSALE)
   ========================================================================== */
.ms-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ms-tooltip-trigger {
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #00f2fe);
    transition: color 0.2s ease, transform 0.2s ease;
}

.ms-tooltip-trigger:hover {
    color: #38bdf8;
    transform: scale(1.08);
}

.ms-tooltip-bubble {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    z-index: 9999;
    min-width: 240px;
    max-width: 320px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 254, 0.25);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    white-space: normal;
}

.ms-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 242, 254, 0.4) transparent transparent transparent;
}

.ms-tooltip-container:hover .ms-tooltip-bubble,
.ms-tooltip-container:focus-within .ms-tooltip-bubble,
.ms-tooltip-container.active .ms-tooltip-bubble {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Light Mode Support */
:root[data-theme="light"] .ms-tooltip-bubble {
    background: #ffffff !important;
    border: 1px solid #0284c7 !important;
    color: #0f172a !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 0 10px rgba(2, 132, 199, 0.2) !important;
}

:root[data-theme="light"] .ms-tooltip-bubble::after {
    border-color: #0284c7 transparent transparent transparent !important;
}

:root[data-theme="light"] .ms-tooltip-trigger {
    color: #0284c7 !important;
}

/* --- MANASENTRY LEGAL HYPERLINK STYLE (CIANO & LIGHT MODE) --- */
.ms-legal-link {
    color: var(--primary, #00f2fe);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s, text-shadow 0.2s;
}
.ms-legal-link:hover {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}
:root[data-theme="light"] .ms-legal-link {
    color: #0284c7 !important;
}
:root[data-theme="light"] .ms-legal-link:hover {
    color: #0369a1 !important;
}

/* ==========================================================================
   ManaSentry Warehouse - Drag & Drop Zone, KPI Cards & Controls Styling
   ========================================================================== */

/* 1. Drag & Drop Upload Zone */
.wh-drop-zone {
    border: 2px dashed rgba(0, 242, 254, 0.35);
    border-radius: 10px;
    padding: 24px 32px;
    min-height: 85px;
    text-align: center;
    background: rgba(0, 242, 254, 0.02);
    margin: 15px 0 20px 0;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    box-sizing: border-box;
}

.wh-drop-zone:hover {
    border-color: #00f2fe;
    background: rgba(0, 242, 254, 0.06);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.12);
    transform: translateY(-1px);
}

.wh-drop-icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--primary, #00f2fe);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wh-drop-zone:hover .wh-drop-icon {
    transform: translateY(-2px);
}

.wh-drop-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.wh-drop-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 3px;
}

:root[data-theme="light"] .wh-drop-zone {
    border-color: rgba(2, 132, 199, 0.45);
    background: rgba(2, 132, 199, 0.03);
}

:root[data-theme="light"] .wh-drop-zone:hover {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.12);
}

:root[data-theme="light"] .wh-drop-icon {
    stroke: #0284c7;
}

:root[data-theme="light"] .wh-drop-title {
    color: #0f172a;
}

:root[data-theme="light"] .wh-drop-subtitle {
    color: #64748b;
}

/* 2. Warehouse Settings Row (Token API CT0) */
.wh-settings-row {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    transition: border-color 0.2s;
}

.wh-settings-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.85rem;
}

.wh-settings-desc {
    color: #94a3b8;
    display: block;
    font-size: 0.74rem;
    margin-top: 2px;
}

:root[data-theme="light"] .wh-settings-row {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .wh-settings-title {
    color: #0f172a;
}

:root[data-theme="light"] .wh-settings-desc {
    color: #64748b;
}

/* 3. Warehouse KPI Grid & Cards (Compatte e con contorni nitidi) */
.wh-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.wh-kpi-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(0, 242, 254, 0.22);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 9px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wh-kpi-card:hover {
    border-color: #00f2fe;
    box-shadow: 0 4px 18px rgba(0, 242, 254, 0.15);
    transform: translateY(-1px);
}

.wh-kpi-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.wh-kpi-val {
    font-size: 1.20rem;
    font-weight: 800;
    margin-top: 4px;
    line-height: 1.2;
}

.wh-kpi-sub {
    font-size: 0.70rem;
    color: #94a3b8;
    margin-top: 3px;
    font-weight: 500;
}

.wh-kpi-footer {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 4px;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.wh-kpi-footer:hover {
    color: #00f2fe;
}

/* Light Mode Supporto Integrale per KPI Magazzino (Regola 8) */
:root[data-theme="light"] .wh-kpi-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

:root[data-theme="light"] .wh-kpi-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

:root[data-theme="light"] .wh-kpi-label {
    color: #64748b;
}

:root[data-theme="light"] .wh-kpi-sub {
    color: #64748b;
}

:root[data-theme="light"] .wh-kpi-footer {
    color: #64748b;
    border-top-color: #e2e8f0;
}

:root[data-theme="light"] .wh-kpi-footer:hover {
    color: #0284c7;
}

:root[data-theme="light"] #wh-stat-capital-arrival {
    color: #475569 !important;
}

:root[data-theme="light"] #wh-stat-capital-warehouse {
    color: #0284c7 !important;
}

:root[data-theme="light"] #wh-stat-capital-sale {
    color: #0369a1 !important;
}

:root[data-theme="light"] #wh-stat-pnl-month {
    color: #2563eb !important;
}

:root[data-theme="light"] #wh-stat-cash-flow {
    color: #6366f1 !important;
}

:root[data-theme="light"] #wh-stat-potential-arrival-val,
:root[data-theme="light"] #wh-stat-potential-warehouse-val,
:root[data-theme="light"] #wh-stat-capital-invested-val {
    color: #0f172a !important;
}

/* ==========================================================================
   SPIKES TABLE: ZERO SCROLLBAR ORIZZONTALE & ADATTAMENTO SCHERMO
   ========================================================================== */
#table-spikes {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse;
}

#table-spikes th {
    font-size: 0.71rem !important;
    padding: 6px 4px !important;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

#table-spikes td {
    padding: 4px 6px !important;
    vertical-align: middle !important;
    font-size: 0.78rem;
}

#table-spikes td:nth-child(1),
#table-spikes td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#table-spikes td:last-child {
    overflow: visible;
    white-space: nowrap;
    padding-right: 4px !important;
}

:root[data-theme="light"] #table-spikes th {
    background-color: var(--table-header-bg) !important;
    color: #334155 !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

:root[data-theme="light"] #table-spikes td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    color: #0f172a !important;
}

:root[data-theme="light"] #table-spikes td strong {
    color: #0f172a !important;
}

:root[data-theme="light"] #table-spikes td:nth-child(3) {
    color: #334155 !important;
}

/* ========================================================
   LOCK BUTTON BADGE (TOTEM & REPRICER GOVERNANCE)
   ======================================================== */
.lock-btn-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 30px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    user-select: none !important;
}

.lock-btn-badge.locked {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
}

.lock-btn-badge.locked:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(0, 242, 254, 0.4) !important;
}

.lock-btn-badge.unlocked {
    background: rgba(0, 242, 254, 0.12) !important;
    border: 1px solid #00f2fe !important;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.35) !important;
}

.lock-btn-badge.unlocked:hover {
    background: rgba(0, 242, 254, 0.22) !important;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.55) !important;
}

:root[data-theme="light"] .lock-btn-badge.locked {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.2) !important;
}

:root[data-theme="light"] .lock-btn-badge.locked:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    border-color: #0284c7 !important;
}

:root[data-theme="light"] .lock-btn-badge.unlocked {
    background: rgba(2, 132, 199, 0.1) !important;
    border: 1.5px solid #0284c7 !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.25) !important;
}

/* ==========================================================================
   GLOBAL TABLE ZEBRA STRIPING & ROW VISIBILITY (DARK & LIGHT MODE)
   ========================================================================== */
/* Dark Mode Zebra Striping */
table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(odd),
.deck-table tbody tr:nth-child(odd),
.oracle-sets-table tbody tr:nth-child(odd),
.oracle-editions-table tbody tr:nth-child(odd),
.trade-table tbody tr:nth-child(odd),
.warehouse-table tbody tr:nth-child(odd),
#table-spikes tbody tr:nth-child(odd),
#table-notif-both tbody tr:nth-child(odd),
#table-notif-mg tbody tr:nth-child(odd),
#table-notif-sf tbody tr:nth-child(odd),
#table-notif-mg-sets tbody tr:nth-child(odd),
#table-sellers tbody tr:nth-child(odd),
#inventory-table tbody tr:nth-child(odd),
#table-scarcity tbody tr:nth-child(odd) {
    background-color: transparent;
}

table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even),
.deck-table tbody tr:nth-child(even),
.oracle-sets-table tbody tr:nth-child(even),
.oracle-editions-table tbody tr:nth-child(even),
.trade-table tbody tr:nth-child(even),
.warehouse-table tbody tr:nth-child(even),
#table-spikes tbody tr:nth-child(even),
#table-notif-both tbody tr:nth-child(even),
#table-notif-mg tbody tr:nth-child(even),
#table-notif-sf tbody tr:nth-child(even),
#table-notif-mg-sets tbody tr:nth-child(even),
#table-sellers tbody tr:nth-child(even),
#inventory-table tbody tr:nth-child(even),
#table-scarcity tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.025) !important;
}

table tbody tr:hover,
.data-table tbody tr:hover,
.deck-table tbody tr:hover,
.oracle-sets-table tbody tr:hover,
.oracle-editions-table tbody tr:hover,
.trade-table tbody tr:hover,
.warehouse-table tbody tr:hover,
#table-spikes tbody tr:hover,
#table-notif-both tbody tr:hover,
#table-notif-mg tbody tr:hover,
#table-notif-sf tbody tr:hover,
#table-notif-mg-sets tbody tr:hover,
#table-sellers tbody tr:hover,
#inventory-table tbody tr:hover,
#table-scarcity tbody tr:hover {
    background-color: rgba(0, 242, 254, 0.08) !important;
    transition: background-color 0.15s ease-in-out;
}

/* Light Mode Zebra Striping */
:root[data-theme="light"] table tbody tr:nth-child(odd),
:root[data-theme="light"] .data-table tbody tr:nth-child(odd),
:root[data-theme="light"] .deck-table tbody tr:nth-child(odd),
:root[data-theme="light"] .oracle-sets-table tbody tr:nth-child(odd),
:root[data-theme="light"] .oracle-editions-table tbody tr:nth-child(odd),
:root[data-theme="light"] .trade-table tbody tr:nth-child(odd),
:root[data-theme="light"] .warehouse-table tbody tr:nth-child(odd),
:root[data-theme="light"] #table-spikes tbody tr:nth-child(odd),
:root[data-theme="light"] #table-notif-both tbody tr:nth-child(odd),
:root[data-theme="light"] #table-notif-mg tbody tr:nth-child(odd),
:root[data-theme="light"] #table-notif-sf tbody tr:nth-child(odd),
:root[data-theme="light"] #table-notif-mg-sets tbody tr:nth-child(odd),
:root[data-theme="light"] #table-sellers tbody tr:nth-child(odd),
:root[data-theme="light"] #inventory-table tbody tr:nth-child(odd),
:root[data-theme="light"] #table-scarcity tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

:root[data-theme="light"] table tbody tr:nth-child(even),
:root[data-theme="light"] .data-table tbody tr:nth-child(even),
:root[data-theme="light"] .deck-table tbody tr:nth-child(even),
:root[data-theme="light"] .oracle-sets-table tbody tr:nth-child(even),
:root[data-theme="light"] .oracle-editions-table tbody tr:nth-child(even),
:root[data-theme="light"] .trade-table tbody tr:nth-child(even),
:root[data-theme="light"] .warehouse-table tbody tr:nth-child(even),
:root[data-theme="light"] #table-spikes tbody tr:nth-child(even),
:root[data-theme="light"] #table-notif-both tbody tr:nth-child(even),
:root[data-theme="light"] #table-notif-mg tbody tr:nth-child(even),
:root[data-theme="light"] #table-notif-sf tbody tr:nth-child(even),
:root[data-theme="light"] #table-notif-mg-sets tbody tr:nth-child(even),
:root[data-theme="light"] #table-sellers tbody tr:nth-child(even),
:root[data-theme="light"] #inventory-table tbody tr:nth-child(even),
:root[data-theme="light"] #table-scarcity tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
}

:root[data-theme="light"] table tbody tr:hover,
:root[data-theme="light"] .data-table tbody tr:hover,
:root[data-theme="light"] .deck-table tbody tr:hover,
:root[data-theme="light"] .oracle-sets-table tbody tr:hover,
:root[data-theme="light"] .oracle-editions-table tbody tr:hover,
:root[data-theme="light"] .trade-table tbody tr:hover,
:root[data-theme="light"] .warehouse-table tbody tr:hover,
:root[data-theme="light"] #table-spikes tbody tr:hover,
:root[data-theme="light"] #table-notif-both tbody tr:hover,
:root[data-theme="light"] #table-notif-mg tbody tr:hover,
:root[data-theme="light"] #table-notif-sf tbody tr:hover,
:root[data-theme="light"] #table-notif-mg-sets tbody tr:hover,
:root[data-theme="light"] #table-sellers tbody tr:hover,
:root[data-theme="light"] #inventory-table tbody tr:hover,
:root[data-theme="light"] #table-scarcity tbody tr:hover {
    background-color: #f0f9ff !important;
    transition: background-color 0.15s ease-in-out;
}

/* ==========================================================================
   DECK COMPOSER & ORACLE CARD HOVER PREVIEW POPOVER (REGOLA 7 & 9)
   ========================================================================== */
.deck-card-hover-trigger {
    cursor: pointer;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}
.deck-card-hover-trigger:hover {
    color: var(--primary, #00f2fe) !important;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}
:root[data-theme="light"] .deck-card-hover-trigger:hover {
    color: #0284c7 !important;
    text-shadow: none;
}

#deck-card-image-preview {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
    display: none;
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.5);
    border-radius: 12px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 242, 254, 0.3);
    padding: 8px;
    width: 240px;
    text-align: center;
}
#deck-card-image-preview.visible {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}
#deck-card-image-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
#deck-card-image-preview .preview-card-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #00f2fe;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

:root[data-theme="light"] #deck-card-image-preview {
    background: #ffffff !important;
    border: 1px solid #0284c7 !important;
    box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.2), 0 0 16px rgba(2, 132, 199, 0.25) !important;
}
:root[data-theme="light"] #deck-card-image-preview .preview-card-title {
    color: #0284c7 !important;
}


