/* ===================================
   AFT PEDIATRICA - STYLES
   =================================== */

/* === VARIABILI CSS (Tema dinamico) === */
:root {
    /* Colori di default (AFT Maglie - stile Anthropic) */
    --color-primary: #d97757;      /* Corallo */
    --color-secondary: #6a9bcc;    /* Blu */
    --color-accent: #788c5d;       /* Verde */
    --color-background: #faf9f5;   /* Crema */
    --color-text: #141413;         /* Quasi nero */
    --color-border: #e8e6dc;       /* Beige chiaro */
}

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

body {
    font-family: 'Lora', Georgia, serif;
    background: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
}

/* === PAGINA LOGIN === */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(20, 20, 19, 0.08);
    padding: 48px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}

.login-logo {
    font-size: 64px;
    margin-bottom: 6px;
}

.login-logo img {
    width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.login-subtitle {
    font-size: 16px;
    color: #b0aea5;
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.form-button {
    width: 100%;
    padding: 14px;
    margin-top: 24px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-button:hover {
    background: #c96847;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.3);
}

.form-button:active {
    transform: translateY(0);
}

.error-message {
    color: var(--color-primary);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

/* === CONTENUTO PRINCIPALE === */
.main-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.main-content.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === NAVBAR === */
.navbar {
    background: white;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(20, 20, 19, 0.04);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text);
    transition: opacity 0.2s ease;
}

.navbar-logo:hover {
    opacity: 0.8;
}

.navbar-icon {
    font-size: 32px;
}

.navbar-logo-img {
    height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
    align-self: center;
    transform: translateY(3px);
}

.navbar-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-link {
    padding: 10px 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: transparent;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.navbar-link:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

.navbar-link.active {
    background: var(--color-primary);
    color: white;
}

.logout-button {
    padding: 10px 20px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

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

/* Mobile menu toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    width: 24px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6a9bcc 100%);
    border-radius: 16px;
    padding: 48px;
    margin-bottom: 48px;
    text-align: center;
    color: white;
}

.hero-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(20, 20, 19, 0.1);
}

.hero-description {
    font-size: 18px;
    opacity: 0.95;
}

/* === SECTION === */
.section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 2px 16px rgba(20, 20, 19, 0.06);
}

.section-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
}

/* === INTRO SECTION === */
.intro-section {
    background: white;
    border-radius: 16px;
    padding: 32px 40px;
    margin-bottom: 32px;
    box-shadow: 0 2px 16px rgba(20, 20, 19, 0.06);
    border-left: 4px solid var(--color-primary);
}

.intro-text {
    font-size: 17px;
    line-height: 1.8;
    color: var(--color-text);
    text-align: left;
}

/* === CARDS === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 2px solid var(--color-border);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(20, 20, 19, 0.12);
    border-color: var(--color-primary);
}

.card-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.card-description {
    font-size: 15px;
    color: #b0aea5;
    line-height: 1.6;
    flex-grow: 1;
}

.card-arrow {
    font-size: 28px;
    color: var(--color-primary);
    margin-top: 16px;
    transition: transform 0.3s ease;
}

.card:hover .card-arrow {
    transform: translateX(8px);
}

/* === WEBAPP CARDS === */
.webapp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.webapp-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-background);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.webapp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 20, 19, 0.12);
    border-color: var(--color-primary);
    background: white;
}

.webapp-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.webapp-content {
    flex: 1;
}

.webapp-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.webapp-description {
    font-size: 14px;
    color: #b0aea5;
    line-height: 1.5;
}

