/* RESET E STILI BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #d28e0c 0%, #b87a0a 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ALERT */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.prerequisite-alert {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.prerequisite-alert h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.prerequisite-alert p {
    margin-bottom: 10px;
    color: #856404;
    line-height: 1.5;
}

.prerequisite-alert .btn-small {
    background: #ffc107;
    color: #856404;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.prerequisite-alert .btn-small:hover {
    background: #e0a800;
}

/* AUTH CONTAINER */
.auth-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.auth-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.auth-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-form small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* FORM SECTIONS */
.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.form-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

/* Layout speciale per form di registrazione più largo */
.auth-section:first-child .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.auth-section:first-child .form-section {
    padding: 25px;
}

/* Campi singoli più larghi nel form di registrazione */
.auth-section:first-child .form-group:not(.form-row .form-group) {
    max-width: 100%;
}

/* Migliora la leggibilità dei campi lunghi */
.auth-section:first-child input[type="text"],
.auth-section:first-child input[type="email"],
.auth-section:first-child input[type="tel"],
.auth-section:first-child select {
    font-size: 16px;
    padding: 14px;
}

.form-info {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

.form-info p {
    margin-bottom: 8px;
    color: #856404;
}

.form-info p:last-child {
    margin-bottom: 0;
}

/* LOGIN HELP */
.login-help {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.login-help p {
    margin-bottom: 8px;
    color: #0c5460;
    font-size: 14px;
}

.login-help p:last-child {
    margin-bottom: 0;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(86, 171, 47, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Stile specifico per pulsanti mailto */
a[href^="mailto:"] {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background 0.3s ease;
}

a[href^="mailto:"]:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.exam-actions {
    margin-top: 10px;
    text-align: center;
}

.exam-actions .btn {
    margin: 5px;
    display: inline-block;
}

/* INFO SECTION */
.info-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.info-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h4 {
    color: #333;
    margin-bottom: 10px;
}

.step p {
    color: #666;
}

/* SUCCESS PAGE STYLES */
.success-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.success-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.success-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.success-card {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-card h2 {
    color: #28a745;
    margin-bottom: 15px;
}

.credentials-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    text-align: left;
}

.credentials-box h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e1e5e9;
}

.credential-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #667eea;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
}

.password-field {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.important-notice {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 25px 0;
    text-align: left;
}

.important-notice h3 {
    color: #856404;
    margin-bottom: 15px;
}

.important-notice ul {
    list-style: none;
    padding: 0;
}

.important-notice li {
    padding: 8px 0;
    color: #856404;
    position: relative;
    padding-left: 25px;
}

.important-notice li:before {
    content: "⚠️";
    position: absolute;
    left: 0;
}

.next-steps {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    margin: 25px 0;
    text-align: left;
}

.next-steps h3 {
    color: #0c5460;
    margin-bottom: 15px;
}

.next-steps ol {
    padding-left: 20px;
}

.next-steps li {
    padding: 8px 0;
    color: #0c5460;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.help-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.help-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.help-item {
    text-align: center;
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.help-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
}

.help-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.help-item h4 {
    color: #333;
    margin-bottom: 10px;
}

.help-item p {
    color: #666;
}

/* ADMIN DASHBOARD STYLES */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.admin-info h1 {
    color: #333;
    margin-bottom: 10px;
}

.admin-info p {
    color: #666;
    font-size: 1.1rem;
}

.stats-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.stats-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 25px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
}

.users-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.users-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.users-table {
    overflow-x: auto;
    margin-bottom: 20px;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.progress-mini {
    width: 100px;
    height: 15px;
    background: #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.view-all-users {
    text-align: center;
    margin-top: 20px;
}

.system-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.system-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.system-card {
    text-align: center;
    padding: 25px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.system-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.system-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.system-card p {
    color: #666;
    margin-bottom: 20px;
}

.quick-actions {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.quick-actions h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.activity-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.activity-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.activity-log {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 15px;
    min-width: 60px;
    text-align: center;
}

.activity-text {
    color: #666;
}

/* DASHBOARD */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding-top: 4px;
	padding-bottom: 4px;
	padding-left:30px;
	padding-right:30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}


.brand-section {
    display: flex;
    align-items: center;
    gap: 20px;
	justify-content: center; /* Aggiungi questo */
    gap: 20px;
    width: 100%; /* Aggiungi questo */
}

.logo-container {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-title {
    color: #2b72ab;
    font-size: 65px;
    font-weight: bold;
    margin: 0;
    line-height: 1;
    font-family: Arial, sans-serif;
    text-align: center;
}

.brand-subtitle {
    color: #666;
    font-size: 18px;
	font-weight: bold;
    margin: 5px 0 0 0;
    line-height: 1;
    text-align: center;
}



/* PROGRESS SECTION - COMPATTA */
.progress-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.welcome-info {
    text-align: left;
}

.welcome-info h2 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.3rem;
}



.progress-title {
    text-align: right;
    color: #333;
    font-size: 1.5rem;
    margin: 0;
}

.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.progress-card {
    text-align: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.progress-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.progress-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.progress-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background: #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.progress-status {
    padding: 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-available {
    color: #28a745;
    background: #d4edda;
    padding: 6px 12px;
    border-radius: 15px;
}

.status-locked {
    color: #6c757d;
    background: #e9ecef;
    padding: 6px 12px;
    border-radius: 15px;
}

/* LESSONS SECTION */
.lessons-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.lessons-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.section {
    margin-bottom: 30px;
}

.section h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
}

.lessons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.lesson-card {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.lesson-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.lesson-card.completed {
    border-color: #28a745;
    background: #f8fff9;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lesson-header h4 {
    color: #333;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.lesson-description {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.lesson-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Ordine specifico dei pulsanti */
.lesson-actions .btn-download {
    order: 1; /* Primo: Scarica Lezione */
}

.lesson-actions .btn-follow {
    order: 2; /* Secondo: Concetti Chiave */
}

.lesson-actions .btn-quiz {
    order: 3; /* Terzo: Fai il Test */
}

/* EXAM SECTION */
.exam-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.exam-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.exam-info, .exam-requirements {
    text-align: center;
}

.exam-info p {
    margin-bottom: 15px;
    color: #666;
}

.exam-info p strong {
    color: #333;
}

.exam-result h3 {
    color: #333;
    margin-bottom: 15px;
}

.exam-result .success {
    color: #28a745;
    font-weight: 600;
}

.exam-result .error {
    color: #dc3545;
    font-weight: 600;
}

.exam-requirements ul {
    list-style: none;
    padding: 0;
}

.exam-requirements li {
    padding: 8px 0;
    color: #666;
}

/* QUIZ STYLES */
.quiz-header, .exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.quiz-header h1, .exam-header h1 {
    color: #333;
}

.quiz-instructions, .exam-instructions {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.instruction-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.instruction-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.instruction-card ul {
    list-style: none;
    padding: 0;
}

.instruction-card li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 25px;
}

.instruction-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* QUESTION CARDS */
.question-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.question-card h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
}

.question-text {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.answer-option input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}

.answer-text {
    color: #555;
    font-size: 1rem;
}

.quiz-submit, .exam-submit {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

/* QUIZ RESULT */
.quiz-result, .exam-result {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.quiz-result h2, .exam-result h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.result-summary {
    text-align: center;
    margin-bottom: 30px;
}

.result-card {
    display: inline-block;
    padding: 25px;
    border-radius: 12px;
    border: 3px solid;
    max-width: 500px;
}

.result-card.passed {
    border-color: #28a745;
    background: #f8fff9;
}

.result-card.failed {
    border-color: #dc3545;
    background: #fff8f8;
}

.result-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.score-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feedback-section h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
}

.question-feedback {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.question-feedback.correct {
    border-left-color: #28a745;
}

.question-feedback.incorrect {
    border-left-color: #dc3545;
}

.question-feedback h4 {
    color: #333;
    margin-bottom: 10px;
}

.question-feedback p {
    margin-bottom: 8px;
    color: #666;
}

.quiz-actions, .exam-actions {
    text-align: center;
    margin-top: 30px;
}

/* VALIDATION STYLES */
.validation-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.validation-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.validation-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.certificate-valid, .certificate-invalid {
    text-align: center;
    padding: 30px;
}

.valid-icon, .invalid-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.certificate-valid h2 {
    color: #28a745;
    margin-bottom: 15px;
}

.certificate-invalid h2 {
    color: #dc3545;
    margin-bottom: 15px;
}

.certificate-details {
    margin: 30px 0;
    text-align: left;
}

.certificate-details h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-item strong {
    color: #333;
}

.validation-form {
    text-align: center;
    padding: 30px;
}

.serial-form {
    max-width: 400px;
    margin: 0 auto 30px;
}

.serial-example {
    text-align: left;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.serial-example h3 {
    color: #333;
    margin-bottom: 15px;
}

.serial-example ul {
    list-style: none;
    padding: 0;
}

.serial-example li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 25px;
}

.serial-example li:before {
    content: "📋";
    position: absolute;
    left: 0;
}

.validation-footer {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.validation-footer h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.security-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.security-item {
    text-align: center;
    padding: 20px;
}

.security-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.security-item h4 {
    color: #333;
    margin-bottom: 10px;
}

.security-item p {
    color: #666;
}

.back-to-platform {
    text-align: center;
    margin-top: 30px;
}

/* RESPONSIVE */
@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
        padding: 30px;
    }
    
    .auth-container {
        gap: 50px;
    }
    
    .auth-section:first-child .form-section {
        padding: 30px;
    }
    
    .auth-section:first-child input[type="text"],
    .auth-section:first-child input[type="email"],
    .auth-section:first-child input[type="tel"],
    .auth-section:first-child select {
        font-size: 17px;
        padding: 16px;
    }
}

/* Schermi molto grandi (21" e oltre) */
@media (min-width: 1800px) {
    .container {
        max-width: 1800px;
        padding: 40px;
    }
    
    .auth-container {
        gap: 60px;
    }
    
    .auth-section:first-child .form-section {
        padding: 35px;
    }
    
    .auth-section:first-child input[type="text"],
    .auth-section:first-child input[type="email"],
    .auth-section:first-child input[type="tel"],
    .auth-section:first-child select {
        font-size: 18px;
        padding: 18px;
    }
    
    .form-row {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .progress-cards {
        grid-template-columns: 1fr;
    }
    
    .lessons {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header, .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .system-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .lesson-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .credential-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .users-table {
        font-size: 12px;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px 6px;
    }
}

/* 🎓 SISTEMA DI VALIDAZIONE INTELLIGENTE PER ASPIRANTI DOCENTI */
.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.validation-message {
    margin-top: 5px;
    min-height: 20px;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.success-message {
    color: #28a745;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Stili per input con errori */
.form-group input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    animation: shake 0.5s ease-in-out;
}

/* Stili per input con successo */
.form-group input.success {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Animazione shake per errori */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Miglioramenti per i campi nome e cognome */
.form-group input[pattern] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Stili per i placeholder */
.form-group input::placeholder {
    color: #999;
    font-style: italic;
}

/* Stili per i dropdown select */
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-group select:hover {
    border-color: #667eea;
}

/* Stili per le opzioni del dropdown */
.form-group select option {
    padding: 8px;
    font-size: 14px;
}

/* Stili per il dropdown con errori */
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Stili per il dropdown con successo */
.form-group select.success {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Evidenziazione campi obbligatori */
.form-group label[for*="*"]::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Tooltip per pattern HTML5 */
.form-group input[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
    margin-top: -40px;
    margin-left: 10px;
}

/* Messaggi informativi per email e SMS */
.info-notice {
    background: #e7f3ff;
    border: 1px solid #17a2b8;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-notice strong {
    color: #0c5460;
}

/* Responsive per validazioni */
@media (max-width: 768px) {
    .help-text {
        font-size: 0.8rem;
    }
    
    .validation-message {
        min-height: 25px;
    }
    
    .error-message,
    .success-message {
        font-size: 0.8rem;
    }
    
    .info-notice {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Stili per la pagina di successo aggiornata */
.delivery-status {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #17a2b8;
}

.delivery-status h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid;
}

.status-item.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.status-item.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.status-icon {
    font-size: 1.2rem;
}

.status-text {
    font-weight: 500;
}
