/* =========================================================
   GESTIONALE BIGCARS – ULTRA PREMIUM iOS 26 MINIMAL
   VERSIONE 2.0 - PROFESSIONAL RESTYLING
   ========================================================= */

:root {
    /* Colori ultra minimal */
    --bg-page: #0a0a0a;
    --bg-card: #111111;
    --bg-elevated: #1a1a1a;
    --bg-hover: #1f1f1f;
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1a1;
    --text-tertiary: #6b6b6b;

    /* SEZIONE VENDITA - ROSSO */
    --vendita: #ff3b57;
    --vendita-light: #ff6b7e;
    --vendita-dark: #e62946;
    --vendita-glow: rgba(255, 59, 87, 0.35);
    --vendita-subtle: rgba(255, 59, 87, 0.08);
    
    /* SEZIONE ASSICURAZIONI - BLU */
    --assicurazioni: #00d4ff;
    --assicurazioni-light: #33e0ff;
    --assicurazioni-dark: #00b8e6;
    --assicurazioni-glow: rgba(0, 212, 255, 0.35);
    --assicurazioni-subtle: rgba(0, 212, 255, 0.08);
    
    /* SEZIONE STATISTICHE - VIOLA */
    --stats: #a855f7;
    --stats-light: #c084fc;
    --stats-dark: #9333ea;
    --stats-glow: rgba(168, 85, 247, 0.35);
    --stats-subtle: rgba(168, 85, 247, 0.08);
    
    /* SEZIONE INVENTARIO - ROSSO (come vendita) */
    --inventario: #ff3b57;
    --inventario-light: #ff6b7e;
    --inventario-dark: #e62946;
    --inventario-glow: rgba(255, 59, 87, 0.35);
    --inventario-subtle: rgba(255, 59, 87, 0.08);
    
    /* Accent generico */
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --accent-subtle: rgba(99, 102, 241, 0.08);
    
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Canali vendita - Statistics */
    --autoscout: #ffb800;
    --autoscout-glow: rgba(255, 184, 0, 0.35);
    --classica: #ff3b57;
    --classica-glow: rgba(255, 59, 87, 0.35);
    --social: #a855f7;
    --social-glow: rgba(168, 85, 247, 0.35);
    --sito: #00d4ff;
    --sito-glow: rgba(0, 212, 255, 0.35);

    /* Tipografia SF Pro */
    --font-primary: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border radius */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   RESET & BASE
   ========================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* =========================================================
   LOGIN PAGE - ULTRA MINIMAL
   ========================================================= */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: 
        radial-gradient(ellipse at top, rgba(168, 85, 247, 0.06), transparent 50%),
        var(--bg-page);
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--stats) 20%,
        var(--stats) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--stats-glow);
}

.login-card h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-sm);
}

.login-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    font-weight: 400;
}

.login-card label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    margin-top: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-card input,
.login-card select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: all var(--transition-base);
}

.login-card input:focus,
.login-card select:focus {
    background: var(--bg-page);
    border-color: var(--stats);
    box-shadow: 0 0 0 4px var(--stats-subtle);
}

.login-card input::placeholder {
    color: var(--text-tertiary);
}

