﻿/* =================================================================
   ZWD LIVING AG - ZWDYNAMIC.1 - DARK GLOW THEME
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600&display=swap');

/* =================================================================
   VARIABILI - PALETTE DARK GLOW
   ================================================================= */
:root {
    /* Colori base dark */
    --bg-primary: #0a0e1a;
    --bg-secondary: #12182b;
    --bg-card: #1a2332;
    --bg-hover: #1e2a3a;
    /* Colori glow */
    --cyan-primary: #00d4ff;
    --cyan-secondary: #00a6cc;
    --green-primary: #00ff88;
    --green-secondary: #00cc6a;
    --blue-primary: #0099ff;
    --orange-warning: #ff9500;
    /* Testi */
    --text-primary: #ffffff;
    --text-secondary: #8b95a7;
    --text-muted: #5a6478;
    /* Bordi */
    --border-width: 1px;
    --border-color: rgba(0, 212, 255, 0.2);
    --border-glow: rgba(0, 212, 255, 0.5);
    /* Font weights */
    --font-thin: 100;
    --font-light: 200;
    --font-regular: 300;
    --font-medium: 400;
    --font-semibold: 500;
    --font-bold: 600;
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* =================================================================
   RESET E BASE
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: var(--font-light);
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================================================
   TIPOGRAFIA
   ================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-thin);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1rem;
}

h5 {
    font-size: 0.875rem;
}

h6 {
    font-size: 0.75rem;
}

p, span, div, li, td, th {
    color: var(--text-primary);
    font-weight: var(--font-light);
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-cyan {
    color: var(--cyan-primary) !important;
}

/* =================================================================
   HEADER PRINCIPALE
   ================================================================= */
.zwg-header {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: var(--border-width) solid var(--border-color);
    padding: var(--spacing-md) 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

    .zwg-header .brand-title {
        font-size: 1.25rem;
        font-weight: var(--font-thin);
        letter-spacing: 4px;
        color: var(--text-primary);
        text-transform: uppercase;
    }

    .zwg-header .brand-subtitle {
        font-size: 0.75rem;
        font-weight: var(--font-light);
        letter-spacing: 2px;
        color: var(--text-secondary);
        text-transform: uppercase;
    }

/* =================================================================
   CARDS CON EFFETTO GLOW
   ================================================================= */
.card, .project-card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1), inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--cyan-primary), transparent);
        animation: glow-line 3s ease-in-out infinite;
    }

@keyframes glow-line {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2), inset 0 0 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, transparent 100%);
    border-bottom: var(--border-width) solid var(--border-color);
    padding: var(--spacing-md);
}

.card-body {
    padding: var(--spacing-md);
}

/* =================================================================
   AREA LAVORO - STILE IMMAGINE
   ================================================================= */
.area-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: var(--border-width) solid var(--border-color);
}

.area-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--cyan-primary);
    font-weight: var(--font-thin);
    letter-spacing: 2px;
}

.area-name {
    font-size: 1.5rem;
    font-weight: var(--font-thin);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.area-info {
    display: flex;
    gap: var(--spacing-xl);
    margin-left: auto;
}

.area-info-item {
    text-align: center;
}

.area-info-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}

.area-info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: var(--font-light);
}

/* =================================================================
   BOTTONI STILE GLOW
   ================================================================= */
