
.private-section {
    margin-top: 30px;
}

.private1-section {
    margin-bottom: 0;
    margin-top: 0;
}


#calendarModal,
#calendarModal1 {
    margin-top: 250px;
}

#calendar {
    width: 1100px;
    margin: 10px auto;
    margin-bottom: 50px;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.mylabel {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: -5px;
}

#fc-dom-1 {
    text-transform: uppercase;
    margin-bottom: -15px;
    margin-left: 85px;
}

.toast {
    width: 100%;
}

/* CALENDARIO */

/* TITOLO TOOLBAR */
#calendar .fc-toolbar-title {
    color: #333;
    font-weight: 600;
}

/* BOTTONI */
#calendar .fc-button {
    background: #f7f7f7;
    border: 1px solid #dcdcdc;
    color: #333;
    border-radius: 6px;
}

#calendar .fc-button:hover {
    background: #ececec;
}

#calendar .fc-button.fc-button-active {
    background: #dcdcdc;
    color: #000;
}

/* HEADER DEI GIORNI */
#calendar .fc-col-header-cell {
    background: #fafafa;
    color: #444;
    border-color: #e0e0e0;
    font-weight: 600;
}

/* CELLE */
#calendar .fc-daygrid-day {
    background: #ffffff;
    border-color: #e6e6e6;
}

.fc-daygrid-day.fc-day-today {
    background: #fff7d6 !important;
    border-color: #f0d98c !important;
}

.fc-daygrid-event {
    white-space: normal !important;
}

.fc-h-event .fc-event-time {
    overflow: unset !important;
}

.fc-nonbusiness {
    background-color: #ffe4e1 !important
}

/* TABELLA */
.table-scroll {
    max-height: 485px;
    overflow-y: auto;
    overflow-x: auto;
    border: 0.5px solid #ccc;
    background: #ffffffcc;
    /* leggero vetro chiaro */
    backdrop-filter: blur(6px);
    margin-top: 10px;
    margin-bottom: 70px;
}

.table-scroll table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    /* larghezza automatica */
}

.table-scroll th,
.table-scroll td {
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    color: #333;
    background: #fafafa;
    white-space: nowrap;
    /* evita schiacciamenti */
}

.table-scroll thead th {
    background: #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 2;
    font-weight: 600;
}

@media only screen and (min-width: 640px) and (max-width: 991px) {

    .private1-section {
        height: 550px;
        margin-top: 50px;
        margin-bottom: 20px;
    }

    #calendar {
        width: 600px;
        margin: 10px auto;
        margin-bottom: 0;
    }

    #fc-dom-1 {
        font-size: 24px;
        margin-right: 0;
        margin-bottom: -40px;
    }

    .fc-view-container {
        margin-top: 0;
    }

    .fc-daygrid-event {
        white-space: nowrap !important;
    }

    .fc-scroller.fc-day-grid-container {
        height: auto !important;
        overflow: hidden;
    }

    .fc-right {
        display: none;
    }

    .fc-left {
        margin-bottom: -50px;
        margin-left: 0;
    }

    .btn-group {
        margin-bottom: -25x;
    }

    .fc-header-toolbar .fc-toolbar-chunk:last-child {
        display: none;
    }
}

@media only screen and (max-width: 640px) {

    #calendarModal,
    #calendarModal1 {
        margin-top: 50px;
    }

    .private1-section {
        height: auto;
        margin-top: 40px;
        margin-bottom: 10px;
    }

    #calendar {
        width: 370px;
        height: 350px;
        margin: 10px auto;
        margin-bottom: 0;
        padding: 0;
    }

    #start,
    #end,
    #start1,
    #end1 {
        width: 95%;
    }

    .table-scroll {
        margin-bottom: 50px;
    }

    .fc .fc-button-group {
        margin-bottom: 0;
        font-size: 13px;
        margin-bottom: -10px;
    }

    .fc .fc-button-primary:not(:disabled).fc-button-active {
        margin-left: 70px;
    }

    #fc-dom-1 {
        font-size: 20px;
        margin-right: 0;
        margin-bottom: -20px;
        margin-left: 0;
    }

    .mybutton {
        margin: 5px;
        margin-left: 0
    }

    .fc-view-container {
        margin-top: -15px;
    }

    .fc-daygrid-event {
        white-space: nowrap !important;
    }

    .fc-scroller.fc-day-grid-container {
        height: auto !important;
        overflow: hidden;
    }

    .fc-header-toolbar .fc-toolbar-chunk:last-child {
        display: none;
    }
}

/* ===========================
        DARK MODE
   =========================== */

body.dark-mode .bg-image::after,
body.dark-mode section::after {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* ===========================
   TABLE-SCROLL — DARK MODE
   =========================== */

body.dark-mode .table-scroll {
    background-color: rgba(255, 255, 255, 0.15) !important;
    /* vetro scuro */
    backdrop-filter: blur(6px);
    /* testo chiaro */
}

/* HEADER */
body.dark-mode .table-scroll thead th {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #333;
    font-weight: 600;
    padding: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.20);
}