.error-msg {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: #fca5a5;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* =========================================================
   BUTTONS - SISTEMA UNIFICATO CON COLORI SEZIONE
   ========================================================= */

/* Primary button - default vendita */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 14px 28px;
    background: var(--vendita);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--vendita-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--vendita-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary button - default assicurazioni */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 14px 28px;
    background: var(--assicurazioni);
    color: #000000;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: var(--assicurazioni-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--assicurazioni-glow);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Ghost button - adattivo alla sezione */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

/* Bottoni specifici per sezione */
.section-vendita .btn-primary,
.card-vendita .btn-primary {
    background: var(--vendita);
}

.section-vendita .btn-primary:hover,
.card-vendita .btn-primary:hover {
    background: var(--vendita-light);
    box-shadow: 0 8px 24px var(--vendita-glow);
}

.section-assi .btn-primary,
.card-assi .btn-primary {
    background: var(--assicurazioni);
    color: #000000;
}

.section-assi .btn-primary:hover,
.card-assi .btn-primary:hover {
    background: var(--assicurazioni-light);
    box-shadow: 0 8px 24px var(--assicurazioni-glow);
}

.section-stats .btn-primary,
.card-stats .btn-primary {
    background: var(--stats);
}

.section-stats .btn-primary:hover,
.card-stats .btn-primary:hover {
    background: var(--stats-light);
    box-shadow: 0 8px 24px var(--stats-glow);
}

.section-inventario .btn-primary,
.card-inventario .btn-primary {
    background: var(--inventario);
    color: #ffffff;
}

.section-inventario .btn-primary:hover,
.card-inventario .btn-primary:hover {
    background: var(--inventario-light);
    box-shadow: 0 8px 24px var(--inventario-glow);
}

/* Danger button */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: #fca5a5;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

/* =========================================================
   HEADER - NAV CENTRATA ELEGANTE
   ========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-2xl);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(40px) saturate(140%);
    border-bottom: 1px solid var(--border-subtle);
}

.topbar-with-nav {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.topbar-nav {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.topbar-nav a {
    padding: 11px 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    position: relative;
}

.topbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 9px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: var(--text-primary);
    opacity: 0;
    border-radius: 2px;
    transition: opacity var(--transition-base);
}

.topbar-nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.topbar-nav a:hover::after {
    opacity: 0.4;
}

/* Nav con colori sezione */
.topbar-nav .nav-vendita:hover {
    color: var(--vendita-light);
}

.topbar-nav .nav-vendita:hover::after {
    background: var(--vendita);
    opacity: 0.6;
    box-shadow: 0 0 8px var(--vendita-glow);
}

.topbar-nav .nav-assi:hover {
    color: var(--assicurazioni-light);
}

.topbar-nav .nav-assi:hover::after {
    background: var(--assicurazioni);
    opacity: 0.6;
    box-shadow: 0 0 8px var(--assicurazioni-glow);
}

.topbar-nav .nav-inventario:hover {
    color: var(--inventario-light);
}

.topbar-nav .nav-inventario:hover::after {
    background: var(--inventario);
    opacity: 0.6;
    box-shadow: 0 0 8px var(--inventario-glow);
}

.topbar-nav .nav-stats:hover {
    color: var(--stats-light);
}

.topbar-nav .nav-stats:hover::after {
    background: var(--stats);
    opacity: 0.6;
    box-shadow: 0 0 8px var(--stats-glow);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.topbar-left {
    display: none;
}

.topbar-center {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-pill {
    padding: 9px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-base);
}

.user-pill:hover {
    border-color: var(--border-medium);
    background: var(--bg-hover);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--success);
    border-radius: 50%;
    opacity: 0.4;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes ping {
    75%, 100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* =========================================================
   NAVIGATION (OLD - NASCOSTA)
   ========================================================= */

.main-nav {
    display: none;
}

.nav-title {
    display: none;
}

/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-2xl) var(--space-3xl);
}

/* =========================================================
   DASHBOARD HERO - SOLO LOGO
   ========================================================= */

.dashboard-hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
}

.hero-title {
    display: none;
}

.hero-logo {
    max-width: 340px;
    height: auto;
    opacity: 0.96;
    transition: opacity var(--transition-smooth);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-logo:hover {
    opacity: 1;
}

/* =========================================================
   GRID & CARDS - ULTRA MINIMAL CON LED SEZIONI
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.card {
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--border-medium) 20%,
        var(--border-medium) 80%,
        transparent
    );
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-medium);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

/* Card con LED sezioni */
.card-vendita {
    border-color: rgba(255, 59, 87, 0.15);
}

.card-vendita::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--vendita) 20%,
        var(--vendita) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--vendita-glow);
}

.card-vendita:hover {
    border-color: rgba(255, 59, 87, 0.3);
    box-shadow: 0 8px 32px var(--vendita-glow);
}

.card-assi {
    border-color: rgba(0, 212, 255, 0.15);
}

.card-assi::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--assicurazioni) 20%,
        var(--assicurazioni) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--assicurazioni-glow);
}

