/* ========================================
   ADMIN.CSS - Stili per pagine amministrative
   ======================================== */

/* Admin Headers */
.admin-header {
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

.admin-header.corse {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.admin-header.percorsi {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.admin-header.banner {
    background: linear-gradient(45deg, #6f42c1, #e83e8c);
}

.admin-header.utenti {
    background: linear-gradient(45deg, #6f42c1, #e83e8c);
}

/* Stati delle card admin */
.corsa-attiva {
    border-left: 4px solid #28a745;
}

.corsa-inattiva {
    border-left: 4px solid #6c757d;
    opacity: 0.7;
}

.corsa-with-banner {
    border-left: 4px solid #ffc107;
}

.user-admin {
    background-color: #fff5f5;
    border-left: 4px solid #dc3545;
}

.user-editor {
    border-left: 4px solid #ffc107;
}

.user-viewer {
    border-left: 4px solid #28a745;
}

.user-inactive {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.banner-inactive {
    opacity: 0.5;
}

/* Badge ruoli */
.role-badge-admin {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.role-badge-editor {
    background: linear-gradient(45deg, #ffc107, #e0a800);
}

.role-badge-viewer {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

/* Posizioni banner */
.posizione-home {
    border-left: 4px solid #007bff;
}

.posizione-corse {
    border-left: 4px solid #28a745;
}

.posizione-percorsi {
    border-left: 4px solid #ffc107;
}

/* Preview e upload */
.banner-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #6f42c1;
    background: #f8f4ff;
}

.file-upload-area.drag-over {
    border-color: #6f42c1;
    background: #f8f4ff;
    transform: scale(1.02);
}

/* Colonne tabelle */
.actions-column {
    min-width: 150px;
}

/* Info aggiuntive */
.banner-info {
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 5px 8px;
    border-radius: 4px;
    margin-top: 5px;
}

.stats-badge {
    font-size: 0.75rem;
    margin: 2px;
}

.tipo-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Badge per i nuovi tipi percorso nell'admin - AGGIORNATI CON MARATONA E MEZZA MARATONA */
.tipo-badge.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.tipo-badge.bg-purple {
    background-color: #6f42c1 !important;
    color: white !important;
}

.tipo-badge.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.distanza-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
}

/* Stili per le card dei nuovi tipi percorso - AGGIORNATI */
.percorso-maratona {
    border-left-color: #007bff !important;
}

.percorso-mezza-maratona {
    border-left-color: #28a745 !important;
}

.percorso-allenamento {
    border-left-color: #ffc107 !important;
}

.percorso-gara {
    border-left-color: #007bff !important;
}

.percorso-turistico {
    border-left-color: #17a2b8 !important;
}

.percorso-ludico-motoria {
    border-left-color: #6c757d !important;
}

.percorso-competitiva {
    border-left-color: #6f42c1 !important;
}

/* Login page styles */
body.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #0056b3;
}

.login-header h3 {
    margin: 0;
    font-weight: 300;
    font-size: 1.8rem;
}

.login-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.login-body {
    padding: 40px 30px 30px;
}

.btn-login {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    padding: 12px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.4);
}

.btn-login:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.security-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.attempts-warning {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #721c24;
}

/* Form styles */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
}

.card-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 20px 30px;
    text-align: center;
}

/* Responsive admin */
@media (max-width: 768px) {
    .admin-header {
        padding: 15px 0;
    }
    
    .file-upload-area {
        padding: 20px;
    }
    
    .actions-column {
        min-width: 120px;
    }
    
    .login-container {
        padding: 0 15px;
    }
    
    .login-body {
        padding: 30px 20px 20px;
    }
    
    .login-header {
        padding: 30px 20px;
    }
}