/* Modern Actions Modal Styles (scoped to batches page) */
.batches-page .action-trigger {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
}

.batches-page .action-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Action Cards */
.batches-page .action-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e9edf4;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    min-height: 60px;
}

.batches-page .action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
    text-decoration: none;
    color: inherit;
}

.batches-page .action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.batches-page .action-icon i {
    font-size: 1.25rem;
}

.batches-page .action-content {
    flex-grow: 1;
}

.batches-page .action-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.batches-page .delete-action {
    border: none;
    background: white;
    width: 100%;
    text-align: left;
}

.batches-page .delete-action:hover {
    border-color: #dc3545 !important;
}

/* Modal Enhancements */
.batches-page .modal-content {
    border-radius: 16px;
    overflow: hidden;
}

/* Color Transparent Classes */
.batches-page .bg-info-transparent {
    background-color: rgba(13, 202, 240, 0.1);
}

.batches-page .bg-success-transparent {
    background-color: rgba(25, 135, 84, 0.1);
}

.batches-page .bg-danger-transparent {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Advanced Filter Arrow Animation */
.batches-page .filter-arrow {
    transition: transform 0.3s ease;
}

.batches-page [data-bs-toggle="collapse"][aria-expanded="true"] .filter-arrow {
    transform: rotate(180deg);
}

/* Custom Close Button */
.batches-page .btn-close-custom {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.batches-page .btn-close-custom:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

.batches-page .btn-close-custom:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.batches-page .btn-close-custom:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Remove scrollbars from SweetAlert delete confirmation */
.batches-page .swal-no-scrollbar .swal2-popup {
    overflow: visible !important;
    max-height: none !important;
}

.batches-page .swal-no-scrollbar-container {
    overflow: hidden !important;
}

.batches-page .swal2-container .swal-no-scrollbar-container .swal2-popup {
    overflow-y: visible !important;
}

/* Header action controls */
.batches-page .header-action-bar {
    gap: 0.75rem;
}

.batches-page .search-input-wrapper {
    min-width: 240px;
}

.batches-page .search-input-wrapper .input-group-text {
    background-color: #f1f3f5;
    border-right: 0;
}

.batches-page .search-input-wrapper .form-control {
    border-left: 0;
    box-shadow: none;
}

/* Three-dots actions menu */
.batches-page .actions-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e5ed;
    background-color: #fff;
    transition: all 0.2s ease;
    color: #15487B;
}

.batches-page .actions-menu-btn:hover,
.batches-page .actions-menu-btn:focus {
    border-color: #15487B;
    box-shadow: 0 6px 16px rgba(21, 72, 123, 0.15);
}

.batches-page .dropdown-menu.actions-menu {
    min-width: 240px;
    border-radius: 14px;
    border: 1px solid #eef1f6;
    padding: 0.35rem;
}

.batches-page .dropdown-menu.actions-menu .dropdown-item {
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
}

.batches-page .dropdown-menu.actions-menu .dropdown-item i {
    font-size: 1rem;
    color: #15487B;
}

.batches-page .dropdown-menu.actions-menu .dropdown-item.text-danger i {
    color: #dc3545;
}

.batches-page .dropdown-menu.actions-menu .dropdown-item.disabled,
.batches-page .dropdown-menu.actions-menu .dropdown-item:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.batches-page .dropdown-menu.actions-menu .dropdown-divider {
    margin: 0.35rem 0.2rem;
}

/* Calendar filter */
.batches-page .calendar-filter-card {
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.05), rgba(245, 122, 54, 0.06));
    border: 1px solid #e5e9f2;
    border-radius: 18px;
    padding: 1.25rem;
}

.batches-page .calendar-filter-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #15487B;
}

.batches-page .calendar-filter-card p {
    margin-bottom: 0.25rem;
    color: #4b5563;
}

.batches-page .calendar-filter-controls {
    gap: 0.75rem;
}

