/* =============================================
   Bus Booking System - Custom Styles
   ============================================= */

:root {
    --sidebar-width: 255px;
    --sidebar-collapsed: 68px;
    --primary-color: #0d6efd;
    --secondary-color: #1a2543;
    --sidebar-bg: var(--secondary-color);
    --sidebar-hover: #253461;
    --sidebar-active: var(--primary-color);
    --sidebar-text: #8fa3c0;
    --top-nav-height: 64px;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    background: linear-gradient(135deg, #1a2543 0%, #1565c0 50%, #0d6efd 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 430px;
}

.login-card {
    border: none;
    border-radius: 18px;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease;
    box-shadow: 3px 0 15px rgba(0,0,0,0.15);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--top-nav-height);
    overflow: hidden;
}

.sidebar-brand-icon {
    color: #fff;
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.sidebar-brand-text {
    overflow: hidden;
    transition: opacity 0.25s, width 0.3s;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
}

.sidebar-brand-text h6 {
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.3;
}

.sidebar-brand-text small {
    color: var(--sidebar-text);
    font-size: 0.72rem;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.sidebar-nav .nav-item { margin: 1px 8px; }

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    border-radius: 9px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.nav-label {
    transition: opacity 0.2s, width 0.3s;
    overflow: hidden;
}

.sidebar.collapsed .nav-label {
    opacity: 0;
    width: 0;
}

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer .nav-link {
    color: var(--sidebar-text);
    border-radius: 9px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sidebar-footer .nav-link:hover {
    background: rgba(220,53,69,0.15);
    color: #f87d7d;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f0f2f7;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

/* =============================================
   TOP NAVIGATION
   ============================================= */
.top-nav {
    background: #fff;
    height: var(--top-nav-height);
    padding: 0 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: #64748b;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    /* WCAG 2.5.5: 44×44 minimum touch target */
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-sidebar-btn:hover {
    background: #f1f5f9;
    color: #1a2543;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2543;
    margin: 0;
    margin-left: 12px;
}

/* =============================================
   CONTENT AREA
   ============================================= */
.content-area {
    padding: 24px;
    flex: 1;
}

/* =============================================
   STAT CARDS
   ============================================= */
.stat-card {
    border: none;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.1) !important;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1a2543;
}

.stat-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

/* =============================================
   CARDS & TABLES
   ============================================= */
.table-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
}

.table-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table th {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0 !important;
    white-space: nowrap;
    padding: 12px 16px;
    background: #f8fafc;
}

.table td {
    vertical-align: middle;
    font-size: 0.88rem;
    padding: 12px 16px;
    border-color: #f1f5f9;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

.action-btns .btn {
    padding: 4px 9px;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Sticky actions column on tables that opt-in */
.table-sticky-actions th:last-child,
.table-sticky-actions td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
}
.table-sticky-actions thead th:last-child {
    background: #f8fafc;
}
.table-sticky-actions tbody tr:hover td:last-child {
    background: #f8fafc;
}
/* Shadow separator when table is scrolled */
.table-sticky-actions th:last-child,
.table-sticky-actions td:last-child {
    box-shadow: -3px 0 8px -2px rgba(0,0,0,0.08);
}

/* =============================================
   SECTION HEADING
   ============================================= */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-heading h4 {
    font-weight: 700;
    color: #1a2543;
    margin: 0;
    font-size: 1.2rem;
}

/* =============================================
   FILTER BAR
   ============================================= */
.filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

/* =============================================
   AVAILABILITY CARDS
   ============================================= */
.capacity-bar {
    height: 7px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 6px 0;
}

.capacity-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* =============================================
   CALENDAR
   ============================================= */
.calendar-container {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.calendar-header {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    text-align: center;
    padding: 10px 6px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #64748b;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    min-height: 90px;
    padding: 7px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s;
    cursor: pointer;
}

.calendar-day:hover { background: #e8f4ff; }
.calendar-day.other-month { opacity: 0.35; background: #f8fafc; }
.calendar-day.has-bookings {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    box-shadow: inset 0 0 0 1px #fcd34d;
}
.calendar-day.has-bookings .day-number { color: #92400e; }

.calendar-day.today .day-number {
    background: var(--sidebar-active);
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.day-number {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1a2543;
    line-height: 26px;
}

.calendar-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 3px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(245,158,11,0.4);
}

.calendar-seats-text {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 2px;
}

/* =============================================
   REPORTS
   ============================================= */
.report-section { display: none; }
.report-section.active { display: block; }

.nav-tabs .nav-link {
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    font-weight: 700;
}

/* =============================================
   TOASTS
   ============================================= */
.toast-container { z-index: 11000; }

.toast {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 280px;
}

/* =============================================
   MODALS
   ============================================= */
.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 2.8rem;
    margin-bottom: 10px;
    opacity: 0.5;
    display: block;
}

/* =============================================
   UTILITIES
   ============================================= */
.cursor-pointer { cursor: pointer; }
.fs-07 { font-size: 0.7rem; }
.fs-085 { font-size: 0.85rem; }

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #c1cdd9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease, width 0.3s ease;
        width: var(--sidebar-width) !important;
    }

    .sidebar.mobile-visible {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .calendar-day {
        min-height: 55px;
        padding: 4px;
    }

    .content-area {
        padding: 12px;
        padding-bottom: 80px; /* space for bottom nav */
    }

    /* Compact top nav */
    .top-nav {
        padding: 0 12px;
        height: 56px;
    }
    .page-title { font-size: 1rem; }
    .top-nav .badge, .top-nav .tenant-switcher-wrap { display: none !important; }
    .top-nav .dropdown .btn { padding: 4px 8px; }
    .top-nav #userDisplayName { display: none; }

    /* Full-height modals slide up from bottom */
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100%;
        min-height: auto;
        display: flex;
        align-items: flex-end;
    }
    .modal.show .modal-dialog { display: flex; align-items: flex-end; }
    .modal-content {
        border-radius: 22px 22px 0 0 !important;
        max-height: 92vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
    }
    /* Drag handle on mobile modals */
    .modal-header::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    .modal-header { padding-top: 22px; position: relative; }

    /* Prevent iOS input zoom (inputs must be 16px+) */
    input, select, textarea, .form-control, .form-select {
        font-size: 16px !important;
    }
    .form-label { font-size: 0.82rem; }

    /* Touch-friendly buttons — WCAG 2.5.5: 44×44px minimum */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 38px; }
    .action-btns .btn { min-height: 44px; min-width: 44px; padding: 8px 10px; font-size: 0.85rem; }

    /* Section heading: stack on mobile */
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Filter bar: compact padding */
    .filter-bar { padding: 12px; }
    .filter-bar .row { gap: 0; }

    /* Calendar: smaller day numbers */
    .calendar-header { padding: 12px 16px; }
    .calendar-day-header { font-size: 0.7rem; padding: 7px 2px; }
    .day-number { font-size: 0.78rem; }
    .calendar-badge { font-size: 0.6rem; padding: 1px 4px; }

    /* Stat cards: tighter */
    .stat-value { font-size: 1.5rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.1rem; }
    .stat-card .card-body { padding: 12px !important; }
}

@media (max-width: 576px) {
    .stat-value { font-size: 1.35rem; }
}

/* =============================================
   SIDEBAR BACKDROP (mobile overlay)
   ============================================= */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1039;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-backdrop.visible { display: block; }

/* =============================================
   BOTTOM NAVIGATION BAR
   ============================================= */
.bottom-nav {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        z-index: 1030;
        box-shadow: 0 -3px 16px rgba(0,0,0,0.09);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        height: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        cursor: pointer;
        color: #94a3b8;
        font-size: 0.58rem;
        font-weight: 600;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        padding: 6px 2px;
        background: none;
        border: none;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.15s;
        position: relative;
    }

    .bottom-nav-item i {
        font-size: 1.35rem;
        line-height: 1;
        transition: transform 0.15s;
    }

    .bottom-nav-item.active {
        color: var(--primary-color, #0d6efd);
    }

    .bottom-nav-item.active i {
        transform: translateY(-2px);
    }

    /* Active pill indicator */
    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 3px;
        background: var(--primary-color, #0d6efd);
        border-radius: 0 0 3px 3px;
    }
}

/* =============================================
   REPORT TABS — horizontal scroll on all screens
   ============================================= */
#reportTabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;  /* prevent cut-off active border */
}
#reportTabs::-webkit-scrollbar { display: none; }
#reportTabs .nav-item { flex-shrink: 0; }

/* =============================================
   MOBILE — additional targeted fixes
   ============================================= */
@media (max-width: 575px) {

    /* Report tabs: icon only to save space */
    .report-tab-btn .tab-label { display: none; }
    .report-tab-btn i { margin-right: 0 !important; }
    .report-tab-btn { padding: 10px 14px !important; font-size: 1rem; }

    /* Section heading: Add button full width */
    .section-heading { width: 100%; }
    .section-heading > .btn { width: 100%; justify-content: center; }

    /* Filter bar: each input full-width */
    .filter-bar .row > [class*="col-sm"],
    .filter-bar .row > [class*="col-md"] { width: 100%; }
    .filter-bar .row > .col-auto { width: auto; }
    .filter-bar .btn { min-width: 44px; }

    /* Bus P&L table: hide detail columns, keep key ones */
    #busplSummaryTable th.col-hide-xs,
    #busplSummaryTable td.col-hide-xs { display: none; }

    /* Expense detail table: compact */
    #reportExpenseDetailTable th.col-hide-xs,
    #reportExpenseDetailTable td.col-hide-xs { display: none; }

    /* Bus utilization table: hide less important columns */
    #reportUtilizationTable th.col-hide-xs,
    #reportUtilizationTable td.col-hide-xs { display: none; }

    /* Login card: tighter padding */
    .login-card .card-body { padding: 28px 20px !important; }

    /* Availability cards: full width */
    #availabilityContainer .col-md-4 { width: 100%; }

    /* Stat cards title: smaller */
    .stat-label { font-size: 0.7rem; }

    /* Dashboard recent bookings: compact */
    #recentBookingsTable td,
    #recentBookingsTable th { font-size: 0.78rem; padding: 8px 6px; }

    /* Bottom sheet modal footer: full-width buttons */
    .modal-footer { flex-direction: column-reverse; gap: 8px; }
    .modal-footer .btn { width: 100%; margin: 0 !important; }

    /* Table cards: remove border-radius on mobile edges */
    .table-card { border-radius: 12px; }

    /* Settings form: logo preview */
    #settingsLogoPreview img { max-width: 100%; }
}

/* =============================================
   SAFE-AREA + PWA STANDALONE MODE
   ============================================= */
@media (display-mode: standalone) {
    .top-nav {
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(var(--top-nav-height) + env(safe-area-inset-top, 0px));
    }
    .sidebar {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

/* =============================================
   TABLE SCROLL HINT (fade on right side)
   ============================================= */
.table-responsive {
    position: relative;
}
@media (max-width: 768px) {
    .table-card .table-responsive::after {
        content: '';
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 24px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
        border-radius: 0 0 12px 0;
    }
}

/* =============================================
   FILTER BAR MOBILE IMPROVEMENT
   ============================================= */
@media (max-width: 768px) {
    .filter-bar {
        border-radius: 12px;
        margin-bottom: 12px;
    }
    /* Ensure filter action buttons wrap on mobile */
    .filter-bar .row {
        flex-wrap: wrap;
    }
    /* Make date inputs readable */
    input[type="date"].form-control {
        min-width: 130px;
    }
}

/* =============================================
   CHANGE PASSWORD MODAL
   ============================================= */
@media (max-width: 575px) {
    #changePasswordModal .modal-dialog {
        max-width: 100% !important;
    }
}

/* =============================================
   APP SETTINGS — mobile
   ============================================= */
@media (max-width: 575px) {
    #section-settings .card-body .row {
        flex-direction: column;
    }
    #section-settings .card-body .col-md-6 {
        width: 100%;
    }
}

/* =============================================
   BOTTOM NAV ACTIVE STATE SYNC
   ============================================= */
.bottom-nav-item span {
    font-size: 0.6rem;
    line-height: 1.2;
    text-align: center;
}

/* =============================================
   TOUCH TARGETS — btn-close & misc
   ============================================= */
/* Modal close button — ensure 44px touch target */
.btn-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   BUS EXPENSE MODAL — responsive filter bar
   ============================================= */
@media (max-width: 575px) {
    /* Stack filters vertically inside busExpense modal */
    #busExpenseModal .modal-body > .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }
    #busExpenseModal .modal-body > .d-flex > div {
        width: 100%;
    }
    #busExpenseModal #busExpFilterYear,
    #busExpenseModal #busExpFilterMonth {
        width: 100% !important;
    }
    #busExpenseModal .modal-body > .d-flex > .ms-auto {
        margin-left: 0 !important;
        justify-content: space-between;
    }
}

