:root {
    --primary-green: #2e7d32;
    --light-green: #4caf50;
    --dark-green: #1b5e20;
    --earth-brown: #8d6e63;
    --soil-brown: #a1887f;
    --light-bg: #f1f8e9;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --modal-bg: rgba(0, 0, 0, 0.5);
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #f9f9f9;
    color: var(--text-dark);
    line-height: 1.6;
    touch-action: pan-y;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    background-color: var(--primary-green);
    color: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo i {
    font-size: 28px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    padding: 0 15px;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.header h2 {
    color: var(--dark-green);
    font-weight: 600;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--light-green);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-green);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn i {
    margin-right: 8px;
}

/* Day Bulk Actions Button */
.day-bulk-action-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    display: none;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.day-header:hover .day-bulk-action-btn {
    display: block;
}

.day-bulk-action-btn:hover {
    background-color: var(--dark-green);
}

/* Weekly Schedule - HORIZONTAL LAYOUT */
.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.week-nav-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--primary-green);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
}

.week-nav-btn:hover {
    background-color: var(--light-bg);
}

.current-week {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-green);
}

/* Horizontal Days Grid - 7 DAYS */
.week-schedule-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-bottom: 30px;
}

.week-days-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 10px 10px 0 0;
    min-width: 1400px;
}

.time-header {
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.day-header {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day-header.today {
    background-color: var(--light-green);
}

.day-header.weekend {
    background-color: rgba(0, 0, 0, 0.1);
}

.day-date {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
    cursor: pointer;
    padding-right: 45px; /* Make space for the client count badge */
}

.day-date:hover {
    text-decoration: underline;
}

.day-total {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    z-index: 5;
}

.week-schedule-body {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    min-width: 1400px;
    position: relative;
}

.time-slots {
    border-right: 1px solid #eee;
    position: relative;
}

.time-slot {
    padding: 5px;
    border-bottom: 1px solid #eee;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.time-slot::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background-color: #eee;
}

.time-slot:nth-child(even)::after {
    background-color: #e0e0e0;
    height: 1px;
}

.time-slot:last-child::after {
    display: none;
}

.day-column {
    border-right: 1px solid #eee;
    position: relative;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 89px,
        #eee 89px,
        #eee 90px
    );
}

.day-column:last-child {
    border-right: none;
}

.day-column::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #f0f0f0;
    pointer-events: none;
}

.day-column::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 179px,
        #e0e0e0 179px,
        #e0e0e0 180px
    );
    pointer-events: none;
    z-index: 1;
}

.current-time-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #f44336;
    z-index: 10;
    pointer-events: none;
}

.current-time-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    background-color: #f44336;
    border-radius: 50%;
}

.day-slot {
    padding: 0;
    border-bottom: 1px solid #eee;
    height: 90px;
    position: relative;
}

.day-slot.empty {
    background-color: #fafafa;
}

/* Client Card in Schedule */
.schedule-client-card {
    background-color: var(--light-bg);
    border-radius: 6px;
    padding: 8px 10px;
    border-left: 4px solid var(--earth-brown);
    margin: 1px;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    left: 2px;
    right: 2px;
    overflow: visible !important;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    min-height: 45px;
    user-select: none;
    -webkit-user-select: none;
}

