body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.calendar-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
}
.schedule-box {
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
}
.time-indicator {
    background: #008000;
    color: white;
    border-radius: 20px;
    padding: 5px 12px;
    font-weight: bold;
}
.calendar-days td {
    width: 14.28%;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
}
.calendar-days td.active {
    background-color: #0b4f39;
    color: white;
    font-weight: bold;
    border-radius: 5px;
}
.table-bordered td, .table-bordered th {
    padding: 25px;
    text-align: center;
}

.calendar-main {
    display: flex;
    justify-content: center; /* Căn giữa theo chiều ngang */
    align-items: center; /* Căn giữa theo chiều dọc */
    min-height: 90vh; /* Chiều cao tối thiểu để lịch luôn ở giữa */
    padding: 30px;
}

#calendar {
    width: 100%; /* Chiếm 95% màn hình để lớn hơn */
    max-width: 1400px; /* Giới hạn chiều rộng tối đa */
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}

/* Responsive cho màn hình nhỏ hơn */
@media (max-width: 768px) {
    #calendar {
        width: 100%; /* Full width trên mobile */
        padding: 15px;
    }
}

/* Thay đổi màu cho các nút điều hướng và tiêu đề */
.fc-button-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
.fc-button-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
}

/* Màu tiêu đề của tháng, tuần, ngày, lịch biểu */
.fc-toolbar-title {
    color: #0d6efd !important;
    font-weight: bold;
}

/* Màu của nút mũi tên trái và phải */
.fc-prev-button, .fc-next-button {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}
.fc-prev-button:hover, .fc-next-button:hover {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
}

/* Tổng thể Modal */
.modal-content {
    background: #ffffff;
    border-radius: 30px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.neo-container { font-family: 'Inter', sans-serif; }

/* Hero Section */
.neo-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 10px;
}

.neo-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

