/* 
   SOCIAL MANAGER THEME — ASD Ca De Rissi SG
   ========================================
   Foglio di stile centralizzato per uniformare l'aspetto del backend.
*/

/* --- DESIGN SYSTEM / COLORI --- */
:root {
    --primary-red: #cc2b31;
    --primary-blue: #1e40af;
    --bg-dark: #0f172a;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #9333ea;
    --card-bg: rgba(30, 41, 59, 0.55);
    --border-light: rgba(255, 255, 255, 0.08);
}

/* --- SFONDO E PAGINA GLOBALE --- */
body {
    font-family: 'Inter', sans-serif;
    color: white;
    background-color: var(--bg-dark);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Gradi di opacità dello sfondo del campo da calcio */
body.bg-light-overlay {
    background-image: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.4)), url('/assets/images/desktop_bg.webp');
}
body.bg-medium-overlay {
    background-image: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), url('/assets/images/desktop_bg.webp');
}
body.bg-dark-overlay {
    background-image: linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)), url('/assets/images/desktop_bg.webp');
}

/* --- GLASSMORPHISM --- */
.glass-panel {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Effetto elevazione per le card principali della Scrivania */
.glass-card.hover-lift:hover {
    transform: translateY(-8px);
}

/* --- CONTROLLI FORM --- */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus, select:focus, textarea:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
    outline: none !important;
}

/* --- CARATTERI E TITOLI --- */
.outfit, .font-outfit, .title-gold {
    font-family: 'Outfit', sans-serif;
}

.title-gold {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* --- BOTTONI PERSONALIZZATI --- */
.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
}

.btn-base:active {
    transform: scale(0.96);
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background-color: #16a34a;
    color: white;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-success:hover {
    background-color: #22c55e;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background-color: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background-color: #ef4444;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-glass {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- TASTI NAVIGAZIONE IN ALTO A SINISTRA (RAZIONALIZZATI E COLORATI) --- */
.nav-top-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 100 !important;
}

.nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.8125rem !important; /* 13px */
    font-weight: 700 !important;
    border-radius: var(--border-radius, 8px) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

@media (max-width: 640px) {
    .nav-btn {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        gap: 6px !important;
    }
}

.nav-btn:hover {
    transform: translateY(-2px) !important;
}

.nav-btn:active {
    transform: translateY(0) scale(0.96) !important;
}

/* Tasto 1: INDIETRO (Rosso Sociale Ca De Rissi / Carmine Solido) */
.nav-btn-back {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: 1px solid #ef4444 !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

.nav-btn-back:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border-color: #fca5a5 !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55) !important;
}

.nav-btn-back i {
    transition: transform 0.2s ease !important;
}

.nav-btn-back:hover i {
    transform: translateX(-3px) !important;
}

/* Tasto 2: SCRIVANIA / HUB (Azzurro Sociale Ca De Rissi Solido) */
.nav-btn-desk {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid #60a5fa !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
}

.nav-btn-desk:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border-color: #93c5fd !important;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.55) !important;
}

.nav-btn-desk i {
    transition: transform 0.2s ease !important;
}

.nav-btn-desk:hover i {
    transform: scale(1.15) !important;
}

/* Tasto 3: UTENTI (Ambra / Oro per Amministratore) */
.nav-btn-utenti {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    border: 1px solid #fbbf24 !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4) !important;
}

.nav-btn-utenti:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border-color: #fde68a !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55) !important;
}

.nav-btn-utenti i {
    transition: transform 0.2s ease !important;
}

.nav-btn-utenti:hover i {
    transform: scale(1.15) !important;
}

/* Tasto 4: ESCI / LOGOUT (Scuro elegante con hover rosso) */
.nav-btn-logout {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.nav-btn-logout:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border-color: #fca5a5 !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5) !important;
}

.nav-btn-logout i {
    transition: transform 0.2s ease !important;
}

.nav-btn-logout:hover i {
    transform: translateX(2px) !important;
}

/* Navigazione Superiore Destra */
.nav-top-right {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    z-index: 100 !important;
}

.nav-user-badge {
    height: 38px;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .nav-user-badge {
        display: none !important;
    }
}


/* --- BADGE E DOT DI STATO --- */
.status-badge {
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-ok {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

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

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.dot-green { background-color: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.dot-red { background-color: var(--accent-red); box-shadow: 0 0 10px var(--accent-red); }
.dot-yellow { background-color: var(--accent-yellow); box-shadow: 0 0 10px var(--accent-yellow); }

/* --- BARRA DI SCORRIMENTO --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- ANIMAZIONI / CARICATORI --- */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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