body {
    background: #f4f6f9;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0b3558 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: 0;
    border-radius: 1rem;
}

#calendar {
    min-height: 700px;
}

.fc .fc-toolbar-title {
    font-size: 1.2rem;
}

.status-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    display: inline-block;
}

.fc-event-title,
.fc-event-time {
    white-space: normal;
}

.fc .fc-non-business {
    background: rgba(108, 117, 125, 0.18);
}

#appointmentModal .modal-dialog {
    margin: 1rem auto;
}

#appointmentModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

#appointmentModal #appointmentForm {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

#appointmentModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.appointment-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.appointment-summary-item {
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
    border: 1px solid #e3e8ef;
    padding: 0.85rem 0.95rem;
    min-width: 0;
}

.appointment-summary-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.76rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
}

.appointment-summary-value {
    display: block;
    font-size: 0.98rem;
    line-height: 1.3;
    color: #1f2d3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appointment-form-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-section {
    border: 1px solid #e6eaf0;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 1rem;
}

.appointment-section-header {
    margin-bottom: 0.875rem;
}

.appointment-section-title {
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: #1f2d3d;
}

.appointment-section-text {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

#appointmentModal .modal-header,
#appointmentModal .modal-footer {
    flex-shrink: 0;
    position: sticky;
    background: #fff;
    z-index: 2;
}

#appointmentModal .modal-header {
    top: 0;
    border-bottom: 1px solid #dee2e6;
}

#appointmentModal .modal-footer {
    bottom: 0;
    border-top: 1px solid #dee2e6;
}

@media (min-width: 992px) {
    #appointmentModal .modal-dialog {
        max-width: 920px;
    }
}

@media (max-width: 767.98px) {
    #appointmentModal .modal-dialog {
        margin: 0.5rem;
    }

    #appointmentModal .modal-content {
        max-height: calc(100vh - 1rem);
    }

    #appointmentModal .modal-body {
        padding: 0.875rem;
    }

    .appointment-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem;
    }

    .appointment-form-sections {
        gap: 0.75rem;
    }

    .appointment-section {
        padding: 0.875rem;
        border-radius: 0.75rem;
    }

    #appointmentModal .form-label {
        margin-bottom: 0.25rem;
    }

    #appointmentModal .row.g-3 {
        --bs-gutter-y: 0.75rem;
    }

    #appointmentModal .modal-footer {
        padding: 0.75rem;
    }

    #appointmentModal .modal-footer .d-flex {
        width: 100%;
    }

    #appointmentModal .modal-footer .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 575.98px) {
    .appointment-summary {
        grid-template-columns: 1fr;
    }
}