/* =============================================
   TENANTS TABLE — responsive column hiding
   ============================================= */
/* Email and Phone already hidden via d-none d-sm-table-cell in HTML/JS */
/* On xs screens: reduce tenant table padding for tight fit */
@media (max-width: 575px) {
    #tenantsTableBody td,
    #tenantsTableBody th { padding: 8px 8px; font-size: 0.82rem; }
    /* Tenant code: monospace smaller */
    #tenantsTableBody code { font-size: 0.75rem; }
}

/* =============================================
   IOS / ANDROID — select tap highlight
   ============================================= */
select { -webkit-tap-highlight-color: transparent; }

/* =============================================
   MODAL — xl modals on mobile should scroll properly
   ============================================= */
@media (max-width: 768px) {
    .modal-xl .modal-dialog,
    .modal-lg .modal-dialog {
        max-height: 95vh;
    }
    /* Scrollable modal body for large modals */
    .modal-xl .modal-body,
    .modal-lg .modal-body {
        max-height: calc(95vh - 130px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* =============================================
   CALENDAR — touch friendly prev/next buttons
   ============================================= */
@media (max-width: 768px) {
    .calendar-header .btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* =============================================
   AVAILABILITY — cards grid on mobile
   ============================================= */
@media (max-width: 575px) {
    /* 1-column grid for availability cards */
    #availabilityContainer .row > [class*="col-"] {
        width: 100%;
    }
}

/* =============================================
   TABLE TD — prevent text overflow on mobile
   ============================================= */
@media (max-width: 575px) {
    .table td, .table th {
        padding: 10px 10px;
    }
    /* Wrap long customer names / org names gracefully */
    .table td { word-break: break-word; max-width: 0; }
    /* But keep action column from wrapping */
    .table td.action-btns { word-break: normal; max-width: none; white-space: nowrap; }
}

