* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Override main-content padding for scheduler page */
.main-content {
    padding: 0 !important;
}

.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    overflow: hidden;
    max-width: 100%;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
}

.admin-controls {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover {
    background: #4a5568;
    transform: translateY(-2px);
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Sidebar Styles */
.employee-sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    background: #f7fafc;
    border-left: 1px solid #e2e8f0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    flex-grow: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    order: 2;
}

.scheduler-main {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: auto;
    order: 1;
    min-width: 0;
    max-width: calc(100% - 250px);
    height: 100%;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.sidebar-header h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.week-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.week-nav-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.2s ease;
    padding: 0;
}

.week-nav-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
}

.week-nav-btn:active {
    transform: scale(0.95);
}

.week-nav-btn i {
    font-size: 0.75rem;
}

.week-selector {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #2d3748;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.week-selector:hover {
    border-color: #cbd5e0;
}

.week-selector:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.week-highlight-toggle {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.auto-schedule-btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.auto-schedule-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
}

.auto-schedule-btn:active {
    transform: translateY(0);
}

.auto-schedule-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auto-schedule-btn i {
    font-size: 1rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    color: #4a5568;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3182ce;
    flex-shrink: 0;
}

.toggle-text {
    font-weight: 500;
    color: #2d3748;
}

.toggle-label:hover .toggle-text {
    color: #1a202c;
}

.employee-list {
    padding: 10px;
}

.employee-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.employee-item:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.draggable-employee {
    cursor: grab;
    transition: all 0.2s ease;
    -webkit-user-drag: element;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.draggable-employee:active {
    cursor: grabbing;
}

.draggable-employee:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.employee-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    pointer-events: none;
}

.employee-info {
    flex: 1;
    pointer-events: none;
}

.employee-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    margin-bottom: 2px;
    pointer-events: none;
}

.employee-hours {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    margin-top: 4px;
    pointer-events: none;
}

.hours-value {
    font-weight: 600;
    color: #2d3748;
}

.hours-value.low-hours {
    color: #dc2626;
    font-weight: 700;
}

.hours-label {
    color: #718096;
    font-size: 0.7rem;
}

.hours-warning {
    color: #dc2626;
    font-size: 0.8rem;
    margin-left: 2px;
    cursor: help;
}

.employee-item.needs-more-hours {
    border-left: 3px solid #dc2626;
    background: linear-gradient(90deg, #fef2f2 0%, #ffffff 100%);
}

.employee-item.needs-more-hours:hover {
    background: linear-gradient(90deg, #fee2e2 0%, #f7fafc 100%);
}

.employee-status {
    font-size: 0.8rem;
    color: #718096;
    text-transform: capitalize;
    pointer-events: none;
}

/* Disconnect Zone */
.disconnect-zone {
    margin: 10px;
    padding: 15px;
    background: #fef2f2;
    border: 2px dashed #fca5a5;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.disconnect-zone:hover {
    background: #fecaca;
    border-color: #f87171;
    opacity: 1;
}

.disconnect-zone.drag-over {
    background: #fecaca;
    border-color: #ef4444;
    border-style: solid;
    opacity: 1;
    transform: scale(1.02);
}

.disconnect-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.disconnect-icon {
    font-size: 1.2rem;
}

.disconnect-text {
    font-size: 0.8rem;
    color: #dc2626;
    font-weight: 500;
}

.calendar-view {
    background: transparent;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    height: fit-content;
}

.calendar-view h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.calendar-controls h3 {
    color: #4a5568;
    font-size: 1.5rem;
}

.nav-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background: #2c5aa0;
}

.admin-calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 2px;
    background: #f7fafc;
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    max-width: none;
    align-content: start;
    -webkit-box-align: start;
    -webkit-align-content: start;
}

.admin-day-header {
    background: #2d3748;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
    height: auto;
}

.admin-calendar-day {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    min-height: 100px !important;
    max-height: none !important;
    height: auto !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    align-self: stretch;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    overflow: visible !important;
}

.admin-calendar-day.other-month {
    color: #a0aec0;
    background: #f7fafc;
}

.admin-calendar-day.selected-week {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.admin-calendar-day.selected-week .admin-day-number {
    color: #1e40af;
    font-weight: 700;
}

.availability-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38a169;
}

.admin-day-number {
    font-size: 0.9rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 2px;
    flex-shrink: 0;
    height: auto;
}

