/* assets/css/style.css - Stile base dell'applicazione basato sulle immagini */
:root {
    --primary-color: #24577f; /* Blu scuro nella barra di navigazione */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --border-radius: 4px;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
    --button-primary: #ff7043; /* Arancione per il pulsante SALTA */
    --button-secondary: #26c6da; /* Azzurro per il pulsante SUCCESSIVA */
    --button-exit: #f44336; /* Rosso per il pulsante "ESCI E TORNA AI MODULI" */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 1rem;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary-color);
}

main {
    min-height: 70vh;
}

section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.button:hover {
    background-color: var(--border-color);
}

.button.primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.button.primary:hover {
    background-color: #1a4368;
    border-color: #1a4368;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #1a4368;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Stile per la pagina dei moduli basato sull'immagine */
.module-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.module-header {
    display: flex;
    background-color: #f8f9fa;
    padding: 0.8rem;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.module-column {
    flex: 1;
}

.module-card {
    padding: 0.8rem;
    background-color: white;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.module-card:last-child {
    border-bottom: none;
}

.module-number {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
}

.module-info {
    flex-grow: 1;
}

.module-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.module-action {
    margin-left: 10px;
}

.module-action button, .module-action a {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.module-action button:hover, .module-action a:hover {
    background-color: #1a4368;
}

/* Stile per la pagina del test basato sull'immagine */
.test-page {
    max-width: 1400px;
    padding: 0;
}

.test-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
}

.test-header h1 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.test-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.test-main {
    flex: 1;
    min-width: 0;
}

.test-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.test-content {
    background-color: white;
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: var(--box-shadow);
}

.section-header {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.question {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.answer-option {
    display: flex;
    align-items: flex-start;
}

.answer-option input[type="radio"] {
    margin-right: 10px;
    margin-top: 3px;
}

.test-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-skip {
    background-color: var(--button-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-next {
    background-color: var(--button-secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.question-counter {
    text-align: center;
    margin-top: 2rem;
    color: #777;
    font-size: 0.9rem;
}

/* Timer di sessione */
.timer-session {
    background-color: white;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.timer-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.timer-title i {
    margin-right: 0.5rem;
}

.timer-display {
    display: flex;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.timer-units {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: #777;
}

.timer-unit {
    text-align: center;
}

/* Dettaglio test */
.test-detail {
    background-color: white;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.detail-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.detail-title i {
    margin-right: 0.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.detail-label {
    color: #777;
}

.detail-value {
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: bold;
    color: #333;
}

.btn-exit {
    display: block;
    width: 100%;
    background-color: var(--button-exit);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    margin-top: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.btn-exit:hover {
    background-color: #d32f2f;
}

/* Risultati del test */
.result-summary {
    text-align: center;
    margin-bottom: 2rem;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.result-stat {
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #777;
    font-size: 0.9rem;
}

.result-status {
    margin-top: 2rem;
}

.time-expired {
    color: var(--danger-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.test-result {
    font-size: 1.2rem;
    font-weight: bold;
}

.test-result.passed {
    color: var(--success-color);
}

.test-result.failed {
    color: var(--danger-color);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Stili per le pagine di autenticazione */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: var(--box-shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.login-button:hover {
    background-color: #1a4368;
}

/* Stili per l'amministrazione */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--light-color);
    font-weight: bold;
}

.status-complete {
    color: var(--success-color);
    font-weight: bold;
}

.status-incomplete {
    color: var(--danger-color);
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--secondary-color);
    margin-top: 2rem;
}

/* Media queries */
@media (max-width: 992px) {
    .test-layout {
        flex-direction: column;
    }
    
    .test-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .test-navigation {
        flex-direction: column;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin-bottom: 0.5rem;
    }
}