.btn, .btn-action {
    background: transparent;
    border: var(--border-width) solid var(--cyan-primary);
    color: var(--cyan-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.625rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: var(--cyan-primary);
        transition: all 0.3s ease;
        transform: translate(-50%, -50%);
    }

    .btn:hover::before {
        width: 100%;
        height: 100%;
    }

    .btn:hover {
        color: var(--bg-primary);
        box-shadow: 0 0 20px var(--cyan-primary);
        border-color: var(--cyan-primary);
        z-index: 1;
    }

    .btn span {
        position: relative;
        z-index: 2;
    }

.btn-success {
    border-color: var(--green-primary);
    color: var(--green-primary);
}

    .btn-success::before {
        background: var(--green-primary);
    }

    .btn-success:hover {
        box-shadow: 0 0 20px var(--green-primary);
    }

/* Bottoni header più piccoli (UNIFICATO) */
.btn-header {
    padding: 6px 12px;
    font-size: 0.625rem;
    background: transparent;
    color: var(--cyan-primary);
    border: 1px solid var(--cyan-primary);
}

/* =================================================================
   ORDINI E DETTAGLI - LAYOUT IMMAGINE
   ================================================================= */
.order-item {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    position: relative;
    transition: all 0.3s ease;
}

    .order-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: transparent;
        transition: all 0.3s ease;
    }

    .order-item.active::before,
    .order-item:hover::before {
        background: var(--cyan-primary);
        box-shadow: 0 0 10px var(--cyan-primary);
    }

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.order-code {
    background: rgba(0, 212, 255, 0.1);
    border: var(--border-width) solid var(--cyan-primary);
    color: var(--cyan-primary);
    padding: 2px 8px;
    font-size: 0.625rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.order-status {
    padding: 2px 8px;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: var(--font-medium);
}

.status-preparazione {
    background: var(--green-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 10px var(--green-primary);
}

.status-modifica {
    border: var(--border-width) solid var(--cyan-primary);
    color: var(--cyan-primary);
    background: transparent;
}

.order-title {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-weight: var(--font-light);
}

.order-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* =================================================================
   TABELLE
   ================================================================= */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
}

    .table thead {
        background: var(--bg-secondary);
    }

        .table thead th {
            padding: var(--spacing-sm);
            text-align: left;
            font-size: 0.625rem;
            font-weight: var(--font-medium);
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 2px;
            border-bottom: var(--border-width) solid var(--cyan-primary);
        }

    .table tbody td {
        padding: var(--spacing-sm);
        font-size: 0.75rem;
        color: var(--text-primary);
        border-bottom: var(--border-width) solid rgba(0, 212, 255, 0.1);
        font-weight: var(--font-light);
    }

    .table tbody tr {
        transition: all 0.3s ease;
    }

        .table tbody tr:hover {
            background: rgba(0, 212, 255, 0.05);
        }

/* =================================================================
   FORM ELEMENTS
   ================================================================= */
.form-control, .form-select, input, select, textarea {
    background: var(--bg-secondary);
    border: var(--border-width) solid var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: var(--font-light);
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        outline: none;
        border-color: var(--cyan-primary);
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
        background: var(--bg-card);
    }

.form-label {
    font-size: 0.625rem;
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}
/* Search-input specifico (Login e filtri) */
.search-input {
    background: var(--bg-secondary) !important;
    border: var(--border-width) solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: var(--spacing-sm) !important;
    font-size: 0.875rem !important;
    font-weight: var(--font-light) !important;
    transition: all 0.3s ease !important;
}

    .search-input:focus {
        outline: none !important;
        border-color: var(--cyan-primary) !important;
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3) !important;
        background: var(--bg-card) !important;
    }

    .search-input::placeholder {
        color: var(--text-secondary) !important;
        opacity: 0.6 !important;
    }

/* =================================================================
   BADGES E STATI
   ================================================================= */
.badge {
    padding: 4px 8px;
    font-size: 0.625rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
}

.badge-success, .badge-preparazione {
    background: var(--green-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 10px var(--green-primary);
}

.badge-info {
    background: var(--cyan-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 10px var(--cyan-primary);
}

.badge-warning {
    background: var(--orange-warning);
    color: var(--bg-primary);
    box-shadow: 0 0 10px var(--orange-warning);
}

/* =================================================================
   INDICATORI E LINEE COLORATE
   ================================================================= */
.status-line {
    width: 4px;
    height: 100%;
    background: var(--green-primary);
    box-shadow: 0 0 15px var(--green-primary);
    position: absolute;
    left: 0;
    top: 0;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: var(--spacing-md) 0;
}

/* =================================================================
   NAV TABS
   ================================================================= */
.nav-tabs {
    border-bottom: var(--border-width) solid var(--border-color);
    display: flex;
    gap: 2px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

    .nav-tab::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: transparent;
        transition: all 0.3s ease;
    }

    .nav-tab:hover {
        color: #ffffff !important;
    }

    .nav-tab.active {
        color: var(--cyan-primary);
    }

        .nav-tab.active::after {
            background: var(--cyan-primary);
            box-shadow: 0 0 10px var(--cyan-primary);
        }

/* =================================================================
   ANIMAZIONI
   ================================================================= */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    }
}

.pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* =================================================================
   SCROLLBAR PERSONALIZZATA
   ================================================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--bg-card);
    }

/* =================================================================
   UTILITY CLASSES
   ================================================================= */
.text-green {
    color: var(--green-primary) !important;
}

.bg-dark {
    background: var(--bg-primary) !important;
}

.bg-card {
    background: var(--bg-card) !important;
}

.border-cyan {
    border-color: var(--cyan-primary) !important;
}