.admin-scheduled-names {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px;
    width: 100%;
    margin-top: 2px;
    justify-content: flex-start;
    flex-shrink: 0 !important;
    flex-grow: 1 !important;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    min-height: fit-content !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* Container for connected employees */
.connected-employees {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 2px;
    align-items: center;
    width: 100%;
}

.shift-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 2px;
}

.shift-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    background: rgba(74, 85, 104, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    margin-bottom: 1px;
}

.morning-shift .shift-label {
    background: rgba(49, 130, 206, 0.1);
    color: #2c5aa0;
}

.evening-shift .shift-label {
    background: rgba(237, 137, 54, 0.1);
    color: #c05621;
}

.admin-scheduled-name {
    background: #e2e8f0;
    color: #000000;
    border: 1px solid #cbd5e0;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: 18px;
    position: relative;
    flex-shrink: 0;
    display: block;
}

/* All booking types use the same grey style */

.admin-scheduled-name:hover {
    opacity: 0.8;
}

/* All booking types use the same light grey style as AM placeholder */
.admin-scheduled-name.recurring,
.admin-scheduled-name.large,
.admin-scheduled-name.basic,
.admin-scheduled-name.pending,
.admin-scheduled-name.confirmed {
    background: #e2e8f0;
    color: #000000;
    border: 1px solid #cbd5e0;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Styling for cleanings with connected employees */
.admin-scheduled-name.has-employee {
    border-left: 3px solid #10b981;
    background: linear-gradient(90deg, #f0fdf4 0%, #e2e8f0 100%);
}

.admin-scheduled-name.has-optimization {
    padding-right: 26px;
}

.admin-scheduled-name.has-understaffed {
    padding-right: 26px;
}

.admin-scheduled-name.has-optimization.has-understaffed {
    padding-right: 50px;
}

.admin-scheduled-name.first-cleaning-job {
    padding-left: 26px;
    border-right: 3px solid #f59e0b;
}

/* Styling for paid bookings - green background */
.admin-scheduled-name.paid {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #10b981 !important;
    font-weight: 600;
}

.admin-scheduled-name.paid:hover {
    background: #a7f3d0 !important;
    opacity: 1;
}

/* Designated Cleaner Indicator Badge */
.designated-cleaner-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: help;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* Adjust position if first cleaning badge is present */
.admin-scheduled-name.first-cleaning-job .designated-cleaner-indicator {
    right: 28px; /* Move left to avoid overlap with first cleaning badge */
}

/* Adjust position if optimization badges are present */
.admin-scheduled-name.has-optimization .designated-cleaner-indicator {
    right: 28px; /* Move left to avoid overlap with optimization badge */
}

.admin-scheduled-name.has-understaffed .designated-cleaner-indicator {
    right: 28px; /* Move left to avoid overlap with understaffed badge */
}

.admin-scheduled-name.has-optimization.has-understaffed .designated-cleaner-indicator {
    right: 52px; /* Move further left if both badges are present */
}

.admin-scheduled-name.first-cleaning-job.has-optimization .designated-cleaner-indicator,
.admin-scheduled-name.first-cleaning-job.has-understaffed .designated-cleaner-indicator {
    right: 52px; /* Move further left if first cleaning + other badges */
}

.admin-scheduled-name.first-cleaning-job.has-optimization.has-understaffed .designated-cleaner-indicator {
    right: 76px; /* Move even further left if all badges are present */
}

.designated-cleaner-indicator:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    background: #2563eb;
}

.designated-cleaner-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.designated-cleaner-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.9);
}

.designated-cleaner-indicator:hover .designated-cleaner-tooltip {
    opacity: 1;
}

.optimization-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 5;
}

.optimization-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.4);
}

.optimization-badge i {
    pointer-events: none;
}

.optimization-tooltip {
    position: absolute;
    top: 24px;
    right: 0;
    background: #0f172a;
    color: #fff;
    font-size: 0.6rem;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.optimization-badge:hover .optimization-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.understaffed-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, right 0.2s ease;
    z-index: 5;
}

.understaffed-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
}