.card-assi:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 32px var(--assicurazioni-glow);
}

.card-stats {
    border-color: rgba(168, 85, 247, 0.15);
}

.card-stats::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--stats) 20%,
        var(--stats) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--stats-glow);
}

.card-stats:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 8px 32px var(--stats-glow);
}

.card-inventario {
    border-color: rgba(255, 59, 87, 0.15);
}

.card-inventario::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--inventario) 20%,
        var(--inventario) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--inventario-glow);
}

.card-inventario:hover {
    border-color: rgba(255, 59, 87, 0.3);
    box-shadow: 0 8px 32px var(--inventario-glow);
}

.card-richieste::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--accent) 20%,
        var(--accent) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--accent-glow);
}

.card .btn-primary,
.card .btn-secondary,
.card .btn-ghost {
    width: auto;
    margin-top: var(--space-md);
}

/* =========================================================
   SECTIONS - CON LED SEZIONI
   ========================================================= */

.section {
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--border-medium) 20%,
        var(--border-medium) 80%,
        transparent
    );
}

.section-vendita {
    border-color: rgba(255, 59, 87, 0.15);
}

.section-vendita::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--vendita) 20%,
        var(--vendita) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--vendita-glow);
}

.section-assi {
    border-color: rgba(0, 212, 255, 0.15);
}

.section-assi::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--assicurazioni) 20%,
        var(--assicurazioni) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--assicurazioni-glow);
}

.section-stats {
    border-color: rgba(168, 85, 247, 0.15);
}

.section-stats::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--stats) 20%,
        var(--stats) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--stats-glow);
}

.section-inventario {
    border-color: rgba(255, 59, 87, 0.15);
}

.section-inventario::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--inventario) 20%,
        var(--inventario) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--inventario-glow);
}

.section > * {
    position: relative;
    z-index: 1;
}

.section h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-xs);
}

.section > p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

/* =========================================================
   STATISTICHE - REDESIGN PROFESSIONALE
   ========================================================= */

.stats-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.stat-hero-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.stat-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.stat-hero-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-medium);
}

.stat-hero-card:hover::before {
    opacity: 1;
}

.stat-hero-card .stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
}

.stat-hero-card .stat-value {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-hero-card .stat-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Card specifiche con colori */
.stat-hero-card.vendite::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--vendita) 20%,
        var(--vendita) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--vendita-glow);
}

.stat-hero-card.vendite .stat-value {
    background: linear-gradient(135deg, var(--vendita-light) 0%, var(--vendita) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-hero-card.canale::before {
    background: linear-gradient(90deg, 
        transparent,
        var(--stats) 20%,
        var(--stats) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--stats-glow);
}

.stat-hero-card.canale .stat-value {
    background: linear-gradient(135deg, var(--stats-light) 0%, var(--stats) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Auto suggerite premium - REDESIGN ULTRA FIGO */
.premium-cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.premium-auto-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 0;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-auto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent,
        var(--autoscout) 30%,
        var(--autoscout) 70%,
        transparent
    );
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.premium-auto-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 184, 0, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 184, 0, 0.1);
}

.premium-auto-card:hover::before {
    opacity: 1;
    box-shadow: 0 0 20px var(--autoscout-glow);
}

/* Header card con badge premium */
.premium-auto-header {
    padding: var(--space-xl);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.premium-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--autoscout) 0%, #ffa500 100%);
    color: #000000;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    box-shadow: 
        0 4px 12px var(--autoscout-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 4px 12px var(--autoscout-glow),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 6px 20px var(--autoscout-glow),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.premium-auto-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.premium-auto-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Body card con dettagli */
.premium-auto-body {
    padding: var(--space-xl);
}

.premium-auto-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.premium-stat-item {
    background: var(--bg-card);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.premium-stat-item:hover {
    border-color: var(--border-medium);
    background: var(--bg-elevated);
}

.premium-stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.premium-stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    font-family: var(--font-mono);
}

/* Score Premium gigante */
.premium-score-section {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 184, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premium-score-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 184, 0, 0.1), transparent);
    animation: score-shimmer 3s infinite;
}