.status-orb {
    width: 12px; height: 12px;
    border-radius: 50%;
    position: relative;
}
.orb-warning { background: #f59e0b; box-shadow: 0 0 15px #f59e0b; }
.orb-success { background: #10b981; box-shadow: 0 0 15px #10b981; }

.seen-tag {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Dashboard Grid */
.neo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.neo-card {
    padding: 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.col-span-2 { grid-column: span 2; }

.neo-card-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: #ffffff;
}

.card-blue .neo-card-icon { color: #3b82f6; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2); }
.card-purple .neo-card-icon { color: #8b5cf6; box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2); }
.card-dark .neo-card-icon { color: #0f172a; box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2); }

.neo-label { display: block; font-size: 0.7rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; }
.neo-value { font-size: 0.95rem; font-weight: 700; color: #334155; }

/* Content Area */
.neo-content-area {
    background: #ffffff;
    border-radius: 24px;
}

.content-header {
    font-size: 0.75rem;
    font-weight: 800;
    color: #cbd5e1;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.content-body {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 20px;
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
    min-height: 100px;
    border: 1px inset #e2e8f0;
}

/* Footer Meta */
.neo-footer-meta {
    display: flex;
    gap: 10px;
}

.meta-tag {
    background: #f8fafc;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Loading Animation */
.modern-loading-container {
    text-align: center;
    padding: 40px;
}

.radar-spinner {
    width: 50px; height: 50px;
    border: 4px solid #3b82f6;
    border-radius: 50%;
    margin: 0 auto 15px;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
/* ===============================
   RESPONSIVE CALENDAR MOBILE/IPAD
   Dán phần này xuống CUỐI file CSS
================================ */

/* Chống tràn ngang toàn trang */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: #f3f4f6;
}

/* Khung chính của lịch */
.calendar-main {
    width: 100%;
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 14px 90px;
    box-sizing: border-box;
}

/* Hộp lịch */
#calendar {
    width: 100%;
    max-width: 1100px;
    background: #ffffff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}

/* FullCalendar chung */
.fc {
    width: 100%;
}

.fc .fc-toolbar-title {
    color: #0d6efd !important;
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
}

/* Nút FullCalendar */
.fc .fc-button {
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 7px 11px !important;
}

.fc-button-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.fc-button-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
}

/* Ô ngày */
.fc .fc-daygrid-day-number {
    font-size: 13px;
    font-weight: 500;
}

.fc .fc-col-header-cell-cushion {
    font-size: 13px;
    font-weight: 700;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #e5e7eb;
}


/* ===============================
   IPAD / TABLET
================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .calendar-main {
        padding: 26px 24px 95px;
        align-items: flex-start;
    }

    #calendar {
        max-width: 900px;
        padding: 18px;
        border-radius: 14px;
    }

    .fc .fc-toolbar-title {
        font-size: 36px !important;
    }

    .fc .fc-button {
        font-size: 13px !important;
        padding: 7px 12px !important;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 82px;
    }
}


/* ===============================
   ĐIỆN THOẠI
================================ */
@media (max-width: 768px) {
    body {
        background: #eeeeee;
    }

    .calendar-main {
        min-height: auto;
        padding: 14px 6px 86px;
        align-items: flex-start;
    }

    #calendar {
        width: 100%;
        max-width: 100%;
        padding: 8px;
        border-radius: 10px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
    }

    /* Toolbar không bị chồng */
    .fc .fc-header-toolbar {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px !important;
    }

    .fc .fc-toolbar-chunk {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    /* Tiêu đề tháng nằm riêng, không đè nút */
    .fc .fc-toolbar-title {
        width: 100%;
        font-size: 36px !important;
        text-align: center;
        line-height: 1.25;
        margin: 2px 0;
        white-space: normal;
    }

    /* Nhóm nút tháng / tuần / ngày / lịch biểu */
    .fc .fc-button-group {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        max-width: 100%;
    }

    .fc .fc-button {
        font-size: 11px !important;
        padding: 6px 8px !important;
        line-height: 1.15 !important;
    }

    .fc .fc-prev-button,
    .fc .fc-next-button {
        min-width: 34px;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .fc .fc-today-button {
        min-width: 58px;
    }

    /* Bảng lịch vừa màn hình */
    .fc .fc-view-harness {
        width: 100%;
        overflow: hidden;
    }

    .fc .fc-scrollgrid {
        width: 100% !important;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: 11px;
        padding: 5px 2px;
    }

    .fc .fc-daygrid-day-number {
        font-size: 11px;
        padding: 5px 4px;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 48px;
    }

    .fc .fc-daygrid-day-top {
        justify-content: center;
    }

    .fc .fc-daygrid-day-events {
        margin: 0 2px;
    }

    .fc .fc-event {
        font-size: 10px;
        padding: 1px 2px;
        border-radius: 4px;
    }
}


/* ===============================
   MÀN RẤT NHỎ: 320px - 390px
================================ */
@media (max-width: 390px) {
    .calendar-main {
        padding-left: 4px;
        padding-right: 4px;
    }

    #calendar {
        padding: 7px;
        border-radius: 9px;
    }

    .fc .fc-toolbar-title {
        font-size: 36px !important;
    }

    .fc .fc-button {
        font-size: 10.5px !important;
        padding: 6px 6px !important;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: 10px;
    }

    .fc .fc-daygrid-day-number {
        font-size: 10px;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 44px;
    }
}


/* ===============================
   MODAL RESPONSIVE
================================ */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 12px;
    }

    .modal-content {
        border-radius: 20px;
    }

    .neo-hero {
        gap: 10px;
        margin-bottom: 16px;
        padding: 4px;
    }

    .neo-title {
        font-size: 1.25rem;
    }

    .neo-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .neo-card {
        padding: 12px;
        border-radius: 16px;
    }

    .neo-card-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .neo-value {
        font-size: 0.9rem;
    }

    .content-body {
        padding: 14px;
        border-radius: 16px;
        font-size: 0.9rem;
    }

    .neo-footer-meta {
        flex-wrap: wrap;
    }
}