.understaffed-tooltip {
    position: absolute;
    top: 24px;
    right: 0;
    background: #991b1b;
    color: #fff;
    font-size: 0.6rem;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.understaffed-badge:hover .understaffed-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.first-cleaning-badge {
    position: absolute;
    top: 2px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 5;
}

.first-cleaning-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.first-cleaning-badge i {
    pointer-events: none;
}

.first-cleaning-tooltip {
    position: absolute;
    top: 24px;
    left: 0;
    background: #1f2937;
    color: #fff;
    font-size: 0.6rem;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.first-cleaning-badge:hover .first-cleaning-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Employee connection indicators */
.employee-connection {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 12px;
    margin: 2px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: grab;
    transition: all 0.2s ease;
    vertical-align: middle;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: element;
}

.employee-connection:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.employee-connection:active {
    cursor: grabbing;
}

.employee-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: white;
    flex-shrink: 0;
    pointer-events: none;
}

.employee-name-text {
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 500;
    pointer-events: none;
}

/* Drag feedback styles */
.admin-scheduled-name.drag-over {
    border: 2px solid #3182ce !important;
    box-shadow: 0 0 8px rgba(49, 130, 206, 0.3) !important;
    transform: scale(1.02) !important;
}

/* Conflict Animation */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
        transform: scale(1);
    }
}

/* Conflict warning styles */
.admin-scheduled-name.conflict-warning {
    border: 2px solid #dc2626 !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5) !important;
    background: linear-gradient(90deg, #fef2f2 0%, #e2e8f0 100%) !important;
}

/* Client Action Dropdown */
.client-action-dropdown {
    position: fixed;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 0;
    z-index: 1000;
    min-width: 220px;
    overflow: hidden;
}

.dropdown-header {
    padding: 12px 16px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #2d3748;
    background: white;
}

.dropdown-item:hover {
    background: #edf2f7;
    color: #1a202c;
}

.dropdown-item:active {
    background: #e2e8f0;
}

.dropdown-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #4a5568;
}

.dropdown-item:hover .dropdown-icon {
    color: #2d3748;
}

.dropdown-text {
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* Booking Context Menu */
.booking-context-menu {
    position: fixed;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 0;
    z-index: 3000;
    min-width: 180px;
    overflow: visible; /* Changed from hidden to visible so submenu can show */
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: #2d3748;
    background: white;
}

.context-menu-item:hover {
    background: #edf2f7;
    color: #1a202c;
}

.context-menu-item.danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.context-menu-item.danger:hover .context-menu-icon {
    color: #dc2626;
}

.context-menu-item:active {
    background: #e2e8f0;
}

.context-menu-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #4a5568;
}

.context-menu-item:hover .context-menu-icon {
    color: #2d3748;
}

.context-menu-text {
    font-weight: 500;
}

.context-menu-arrow {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: #4a5568;
    flex-shrink: 0;
}

.context-menu-item.has-submenu {
    position: relative !important;
}

.context-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 4px;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    z-index: 3001;
    padding: 0;
    overflow: hidden;
    visibility: visible;
    opacity: 1;
}

.context-submenu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.context-menu-item.has-submenu:hover .context-submenu,
.context-menu-item.has-submenu .context-submenu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.context-submenu .context-menu-item {
    padding: 12px 16px;
    border-radius: 0;
}

.context-submenu .context-menu-item:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.context-submenu .context-menu-item:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.context-menu-item.has-submenu:hover {
    background: #edf2f7;
}

/* Payment Link Modal Styles (for Scheduler2) */
.payment-link-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.payment-link-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.payment-link-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.payment-link-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-link-modal-header h2 i {
    color: #22c55e;
}

.payment-link-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.payment-link-close-btn:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.payment-link-modal-body {
    padding: 24px;
}

.payment-link-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.payment-link-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
}

.payment-link-detail:last-child {
    border-bottom: none;
}

.payment-link-detail .detail-label {
    font-weight: 600;
    color: #6b7280;
    min-width: 80px;
}

.payment-link-detail .detail-value {
    flex: 1;
    color: #1a1a1a;
    text-align: right;
}

.payment-link-edit-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.payment-link-edit-btn:hover {
    background: #e5e7eb;
    color: #1a1a1a;
    border-color: #d1d5db;
}

.payment-link-edit-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    font-size: 14px;
    color: #1a1a1a;
    background: white;
    outline: none;
}

.payment-link-edit-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.payment-link-edit-buttons {
    display: flex;
    gap: 4px;
}

