* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Syne', sans-serif;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #0ea5e9;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --dark-bg: #1e293b;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
}

body {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    min-height: 100vh;
    color: var(--text-dark);
    scroll-behavior: smooth;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.dashboard-header h1 i {
    margin-right: 1rem;
    color: var(--secondary-color);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

.risk-widget {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.risk-widget h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.risk-widget h2 i {
    color: var(--warning-color);
    margin-right: 0.5rem;
}

.risk-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.risk-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.risk-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.risk-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.risk-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.risk-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.risk-score {
    font-size: 3rem;
    font-weight: 800;
    margin: 1rem 0;
}

.risk-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.risk-bar-fill {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.risk-low { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.risk-medium { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.risk-high { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.flights-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.flights-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.flights-section h2 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.table-container {
    overflow-x: auto;
}

.flights-table {
    width: 100%;
    border-collapse: collapse;
}

.flights-table thead {
    background: #0B121E;
    color: white;
}

.flights-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flights-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.flights-table tbody tr:hover {
    background: var(--light-bg);
}

.flights-table td {
    padding: 1rem;
    font-size: 0.95rem;
}

.weather-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
}

.weather-good {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.weather-caution {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.weather-bad {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-on-time {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-delayed {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-boarding {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.weather-bulletin {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-light);
     max-width: 120px;
     white-space: normal;
     word-break: break-word;
     overflow-wrap: break-word;
     line-height: 1.2;
    cursor: help;
}

.weather-bulletin:hover {
    white-space: normal;
    overflow: visible;
}

.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
}

.btn-primary {
    background: #0B121E;
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #0284c7;
}

.btn i {
    margin-right: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.modal-content h2 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger-color);
}

.announcement-content {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.announcement-section {
    margin-bottom: 2rem;
}

.announcement-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.announcement-section h3 i {
    margin-right: 0.5rem;
}

.announcement-text {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.8;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.loader {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-size: 1.1rem;
}

.loader::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }
    .table-container {
        overflow-x: scroll;
    }
    .flights-table {
        font-size: 0.85rem;
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

/* FOOTER */
.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #e2e8f0;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    font-family: 'Syne', sans-serif;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #f8fafc;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #60a5fa;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #60a5fa;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}

/* SEZIONE REPORT */
.report-section {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.report-section h2 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.report-content {
    text-align: center;
    color: var(--text-light);
}

.report-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* LISTA PDF */
.pdf-list {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.pdf-list h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.pdf-files {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdf-files li {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.pdf-files li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pdf-files li i {
    color: #dc2626;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.pdf-files li a {
    flex: 1;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.pdf-files li a:hover {
    color: var(--primary-color);
}

.file-date {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.btn-delete {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-delete:hover {
    background-color: rgba(220, 38, 38, 0.1);
}

/* PULSANTI AZIONI TABELLA */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* MODALE REPORT PDF */
.report-form {
    padding: 1rem 0;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea::placeholder {
    color: var(--text-light);
}