@keyframes score-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.premium-score-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.premium-score-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--autoscout) 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-sm);
    text-shadow: 0 4px 12px var(--autoscout-glow);
}

.premium-score-max {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Progress bar ridisegnata */
.premium-progress-wrapper {
    margin-top: var(--space-lg);
}

.premium-progress-bar {
    height: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.premium-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--autoscout) 0%, 
        #ffcc00 50%,
        var(--autoscout) 100%
    );
    background-size: 200% 100%;
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 20px var(--autoscout-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.premium-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Info sotto la progress bar */
.premium-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
}

.premium-progress-days {
    color: var(--text-secondary);
    font-weight: 500;
}

.premium-progress-km {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

/* Stats bars migliorati */
.stats-bar-row {
    margin-bottom: var(--space-xl);
}

.stats-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-sm);
}

.stats-bar-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.stats-bar-value {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.stats-bar-track {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    position: relative;
}

.stats-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2.5s infinite;
}

/* Colori canali vendita */
.stats-bar-row:nth-child(1) .stats-bar-fill {
    background: linear-gradient(90deg, var(--autoscout), #ffa500);
    box-shadow: 0 0 12px var(--autoscout-glow);
}

.stats-bar-row:nth-child(1) .stats-bar-value {
    color: var(--autoscout);
}

.stats-bar-row:nth-child(2) .stats-bar-fill {
    background: linear-gradient(90deg, var(--classica), var(--vendita-light));
    box-shadow: 0 0 12px var(--classica-glow);
}

.stats-bar-row:nth-child(2) .stats-bar-value {
    color: var(--classica);
}

.stats-bar-row:nth-child(3) .stats-bar-fill {
    background: linear-gradient(90deg, var(--social), var(--stats-light));
    box-shadow: 0 0 12px var(--social-glow);
}

.stats-bar-row:nth-child(3) .stats-bar-value {
    color: var(--social);
}

.stats-bar-row:nth-child(4) .stats-bar-fill {
    background: linear-gradient(90deg, var(--sito), var(--assicurazioni-light));
    box-shadow: 0 0 12px var(--sito-glow);
}

.stats-bar-row:nth-child(4) .stats-bar-value {
    color: var(--sito);
}

.stats-bar-subtitle {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* FastSell section - REDESIGN ULTRA PROFESSIONALE */
.fastsell-section {
    background: var(--bg-card);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-top: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.fastsell-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent,
        var(--success) 20%,
        var(--success) 80%,
        transparent
    );
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.fastsell-header {
    margin-bottom: var(--space-2xl);
}

.fastsell-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.fastsell-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: #000000;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.fastsell-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Tabella FastSell moderna */
.fastsell-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.fastsell-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
}

.fastsell-table thead {
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fastsell-table thead th {
    padding: var(--space-lg) var(--space-md);
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--border-subtle);
    white-space: nowrap;
}

.fastsell-table thead th:first-child {
    padding-left: var(--space-xl);
    border-radius: var(--radius-lg) 0 0 0;
}

.fastsell-table thead th:last-child {
    padding-right: var(--space-xl);
    border-radius: 0 var(--radius-lg) 0 0;
}

.fastsell-table tbody tr {
    transition: all var(--transition-base);
    position: relative;
}

.fastsell-table tbody tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-xl);
    right: var(--space-xl);
    height: 1px;
    background: var(--border-subtle);
}

.fastsell-table tbody tr:last-child::after {
    display: none;
}

.fastsell-table tbody tr:hover {
    background: rgba(34, 197, 94, 0.04);
}

.fastsell-table tbody tr:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--success) 0%, #16a34a 100%);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.fastsell-table td {
    padding: var(--space-lg) var(--space-md);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.fastsell-table td:first-child {
    padding-left: var(--space-xl);
}

.fastsell-table td:last-child {
    padding-right: var(--space-xl);
}