.payment-link-save-btn,
.payment-link-cancel-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.payment-link-save-btn:hover {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.payment-link-cancel-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.payment-link-label {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.payment-link-input-group {
    display: flex;
    gap: 8px;
}

.payment-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #f9fafb;
}

.payment-link-copy-btn {
    background: #22c55e;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-link-copy-btn:hover {
    background: #16a34a;
}

.payment-link-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

.payment-link-test-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-link-test-btn:hover {
    background: #2563eb;
}

/* Client Selection Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 2001;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: #edf2f7;
    color: #2d3748;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #718096;
    pointer-events: none;
}

#clientSearchInput {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

#clientSearchInput:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.client-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 0.95rem;
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.client-item:hover {
    border-color: #3182ce;
    background: #f7fafc;
    transform: translateX(4px);
}

.client-info {
    flex: 1;
}

.client-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.client-details {
    font-size: 0.85rem;
    color: #718096;
}

.designated-cleaner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #3b82f6;
    width: fit-content;
}

.designated-cleaner-badge i {
    font-size: 0.75rem;
    color: #3b82f6;
}

.client-select-btn {
    padding: 6px 16px;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-select-btn:hover {
    background: #2c5aa0;
}

.no-clients-message {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 0.95rem;
}

/* Booking Details Modal */
.booking-details-modal {
    max-width: 1200px;
}

.booking-details-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
}

.client-info-box,
.employee-selection-box {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.info-box-header svg {
    width: 20px;
    height: 20px;
    color: #3182ce;
}

.info-box-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.info-box-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #718096;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
}

.designated-cleaner-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.designated-cleaner-info .info-label {
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 6px;
}

.designated-cleaner-info .info-label i {
    font-size: 0.85rem;
}

.designated-cleaner-value {
    color: #1e40af !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}

.booking-form-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-control:read-only {
    background: #edf2f7;
    cursor: not-allowed;
}

.time-selection-section {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.time-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.time-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-mode-btn svg {
    width: 16px;
    height: 16px;
}

.time-mode-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.time-mode-btn.active {
    background: #3182ce;
    border-color: #3182ce;
    color: white;
}

.time-input-section {
    padding: 16px;
    background: white;
    border-radius: 6px;
}

.recommended-time-display {
    text-align: center;
}

.rec-time-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #718096;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rec-time-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.rec-time-duration {
    font-size: 1rem;
    font-weight: 600;
    color: #3182ce;
    margin-bottom: 12px;
}

.rec-time-info {
    font-size: 0.8rem;
    color: #718096;
}

.rec-time-info strong {
    color: #10b981;
    font-weight: 700;
}

.auto-duration-display {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.auto-duration-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.auto-duration-info {
    font-size: 0.75rem;
    color: #718096;
    font-style: italic;
}

.manual-duration-toggle {
    margin-top: 12px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3182ce;
}

.checkbox-label span {
    user-select: none;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-actions button svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: #3182ce;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #2c5aa0;
}

.btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

@media (max-width: 1024px) {
    .booking-details-grid {
        grid-template-columns: 1fr;
    }
    
    .client-info-box {
        order: 1;
    }
    
    .booking-form-box {
        order: 2;
    }
    
    .employee-selection-box {
        order: 3;
    }
}

/* Employee Selection Styles */
.employee-selection-box {
    min-height: 400px;
}

.employee-selection-box .employee-selection-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-top: 8px;
}

.employee-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.employee-checkbox-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.employee-checkbox-item.selected {
    background: #e6f2ff;
    border-color: #3182ce;
}

.employee-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.employee-checkbox-item.selected .employee-checkbox {
    background: #3182ce;
    border-color: #3182ce;
}

.employee-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
    display: none;
}

.employee-checkbox-item.selected .employee-checkbox svg {
    display: block;
}

.employee-checkbox-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.employee-checkbox-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.employee-checkbox-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748;
}

.employee-checkbox-status {
    font-size: 0.75rem;
    color: #718096;
}

.employee-availability-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.status-dot-green {
    background: #10b981;
}

.status-dot-orange {
    background: #f59e0b;
}

.status-dot-red {
    background: #ef4444;
}

.status-text {
    line-height: 1;
}

.status-available .status-text {
    color: #10b981;
}

.status-busy .status-text {
    color: #f59e0b;
}

.status-unavailable .status-text {
    color: #ef4444;
}

.employee-bookings-list {
    margin-top: 8px;
    padding: 10px;
    background: #fff7ed;
    border-radius: 4px;
    border-left: 3px solid #f59e0b;
    border: 1px solid #fed7aa;
}

.booking-preview {
    margin-top: 8px;
}

.preview-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3182ce;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-label::before {
    content: '';
    width: 3px;
    height: 12px;
    background: #3182ce;
    border-radius: 2px;
}

.booking-preview-detail {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-left: 3px solid #3182ce !important;
}

.booking-preview-detail .booking-label {
    color: #1e40af;
}

.booking-preview-detail .booking-value {
    color: #1e3a8a;
}

.booking-preview-detail .booking-duration {
    color: #3182ce;
}