.border-green {
    border-color: var(--green-primary) !important;
}

.glow-cyan {
    box-shadow: 0 0 20px var(--cyan-primary) !important;
}

.glow-green {
    box-shadow: 0 0 20px var(--green-primary) !important;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
    html {
        font-size: 12px;
    }

    .area-header {
        flex-direction: column;
        text-align: center;
    }

    .area-info {
        margin: var(--spacing-md) 0 0 0;
    }

    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.5rem;
    }
}

/* =================================================================
   SFONDI COLORATI PER AREE SPECIFICHE
   ================================================================= */
/* AREA PROGETTI - Blu scuro */
.area-progetti, .gestione-progetti, .project-section {
    background: linear-gradient(135deg, #0a1628 0%, #1a2942 100%) !important;
    border-left: 3px solid #0099ff !important;
}
/* AREA COMMERCIALE - Verde scuro */
.area-commerciale, .commerciale-section, .marginalita-section {
    background: linear-gradient(135deg, #0a2818 0%, #1a4229 100%) !important;
    border-left: 3px solid #00ff88 !important;
}
/* AREA ORDINI - Arancione scuro */
.area-ordini, .ordini-section {
    background: linear-gradient(135deg, #28180a 0%, #42291a 100%) !important;
    border-left: 3px solid #ff9500 !important;
}
/* AREA ACQUISTI - Acquamarina */
.area-acquisti, .acquisti-section {
    background: linear-gradient(135deg, #1a2332 0%, #1e2a3a 100%) !important;
    border-left: 3px solid #9945ff !important;
}
/* AREA CONTATTI - Cyan scuro */
.area-contatti, .contatti-section {
    background: linear-gradient(135deg, #0a1828 0%, #1a2942 100%) !important;
    border-left: 3px solid #00d4ff !important;
}
/* AREA UTENTI/ADMIN - Rosso scuro */
.area-admin, .utenti-section, .sistema-section {
    background: linear-gradient(135deg, #280a0a 0%, #421a1a 100%) !important;
    border-left: 3px solid #ff4545 !important;
}

/* PANNELLI DASHBOARD */
.dashboard-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

    .dashboard-panel.panel-yellow {
        background: linear-gradient(135deg, #282218 0%, #423a1a 100%) !important;
        border: 1px solid rgba(255, 204, 0, 0.3) !important;
    }

    .dashboard-panel.panel-red {
        background: linear-gradient(135deg, #281818 0%, #421a1a 100%) !important;
        border: 1px solid rgba(255, 69, 69, 0.3) !important;
    }

    .dashboard-panel.panel-green {
        background: linear-gradient(135deg, #182818 0%, #1a421a 100%) !important;
        border: 1px solid rgba(0, 255, 136, 0.3) !important;
    }

    .dashboard-panel.panel-blue {
        background: linear-gradient(135deg, #181828 0%, #1a1a42 100%) !important;
        border: 1px solid rgba(0, 153, 255, 0.3) !important;
    }

/* CARD COLORATE */
.card-progetti {
    background: linear-gradient(135deg, #0a1628 0%, #1a2942 100%) !important;
    border: 1px solid rgba(0, 153, 255, 0.3) !important;
}

.card-commerciale {
    background: linear-gradient(135deg, #0a2818 0%, #1a4229 100%) !important;
    border: 1px solid rgba(0, 255, 136, 0.3) !important;
}

.card-ordini {
    background: linear-gradient(135deg, #28180a 0%, #42291a 100%) !important;
    border: 1px solid rgba(255, 149, 0, 0.3) !important;
}

/* HEADER COLORATI PER SEZIONE */
.header-progetti {
    background: linear-gradient(90deg, #0a1628 0%, #1a2942 100%) !important;
    border-bottom: 2px solid #0099ff !important;
}

.header-commerciale {
    background: linear-gradient(90deg, #0a2818 0%, #1a4229 100%) !important;
    border-bottom: 2px solid #00ff88 !important;
}

.header-ordini {
    background: linear-gradient(90deg, #28180a 0%, #42291a 100%) !important;
    border-bottom: 2px solid #ff9500 !important;
}

/* INDICATORI STATO COLORATI */
.status-attivo {
    border-left: 3px solid #00ff88 !important;
}

.status-sospeso {
    border-left: 3px solid #ff9500 !important;
}

.status-completato {
    border-left: 3px solid #0099ff !important;
}

.status-annullato {
    border-left: 3px solid #ff4545 !important;
}

/* TABELLE CON HEADER COLORATI */
.table-progetti thead {
    background: linear-gradient(90deg, #0a1628 0%, #1a2942 100%) !important;
}

.table-commerciale thead {
    background: linear-gradient(90deg, #0a2818 0%, #1a4229 100%) !important;
}

.table-ordini thead {
    background: linear-gradient(90deg, #28180a 0%, #42291a 100%) !important;
}

/* HOVER EFFECTS COLORATI */
.area-progetti:hover {
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.3) !important;
}

.area-commerciale:hover {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3) !important;
}

.area-ordini:hover {
    box-shadow: 0 0 30px rgba(255, 149, 0, 0.3) !important;
}

/* BADGES COLORATI PER MODULO */
.badge-progetto {
    background: #0099ff !important;
    color: white !important;
    box-shadow: 0 0 10px #0099ff !important;
}

.badge-commerciale {
    background: #00ff88 !important;
    color: #0a0e1a !important;
    box-shadow: 0 0 10px #00ff88 !important;
}

.badge-ordine {
    background: #ff9500 !important;
    color: white !important;
    box-shadow: 0 0 10px #ff9500 !important;
}

.badge-acquisto {
    background: #9945ff !important;
    color: white !important;
    box-shadow: 0 0 10px #9945ff !important;
}

/* =================================================================
   COLORI SPECIFICI PER OGNI PAGINA USANDO URL
   ================================================================= */
/* LOGIN PAGE acquamarina */
body:has(.fa-lock) .search-section,
[href*="Login"] .search-section {
    background: linear-gradient(135deg, #1a2332 0%, #1e2a3a 100%) !important;
    border: 1px solid rgba(153, 69, 255, 0.3) !important;
    box-shadow: 0 0 30px rgba(153, 69, 255, 0.1) !important;
}
/* PROGETTI */
body[class*="Progetti"] .search-section,
body[class*="progetti"] .card,
[href*="Progetti"] .card {
    background: linear-gradient(135deg, #0a1628 0%, #1a2942 100%) !important;
    border: 1px solid rgba(0, 153, 255, 0.3) !important;
}
/* ORDINI */
body[class*="Ordini"] .search-section,
body[class*="ordini"] .card,
[href*="Ordini"] .card {
    background: linear-gradient(135deg, #28180a 0%, #42291a 100%) !important;
    border: 1px solid rgba(255, 149, 0, 0.3) !important;
}
/* COMMERCIALE */
body[class*="Commerciale"] .search-section,
body[class*="commerciale"] .card,
[href*="Commerciale"] .card {
    background: linear-gradient(135deg, #0a2818 0%, #1a4229 100%) !important;
    border: 1px solid rgba(0, 255, 136, 0.3) !important;
}
/* CONTATTI */
body[class*="Contatti"] .search-section,
body[class*="contatti"] .card,
[href*="Contatti"] .card {
    background: linear-gradient(135deg, #0a1828 0%, #1a2942 100%) !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
}
/* UTENTI */
body[class*="Utenti"] .search-section,
body[class*="utenti"] .card,
[href*="Utenti"] .card {
    background: linear-gradient(135deg, #280a0a 0%, #421a1a 100%) !important;
    border: 1px solid rgba(255, 69, 69, 0.3) !important;
}
/* ACQUISTI acquamarina */
body[class*="Acquisti"] .search-section,
body[class*="acquisti"] .card,
[href*="Acquisti"] .card {
    background: linear-gradient(135deg, #1a2332 0%, #1e2a3a 100%) !important;
    border: 1px solid rgba(153, 69, 255, 0.3) !important;
}
/* AREE LAVORO */
body[class*="Aree"] .search-section,
body[class*="aree"] .card,
[href*="Aree"] .card {
    background: linear-gradient(135deg, #282218 0%, #423a1a 100%) !important;
    border: 1px solid rgba(255, 204, 0, 0.3) !important;
}

/* =================================================================
   OVERRIDE SEARCH-SECTION GENERICA
   ================================================================= */
.search-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1) !important;
    position: relative;
    overflow: hidden;
}

    .search-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--cyan-primary), transparent);
        animation: glow-line 3s ease-in-out infinite;
    }

/* ALERT COLORATI */
.alert-danger {
    background: linear-gradient(135deg, #280a0a 0%, #421a1a 100%) !important;
    border: 1px solid rgba(255, 69, 69, 0.5) !important;
    color: #ff9999 !important;
}

.alert-info {
    background: linear-gradient(135deg, #0a1828 0%, #1a2942 100%) !important;
    border: 1px solid rgba(0, 212, 255, 0.5) !important;
    color: #99ddff !important;
}

.alert-warning {
    background: linear-gradient(135deg, #28180a 0%, #42291a 100%) !important;
    border: 1px solid rgba(255, 204, 0, 0.5) !important;
    color: #ffcc66 !important;
}

.alert-success {
    background: linear-gradient(135deg, #0a2818 0%, #1a4229 100%) !important;
    border: 1px solid rgba(0, 255, 136, 0.5) !important;
    color: #66ff99 !important;
}

/* =================================================================
   SISTEMA DI DOPPIA COLORAZIONE UNIVERSALE
   ================================================================= */
body {
    background: radial-gradient(ellipse at center, #0a0e1a 0%, #050813 100%) !important;
}

.container, .container-fluid {
    background: transparent !important;
}

.search-section, .tab-content > .row {
    background: rgba(18, 24, 43, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.1) !important;
    padding: 20px;
    margin-bottom: 20px;
}

.contact-item, .card, .panel, .box {
    background: linear-gradient(135deg, #1a2332 0%, #1e2a3a 100%) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

    .contact-item .contact-item, .card .card, .search-section .contact-item {
        background: linear-gradient(135deg, #1e2a3a 0%, #243042 100%) !important;
        border: 1px solid rgba(0, 212, 255, 0.3) !important;
    }

    .contact-item:hover, .card:hover {
        background: linear-gradient(135deg, #243042 0%, #2a3648 100%) !important;
        border-color: rgba(0, 212, 255, 0.5) !important;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
        transform: translateY(-2px);
    }

    /* COLORI ACCENT PER SEZIONE (basati su icone) - ARCOBALENO */
    .contact-item:has(.fa-address-book) {
        border-left: 3px solid #FFBF00 !important; /* Contatti - Arancione Oro */
    }

        .contact-item:has(.fa-address-book):hover {
            box-shadow: 0 0 20px rgba(255, 191, 0, 0.3) !important;
        }

    .contact-item:has(.fa-file-invoice-dollar) {
        border-left: 3px solid #4B0082 !important; /* Amministrazione - Indaco */
    }

        .contact-item:has(.fa-file-invoice-dollar):hover {
            box-shadow: 0 0 20px rgba(75, 0, 130, 0.3) !important;
        }

    .contact-item:has(.fa-handshake) {
        border-left: 3px solid #00FF00 !important; /* Commerciale - Verde */
    }

        .contact-item:has(.fa-handshake):hover {
            box-shadow: 0 0 20px rgba(0, 255, 0, 0.3) !important;
        }

    .contact-item:has(.fa-project-diagram) {
        border-left: 3px solid #FF7F00 !important; /* Progetti - Arancione */
    }

        .contact-item:has(.fa-project-diagram):hover {
            box-shadow: 0 0 20px rgba(255, 127, 0, 0.3) !important;
        }

    .contact-item:has(.fa-truck) {
        border-left: 3px solid #0080FF !important; /* Logistica - Blu Cielo */
    }

        .contact-item:has(.fa-truck):hover {
            box-shadow: 0 0 20px rgba(0, 128, 255, 0.3) !important;
        }

    .contact-item:has(.fa-shopping-cart) {
        border-left: 3px solid #9400D3 !important; /* Acquisti - Violetto */
    }

        .contact-item:has(.fa-shopping-cart):hover {
            box-shadow: 0 0 20px rgba(148, 0, 211, 0.3) !important;
        }

    .contact-item:has(.fa-tools) {
        border-left: 3px solid #FF0000 !important; /* Installazioni - Rosso */
    }

        .contact-item:has(.fa-tools):hover {
            box-shadow: 0 0 20px rgba(255, 0, 0, 0.3) !important;
        }

    .contact-item:has(.fa-cogs) {
        border-left: 3px solid #FFFF00 !important; /* Sistema - Giallo */
    }

        .contact-item:has(.fa-cogs):hover {
            box-shadow: 0 0 20px rgba(255, 255, 0, 0.3) !important;
        }
/* Bottoni colorati per ogni reparto */
.reparto-installazioni .btn-action {
    border-color: #FF0000 !important;
}

    .reparto-installazioni .btn-action:hover {
        background: rgba(255, 0, 0, 0.1) !important;
        border-color: #FF0000 !important;
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3) !important;
    }

.reparto-progetti .btn-action {
    border-color: #FF7F00 !important;
}

    .reparto-progetti .btn-action:hover {
        background: rgba(255, 127, 0, 0.1) !important;
        border-color: #FF7F00 !important;
        box-shadow: 0 0 10px rgba(255, 127, 0, 0.3) !important;
    }

.reparto-contatti .btn-action {
    border-color: #FFBF00 !important;
}

    .reparto-contatti .btn-action:hover {
        background: rgba(255, 191, 0, 0.1) !important;
        border-color: #FFBF00 !important;
        box-shadow: 0 0 10px rgba(255, 191, 0, 0.3) !important;
    }

.reparto-sistema .btn-action {
    border-color: #FFFF00 !important;
}

    .reparto-sistema .btn-action:hover {
        background: rgba(255, 255, 0, 0.1) !important;
        border-color: #FFFF00 !important;
        box-shadow: 0 0 10px rgba(255, 255, 0, 0.3) !important;
    }

.reparto-commerciale .btn-action {
    border-color: #00FF00 !important;
}

    .reparto-commerciale .btn-action:hover {
        background: rgba(0, 255, 0, 0.1) !important;
        border-color: #00FF00 !important;
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.3) !important;
    }

.reparto-logistica .btn-action {
    border-color: #0080FF !important;
}

    .reparto-logistica .btn-action:hover {
        background: rgba(0, 128, 255, 0.1) !important;
        border-color: #0080FF !important;
        box-shadow: 0 0 10px rgba(0, 128, 255, 0.3) !important;
    }

.reparto-amministrazione .btn-action {
    border-color: #4B0082 !important;
}

    .reparto-amministrazione .btn-action:hover {
        background: rgba(75, 0, 130, 0.1) !important;
        border-color: #4B0082 !important;
        box-shadow: 0 0 10px rgba(75, 0, 130, 0.3) !important;
    }

.reparto-acquisti .btn-action {
    border-color: #9400D3 !important;
}

    .reparto-acquisti .btn-action:hover {
        background: rgba(148, 0, 211, 0.1) !important;
        border-color: #9400D3 !important;
        box-shadow: 0 0 10px rgba(148, 0, 211, 0.3) !important;
    }

/* EFFETTO PROFONDITÀ AGGIUNTIVO */
.search-section {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.contact-item {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
/* Tab content con sfondo diverso */
.tab-content {
    background: rgba(10, 14, 26, 0.3) !important;
    padding: 20px;
    border: 1px solid rgba(0, 212, 255, 0.05) !important;
}

/* =================================================================
   PAGINA BENVENUTO/INDEX - STILE SPECIALE
   ================================================================= */
body:has(.logo-main),
body:has(img[alt="ZWD Living AG"]) {
    background: radial-gradient(ellipse at top, #1a1f3a 0%, #0a0e1a 50%, #050813 100%) !important;
}
    /* Hero Section - Effetto vetro */
    body:has(.logo-main) .search-section:first-of-type {
        background: linear-gradient(135deg, rgba(26, 35, 50, 0.9) 0%, rgba(30, 42, 58, 0.9) 100%) !important;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 212, 255, 0.3) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 80px rgba(0, 212, 255, 0.1), inset 0 0 40px rgba(0, 212, 255, 0.05) !important;
    }

/* Logo con effetto glow */
.logo-main {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
    animation: pulse-glow-logo 3s ease-in-out infinite; /* rinominato per evitare conflitto */
}

@keyframes pulse-glow-logo {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.6));
    }
}

/* Box Benvenuto personalizzato - Gradient */
.search-section[style*="background: var(--grigio-scuro)"] {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%) !important;
    border: 1px solid rgba(79, 70, 229, 0.3) !important;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2) !important;
}
/* Box Annunci - gradient colorato + effetti */
.search-section[style*="linear-gradient(135deg, #4f46e5"] {
    background: linear-gradient(135deg, #4f46e5, #059669) !important;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.4), 0 0 60px rgba(5, 150, 105, 0.3) !important;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background: linear-gradient(135deg, #4f46e5, #059669);
    }

    50% {
        background: linear-gradient(135deg, #059669, #4f46e5);
    }
}

/* Pulsante ENTRA NEL SISTEMA - Super Glow */
.btn-primary-action[style*="font-size: 1.3rem"] {
    background: linear-gradient(135deg, #4f46e5, #4f46e5) !important;
    border: 2px solid rgba(124, 58, 237, 0.5) !important;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5), 0 10px 40px rgba(124, 58, 237, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
    position: relative;
    overflow: hidden;
}

    .btn-primary-action[style*="font-size: 1.3rem"]::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        animation: shine 3s ease-in-out infinite;
    }

@keyframes shine {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-primary-action[style*="font-size: 1.3rem"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 50px rgba(79, 70, 229, 0.7), 0 15px 50px rgba(124, 58, 237, 0.6), inset 0 0 30px rgba(255, 255, 255, 0.2) !important;
}

/* Accessi Rapidi - Cards con hover 3D */
.btn-action[href*="Contatti"],
.btn-action[href*="Utenti"],
.btn-action[href*="Dashboard"] {
    background: linear-gradient(135deg, rgba(30, 42, 58, 0.9) 0%, rgba(36, 48, 66, 0.9) 100%) !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.4s ease !important;
}

    .btn-action[href*="Contatti"]:hover,
    .btn-action[href*="Utenti"]:hover,
    .btn-action[href*="Dashboard"]:hover {
        transform: translateY(-5px) rotateX(-5deg);
        background: linear-gradient(135deg, rgba(36, 48, 66, 1) 0%, rgba(42, 54, 72, 1) 100%) !important;
        border-color: rgba(0, 212, 255, 0.5) !important;
        box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3), 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    }

/* Informazioni Sistema - Box con gradient sottile */
body:has(.logo-main) .search-section:has(.fa-info-circle) {
    background: linear-gradient(135deg, rgba(18, 24, 43, 0.8) 0%, rgba(26, 35, 50, 0.8) 100%) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
}

/* Icone informazioni con colori diversi */
.fa-database {
    color: #00d4ff !important;
}

.fa-server {
    color: #4f46e5 !important;
}

.fa-shield-alt {
    color: #059669 !important;
}

.fa-clock {
    color: #ff9500 !important;
}

/* Effetto particelle fluttuanti (opzionale) */
body:has(.logo-main)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 80%, rgba(5, 150, 105, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* =================================================================
   FIX LOGO - DIMENSIONE E CENTRATURA
   ================================================================= */
.logo-main {
    max-width: 200px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
}

.search-section .mb-4 {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

img[alt="ZWD Living AG"] {
    max-width: 200px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-main, img[alt="ZWD Living AG"] {
        max-width: 150px !important;
    }
}

/* =================================================================
   NASCONDI BARRA NAVIGAZIONE SOLO IN INDEX/BENVENUTO
   ================================================================= */
body:has(.logo-main) .nav-bar-link,
body:has(img[alt="ZWD Living AG"]) ~ div[style*="background: linear-gradient(90deg, #1a1a2e"],
body:has(.logo-main) + div[style*="display: flex"][style*="justify-content: center"] {
    display: none !important;
}

body:has(.logo-main) div:has(.nav-bar-link) {
    display: none !important;
}

/* =================================================================
   FIX BOTTONI NAVIGAZIONE AVANTI/INDIETRO
   ================================================================= */
.navigation-arrows button, button[onclick*="history"] {
    background: transparent !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: var(--cyan-primary) !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .navigation-arrows button:hover, button[onclick*="history"]:hover {
        background: rgba(0, 212, 255, 0.1) !important;
        border-color: var(--cyan-primary) !important;
        color: var(--cyan-primary) !important;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
    }

.navigation-arrows .fas {
    color: var(--cyan-primary) !important;
}

/* Override specifico per btn-header se necessario */
button.btn-header[onclick*="history"] {
    background: transparent !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: var(--cyan-primary) !important;
}

    button.btn-header[onclick*="history"]:hover {
        background: rgba(0, 212, 255, 0.1) !important;
        border-color: var(--cyan-primary) !important;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
    }

.navigation-arrows button span, button[onclick*="history"] span {
    color: var(--cyan-primary) !important;
}

/* =================================================================
   QUICK ACCESS BOX
   ================================================================= */
.quick-access-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 140px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(30, 42, 58, 0.9) 0%, rgba(36, 48, 66, 0.9) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
}

    .quick-access-box i {
        font-size: 2.5rem !important;
        margin-bottom: 12px !important;
        transition: all 0.3s ease;
    }

    .quick-access-box span {
        color: rgba(255, 255, 255, 0.9) !important;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-size: 0.8rem;
        font-weight: 300;
        text-align: center;
    }

    .quick-access-box:nth-of-type(1) i {
        color: #00d4ff !important;
    }

    .quick-access-box:nth-of-type(2) i {
        color: #9945ff !important;
    }

    .quick-access-box:nth-of-type(3) i {
        color: #00ff88 !important;
    }

    .quick-access-box:hover {
        transform: translateY(-5px);
        background: linear-gradient(135deg, rgba(36, 48, 66, 1) 0%, rgba(42, 54, 72, 1) 100%) !important;
        box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    }

    .quick-access-box:nth-of-type(1):hover {
        border-color: #00d4ff;
        box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
    }

    .quick-access-box:nth-of-type(2):hover {
        border-color: #9945ff;
        box-shadow: 0 10px 30px rgba(153, 69, 255, 0.4);
    }

    .quick-access-box:nth-of-type(3):hover {
        border-color: #00ff88;
        box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
    }

    .quick-access-box:hover i {
        transform: scale(1.15);
        filter: drop-shadow(0 0 15px currentColor);
    }

/* RESPONSIVE quick access */
@media (max-width: 768px) {
    .d-flex.gap-4 {
        flex-direction: column;
        align-items: center;
    }

    .quick-access-box {
        width: 220px;
    }
}

/* =================================================================
   BOX ANNUNCI/NEWS - SUPER SPETTACOLARE (resta intatto)
   ================================================================= */
.search-section[style*="linear-gradient(135deg, #4f46e5"] {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.95) 0%, rgba(5, 150, 105, 0.95) 25%, rgba(0, 212, 255, 0.95) 50%, rgba(255, 149, 0, 0.95) 75%, rgba(79, 70, 229, 0.95) 100%), repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.03) 10px, rgba(255, 255, 255, 0.03) 20px), radial-gradient(ellipse at top, rgba(255, 255, 255, 0.2) 0%, transparent 70%) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 60px rgba(79, 70, 229, 0.7), 0 0 120px rgba(5, 150, 105, 0.5), inset 0 0 60px rgba(255, 255, 255, 0.15), 0 15px 50px rgba(0, 0, 0, 0.6) !important;
    position: relative;
    overflow: hidden;
    transform: scale(1.02);
    backdrop-filter: blur(10px);
    animation: holo-shift 8s ease-in-out infinite;
}

@keyframes pulse-news {
    0%, 100% {
        box-shadow: 0 0 30px rgba(79, 70, 229, 0.6), 0 0 60px rgba(5, 150, 105, 0.4), inset 0 0 30px rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 60px rgba(79, 70, 229, 0.8), 0 0 120px rgba(5, 150, 105, 0.6), inset 0 0 60px rgba(255, 255, 255, 0.2);
    }
}

.search-section[style*="linear-gradient(135deg, #4f46e5"]::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent 30%, rgba(79, 70, 229, 0.3) 35%, rgba(5, 150, 105, 0.3) 40%, rgba(0, 255, 136, 0.3) 45%, transparent 50%);
    animation: aurora 8s linear infinite;
}

@keyframes aurora {
    0% {
        transform: rotate(0deg) translateY(0);
    }

    100% {
        transform: rotate(360deg) translateY(50px);
    }
}

.search-section[style*="linear-gradient(135deg, #4f46e5"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid;
    border-image: linear-gradient(90deg, #4f46e5, #00ff88, #00d4ff, #4f46e5) 1;
    animation: border-glow 3s linear infinite;
    pointer-events: none;
}

@keyframes border-glow {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.search-section[style*="linear-gradient(135deg, #4f46e5"] h4 {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(79, 70, 229, 0.6), 0 0 60px rgba(5, 150, 105, 0.6);
    animation: text-glow 2s ease-in-out infinite alternate;
}

@keyframes text-glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }

    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 50px #00ff88;
    }
}

.search-section[style*="linear-gradient(135deg, #4f46e5"] .fa-star {
    animation: spin-star 4s linear infinite;
    filter: drop-shadow(0 0 10px gold);
}

@keyframes spin-star {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.search-section[style*="linear-gradient(135deg, #4f46e5"] {
    background-image: linear-gradient(135deg, #4f46e5 0%, #059669 50%, #4f46e5 100%), radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 30%), radial-gradient(circle at 80% 70%, rgba(0, 255, 136, 0.1) 0%, transparent 30%), radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 40%) !important;
    background-size: 100% 100%, 200% 200%, 200% 200%, 200% 200%;
    animation: float-bg 10s ease-in-out infinite;
}

@keyframes float-bg {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 100% 100%, 50% 50%;
    }

    50% {
        background-position: 0% 0%, 100% 100%, 0% 0%, 50% 0%;
    }
}

/* Altri fix */
input {
    color: white !important;
}

.card .card-header {
    color: white !important;
}
/* .btn-header già unificato sopra */