/* Colonne specifiche FastSell */
.fastsell-rank {
    width: 60px;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.fastsell-auto {
    min-width: 240px;
}

.fastsell-auto-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fastsell-auto-details {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.fastsell-targa {
    width: 120px;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
}

.fastsell-km {
    width: 120px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.fastsell-anno {
    width: 80px;
    font-weight: 500;
    color: var(--text-secondary);
}

.fastsell-giorni {
    width: 100px;
    text-align: center;
}

.giorni-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-full);
    font-weight: 700;
    color: #86efac;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

.fastsell-prezzo {
    width: 140px;
    text-align: right;
}

.prezzo-value {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--success);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.fastsell-margine {
    width: 120px;
    text-align: right;
}

.margine-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.fastsell-score {
    width: 100px;
    text-align: center;
}

.score-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 2px solid rgba(34, 197, 94, 0.4);
    border-radius: 50%;
    font-weight: 800;
    font-size: 1rem;
    color: var(--success);
    position: relative;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.fastsell-table tbody tr:hover .score-circle::before {
    opacity: 1;
}

.fastsell-premium {
    width: 140px;
    text-align: center;
}

.premium-consigliato {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--autoscout) 0%, #ffa500 100%);
    color: #000000;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    box-shadow: 
        0 4px 12px var(--autoscout-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: pulse-premium 2s ease-in-out infinite;
}

@keyframes pulse-premium {
    0%, 100% {
        box-shadow: 
            0 4px 12px var(--autoscout-glow),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 6px 20px var(--autoscout-glow),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }
}

.premium-consigliato::before {
    content: '⭐';
    font-size: 0.875rem;
}

/* Nota strategica */
.fastsell-strategy-note {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-md);
}

.fastsell-strategy-note p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.fastsell-strategy-note strong {
    color: var(--success);
    font-weight: 600;
}

/* =========================================================
   PARCO AUTO - TABS NAVIGATION
   ========================================================= */

.inventory-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2xl);
}

.inventory-tabs a {
    padding: 11px 22px;
    border-radius: 11px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
}

.inventory-tabs a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.inventory-tabs a.active {
    background: var(--inventario);
    color: #ffffff;
    box-shadow: 
        0 2px 8px var(--inventario-glow),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   PARCO AUTO - SEARCH SECTION
   ========================================================= */

.inventory-search-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 59, 87, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.inventory-search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--inventario) 20%,
        var(--inventario) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--inventario-glow);
}

.inventory-search-section > * {
    position: relative;
    z-index: 1;
}

.inventory-search-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.inventory-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.inventory-search-grid label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-search-grid input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.inventory-search-grid input::placeholder {
    color: var(--text-tertiary);
}

.inventory-search-grid input:focus {
    background: var(--bg-page);
    border-color: var(--inventario);
    box-shadow: 0 0 0 4px var(--inventario-subtle);
}

.inventory-search-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

/* =========================================================
   PARCO AUTO - RESULTS
   ========================================================= */

.inventory-results {
    background: var(--bg-card);
    border: 1px solid rgba(255, 59, 87, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.inventory-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--inventario) 20%,
        var(--inventario) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--inventario-glow);
}

.inventory-results > * {
    position: relative;
    z-index: 1;
}

.inventory-results-header {
    margin-bottom: var(--space-xl);
}

.inventory-results-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.inventory-results-header p strong {
    color: var(--inventario);
    font-weight: 600;
}

/* =========================================================
   PARCO AUTO - TABLE
   ========================================================= */

.inventory-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

.inventory-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

.inventory-table thead {
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.inventory-table thead th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.inventory-table tbody tr {
    transition: all var(--transition-base);
}

.inventory-table tbody tr:hover {
    background: rgba(255, 59, 87, 0.04);
}

.inventory-table tbody td {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

/* Colonne specifiche */
.inventory-table .col-id {
    width: 140px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.inventory-table .col-photo {
    width: 80px;
}

.inventory-table .col-photo img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-subtle);
}

.inventory-table .col-brand {
    width: 140px;
    font-weight: 600;
}

.inventory-table .col-model {
    width: 140px;
    font-weight: 500;
}

.inventory-table .col-version {
    width: 180px;
    color: var(--text-secondary);
}

.inventory-table .col-plate {
    width: 120px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-weight: 500;
}

.inventory-table .col-arrival {
    width: 120px;
    color: var(--text-secondary);
}

.inventory-table .col-km {
    width: 110px;
    font-weight: 500;
    font-family: var(--font-mono);
}

.inventory-table .col-price {
    width: 140px;
    font-weight: 700;
    color: var(--success);
    font-family: var(--font-mono);
}

.inventory-table .col-type {
    width: 120px;
}

.inventory-table .col-actions {
    width: 100px;
    text-align: right;
}

/* Badge tipologia */
.inventory-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
    transition: all var(--transition-base);
}