.webapp-arrow {
    font-size: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.webapp-card:hover .webapp-arrow {
    transform: translateX(4px);
}

/* === TABELLA ORARI RESPONSIVE === */
.schedule-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.schedule-table thead {
    background: var(--color-background);
}

.schedule-table th {
    font-family: 'Poppins', Arial, sans-serif;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
}

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

.schedule-table tbody tr:hover {
    background-color: var(--color-background);
}

.schedule-table tbody tr:last-child {
    border-bottom: none;
}

.schedule-table td {
    padding: 20px 12px;
    font-size: 15px;
    vertical-align: top;
}

.schedule-table td:first-child {
    font-weight: 600;
    color: var(--color-primary);
    font-family: 'Poppins', Arial, sans-serif;
}

.time-slot {
    display: block;
    margin: 4px 0;
    color: var(--color-text);
}

.time-slot-group {
    display: block;
    margin-bottom: 6px;
    margin-top: 8px;
}

.location {
    color: #788c5d;
    font-style: italic;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

/* Mobile schedule view */
@media (max-width: 768px) {
    .schedule-table {
        min-width: 100%;
    }

    .schedule-table thead {
        display: none;
    }

    .schedule-table tbody tr {
        display: block;
        margin-bottom: 24px;
        border: 2px solid var(--color-border);
        border-radius: 12px;
        padding: 20px;
        background: var(--color-background);
    }

    .schedule-table tbody tr:hover {
        background: white;
        box-shadow: 0 4px 12px rgba(20, 20, 19, 0.08);
    }

    .schedule-table td {
        display: block;
        padding: 8px 0;
        border: none;
    }

    .schedule-table td:first-child {
        font-size: 20px;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--color-border);
    }

    .schedule-table td:not(:first-child):before {
        content: attr(data-label);
        font-family: 'Poppins', Arial, sans-serif;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        color: #788c5d;
        display: block;
        margin-bottom: 6px;
    }
}

/* === CONTATTI === */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.contact-card {
    background: var(--color-background);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #6a9bcc;
    transition: all 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 20, 19, 0.08);
    border-left-color: var(--color-primary);
}

.doctor-name {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 12px;
}

.contact-details {
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.8;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.icon {
    color: #788c5d;
    margin-right: 10px;
    flex-shrink: 0;
}

.contact-link {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* === LINK CARDS === */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-background);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 20, 19, 0.12);
    border-color: #6a9bcc;
    background: white;
}

.link-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.link-content {
    flex: 1;
}

.link-title {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.link-description {
    font-size: 13px;
    color: #b0aea5;
    line-height: 1.4;
}

.link-external {
    font-size: 20px;
    color: #6a9bcc;
    flex-shrink: 0;
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 32px;
    color: #b0aea5;
    font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar-inner {
        padding: 0 20px;
        height: 64px;
    }

    .navbar-title {
        font-size: 16px;
    }

    .navbar-icon {
        font-size: 28px;
    }

    .navbar-logo-img {
        height: 80px;
    }

    .navbar-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 16px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 4px 12px rgba(20, 20, 19, 0.08);
        display: none;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .logout-button {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

    .navbar-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    .container {
        padding: 32px 20px;
    }

    .hero {
        padding: 32px 24px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section {
        padding: 24px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .webapp-grid {
        grid-template-columns: 1fr;
    }

    .webapp-card {
        padding: 20px;
    }

    .webapp-icon {
        font-size: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 32px 24px;
    }
}

/* === SELETTORE AFT === */
.aft-selector-section {
    margin-bottom: 32px;
}

.aft-selector-card {
    background: white;
    border-radius: 12px;
    padding: 24px 32px;
    box-shadow: 0 2px 16px rgba(20, 20, 19, 0.06);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.aft-selector-label {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.aft-selector {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.aft-selector:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

.aft-selector:hover {
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .aft-selector-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .aft-selector {
        width: 100%;
        min-width: 0;
    }
}

/* ===================================
   CALENDARIO ASSENZE
   =================================== */

/* Form Assenza */
.assenza-form {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--color-border);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-group select,
.form-group input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-background);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.form-group select:focus,
.form-group input[type="date"]:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

.form-group-giorni {
    align-items: center;
    justify-content: center;
}

.giorni-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 38px;
    padding: 0 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    background: #e5e7eb;
    color: #6b7280;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 12px 24px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 20, 19, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 8px 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: white;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(20, 20, 19, 0.1);
}

.btn-delete {
    padding: 6px 12px;
    font-size: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.btn-delete:hover {
    opacity: 1;
    background: #fee2e2;
    transform: scale(1.1);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Filters */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--color-border);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.filter-group select {
    padding: 8px 12px;
    font-family: 'Lora', Georgia, serif;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-background);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
}

/* Tabella Assenze */
.assenze-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 2px solid var(--color-border);
}

.assenze-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.assenze-table thead {
    background: var(--color-background);
    border-bottom: 2px solid var(--color-border);
}

.assenze-table th {
    padding: 12px 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
}

.assenze-table td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
}

.assenze-table tbody tr:last-child td {
    border-bottom: none;
}

.assenze-table tbody tr:hover {
    background: var(--color-background);
}

.giorni-badge-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 12px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    background: var(--color-primary);
    color: white;
}

/* Tabella Riepilogo */
.riepilogo-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 2px solid var(--color-border);
}

.riepilogo-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.riepilogo-table thead {
    background: var(--color-primary);
    color: white;
}

.riepilogo-table th {
    padding: 14px 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.riepilogo-table td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
}

.riepilogo-table tbody tr:last-child td {
    border-bottom: none;
}

.riepilogo-table tbody tr:hover {
    background: var(--color-background);
}

.giorni-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 36px;
    padding: 0 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    background: var(--color-secondary);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 32px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.empty-subtitle {
    font-size: 14px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
}

/* Form Message */
.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #6ee7b7;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #fca5a5;
}

