/* Dashboard Asilo - CSS Styles (Stile Asilo) */

/* Stili per selezione multipla */
select[multiple] {
    height: auto !important;
    min-height: 120px;
    padding: 8px;
}

select[multiple] option {
    padding: 8px 10px;
    margin: 2px 0;
    border-radius: 4px;
}

select[multiple] option:checked {
    background-color: #6a5acd;
    color: white;
}

select[multiple] optgroup {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

select[multiple] optgroup:first-child {
    margin-top: 0;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif; /* Font più giocoso */
    line-height: 1.6;
    color: #4a4a4a;
    background-color: #f0f8ff; /* Azzurro chiaro */
}

/* Layout Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr; /* Sidebar leggermente più larga */
    grid-template-rows: 80px 1fr; /* Header più alto */
    grid-template-areas: 
        "header header"
        "sidebar main";
    min-height: 100vh;
}

/* Header */
.admin-header {
    grid-area: header;
    background: linear-gradient(135deg, #0b45b3 0%, #1d74d8 100%); /* Colori caldi e vivaci */
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem; /* Logo più grande */
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.logo i {
    margin-right: 0.75rem;
    font-size: 2.2rem; /* Icona più grande */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.1rem;
}

.user-info span {
    font-weight: 500;
}

/* Sidebar */
.admin-sidebar {
    grid-area: sidebar;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    box-shadow: 4px 0 15px rgba(0,0,0,0.08);
    padding-top: 1.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.8rem; /* Padding aumentato */
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 5px solid transparent; /* Bordo più spesso */
    font-size: 1.1rem;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #ffe0b2; /* Arancione chiaro */
    color: #1d74d8; /* Rosso vivace */
    border-left-color: #75b85a00;
}

.nav-item.active {
    background-color: #fff3e0; /* Arancione molto chiaro */
    color: #1d74d8;
    border-left-color: #75b85a00;
    font-weight: 700;
}

.nav-item i {
    margin-right: 1rem;
    width: 25px; /* Icone più grandi */
    text-align: center;
    font-size: 1.3rem;
}

/* Main Content */
.admin-main {
    grid-area: main;
    padding: 2.5rem; /* Padding aumentato */
    overflow-y: auto;
    background-color: #f0f8ff;
}

.dashboard-header {
    margin-bottom: 2.5rem;
    background-color: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: 15px; /* Bordi arrotondati */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.dashboard-header h1 {
    font-size: 2.5rem; /* Titolo più grande */
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.75rem;
}

.dashboard-header p {
    color: #6c757d;
    font-size: 1.2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px; /* Bordi arrotondati */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 2rem; /* Padding aumentato */
    margin-bottom: 2rem;
}

.card h2 {
    font-size: 1.8rem; /* Titolo card più grande */
    font-weight: 700;
    color: #343a40;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Card più grandi */
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #a7d9ff 0%, #cceeff 100%); /* Sfondo sfumato */
    border-radius: 15px; /* Bordi arrotondati */
    padding: 2rem; /* Padding aumentato */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #343a40;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 70px; /* Icona più grande */
    height: 70px;
    border-radius: 50%; /* Cerchio */
    background: #1d74d8; /* Colore icona */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 2rem; /* Dimensione icona */
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.stat-content h3 {
    font-size: 2.8rem; /* Numero più grande */
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem; /* Padding aumentato */
    border: 2px solid #e0e0e0; /* Bordo più spesso */
    border-radius: 10px; /* Bordi arrotondati */
    font-size: 1.1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fdfdfd;
    margin-bottom: 20px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6a5acd; /* Viola */
    box-shadow: 0 0 0 4px rgba(106, 90, 205, 0.2);
}

.form-text {
    font-size: 0.95rem;
    color: #888;
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem; /* Padding aumentato */
    border: none;
    border-radius: 10px; /* Bordi arrotondati */
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.75rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #0b45b3 0%, #1d74d8 100%); /* Viola */
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(106, 90, 205, 0.3);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
}

.btn-info {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%); /* Verde acqua */
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%); /* Rosso-arancio */
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #fd7e14 0%, #dc3545 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%); /* Verde */
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffcd39 100%); /* Giallo */
    color: #343a40;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffcd39 0%, #ffc107 100%);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 15px;
    /* Bordi arrotondati */
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table-container {
    overflow-x: auto;
    border-radius: 15px; /* Bordi arrotondati */
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.data-table th {
    background: #f8f8f8;
    padding: 1.2rem; /* Padding aumentato */
    text-align: left;
    font-weight: 700;
    color: #4a4a4a;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1.1rem;
}

.data-table td {
    padding: 1.2rem; /* Padding aumentato */
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.data-table tr:hover {
    background: #fcfcfc;
}

.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem; /* Padding aumentato */
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-admin {
    background: #ffe0b2; /* Arancione chiaro */
    color: #ff6b6b;
}

.badge-genitore {
    background: #d1fae5; /* Verde chiaro */
    color: #28a745;
}

.badge-success {
    background: #d1fae5;
    color: #28a745;
}

.badge-danger {
    background: #fee2e2;
    color: #dc3545;
}

.badge-info {
    background: #e0f7fa;
    color: #17a2b8;
}

.badge-certificato {
    background: #fff3e0;
    color: #fd7e14;
}

.badge-autorizzazione {
    background: #e6e6fa; /* Lavanda */
    color: #6a5acd;
}

.badge-medico {
    background: #ffebee; /* Rosso pastello */
    color: #dc3545;
}

.badge-altro {
    background: #f0f0f0;
    color: #6c757d;
}

/* Alerts */
.alert {
    padding: 1.2rem; /* Padding aumentato */
    border-radius: 10px; /* Bordi arrotondati */
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #28a745;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #dc3545;
    border: 1px solid #fca5a5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6); /* Sfondo più scuro */
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2.5rem; /* Padding aumentato */
    border-radius: 20px; /* Bordi molto arrotondati */
    width: 90%;
    max-width: 700px; /* Larghezza massima aumentata */
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem; /* Icona più grande */
    cursor: pointer;
    color: #999;
}

.close-button:hover {
    color: #555;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem; /* Padding aumentato */
    color: #888;
    background-color: #fdfdfd;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.empty-state i {
    font-size: 4rem; /* Icona più grande */
    margin-bottom: 1.5rem;
    color: #ccc;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #555;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #0b45b3 0%, #1d74d8 100%); /* Sfumatura vivace */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 550px; /* Larghezza aumentata */
    padding: 2.5rem; /* Padding aumentato */
}

.login-form {
    background: white;
    padding: 3rem; /* Padding aumentato */
    border-radius: 20px; /* Bordi molto arrotondati */
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header i {
    font-size: 4rem; /* Icona più grande */
    color: #6a5acd; /* Viola */
    margin-bottom: 1rem;
}

.login-header h2 {
    color: #343a40;
    font-size: 2rem; /* Titolo più grande */
    font-weight: 700;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.95rem;
    color: #888;
}

/* Parent Layout */
.parent-layout {
    min-height: 100vh;
    background: #f0f8ff;
}

.parent-header {
    background: linear-gradient(135deg, #0b45b3 0%, #1d74d8 100%);
    color: white;
    padding: 1.5rem 2.5rem; /* Padding aumentato */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.parent-nav {
    background: #ffffff;
    padding: 1rem 2.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 2.5rem; /* Spazio aumentato */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.parent-nav .nav-item {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
}

.parent-nav .nav-item:hover {
    color: #1d74d8;
    border-bottom-color: #1d74d8;
    background-color: transparent; /* Rimuovi sfondo hover */
}

.parent-nav .nav-item.active {
    color: #1d74d8;
    border-bottom-color: #1d74d8;
    background-color: transparent;
}

.parent-main {
    padding: 2.5rem;
}

/* Children Grid */
.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Card più grandi */
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.child-card {
    background: linear-gradient(135deg, #fffacd 0%, #ffe0b2 100%); /* Sfondo giallo pastello */
    border-radius: 20px; /* Bordi molto arrotondati */
    padding: 2rem; /* Padding aumentato */
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #4a4a4a;
}

.child-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.child-avatar {
    width: 80px; /* Avatar più grande */
    height: 80px;
    border-radius: 50%;
    background: #1d74d8; /* Viola */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; /* Icona più grande */
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.child-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.75rem;
}

.child-info p {
    color: #6c757d;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.child-info p i {
    color: #ff6b6b; /* Icone rosse */
}

.child-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

/* Utility Classes */
.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Stile per la selezione multipla */
select[multiple] {
    height: auto !important;
    min-height: 120px;
    padding: 8px;
}
select[multiple] option {
    padding: 8px 10px;
    margin: 2px 0;
    border-radius: 4px;
}
select[multiple] option:checked {
    background-color: #6a5acd;
    color: white;
}

/* Container per input con icona password */
.password-input-container {
    position: relative;
    display: flex;
    align-items: anchor-center;
}

/* Aggiusta il padding dell'input per fare spazio all'icona */
.password-input-container input[type="password"],
.password-input-container input[type="text"] {
    padding-right: 3.5rem !important;
}

/* Stile per l'icona toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: #6c757d;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.3s ease, transform 0.1s ease;
    user-select: none;
    z-index: 10;
    border-radius: 50%;
}

.password-toggle:hover {
    color: #6a5acd;
    background-color: rgba(106, 90, 205, 0.1);
}

.password-toggle:active {
    transform: scale(0.95);
}

/* Animazione per il cambio icona */
.password-toggle i {
    transition: opacity 0.2s ease;
}

/* Accessibilità */
.password-toggle:focus {
    outline: 2px solid #6a5acd;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 992px) {
    .admin-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 80px auto 1fr;
        grid-template-areas: 
            "header"
            "sidebar"
            "main";
    }
    
    .admin-sidebar {
        display: block; /* Mostra sidebar su schermi medi */
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        padding-top: 0;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        overflow-x: auto;
        padding: 0.5rem 1rem;
        justify-content: flex-start; /* Allinea a sinistra */
        white-space: nowrap; /* Evita il wrap */
    }

    .nav-item {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .nav-item.active {
        border-left-color: transparent;
        border-bottom-color: #ff6b6b;
    }

    .nav-item i {
        margin-right: 0.5rem;
    }

    .admin-main, .parent-main {
        padding: 1.5rem;
    }

    .dashboard-header, .card {
        padding: 1.5rem;
    }

    .stats-grid, .form-grid, .children-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .stat-card, .child-card {
        padding: 1.5rem;
    }

    .stat-icon, .child-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .stat-content h3 {
        font-size: 2.2rem;
    }

    .stat-content p {
        font-size: 1rem;
    }

    .data-table th, .data-table td {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .alert {
        padding: 1rem;
        font-size: 1rem;
    }

    .modal-content {
        padding: 2rem;
    }

    .login-form {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .admin-header, .parent-header {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.0rem;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .user-info {
        font-size: 1rem;
        gap: 1rem;
    }

    .parent-nav {
        padding: 0.75rem 1.5rem;
        gap: 1.5rem;
    }

    .parent-nav .nav-item {
        font-size: 1rem;
    }

    .admin-main, .parent-main {
        padding: 1rem;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .dashboard-header p {
        font-size: 1.1rem;
    }

    .card h2 {
        font-size: 1.6rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input, .form-group select, .form-group textarea {
        padding: 0.8rem;
        font-size: 1rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }

    .btn-sm {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    .alert {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .close-button {
        font-size: 2rem;
    }

    .login-form {
        padding: 2rem;
    }

    .login-header i {
        font-size: 3.5rem;
    }

    .login-header h2 {
        font-size: 1.8rem;
    }

    .empty-state i {
        font-size: 3.5rem;
    }

    .empty-state h3 {
        font-size: 1.3rem;
    }

    .empty-state p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .admin-main, .parent-main {
        padding: 0.75rem;
    }

    .dashboard-header, .card {
        padding: 1rem;
    }

    .stats-grid, .form-grid, .children-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card, .child-card {
        padding: 1rem;
    }

    .stat-icon, .child-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-content h3 {
        font-size: 2rem;
    }

    .stat-content p {
        font-size: 0.9rem;
    }

    .data-table th, .data-table td {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }

    .alert {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1rem;
        overflow-y: auto;
        max-height: 600px;
    }

    .close-button {
        font-size: 1.8rem;
    }

    .login-form {
        padding: 1.5rem;
    }

    .login-header i {
        font-size: 3rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.2rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }
}



/* Stili per Diari Giornalieri */
.checkbox-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #4a4a4a;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    background-color: #e8f4fd;
    border-color: #1d74d8;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #1d74d8;
    border-color: #1d74d8;
}

.checkbox-label input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Badge specifici per diari */
.badge-completo {
    background: #d1fae5;
    color: #28a745;
}

.badge-parziale {
    background: #fff3e0;
    color: #fd7e14;
}

.badge-niente {
    background: #fee2e2;
    color: #dc3545;
}

/* Dettagli diario nella modale */
.diary-details {
    padding: 1rem 0;
}

.diary-info h3 {
    color: #343a40;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.diary-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #6a5acd;
}

.diary-item strong {
    display: block;
    color: #4a4a4a;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diary-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
}

.diary-section strong {
    display: block;
    color: #4a4a4a;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diary-section p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Stili per la visualizzazione genitore */
.diary-card {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe0b2 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.diary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.diary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.diary-card-header h3 {
    color: #343a40;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.diary-card-date {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
}

.diary-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.diary-summary-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
}

.diary-summary-item strong {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.diary-notes {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    border-left: 4px solid #6a5acd;
}

.diary-notes h4 {
    color: #4a4a4a;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diary-notes p {
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

/* Responsive per diari */
@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .diary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .diary-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .diary-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===== BOTTOM NAVIGATION MOBILE (MATERIAL DESIGN) ===== */

/* Bottom Navigation Container */
.bottom-nav {
    display: none; /* Nascosto di default, mostrato solo su mobile/tablet */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); /* Safe area per iPhone */
    height: calc(64px + env(safe-area-inset-bottom));
}

/* Navigation Items Container */
.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    max-width: 500px; /* Limita larghezza su tablet */
    margin: 0 auto;
    padding: 0 16px;
}

/* Single Navigation Item */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 16px;
    min-width: 64px;
    position: relative;
}

/* Active State */
.bottom-nav-item.active {
    color: #1d74d8;
    background-color: rgba(29, 116, 216, 0.12);
}

/* Hover State */
.bottom-nav-item:hover {
    color: #1d74d8;
    background-color: rgba(29, 116, 216, 0.08);
}

/* Icon Styling */
.bottom-nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Label Styling */
.bottom-nav-item span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
}

.bottom-nav-item.active span {
    font-weight: 700;
}

/* Badge per notifiche (opzionale) */
.bottom-nav-item .nav-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== RESPONSIVE BEHAVIOR ===== */

/* Mobile e Tablet: Mostra bottom nav, nascondi sidebar */
@media (max-width: 1024px) {
    .bottom-nav {
        display: block;
    }
    
    /* Nascondi sidebar su mobile/tablet */
    .admin-sidebar,
    .parent-sidebar {
        display: none !important;
    }
    
    /* Modifica layout per fare spazio al bottom nav */
    .admin-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 80px 1fr;
        grid-template-areas: 
            "header"
            "main";
    }
    
    /* Aggiungi padding bottom per evitare sovrapposizioni */
    .admin-main,
    .parent-main {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    
    /* Nascondi la navigazione orizzontale esistente */
    .parent-nav {
        display: none !important;
    }
}

/* Tablet: Layout leggermente diverso */
@media (min-width: 768px) and (max-width: 1024px) {
    .bottom-nav-items {
        max-width: 600px;
        padding: 0 32px;
    }
    
    .bottom-nav-item {
        min-width: 80px;
        padding: 8px 16px;
    }
    
    .bottom-nav-item span {
        max-width: 80px;
        font-size: 13px;
    }
}

/* Desktop: Mantieni sidebar, nascondi bottom nav */
@media (min-width: 1025px) {
    .bottom-nav {
        display: none !important;
    }
    
    /* Ripristina layout sidebar per desktop */
    .admin-layout {
        grid-template-columns: 280px 1fr;
        grid-template-rows: 80px 1fr;
        grid-template-areas: 
            "header header"
            "sidebar main";
    }
    
    .admin-sidebar {
        display: block !important;
    }
    
    .admin-main,
    .parent-main {
        padding-bottom: 2.5rem; /* Ripristina padding normale */
    }
    
    /* Mostra la navigazione orizzontale per genitori su desktop */
    .parent-nav {
        display: flex !important;
    }
}

/* ===== ANIMAZIONI ===== */

/* Ripple effect per il tocco */
.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(29, 116, 216, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: -1;
}

.bottom-nav-item:active::before {
    width: 48px;
    height: 48px;
}

/* ===== ACCESSIBILITÀ ===== */

/* Focus states per navigazione da tastiera */
.bottom-nav-item:focus {
    outline: 2px solid #1d74d8;
    outline-offset: 2px;
}

/* Migliore contrast per utenti con problemi di vista */
@media (prefers-contrast: high) {
    .bottom-nav {
        border-top: 2px solid #000;
    }
    
    .bottom-nav-item {
        color: #000;
    }
    
    .bottom-nav-item.active {
        background-color: #1d74d8;
        color: #fff;
    }
}

/* Ridotto movimento per utenti sensibili alle animazioni */
@media (prefers-reduced-motion: reduce) {
    .bottom-nav-item,
    .bottom-nav-item i,
    .bottom-nav-item::before {
        transition: none;
    }
}

/* ===== VARIANTI COLORE PER DIVERSE SEZIONI ===== */

/* Admin Theme */
.admin-layout .bottom-nav-item.active {
    color: #1d74d8;
    background-color: rgba(29, 116, 216, 0.12);
}

/* Parent Theme */
.parent-layout .bottom-nav-item.active {
    color: #1d74d8;
    background-color: rgba(29, 116, 216, 0.12);
}