* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navbar Styles - Mobile First */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
}

.nav-logo i {
    font-size: 1.2rem;
}

.nav-logo h2 {
    font-size: 0.85rem;
    font-weight: 700;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 0.75rem;
    border: none;
    background: none;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
}

.btn-logout, .btn-customer {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-logout:hover, .btn-customer:hover {
    background: white;
    color: #667eea;
}

.dashboard-container {
    max-width: 1600px;
    margin: 1rem auto;
    padding: 0 12px;
}

/* Sync Status */
.sync-status {
    background: white;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #22c55e;
    font-size: 0.75rem;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.welcome-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.3rem;
}

.welcome-subtitle {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.75rem;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.stat-icon.bookings { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-icon.revenue { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-icon.customers { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.rooms { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-label {
    color: #666;
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

/* Content Sections */
.content-section {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Controls Layout */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.block-management {
    margin-right: 0;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 0;
    font-size: 0.8rem;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    border: 1px solid #e5e7eb;
    top: 100%;
    right: 0;
    margin-top: 5px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    color: #333;
    padding: 10px 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0;
}

.text-danger {
    color: #ef4444 !important;
}

.text-danger:hover {
    background: #fef2f2 !important;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 3px;
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.view-btn.active {
    background: #667eea;
    color: white;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.nav-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.current-week {
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
    text-align: center;
    min-width: 120px;
}

.bookings-view {
    display: none;
}

.bookings-view.active {
    display: block;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.75rem;
}

.data-table th,
.data-table td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.7rem;
}

/* Status Badges */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-confirmed { background: #dcfce7; color: #16a34a; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-cancelled { background: #fee2e2; color: #dc2626; }
.status-available { background: #e0f2fe; color: #0891b2; }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-edit { background: #667eea; color: white; }
.btn-delete { background: #ef4444; color: white; }
.btn-confirm { background: #22c55e; color: white; }
.btn-cancel { background: #ef4444; color: white; }
.btn-pending { background: #f59e0b; color: white; }

/* Search Bar */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8rem;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.date-filter {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Schedule Timeline */
.schedule-timeline {
    margin-top: 1rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
    background: #f8f9fa;
    transition: all 0.3s;
}

.timeline-item.active {
    border-left-color: #667eea;
    background: #f0f4ff;
}

.timeline-item.upcoming {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.timeline-item.pending {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.timeline-time {
    font-weight: 700;
    color: #333;
    min-width: 80px;
    font-size: 0.8rem;
}

.timeline-content {
    flex: 1;
    margin-left: 0.75rem;
}

.timeline-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.2rem 0;
}

.timeline-content p {
    font-size: 0.75rem;
    color: #666;
    margin: 0 0 0.2rem 0;
}

.timeline-content .price {
    font-weight: 600;
    color: #22c55e;
    font-size: 0.8rem;
}

/* Calendar Table - Mobile Optimized */
.schedule-container {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 0.7rem;
}

.schedule-header {
    background: #f8f9fa;
    border-bottom: 2px solid #d1d5db;
}

.schedule-header th {
    padding: 10px 4px;
    text-align: center;
    font-weight: 600;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    min-width: 80px;
}

.schedule-header th:first-child {
    min-width: 70px;
    background: #f1f5f9;
}

.date-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.date-mongolian {
    font-size: 0.7rem;
    color: #666;
    font-weight: 600;
}

.date-number {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.date-day {
    font-size: 0.6rem;
    color: #666;
}

.today-header {
    background: #fff3cd !important;
}

.today-header .date-number {
    background: #f59e0b;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.time-cell {
    padding: 10px 4px;
    text-align: center;
    font-weight: 600;
    background: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.7rem;
}

.slot-cell {
    padding: 4px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    position: relative;
}

.booking-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    min-height: 40px;
}

.booking-slot.available {
    background: #22c55e;
    color: white;
}

.booking-slot.confirmed {
    background: #3b82f6;
    color: white;
}

.booking-slot.pending {
    background: #f59e0b;
    color: white;
}

.booking-slot.cancelled {
    background: #ef4444;
    color: white;
}

.booking-slot.blocked {
    background: #6b7280;
    color: white;
}

.price {
    font-size: 0.6rem;
    opacity: 0.9;
}

.empty-cell {
    height: 40px;
    background: #fafbfc;
}

/* Customer and Booking Info */
.booking-datetime {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.booking-date {
    font-weight: 600;
    color: #333;
    font-size: 0.75rem;
}

.booking-time {
    font-size: 0.65rem;
    color: #666;
}

.customer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-name {
    font-weight: 600;
    color: #333;
    font-size: 0.75rem;
}

.customer-email {
    font-size: 0.65rem;
    color: #666;
}

.price-cell {
    font-weight: 600;
    color: #22c55e;
    font-size: 0.75rem;
}

/* Revenue Summary */
.revenue-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

.revenue-card {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.revenue-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #22c55e;
}

.revenue-label {
    color: #666;
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 1.25rem;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.close {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #333;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Blocked slots table */
.blocked-slots-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.blocked-slots-table th,
.blocked-slots-table td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

.blocked-slots-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    .nav-logo h2 {
        font-size: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    .btn-logout, .btn-customer {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    .btn-logout i, .btn-customer i {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-toggle,
    .week-nav {
        width: 100%;
        justify-content: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-input,
    .date-filter {
        width: 100%;
    }
    
    .revenue-summary {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.65rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .action-btn {
        width: 100%;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 0 8px;
    }
    
    .sync-status {
        font-size: 0.7rem;
        padding: 8px;
    }
    
    .welcome-text {
        font-size: 1rem;
    }
    
    .welcome-subtitle {
        font-size: 0.7rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }
}




/* Responsive Booking Table - Keep All Columns */
@media (max-width: 768px) {
    /* Enable horizontal scrolling */
    #bookingsTableView {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px; /* Extend to screen edges */
        padding: 0 12px;
    }
    
    /* Set minimum width for table */
    .data-table {
        min-width: 700px;
        font-size: 0.65rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px;
        white-space: nowrap; /* Prevent text wrapping */
    }
    
    /* Make columns more compact but readable */
    .data-table th:nth-child(1),
    .data-table td:nth-child(1) {
        min-width: 85px; /* Date/Time */
    }
    
    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        min-width: 100px; /* Customer */
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        min-width: 80px; /* Service */
    }
    
    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        min-width: 60px; /* Price */
    }
    
    .data-table th:nth-child(5),
    .data-table td:nth-child(5) {
        min-width: 70px; /* Status */
    }
    
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        min-width: 90px; /* Actions */
    }
    
    /* Compact customer info */
    .customer-name {
        font-size: 0.7rem;
    }
    
    .customer-email {
        font-size: 0.6rem;
    }
    
    /* Compact date/time */
    .booking-date {
        font-size: 0.7rem;
    }
    
    .booking-time {
        font-size: 0.6rem;
    }
    
    /* Status badges */
    .status-badge {
        padding: 3px 6px;
        font-size: 0.6rem;
    }
    
    /* Action buttons */
    .action-btn {
        padding: 4px 6px;
        font-size: 0.6rem;
    }
    
    /* Price */
    .price-cell {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    /* Ultra compact for small phones */
    .data-table {
        min-width: 650px;
        font-size: 0.6rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 5px 3px;
    }
    
    .customer-name,
    .booking-date {
        font-size: 0.65rem;
    }
    
    .customer-email,
    .booking-time {
        font-size: 0.55rem;
    }
    
    .action-btn {
        padding: 3px 5px;
        font-size: 0.55rem;
    }
    
    .status-badge {
        font-size: 0.55rem;
        padding: 2px 5px;
    }
}

/* Add scroll indicator hint */
@media (max-width: 768px) {
    #bookingsTableView::after {
        content: '← Гүйлгэнэ үү →';
        display: block;
        text-align: center;
        color: #999;
        font-size: 0.7rem;
        padding: 8px 0;
        font-style: italic;
    }
    
    /* Hide scroll hint when scrolled */
    #bookingsTableView.scrolled::after {
        display: none;
    }
}

/* TABLE RESPONSIVE WRAPPER - UNIVERSAL SOLUTION */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .table-responsive {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .table-responsive .data-table {
        min-width: 700px;
        font-size: 0.65rem;
        margin-bottom: 0;
    }
    
    .table-responsive .data-table th,
    .table-responsive .data-table td {
        padding: 6px 4px;
        white-space: nowrap;
    }
    
    .table-responsive .action-btn {
        padding: 4px 7px;
        font-size: 0.6rem;
    }
    
    .table-responsive .status-badge {
        padding: 3px 7px;
        font-size: 0.6rem;
    }
    
    /* Scroll indicator */
    .table-responsive::after {
        content: '← Хажуу тийш гүйлгэнэ үү →';
        display: block;
        text-align: center;
        color: #999;
        font-size: 0.7rem;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .table-responsive .data-table {
        min-width: 650px;
        font-size: 0.6rem;
    }
    
    .table-responsive .data-table th,
    .table-responsive .data-table td {
        padding: 5px 3px;
    }
    
    .table-responsive .action-btn {
        padding: 3px 6px;
        font-size: 0.55rem;
    }
}


/* STICKY FIRST COLUMN - FREEZE SERVICE NAME */
@media (max-width: 768px) {
    .table-responsive {
        position: relative;
    }
    
    /* Freeze first column (Service name) */
    .table-responsive .data-table th:first-child,
    .table-responsive .data-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 10;
        background: white;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* Header first column styling */
    .table-responsive .data-table th:first-child {
        background: #f8f9fa;
        z-index: 11;
        font-weight: 600;
    }
    
    /* Add extra padding to first column for better readability */
    .table-responsive .data-table th:first-child,
    .table-responsive .data-table td:first-child {
        padding-left: 8px;
        padding-right: 12px;
        min-width: 120px;
        max-width: 150px;
    }
    
    /* Make sure text doesn't overflow */
    .table-responsive .data-table td:first-child {
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .table-responsive .data-table th:first-child,
    .table-responsive .data-table td:first-child {
        min-width: 100px;
        max-width: 120px;
        padding-left: 6px;
        padding-right: 10px;
    }
}


/* FREEZE TIME COLUMN IN SCHEDULE CALENDAR */
@media (max-width: 768px) {
    /* Make schedule container scrollable */
    .schedule-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Freeze first column (Time) */
    .schedule-table .time-cell {
        position: sticky !important;
        left: 0;
        z-index: 20;
        background: #f8f9fa;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* Also freeze the first header cell (Цаг) */
    .schedule-header th:first-child {
        position: sticky !important;
        left: 0;
        z-index: 21;
        background: #f1f5f9;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* Ensure time column has proper width */
    .schedule-table .time-cell,
    .schedule-header th:first-child {
        min-width: 70px;
        max-width: 70px;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Make sure table doesn't compress */
    .schedule-table {
        min-width: 800px;
    }
    
    /* Add scroll indicator */
    .schedule-container::after {
        content: '← Хажуу тийш гүйлгэнэ үү →';
        display: block;
        text-align: center;
        color: #999;
        font-size: 0.7rem;
        padding: 8px 0;
        font-style: italic;
    }
}


@media (max-width: 480px) {
    .schedule-table {
        min-width: 750px;
    }
    
    .schedule-table .time-cell,
    .schedule-header th:first-child {
        min-width: 60px;
        max-width: 60px;
        font-size: 0.65rem;
    }
}

