/* ========================================
   TUTOR AI - MAIN STYLESHEET
   Stili per pagine: index.php, login.php, dashboard.php
   Tema: Automatico (Light/Dark basato su sistema)
========================================= */

/* ========================================
   IMPORTS - FONTS & ICONS
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* ========================================
   CSS VARIABLES - DARK THEME (DEFAULT)
   Utilizzato per: Tutte le pagine
========================================= */
:root {
    --bg-void: #050208;
    --bg-dark: #0a0612;
    --bg-card: #120a1f;
    --bg-card-hover: #1a0f2e;
    
    --primary: #a855f7;
    --primary-light: #c084fc;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --accent-2: #3b82f6;
    
    --text-white: #ffffff;
    --text-gray: #a8a29e;
    --text-muted: #78716c;
    
    --glow-purple: 0 0 40px rgba(168, 85, 247, 0.5);
    --glow-pink: 0 0 40px rgba(236, 72, 153, 0.5);
    --glow-cyan: 0 0 40px rgba(20, 184, 166, 0.5);
}

/* ========================================
   CSS VARIABLES - LIGHT THEME
   Utilizzato quando il sistema è in modalità chiara
========================================= */
@media (prefers-color-scheme: light) {
    :root {
        --bg-void: #f9fafb;
        --bg-dark: #ffffff;
        --bg-card: #ffffff;
        --bg-card-hover: #f3f4f6;
        
        --primary: #7c3aed;
        --primary-light: #a855f7;
        --secondary: #db2777;
        --accent: #0d9488;
        --accent-2: #2563eb;
        
        --text-white: #111827;
        --text-gray: #4b5563;
        --text-muted: #6b7280;
        
        --glow-purple: 0 0 20px rgba(124, 58, 237, 0.2);
        --glow-pink: 0 0 20px rgba(219, 39, 119, 0.2);
        --glow-cyan: 0 0 20px rgba(13, 148, 136, 0.2);
    }
}

/* ========================================
   RESET & BASE STYLES
   Utilizzato per: Tutte le pagine
========================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-void);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   PARTICLES CANVAS
   Utilizzato per: index.php (Hero section)
========================================= */
/* ============ PARTICLES CANVAS ============ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   3D FLIP CARDS
   Utilizzato per: index.php (Features section)
========================================= */
/* ============ 3D FLIP CARDS ============ */
.flip-card-3d {
    perspective: 1500px;
    height: 400px;
    position: relative;
    z-index: 1;
}

.flip-card-3d.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 40px;
    top: 0;
    left: 0;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #a855f7, #ec4899);
}

/* ============ MORPHING SHAPES ============ */
.morphing-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 20s ease-in-out infinite;
    filter: blur(40px);
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
}

