/* Client Management Toolbar */
.client-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0;
}

.search-container {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Sort Container */
.sort-container {
    position: relative;
    min-width: 200px;
}

.sort-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.sort-select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.sort-select:hover {
    border-color: #3b82f6;
}

.sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-add-client {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.btn-add-client:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-add-client:active {
    transform: translateY(0);
}

.btn-add-client i {
    font-size: 16px;
}

.add-client-chevron {
    font-size: 11px !important;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.add-client-dropdown-wrap.open .add-client-chevron {
    transform: rotate(180deg);
}

.add-client-dropdown-wrap {
    position: relative;
    flex-shrink: 0;
}

.add-client-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-width: min(320px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
    z-index: 1200;
    overflow: hidden;
}

.add-client-dropdown-form {
    display: flex;
    flex-direction: column;
    padding: 14px 16px 16px;
}

.add-client-dropdown-header {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.add-client-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.add-client-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #2c3e50;
    font-size: 14px;
    box-sizing: border-box;
}

.add-client-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

.add-client-field {
    margin-bottom: 12px;
}

.add-client-field:last-of-type {
    margin-bottom: 0;
}

.add-client-error {
    margin: 8px 0 0;
    min-height: 18px;
    font-size: 0.85rem;
    color: #dc2626;
}

.add-client-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.add-client-cancel,
.add-client-submit {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.add-client-cancel {
    background: #f3f4f6;
    color: #374151;
}

.add-client-cancel:hover {
    background: #e5e7eb;
}

.add-client-submit {
    background: #3b82f6;
    color: #fff;
}

.add-client-submit:hover {
    background: #2563eb;
}

.add-client-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.add-client-submit i {
    margin-right: 4px;
}

.main-content[data-theme="dark"] .add-client-dropdown {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.main-content[data-theme="dark"] .add-client-dropdown-header {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .add-client-label {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .add-client-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .add-client-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.main-content[data-theme="dark"] .add-client-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .add-client-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .add-client-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

.main-content[data-theme="dark"] .add-client-error {
    color: #fca5a5;
}

.btn-export-csv {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.btn-export-csv:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-export-csv:active {
    transform: translateY(0);
}

.btn-export-csv i {
    font-size: 16px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #656d76;
    white-space: nowrap;
}

.filter-label i {
    font-size: 16px;
    color: #3b82f6;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #656d76;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-btn.active i {
    color: white;
}

.filter-btn i {
    font-size: 16px;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #f3f4f6;
    color: #656d76;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Client List Container */
.client-list-container {
    background: transparent;
}

.client-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 5px;
}

/* Client cards — thin rail (single column, minimal chrome) */
.client-card {
    --cc-line: rgba(55, 53, 47, 0.09);
    --cc-text: rgba(50, 48, 44, 1);
    --cc-muted: rgba(120, 119, 116, 1);
    --cc-faint: rgba(70, 68, 64, 0.38);
    background: #fff;
    border: 1px solid var(--cc-line);
    border-radius: 3px;
    padding: 5px 7px 6px;
    transition: background 0.1s ease, border-color 0.1s ease;
    cursor: pointer;
    overflow: hidden;
}

.client-card:hover {
    background: rgba(55, 53, 47, 0.02);
    border-color: rgba(55, 53, 47, 0.12);
}

.client-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.client-name {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--cc-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 3px;
    align-items: center;
    margin: 0;
}

/* List cards: drop chip icons for a slimmer row */
.client-card .client-card-chips > .client-service-type i,
.client-card .client-card-chips > .next-cleaning-badge i,
.client-card .client-card-chips > .recurring-warning-badge i,
.client-card .client-card-chips > .client-side-badge i,
.client-card .client-card-chips > .client-chip-on-file i {
    display: none;
}

.client-card .client-card-chips > .client-service-type,
.client-card .client-card-chips > .next-cleaning-badge,
.client-card .client-card-chips > .recurring-warning-badge,
.client-card .client-card-chips > .client-side-badge,
.client-card .client-card-chips > .client-chip-on-file {
    gap: 0;
}

.client-chip-on-file {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(70, 68, 64, 0.88);
    background: rgba(55, 53, 47, 0.04);
    border: 1px solid rgba(55, 53, 47, 0.07);
}

.client-chip-on-file i {
    font-size: 8px;
    opacity: 0.7;
}

.client-chip-on-file--modal {
    padding: 4px 9px;
    font-size: 11px;
    margin-left: 6px;
}

.client-chip-on-file--modal i {
    display: inline-block;
    font-size: 10px;
}

.client-service-type {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.45;
    background: rgba(55, 53, 47, 0.04);
    color: rgba(55, 53, 47, 0.9);
    border: 1px solid rgba(55, 53, 47, 0.08);
}

.client-service-type i {
    font-size: 8px;
    opacity: 0.65;
}

.client-service-type.recurring {
    background: rgba(34, 139, 34, 0.06);
    color: rgba(22, 101, 52, 0.92);
    border-color: rgba(34, 139, 34, 0.1);
}

.client-service-type.deep-clean {
    background: rgba(180, 130, 40, 0.07);
    color: rgba(100, 65, 18, 0.92);
    border-color: rgba(180, 130, 40, 0.12);
}

.client-service-type.move-out {
    background: rgba(200, 60, 60, 0.06);
    color: rgba(110, 35, 35, 0.92);
    border-color: rgba(200, 60, 60, 0.1);
}

.client-service-type.basic {
    background: rgba(80, 80, 180, 0.06);
    color: rgba(45, 45, 100, 0.92);
    border-color: rgba(80, 80, 180, 0.1);
}

.client-card__detail-line {
    font-size: 10.5px;
    line-height: 1.25;
    color: var(--cc-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.client-card__sep {
    margin: 0 0.28em;
    color: var(--cc-faint);
    user-select: none;
}

.client-card__detail-line a {
    color: inherit;
    text-decoration: none;
}

.client-card__detail-line a:hover {
    color: rgba(35, 131, 226, 0.95);
    text-decoration: underline;
}

.client-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 3px;
    margin: 0;
}

.client-tags.hidden {
    display: none;
}

.client-card .client-tag-badge i {
    display: none;
}

.client-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.45;
    background: rgba(55, 53, 47, 0.05);
    color: rgba(70, 68, 64, 0.88);
    border: 1px solid rgba(55, 53, 47, 0.07);
    box-shadow: none;
}

.client-tag-badge i {
    font-size: 8px;
    opacity: 0.7;
}

.client-tag-badge.tag-critical {
    background: rgba(254, 226, 226, 0.85);
    color: #7f1d1d;
    border-color: rgba(220, 38, 38, 0.15);
}

.client-tag-badge.tag-warning {
    background: rgba(254, 243, 199, 0.9);
    color: #78350f;
    border-color: rgba(245, 158, 11, 0.2);
}

.client-card__metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 3px;
    margin-top: 2px;
    padding-top: 3px;
    border-top: 1px solid var(--cc-line);
    font-size: 10.5px;
    line-height: 1.2;
    color: var(--cc-muted);
}

.client-card__metric strong {
    font-weight: 600;
    color: var(--cc-text);
    letter-spacing: -0.02em;
}

.client-card__metric-sep {
    color: var(--cc-faint);
    user-select: none;
}

/* Next Cleaning Badge */
.next-cleaning-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.45;
    background: rgba(34, 139, 34, 0.06);
    color: rgba(22, 101, 52, 0.92);
    border: 1px solid rgba(34, 139, 34, 0.1);
}

.next-cleaning-badge.urgent {
    background: rgba(220, 160, 40, 0.08);
    color: rgba(100, 65, 18, 0.92);
    border-color: rgba(220, 160, 40, 0.14);
}

.next-cleaning-badge.overdue {
    background: rgba(200, 60, 60, 0.06);
    color: rgba(110, 35, 35, 0.92);
    border-color: rgba(200, 60, 60, 0.12);
}

.next-cleaning-badge i {
    font-size: 8px;
    opacity: 0.7;
}

/* Recurring Warning Badge */
.recurring-warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.45;
    background: rgba(220, 160, 40, 0.08);
    color: rgba(100, 65, 18, 0.92);
    border: 1px solid rgba(220, 160, 40, 0.14);
    animation: none;
}

.recurring-warning-badge i {
    font-size: 8px;
    opacity: 0.75;
    animation: none;
}

/* Client Side Badge */
.client-side-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.45;
    background: rgba(55, 53, 47, 0.04);
    color: rgba(70, 68, 64, 0.88);
    border: 1px solid rgba(55, 53, 47, 0.08);
}

.client-side-badge i {
    font-size: 8px;
    opacity: 0.65;
}

.client-side-badge.west {
    background: rgba(59, 130, 246, 0.08);
    color: rgba(30, 64, 175, 0.92);
    border-color: rgba(59, 130, 246, 0.14);
}

.client-side-badge.east {
    background: rgba(220, 160, 40, 0.08);
    color: rgba(100, 65, 18, 0.92);
    border-color: rgba(220, 160, 40, 0.14);
}

.client-side-badge.pending {
    background: rgba(55, 53, 47, 0.04);
    color: rgba(90, 90, 90, 0.88);
    border-color: rgba(55, 53, 47, 0.07);
}

.client-side-badge.unknown {
    background: rgba(55, 53, 47, 0.04);
    color: rgba(90, 90, 90, 0.88);
    border-color: rgba(55, 53, 47, 0.07);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #9ca3af;
    grid-column: 1 / -1;
}

.loading-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.loading-state p {
    font-size: 16px;
    margin: 0;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #9ca3af;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #656d76;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

/* Dark Mode Styles */
.main-content[data-theme="dark"] .search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-content[data-theme="dark"] .search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.main-content[data-theme="dark"] .search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-content[data-theme="dark"] .search-icon {
    color: rgba(255, 255, 255, 0.5);
}

.main-content[data-theme="dark"] .sort-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.main-content[data-theme="dark"] .sort-select:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.main-content[data-theme="dark"] .sort-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-content[data-theme="dark"] .sort-icon {
    color: rgba(255, 255, 255, 0.5);
}

.main-content[data-theme="dark"] .filter-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-content[data-theme="dark"] .filter-label {
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .filter-label i {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .filter-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.main-content[data-theme="dark"] .filter-btn.active {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-color: #60a5fa;
    color: white;
}

.main-content[data-theme="dark"] .filter-count {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.main-content[data-theme="dark"] .client-card {
    --cc-line: rgba(255, 255, 255, 0.1);
    --cc-text: rgba(255, 255, 255, 0.92);
    --cc-muted: rgba(255, 255, 255, 0.55);
    --cc-faint: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.main-content[data-theme="dark"] .client-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
    transform: none;
}

.main-content[data-theme="dark"] .client-name {
    color: var(--cc-text);
}

.main-content[data-theme="dark"] .client-card__detail-line a {
    color: #93c5fd;
}

.main-content[data-theme="dark"] .client-card__detail-line a:hover {
    color: #bfdbfe;
}

.main-content[data-theme="dark"] .client-card__metrics {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-card__metric strong {
    color: #ffffff;
}

.main-content[data-theme="dark"] .loading-state,
.main-content[data-theme="dark"] .empty-state {
    color: rgba(255, 255, 255, 0.6);
}

.main-content[data-theme="dark"] .empty-state h3 {
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .next-cleaning-badge {
    background: rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
}

.main-content[data-theme="dark"] .next-cleaning-badge.urgent {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

.main-content[data-theme="dark"] .next-cleaning-badge.overdue {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

.main-content[data-theme="dark"] .recurring-warning-badge {
    background: rgba(251, 191, 36, 0.25);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.4);
}

.main-content[data-theme="dark"] .client-side-badge {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

.main-content[data-theme="dark"] .client-side-badge.west {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.main-content[data-theme="dark"] .client-side-badge.east {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

.main-content[data-theme="dark"] .client-side-badge.pending,
.main-content[data-theme="dark"] .client-side-badge.unknown {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

/* Client Detail Modal */
.client-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.client-modal.active {
    display: block;
}

.client-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.client-modal .modal-content {
    position: absolute;
    top: 0;
    left: 250px;
    right: 0;
    width: calc(100vw - 250px);
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    padding: 0;
    max-width: none !important;
    max-height: none !important;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.client-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.client-modal .modal-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.client-modal .modal-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.client-modal .modal-title-area {
    flex: 1;
    min-width: 0;
}

.client-modal .modal-title-area h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-modal .modal-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.designated-cleaner-selector {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    position: relative;
}

/* When inside modal-section, remove extra styling */
.client-modal .modal-section .designated-cleaner-selector {
    padding: 0;
    background: transparent;
    border: none;
}

.designated-cleaner-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.designated-cleaner-label-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.designated-cleaner-label-text i {
    font-size: 14px;
    color: #3b82f6;
}

.designated-cleaner-names {
    font-size: 14px;
    color: #4b5563;
    flex: 1;
    min-width: 0;
}

.btn-select-cleaners {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-select-cleaners:hover {
    background: #2563eb;
}

.btn-select-cleaners:active {
    background: #1d4ed8;
}

.btn-select-cleaners i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.designated-cleaner-dropdown {
    position: relative;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

.designated-cleaner-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.designated-cleaner-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 13px;
    color: #1a1a1a;
}

.designated-cleaner-checkbox-label:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.designated-cleaner-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.designated-cleaner-checkbox-label span {
    flex: 1;
    user-select: none;
}

.designated-cleaner-select {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a1a;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.designated-cleaner-select:hover {
    border-color: #3b82f6;
}

.designated-cleaner-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Preferred Cleaner Selector */
.preferred-cleaner-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.preferred-cleaner-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
    white-space: nowrap;
    margin: 0;
    cursor: default;
}

.preferred-cleaner-label i {
    font-size: 14px;
}

.preferred-cleaner-select {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #1a1a1a;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.preferred-cleaner-select:hover {
    border-color: #f59e0b;
}

.preferred-cleaner-select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.client-modal .modal-tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.client-modal .modal-tag-badges.empty {
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
}

.client-modal .modal-tag-empty {
    display: inline-block;
}

.client-modal .modal-header-stats {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.header-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.header-stat-label {
    font-size: 9px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

/* Note to Cleaner Section */
.note-to-cleaner-container {
    width: 100%;
    margin-top: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

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

.note-to-cleaner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-to-cleaner-title i {
    font-size: 14px;
    color: #f59e0b;
}

.note-to-cleaner-actions {
    display: flex;
    gap: 6px;
}

.btn-edit-cleaner-note,
.btn-delete-cleaner-note {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #92400e;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-delete-cleaner-note {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-color: #ef4444;
}

.btn-edit-cleaner-note:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-delete-cleaner-note:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-edit-cleaner-note i,
.btn-delete-cleaner-note i {
    font-size: 10px;
}

.note-to-cleaner-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    font-weight: 500;
    border: 1px solid rgba(245, 158, 11, 0.3);
    min-height: 40px;
}

.note-to-cleaner-content.empty {
    color: #78716c;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.note-to-cleaner-content.empty i {
    color: #a8a29e;
    font-size: 13px;
}

.client-modal .modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-tag-button-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.client-tag-toggle-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.client-tag-toggle-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.18);
    border-color: #3b82f6;
    color: #1d4ed8;
}

.client-tag-toggle-button i {
    font-size: 13px;
}

.client-tag-toggle-button.active {
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.client-tag-toggle-button.tag-do-not-serve {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(254, 226, 226, 0.45);
}

.client-tag-toggle-button.tag-on-demand {
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(254, 240, 138, 0.4);
}

.client-tag-toggle-button.tag-do-not-serve.active,
.client-tag-toggle-button.tag-on-demand.active {
    color: #ffffff;
}

.client-tag-toggle-button.tag-on-demand.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
}

.client-tag-toggle-button.tag-do-not-serve.active {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-color: #b91c1c;
}

.btn-add-cleaning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-add-cleaning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-add-cleaning:active {
    transform: translateY(0);
}

.btn-add-cleaning i {
    font-size: 14px;
}

.btn-delete-client {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-delete-client:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-delete-client:active {
    transform: translateY(0);
}

.btn-delete-client:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-delete-client i {
    font-size: 14px;
}

/* Delete button in modal section */
.client-modal .modal-section .btn-delete-client {
    margin-top: 0;
}

.contact-info-delete-wrap {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.btn-delete-client--compact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    background: transparent;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.35);
    box-shadow: none;
}

.btn-delete-client--compact:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.5);
    transform: none;
    box-shadow: none;
}

.btn-delete-client--compact:active {
    transform: none;
}

.btn-delete-client--compact i {
    font-size: 10px;
}

body.page-client2 .client-modal .btn-delete-client--compact {
    background: transparent !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.35) !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .btn-delete-client--compact:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #b91c1c !important;
}

body.page-client2 .client-modal .contact-info-delete-wrap {
    border-top-color: var(--client2-border, #ececec) !important;
}

.btn-cleaner-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-cleaner-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-cleaner-note:active {
    transform: translateY(0);
}

.btn-cleaner-note i {
    font-size: 14px;
}

.btn-recurring-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-recurring-pricing:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-recurring-pricing:active {
    transform: translateY(0);
}

.btn-recurring-pricing i {
    font-size: 14px;
}

.btn-recurring-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.btn-recurring-time:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-recurring-time:active {
    transform: translateY(0);
}

.btn-recurring-time i {
    font-size: 14px;
}

.recurring-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-modal .modal-close {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.client-modal .modal-close:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.client-modal .modal-close i {
    font-size: 20px;
    color: #656d76;
}

.client-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f8f9fb;
    display: flex;
    gap: 16px;
}

.client-modal .modal-footer {
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.client-modal .modal-main-content {
    flex: 1;
    min-width: 0;
}

.client-modal .modal-cleaning-sidebar {
    width: 320px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    height: fit-content;
}

.client-modal .modal-section {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.client-modal .modal-section:last-child {
    margin-bottom: 0;
}

.client-modal .modal-section-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.client-modal .modal-section-row .modal-section {
    flex: 1;
    margin-bottom: 0;
}

.client-modal .modal-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-modal .modal-section-title i {
    font-size: 14px;
    color: #3b82f6;
}

.client-modal .modal-info-grid {
    display: grid;
    gap: 8px;
}

.client-modal .modal-info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.client-modal .modal-info-item i {
    width: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.client-modal .modal-info-content {
    flex: 1;
    min-width: 0;
}

.client-modal .modal-info-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.client-modal .modal-info-value {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 500;
    word-break: break-word;
}

.client-modal .modal-info-value a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.client-modal .modal-info-value a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Map Button */
.btn-show-map {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-top: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-show-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-show-map:active {
    transform: translateY(0);
}

.btn-show-map i {
    font-size: 14px;
}

/* Map Container */
.client-map-container {
    margin-top: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.client-map {
    width: 100%;
    height: 400px;
    min-height: 300px;
}

/* Dark Mode for Map */
.main-content[data-theme="dark"] .btn-show-map {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.main-content[data-theme="dark"] .btn-show-map:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4);
}

.main-content[data-theme="dark"] .client-map-container {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.client-modal .modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.client-modal .modal-stat-card {
    text-align: center;
    padding: 16px;
    background: #f8f9fb;
    border-radius: 8px;
}

.client-modal .modal-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.client-modal .modal-stat-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dark Mode for Modal */
.main-content[data-theme="dark"] .client-modal .modal-content {
    background: rgba(30, 37, 46, 0.98);
    backdrop-filter: blur(20px);
}

.main-content[data-theme="dark"] .client-modal .modal-header {
    background: rgba(30, 37, 46, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .designated-cleaner-selector {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.main-content[data-theme="dark"] .designated-cleaner-label {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .designated-cleaner-checkboxes {
    background: transparent;
}

.main-content[data-theme="dark"] .designated-cleaner-label-text {
    color: #f9fafb;
}

.main-content[data-theme="dark"] .designated-cleaner-names {
    color: #d1d5db;
}

.main-content[data-theme="dark"] .btn-select-cleaners {
    background: #3b82f6;
}

.main-content[data-theme="dark"] .btn-select-cleaners:hover {
    background: #2563eb;
}

.main-content[data-theme="dark"] .designated-cleaner-dropdown {
    background: rgba(30, 37, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .designated-cleaner-checkbox-label {
    color: #f9fafb;
}

.main-content[data-theme="dark"] .designated-cleaner-checkbox-label:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.main-content[data-theme="dark"] .designated-cleaner-select {
    background: rgba(30, 37, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
}

.main-content[data-theme="dark"] .designated-cleaner-select:hover {
    border-color: #60a5fa;
}

.main-content[data-theme="dark"] .designated-cleaner-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.main-content[data-theme="dark"] .preferred-cleaner-selector {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}

.main-content[data-theme="dark"] .preferred-cleaner-label {
    color: #fbbf24;
}

.main-content[data-theme="dark"] .preferred-cleaner-select {
    background: rgba(30, 37, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
}

.main-content[data-theme="dark"] .preferred-cleaner-select:hover {
    border-color: #fbbf24;
}

.main-content[data-theme="dark"] .preferred-cleaner-select:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.main-content[data-theme="dark"] .client-modal .modal-title-area h2 {
    color: #ffffff;
}

.main-content[data-theme="dark"] .btn-add-cleaning {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.main-content[data-theme="dark"] .btn-add-cleaning:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.main-content[data-theme="dark"] .btn-cleaner-note {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.main-content[data-theme="dark"] .btn-cleaner-note:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.main-content[data-theme="dark"] .btn-recurring-pricing {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.main-content[data-theme="dark"] .btn-recurring-pricing:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
}

.main-content[data-theme="dark"] .btn-recurring-time {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.main-content[data-theme="dark"] .btn-recurring-time:hover {
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.5);
}

.main-content[data-theme="dark"] .client-modal .modal-close {
    background: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.main-content[data-theme="dark"] .client-modal .modal-close i {
    color: rgba(255, 255, 255, 0.8);
}

.main-content[data-theme="dark"] .client-modal .modal-body {
    background: #1E252E;
}

.main-content[data-theme="dark"] .client-modal .modal-footer {
    background: rgba(30, 37, 46, 0.98);
    border-top-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-section {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-section-title {
    color: #ffffff;
}

.main-content[data-theme="dark"] .client-modal .modal-section-title i {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .header-stat-value {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .header-stat-label {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .note-to-cleaner-container {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-color: rgba(251, 191, 36, 0.4);
}

.main-content[data-theme="dark"] .note-to-cleaner-title {
    color: #fbbf24;
}

.main-content[data-theme="dark"] .note-to-cleaner-title i {
    color: #fbbf24;
}

.main-content[data-theme="dark"] .btn-edit-cleaner-note {
    background: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
}

.main-content[data-theme="dark"] .btn-edit-cleaner-note:hover {
    background: rgba(255, 255, 255, 0.15);
}

.main-content[data-theme="dark"] .btn-delete-cleaner-note {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.main-content[data-theme="dark"] .btn-delete-cleaner-note:hover {
    background: rgba(239, 68, 68, 0.3);
}

.main-content[data-theme="dark"] .note-to-cleaner-content {
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    border-color: rgba(251, 191, 36, 0.3);
}

.main-content[data-theme="dark"] .note-to-cleaner-content.empty {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .client-modal .modal-info-item i {
    color: rgba(255, 255, 255, 0.5);
}

.main-content[data-theme="dark"] .client-modal .modal-info-label {
    color: rgba(255, 255, 255, 0.6);
}

.main-content[data-theme="dark"] .client-modal .modal-info-value {
    color: rgba(255, 255, 255, 0.9);
}

.main-content[data-theme="dark"] .client-modal .modal-info-value a {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .client-modal .modal-info-value a:hover {
    color: #93c5fd;
}

.main-content[data-theme="dark"] .client-modal .modal-stat-card {
    background: rgba(255, 255, 255, 0.03);
}

.main-content[data-theme="dark"] .client-modal .modal-stat-value {
    color: #ffffff;
}

.main-content[data-theme="dark"] .client-modal .modal-stat-label {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .client-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .client-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .search-container {
        max-width: 100%;
    }

    .sort-container {
        width: 100%;
    }

    .btn-add-client {
        width: 100%;
        justify-content: center;
    }

    .add-client-dropdown-wrap {
        width: 100%;
    }

    .add-client-dropdown {
        left: 0;
        right: 0;
        width: auto;
    }
    
    .client-modal .modal-content {
        left: 0;
        width: 100vw;
        height: 100vh;
        max-width: none !important;
        max-height: none !important;
    }
    
    .client-modal .modal-header {
        padding: 20px;
    }
    
    .client-modal .modal-header-left {
        gap: 16px;
    }
    
    .client-modal .modal-avatar {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .client-modal .modal-title-area h2 {
        font-size: 20px;
    }
    
    .client-modal .modal-body {
        padding: 20px;
    }
    
    .client-modal .modal-section {
        padding: 20px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .filter-btn span:not(.filter-count) {
        display: none;
    }

    .client-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .filter-btn span:not(.filter-count) {
        display: inline;
    }
    
    .client-modal .modal-section-row {
        flex-direction: column;
    }
    
    .client-modal .modal-header-stats {
        gap: 12px;
    }
    
    .header-stat-value {
        font-size: 16px;
    }
    
    .designated-cleaner-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }
    
    .designated-cleaner-select {
        width: 100%;
        min-width: auto;
    }
    
    .client-modal .modal-body {
        flex-direction: column;
        padding: 16px;
    }
    
    .client-modal .modal-cleaning-sidebar {
        width: 100%;
        order: -1;
    }
}

/* Messages Section */
.client-modal .modal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-go-to-crm {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-go-to-crm:hover {
    background: #005bb5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 234, 0.3);
}

.btn-go-to-crm i {
    font-size: 11px;
}

.client-modal .modal-messages-container {
    height: 150px;
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: none;
    resize: none;
    position: relative;
}

.messages-resize-handle {
    width: 100%;
    height: 20px;
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    margin-top: -1px;
}

.messages-resize-handle:hover {
    background: #e5e7eb;
}

.messages-resize-handle i {
    color: #6b7280;
    font-size: 12px;
}

.main-content[data-theme="dark"] .messages-resize-handle {
    background: rgba(30, 37, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .messages-resize-handle:hover {
    background: rgba(30, 37, 46, 1);
}

.main-content[data-theme="dark"] .messages-resize-handle i {
    color: #9ca3af;
}

.client-modal .modal-message {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.client-modal .modal-message:last-child {
    border-bottom: none;
}

.client-modal .modal-message.message-inbound {
    background: rgba(0, 123, 234, 0.05);
    border-left: 3px solid var(--primary-color);
}

.client-modal .modal-message.message-outbound {
    background: rgba(0, 200, 117, 0.05);
    border-left: 3px solid var(--secondary-color);
}

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

.message-sender {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.message-sender i {
    font-size: 11px;
}

.message-time {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.message-body {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 4px;
}

.message-tag {
    display: inline-block;
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.message-tag.quote-request {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

/* Dark Mode for Messages */
.main-content[data-theme="dark"] .btn-go-to-crm {
    background: #3b82f6;
    color: white;
}

.main-content[data-theme="dark"] .btn-go-to-crm:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.main-content[data-theme="dark"] .client-modal .modal-messages-container {
    background: rgba(30, 37, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-message {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-message.message-inbound {
    background: rgba(59, 130, 246, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-message.message-outbound {
    background: rgba(16, 185, 129, 0.1);
}

.main-content[data-theme="dark"] .message-sender {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .message-time {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .message-body {
    color: #d1d5db;
}

.main-content[data-theme="dark"] .message-tag {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.main-content[data-theme="dark"] .message-tag.quote-request {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Notes Section */
.client-modal .modal-notes-container {
    max-height: 150px;
    overflow-y: auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.client-modal .modal-note {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.client-modal .modal-note:last-child {
    border-bottom: none;
}

.client-modal .modal-note {
    background: rgba(255, 248, 220, 0.3);
    border-left: 3px solid #f59e0b;
}

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

.note-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #92400e;
    flex: 1;
}

.note-author i {
    font-size: 11px;
}

.note-time {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.note-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.client-modal .modal-note:hover .note-actions {
    opacity: 1;
}

.note-edit-btn,
.note-delete-btn {
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #3b82f6;
    font-size: 11px;
}

.note-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.note-edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

.note-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.note-edit-btn:active,
.note-delete-btn:active {
    transform: scale(0.95);
}

.btn-add-note {
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-add-note:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-add-note i {
    font-size: 11px;
}

.note-content {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark Mode for Notes */
.main-content[data-theme="dark"] .client-modal .modal-notes-container {
    background: rgba(30, 37, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client-modal .modal-note {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 113, 108, 0.1);
    border-left: 3px solid #f59e0b;
}

.main-content[data-theme="dark"] .note-author {
    color: #fbbf24;
}

.main-content[data-theme="dark"] .note-time {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .note-content {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .note-edit-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.main-content[data-theme="dark"] .note-edit-btn:hover {
    background: rgba(59, 130, 246, 0.3);
}

.main-content[data-theme="dark"] .note-delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.main-content[data-theme="dark"] .note-delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.main-content[data-theme="dark"] .btn-add-note {
    background: #059669;
}

.main-content[data-theme="dark"] .btn-add-note:hover {
    background: #047857;
}

/* Cleaning Sidebar */
.cleaning-section {
    margin-bottom: 20px;
}

.cleaning-section:last-child {
    margin-bottom: 0;
}

.cleaning-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cleaning-section-title i {
    font-size: 12px;
    color: #3b82f6;
}

.btn-delete-all-upcoming {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-all-upcoming:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-delete-all-upcoming:active {
    transform: translateY(0);
}

.btn-delete-all-upcoming i {
    font-size: 11px;
    color: #ef4444;
}

.cleaning-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.cleaning-list::-webkit-scrollbar {
    width: 8px;
}

.cleaning-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cleaning-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.cleaning-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.cleaning-item {
    padding: 8px 10px;
    border-radius: 6px;
    background: #f8f9fb;
    border-left: 3px solid #e5e7eb;
    margin-bottom: 4px;
    position: relative;
    padding-right: 40px; /* Make room for edit button */
}

.cleaning-item.upcoming {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.cleaning-item.past {
    border-left-color: #6b7280;
    background: rgba(107, 114, 128, 0.05);
}

.cleaning-item.no-bookings {
    border-left-color: #d1d5db;
    background: rgba(209, 213, 219, 0.05);
}

.cleaning-date {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cleaning-time-info {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 2px;
    line-height: 1.3;
}

.cleaning-end-time {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
}

.time-label {
    font-weight: 600;
    color: #4b5563;
}

.cleaning-details {
    flex: 1;
    min-width: 0;
}

.cleaning-service {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paid-badge {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paid-badge i {
    font-size: 10px;
}

.cleaning-item.paid-cleaning {
    border-left-color: #2ecc71;
    background: rgba(46, 204, 113, 0.08);
}


.cleaning-amount {
    font-size: 10px;
    font-weight: 600;
    color: #10b981;
}

.cleaning-item.past .cleaning-amount {
    color: #6b7280;
}

.cleaning-item.no-bookings .cleaning-service {
    color: #9ca3af;
    font-style: italic;
}

.cleaning-actions {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cleaning-item:hover .cleaning-actions {
    opacity: 1;
}

.cleaning-edit-btn,
.cleaning-delete-btn,
.cleaning-payment-link-btn,
.cleaning-record-payment-btn,
.cleaning-checklist-photo-btn {
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #3b82f6;
    font-size: 12px;
}

.cleaning-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.cleaning-payment-link-btn {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.cleaning-record-payment-btn {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.cleaning-edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

.cleaning-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.cleaning-payment-link-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
}

.cleaning-record-payment-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    transform: scale(1.1);
}

.cleaning-edit-btn:active,
.cleaning-delete-btn:active,
.cleaning-payment-link-btn:active,
.cleaning-record-payment-btn:active,
.cleaning-checklist-photo-btn:active {
    transform: scale(0.95);
}

.cleaning-checklist-photo-btn {
    background: rgba(245, 158, 11, 0.15);
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d97706;
    font-size: 12px;
}

.cleaning-checklist-photo-btn:hover {
    background: rgba(245, 158, 11, 0.28);
    transform: scale(1.1);
}

/* Fullscreen checklist photo (job-timings → Storage URL) */
.client2-checklist-photo-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 12000;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.client2-checklist-photo-overlay.is-open {
    display: flex;
}

.client2-checklist-photo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.client2-checklist-photo-panel {
    position: relative;
    z-index: 1;
    max-width: min(960px, 100%);
    max-height: min(92vh, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.client2-checklist-photo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.client2-checklist-photo-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.client2-checklist-photo-close {
    border: none;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.client2-checklist-photo-close:hover {
    background: #e5e7eb;
}

.client2-checklist-photo-meta {
    margin: 0;
    padding: 8px 16px 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.client2-checklist-photo-img-wrap {
    padding: 12px 16px 16px;
    overflow: auto;
    max-height: calc(92vh - 120px);
    text-align: center;
}

.client2-checklist-photo-img-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    vertical-align: middle;
}

.main-content[data-theme="dark"] .cleaning-checklist-photo-btn {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.main-content[data-theme="dark"] .cleaning-checklist-photo-btn:hover {
    background: rgba(245, 158, 11, 0.32);
}

.main-content[data-theme="dark"] .client2-checklist-photo-panel {
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.main-content[data-theme="dark"] .client2-checklist-photo-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .client2-checklist-photo-header h3 {
    color: #f9fafb;
}

.main-content[data-theme="dark"] .client2-checklist-photo-close {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .client2-checklist-photo-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.main-content[data-theme="dark"] .client2-checklist-photo-meta {
    color: #9ca3af;
}

html[data-theme="dark"] .client2-checklist-photo-panel {
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .client2-checklist-photo-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .client2-checklist-photo-header h3 {
    color: #f9fafb;
}

html[data-theme="dark"] .client2-checklist-photo-close {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

html[data-theme="dark"] .client2-checklist-photo-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .client2-checklist-photo-meta {
    color: #9ca3af;
}

/* Dark Mode for Cleaning Sidebar */
.main-content[data-theme="dark"] .client-modal .modal-cleaning-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .cleaning-section-title {
    color: #ffffff;
}

.main-content[data-theme="dark"] .cleaning-section-title i {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .btn-delete-all-upcoming {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.main-content[data-theme="dark"] .btn-delete-all-upcoming:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.4);
}

.main-content[data-theme="dark"] .btn-delete-all-upcoming i {
    color: #f87171;
}

.main-content[data-theme="dark"] .cleaning-item {
    background: rgba(255, 255, 255, 0.03);
}

.main-content[data-theme="dark"] .cleaning-item.upcoming {
    background: rgba(16, 185, 129, 0.1);
}

.main-content[data-theme="dark"] .cleaning-item.past {
    background: rgba(107, 114, 128, 0.1);
}

.main-content[data-theme="dark"] .cleaning-item.no-bookings {
    background: rgba(209, 213, 219, 0.1);
}

.main-content[data-theme="dark"] .cleaning-date {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .cleaning-time-info {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .cleaning-end-time {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .time-label {
    color: #d1d5db;
}

.main-content[data-theme="dark"] .cleaning-service {
    color: #e5e7eb;
}


.main-content[data-theme="dark"] .cleaning-amount {
    color: #34d399;
}

.main-content[data-theme="dark"] .cleaning-item.past .cleaning-amount {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .cleaning-item.no-bookings .cleaning-service {
    color: #6b7280;
}

.main-content[data-theme="dark"] .cleaning-edit-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.main-content[data-theme="dark"] .cleaning-edit-btn:hover {
    background: rgba(59, 130, 246, 0.3);
}

.main-content[data-theme="dark"] .cleaning-delete-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.main-content[data-theme="dark"] .cleaning-delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Inline Editing Styles */
.client-modal .modal-info-value.editable,
.client-modal .modal-name-display.editable {
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 32px;
}

.client-modal .modal-info-value.editable:hover,
.client-modal .modal-name-display.editable:hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.client-modal .modal-name-display.editable {
    display: inline-flex;
}

.edit-btn-name {
    margin-left: 8px;
}

.edit-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 12px;
    color: #3b82f6;
}

.client-modal .modal-info-value.editable:hover .edit-btn,
.client-modal .modal-name-display.editable:hover .edit-btn-name {
    opacity: 1;
}

.edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
}

.edit-input {
    flex: 1;
    padding: 6px 10px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

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

/* Edit Controls (Save/Cancel Buttons) */
.edit-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.edit-save-btn,
.edit-cancel-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-save-btn {
    background: #10b981;
    color: white;
}

.edit-save-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

.edit-cancel-btn {
    background: #ef4444;
    color: white;
}

.edit-cancel-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Edit Success/Error Messages */
.edit-success-message,
.edit-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
}

.edit-success-message {
    background: #10b981;
    color: white;
    border: 1px solid #059669;
}

.edit-error-message {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

/* Dark Mode for Editing */
.main-content[data-theme="dark"] .edit-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.main-content[data-theme="dark"] .edit-btn:hover {
    background: rgba(59, 130, 246, 0.3);
}

.main-content[data-theme="dark"] .edit-input {
    background: #374151;
    border-color: #3b82f6;
    color: #f9fafb;
}

.main-content[data-theme="dark"] .edit-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.main-content[data-theme="dark"] .client-modal .modal-info-value.editable:hover,
.main-content[data-theme="dark"] .client-modal .modal-name-display.editable:hover {
    background-color: rgba(59, 130, 246, 0.15);
}

.main-content[data-theme="dark"] .edit-save-btn {
    background: #059669;
}

.main-content[data-theme="dark"] .edit-save-btn:hover {
    background: #047857;
}

.main-content[data-theme="dark"] .edit-cancel-btn {
    background: #dc2626;
}

.main-content[data-theme="dark"] .edit-cancel-btn:hover {
    background: #b91c1c;
}

/* Payment Link Modal Styles */
.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;
}

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

.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;
}

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

.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;
}

.detail-label {
    font-weight: 600;
    color: #6b7280;
}

.detail-value {
    color: #1a1a1a;
    font-weight: 500;
}

.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;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.payment-link-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

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

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

/* Dark Mode for Payment Link Modal */
.main-content[data-theme="dark"] .payment-link-modal {
    background: #1f2937;
}

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

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

.main-content[data-theme="dark"] .payment-link-close-btn {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .payment-link-close-btn:hover {
    background: #374151;
    color: #f9fafb;
}

.main-content[data-theme="dark"] .payment-link-info {
    background: #111827;
}

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

.main-content[data-theme="dark"] .detail-label {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .detail-value {
    color: #f9fafb;
}

.main-content[data-theme="dark"] .payment-link-label {
    color: #f9fafb;
}

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

.main-content[data-theme="dark"] .cleaning-payment-link-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.main-content[data-theme="dark"] .cleaning-payment-link-btn:hover {
    background: rgba(34, 197, 94, 0.3);
}

.main-content[data-theme="dark"] .cleaning-record-payment-btn {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.main-content[data-theme="dark"] .cleaning-record-payment-btn:hover {
    background: rgba(168, 85, 247, 0.3);
}

/* 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;
}

.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;
}

.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 */
.main-content[data-theme="dark"] .record-payment-modal {
    background: #1f2937;
    color: #f9fafb;
}

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

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

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

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

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

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

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

/* Payments Section */
.payment-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-count {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.client-modal .modal-payments-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.loading-payments {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.loading-payments i {
    margin-right: 8px;
}

.no-payments {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.no-payments i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-payments p {
    margin: 8px 0;
    font-size: 14px;
}

.no-payments .hint {
    font-size: 12px;
    color: #6b7280;
}

.no-payments.error {
    color: #ef4444;
}

.no-payments.error i {
    color: #ef4444;
}

.payment-item {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.8);
    transition: background 0.2s ease;
}

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

.payment-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.payment-item.payment-success {
    border-left: 3px solid #22c55e;
}

.payment-item.payment-pending {
    border-left: 3px solid #f59e0b;
}

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

.payment-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

.payment-type i {
    color: #635BFF;
    font-size: 16px;
}

.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.payment-status i {
    font-size: 12px;
}

.payment-details {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.payment-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.payment-detail-item .detail-label {
    color: #6b7280;
    font-weight: 500;
}

.payment-detail-item .detail-value {
    color: #1a1a1a;
    font-weight: 600;
}

.payment-amounts {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.payment-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.payment-amount-row.tip-row {
    border-top: 1px dashed #e5e7eb;
    margin-top: 4px;
    padding-top: 8px;
}

.payment-amount-row.total-row {
    border-top: 2px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 8px;
}

.amount-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.amount-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.amount-value.tip-value {
    color: #22c55e;
}

.amount-value.total-value {
    font-size: 16px;
    color: #3b82f6;
}

.payment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.payment-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.payment-action-btn:hover {
    background: #e5e7eb;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
}

.payment-action-btn i {
    font-size: 12px;
}

/* Dark Mode for Payments */
.main-content[data-theme="dark"] .client-modal .modal-payments-container {
    background: rgba(30, 37, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .loading-payments {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .no-payments {
    color: #6b7280;
}

.main-content[data-theme="dark"] .payment-item {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .payment-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Cleaner History Section */
.cleaner-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cleaner-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.client-modal .modal-cleaner-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.loading-cleaners {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.loading-cleaners i {
    margin-right: 8px;
}

.no-cleaners {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.no-cleaners i {
    font-size: 32px;
    margin-bottom: 12px;
    color: #d1d5db;
}

.no-cleaners p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.no-cleaners .hint {
    font-size: 12px;
    color: #9ca3af;
}

.no-cleaners.error {
    color: #ef4444;
}

.no-cleaners.error i {
    color: #fca5a5;
}

.cleaner-entry {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.cleaner-entry:last-child {
    border-bottom: none;
}

.cleaner-entry:hover {
    background: rgba(59, 130, 246, 0.05);
}

.cleaner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cleaner-info {
    flex: 1;
}

.cleaner-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 4px;
}

.cleaner-name i {
    color: #3b82f6;
    font-size: 12px;
}

.cleaner-date {
    color: #6b7280;
    font-size: 12px;
}

.cleaner-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cleaner-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.cleaner-status.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.cleaner-status i {
    font-size: 10px;
}

.cleaner-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.cleaning-type,
.cleaning-duration,
.cleaning-source {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
}

.cleaning-type i,
.cleaning-duration i,
.cleaning-source i {
    color: #9ca3af;
    font-size: 10px;
}

.cleaning-type {
    color: #1a1a1a;
    font-weight: 500;
}

/* Dark theme for cleaner history */
.main-content[data-theme="dark"] .client-modal .modal-cleaner-container {
    background: rgba(30, 37, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .loading-cleaners {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .no-cleaners {
    color: #6b7280;
}

.main-content[data-theme="dark"] .cleaner-entry {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .cleaner-entry:hover {
    background: rgba(59, 130, 246, 0.1);
}

.main-content[data-theme="dark"] .cleaner-name {
    color: #ffffff;
}

.main-content[data-theme="dark"] .cleaner-name i {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .cleaner-date {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .cleaning-type {
    color: #ffffff;
}

.main-content[data-theme="dark"] .cleaning-type i,
.main-content[data-theme="dark"] .cleaning-duration i,
.main-content[data-theme="dark"] .cleaning-source i {
    color: #6b7280;
}

.main-content[data-theme="dark"] .cleaning-duration,
.main-content[data-theme="dark"] .cleaning-source {
    color: #9ca3af;
}

/* Cleaner feedback styles */
.cleaner-header {
    user-select: none;
}

.cleaner-header[style*="cursor: pointer"]:hover {
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    padding: 4px;
    margin: -4px;
}

.cleaner-expand-icon {
    transition: transform 0.3s ease;
}

.feedback-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.cleaner-feedback-content {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Employee Feedbacks section (dropdown) */
.employee-feedbacks-section {
    padding: 0;
    overflow: hidden;
}

.employee-feedbacks-toggle {
    width: 100%;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
    text-align: left;
}

.employee-feedbacks-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.employee-feedbacks-toggle .employee-feedbacks-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-feedbacks-toggle .employee-feedbacks-toggle-label i {
    color: #3b82f6;
}

.employee-feedbacks-count {
    font-weight: 500;
    color: #6b7280;
    font-size: 13px;
    margin-left: 6px;
}

.employee-feedbacks-chevron {
    color: #9ca3af;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.employee-feedbacks-content {
    margin-top: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.employee-feedbacks-empty {
    text-align: center;
    padding: 24px 16px;
    color: #6b7280;
    font-size: 14px;
}

.employee-feedbacks-empty i {
    font-size: 32px;
    color: #d1d5db;
    margin-bottom: 12px;
    display: block;
}

.employee-feedbacks-empty .hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

.employee-feedback-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.employee-feedback-card:last-child {
    margin-bottom: 0;
}

.employee-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.employee-feedback-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.employee-feedback-name i {
    color: #3b82f6;
    font-size: 12px;
}

.employee-feedback-date {
    font-size: 12px;
    color: #6b7280;
}

.employee-feedback-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-feedback-block {
    margin-bottom: 0;
}

.employee-feedback-block-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.employee-feedback-block-label i {
    color: #6b7280;
    font-size: 11px;
}

.employee-feedback-block-text {
    background: #f5f5f5;
    padding: 10px 12px;
    border-radius: 6px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.employee-feedback-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.btn-edit-feedback,
.btn-delete-feedback {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-edit-feedback:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
}

.btn-delete-feedback:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.employee-feedback-edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-feedback-edit-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.employee-feedback-edit-label i {
    color: #6b7280;
}

.employee-feedback-edit-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
}

.employee-feedback-edit-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.employee-feedback-edit-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-save-feedback,
.btn-cancel-edit-feedback {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-save-feedback {
    background: #3b82f6;
    color: #fff;
}

.btn-save-feedback:hover {
    background: #2563eb;
}

.btn-cancel-edit-feedback {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-cancel-edit-feedback:hover {
    background: #e5e7eb;
}

/* Dark theme - Employee Feedbacks */
.main-content[data-theme="dark"] .employee-feedbacks-toggle {
    background: rgba(30, 37, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .employee-feedbacks-toggle:hover {
    background: rgba(30, 37, 46, 1);
    border-color: rgba(255, 255, 255, 0.15);
}

.main-content[data-theme="dark"] .employee-feedbacks-toggle .employee-feedbacks-toggle-label i {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .employee-feedbacks-count {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .employee-feedbacks-content {
    background: rgba(30, 37, 46, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .employee-feedbacks-empty {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .employee-feedback-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .employee-feedback-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .employee-feedback-name {
    color: #ffffff;
}

.main-content[data-theme="dark"] .employee-feedback-name i {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .employee-feedback-date {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .employee-feedback-block-label {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .employee-feedback-block-text {
    background: rgba(0, 0, 0, 0.2);
    color: #d1d5db;
}

.main-content[data-theme="dark"] .employee-feedback-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .btn-edit-feedback,
.main-content[data-theme="dark"] .btn-delete-feedback {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .btn-edit-feedback:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    color: #93c5fd;
}

.main-content[data-theme="dark"] .btn-delete-feedback:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #f87171;
    color: #fca5a5;
}

.main-content[data-theme="dark"] .employee-feedback-edit-label {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .employee-feedback-edit-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .btn-cancel-edit-feedback {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.15);
}

.main-content[data-theme="dark"] .btn-cancel-edit-feedback:hover {
    background: rgba(255, 255, 255, 0.15);
}

.feedback-section {
    margin-bottom: 16px;
}

.feedback-section:last-child {
    margin-bottom: 0;
}

.feedback-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.feedback-section-header i {
    font-size: 14px;
}

.feedback-section-header strong {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.feedback-section-content {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Dark theme for feedback */
.main-content[data-theme="dark"] .cleaner-feedback-content {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content[data-theme="dark"] .feedback-section-header strong {
    color: #ffffff;
}

.main-content[data-theme="dark"] .feedback-section-content {
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
}

.main-content[data-theme="dark"] .cleaner-count {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

.main-content[data-theme="dark"] .payment-type {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .payment-status {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.main-content[data-theme="dark"] .payment-detail-item .detail-label {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .payment-detail-item .detail-value {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .payment-amounts {
    background: rgba(255, 255, 255, 0.03);
}

.main-content[data-theme="dark"] .amount-label {
    color: #9ca3af;
}

.main-content[data-theme="dark"] .amount-value {
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .amount-value.tip-value {
    color: #4ade80;
}

.main-content[data-theme="dark"] .amount-value.total-value {
    color: #60a5fa;
}

.main-content[data-theme="dark"] .payment-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.main-content[data-theme="dark"] .payment-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #60a5fa;
    color: #60a5fa;
}

.main-content[data-theme="dark"] .payment-count {
    color: #9ca3af;
}

/* Change Time of Recurring modal – time dropdown only (above sidebar, small centered box) */
.recurring-time-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.recurring-time-modal.active {
    display: flex;
}
.client-modal.recurring-time-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: auto;
    height: auto;
}
/* Override .modal-content so this stays a centered card, not full-width like client modal */
.recurring-time-modal .modal-content.recurring-time-modal-content,
.recurring-time-modal .recurring-time-modal-content {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 460px !important;
    height: auto !important;
    max-height: 90vh !important;
    min-height: 0 !important;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.client-modal.recurring-time-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
}
.client-modal.recurring-time-modal .modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
.client-modal.recurring-time-modal .modal-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 6px;
}
.client-modal.recurring-time-modal .modal-close:hover {
    background: #f3f4f6;
    color: #111;
}
/* Body: vertical stack – slots row, then start time, then buttons */
.recurring-time-modal-body {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 0;
}
.recurring-time-client-name {
    margin: 0 0 20px;
    font-size: 0.95rem;
    color: #6b7280;
}
/* Row 1: Slot 1 and Slot 2 next to each other */
.recurring-time-slot-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 24px;
}
.recurring-time-slot-btn {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    background: #fff;
    color: #374151;
    transition: all 0.2s;
}
.recurring-time-slot-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}
.recurring-time-slot-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}
/* Row 2: Start time selection (full width below slots) */
.recurring-time-dropdown-wrap {
    width: 100%;
    margin-bottom: 24px;
}
.recurring-time-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}
.recurring-time-dropdown {
    position: relative;
    width: 100%;
}
.recurring-time-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
    font-size: 1rem;
}
.recurring-time-toggle i.fa-clock {
    margin-right: 8px;
}
.recurring-time-slots {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10;
}
.recurring-time-slots.open {
    display: block;
}
.recurring-time-slots .time-slot-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    color: #374151;
}
.recurring-time-slots .time-slot-option:hover {
    background: #f1f5f9;
}
.recurring-time-slots .time-slot-option.selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}
/* Row 3: Cancel / Save below start time */
.recurring-time-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
}
.btn-cancel-recurring-time,
.btn-save-recurring-time {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-cancel-recurring-time {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}
.btn-cancel-recurring-time:hover {
    background: #e5e7eb;
}
.btn-save-recurring-time {
    background: #3b82f6;
    border: 1px solid #2563eb;
    color: #fff;
}
.btn-save-recurring-time:hover {
    background: #2563eb;
}
.main-content[data-theme="dark"] .client-modal.recurring-time-modal .modal-header {
    border-color: rgba(255, 255, 255, 0.1);
}
.main-content[data-theme="dark"] .recurring-time-modal .modal-header h2,
.main-content[data-theme="dark"] .recurring-time-modal-body .recurring-time-label {
    color: #e5e7eb;
}
.main-content[data-theme="dark"] .recurring-time-client-name {
    color: #9ca3af;
}
.main-content[data-theme="dark"] .recurring-time-slot-btn {
    background: rgba(30, 37, 46, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}
.main-content[data-theme="dark"] .recurring-time-slot-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.main-content[data-theme="dark"] .recurring-time-slot-btn.active {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}
.main-content[data-theme="dark"] .recurring-time-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}
.main-content[data-theme="dark"] .recurring-time-slots {
    background: rgba(30, 37, 46, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}
.main-content[data-theme="dark"] .recurring-time-slots .time-slot-option {
    color: #e5e7eb;
}
.main-content[data-theme="dark"] .recurring-time-slots .time-slot-option:hover {
    background: rgba(255, 255, 255, 0.08);
}
.main-content[data-theme="dark"] .recurring-time-slots .time-slot-option.selected {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}
.main-content[data-theme="dark"] .btn-cancel-recurring-time {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}
.main-content[data-theme="dark"] .btn-cancel-recurring-time:hover {
    background: rgba(255, 255, 255, 0.15);
}
.main-content[data-theme="dark"] .btn-save-recurring-time {
    background: #2563eb;
    border-color: #3b82f6;
}
.main-content[data-theme="dark"] .btn-save-recurring-time:hover {
    background: #3b82f6;
}

.recurring-price-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #2c3e50;
    font-size: 1rem;
}
.recurring-price-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.recurring-price-error {
    margin: 8px 0 0;
    min-height: 18px;
    font-size: 0.85rem;
    color: #dc2626;
}

.main-content[data-theme="dark"] .recurring-price-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}
.main-content[data-theme="dark"] .recurring-price-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.main-content[data-theme="dark"] .recurring-price-error {
    color: #fca5a5;
}

/* Scheduler2 booking modal — stack above client modal (z-index ~10000) */
#bookingDetailsModal.modal {
    z-index: 100050 !important;
}

/* =============================================================================
   Client2 — Notion-style surface (tokens aligned with Scheduler2 / page-scheduler2)
   ============================================================================= */

body.page-client2 {
    --sch-font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", "Noto Sans Arabic", "Noto Sans Hebrew", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
    --sch-text-primary: rgba(50, 48, 44, 1);
    --sch-text-secondary: rgba(120, 119, 116, 1);
    --sch-text-tertiary: rgba(70, 68, 64, 0.45);
    --sch-grid-line: rgba(55, 53, 47, 0.09);
    --sch-bg-canvas: #fbfbfa;
    --sch-bg-panel: #ffffff;
    --sch-radius: 6px;
    --sch-radius-lg: 8px;
    --sch-accent: #2383e2;
    font-family: var(--sch-font-sans);
    font-size: 13px;
    line-height: 1.45;
    color: var(--sch-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "ss02";
}

body.page-client2 .app-container,
body.page-client2 button,
body.page-client2 input,
body.page-client2 select,
body.page-client2 textarea {
    font-family: inherit;
}

/* Main pane: fixed sidebar + flex main — cap width; don’t trap vertical scroll (overflow-x:auto forces overflow-y:auto) */
body.page-client2 .app-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    box-sizing: border-box;
}

body.page-client2 .sidebar ~ .main-content {
    margin-left: calc(240px + var(--sidebar-layout-offset, 0px) - var(--sidebar-main-seam, 0px)) !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: calc(100vw - 240px - var(--sidebar-layout-offset, 0px) + var(--sidebar-main-seam, 0px)) !important;
    transition: margin-left 0.22s ease, max-width 0.22s ease;
}

body.page-client2 .sidebar.collapsed ~ .main-content {
    margin-left: calc(60px + var(--sidebar-layout-offset, 0px) - var(--sidebar-main-seam, 0px)) !important;
    max-width: calc(100vw - 60px - var(--sidebar-layout-offset, 0px) + var(--sidebar-main-seam, 0px)) !important;
}

body.page-client2 .main-content {
    background: var(--sch-bg-canvas) !important;
    padding: 16px 20px 32px !important;
    color: var(--sch-text-primary);
    overflow-x: visible;
    overflow-y: visible;
    box-sizing: border-box;
}

body.page-client2 .client-toolbar {
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

body.page-client2 .search-input,
body.page-client2 .sort-select {
    border: 1px solid var(--sch-grid-line);
    border-radius: var(--sch-radius-lg);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    background: var(--sch-bg-panel);
    color: var(--sch-text-primary);
    font-size: 13px;
    padding: 8px 36px 8px 38px;
}

body.page-client2 .search-input:focus,
body.page-client2 .sort-select:focus {
    outline: none;
    border-color: rgba(55, 53, 47, 0.16);
    box-shadow: 0 0 0 1px rgba(55, 53, 47, 0.08);
}

body.page-client2 .search-icon,
body.page-client2 .sort-icon {
    font-size: 14px;
    color: var(--sch-text-tertiary);
    left: 12px;
}

body.page-client2 .btn-add-client,
body.page-client2 .btn-export-csv {
    border-radius: var(--sch-radius-lg);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.page-client2 .btn-add-client {
    background: var(--sch-accent);
    color: #fff;
    border: 1px solid var(--sch-accent);
}

body.page-client2 .btn-add-client:hover {
    background: #1b6cb8;
    border-color: #1b6cb8;
    transform: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

body.page-client2 .btn-export-csv {
    background: var(--sch-bg-panel);
    color: var(--sch-text-primary);
    border: 1px solid var(--sch-grid-line);
}

body.page-client2 .btn-export-csv:hover {
    background: rgba(55, 53, 47, 0.04);
    border-color: rgba(55, 53, 47, 0.12);
    transform: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

body.page-client2 .filter-bar {
    background: var(--sch-bg-panel);
    border: 1px solid var(--sch-grid-line);
    border-radius: var(--sch-radius-lg);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 10px 12px;
    margin-bottom: 16px;
    gap: 10px;
}

body.page-client2 .filter-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--sch-text-secondary);
}

body.page-client2 .filter-label i {
    color: var(--sch-text-tertiary);
}

body.page-client2 .filter-btn {
    border: 1px solid var(--sch-grid-line);
    border-radius: var(--sch-radius-lg);
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--sch-text-secondary);
    padding: 6px 10px;
    box-shadow: none;
}

body.page-client2 .filter-btn:hover {
    background: rgba(55, 53, 47, 0.04);
    border-color: rgba(55, 53, 47, 0.12);
    color: var(--sch-text-primary);
    transform: none;
    box-shadow: none;
}

body.page-client2 .filter-btn.active {
    background: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.14);
    color: var(--sch-text-primary);
    box-shadow: none;
}

body.page-client2 .filter-btn.active i {
    color: inherit;
}

body.page-client2 .filter-count {
    background: rgba(55, 53, 47, 0.06);
    color: var(--sch-text-secondary);
}

body.page-client2 .filter-btn.active .filter-count {
    background: rgba(55, 53, 47, 0.1);
    color: var(--sch-text-primary);
}

body.page-client2 .client-list {
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

body.page-client2 .client-card {
    --cc-line: var(--sch-grid-line);
    --cc-text: var(--sch-text-primary);
    --cc-muted: var(--sch-text-secondary);
    --cc-faint: var(--sch-text-tertiary);
    border-color: var(--sch-grid-line);
    border-radius: 3px;
    padding: 5px 7px 6px;
    background: var(--sch-bg-panel);
}

body.page-client2 .client-card::before {
    display: none;
}

body.page-client2 .client-card:hover {
    border-color: rgba(55, 53, 47, 0.13);
    background: rgba(55, 53, 47, 0.012);
    box-shadow: none;
    transform: none;
}

body.page-client2 .client-name {
    color: var(--sch-text-primary);
}

body.page-client2 .client-chip-on-file {
    color: var(--sch-text-secondary);
    background: rgba(55, 53, 47, 0.04);
    border-color: var(--sch-grid-line);
}

body.page-client2 .client-card__detail-line a {
    color: var(--sch-accent);
}

body.page-client2 .client-card__detail-line a:hover {
    color: #1b6cb8;
}

body.page-client2 .client-card__metrics {
    border-top-color: var(--sch-grid-line);
}

body.page-client2 .client-card__metric strong {
    color: var(--sch-text-primary);
}

body.page-client2 .client-service-type,
body.page-client2 .client-tag-badge {
    box-shadow: none;
}

body.page-client2 .loading-state,
body.page-client2 .empty-state {
    color: var(--sch-text-secondary);
}

body.page-client2 .empty-state h3 {
    color: var(--sch-text-primary);
    font-size: 15px;
    font-weight: 600;
}

body.page-client2 .empty-state p,
body.page-client2 .loading-state p {
    font-size: 13px;
    color: var(--sch-text-secondary);
}

/* Detail drawer: align panel offset with 240px sidebar */
body.page-client2 .client-modal:not(.recurring-time-modal) .modal-content {
    left: 240px;
    width: calc(100vw - 240px);
    box-shadow: inset 1px 0 0 var(--sch-grid-line);
}

body.page-client2 .client-modal .modal-overlay {
    background: rgba(15, 15, 15, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body.page-client2 .client-modal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sch-grid-line);
    background: var(--sch-bg-panel);
}

body.page-client2 .client-modal .modal-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--sch-radius-lg);
    background: rgba(55, 53, 47, 0.08);
    color: var(--sch-text-primary);
    font-size: 18px;
    font-weight: 600;
    box-shadow: none;
}

body.page-client2 .client-modal .modal-title-area h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--sch-text-primary);
}

body.page-client2 .client-modal .btn-add-cleaning {
    border-radius: var(--sch-radius-lg);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    box-shadow: none;
}

/* Dark main pane (if theme is re-enabled on main-content) */
body.page-client2 .main-content[data-theme="dark"] {
    --sch-text-primary: rgba(255, 255, 255, 0.92);
    --sch-text-secondary: rgba(255, 255, 255, 0.55);
    --sch-text-tertiary: rgba(255, 255, 255, 0.38);
    --sch-grid-line: rgba(255, 255, 255, 0.09);
    --sch-bg-canvas: #191919;
    --sch-bg-panel: #202020;
    --sch-accent: #529cca;
}

body.page-client2 .main-content[data-theme="dark"] .search-input,
body.page-client2 .main-content[data-theme="dark"] .sort-select {
    box-shadow: none;
}

body.page-client2 .main-content[data-theme="dark"] .search-input:focus,
body.page-client2 .main-content[data-theme="dark"] .sort-select:focus {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.page-client2 .main-content[data-theme="dark"] .filter-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

body.page-client2 .main-content[data-theme="dark"] .filter-count {
    background: rgba(255, 255, 255, 0.08);
}

body.page-client2 .main-content[data-theme="dark"] .filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.12);
}

/* Database sync confirmation (client2 load) */
.client2-firebase-sync-toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 320px);
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--sch-text-primary, rgba(50, 48, 44, 0.95));
    background: var(--sch-bg-panel, rgba(255, 255, 255, 0.97));
    border: 1px solid rgba(55, 53, 47, 0.1);
    border-radius: 10px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.38s ease,
        transform 0.38s ease,
        visibility 0.38s ease;
}

.client2-firebase-sync-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.client2-firebase-sync-toast__check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #34a853;
    color: #fff;
    font-size: 11px;
}

.client2-firebase-sync-toast__brand {
    font-weight: 600;
    color: #2563eb;
    letter-spacing: 0.02em;
}

html[data-theme="dark"] body.page-client2 .client2-firebase-sync-toast {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(36, 40, 48, 0.96);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] body.page-client2 .client2-firebase-sync-toast__brand {
    color: #93c5fd;
}

/* -----------------------------------------------------------------
   Notion / To-Do / Notebook aligned profile (client list & cards)
   Matches todo.css “Notion-style refresh” + notebook panel tokens.
------------------------------------------------------------------ */

body.page-client2 {
    --client2-ink: #2c2c2b;
    --client2-ink-muted: #7d7a75;
    --client2-ink-faint: #a19e99;
    --client2-border: #ececec;
    --client2-canvas: #ffffff;
    --client2-panel: #ffffff;
    --client2-radius: 10px;
    --client2-radius-lg: 12px;
    --sch-text-primary: var(--client2-ink);
    --sch-text-secondary: var(--client2-ink-muted);
    --sch-text-tertiary: var(--client2-ink-faint);
    --sch-grid-line: var(--client2-border);
    --sch-bg-canvas: var(--client2-canvas);
    --sch-bg-panel: var(--client2-panel);
    --sch-radius-lg: var(--client2-radius);
    --sch-accent: var(--client2-ink);
}

body.page-client2 .main-content {
    background: var(--client2-canvas) !important;
    padding: 24px 28px 88px !important;
}

body.page-client2 .client-toolbar {
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

body.page-client2 .search-input,
body.page-client2 .sort-select {
    border: 1px solid var(--client2-border) !important;
    border-radius: var(--client2-radius) !important;
    box-shadow: none !important;
    color: var(--client2-ink) !important;
    background: var(--client2-panel) !important;
}

body.page-client2 .search-input::placeholder {
    color: var(--client2-ink-faint) !important;
}

body.page-client2 .search-input:focus,
body.page-client2 .sort-select:focus {
    outline: none !important;
    border-color: #d6d5d2 !important;
    box-shadow: 0 0 0 1px var(--client2-border) !important;
}

body.page-client2 .search-icon,
body.page-client2 .sort-icon {
    color: var(--client2-ink-muted) !important;
}

body.page-client2 .btn-add-client {
    background: var(--client2-ink) !important;
    color: #fff !important;
    border: 1px solid var(--client2-ink) !important;
    border-radius: var(--client2-radius) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12) !important;
    transform: none !important;
}

body.page-client2 .btn-add-client:hover {
    background: #1f1f1e !important;
    border-color: #1f1f1e !important;
    transform: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16) !important;
}

body.page-client2 .btn-export-csv {
    background: var(--client2-panel) !important;
    color: var(--client2-ink) !important;
    border: 1px solid var(--client2-border) !important;
    border-radius: var(--client2-radius) !important;
    box-shadow: none !important;
    transform: none !important;
}

body.page-client2 .btn-export-csv:hover {
    background: #fafafa !important;
    border-color: #d6d5d2 !important;
    transform: none !important;
    box-shadow: none !important;
}

body.page-client2 .filter-bar {
    background: var(--client2-panel) !important;
    border: 1px solid var(--client2-border) !important;
    border-radius: var(--client2-radius-lg) !important;
    box-shadow: none !important;
    padding: 14px 16px !important;
    margin-bottom: 20px !important;
}

body.page-client2 .filter-btn {
    border: 1px solid var(--client2-border) !important;
    border-radius: var(--client2-radius) !important;
    background: var(--client2-panel) !important;
    color: var(--client2-ink-muted) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

body.page-client2 .filter-btn:hover {
    border-color: #d6d5d2 !important;
    background: #fafafa !important;
    color: var(--client2-ink) !important;
}

body.page-client2 .filter-btn.active {
    background: var(--client2-ink) !important;
    border-color: var(--client2-ink) !important;
    color: #fff !important;
}

body.page-client2 .filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

body.page-client2 .filter-count {
    background: #f4f4f2 !important;
    color: var(--client2-ink-muted) !important;
}

body.page-client2 .client-list {
    gap: 10px !important;
}

body.page-client2 .client-card {
    border: 1px solid var(--client2-border) !important;
    border-radius: var(--client2-radius) !important;
    background: var(--client2-panel) !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
}

body.page-client2 .client-card:hover {
    border-color: #d6d5d2 !important;
    box-shadow: 0 0 0 1px var(--client2-border) !important;
    background: var(--client2-panel) !important;
}

body.page-client2 .client-name {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: var(--client2-ink) !important;
    letter-spacing: -0.01em;
}

body.page-client2 .client-card__detail-line,
body.page-client2 .client-card__metrics {
    color: var(--client2-ink-muted) !important;
}

body.page-client2 .loading-state,
body.page-client2 .empty-state {
    border-radius: var(--client2-radius-lg);
    border: 1px dashed var(--client2-border);
    background: #fafafa;
    padding: 32px 24px;
}

/* -----------------------------------------------------------------
   Client detail drawer (card click) — same Notion / todo profile
------------------------------------------------------------------ */

body.page-client2 .client-modal .modal-content {
    background: #ffffff !important;
    box-shadow: inset 1px 0 0 var(--client2-border, #ececec) !important;
}

body.page-client2 .client-modal .modal-header {
    padding: 20px 24px !important;
    border-bottom: 1px solid var(--client2-border, #ececec) !important;
    background: #ffffff !important;
}

body.page-client2 .client-modal .modal-body {
    background: #fafafa !important;
    padding: 20px 24px 32px !important;
    gap: 20px !important;
}

body.page-client2 .client-modal .modal-footer {
    background: #ffffff !important;
    border-top: 1px solid var(--client2-border, #ececec) !important;
}

body.page-client2 .client-modal .modal-section {
    background: #ffffff !important;
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius-lg, 12px) !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .modal-section-title {
    color: var(--client2-ink, #2c2c2b) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

body.page-client2 .client-modal .modal-section-title i {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .modal-info-label {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .modal-info-value {
    color: var(--client2-ink, #2c2c2b) !important;
}

body.page-client2 .client-modal .modal-info-value a {
    color: var(--client2-ink, #2c2c2b) !important;
}

body.page-client2 .client-modal .modal-info-item i {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .modal-stat-card {
    background: #fafafa !important;
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius, 10px) !important;
}

body.page-client2 .client-modal .modal-stat-value {
    color: var(--client2-ink, #2c2c2b) !important;
}

body.page-client2 .client-modal .modal-stat-label {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .modal-cleaning-sidebar {
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius-lg, 12px) !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .cleaning-section-title {
    color: var(--client2-ink, #2c2c2b) !important;
}

body.page-client2 .client-modal .cleaning-item {
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius, 10px) !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .btn-add-cleaning {
    background: var(--client2-ink, #2c2c2b) !important;
    color: #fff !important;
    border: 1px solid var(--client2-ink, #2c2c2b) !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .btn-add-cleaning:hover {
    background: #1f1f1e !important;
    border-color: #1f1f1e !important;
}

body.page-client2 .client-modal #btnRecurringTime,
body.page-client2 .client-modal #btnRecurringPricing {
    background: #fafafa !important;
    border: 1px solid var(--client2-border, #ececec) !important;
    color: var(--client2-ink, #2c2c2b) !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal #btnRecurringTime:hover,
body.page-client2 .client-modal #btnRecurringPricing:hover {
    background: #f4f4f2 !important;
    border-color: #d6d5d2 !important;
}

body.page-client2 .client-modal .btn-go-to-crm {
    background: #ffffff !important;
    color: var(--client2-ink, #2c2c2b) !important;
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius, 10px) !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .btn-go-to-crm:hover {
    background: #fafafa !important;
    transform: none !important;
    box-shadow: none !important;
}

body.page-client2 .client-modal .designated-cleaner-label-text {
    color: var(--client2-ink, #2c2c2b) !important;
}

body.page-client2 .client-modal .designated-cleaner-label-text i {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .btn-select-cleaners {
    background: var(--client2-ink, #2c2c2b) !important;
    border: none !important;
    border-radius: var(--client2-radius, 10px) !important;
}

body.page-client2 .client-modal .btn-select-cleaners:hover {
    background: #1f1f1e !important;
}

body.page-client2 .client-modal .modal-payments-container,
body.page-client2 .client-modal .modal-cleaner-container {
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius, 10px) !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

body.page-client2 .client-modal .payment-item {
    border-bottom: 1px solid var(--client2-border, #ececec) !important;
    background: #ffffff !important;
}

body.page-client2 .client-modal .payment-item:hover {
    background: #fafafa !important;
}

body.page-client2 .client-modal .payment-item.payment-success {
    border-left: 3px solid #6b7280 !important;
}

body.page-client2 .client-modal .payment-item.payment-pending {
    border-left: 3px solid #a8a29e !important;
}

body.page-client2 .client-modal .payment-type i {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .cleaner-entry {
    border-bottom: 1px solid var(--client2-border, #ececec) !important;
}

body.page-client2 .client-modal .cleaner-entry:hover {
    background: #fafafa !important;
}

body.page-client2 .client-modal .cleaner-name i {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .modal-messages-container {
    border: 1px solid var(--client2-border, #ececec) !important;
    background: #ffffff !important;
    border-radius: var(--client2-radius, 10px) var(--client2-radius, 10px) 0 0 !important;
}

body.page-client2 .client-modal .messages-resize-handle {
    background: #fafafa !important;
    border: 1px solid var(--client2-border, #ececec) !important;
    border-top: none !important;
}

body.page-client2 .client-modal .modal-message.message-inbound {
    background: #f7f7f6 !important;
    border-left: 3px solid #d6d5d2 !important;
}

body.page-client2 .client-modal .modal-message.message-outbound {
    background: #fafafa !important;
    border-left: 3px solid #c4c2be !important;
}

body.page-client2 .client-modal .message-sender,
body.page-client2 .client-modal .message-body {
    color: var(--client2-ink, #2c2c2b) !important;
}

body.page-client2 .client-modal .message-time {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .employee-feedbacks-section .employee-feedbacks-toggle {
    border: 1px solid var(--client2-border, #ececec) !important;
    border-radius: var(--client2-radius, 10px) !important;
    background: #ffffff !important;
}

body.page-client2 .client-modal .employee-feedbacks-toggle .employee-feedbacks-toggle-label i {
    color: var(--client2-ink-muted, #7d7a75) !important;
}

body.page-client2 .client-modal .modal-close {
    border-radius: var(--client2-radius, 10px) !important;
}

body.page-client2 .client-modal .modal-close:hover {
    background: #fafafa !important;
}

/* Compact inline note in modal header */
.client-modal .preferred-cleaner-selector {
    display: none !important;
}

.client-modal .modal-badges .client-inline-note {
    flex: 0 0 auto;
    max-width: 110px;
    margin: 0;
}

.client-inline-note {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.client-inline-note-body {
    min-width: 0;
    width: 100%;
}

.client-inline-note-input {
    width: 100%;
    min-height: 20px;
    max-height: 36px;
    padding: 1px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.3;
    resize: none;
    background: #fff !important;
    color: #374151 !important;
    font-family: inherit;
    -webkit-text-fill-color: #374151;
}

.client-inline-note-input::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af;
}

.client-inline-note-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.client-inline-note-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #e5e7eb;
    background: #fff !important;
    color: #787774 !important;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
}

.client-inline-note-add:hover {
    color: #374151 !important;
    border-color: #d1d5db;
    background: #f9fafb !important;
}

.client-inline-note-add-icon {
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
}

/* Header Open in CRM button */
.btn-open-crm {
    background: #fff;
    color: var(--primary-color, #0073ea);
    border: 1px solid rgba(0, 115, 234, 0.35);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-open-crm:hover {
    background: var(--primary-color, #0073ea);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 234, 0.25);
}

/* Sidebar action buttons above Recent cleanings */
.cleaning-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(249, 250, 251, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.btn-cleaning-sidebar-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cleaning-sidebar-action:hover {
    border-color: var(--primary-color, #0073ea);
    color: var(--primary-color, #0073ea);
    background: rgba(0, 115, 234, 0.04);
}

/* Client panel overlay */
.client2-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.client2-panel-overlay.active {
    display: flex;
}

.client2-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.client2-panel {
    position: relative;
    width: min(560px, 100%);
    max-height: min(80vh, 720px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.client2-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.client2-panel-header h3 {
    margin: 0;
    font-size: 17px;
    color: #111827;
}

.client2-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.client2-panel-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.client2-panel-body {
    padding: 16px 18px;
    overflow-y: auto;
}

.client-panel-section-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.client-panel-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
}

.employee-feedbacks-content--panel {
    display: block !important;
    max-height: none;
    border: none;
    padding: 0;
    background: transparent;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.page-client2 .client-modal .btn-open-crm {
    background: #fff;
    border-color: rgba(0, 115, 234, 0.35);
    color: var(--primary-color, #0073ea);
}

body.page-client2 .client-modal .btn-open-crm:hover {
    background: var(--primary-color, #0073ea);
    color: #fff;
}

body.page-client2 .cleaning-sidebar-actions {
    background: rgba(30, 37, 46, 0.35);
    border-color: rgba(255, 255, 255, 0.08);
}

body.page-client2 .btn-cleaning-sidebar-action {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

body.page-client2 .btn-cleaning-sidebar-action:hover {
    background: rgba(0, 115, 234, 0.15);
    border-color: rgba(0, 115, 234, 0.45);
    color: #fff;
}

body.page-client2 .client-modal .client-inline-note-input {
    background: #fff !important;
    border-color: #ececec !important;
    color: #2c2c2b !important;
    -webkit-text-fill-color: #2c2c2b !important;
}

body.page-client2 .client-modal .client-inline-note-input::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
}

body.page-client2 .client-modal .client-inline-note-add {
    background: #fff !important;
    border-color: #ececec !important;
    color: #787774 !important;
}

body.page-client2 .client-modal .client-inline-note-add:hover {
    color: #2c2c2b !important;
    background: #f5f5f4 !important;
    border-color: #d6d6d6 !important;
}

body.page-client2 .client-modal .modal-tag-badges.empty {
    display: none;
}

body.page-client2 .client-modal .preferred-cleaner-selector {
    display: none !important;
}

body.page-client2 .client2-panel {
    background: #1e252e;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-client2 .client2-panel-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.page-client2 .client2-panel-header h3 {
    color: #f3f4f6;
}

body.page-client2 .client2-panel-close {
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

body.page-client2 .client2-panel-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #f3f4f6;
}