/* RIGHE */
body.dark-mode .table-scroll tbody tr {
    background: rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: background .15s;
}

/* HOVER */
body.dark-mode .table-scroll tbody tr:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* CELLE */
body.dark-mode .table-scroll td {
    background: rgba(255, 255, 255, 0.10);
    padding: 12px;
    color: #ffffff;
    /* leggibile, non bianco sparato */
}

/* SCROLLBAR */
body.dark-mode .table-scroll::-webkit-scrollbar {
    width: 8px;
}

body.dark-mode .table-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

body.dark-mode .table-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

/* ===========================
   FULLCALENDAR — DARK MODE
   =========================== */

body.dark-mode #calendar .fc-toolbar-title {
    color: #fff;
}

body.dark-mode #calendar .fc-button {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #000;
}

body.dark-mode #calendar .fc-button.fc-button-active {
    background: rgba(255, 255, 255, 0.35);
    color: #000;
}

/* HEADER DEI GIORNI (lun, mar, mer...) */
body.dark-mode #calendar .fc-col-header-cell {
    background: rgba(255, 255, 255, 0.18);
    color: #000;
    border-color: rgba(255, 255, 255, 0.35);
}

/* CELLE DEL CALENDARIO */
body.dark-mode #calendar .fc-daygrid-day {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* NUMERI DEI GIORNI */
body.dark-mode #calendar .fc-daygrid-day-number {
    color: #fff;
}

/* GIORNO CORRENTE (OGGI) */
body.dark-mode #calendar .fc-day-today {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
}

body.dark-mode #calendar .fc-day-today .fc-daygrid-day-number {
    color: #000 !important;
}

/* EVENTI */
body.dark-mode #calendar .fc-daygrid-event {
    background: rgba(255, 255, 255, 0.45);
    color: #000;
    border-radius: 6px;
}

/* NON-BUSINESS (sabato/domenica) */
body.dark-mode #calendar .fc-day-sat,
body.dark-mode #calendar .fc-day-sun {
    background: rgba(255, 255, 255, 0.20) !important;
    /* leggero velo chiaro */
}

/* MODAL BACKGROUND */
body.dark-mode .modal-content {
    background: #1e1e1e !important;
    color: #fff !important;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

/* SPACING FIX */
body.dark-mode #calendarModal .modal-body {
    padding-top: 22px !important;
    /* leggermente più armonico */
}

/* LABELS */
body.dark-mode .modal-content .mylabel {
    color: #e6e6e6 !important;
    font-weight: 500;
}

/* INPUTS */
body.dark-mode .modal-content .form-control {
    background: #2a2a2a !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.20) !important;
}

body.dark-mode .modal-content .form-control:focus {
    background: #333 !important;
    border-color: #4da3ff !important;
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.35) !important;
    color: #fff !important;
}

/* SELECT */
body.dark-mode #color {
    background: #2a2a2a !important;
    color: #fff !important;
}

/* SECONDARY BUTTON */
body.dark-mode .modal-footer .btn-outline-secondary {
    background: #3a3a3a !important;
    color: #f2f2f2 !important;
    border: 1px solid #3a3a3a !important;
}

body.dark-mode .modal-footer .btn-outline-secondary:hover {
    background: #f2f2f2 !important;
    border-color: #f2f2f2 !important;
    color: #4a4a4a !important;
}

body.dark-mode .modal-footer .btn-outline-primary {
    background: #3a3a3a !important;
    border-color: #3a3a3a !important;
    color: #7ab8ff !important;
}

body.dark-mode .modal-footer .btn-outline-primary:hover {
    background: #f2f2f2 !important;
    color: #4da3ff !important;
}

/* DANGER BUTTON */
body.dark-mode .modal-footer .btn-outline-danger {
    background: #3a3a3a !important;
    /* rosso scuro elegante */
    color: #d64545 !important;
    border: 1px solid #3a3a3a !important;
}

body.dark-mode .modal-footer .btn-outline-danger:hover {
    background: #fff !important;
    /* rosso più vivo ma non neon */
    border-color: rgba(255, 255, 255, 0.28) !important;
    color: #d64545 !important
}

body.dark-mode input[type="datetime-local"] {
    background-color: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 8px;
    padding: 6px 10px;
    backdrop-filter: blur(4px);
}

/* Placeholder */
body.dark-mode input[type="datetime-local"]::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
}

/* Icona calendario (Chrome/Edge) */
body.dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
    opacity: 0.8;
}

/* Hover */
body.dark-mode input[type="datetime-local"]:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
}

/* Focus */
body.dark-mode input[type="datetime-local"]:focus {
    border-color: #7ab8ff !important;
    box-shadow: 0 0 0 2px rgba(122, 184, 255, 0.35);
}