.schedule-client-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.schedule-client-card.dragging {
    opacity: 0.7;
    transform: scale(0.95);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.schedule-client-card.long-press {
    background-color: rgba(76, 175, 80, 0.15);
    border-color: var(--primary-green);
}

/* Save Time Button */
.save-time-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    display: none;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.schedule-client-card:hover .save-time-btn {
    display: block;
}

.save-time-btn:hover {
    background-color: var(--dark-green);
}

/* Desktop hover actions menu */
.client-actions-menu {
    position: absolute;
    top: -35px;
    right: 0;
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: row;
    z-index: 100;
    overflow: hidden;
    min-width: 180px;
    border: 1px solid #eee;
    padding: 4px;
}

.schedule-client-card:hover .client-actions-menu {
    display: flex;
}

.client-action-btn {
    padding: 6px 8px;
    background: none;
    border: none;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid #f5f5f5;
    transition: background-color 0.2s;
    width: 60px;
    min-height: 40px;
    justify-content: center;
}

.client-action-btn:last-child {
    border-right: none;
}

.client-action-btn:hover {
    background-color: var(--light-bg);
}

.client-action-btn i {
    margin-bottom: 3px;
    font-size: 12px;
    display: block;
}

.client-action-btn.edit i {
    color: var(--primary-green);
}

.client-action-btn.status i {
    color: #2196f3;
}

.client-action-btn.move i {
    color: #ff9800;
}

.client-action-btn span {
    font-size: 9px;
    line-height: 1.1;
    white-space: nowrap;
}

.client-name {
    font-weight: 600;
    color: var(--dark-green);
    font-size: 12px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.client-service {
    font-size: 11px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.client-service i {
    margin-right: 5px;
    color: var(--primary-green);
    font-size: 10px;
    flex-shrink: 0;
}

.client-time {
    font-size: 10px;
    color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
    margin-left: 8px;
    white-space: nowrap;
}

/* Status */
.status {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.status.scheduled {
    background-color: #e3f2fd;
    color: #2196f3;
}

.status.in-progress {
    background-color: #fff3e0;
    color: #ff9800;
}

.status.completed {
    background-color: #e8f5e9;
    color: var(--light-green);
}

.status.cancelled {
    background-color: #ffebee;
    color: #f44336;
}

.status.no-access {
    background-color: #f3e5f5;
    color: #9c27b0;
}

/* Action Menu for Mobile/Touch */
.client-action-menu-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 2000;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.client-action-menu-mobile.show {
    display: flex;
    transform: translateY(0);
}

.action-menu-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.action-menu-header h3 {
    color: var(--dark-green);
    font-size: 18px;
    margin-bottom: 5px;
}

.action-menu-header p {
    color: var(--text-light);
    font-size: 14px;
}

.action-menu-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-menu-btn {
    padding: 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.action-menu-btn:hover {
    background-color: var(--light-bg);
}

.action-menu-btn i {
    margin-right: 15px;
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.action-menu-btn.edit i {
    color: var(--primary-green);
}

.action-menu-btn.status i {
    color: #2196f3;
}

.action-menu-btn.move i {
    color: #ff9800;
}

.action-menu-btn.cancel {
    color: #f44336;
}

.action-menu-btn.cancel i {
    color: #f44336;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-green);
    font-size: 20px;
}

.stat-info h3 {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.stat-info .number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Modern Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: var(--success);
}

.notification.warning {
    background-color: var(--warning);
}

.notification.error {
    background-color: var(--error);
}

.notification.info {
    background-color: var(--info);
}

.notification i {
    margin-right: 10px;
    font-size: 18px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-container {
    background-color: var(--white);
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 10px 10px 0 0;
}

.modal-header h2 {
    color: var(--white);
}

.close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-green);
}

.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Drag and Drop Visual Feedback */
.drop-zone {
    min-height: 15px;
    background-color: rgba(76, 175, 80, 0.1);
    border: 2px dashed var(--light-green);
    border-radius: 4px;
    margin: 1px;
    transition: all 0.2s;
    z-index: 50;
}

.drop-zone.active {
    background-color: rgba(76, 175, 80, 0.2);
    border-color: var(--primary-green);
}

/* Time Estimation Styles */
.time-estimation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-dropdown {
    width: 100%;
}

/* Week Selection Styles */
.week-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.week-checkbox {
    flex: 1;
    min-width: 80px;
}

.week-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-radius: 5px;
    transition: all 0.2s;
}

.week-checkbox label:hover {
    background-color: #e0e0e0;
}

.week-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

/* Status Update Modal */
.status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.status-option {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    flex: 1;
}

.status-option:hover {
    border-color: var(--light-green);
    background-color: rgba(76, 175, 80, 0.05);
}

.status-option.selected {
    border-color: var(--primary-green);
    background-color: var(--light-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.status-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Bulk Day Status Update Modal */
.bulk-client-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
}

.bulk-client-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.bulk-client-item:last-child {
    border-bottom: none;
}

.bulk-client-info {
    flex: 1;
}

.bulk-client-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.bulk-client-service {
    font-size: 12px;
    color: var(--text-light);
}

.bulk-client-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Move Client Modal */
.move-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.move-option {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.move-option:hover {
    border-color: var(--light-green);
    background-color: var(--light-bg);
}

.move-option.selected {
    border-color: var(--primary-green);
    background-color: var(--light-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.move-option div:first-child {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--dark-green);
}

.move-option div:last-child {
    font-size: 12px;
    color: var(--text-light);
}

/* Move Type Selection */
.move-type-selection {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.move-type-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.move-type-option:last-child {
    margin-bottom: 0;
}

.move-type-option input {
    margin-right: 10px;
}

/* Currency Options */
.currency-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.currency-option {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 100px;
}

.currency-option.selected {
    border-color: var(--primary-green);
    background-color: var(--light-bg);
}

/* Settings Group */
.settings-group {
    margin-bottom: 30px;
}

.settings-group h3 {
    margin-bottom: 15px;
    color: var(--dark-green);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    /* Mobile top bar navigation instead of sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 60px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        border-radius: 0;
    }

    .logo {
        padding: 0;
        margin: 0;
        border-bottom: none;
    }

    .logo h1 {
        font-size: 18px;
    }

    .logo i {
        font-size: 22px;
    }

    .nav-menu {
        display: flex;
        padding: 0;
        margin: 0;
        gap: 15px;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        padding: 8px;
        border-radius: 8px;
    }

    .nav-menu a span {
        display: none; /* Hide text on mobile, show only icons */
    }

    .nav-menu a i {
        margin-right: 0;
        font-size: 20px;
    }

    /* Adjust main content for fixed top bar */
    .main-content {
        margin-top: 60px;
        padding: 15px 10px;
        width: 100%;
    }

    /* Container adjustment */
    .container {
        display: block;
    }

    /* Header adjustments */
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
    }

    .header-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .header-controls .btn-primary {
        width: 100%;
    }

    .user-info {
        display: none; /* Hide user info on mobile to save space */
    }

    /* Reduce hour height to show more hours vertically */
    .time-slot {
        height: 60px !important;
        font-size: 11px;
        padding: 2px;
    }
    
    /* Adjust day column grid lines */
    .day-column {
        background: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 59px,
            #eee 59px,
            #eee 60px
        );
    }
    
    .day-column::after {
        background: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 119px,
            #e0e0e0 119px,
            #e0e0e0 120px
        );
    }
    
    /* Make schedule container full width */
    .week-schedule-container {
        position: relative;
        margin: 0 -10px;
        width: calc(100% + 20px);
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Scroll hint */
    .week-schedule-container::before {
        content: '← → Swipe for more days';
        position: sticky;
        bottom: 5px;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 12px;
        color: white;
        background: rgba(46, 125, 50, 0.9);
        padding: 6px;
        border-radius: 20px;
        width: fit-content;
        margin: 5px auto;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        pointer-events: none;
        display: block;
    }
    
    /* Narrower columns to show more days */
    .week-days-header,
    .week-schedule-body {
        min-width: 1200px;
    }
    
    .day-header {
        min-width: 150px;
        padding: 10px 5px;
        font-size: 13px;
        min-height: 70px;
    }
    
    /* FIX: Move the client count badge UP by 5px to prevent overlap */
    .day-total {
        top: 5px; /* Changed from 10px to 5px (moved up by 5px) */
        right: 5px;
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* Add padding to day-date to prevent overlap with badge */
    .day-date {
        padding-right: 45px;
        margin-top: 8px; /* Slightly increased to create more separation */
        font-size: 12px;
    }
    
    .day-column {
        min-width: 150px;
    }
    
    /* Time column narrower */
    .time-slots {
        min-width: 60px;
    }
    
    .time-header {
        min-width: 60px;
        padding: 10px 2px;
        font-size: 11px;
    }
    
    /* Client cards more compact */
    .schedule-client-card {
        padding: 6px 5px;
        border-left-width: 4px;
        font-size: 10px;
        min-height: 35px;
        left: 1px;
        right: 1px;
    }
    
    .client-name {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .client-service {
        font-size: 9px;
    }
    
    .client-service i {
        font-size: 8px;
        margin-right: 2px;
    }
    
    .client-time {
        font-size: 8px;
        padding: 1px 3px;
        margin-left: 3px;
    }
    
    .status {
        padding: 1px 4px;
        font-size: 8px;
        margin-left: 3px;
    }
    
    /* Show save button on mobile */
    .save-time-btn {
        display: block !important;
        position: absolute;
        bottom: 2px;
        right: 2px;
        padding: 3px 5px;
        font-size: 8px;
        opacity: 0.9;
    }
    
    /* Highlight cards with temporary moves */
    .schedule-client-card:has(.save-time-btn) {
        background-color: #fff9c4;
        border-left-color: #ff9800;
    }
    
    /* Quick stats compact */
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-right: 8px;
    }
    
    .stat-info h3 {
        font-size: 10px;
    }
    
    .stat-info .number {
        font-size: 18px;
    }
    
    /* Week navigation compact */
    .week-navigation {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .week-nav-btn {
        font-size: 13px;
        padding: 6px 8px;
    }
    
    .current-week {
        font-size: 13px;
    }
    
    /* Header adjustments */
    .header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .header h2 {
        font-size: 18px;
    }
    
    .btn-primary {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Mobile instructions */
    .mobile-instructions {
        padding: 12px !important;
        margin-top: 15px !important;
        font-size: 13px !important;
    }
    
    .mobile-instructions ul {
        padding-left: 15px;
    }
    
    .mobile-instructions li {
        margin-bottom: 5px;
    }

    /* Show desktop instructions on mobile? No, hide it */
    .desktop-instructions {
        display: none !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .time-slot {
        height: 50px !important;
    }
    
    .day-column {
        background: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 49px,
            #eee 49px,
            #eee 50px
        );
    }
    
    .day-column::after {
        background: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 99px,
            #e0e0e0 99px,
            #e0e0e0 100px
        );
    }
    
    .week-days-header,
    .week-schedule-body {
        min-width: 1000px;
    }
    
    .day-header {
        min-width: 120px;
        font-size: 12px;
        min-height: 65px;
    }
    
    /* Further adjust badge position for very small screens */
    .day-total {
        top: 4px; /* Moved up by 1px more */
        right: 4px;
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .day-date {
        padding-right: 35px;
        margin-top: 10px;
        font-size: 11px;
    }
    
    .day-column {
        min-width: 120px;
    }
    
    .schedule-client-card {
        padding: 4px 3px;
    }
    
    .client-name {
        font-size: 10px;
    }
    
    .save-time-btn {
        padding: 2px 3px;
        font-size: 7px;
    }
}

/* Hide desktop elements on mobile */
@media (hover: none) and (pointer: coarse) {
    .client-actions-menu {
        display: none !important;
    }
    
    /* Show mobile instructions */
    .mobile-instructions {
        display: block !important;
    }
    
    /* Hide desktop instructions */
    .desktop-instructions {
        display: none !important;
    }
}