.booking-preview-detail .booking-client {
    color: #1e3a8a;
    border-top-color: #bfdbfe;
}

.booking-detail {
    font-size: 0.72rem;
    color: #92400e;
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: white;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #fed7aa;
}

.booking-detail:last-child {
    margin-bottom: 0;
}

.booking-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
}

.booking-label {
    font-weight: 600;
    color: #78350f;
    min-width: 35px;
}

.booking-value {
    color: #92400e;
    font-weight: 500;
}

.booking-duration {
    color: #ea580c;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.booking-client {
    font-weight: 600;
    color: #1e293b;
    margin-top: 2px;
    padding-top: 4px;
    border-top: 1px solid #fed7aa;
    font-size: 0.72rem;
}

.employee-checkbox-item.status-unavailable {
    opacity: 0.65;
    cursor: not-allowed;
    background: #fef2f2;
}

.employee-checkbox-item.status-unavailable:hover {
    border-color: #ef4444;
    background: #fee2e2;
    transform: none;
}

.employee-checkbox-item.status-unavailable .employee-checkbox {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.employee-checkbox-item.status-busy {
    border-left: 3px solid #f59e0b;
}

.employee-checkbox-item.status-busy:hover {
    border-left-color: #f59e0b;
}

.recommended-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    animation: pulse-green 2s ease-in-out infinite;
    align-self: flex-start;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6), 0 0 12px rgba(16, 185, 129, 0.3);
    }
}

.employee-checkbox-item:has(.recommended-badge) {
    border-color: #10b981;
    background: #f0fdf4;
}

.employee-selection-container::-webkit-scrollbar {
    width: 6px;
}

.employee-selection-container::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.employee-selection-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.employee-selection-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Custom Time Picker Styles (from clients.css) */
.time-picker {
    position: relative;
    width: 100%;
}

.time-picker .time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #2d3748;
}