/* ========================================
   HOLOGRAPHIC & GLITCH EFFECTS
   Utilizzato per: index.php (Titoli e testi speciali)
========================================= */
/* ============ HOLOGRAPHIC EFFECT ============ */
.holographic {
    position: relative;
    background: linear-gradient(135deg, #a855f7, #ec4899, #14b8a6, #a855f7);
    background-size: 400% 400%;
    animation: holographic 8s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes holographic {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============ NEON GLOW ============ */
.neon-pulse {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3), 0 0 40px rgba(236, 72, 153, 0.2);
}

/* ============ GLITCH EFFECT ============ */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: none;
    color: #a855f7;
    z-index: -1;
}

.glitch::after {
    animation: none;
    color: #ec4899;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

/* ============ ANIMATED BACKGROUND ============ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: float 20s ease-in-out forwards;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #14b8a6 0%, transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    10% { transform: translate(50px, -50px) scale(1.1); opacity: 0.3; }
    20% { transform: translate(-30px, 30px) scale(0.9); opacity: 0.5; }
    30% { transform: translate(40px, 50px) scale(1.05); opacity: 0.7; }
    40% { transform: translate(-20px, -30px) scale(0.95); opacity: 0.8; }
    50% { transform: translate(25px, 20px) scale(1.02); opacity: 0.9; }
    60% { transform: translate(-15px, -15px) scale(0.98); opacity: 0.95; }
    70% { transform: translate(10px, 10px) scale(1.01); opacity: 0.97; }
    80% { transform: translate(-5px, -5px) scale(0.99); opacity: 0.99; }
    90% { transform: translate(2px, 2px) scale(1); opacity: 0.3; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
}

/* ========================================
   GRID OVERLAY
   Utilizzato per: Tutte le pagine (sfondo griglia)
========================================= */
/* ============ GRID OVERLAY ============ */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   GLASSMORPHISM EFFECTS
   Utilizzato per: Card e container in tutte le pagine
========================================= */
/* ============ GLASSMORPHISM ============ */
.glass {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-strong {
    background: rgba(18, 10, 31, 0.8);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ========================================
   BUTTONS - PRIMARY & OUTLINE
   Utilizzato per: Tutte le pagine
========================================= */
/* ============ BUTTONS ============ */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    padding: 14px 36px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--glow-purple);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.7);
}

.btn-outline {
    background: transparent;
    border: 2px solid #a855f7;
    color: #a855f7;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #a855f7;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-outline:hover::before {
    width: 300px;
    height: 300px;
}

.btn-outline:hover {
    color: white;
    border-color: #c084fc;
}

.btn-outline span {
    position: relative;
    z-index: 1;
}

/* ========================================
   NAVBAR - NAVIGATION
   Utilizzato per: index.php
========================================= */
/* ============ NAVBAR ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(10, 6, 18, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo img {
    height: 45px;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
    transition: transform 0.3s;
}

.logo img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.nav-links {
    display: flex;
    gap: 50px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-gray);
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--text-white);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ========================================
   HERO SECTION
   Utilizzato per: index.php (Sezione principale)
========================================= */
/* ============ HERO SECTION ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 150px 40px 100px;
    z-index: 2;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 80px;
    align-items: center;
}

.hero-text h1 {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(10deg); }
}

.hero-text p {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.8;
}

.cta-group {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.stat-item {
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    border-radius: 2px;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-image {
    position: relative;
    perspective: 1000px;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 30px 60px rgba(168, 85, 247, 0.3);
    transition: transform 0.5s;
    animation: float-image 6s ease-in-out infinite;
}

.hero-image:hover img {
    transform: rotateY(5deg) rotateX(5deg);
}

@keyframes float-image {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ========================================
   FEATURES SECTION - 3D CARDS
   Utilizzato per: index.php (Sezione funzionalità)
========================================= */
/* ============ FEATURES SECTION ============ */
.section {
    padding: 40px 40px;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.section-header h2 .text-gradient {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.3);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: var(--glow-purple);
    position: relative;
    z-index: 1;
}

.feature-icon .material-icons {
    font-size: 36px;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ========================================
   SCROLL ANIMATIONS
   Utilizzato per: index.php (Animazioni scroll)
========================================= */
/* ============ SCROLL ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
/* ========================================
   AUTH PAGE - LOGIN & REGISTER
   Utilizzato per: login.php
========================================= */
/* ============ AUTH PAGE (LOGIN/REGISTER) ============ */
body.auth-page {
    overflow: hidden;
    height: 100vh;
}

.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 0;
    overflow: hidden;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 500px;
    perspective: 1500px;
}

.auth-card-inner {
    position: relative;
    width: 100%;
    height: 600px;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.auth-card-wrapper.flipped .auth-card-inner {
    transform: rotateY(180deg);
}

.auth-card-face {
    width: 100%;
    height: 600px;
    background: rgba(18, 10, 31, 0.9);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card-front {
    position: relative;
}

.auth-card-back {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
}

.auth-card-face form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.auth-card-face h1 {
    font-weight: 700;
    font-size: 2rem;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-align: center;
}

.switch-section {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.switch-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
    text-align: center;
}

.btn-switch-large {
    width: auto;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-switch-large:hover {
    color: #c084fc;
}

.btn-switch-large:active {
    transform: scale(0.98);
}

.auth-input-group {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.auth-input-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.auth-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.error-msg, .success-msg {
    font-size: 0.85rem;
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
}

.error-msg {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.success-msg {
    color: #86efac;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ========================================
   DASHBOARD - LAYOUT & COMPONENTS
   Utilizzato per: dashboard.php
========================================= */
/* ============ DASHBOARD ============ */
.dashboard-body {
    background: var(--bg-void);
}

/* New Dashboard Layout */
.dashboard-layout-new {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.main-content-new {
    flex: 1;
    padding: 20px 20px 100px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.dash-header-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.dash-header-new h1 {
    font-size: 2rem;
    margin: 0 0 5px 0;
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dash-header-new span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(18, 10, 31, 0.95);
    backdrop-filter: blur(30px);
    border-top: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    text-decoration: none;
    position: relative;
}

.nav-item i {
    font-size: 28px;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary);
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item.active i {
    transform: scale(1.1);
}

/* Generation Card */
.gen-card-new {
    background: rgba(18, 10, 31, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.gen-card-new::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.gen-card-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.gen-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.5);
}

.gen-icon i {
    font-size: 40px;
    color: white;
}

.gen-card-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gen-card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Styles */
.gen-form-new {
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group-new label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-group-new label i {
    font-size: 18px;
    color: var(--primary);
}

.input-group-new select,
.input-group-new textarea {
    width: 100%;
    padding: 15px;
    background: rgba(168, 85, 247, 0.1);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
}

.input-group-new select option {
    background: #1a0b2e;
    color: white;
    padding: 10px;
}

.input-group-new select:focus,
.input-group-new textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.input-group-new textarea {
    resize: vertical;
    min-height: 120px;
}

/* Radio Grid */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.radio-card {
    position: relative;
    cursor: pointer;
    width: 100%;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 100%;
}

.radio-content i {
    font-size: 40px;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.radio-content span {
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.radio-card input[type="radio"]:checked + .radio-content {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.15);
}

.radio-card input[type="radio"]:checked + .radio-content i,
.radio-card input[type="radio"]:checked + .radio-content span {
    color: var(--primary);
}

.radio-card:hover .radio-content {
    transform: translateY(-3px);
    border-color: rgba(168, 85, 247, 0.5);
}

/* Generate Button */
.btn-generate {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
    margin-top: 30px;
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.6);
}

.btn-generate:active {
    transform: translateY(-1px);
}

/* Documents Section */
.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.documents-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.doc-card {
    background: rgba(18, 10, 31, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.doc-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.3);
}

.doc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-card-header i {
    font-size: 36px;
    color: rgba(168, 85, 247, 0.6);
}

.doc-type {
    padding: 5px 12px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.doc-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: white;
}

.doc-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.doc-date i {
    font-size: 16px;
}

.doc-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.doc-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.5);
}

/* Document Status States */
.doc-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.doc-status.loading {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.doc-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.doc-status i {
    font-size: 20px;
}

/* Spinner Animation */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(96, 165, 250, 0.3);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for loading cards */
.doc-card[data-stato="in_generazione"] {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        border-color: rgba(59, 130, 246, 0.3);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    }
    50% { 
        border-color: rgba(59, 130, 246, 0.6);
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    }
}

/* Error state styling */
.doc-card[data-stato="errore"] {
    border-color: rgba(239, 68, 68, 0.3);
}

.doc-card[data-stato="errore"]:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.2);
}

/* ========================================
   LIGHT THEME - DOCUMENT STATES
   Utilizzato quando sistema è in light mode
========================================= */
@media (prefers-color-scheme: light) {
    /* Background orbs - light theme */
    .bg-orb {
        opacity: 0.08;
    }
    
    .grid-overlay {
        opacity: 0.02;
        background: linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px),
                    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px);
    }
    
    /* Cards - light theme */
    .gen-card-new,
    .doc-card {
        background: #ffffff;
        border: 1px solid rgba(124, 58, 237, 0.15);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }
    
    .gen-card-new::before {
        background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
    }
    
    .doc-card:hover {
        border-color: rgba(124, 58, 237, 0.3);
        box-shadow: 0 8px 30px rgba(124, 58, 237, 0.12);
    }
    
    /* Bottom Navigation - light theme */
    .bottom-nav {
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(124, 58, 237, 0.15);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }
    
    .nav-item {
        color: #6b7280;
    }
    
    .nav-item.active,
    .nav-item:hover {
        color: #7c3aed;
    }
    
    /* Header - light theme */
    .dash-header-new {
        border-bottom: 1px solid rgba(124, 58, 237, 0.12);
    }
    
    .dash-header-new h1 {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    /* Form inputs - light theme */
    .input-group-new label {
        color: #4b5563;
    }
    
    .input-group-new label i {
        color: #7c3aed;
    }
    
    .input-group-new select,
    .input-group-new textarea {
        background: #ffffff;
        border: 2px solid rgba(124, 58, 237, 0.2);
        color: #111827;
    }
    
    .input-group-new select option {
        background: #ffffff;
        color: #111827;
    }
    
    .input-group-new select:focus,
    .input-group-new textarea:focus {
        border-color: #7c3aed;
        background: rgba(124, 58, 237, 0.02);
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    }
    
    /* Radio cards - light theme */
    .radio-content {
        background: #ffffff;
        border: 2px solid rgba(124, 58, 237, 0.2);
    }
    
    .radio-content i,
    .radio-content span {
        color: #6b7280;
    }
    
    .radio-card input[type="radio"]:checked + .radio-content {
        background: rgba(124, 58, 237, 0.05);
        border-color: #7c3aed;
    }
    
    .radio-card input[type="radio"]:checked + .radio-content i,
    .radio-card input[type="radio"]:checked + .radio-content span {
        color: #7c3aed;
    }
    
    .radio-card:hover .radio-content {
        border-color: rgba(124, 58, 237, 0.4);
    }
    
    /* Document titles - light theme */
    .documents-header h2 {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .gen-card-header h2 {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .gen-card-header p {
        color: #6b7280;
    }
    
    /* Document Status - Light Theme */
    .doc-status.loading {
        background: rgba(59, 130, 246, 0.08);
        color: #1d4ed8;
        border: 1px solid rgba(59, 130, 246, 0.25);
    }
    
    .doc-status.error {
        background: rgba(239, 68, 68, 0.08);
        color: #b91c1c;
        border: 1px solid rgba(239, 68, 68, 0.25);
    }
    
    /* Doc card details - light theme */
    .doc-card h3 {
        color: #111827;
    }
    
    .doc-meta {
        color: #6b7280;
    }
    
    .doc-subject {
        background: rgba(124, 58, 237, 0.08);
        color: #7c3aed;
        border: 1px solid rgba(124, 58, 237, 0.2);
    }
    
    .doc-date {
        color: #6b7280;
    }
    
    .doc-date i {
        color: #9ca3af;
    }
    
    /* Buttons - light theme */
    .btn-generate {
        box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
    }
    
    .btn-generate:hover {
        box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35);
    }
    
    .btn-primary {
        box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
    }
    
    /* Error messages - light theme */
    .error-msg {
        color: #b91c1c;
        background: rgba(220, 38, 38, 0.08);
        border: 1px solid rgba(220, 38, 38, 0.2);
    }
    
    .success-msg {
        color: #047857;
        background: rgba(5, 150, 105, 0.08);
        border: 1px solid rgba(5, 150, 105, 0.2);
    }
    
    /* Auth page - light theme */
    .auth-card-face {
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(124, 58, 237, 0.15);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    }
    
    .auth-card-face h1 {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 70%, #db2777 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .auth-input-group input {
        background: #ffffff;
        border: 2px solid rgba(124, 58, 237, 0.2);
        color: #111827;
    }
    
    .auth-input-group input:focus {
        border-color: #7c3aed;
        background: rgba(124, 58, 237, 0.02);
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    }
    
    .auth-input-group input::placeholder {
        color: rgba(107, 114, 128, 0.5);
    }
    
    .switch-text {
        color: #6b7280;
    }
    
    .btn-switch-large {
        color: #7c3aed;
    }
    
    .btn-switch-large:hover {
        color: #6d28d9;
    }
    
    /* Navbar - light theme */
    .navbar.scrolled {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(124, 58, 237, 0.12);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }
    
    .nav-links a {
        color: #6b7280;
    }
    
    .nav-links a:hover {
        color: #111827;
    }
    
    .logo img {
        filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.3));
    }
    
    /* Hero section - light theme */
    .hero-text h1 {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 50%, #db2777 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .hero-text p {
        color: #4b5563;
    }
    
    .hero-stats {
        border-top: 1px solid rgba(124, 58, 237, 0.12);
    }
    
    .stat-item h3 {
        background: linear-gradient(135deg, #7c3aed, #db2777);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .stat-item p {
        color: #6b7280;
    }
    
    .hero-image img {
        border: 1px solid rgba(124, 58, 237, 0.15);
        box-shadow: 0 20px 50px rgba(124, 58, 237, 0.12);
    }
    
    /* Feature cards - light theme */
    .feature-card {
        background: #ffffff;
        border: 1px solid rgba(124, 58, 237, 0.15);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }
    
    .feature-card::before {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(219, 39, 119, 0.03));
    }
    
    .feature-card:hover {
        border-color: rgba(124, 58, 237, 0.3);
        box-shadow: 0 8px 35px rgba(124, 58, 237, 0.12);
    }
    
    .feature-card h3 {
        color: #111827;
    }
    
    .feature-card p {
        color: #4b5563;
    }
    
    /* Section headers - light theme */
    .section-header h2 {
        color: #111827;
    }
    
    .section-header h2 .text-gradient {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 50%, #db2777 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .section-header p {
        color: #4b5563;
    }
    
    /* Holographic text - light theme */
    .holographic {
        background: linear-gradient(135deg, #111827, #7c3aed, #db2777, #111827);
        background-size: 400% 400%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* Buttons - light theme */
    .btn-outline {
        background: transparent;
        border: 2px solid #7c3aed;
        color: #7c3aed;
    }
    
    .btn-outline:hover {
        background: #7c3aed;
        color: white;
        box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    }
    
    /* Empty state - light theme */
    .empty-state {
        color: #6b7280;
    }
    
    .empty-state i {
        color: #9ca3af;
    }
    
    /* Team cards - light theme - IMPORTANT OVERRIDES */
    .team-card {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    }
    
    .team-card::before {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(219, 39, 119, 0.03)) !important;
    }
    
    .team-card:hover {
        border-color: rgba(124, 58, 237, 0.3) !important;
        box-shadow: 0 8px 35px rgba(124, 58, 237, 0.12) !important;
    }
    
    .team-card h3 {
        color: #111827 !important;
        background: linear-gradient(135deg, #111827, #7c3aed) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }
    
    .team-card .role {
        color: #7c3aed !important;
    }
    
    .team-card p {
        color: #4b5563 !important;
    }
    
    /* Tech items - light theme - IMPORTANT OVERRIDES */
    .tech-item {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    }
    
    .tech-item::before {
        background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%) !important;
    }
    
    .tech-item:hover {
        border-color: rgba(124, 58, 237, 0.3) !important;
        box-shadow: 0 8px 30px rgba(124, 58, 237, 0.12) !important;
    }
    
    .tech-item h4 {
        color: #111827 !important;
    }
    
    .tech-item p {
        color: #4b5563 !important;
    }
    
    /* Stats container - light theme - IMPORTANT OVERRIDES */
    .stats-container {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06) !important;
    }
    
    .stats-container::before {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(219, 39, 119, 0.03) 100%) !important;
    }
    
    /* Gen form card - light theme - IMPORTANT OVERRIDES */
    .gen-form-card {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06) !important;
    }
    
    .gen-form-card h2 {
        background: linear-gradient(135deg, #111827 0%, #7c3aed 70%, #db2777 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }
    
    .input-group label {
        color: #4b5563 !important;
    }
    
    .input-group select,
    .input-group textarea {
        background: #ffffff !important;
        border: 2px solid rgba(124, 58, 237, 0.2) !important;
        color: #111827 !important;
    }
    
    .input-group select option {
        background: #ffffff !important;
        color: #111827 !important;
    }
    
    .input-group select:focus,
    .input-group textarea:focus {
        border-color: #7c3aed !important;
        background: rgba(124, 58, 237, 0.02) !important;
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
    }
    
    .custom-radio span {
        background: #ffffff !important;
        border: 2px solid rgba(124, 58, 237, 0.2) !important;
        color: #111827 !important;
    }
    
    .custom-radio:hover span {
        border-color: #7c3aed !important;
    }
    
    /* Step items - light theme */
    .step-item h4 {
        color: #111827 !important;
    }
    
    .step-item small {
        color: #6b7280 !important;
    }
    
    /* Process cards - light theme - IMPORTANT OVERRIDES */
    .process-card {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    }
    
    .process-card::before {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(219, 39, 119, 0.03)) !important;
    }
    
    .process-card:hover {
        border-color: rgba(124, 58, 237, 0.3) !important;
        box-shadow: 0 8px 35px rgba(124, 58, 237, 0.12) !important;
    }
    
    .process-card h3 {
        color: #111827 !important;
    }
    
    .process-card p {
        color: #4b5563 !important;
    }
    
    /* Result cards - light theme - IMPORTANT OVERRIDES */
    .result-card {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    }
    
    .result-card::before {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(219, 39, 119, 0.03)) !important;
    }
    
    .result-card:hover {
        border-color: rgba(124, 58, 237, 0.3) !important;
        box-shadow: 0 8px 35px rgba(124, 58, 237, 0.12) !important;
    }
    
    .result-card h3 {
        color: #111827 !important;
    }
    
    .result-card p {
        color: #4b5563 !important;
    }
    
    /* Card elements - light theme */
    .card-title {
        color: #111827;
    }
    
    .card-meta {
        color: #6b7280;
    }
    
    /* Glass morphism - light theme - CRITICAL OVERRIDE */
    .glass {
        background: #ffffff !important;
        backdrop-filter: none !important;
        border: 1px solid rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
    }
    
    .glass-strong {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(124, 58, 237, 0.2) !important;
    }
    
    /* Text colors inside glass - light theme */
    .glass h3,
    .glass h4,
    .glass h2 {
        color: #111827 !important;
    }
    
    .glass p,
    .glass .text-muted {
        color: #4b5563 !important;
    }
    
    /* Flip cards back - light theme */
    .flip-card-back {
        background: linear-gradient(135deg, #7c3aed, #db2777) !important;
    }
    
    .flip-card-back h3,
    .flip-card-back p,
    .flip-card-back ul,
    .flip-card-back li {
        color: #ffffff !important;
    }
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.btn-primary-small {
    padding: 12px 24px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.5);
}

/* Legacy Dashboard Styles (Keep for compatibility) */.menu-item .material-icons {
    font-size: 24px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 40px;
    min-height: 100vh;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.welcome-text span {
    color: var(--text-gray);
    font-size: 1rem;
}

.user-avatar {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: var(--glow-purple);
    cursor: pointer;
    transition: transform 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-group select {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.filter-group select option {
    background: #120a1f;
    color: white;
}

/* Cards Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.pdf-card {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s;
    position: relative;
}

.pdf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
}

.pdf-card:hover::before {
    opacity: 1;
}

.pdf-card:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 20px 50px rgba(168, 85, 247, 0.3);
}

.card-header-img {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    padding: 40px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.card-header-img::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.type-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* Generation Form */
.gen-container {
    max-width: 900px;
    margin: 0 auto;
}

.gen-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
}

.gen-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #ec4899, #14b8a6);
    z-index: -1;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: var(--glow-purple);
}

.step-item h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 3px;
}

.step-item small {
    color: var(--text-muted);
}

.gen-form-card {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.gen-form-card h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-group select, .input-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s;
}

.input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.input-group select option {
    background: #120a1f;
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.custom-radio {
    flex: 1;
    position: relative;
}

.custom-radio input {
    position: absolute;
    opacity: 0;
}

.custom-radio span {
    display: block;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.custom-radio input:checked + span {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-color: transparent;
    box-shadow: var(--glow-purple);
    transform: scale(1.05);
}

.custom-radio:hover span {
    border-color: #a855f7;
}

/* ========================================
   CHI SIAMO SECTION - TEAM CARDS
   Utilizzato per: index.php (Sezione team)
========================================= */
/* ============ CHI SIAMO SECTION ============ */
.team-section {
    position: relative;
    padding: 80px 40px;
    overflow: hidden;
}

.team-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
}

.team-card:hover::before {
    opacity: 1;
}

.team-card:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.3);
}

.team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: var(--glow-purple);
    position: relative;
    z-index: 1;
    animation: floatAndColor 3s ease-in-out forwards;
}

.team-card:nth-child(2) .team-avatar {
    animation-delay: 1s;
}

.team-card:nth-child(3) .team-avatar {
    animation-delay: 2s;
}

@keyframes floatAndColor {
    0% { 
        transform: translateY(0px);
        background: linear-gradient(135deg, #a855f7, #ec4899);
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
    }
    50% { 
        transform: translateY(-20px);
        background: linear-gradient(135deg, #a855f7, #ec4899);
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
    }
    100% { 
        transform: translateY(0px);
        background: linear-gradient(135deg, #a855f7, #ec4899);
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
    }
}

.team-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.team-card .role {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.team-card p {
    color: var(--text-gray);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ========================================
   TECH STACK SECTION
   Utilizzato per: index.php (Tecnologie utilizzate)
========================================= */
/* ============ TECH STACK SECTION ============ */
.tech-section {
    padding: 120px 40px;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(18, 10, 31, 0.4) 100%);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

.tech-item {
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.tech-item:hover::before {
    width: 300px;
    height: 300px;
}

.tech-item:hover {
    transform: scale(1.05);
    border-color: rgba(168, 85, 247, 0.5);
}

.tech-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--glow-purple);
    position: relative;
    z-index: 1;
}

.tech-item h4 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.tech-item p {
    color: var(--text-gray);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   STATS SHOWCASE - NUMERI
   Utilizzato per: index.php (Statistiche)
========================================= */
/* ============ STATS SHOWCASE ============ */
.stats-showcase {
    padding: 120px 40px;
    position: relative;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(18, 10, 31, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 30px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.stats-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(168, 85, 247, 0.1) 25%, transparent 50%, rgba(236, 72, 153, 0.1) 75%, transparent 100%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.stat-box {
    text-align: center;
    padding: 30px 20px;
    position: relative;
}

.stat-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    border-radius: 2px;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ============ CTA SECTION ============ */
.cta-section {
    padding: 100px 40px;
    position: relative;
    text-align: center;
}

.cta-box {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 30px;
    padding: 80px 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(168, 85, 247, 0.4);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.cta-box h2 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cta-box p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.cta-box .btn-primary {
    background: white;
    color: #a855f7;
    font-size: 1.1rem;
    padding: 18px 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.cta-box .btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* ========================================
   FOOTER
   Utilizzato per: index.php
========================================= */
/* ============ FOOTER ============ */
.footer-section {
    padding: 60px 40px 40px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

.footer-left {
    flex: 1;
    max-width: 500px;
}

.footer-left p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.footer-simple {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-brand-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-brand-center img {
    opacity: 0.9;
}

.footer-brand-center p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 500px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

/* Legacy footer styles (unused) */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand img {
    width: 160px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.5));
}

.footer-brand p {
    color: var(--text-gray);
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-gray);
    transition: all 0.3s;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-orbs {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.social-orb {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    overflow: visible;
}

.social-orb::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--orb-color) 0%, transparent 70%);
    filter: blur(15px);
    opacity: 0.4;
    z-index: -1;
    transition: all 0.3s ease;
}

.social-orb i {
    color: var(--orb-color);
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1;
}

.social-orb:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--orb-color);
}

.social-orb:hover::before {
    opacity: 0.8;
    filter: blur(20px);
}

.social-orb:hover i {
    color: white;
}
/* ========================================
   THEME TOGGLE (Legacy - Non usato)
   Nota: Il tema si cambia automaticamente dal sistema
========================================= */
/* ============ THEME TOGGLE ============ */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.2);
    transform: scale(1.05);
}

.theme-toggle .material-icons {
    font-size: 24px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.theme-icon-light {
    display: none;
}

[data-theme="light"] .theme-icon-dark {
    display: none;
}

[data-theme="light"] .theme-icon-light {
    display: block;
}

[data-theme="dark"] .theme-icon-dark {
    display: block;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

/* ========================================
   MOBILE RESPONSIVE - BREAKPOINTS
   992px: Tablet
   768px: Mobile landscape
   480px: Mobile portrait
========================================= */
/* ============ MOBILE RESPONSIVE ============ */
@media (max-width: 992px) {
    .nav-actions {
        gap: 10px !important;
    }
    
    .btn-outline, .btn-primary {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .feature-grid, .team-grid, .tech-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .footer-right {
        align-items: center;
    }
    
    .social-orbs {
        justify-content: center;
    }
    
    .dashboard-layout-new {
        padding-bottom: 90px;
    }
    
    .dash-header-new h1 {
        font-size: 1.8rem;
    }
    
    .radio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Document Status Mobile */
    .doc-status {
        padding: 10px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .doc-status i {
        font-size: 18px;
    }
    
    .spinner {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }
    
    .card-grid-new {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bottom-nav {
        padding: 12px 15px;
        height: auto;
    }
    
    .nav-item {
        font-size: 0.75rem;
    }
    
    .nav-item i {
        font-size: 22px;
    }
    
    .auth-card-wrapper {
        max-width: 100%;
        margin: 20px;
    }
    
    .auth-card-face {
        padding: 35px 25px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-outline, .btn-primary {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Document Status Ultra Mobile */
    .doc-status {
        padding: 8px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .doc-status span {
        font-size: 0.8rem;
    }
    
    .spinner {
        width: 16px;
        height: 16px;
    }
    
    .doc-card {
        padding: 15px;
    }
    
    .gen-card-new {
        padding: 25px 20px;
    }
}