.batches-page .calendar-filter-controls input[type="date"] {
    min-width: 200px;
}

.batches-page .calendar-illustration {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #15487B;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   COMPACT CALENDAR CONTROLS FOR SIDEBAR
   ============================================ */

.batches-page .calendar-nav-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.batches-page .calendar-nav-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.batches-page .calendar-nav-row:first-child {
    justify-content: space-between;
}

.batches-page .btn-nav-compact {
    background: #fff;
    border: 1.5px solid #e1e5ed;
    color: #15487B;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.batches-page .btn-nav-compact:hover {
    background: #15487B;
    color: #fff;
    border-color: #15487B;
    transform: scale(1.05);
}

.batches-page .calendar-title-compact {
    font-size: 0.875rem;
    font-weight: 600;
    color: #15487B;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.5rem;
}

.batches-page .view-toggle-group-compact {
    display: flex;
    gap: 0.25rem;
    background: #f1f3f5;
    padding: 0.2rem;
    border-radius: 6px;
    flex: 1;
}

.batches-page .view-toggle-compact {
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.batches-page .view-toggle-compact:hover {
    background: rgba(21, 72, 123, 0.1);
    color: #15487B;
}

.batches-page .view-toggle-compact.active {
    background: #15487B;
    color: #fff;
    box-shadow: 0 2px 4px rgba(21, 72, 123, 0.2);
}

.batches-page .btn-today-compact {
    background: linear-gradient(135deg, #f57a36 0%, #ff8c4a 100%);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(245, 122, 54, 0.2);
}

.batches-page .btn-today-compact:hover {
    background: linear-gradient(135deg, #e66a26 0%, #f57a36 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 122, 54, 0.3);
}

.batches-page .date-input-compact {
    border: 1.5px solid #e1e5ed;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    flex: 1;
    transition: all 0.2s ease;
}

.batches-page .date-input-compact:focus {
    border-color: #15487B;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(21, 72, 123, 0.15);
}

.batches-page .btn-reset-compact {
    background: #fff;
    border: 1.5px solid #e1e5ed;
    color: #6c757d;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.batches-page .btn-reset-compact:hover:not(:disabled) {
    background: #f1f3f5;
    border-color: #cbd5e0;
    color: #15487B;
}

.batches-page .btn-reset-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.batches-page .calendar-header-days-sm {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.batches-page .calendar-header-day-sm {
    text-align: center;
    font-weight: 600;
    font-size: 0.65rem;
    color: #6c757d;
    text-transform: uppercase;
    padding: 0.25rem 0;
    letter-spacing: 0.5px;
}

.batches-page .calendar-grid-sm {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.batches-page .calendar-day-sm {
    aspect-ratio: 1;
    border: 1.5px solid #e9ecef;
    border-radius: 6px;
    padding: 0.3rem 0.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 32px;
    font-size: 0.7rem;
}

.batches-page .calendar-day-sm:hover {
    border-color: #15487B;
    background: rgba(21, 72, 123, 0.05);
}

.batches-page .calendar-day-sm.today {
    background: #15487B;
    color: #fff;
    border-color: #15487B;
    font-weight: 600;
}

.batches-page .calendar-day-sm.selected {
    background: rgba(21, 72, 123, 0.15) !important;
    color: #15487B;
    border-color: #15487B;
    border-width: 2px;
    font-weight: 600;
}

.batches-page .calendar-day-sm.has-batches {
    border-color: #15487B;
    border-width: 1.5px;
    background: rgba(21, 72, 123, 0.04);
}

.batches-page .calendar-day-sm.has-batches .batch-indicator-sm {
    position: absolute;
    bottom: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    background: #f57a36;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 600;
    color: #fff;
    padding: 0 3px;
}

.batches-page .calendar-day-number-sm {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
}

.batches-page .batch-indicator-sm {
    position: absolute;
    bottom: 2px;
    right: 2px;
    min-width: 12px;
    height: 12px;
    background: #f57a36;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 600;
    color: #fff;
    padding: 0 2px;
    line-height: 1;
}

.batches-page .calendar-day-sm.text-muted {
    opacity: 0.4;
    background: #f8f9fa;
}

/* Week View Styles */
.batches-page .week-view-container-sm {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.batches-page .week-day-column-sm {
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 150px;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.batches-page .week-day-column-sm:hover {
    border-color: #15487B;
}

.batches-page .week-day-column-sm.today {
    border-color: #15487B;
    background: rgba(21, 72, 123, 0.03);
}

.batches-page .week-day-column-sm.selected {
    border-color: #15487B;
    border-width: 2px;
    background: rgba(21, 72, 123, 0.08);
}

.batches-page .week-day-header-sm {
    text-align: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.batches-page .week-day-name-sm {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.batches-page .week-day-number-sm {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.batches-page .week-day-number-sm.today-badge-sm {
    background: #15487B;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.3rem;
    font-size: 0.8rem;
}

.batches-page .week-day-batch-count-sm {
    font-size: 0.65rem;
    color: #15487B;
    font-weight: 500;
}

.batches-page .week-day-content-sm {
    flex: 1;
    overflow-y: auto;
}

.batches-page .week-batch-item-sm {
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.05) 0%, rgba(21, 72, 123, 0.08) 100%);
    border-left: 2px solid #15487B;
    border-radius: 4px;
    padding: 0.35rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batches-page .week-batch-item-sm:hover {
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.1) 0%, rgba(21, 72, 123, 0.15) 100%);
    transform: translateX(2px);
}

.batches-page .week-batch-code-sm {
    font-weight: 600;
    color: #15487B;
    font-size: 0.65rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batches-page .week-more-batches-sm {
    text-align: center;
    color: #15487B;
    font-weight: 600;
    font-size: 0.65rem;
    padding: 0.3rem;
    background: rgba(21, 72, 123, 0.1);
    border-radius: 4px;
    margin-top: 0.25rem;
}

/* Day View Styles */
.batches-page .day-view-container-sm {
    margin-top: 0.5rem;
}

.batches-page .day-view-header-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #15487B 0%, #1e5a9e 100%);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.2);
}

.batches-page .day-view-day-name-sm {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.batches-page .day-view-date-full-sm {
    font-size: 0.75rem;
    opacity: 0.9;
}

.batches-page .day-view-stats-sm {
    display: flex;
    gap: 0.75rem;
}

.batches-page .day-stat-item-sm {
    text-align: center;
}

.batches-page .day-stat-value-sm {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.batches-page .day-stat-label-sm {
    font-size: 0.65rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.batches-page .day-view-batches-list-sm {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.batches-page .day-view-batches-list-sm::-webkit-scrollbar {
    width: 4px;
}

.batches-page .day-view-batches-list-sm::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.batches-page .day-batch-card-sm {
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.04) 0%, rgba(21, 72, 123, 0.08) 100%);
    border-left: 3px solid #15487B;
    border-radius: 6px;
    padding: 0.6rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batches-page .day-batch-card-sm:hover {
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.08) 0%, rgba(21, 72, 123, 0.12) 100%);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(21, 72, 123, 0.15);
}

.batches-page .day-batch-header-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.batches-page .day-batch-code-sm {
    font-weight: 600;
    color: #15487B;
    font-size: 0.8rem;
}

.batches-page .day-batch-info-sm {
    font-size: 0.7rem;
    color: #6c757d;
}

.batches-page .day-empty-state-sm {
    text-align: center;
    padding: 1.5rem;
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
}

/* ============================================
   SIDEBAR LAYOUT STYLES - COMPLETE REDESIGN
   ============================================ */

.batches-page .batches-layout-wrapper {
    display: flex;
    gap: 1.5rem;
    min-height: 600px;
}

/* Left Sidebar */
.batches-page .batches-sidebar {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    background: #fff;
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5ed;
}

.batches-page .batches-sidebar::-webkit-scrollbar {
    width: 6px;
}

.batches-page .batches-sidebar::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.batches-page .batches-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.batches-page .batches-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Sidebar Sections */
.batches-page .sidebar-section {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.batches-page .sidebar-section-header {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #15487B;
    font-weight: 600;
}

.batches-page .sidebar-filter-header {
    cursor: pointer;
    transition: background 0.2s ease;
}

.batches-page .sidebar-filter-header:hover {
    background: #e9ecef;
}

.batches-page .sidebar-section-body {
    padding: 1rem;
    background: #fff;
}

/* Calendar Section Specific */
.batches-page .calendar-section {
    flex-shrink: 0;
}

.batches-page .calendar-body {
    padding: 0.75rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Calendar Controls */
.batches-page .calendar-controls {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.batches-page .control-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.batches-page .btn-nav-sidebar {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #15487B;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.batches-page .btn-nav-sidebar:hover {
    background: #15487B;
    color: #fff;
    border-color: #15487B;
}

.batches-page .calendar-title-sidebar {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #15487B;
    padding: 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batches-page .view-toggles-sidebar {
    display: flex;
    gap: 0.25rem;
    background: #f1f3f5;
    padding: 0.2rem;
    border-radius: 6px;
    flex: 1;
}

.batches-page .view-btn-sidebar {
    flex: 1;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6c757d;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.batches-page .view-btn-sidebar:hover {
    background: rgba(21, 72, 123, 0.1);
    color: #15487B;
}

.batches-page .view-btn-sidebar.active {
    background: #15487B;
    color: #fff;
}

.batches-page .btn-today-sidebar {
    height: 28px;
    padding: 0 0.75rem;
    border: none;
    background: #f57a36;
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.batches-page .btn-today-sidebar:hover {
    background: #e66a26;
}

.batches-page .date-picker-sidebar {
    flex: 1;
    height: 28px;
    padding: 0 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.batches-page .date-picker-sidebar:focus {
    border-color: #15487B;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(21, 72, 123, 0.15);
}

.batches-page .btn-reset-sidebar {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.batches-page .btn-reset-sidebar:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #cbd5e0;
    color: #15487B;
}

.batches-page .btn-reset-sidebar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Calendar Views Wrapper */
.batches-page .calendar-views-wrapper {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.batches-page .calendar-view-sidebar {
    width: 100%;
    height: 100%;
    display: none;
}

.batches-page .calendar-view-sidebar[style*="block"] {
    display: block !important;
}

/* Month View */
.batches-page .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.batches-page .weekday {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    padding: 0.25rem 0;
}

.batches-page .calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.batches-page .calendar-day-sidebar {
    aspect-ratio: 1;
    min-height: 32px;
    border: 1.5px solid #e9ecef;
    border-radius: 6px;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-size: 0.7rem;
}

.batches-page .calendar-day-sidebar:hover {
    border-color: #15487B;
    background: rgba(21, 72, 123, 0.05);
}

.batches-page .calendar-day-sidebar.other-month {
    opacity: 0.4;
    background: #f8f9fa;
}

.batches-page .calendar-day-sidebar.is-today {
    background: #15487B;
    color: #fff;
    border-color: #15487B;
    font-weight: 600;
}

.batches-page .calendar-day-sidebar.is-selected {
    background: rgba(21, 72, 123, 0.15) !important;
    color: #15487B;
    border-color: #15487B;
    border-width: 2px;
    font-weight: 600;
}

.batches-page .calendar-day-sidebar.has-batches {
    border-color: #15487B;
}

.batches-page .day-number {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
}

.batches-page .batch-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    background: #f57a36;
    color: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0 3px;
    line-height: 1;
}

/* Week View */
.batches-page .week-view-sidebar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
    height: 100%;
    min-height: 300px;
}

.batches-page .week-day-sidebar {
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 250px;
}

.batches-page .week-day-sidebar:hover {
    border-color: #15487B;
}

.batches-page .week-day-sidebar.is-today {
    border-color: #15487B;
    background: rgba(21, 72, 123, 0.03);
}

.batches-page .week-day-sidebar.is-selected {
    border-color: #15487B;
    border-width: 2px;
    background: rgba(21, 72, 123, 0.08);
}

.batches-page .week-day-header {
    text-align: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.batches-page .week-day-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.batches-page .week-day-num {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.batches-page .week-day-num.today-circle {
    width: 24px;
    height: 24px;
    background: #15487B;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.25rem;
    font-size: 0.8rem;
}

.batches-page .week-batch-count {
    font-size: 0.65rem;
    color: #15487B;
    font-weight: 500;
}

.batches-page .week-day-batches {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.batches-page .week-day-batches::-webkit-scrollbar {
    width: 3px;
}

.batches-page .week-batch-sidebar {
    background: rgba(21, 72, 123, 0.08);
    border-left: 2px solid #15487B;
    border-radius: 4px;
    padding: 0.35rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.65rem;
    font-weight: 600;
    color: #15487B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batches-page .week-batch-sidebar:hover {
    background: rgba(21, 72, 123, 0.15);
    transform: translateX(2px);
}

.batches-page .week-more {
    text-align: center;
    color: #15487B;
    font-weight: 600;
    font-size: 0.65rem;
    padding: 0.3rem;
    background: rgba(21, 72, 123, 0.1);
    border-radius: 4px;
    margin-top: 0.25rem;
}

.batches-page .week-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 0.65rem;
    font-style: italic;
    padding: 0.5rem;
}

/* Day View */
.batches-page .day-view-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 300px;
}

.batches-page .day-header-sidebar {
    background: linear-gradient(135deg, #15487B 0%, #1e5a9e 100%);
    border-radius: 8px;
    padding: 0.75rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.batches-page .day-date-info {
    margin-bottom: 0.5rem;
}

.batches-page .day-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.batches-page .day-date {
    font-size: 0.75rem;
    opacity: 0.9;
}

.batches-page .day-stats {
    display: flex;
    gap: 1rem;
}

.batches-page .day-stat {
    text-align: center;
}

.batches-page .stat-num {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.batches-page .stat-text {
    font-size: 0.65rem;
    opacity: 0.85;
    text-transform: uppercase;
}

.batches-page .day-batches-sidebar {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.batches-page .day-batches-sidebar::-webkit-scrollbar {
    width: 4px;
}

.batches-page .day-batch-sidebar {
    background: rgba(21, 72, 123, 0.05);
    border-left: 3px solid #15487B;
    border-radius: 6px;
    padding: 0.6rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batches-page .day-batch-sidebar:hover {
    background: rgba(21, 72, 123, 0.1);
    transform: translateX(4px);
}

.batches-page .batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.batches-page .batch-code {
    font-weight: 600;
    color: #15487B;
    font-size: 0.8rem;
}

.batches-page .batch-status-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    background: #15487B;
    color: #fff;
    border-radius: 4px;
}

.batches-page .batch-info {
    font-size: 0.7rem;
    color: #6c757d;
}

.batches-page .day-empty {
    text-align: center;
    padding: 1.5rem;
    color: #9ca3af;
    font-size: 0.75rem;
    font-style: italic;
}

/* Today's Overview */
.batches-page .overview-section {
    flex-shrink: 0;
}

.batches-page .overview-body {
    padding: 0.75rem;
}

.batches-page .overview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.batches-page .overview-item:last-child {
    margin-bottom: 0;
}

.batches-page .overview-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.batches-page .overview-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.batches-page .overview-icon.batches-bg {
    background: rgba(21, 72, 123, 0.15);
    color: #15487B;
}

.batches-page .overview-icon.sessions-bg {
    background: rgba(245, 122, 54, 0.15);
    color: #f57a36;
}

.batches-page .overview-info {
    flex: 1;
    min-width: 0;
}

.batches-page .overview-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.batches-page .overview-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.batches-page .overview-value.batches-color {
    color: #15487B;
}

.batches-page .overview-value.sessions-color {
    color: #f57a36;
}

/* Table Caption Styling */
.batches-page .table-caption {
    caption-side: top;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.batches-page .table-caption > div {
    width: 100%;
}

/* ============================================
   OVERVIEW STATS STYLING
   ============================================ */

.batches-page .overview-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.batches-page .stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.03) 0%, rgba(21, 72, 123, 0.06) 100%);
    border-radius: 10px;
    border: 1px solid rgba(21, 72, 123, 0.1);
    transition: all 0.3s ease;
}

.batches-page .stat-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(21, 72, 123, 0.15);
    border-color: rgba(21, 72, 123, 0.2);
}

.batches-page .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.batches-page .stat-icon.batches-icon {
    background: linear-gradient(135deg, rgba(21, 72, 123, 0.15) 0%, rgba(21, 72, 123, 0.25) 100%);
    color: #15487B;
}

.batches-page .stat-icon.sessions-icon {
    background: linear-gradient(135deg, rgba(245, 122, 54, 0.15) 0%, rgba(245, 122, 54, 0.25) 100%);
    color: #f57a36;
}

.batches-page .stat-content {
    flex: 1;
    min-width: 0;
}

.batches-page .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.batches-page .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.batches-page .stat-value.batches-value {
    color: #15487B;
}

.batches-page .stat-value.sessions-value {
    color: #f57a36;
}

/* Filters Section */
.batches-page .sidebar-section:has(#advancedFilters) {
    flex-shrink: 0;
}

.batches-page .filter-arrow {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.batches-page [data-bs-toggle="collapse"][aria-expanded="true"] .filter-arrow {
    transform: rotate(180deg);
}

/* Filter Groups */
.batches-page .filter-group {
    margin-bottom: 0.75rem;
}

.batches-page .filter-group:last-child {
    margin-bottom: 0;
}

.batches-page .filter-group .form-label {
    margin-bottom: 0.4rem;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 600;
    display: block;
}

.batches-page .filter-group .form-label.tiny {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.batches-page .filter-group .form-select,
.batches-page .filter-group .form-control {
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1.5px solid #e1e5ed;
    transition: all 0.2s ease;
    padding: 0.4rem 0.5rem;
    width: 100%;
}

.batches-page .filter-group .form-select:focus,
.batches-page .filter-group .form-control:focus {
    border-color: #15487B;
    box-shadow: 0 0 0 0.15rem rgba(21, 72, 123, 0.15);
    outline: none;
}

/* Filter Actions */
.batches-page .filter-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.batches-page .filter-actions .btn {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
}

.batches-page .filter-actions .btn-primary {
    background: linear-gradient(135deg, #15487B 0%, #1e5a9e 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 6px rgba(21, 72, 123, 0.2);
}

.batches-page .filter-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(21, 72, 123, 0.3);
}

.batches-page .filter-actions .btn-outline-secondary {
    border: 1.5px solid #e1e5ed;
    color: #6c757d;
    background: #fff;
}

.batches-page .filter-actions .btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
    color: #495057;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .batches-page .batches-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .batches-page .calendar-body {
        min-height: 350px;
    }
    
    .batches-page .week-view-sidebar {
        min-height: 250px;
    }
}

/* Main Content Area */
.batches-page .batches-main-content {
    flex: 1;
    min-width: 0;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .batches-page .batches-sidebar {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
}

@media (max-width: 992px) {
    .batches-page .batches-layout-wrapper {
        flex-direction: column;
    }

    .batches-page .batches-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }

    .batches-page .batches-main-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .batches-page .batches-sidebar {
        padding: 0.75rem;
    }

    .batches-page .sidebar-section-header {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .batches-page .sidebar-section-body {
        padding: 0.75rem;
    }
}