.time-picker .time-display:hover {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.time-picker .time-display.active {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.time-picker .time-display .time-value {
    font-weight: 500;
    color: #2d3748;
}

.time-picker .time-display svg {
    color: #718096;
    transition: color 0.2s ease;
}

.time-picker .time-display:hover svg {
    color: #3182ce;
}

.time-picker .time-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 2002;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.time-picker .time-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.time-picker .time-slots {
    padding: 4px 0;
}

.time-picker .time-slot {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    color: #2d3748;
    border-bottom: 1px solid #f7fafc;
}

.time-picker .time-slot:last-child {
    border-bottom: none;
}

.time-picker .time-slot:hover {
    background: #edf2f7;
    color: #3182ce;
    font-weight: 500;
}

.time-picker .time-slot.selected {
    background: #3182ce;
    color: white;
    font-weight: 600;
}

.time-picker .time-slot:active {
    background: #2c5aa0;
    color: white;
}

/* Scrollbar styling for time dropdown */
.time-picker .time-dropdown::-webkit-scrollbar {
    width: 6px;
}

.time-picker .time-dropdown::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.time-picker .time-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.time-picker .time-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Safari/Mac specific fixes for calendar grid expansion */
@supports (-webkit-appearance:none) {
    .admin-calendar-grid {
        grid-template-rows: repeat(7, max-content) !important;
    }
    
    .admin-calendar-day {
        contain: none !important;
        will-change: auto !important;
    }
    
    .admin-scheduled-names {
        contain: none !important;
    }
}

/* Responsive Design */
/* Mobile Navigation Menu Toggle */
.nav-menu-toggle {
    position: relative;
    z-index: 100000;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 16px;
}

.nav-menu-toggle:hover {
    background: transparent;
    transform: scale(1.05);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
    height: 16px;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: #1d1d1f;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Selector Dropdown */
.nav-selector {
    position: fixed;
    top: 74px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px;
    z-index: 99999;
    display: none;
    flex-direction: column;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-selector.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(0, 115, 230, 0.1);
    color: #0073ea;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(0, 115, 230, 0.15);
    color: #0073ea;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    /* Show nav menu toggle on mobile */
    .nav-menu-toggle {
        display: flex !important;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .admin-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-calendar-grid {
        gap: 1px;
    }
    
    .admin-calendar-day {
        min-height: 60px;
        font-size: 0.8rem;
    }
    
    /* Hide employee sidebar on mobile */
    .employee-sidebar {
        display: none !important;
    }
    
    /* Adjust scheduler main to take full width on mobile */
    .scheduler-main {
        max-width: 100% !important;
    }
    
    .container {
        flex-direction: column;
    }
}

/* Auto-Scheduling Results Modal Styles */
.auto-schedule-summary {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.auto-schedule-summary h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.stat-success {
    background: #f0fdf4;
    border-color: #22c55e;
}

.stat-card.stat-optimized {
    background: #eff6ff;
    border-color: #3b82f6;
}

.stat-card.stat-skipped {
    background: #fef3c7;
    border-color: #f59e0b;
}

.stat-card.stat-error {
    background: #fee2e2;
    border-color: #ef4444;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.stat-card.stat-success .stat-value {
    color: #16a34a;
}

.stat-card.stat-optimized .stat-value {
    color: #2563eb;
}

.stat-card.stat-skipped .stat-value {
    color: #d97706;
}

.stat-card.stat-error .stat-value {
    color: #dc2626;
}

.stat-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

/* Issues Section */
.auto-schedule-issues {
    margin-bottom: 24px;
}

.auto-schedule-issues h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-schedule-issues h4 i {
    color: #f59e0b;
}

.issues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.issue-item {
    padding: 16px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f59e0b;
}

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.issue-booking {
    font-size: 1rem;
    color: #2d3748;
}

.issue-date {
    font-size: 0.875rem;
    color: #718096;
}

.issue-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.issue-type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.issue-type-badge.issue-type-skipped {
    background: #fef3c7;
    color: #d97706;
}

.issue-type-badge.issue-type-error {
    background: #fee2e2;
    color: #dc2626;
}

.issue-cleaning-type {
    font-size: 0.875rem;
    color: #718096;
    font-style: italic;
}

.issue-reason {
    margin-bottom: 8px;
    font-size: 0.9375rem;
    color: #2d3748;
    line-height: 1.5;
}

.issue-reason strong {
    color: #1d1d1f;
}

.issue-details {
    margin-top: 8px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
}

.issue-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.8125rem;
    color: #718096;
}

.issue-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Success Section */
.auto-schedule-success {
    margin-bottom: 24px;
}

.auto-schedule-success h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-schedule-success h4 i {
    color: #22c55e;
}

.success-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.success-item {
    padding: 16px;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
}

.success-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.success-booking {
    font-size: 1rem;
    color: #2d3748;
}

.success-action-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.success-action-badge.success-action-scheduled {
    background: #dbeafe;
    color: #2563eb;
}

.success-action-badge.success-action-optimized {
    background: #e0e7ff;
    color: #6366f1;
}

.success-employees {
    margin-top: 8px;
    font-size: 0.9375rem;
    color: #2d3748;
    line-height: 1.5;
}

.success-employees strong {
    color: #1d1d1f;
}

.success-date {
    margin-top: 4px;
    font-size: 0.875rem;
    color: #718096;
}

/* Empty State */
.auto-schedule-empty {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.auto-schedule-empty p {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auto-schedule-empty i {
    font-size: 1.25rem;
    color: #3182ce;
}

/* Record Payment Modal Styles */
.record-payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.record-payment-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.record-payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.record-payment-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.record-payment-modal-header h2 i {
    color: #a855f7;
}

.record-payment-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.record-payment-close-btn:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.record-payment-modal-body {
    padding: 24px;
}

.record-payment-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.record-payment-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.record-payment-detail:last-child {
    border-bottom: none;
}

.record-payment-form {
    margin-bottom: 20px;
}

.record-payment-form .form-group {
    margin-bottom: 16px;
}

.record-payment-form .form-label {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.record-payment-form .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #f9fafb;
    box-sizing: border-box;
}

.record-payment-form .form-input:focus {
    outline: none;
    border-color: #a855f7;
    background: white;
}

.record-payment-note {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #92400e;
}

.record-payment-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.record-payment-cancel-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.record-payment-cancel-btn:hover {
    background: #4b5563;
}

.record-payment-submit-btn {
    background: #a855f7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-payment-submit-btn:hover {
    background: #9333ea;
}

/* Dark mode for record payment modal */
[data-theme="dark"] .record-payment-modal {
    background: #1f2937;
    color: #f9fafb;
}

[data-theme="dark"] .record-payment-modal-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .record-payment-modal-header h2 {
    color: #f9fafb;
}

[data-theme="dark"] .record-payment-info {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .record-payment-detail {
    border-bottom-color: #374151;
}

[data-theme="dark"] .record-payment-form .form-input {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .record-payment-form .form-input:focus {
    border-color: #a855f7;
    background: #1f2937;
}

[data-theme="dark"] .record-payment-note {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}