.inventory-badge.badge-salone {
    background: var(--stats-subtle);
    border-color: rgba(168, 85, 247, 0.2);
    color: var(--stats-light);
}

.inventory-badge.badge-riconsegnata {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.inventory-badge.badge-venduta {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* Bottone azioni */
.inventory-action-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.inventory-action-btn:hover {
    background: var(--inventario-subtle);
    border-color: rgba(255, 59, 87, 0.3);
    color: var(--inventario-light);
}

/* =========================================================
   FORMS - ULTRA CLEAN
   ========================================================= */

.form-grid {
    margin-top: var(--space-xl);
}

.form-grid h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: var(--space-2xl) 0 var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.form-grid label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
    color: var(--text-tertiary);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    background: var(--bg-page);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-subtle);
}

.form-grid input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-grid textarea {
    resize: vertical;
    min-height: 100px;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

/* =========================================================
   TABS - MINIMAL PILLS
   ========================================================= */

.tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.tabs a {
    padding: 11px 24px;
    border-radius: 11px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.tabs a.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.alert.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.alert.info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

/* =========================================================
   TABLES - MODERN & CLEAN
   ========================================================= */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
}

.table thead,
.table tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.table thead {
    background: var(--bg-elevated);
}

.table th,
.table td {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-subtle);
}

.table th {
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: background var(--transition-base);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--bg-elevated);
}

.link-detail {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-base);
}

.link-detail:hover {
    color: var(--vendita);
}

/* =========================================================
   DETAIL CARDS
   ========================================================= */

.detail-card {
    margin-top: var(--space-xl);
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--accent) 20%,
        var(--accent) 80%,
        transparent
    );
    box-shadow: 0 0 16px var(--accent-glow);
}

.detail-card > * {
    position: relative;
    z-index: 1;
}

.detail-card h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xl);
}

.detail-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: var(--space-xl) 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.detail-grid p {
    font-size: 0.9375rem;
    line-height: 1.8;
}

.detail-grid strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================
   FILE LIST
   ========================================================= */

.file-list {
    list-style: none;
    margin: var(--space-lg) 0;
}

.file-list li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    font-size: 0.9375rem;
}

.file-tag {
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    padding: var(--space-2xl);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-3xl);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    :root {
        --space-2xl: 32px;
        --space-3xl: 48px;
    }

    .topbar {
        padding: var(--space-md) var(--space-lg);
    }

    .topbar-with-nav {
        flex-direction: column;
        align-items: center;
    }

    .topbar-nav {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .topbar-user {
        order: 1;
    }

    .page {
        padding: 0 var(--space-lg) var(--space-2xl);
    }

    .grid,
    .stats-hero {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: var(--space-2xl) var(--space-xl);
    }

    .section,
    .card,
    .detail-card {
        padding: var(--space-xl);
    }

    .hero-logo {
        max-width: 240px;
    }

    .dashboard-hero {
        padding: var(--space-2xl) var(--space-lg);
    }

    .inventory-tabs {
        overflow-x: auto;
        width: 100%;
        justify-content: flex-start;
    }

    .inventory-search-grid {
        grid-template-columns: 1fr;
    }

    .inventory-search-actions {
        flex-direction: column;
        width: 100%;
    }

    .inventory-search-actions .btn-primary,
    .inventory-search-actions .btn-ghost {
        width: 100%;
    }

    .inventory-table-wrapper {
        border-radius: var(--radius-md);
    }

    .premium-auto-card {
        flex-direction: column;
        text-align: center;
    }

    .premium-auto-card .auto-score {
        text-align: center;
    }

    .stat-hero-card .stat-value {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .stat-hero-card .stat-value {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}