/* Admin Mode */
.admin-toggle-section {
    padding: 20px 24px !important;
}

.admin-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-info-text {
    flex: 1;
    min-width: 250px;
}

.admin-info-text strong {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    color: var(--color-text);
    display: block;
    margin-bottom: 4px;
}

.admin-info-text p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.btn-admin-toggle {
    padding: 12px 24px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: var(--color-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-admin-toggle:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 20, 19, 0.15);
}

.admin-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 600;
    flex-wrap: wrap;
}

.admin-banner span {
    font-size: 16px;
}

.btn-admin-exit {
    padding: 8px 16px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #059669;
    background: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-admin-exit:hover {
    background: #f0fdf4;
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-actions {
        width: 100%;
    }

    .section-actions button {
        flex: 1;
        min-width: 0;
    }

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

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

    .filter-group select {
        flex: 1;
    }

    /* Tabella in card layout su mobile */
    .assenze-table thead {
        display: none;
    }

    .assenze-table,
    .assenze-table tbody,
    .assenze-table tr,
    .assenze-table td {
        display: block;
        width: 100%;
    }

    .assenze-table tr {
        margin-bottom: 16px;
        border: 2px solid var(--color-border);
        border-radius: 8px;
        overflow: hidden;
    }

    .assenze-table td {
        text-align: right;
        padding: 12px 16px;
        position: relative;
        padding-left: 50%;
        border-bottom: 1px solid var(--color-border);
    }

    .assenze-table td:last-child {
        border-bottom: none;
        text-align: center;
        padding-left: 16px;
    }

    .assenze-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        font-family: 'Poppins', Arial, sans-serif;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        color: var(--color-text);
    }

    .assenze-table td:last-child::before {
        content: none;
    }

    /* Riepilogo table mobile */
    .riepilogo-table thead {
        display: none;
    }

    .riepilogo-table,
    .riepilogo-table tbody,
    .riepilogo-table tr,
    .riepilogo-table td {
        display: block;
        width: 100%;
    }

    .riepilogo-table tr {
        margin-bottom: 16px;
        border: 2px solid var(--color-border);
        border-radius: 8px;
        overflow: hidden;
    }

    .riepilogo-table td {
        text-align: right;
        padding: 12px 16px;
        position: relative;
        padding-left: 50%;
        border-bottom: 1px solid var(--color-border);
    }

    .riepilogo-table td:last-child {
        border-bottom: none;
    }

    .riepilogo-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        font-family: 'Poppins', Arial, sans-serif;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        color: white;
    }
}

@media print {
    body {
        background: white;
    }

    .navbar,
    .logout-button,
    .hero,
    .aft-selector-section {
        display: none;
    }

    .section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
