﻿/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Coordy Calendar â€” FullCalendar Dark Theme Overrides + Scheduler Layout
   Phase 14A
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€ Scheduler Modal Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body.coordy-modal-open {
    overflow: hidden !important;
}

.scheduler-modal {
    display: flex;
    flex-direction: row;
    content-visibility: auto;
    width: 100%;
    max-width: 1280px;
    height: 88vh;
    max-height: 900px;
    padding: 0;
    overflow: hidden;
    background: #151924;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 28px 76px rgba(2,6,23,0.62), 0 0 0 1px rgba(148,163,184,0.04);
    will-change: transform;
    transform: translateZ(0);
}

/* Restore the scheduler's pre-zoom working dimensions on desktop. Mobile keeps
   the existing drawer rules below and does not receive this compensation. */
@media (min-width: 1024px) {
    .scheduler-modal {
        zoom: 1.25;
    }
}

/* Mobile-only scheduler shell surfaces -- invisible on desktop by default,
   real styles live in mobile.css's consolidated mobile block. */
.scheduler-mobile-drawer-backdrop,
.scheduler-mobile-footer,
.scheduler-drawer-close-btn {
    display: none;
}

/* â”€â”€ Left Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-left-panel {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #1a1f2e;
    border-right: 1px solid rgba(255,255,255,0.08);
    overflow-y: auto;
    padding-bottom: 16px;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.02);
}

.scheduler-left-header {
    padding: 18px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
}

.scheduler-left-header::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(99,102,241,0.22), rgba(255,255,255,0.02) 55%, transparent);
}

.scheduler-left-title {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.scheduler-add-event-btn {
    margin: 10px 10px 4px;
    padding: 9px 14px;
    background: linear-gradient(180deg, rgba(99,102,241,0.26), rgba(99,102,241,0.16));
    color: #c7d2fe;
    border: 1px solid rgba(99,102,241,0.42);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    text-align: left;
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 8px rgba(99,102,241,0.12);
}
.scheduler-add-event-btn:hover {
    background: linear-gradient(180deg, rgba(99,102,241,0.38), rgba(99,102,241,0.24));
    border-color: rgba(99,102,241,0.58);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 14px rgba(99,102,241,0.18);
}
.scheduler-add-event-btn:focus-visible {
    outline: 2px solid rgba(99,102,241,0.7);
    outline-offset: 2px;
}

/* â”€â”€ Mini Nav Calendar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-mini-nav-wrap {
    padding: 12px 10px 4px;
}

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

.scheduler-mini-nav-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    flex: 1;
}

.scheduler-mini-nav-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s;
}
.scheduler-mini-nav-btn:hover { color: #a5b4fc; }

.scheduler-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.scheduler-mini-day-header {
    font-size: 10px;
    color: #475569;
    text-align: center;
    padding: 2px 0;
    font-weight: 600;
    text-transform: uppercase;
}

.scheduler-mini-day {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    padding: 4px 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    line-height: 1.2;
}
.scheduler-mini-day:hover {
    background: rgba(99,102,241,0.18);
    color: #c7d2fe;
}
.scheduler-mini-day.today {
    background: rgba(99,102,241,0.25);
    color: #a5b4fc;
    font-weight: 700;
}
.scheduler-mini-day.other-month { color: #2d3748; }
.scheduler-mini-day.has-events { position: relative; }
.scheduler-mini-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #a5b4fc;
}
.scheduler-mini-day.selected {
    background: rgba(99,102,241,0.35);
    color: #e0e7ff;
    font-weight: 600;
}

/* â”€â”€ Left Panel Sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-section-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.scheduler-filters-section {
    padding: 10px 14px 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 6px;
}

.scheduler-users-section {
    padding: 10px 14px 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 6px;
}

.scheduler-user-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
}

.scheduler-user-preset-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: #cbd5e1;
    border-radius: 999px;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(0);
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.scheduler-user-preset-btn:hover:not(:disabled) {
    border-color: rgba(99,102,241,0.28);
    background: rgba(99,102,241,0.08);
    color: #c7d2fe;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2,6,23,0.12);
}

.scheduler-user-preset-btn.active {
    border-color: rgba(99,102,241,0.46);
    background: linear-gradient(180deg, rgba(99,102,241,0.2), rgba(99,102,241,0.11));
    color: #dde6ff;
    box-shadow: 0 0 0 1px rgba(99,102,241,0.12) inset, 0 8px 18px rgba(2,6,23,0.12);
}

.scheduler-user-preset-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.scheduler-users-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.scheduler-users-list::-webkit-scrollbar {
    width: 7px;
}

.scheduler-users-list::-webkit-scrollbar-track {
    background: transparent;
}

.scheduler-users-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.16);
    border-radius: 999px;
}

.scheduler-users-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.24);
}

.scheduler-users-state {
    border: 1px dashed rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.015);
    color: #94a3b8;
    border-radius: 10px;
    padding: 10px 11px;
    font-size: 11px;
}

.scheduler-users-state.error {
    border-color: rgba(239,68,68,0.2);
    color: #fca5a5;
    background: rgba(239,68,68,0.04);
}

.scheduler-user-row {
    display: grid;
    grid-template-columns: 10px 22px 1fr;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.scheduler-user-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(99,102,241,0.15);
}

.scheduler-user-row input[type="checkbox"] {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    min-height: 6px !important;
    max-width: 6px !important;
    max-height: 6px !important;
    margin: 0 0 0 -5px !important;
    transform: none !important;
    align-self: center;
    justify-self: start;
    padding: 0 !important;
    line-height: 0 !important;
}

.scheduler-user-initial {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #dbeafe;
    background: rgba(59,130,246,0.18);
    border: 1px solid rgba(59,130,246,0.18);
}

.scheduler-user-label-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.scheduler-user-label {
    font-size: 12px;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduler-user-meta {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scheduler-coming-soon {
    font-size: 11px;
    color: #334155;
    font-style: italic;
}

.scheduler-type-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scheduler-type-filter-row {
    display: grid;
    grid-template-columns: 10px 8px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.scheduler-type-filter-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(99,102,241,0.15);
}

.scheduler-type-filter-checkbox {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    min-height: 6px !important;
    max-width: 6px !important;
    max-height: 6px !important;
    margin: 0 0 0 -5px !important;
    transform: none !important;
    align-self: center;
    justify-self: start;
    padding: 0 !important;
    line-height: 0 !important;
}

.scheduler-type-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.scheduler-type-filter-label {
    font-size: 12px;
    color: #cbd5e1;
}

.scheduler-type-filter-count {
    font-size: 11px;
    color: #64748b;
}

.scheduler-availability-btn,
.scheduler-working-hours-btn {
    margin: 0 10px 6px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.025);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 2px solid rgba(99,102,241,0.28);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    gap: 7px;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.scheduler-availability-btn:hover,
.scheduler-working-hours-btn:hover {
    border-color: rgba(99,102,241,0.35);
    border-left-color: rgba(99,102,241,0.65);
    background: rgba(99,102,241,0.07);
    color: #c7d2fe;
    transform: translateY(-1px);
}

.scheduler-availability-btn:focus-visible,
.scheduler-working-hours-btn:focus-visible {
    outline: 2px solid rgba(99,102,241,0.6);
    outline-offset: 2px;
}

.scheduler-legend {
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 8px;
}

.scheduler-legend-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
}

.scheduler-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    padding: 3px 6px;
    border-radius: 6px;
    transition: background 150ms ease, color 150ms ease;
    cursor: default;
}
.scheduler-legend-item:hover {
    background: rgba(255,255,255,0.03);
    color: #94a3b8;
}

.scheduler-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* â”€â”€ Right Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    position: relative;
    background: #1a1f2e;
}

.scheduler-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
    gap: 12px;
    position: relative;
}

.scheduler-right-header::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(14,165,233,0.18), rgba(255,255,255,0.04) 50%, transparent);
}

.scheduler-nav-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.scheduler-nav-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 18px;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.scheduler-nav-btn:hover { border-color: rgba(99,102,241,0.5); color: #a5b4fc; background: rgba(255,255,255,0.03); }

.scheduler-nav-label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    min-width: 160px;
    text-align: center;
}

.scheduler-nav-today {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #64748b;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.scheduler-nav-today:hover { border-color: rgba(99,102,241,0.4); color: #a5b4fc; background: rgba(255,255,255,0.03); }

.scheduler-view-toggle {
    display: flex;
    gap: 4px;
}

.scheduler-view-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #475569;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.scheduler-view-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    transform: translateY(-1px);
}
.scheduler-view-btn.active {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    color: #a5b4fc;
}

.scheduler-close-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.scheduler-header-override-btn {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 11px;
}

.scheduler-header-override-btn + .scheduler-close-btn {
    margin-left: 0;
}

.scheduler-overlay-count-badge {
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(99,102,241,0.34);
    background: linear-gradient(180deg, rgba(99,102,241,0.24), rgba(99,102,241,0.11));
    color: #eef2ff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(2,6,23,0.14);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease, opacity 180ms ease;
}

.scheduler-client-scope-badge {
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(16,185,129,0.28);
    background: linear-gradient(180deg, rgba(16,185,129,0.18), rgba(16,185,129,0.08));
    color: #d1fae5;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 16px rgba(2,6,23,0.10);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.scheduler-client-scope-badge[data-locked='true']::before {
    content: '\1F512';
    display: inline-block;
    margin-right: 6px;
    font-size: 10px;
    line-height: 1;
    vertical-align: -1px;
}

.scheduler-right-header .scheduler-overlay-count-badge.hidden {
    display: inline-flex !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.scheduler-mode-toggle {
    display: flex;
    gap: 4px;
    padding: 2px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(15,23,42,0.42);
    flex-shrink: 0;
}

.scheduler-mode-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.scheduler-mode-btn:hover {
    color: #cbd5e1;
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

.scheduler-mode-btn.active {
    color: #dbeafe;
    border-color: rgba(14,165,233,0.22);
    background: linear-gradient(180deg, rgba(14,165,233,0.16), rgba(14,165,233,0.08));
}

.scheduler-view-toggle.scheduler-view-toggle-muted {
    opacity: 0.6;
}

#schedulerCalendarContainer {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.scheduler-operations-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    background:
        radial-gradient(60% 100% at 0% 0%, rgba(56,189,248,0.025), transparent 60%),
        radial-gradient(70% 100% at 100% 0%, rgba(99,102,241,0.035), transparent 65%);
}

.scheduler-operations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 4px 2px;
}

.scheduler-operations-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.scheduler-operations-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.scheduler-operations-subtitle {
    font-size: 12px;
    color: #94a3b8;
}

.scheduler-operations-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(15,23,42,0.4);
}

.scheduler-ops-dot-stack {
    display: inline-flex;
    align-items: center;
    padding-left: 2px;
}

.scheduler-ops-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, rgba(14,165,233,0.85), rgba(99,102,241,0.85));
    box-shadow: 0 0 0 1px rgba(15,23,42,0.7);
    margin-left: calc(var(--scheduler-dot-index, 0) * -3px);
}

.scheduler-ops-dot-label {
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 600;
}

.scheduler-operations-axis {
    display: grid;
    grid-template-columns: repeat(var(--scheduler-ops-col-count, 10), minmax(0, 1fr));
    margin-left: 230px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: rgba(10,15,26,0.58);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 2;
}

.scheduler-ops-axis-tick {
    position: relative;
    padding: 8px 8px;
    border-right: 1px solid rgba(255,255,255,0.04);
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.scheduler-ops-axis-tick.last {
    border-right: none;
}

.scheduler-operations-rows {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.scheduler-operations-rows::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scheduler-operations-rows::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.scheduler-operations-rows::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.18);
    border-radius: 999px;
}

.scheduler-operations-empty {
    padding: 18px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.08);
    background: rgba(15,23,42,0.35);
    color: #94a3b8;
    font-size: 13px;
}

.scheduler-ops-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        linear-gradient(180deg, rgba(15,23,42,0.42), rgba(15,23,42,0.32)),
        linear-gradient(90deg, rgba(251,191,36,calc(var(--scheduler-ops-intensity, 0) * 0.12)), transparent 45%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), inset 0 -1px 0 rgba(255,255,255,0.015);
    padding: 8px;
}

.scheduler-ops-row.drop-target {
    border-color: rgba(14,165,233,0.35);
    box-shadow: 0 0 0 1px rgba(14,165,233,0.18) inset;
}

.scheduler-ops-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 4px 8px 4px 6px;
    border-radius: 10px;
    background: rgba(8,12,21,0.32);
    border: 1px solid rgba(255,255,255,0.03);
}

.scheduler-ops-user-initial {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #dbeafe;
    border: 1px solid rgba(99,102,241,0.18);
    background: linear-gradient(180deg, rgba(99,102,241,0.16), rgba(59,130,246,0.10));
    flex-shrink: 0;
}

.scheduler-ops-user-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scheduler-ops-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheduler-ops-user-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.scheduler-ops-user-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(15,23,42,0.55);
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.scheduler-ops-row-lane {
    position: relative;
    min-height: 56px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(12,17,29,0.46), rgba(12,17,29,0.34));
    overflow: hidden;
}

.scheduler-ops-lane-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scheduler-ops-lane-hour-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.05);
}

.scheduler-ops-lane-events {
    position: relative;
    height: 100%;
    padding: 7px 6px;
}

.scheduler-ops-row-empty {
    height: 100%;
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 12px;
    padding-left: 4px;
}

.scheduler-ops-event {
    position: absolute;
    top: 8px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(15,23,42,0.88);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 9px 0 0;
    cursor: pointer;
    min-width: 44px;
    box-shadow: 0 4px 14px rgba(2,6,23,0.18);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.scheduler-ops-event:hover {
    border-color: rgba(99,102,241,0.28);
    box-shadow: 0 6px 18px rgba(2,6,23,0.22);
    transform: translateY(-1px);
}

.scheduler-ops-event-strip {
    width: 5px;
    height: 100%;
    border-radius: 9px 0 0 9px;
    background: var(--scheduler-ops-strip, #6b7280);
    flex-shrink: 0;
}

.scheduler-ops-event.conflict {
    border-color: rgba(245,158,11,0.34);
    box-shadow: 0 0 0 1px rgba(245,158,11,0.08), 0 6px 16px rgba(2,6,23,0.22);
}

/* â”€â”€ Overridden overlap: dashed indigo border, split-lane positioning â”€â”€ */
.scheduler-ops-event.overridden {
    border-color: rgba(99,102,241,0.38);
    border-style: dashed;
    box-shadow: 0 0 0 1px rgba(99,102,241,0.1), 0 4px 12px rgba(2,6,23,0.2);
}

/* split-lane events get top/height from inline styles â€” reset the CSS defaults */
.scheduler-ops-event.split-lane {
    top: unset;
    height: unset;
    min-height: 26px;
}

/* Expand the lane container when split layout is active */
.scheduler-ops-row-lane[data-lane-count="2"] {
    min-height: 96px;
}
.scheduler-ops-row-lane[data-lane-count="3"] {
    min-height: 136px;
}

.scheduler-ops-event-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 600;
}

.scheduler-ops-event-badge {
    margin-left: auto;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fcd34d;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.2);
    flex-shrink: 0;
}

.scheduler-ops-event-badge.overridden-badge {
    color: #a5b4fc;
    background: rgba(99,102,241,0.14);
    border-color: rgba(99,102,241,0.28);
    font-size: 9px;
}

.scheduler-availability-panel {
    position: absolute;
    top: 52px;
    right: 0;
    bottom: 0;
    width: min(360px, 100%);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(15,23,42,0.97), rgba(15,23,42,0.985));
    border-left: 1px solid rgba(255,255,255,0.07);
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    box-shadow: -12px 0 26px rgba(2,6,23,0.28);
    transform: translateX(104%);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
    will-change: transform, opacity;
    z-index: 8;
}

.scheduler-availability-panel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: -14px 0 30px rgba(2,6,23,0.3);
}

.scheduler-availability-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(99,102,241,0.08), rgba(99,102,241,0));
}

.scheduler-availability-panel-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.scheduler-availability-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.scheduler-availability-close-btn:hover {
    border-color: rgba(255,255,255,0.16);
    color: #e2e8f0;
    background: rgba(255,255,255,0.03);
}

.scheduler-availability-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    min-height: 0;
    height: 100%;
}

.scheduler-availability-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scheduler-availability-date-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scheduler-availability-date-input {
    flex: 1;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(15,23,42,0.72);
    color: #e2e8f0;
    padding: 7px 10px;
    font-size: 12px;
    outline: none;
    color-scheme: dark;
}

.scheduler-availability-date-input:focus {
    border-color: rgba(99,102,241,0.38);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.scheduler-availability-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.scheduler-availability-agents-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduler-availability-agent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 2px;
}

.scheduler-availability-agent-list::-webkit-scrollbar {
    width: 7px;
}

.scheduler-availability-agent-list::-webkit-scrollbar-track {
    background: transparent;
}

.scheduler-availability-agent-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.18);
    border-radius: 999px;
}

.scheduler-availability-agent-row {
    display: grid;
    grid-template-columns: 10px 22px 1fr;
    align-items: center;
    gap: 12px;
    padding: 7px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.scheduler-availability-agent-row:hover {
    border-color: rgba(99,102,241,0.24);
    background: rgba(99,102,241,0.06);
}

.scheduler-availability-agent-row input[type="checkbox"] {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    min-height: 6px !important;
    max-width: 6px !important;
    max-height: 6px !important;
    margin: 0 0 0 -5px !important;
    transform: none !important;
    justify-self: start;
    accent-color: #6366f1;
    padding: 0 !important;
    line-height: 0 !important;
}

.scheduler-availability-agent-row-label {
    font-size: 12px;
    color: #cbd5e1;
}

.scheduler-availability-mode-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    flex: none !important;
    gap: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.015);
    padding: 9px 10px;
    font-family: Inter, "SF Pro Text", "Segoe UI", sans-serif;
}

.scheduler-availability-mode-option {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    font-size: 12px;
    color: #cbd5e1;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.scheduler-availability-mode-option:hover {
    background: rgba(30, 41, 59, 0.38);
    border-color: rgba(125, 211, 252, 0.2);
    transform: translateY(-1px);
}

.scheduler-availability-mode-option:has(input[type="radio"]:checked) {
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.14), rgba(15, 23, 42, 0.24)),
        rgba(15, 23, 42, 0.34);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow:
        0 10px 24px rgba(2, 6, 23, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.scheduler-availability-mode-option input[type="radio"] {
    margin: 2px 0 0 0 !important;
    transform: none !important;
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
    align-self: flex-start !important;
    accent-color: #60a5fa;
}

.scheduler-availability-mode-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 420px !important;
    height: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    text-align: left !important;
    font-family: Inter, "SF Pro Text", "Segoe UI", sans-serif;
    font-size: 13px !important;
    color: rgba(255,255,255,0.85) !important;
    position: static !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

.scheduler-availability-mode-title {
    display: block;
    color: rgba(226, 232, 240, 0.96);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

.scheduler-availability-mode-subtitle {
    display: block;
    color: rgba(203, 213, 225, 0.78);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0.78;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

.scheduler-availability-mode-option:has(input[type="radio"]:checked) .scheduler-availability-mode-title {
    color: #eff6ff;
}

.scheduler-availability-mode-option:has(input[type="radio"]:checked) .scheduler-availability-mode-subtitle {
    color: rgba(219, 234, 254, 0.82);
}

.scheduler-availability-duration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.scheduler-availability-duration-btn {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    color: #cbd5e1;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.scheduler-availability-duration-btn:hover {
    border-color: rgba(99,102,241,0.28);
    background: rgba(99,102,241,0.08);
    transform: translateY(-1px);
}

.scheduler-availability-duration-btn.active {
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.18);
    color: #c7d2fe;
    box-shadow: 0 0 0 1px rgba(100,150,255,0.5), 0 0 10px rgba(100,150,255,0.25);
}

.scheduler-availability-custom-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.scheduler-availability-custom-row input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(15,23,42,0.72);
    color: #e2e8f0;
    padding: 9px 10px;
    font-size: 12px;
    outline: none;
}

.scheduler-availability-custom-row input:focus {
    border-color: rgba(99,102,241,0.38);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.scheduler-availability-custom-btn {
    min-width: 88px;
}

.scheduler-availability-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.scheduler-availability-results::-webkit-scrollbar {
    width: 8px;
}

.scheduler-availability-results::-webkit-scrollbar-track {
    background: transparent;
}

.scheduler-availability-results::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.18);
    border-radius: 999px;
}

.scheduler-availability-results::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.28);
}

.scheduler-availability-state {
    border: 1px dashed rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.015);
    color: #94a3b8;
    border-radius: 10px;
    padding: 14px 12px;
    font-size: 12px;
}

.scheduler-availability-state.error {
    border-color: rgba(239,68,68,0.2);
    color: #fca5a5;
    background: rgba(239,68,68,0.04);
}

.scheduler-availability-slot-row {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease, transform 150ms ease;
}

.scheduler-availability-slot-row:hover {
    border-color: rgba(100,150,255,0.35);
    background: rgba(100,150,255,0.08);
    transform: translateY(-1px);
}

.scheduler-availability-slot-row:active {
    transform: scale(0.98);
}

.scheduler-availability-slot-day {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    opacity: 0.7;
}

.scheduler-availability-slot-time {
    font-size: 14px;
    font-weight: 600;
    color: #a5b4fc;
}

.scheduler-event-form-overlay {
    z-index: 12001;
}

/* Broker Office keeps its Calendar parent mounted and raises active modal overlays
   to 100000. Keep the Scheduler child strictly above that shared layer. */
body.broker-command-modal-open #schedulerEventFormModal.scheduler-event-form-overlay.active {
    z-index: 100001 !important;
}

.scheduler-working-hours-overlay {
    z-index: 12000;
}

.scheduler-working-hours-modal {
    width: min(520px, calc(100vw - 32px));
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(180deg, rgba(21,25,36,0.98), rgba(15,23,42,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(2,6,23,0.5), 0 0 0 1px rgba(99,102,241,0.08);
}

.scheduler-working-hours-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(99,102,241,0.09), rgba(99,102,241,0));
}

.scheduler-working-hours-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
}

.scheduler-working-hours-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    min-height: 0;
    overflow-y: auto;
}

.scheduler-working-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.scheduler-working-day-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 4px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    background: rgba(255,255,255,0.02);
    color: #dbe7ff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    text-align: center;
}

.scheduler-working-day-chip:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.08);
}

.scheduler-working-day-chip input[type="checkbox"] {
    margin: 0;
    width: 12px;
    height: 12px;
    accent-color: #6366f1;
}

.scheduler-working-hours-state {
    border: 1px dashed rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.02);
    color: #94a3b8;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
}

.scheduler-working-hours-state.error {
    border-color: rgba(239,68,68,0.24);
    background: rgba(239,68,68,0.06);
    color: #fca5a5;
}

.scheduler-working-hours-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.scheduler-event-form-modal {
    width: min(520px, calc(100vw - 32px));
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(180deg, rgba(21,25,36,0.98), rgba(15,23,42,0.98));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(2,6,23,0.5), 0 0 0 1px rgba(99,102,241,0.08);
    overflow: visible;
}

.scheduler-event-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(99,102,241,0.09), rgba(99,102,241,0));
}

.scheduler-event-form-title {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
    flex: 1;
    min-width: 0;
}

/* â”€â”€ Override Overlap button (appears in modal header when conflict detected) â”€â”€ */
.sched-override-overlap-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.32);
    color: #fbbf24;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sched-override-overlap-btn:hover {
    background: rgba(245,158,11,0.2);
    border-color: rgba(245,158,11,0.55);
    color: #fef08a;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.12);
}
.sched-override-overlap-btn.hidden { display: none; }

.scheduler-event-form-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
}

.scheduler-event-form-scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    overscroll-behavior: contain;
}

.scheduler-event-form-scroll::-webkit-scrollbar {
    width: 8px;
}

.scheduler-event-form-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.scheduler-event-form-scroll::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.2);
    border-radius: 999px;
}

.scheduler-event-form-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.34);
}

.scheduler-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.scheduler-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scheduler-form-row.scheduler-form-row-inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.scheduler-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.scheduler-inline-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #6366f1;
}

.scheduler-form-row.scheduler-form-row-disabled label,
.scheduler-form-row.scheduler-form-row-disabled select {
    opacity: 0.7;
}

.scheduler-form-row label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.scheduler-form-row input,
.scheduler-form-row select,
.scheduler-form-row textarea {
    width: 100%;
    background: rgba(15,23,42,0.7);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 11px;
    font-size: 13px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.scheduler-form-row textarea {
    resize: vertical;
    min-height: 74px;
}

.scheduler-form-row input[type="color"] {
    padding: 4px;
    height: 38px;
    cursor: pointer;
}

/* â”€â”€ Custom DateTime Picker â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sched-dtp {
    position: relative;
}
.sched-dtp-compact .sched-dtp-trigger {
    min-height: 42px;
}
.sched-dtp-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: rgba(15,23,42,0.7);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 10px 11px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease;
    user-select: none;
    box-sizing: border-box;
}
.sched-dtp-trigger:hover,
.sched-dtp-trigger:focus-visible {
    border-color: rgba(99,102,241,0.45);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.13);
    outline: none;
}
.sched-dtp-value {
    flex: 1;
    color: #94a3b8;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sched-dtp-value[data-filled="true"] {
    color: #e2e8f0;
}
.sched-dtp-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 13040;
    background: #0d1526;
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7);
    width: 290px;
    overflow: hidden;
}
.sched-dtp-panel.hidden { display: none; }

.sched-dtp-panel.sched-dtp-panel-portal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000010;
}

.scheduler-event-form-modal.scheduler-event-form-all-day .sched-dtp-clock-section,
.scheduler-event-form-modal.scheduler-event-form-all-day .sched-dtp-back-btn {
    display: none !important;
}

/* Calendar */
.sched-dtp-cal-section { padding: 14px 14px 10px; }
.sched-dtp-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.sched-dtp-cal-label {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}
.sched-dtp-nav {
    background: none;
    border: none;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 120ms, color 120ms;
}
.sched-dtp-nav:hover { background: rgba(99,102,241,0.14); color: #e2e8f0; }
.sched-dtp-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.sched-dtp-clear {
    border: 1px solid rgba(148,163,184,0.28);
    background: rgba(15,23,42,0.34);
    color: #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    line-height: 1.2;
    padding: 5px 8px;
}
.sched-dtp-clear:hover { background: rgba(99,102,241,0.14); color: #f8fafc; }
.sched-dtp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}
.sched-dtp-weekdays span {
    font-size: 10px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 0;
}
.sched-dtp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.sched-dtp-day {
    text-align: center;
    padding: 7px 2px;
    border-radius: 7px;
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: background 100ms, color 100ms;
}
.sched-dtp-day:not(.empty):hover { background: rgba(99,102,241,0.18); color: #e2e8f0; }
.sched-dtp-day.today { color: #818cf8; font-weight: 700; }
.sched-dtp-day.selected { background: #6366f1; color: #fff; font-weight: 700; border-radius: 50%; }
.sched-dtp-day.empty { cursor: default; }

/* Clock */
.sched-dtp-clock-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.sched-dtp-clock-section.hidden { display: none; }

/* Time wheel picker */
.sched-dtp-wheel-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: flex-start;
}
.sched-dtp-wheel-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 180px;
}
.sched-dtp-wheel-row.hour-only { gap: 10px; }
.sched-dtp-wheel {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 180px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    padding: 72px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-y;
    outline: none;
}
.sched-dtp-wheel::-webkit-scrollbar { display: none; }
.sched-dtp-wheel.sched-dtp-wheel-ampm { width: 60px; }
.sched-dtp-wheel.sched-dtp-wheel-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
}
.sched-dtp-wheel.hidden { display: none; }
.sched-dtp-wheel-item {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    opacity: 0.45;
    cursor: pointer;
    user-select: none;
    transition: opacity 140ms ease, color 140ms ease, font-weight 140ms ease, font-size 140ms ease;
}
.sched-dtp-wheel-item.is-near { opacity: 0.7; color: #94a3b8; }
.sched-dtp-wheel-item.is-center {
    opacity: 1;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
}
.sched-dtp-wheel-colon {
    align-self: center;
    font-size: 17px;
    font-weight: 700;
    color: #475569;
    padding-bottom: 1px;
}
.sched-dtp-wheel-colon.hidden { display: none; }
.sched-dtp-wheel-band {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    height: 36px;
    border-radius: 8px;
    background: rgba(99,102,241,0.14);
    border-top: 1px solid rgba(99,102,241,0.45);
    border-bottom: 1px solid rgba(99,102,241,0.45);
    pointer-events: none;
    z-index: 0;
}
.sched-dtp-wheel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
}
.sched-dtp-wheel-btn {
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.sched-dtp-wheel-btn--cancel {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
    color: #94a3b8;
}
.sched-dtp-wheel-btn--cancel:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }
.sched-dtp-wheel-btn--save {
    background: #6366f1;
    color: #fff;
}
.sched-dtp-wheel-btn--save:hover { background: #7278f5; }

.sched-dtp-back-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 120ms;
    letter-spacing: 0.02em;
}
.sched-dtp-back-btn:hover { background: rgba(99,102,241,0.12); }

.sched-dtp-no-time-btn {
    background: rgba(30,41,59,0.72);
    border: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e1;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}
.sched-dtp-no-time-btn:hover {
    border-color: rgba(99,102,241,0.5);
    background: rgba(51,65,85,0.72);
}

.sched-dtp-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.scheduler-form-row input:focus,
.scheduler-form-row select:focus,
.scheduler-form-row textarea:focus {
    border-color: rgba(99,102,241,0.45);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.13);
}

.scheduler-form-row input:disabled,
.scheduler-form-row select:disabled,
.scheduler-form-row textarea:disabled {
    cursor: not-allowed;
    color: #94a3b8;
    background: rgba(15,23,42,0.45);
}

.scheduler-event-suggest-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(245,158,11,0.18);
    background: linear-gradient(180deg, rgba(245,158,11,0.06), rgba(245,158,11,0.02));
}

.scheduler-agent-suggest-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(99,102,241,0.15);
    background: linear-gradient(180deg, rgba(99,102,241,0.06), rgba(99,102,241,0.02));
}

.scheduler-event-task-link-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.14);
    background: linear-gradient(180deg, rgba(148,163,184,0.05), rgba(148,163,184,0.015));
}

.scheduler-event-task-link-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.scheduler-event-task-link-title {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.scheduler-event-task-link-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduler-event-task-link-empty {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.35;
}

.scheduler-event-task-link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    padding: 9px 10px;
}

.scheduler-event-task-link-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.scheduler-event-task-link-name {
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
}

.scheduler-event-task-link-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #94a3b8;
    font-size: 11px;
}

.scheduler-event-task-link-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.03em;
    border: 1px solid rgba(148,163,184,0.18);
    background: rgba(148,163,184,0.08);
    color: #cbd5e1;
}

.scheduler-event-task-link-status.completed {
    border-color: rgba(16,185,129,0.22);
    background: rgba(16,185,129,0.10);
    color: #bbf7d0;
}

.scheduler-event-task-link-status.in_progress {
    border-color: rgba(59,130,246,0.22);
    background: rgba(59,130,246,0.10);
    color: #bfdbfe;
}

.scheduler-event-task-link-status.overdue {
    border-color: rgba(245,158,11,0.22);
    background: rgba(245,158,11,0.10);
    color: #fde68a;
}

.scheduler-event-task-link-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.scheduler-event-task-link-btn {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    color: #dbe2f2;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.scheduler-event-task-link-btn:hover {
    border-color: rgba(99,102,241,0.25);
    background: rgba(99,102,241,0.08);
    color: #e0e7ff;
    transform: translateY(-1px);
}

.scheduler-event-task-link-btn.secondary {
    color: #fca5a5;
    border-color: rgba(239,68,68,0.16);
    background: rgba(239,68,68,0.03);
}

.scheduler-event-task-link-btn.secondary:hover {
    border-color: rgba(239,68,68,0.28);
    background: rgba(239,68,68,0.08);
    color: #fecaca;
}

.scheduler-event-task-link-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-linked-task {
    background: rgba(91,124,255,0.15);
    color: #5B7CFF;
    border: 1px solid rgba(91,124,255,0.35);
}

.btn-linked-task:hover:not(:disabled) {
    background: rgba(91,124,255,0.22);
    border-color: rgba(91,124,255,0.5);
    color: #7f98ff;
}

.scheduler-event-task-link-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduler-event-task-link-search input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(15,23,42,0.72);
    color: #e2e8f0;
    padding: 9px 10px;
    font-size: 12px;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.scheduler-event-task-link-search input:focus {
    border-color: rgba(99,102,241,0.38);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.scheduler-event-task-link-search-status {
    font-size: 11px;
    color: #94a3b8;
}

.scheduler-event-task-link-search-status.error {
    color: #fca5a5;
}

.scheduler-event-task-link-search-results {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}

.scheduler-event-task-link-search-result {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.scheduler-event-task-link-search-result:hover {
    border-color: rgba(99,102,241,0.28);
    background: rgba(99,102,241,0.08);
    transform: translateY(-1px);
}

.scheduler-event-task-link-search-result-title {
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
}

.scheduler-event-task-link-search-result-meta {
    font-size: 11px;
    color: #94a3b8;
}

.scheduler-agent-suggest-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.scheduler-agent-suggest-note {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    text-align: right;
}

.scheduler-agent-suggestion-box {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduler-agent-suggestion-status {
    font-size: 12px;
    color: #94a3b8;
}

.scheduler-agent-suggestion-status.error {
    color: #fca5a5;
}

.scheduler-agent-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}

.scheduler-agent-suggestion-list::-webkit-scrollbar {
    width: 7px;
}

.scheduler-agent-suggestion-list::-webkit-scrollbar-track {
    background: transparent;
}

.scheduler-agent-suggestion-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.18);
    border-radius: 999px;
}

.scheduler-agent-suggestion-row {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.scheduler-agent-suggestion-row:hover {
    border-color: rgba(99,102,241,0.28);
    background: rgba(99,102,241,0.08);
    transform: translateY(-1px);
}

.scheduler-agent-suggestion-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.scheduler-agent-suggestion-name {
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
}

.scheduler-agent-suggestion-score {
    color: #c7d2fe;
    font-size: 11px;
    font-weight: 700;
}

.scheduler-agent-suggestion-metrics {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.35;
}

.scheduler-event-conflict-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.scheduler-event-conflict-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.scheduler-event-conflict-badge {
    border-radius: 999px;
    border: 1px solid rgba(245,158,11,0.35);
    background: rgba(245,158,11,0.12);
    color: #fcd34d;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 7px;
    flex-shrink: 0;
}

.scheduler-event-conflict-text {
    color: #fbbf24;
    font-size: 12px;
    line-height: 1.3;
}

.scheduler-event-suggest-btn {
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,0.28);
    background: rgba(99,102,241,0.14);
    color: #c7d2fe;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.scheduler-event-suggest-btn:hover:not(:disabled) {
    background: rgba(99,102,241,0.2);
    border-color: rgba(129,140,248,0.38);
}

.scheduler-event-suggest-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scheduler-event-suggestion-box {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduler-event-suggestion-status {
    font-size: 12px;
    color: #94a3b8;
}

.scheduler-event-suggestion-status.error {
    color: #fca5a5;
}

.scheduler-event-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}

.scheduler-event-suggestion-list::-webkit-scrollbar {
    width: 7px;
}

.scheduler-event-suggestion-list::-webkit-scrollbar-track {
    background: transparent;
}

.scheduler-event-suggestion-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.18);
    border-radius: 999px;
}

.scheduler-event-suggestion-row {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.scheduler-event-suggestion-row:hover {
    border-color: rgba(99,102,241,0.28);
    background: rgba(99,102,241,0.08);
    transform: translateY(-1px);
}

.scheduler-event-suggestion-day {
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
}

.scheduler-event-suggestion-time {
    color: #a5b4fc;
    font-size: 12px;
}

.scheduler-event-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(15,23,42,0.78), rgba(15,23,42,0.96));
}

.scheduler-event-form-actions-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.scheduler-event-form-save,
.scheduler-event-form-cancel,
.scheduler-event-form-delete {
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.scheduler-event-form-save {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.4);
    color: #c7d2fe;
}

.scheduler-event-form-save:hover:not(:disabled) {
    background: rgba(99,102,241,0.26);
    border-color: rgba(129,140,248,0.5);
}

.scheduler-event-form-cancel {
    background: transparent;
    color: #94a3b8;
}

.scheduler-event-form-cancel:hover {
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.16);
}

.scheduler-event-form-delete {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.25);
    color: #fca5a5;
}

.scheduler-event-form-delete:hover:not(:disabled) {
    background: rgba(239,68,68,0.14);
    border-color: rgba(239,68,68,0.35);
}

.scheduler-event-form-save:disabled,
.scheduler-event-form-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .scheduler-form-grid {
        grid-template-columns: 1fr;
    }

    .scheduler-event-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .scheduler-event-form-actions-right {
        width: 100%;
        margin-left: 0;
    }

    .scheduler-event-form-save,
    .scheduler-event-form-cancel,
    .scheduler-event-form-delete {
        width: 100%;
    }

    .scheduler-mode-toggle {
        width: 100%;
        order: 3;
        justify-content: stretch;
    }

    .scheduler-mode-btn {
        flex: 1;
        text-align: center;
    }

    .scheduler-operations-axis {
        margin-left: 0;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .scheduler-ops-axis-tick:nth-child(n+6) {
        display: none;
    }

    .scheduler-ops-row {
        grid-template-columns: 1fr;
    }

    .scheduler-ops-row-meta {
        padding-bottom: 0;
    }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   FullCalendar Dark Theme Overrides
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Override FC's light defaults */
.fc {
    --fc-border-color: rgba(255,255,255,0.06);
    --fc-button-bg-color: transparent;
    --fc-button-border-color: rgba(255,255,255,0.1);
    --fc-button-hover-bg-color: rgba(99,102,241,0.15);
    --fc-button-hover-border-color: rgba(99,102,241,0.4);
    --fc-button-active-bg-color: rgba(99,102,241,0.25);
    --fc-today-bg-color: rgba(99,102,241,0.08);
    --fc-now-indicator-color: #f43f5e;
    --fc-highlight-color: rgba(99,102,241,0.12);
    --fc-event-bg-color: transparent;
    --fc-event-border-color: transparent;
    --fc-event-text-color: #e2e8f0;
    --fc-page-bg-color: #151924;
    --fc-neutral-bg-color: #1a1f2e;
    --fc-list-event-hover-bg-color: rgba(255,255,255,0.04);
    font-family: inherit;
    font-size: 12px;
    color: #94a3b8;
    height: 100%;
}

/* Table cells */
.fc .fc-scrollgrid,
.fc .fc-scrollgrid table,
.fc .fc-scrollgrid td,
.fc .fc-scrollgrid th {
    border-color: rgba(255,255,255,0.06) !important;
}

.fc .fc-daygrid-day,
.fc .fc-timegrid-col {
    background: #1a1f2e;
}

.fc .fc-timegrid-col.fc-day-today,
.fc .fc-daygrid-day.fc-day-today {
    background: rgba(120,140,255,0.05) !important;
}

.fc .fc-col-header-cell.fc-day-today .fc-col-header-cell-cushion {
    color: #8ea2ff;
    font-weight: 600;
}

/* Column headers (day names) */
.fc .fc-col-header-cell {
    background: #1a1f2e;
    padding: 6px 0;
}
.fc .fc-col-header-cell-cushion {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
}

/* Time slot labels */
.fc .fc-timegrid-slot-label-cushion {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
}

/* Day number links */
.fc .fc-daygrid-day-number {
    color: #64748b;
    font-size: 11px;
    text-decoration: none;
}
.fc .fc-day-today .fc-daygrid-day-number {
    color: #a5b4fc;
    font-weight: 700;
}

/* Business hours shading */
.fc .fc-non-business {
    background: rgba(0,0,0,0.18);
}

#schedulerCalendarContainer.scheduler-working-hours-highlight-active .fc .fc-timegrid-col {
    background:
        linear-gradient(180deg, rgba(56,189,248,0.05), rgba(56,189,248,0.02)),
        #121722;
}

#schedulerCalendarContainer.scheduler-working-hours-highlight-active .fc .fc-non-business {
    background: rgba(2,6,23,0.46);
}

/* Now indicator â€” solid line with glow + circle dot marker */
.fc .fc-now-indicator-line,
.fc .fc-timegrid-now-indicator-line {
    border-color: #f43f5e;
    border-width: 2px;
    opacity: 1;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.55);
}
.fc .fc-now-indicator-arrow,
.fc .fc-timegrid-now-indicator-arrow {
    border: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f43f5e;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.7);
    margin-top: -4px;
}

/* â”€â”€ Custom Event Renderer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fc-event {
    background: rgba(24,30,44,0.94) !important;
    border: 1px solid rgba(148,163,184,0.18) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(2,6,23,0.28), inset 0 1px 0 rgba(255,255,255,0.03);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}
.fc-event:hover {
    background: rgba(27,34,49,0.96) !important;
    border-color: rgba(129,140,248,0.45) !important;
    box-shadow: 0 0 0 1px rgba(129,140,248,0.16), 0 8px 18px rgba(2,6,23,0.16);
    transform: translateY(-1px);
}

.coordy-event {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 6px;
    height: 100%;
    min-height: 18px;
    overflow: hidden;
}

.coordy-event-has-linked-task {
    gap: 4px;
}

.coordy-event-conflict {
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(245,158,11,0.28), 0 0 8px rgba(245,158,11,0.07);
}

.coordy-event-overridden {
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(129,140,248,0.28), 0 0 8px rgba(99,102,241,0.08);
}

.coordy-event-strip {
    width: 5px;
    min-width: 5px;
    border-radius: 4px;
    height: 100%;
    min-height: 14px;
    flex-shrink: 0;
    align-self: stretch;
    margin-top: 1px;
}

.coordy-event-title {
    font-size: 11px;
    font-weight: 600;
    color: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
    letter-spacing: 0.01em;
    flex: 1;
    min-width: 0;
}

.coordy-event-linked-task-icon,
.event-linked-task,
.event-linked-icon {
    flex-shrink: 0;
    align-self: center;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 8px;
    line-height: 1;
    color: #dbeafe;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(96,165,250,0.16);
}

.event-linked-icon {
    font-size: 12px;
    margin-left: 6px;
    opacity: 0.8;
}

.coordy-event.coordy-event-task-priority-low {
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
    border-radius: 8px;
}

.coordy-event.coordy-event-task-priority-medium {
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
    border-radius: 8px;
}

.coordy-event.coordy-event-task-priority-high {
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.2);
    border-radius: 8px;
}

.coordy-event.coordy-event-task-priority-urgent {
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.24);
    border-radius: 8px;
}

.coordy-event-owner-badge {
    flex-shrink: 0;
    align-self: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #dbeafe;
    background: rgba(59,130,246,0.14);
    border: 1px solid rgba(59,130,246,0.18);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.coordy-event-conflict-badge {
    flex-shrink: 0;
    align-self: center;
    border: 1px solid rgba(245,158,11,0.35);
    background: rgba(245,158,11,0.12);
    color: #fcd34d;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    margin-left: 2px;
    letter-spacing: 0.02em;
    transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.coordy-event-override-badge {
    border-color: rgba(129,140,248,0.35);
    background: rgba(129,140,248,0.14);
    color: #c7d2fe;
}

/* All-day events */
.fc .fc-timegrid-allday .fc-daygrid-day-frame {
    min-height: 54px;
    padding-top: 4px;
    padding-bottom: 6px;
}

.fc .fc-timegrid-allday .fc-daygrid-day-events {
    min-height: 42px;
    margin: 0 4px;
}

.fc .fc-timegrid-allday .fc-daygrid-event-harness {
    margin-top: 3px;
    margin-bottom: 3px;
}

.fc .fc-timegrid-allday .fc-daygrid-event .coordy-event {
    padding: 4px 8px;
    min-height: 24px;
    align-items: center;
}

.fc-daygrid-event .coordy-event-conflict-badge {
    display: none;
}

.fc-daygrid-event .coordy-event-owner-badge {
    display: none;
}

.scheduler-event-hover-tooltip {
    position: fixed;
    z-index: 10020;
    min-width: 220px;
    max-width: 280px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.34);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    transition: opacity 180ms ease, transform 180ms ease;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow: hidden;
}

.scheduler-event-hover-tooltip,
.scheduler-event-hover-tooltip * {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.scheduler-event-hover-tooltip.hidden {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

.scheduler-event-hover-tooltip .hidden {
    display: none !important;
}

.scheduler-event-hover-tooltip-title {
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.35;
    margin-bottom: 6px;
}

.scheduler-event-hover-tooltip-meta {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    font-size: 11px;
    color: #cbd5e1;
}

.scheduler-event-hover-tooltip-description {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.4;
    color: #cbd5e1;
}

.scheduler-event-hover-tooltip-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.scheduler-event-hover-tooltip-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.14);
}

.scheduler-event-hover-tooltip-open {
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(59, 130, 246, 0.1);
    color: #bfdbfe;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.scheduler-event-hover-tooltip-open:hover {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.32);
    color: #dbeafe;
}

.scheduler-event-hover-tooltip-hint {
    margin-top: 7px;
    font-size: 10px;
    line-height: 1.35;
    color: #94a3b8;
}

/* â”€â”€ Scrollbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fc .fc-scroller::-webkit-scrollbar { width: 5px; }
.fc .fc-scroller::-webkit-scrollbar-track { background: transparent; }
.fc .fc-scroller::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}
.fc .fc-scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.14);
}

/* Office Classic (luxury) FullCalendar readability overrides */
body[data-theme="luxury"] .fc {
    --fc-border-color: var(--scheduler-border);
    --fc-button-bg-color: var(--surface-elev-1);
    --fc-button-border-color: var(--border-default);
    --fc-button-hover-bg-color: var(--accent-soft-bg);
    --fc-button-hover-border-color: var(--accent-soft-border);
    --fc-button-active-bg-color: var(--nav-item-active-bg);
    --fc-today-bg-color: rgba(var(--accent-primary-rgb), 0.1);
    --fc-now-indicator-color: var(--scheduler-now-indicator);
    --fc-highlight-color: rgba(var(--accent-primary-rgb), 0.12);
    --fc-event-text-color: var(--scheduler-text);
    --fc-page-bg-color: var(--scheduler-bg);
    --fc-neutral-bg-color: var(--surface-elev-2);
    --fc-list-event-hover-bg-color: var(--table-row-hover-bg);
    color: var(--scheduler-text-muted);
}

body[data-theme="luxury"] .fc .fc-scrollgrid,
body[data-theme="luxury"] .fc .fc-scrollgrid table,
body[data-theme="luxury"] .fc .fc-scrollgrid td,
body[data-theme="luxury"] .fc .fc-scrollgrid th {
    border-color: var(--scheduler-border) !important;
}

/* Timed-body day separators drawn as background-image stripe on fc-timegrid-col.
   Why border/shadow approaches all fail:
     â€¢ .fc table { border-collapse: collapse } â€” all inner tables use collapse mode;
       FC's hidden table borders suppress any border-left/right regardless of !important.
     â€¢ fc-timegrid-col-bg: position:absolute, top:0, NO bottom â†’ height:0 â†’ box-shadow invisible.
     â€¢ fc-timegrid-cols (the events overlay) has z-index:auto(0), rendered BELOW
       fc-timegrid-slots (z-index:1); anything painted inside the overlay is hidden.
   The column surface we see is the slot-row td.fc-timegrid-col inside fc-timegrid-slots.
   Adding the stripe as a background-image layer on that same element is guaranteed visible. */

/* Day separators: header + all-day rows.
   Timed body uses background-image stripe (see fc-timegrid-col rule below). */
body[data-theme="luxury"] .fc .fc-col-header-cell,
body[data-theme="luxury"] .fc .fc-daygrid-day {
    border-left: 2px solid #9fc6a6 !important;
}

body[data-theme="luxury"] .fc .fc-col-header-cell {
    background: var(--surface-elev-2);
}

body[data-theme="luxury"] .fc .fc-col-header-cell-cushion {
    color: var(--scheduler-text);
}

body[data-theme="luxury"] .fc .fc-daygrid-day {
    background:
        linear-gradient(180deg, rgba(var(--accent-primary-rgb), 0.018), rgba(var(--accent-primary-rgb), 0.03)),
        var(--scheduler-surface);
}

/* 2px separator stripe at the right edge of each timed-body column cell.
   Layered as the topmost background so it paints on the visible slot-row surface. */
body[data-theme="luxury"] .fc .fc-timegrid-col {
    background:
        linear-gradient(to left, var(--scheduler-border) 2px, transparent 2px),
        linear-gradient(180deg, rgba(var(--accent-primary-rgb), 0.018), rgba(var(--accent-primary-rgb), 0.03)),
        var(--scheduler-surface);
}

body[data-theme="luxury"] .fc .fc-timegrid-col.fc-day-today,
body[data-theme="luxury"] .fc .fc-daygrid-day.fc-day-today {
    background: rgba(var(--accent-primary-rgb), 0.08) !important;
}

body[data-theme="luxury"] .fc .fc-timegrid-slot-label-cushion,
body[data-theme="luxury"] .fc .fc-daygrid-day-number {
    color: var(--scheduler-text-muted);
}

body[data-theme="luxury"] .fc td.fc-timegrid-slot {
    border-top-color: var(--border-subtle);
}

body[data-theme="luxury"] .fc .fc-non-business {
    background: rgba(148, 163, 184, 0.1);
}

body[data-theme="luxury"] .fc-event {
    background: var(--scheduler-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--scheduler-border) !important;
    box-shadow: var(--shadow-sm);
}

body[data-theme="luxury"] .fc .fc-event-title,
body[data-theme="luxury"] .fc .fc-event-time,
body[data-theme="luxury"] .fc .fc-event-main,
body[data-theme="luxury"] .fc .fc-event-main-frame,
body[data-theme="luxury"] .fc .coordy-event-title {
    color: var(--text-primary) !important;
}

body[data-theme="luxury"] .fc-event:hover {
    border-color: var(--accent-soft-border) !important;
    box-shadow: var(--shadow-md);
}

body[data-theme="luxury"] .fc .fc-scroller::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
}

body[data-theme="luxury"] .fc .fc-scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}

/* â”€â”€ Scheduler Zoom Controls â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-zoom-control {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px;
    padding: 3px;
}

.scheduler-zoom-btn {
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    white-space: nowrap;
}

.scheduler-zoom-btn:hover {
    background: rgba(255,255,255,0.06);
    color: #cbd5e1;
}

.scheduler-zoom-btn.active {
    background: rgba(99,102,241,0.22);
    color: #c7d2fe;
}

/* Zoom slot heights â€” Full uses default (fills container without scrolling).
   Normal/Focus force a fixed slot height so 30-min events become clearly
   visible; the scroller handles overflow and the modal stays full-height.
   Using height (not min-height) so it overrides any JS-computed inline values
   that FullCalendar may have set via expandRows / updateSize. */
#schedulerCalendarContainer.scheduler-zoom-normal td.fc-timegrid-slot {
    height: 2.4em !important;
}

#schedulerCalendarContainer.scheduler-zoom-tight td.fc-timegrid-slot {
    height: 4em !important;
}

/* â”€â”€ Operations View â€” Week Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-ops-week-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.scheduler-ops-week-nav-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #94a3b8;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.scheduler-ops-week-nav-btn:hover {
    border-color: rgba(99,102,241,0.3);
    color: #c7d2fe;
    background: rgba(99,102,241,0.08);
}

.scheduler-ops-week-strip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.scheduler-ops-week-strip::-webkit-scrollbar { display: none; }

.scheduler-ops-day-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.025);
    color: #94a3b8;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
    min-width: 48px;
    flex-shrink: 0;
}

.scheduler-ops-day-pill:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.07);
    color: #cbd5e1;
}

.scheduler-ops-day-pill.active {
    border-color: rgba(99,102,241,0.45);
    background: rgba(99,102,241,0.18);
    color: #c7d2fe;
}

.scheduler-ops-day-pill.today .scheduler-ops-day-pill-num {
    color: #818cf8;
    font-weight: 800;
}

.scheduler-ops-day-pill.weekend {
    opacity: 0.65;
}

.scheduler-ops-day-pill-name {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scheduler-ops-day-pill-num {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.scheduler-ops-day-pill-count {
    font-size: 10px;
    font-weight: 600;
    background: rgba(99,102,241,0.3);
    color: #c7d2fe;
    border-radius: 999px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
}

/* Week sections within the rows container */
.scheduler-ops-week-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.scheduler-ops-week-section + .scheduler-ops-week-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.scheduler-ops-week-section.focused > .scheduler-ops-week-day-header {
    color: #c7d2fe;
}

.scheduler-ops-week-day-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 5px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background: rgba(13,19,35,0.95);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.scheduler-ops-week-day-badge {
    font-size: 10px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 7px;
}

.scheduler-ops-week-day-badge.today-badge {
    background: rgba(99,102,241,0.22);
    color: #a5b4fc;
}

.scheduler-ops-week-day-badge.count-badge {
    background: rgba(255,255,255,0.07);
    color: #94a3b8;
}

/* Operations rows: remove chips from week view to save vertical space */
.scheduler-ops-week-section .scheduler-ops-user-copy {
    gap: 2px;
}

.scheduler-ops-week-section .scheduler-ops-user-chip.high {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
}

.scheduler-ops-week-section .scheduler-ops-user-chip.escalated {
    background: rgba(248,113,113,0.15);
    color: #f87171;
}

/* â”€â”€ Phase 4: Smart Recommendation Engine â”€â”€ */
.scheduler-event-recommend-wrap {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 10px 0 4px;
    margin-top: 16px;
    overflow: visible;
}

.scheduler-event-recommend-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scheduler-event-recommend-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(99,102,241,0.5);
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.scheduler-event-recommend-btn:hover:not(:disabled) {
    background: rgba(99,102,241,0.25);
    color: #c7d2fe;
}

.scheduler-event-recommend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scheduler-event-recommend-hint {
    font-size: 0.72rem;
    color: #6b7280;
    flex-shrink: 1;
}

.scheduler-include-mgmt-wrap {
    margin-top: 6px;
}

.scheduler-include-mgmt-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #9ca3af;
    cursor: pointer;
    user-select: none;
}

.scheduler-include-mgmt-label input[type="checkbox"] {
    accent-color: #6366f1;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.scheduler-recommend-box {
    display: block;
    width: 100%;
    margin-top: 8px;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.scheduler-recommend-status {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 4px;
    padding: 0 2px;
}

.scheduler-recommend-status.error {
    color: #f87171;
}

.scheduler-recommend-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-height: 0;
    max-height: 260px;
    overflow-y: auto;
}

.scheduler-recommend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    gap: 8px;
}

.scheduler-recommend-row:hover {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.35);
}

.scheduler-recommend-row-time {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.scheduler-recommend-day {
    font-size: 0.72rem;
    color: #9ca3af;
    font-weight: 400;
}

.scheduler-recommend-time {
    font-size: 0.82rem;
    color: #e5e7eb;
    font-weight: 500;
}

.scheduler-recommend-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 1px;
}

.scheduler-recommend-score-num {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.scheduler-recommend-score-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rec-score-high .scheduler-recommend-score-num { color: #34d399; }
.rec-score-high .scheduler-recommend-score-label { color: #6ee7b7; }

.rec-score-mid .scheduler-recommend-score-num { color: #fbbf24; }
.rec-score-mid .scheduler-recommend-score-label { color: #fcd34d; }

.rec-score-low .scheduler-recommend-score-num { color: #f87171; }
.rec-score-low .scheduler-recommend-score-label { color: #fca5a5; }

/* â”€â”€ Global focus-visible polish â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-nav-btn:focus-visible,
.scheduler-nav-today:focus-visible,
.scheduler-view-btn:focus-visible,
.scheduler-mode-btn:focus-visible,
.scheduler-zoom-btn:focus-visible,
.scheduler-mini-nav-btn:focus-visible,
.scheduler-ops-week-nav-btn:focus-visible,
.scheduler-ops-day-pill:focus-visible,
.scheduler-availability-close-btn:focus-visible {
    outline: 2px solid rgba(99,102,241,0.7);
    outline-offset: 2px;
}

.scheduler-agent-suggestion-row:focus-visible,
.scheduler-recommend-row:focus-visible,
.scheduler-ops-event:focus-visible {
    outline: 2px solid rgba(99,102,241,0.65);
    outline-offset: 2px;
}

/* â”€â”€ Ops event â€” richer appearance â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-ops-event {
    background: linear-gradient(180deg, rgba(20,28,48,0.95), rgba(13,19,34,0.95));
}

/* â”€â”€ Ops row â€” today highlight â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-ops-week-section.today .scheduler-ops-week-day-header {
    color: #a5b4fc;
}
.scheduler-ops-week-section.today .scheduler-ops-week-day-header::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #818cf8;
    margin-right: 4px;
    vertical-align: middle;
}

/* â”€â”€ Recommend row â€” left score accent strip â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-recommend-row {
    border-left-width: 3px;
}
.rec-score-high.scheduler-recommend-row { border-left-color: rgba(52,211,153,0.55); }
.rec-score-mid.scheduler-recommend-row  { border-left-color: rgba(251,191,36,0.55); }
.rec-score-low.scheduler-recommend-row  { border-left-color: rgba(248,113,113,0.55); }

/* â”€â”€ User overlay row â€” selected state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-user-row.selected {
    background: rgba(99,102,241,0.08);
    border-color: rgba(99,102,241,0.2);
}

/* â”€â”€ Section label â€” divider style â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.scheduler-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.05);
    border-radius: 1px;
}

/* â”€â”€ Availability panel â€” cleaner results scrollbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-availability-results::-webkit-scrollbar { width: 7px; }
.scheduler-availability-results::-webkit-scrollbar-track { background: transparent; }
.scheduler-availability-results::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.16);
    border-radius: 999px;
}

/* â”€â”€ Ops axis tick â€” current-hour highlight â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-ops-axis-tick.current-hour {
    color: #a5b4fc;
    font-weight: 700;
    background: rgba(99,102,241,0.07);
}

/* â”€â”€ Working hours day chip â€” checked state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-working-day-chip:has(input:checked) {
    border-color: rgba(99,102,241,0.42);
    background: rgba(99,102,241,0.14);
    color: #c7d2fe;
}

/* â”€â”€ Ops empty state â€” centered â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-operations-empty {
    text-align: center;
}

/* â”€â”€ Nav label â€” monospace date feel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.scheduler-nav-label {
    font-variant-numeric: tabular-nums;
}

/* ===========================================
   OFFICE CLASSIC (LUXURY) - PHASE 3 SCHEDULER VISUAL SCOPING
   =========================================== */

body[data-theme="luxury"] .scheduler-modal {
    background:
        radial-gradient(120% 140% at 82% 118%, rgba(var(--accent-primary-rgb), 0.07) 0%, rgba(var(--accent-primary-rgb), 0) 62%),
        linear-gradient(180deg, var(--surface-canvas) 0%, var(--scheduler-bg) 100%);
    border: 1px solid var(--scheduler-border);
    box-shadow: var(--shadow-overlay);
}

body[data-theme="luxury"] .scheduler-left-panel {
    background: var(--scheduler-panel-bg);
    border-right: 1px solid var(--scheduler-border);
    box-shadow: inset -1px 0 0 var(--border-subtle);
}

body[data-theme="luxury"] .scheduler-right-panel {
    background:
        radial-gradient(140% 100% at 50% 122%, rgba(var(--accent-primary-rgb), 0.075) 0%, rgba(var(--accent-primary-rgb), 0) 66%),
        var(--scheduler-panel-bg);
}

body[data-theme="luxury"] .scheduler-left-header,
body[data-theme="luxury"] .scheduler-right-header,
body[data-theme="luxury"] .scheduler-availability-panel-header,
body[data-theme="luxury"] .scheduler-working-hours-header,
body[data-theme="luxury"] .scheduler-event-form-header {
    background: var(--surface-elev-2);
    border-bottom: 1px solid var(--scheduler-border);
}

body[data-theme="luxury"] .scheduler-left-title,
body[data-theme="luxury"] .scheduler-nav-label,
body[data-theme="luxury"] .scheduler-operations-title,
body[data-theme="luxury"] .scheduler-working-hours-title,
body[data-theme="luxury"] .scheduler-event-form-title {
    color: var(--scheduler-text);
}

body[data-theme="luxury"] .scheduler-mini-nav-label,
body[data-theme="luxury"] .scheduler-mini-day,
body[data-theme="luxury"] .scheduler-section-label,
body[data-theme="luxury"] .scheduler-availability-date-label,
body[data-theme="luxury"] .scheduler-availability-section-label,
body[data-theme="luxury"] .scheduler-operations-subtitle,
body[data-theme="luxury"] .scheduler-ops-dot-label {
    color: var(--scheduler-text-muted);
}

body[data-theme="luxury"] .scheduler-mini-day-header {
    color: var(--text-secondary);
}

body[data-theme="luxury"] .scheduler-mini-day:hover {
    background: var(--accent-soft-bg);
    color: var(--accent-primary);
}

body[data-theme="luxury"] .scheduler-mini-day.today,
body[data-theme="luxury"] .scheduler-mini-day.selected {
    background: var(--nav-item-active-bg);
    color: var(--accent-primary);
}

body[data-theme="luxury"] .scheduler-mini-day.has-events::after {
    background: var(--accent-primary);
}

body[data-theme="luxury"] .scheduler-nav-btn,
body[data-theme="luxury"] .scheduler-nav-today,
body[data-theme="luxury"] .scheduler-view-btn,
body[data-theme="luxury"] .scheduler-zoom-btn,
body[data-theme="luxury"] .scheduler-mini-nav-btn,
body[data-theme="luxury"] .scheduler-availability-close-btn {
    color: var(--text-secondary);
    border-color: var(--border-default);
    background: var(--surface-elev-1);
}

body[data-theme="luxury"] .scheduler-nav-btn:hover,
body[data-theme="luxury"] .scheduler-nav-today:hover,
body[data-theme="luxury"] .scheduler-view-btn:hover,
body[data-theme="luxury"] .scheduler-zoom-btn:hover,
body[data-theme="luxury"] .scheduler-mini-nav-btn:hover,
body[data-theme="luxury"] .scheduler-availability-close-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-soft-border);
    background: var(--accent-soft-bg);
}

body[data-theme="luxury"] .scheduler-view-btn.active,
body[data-theme="luxury"] .scheduler-zoom-btn.active {
    background: var(--nav-item-active-bg);
    color: var(--accent-primary);
    border-color: var(--accent-soft-border);
}

body[data-theme="luxury"] .scheduler-add-event-btn,
body[data-theme="luxury"] .scheduler-event-form-save {
    background: linear-gradient(180deg, var(--accent-primary-hover), var(--btn-primary-bg));
    color: var(--text-inverse);
    border-color: var(--accent-primary-active);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

body[data-theme="luxury"] .scheduler-add-event-btn:hover,
body[data-theme="luxury"] .scheduler-event-form-save:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--accent-primary-active), var(--accent-primary-hover));
    border-color: var(--accent-primary-active);
    color: var(--text-inverse);
}

body[data-theme="luxury"] .scheduler-event-form-cancel {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--btn-secondary-border);
}

body[data-theme="luxury"] .scheduler-event-form-cancel:hover {
    background: var(--control-bg-hover);
    border-color: var(--accent-soft-border);
    color: var(--accent-primary);
}

body[data-theme="luxury"] .scheduler-event-form-delete {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: var(--danger-border);
}

body[data-theme="luxury"] .scheduler-event-form-delete:hover:not(:disabled) {
    background: rgba(210, 87, 99, 0.16);
    border-color: var(--danger-solid);
}

body[data-theme="luxury"] .scheduler-user-preset-btn,
body[data-theme="luxury"] .scheduler-user-row,
body[data-theme="luxury"] .scheduler-type-filter-row,
body[data-theme="luxury"] .scheduler-legend-item,
body[data-theme="luxury"] .scheduler-working-day-chip,
body[data-theme="luxury"] .scheduler-availability-slot-row {
    background: var(--surface-elev-1);
    color: var(--scheduler-text);
    border-color: var(--border-subtle);
}

body[data-theme="luxury"] .scheduler-user-preset-btn:hover:not(:disabled),
body[data-theme="luxury"] .scheduler-user-preset-btn.active,
body[data-theme="luxury"] .scheduler-user-row:hover,
body[data-theme="luxury"] .scheduler-type-filter-row:hover,
body[data-theme="luxury"] .scheduler-legend-item:hover,
body[data-theme="luxury"] .scheduler-working-day-chip:hover,
body[data-theme="luxury"] .scheduler-working-day-chip:has(input:checked),
body[data-theme="luxury"] .scheduler-availability-slot-row:hover {
    background: var(--table-row-hover-bg);
    border-color: var(--accent-soft-border);
}

body[data-theme="luxury"] .scheduler-operations-view {
    background:
        linear-gradient(180deg, rgba(var(--accent-primary-rgb), 0.035) 0%, rgba(var(--accent-primary-rgb), 0.07) 100%),
        var(--surface-elev-2);
}

body[data-theme="luxury"] .scheduler-operations-axis,
body[data-theme="luxury"] .scheduler-operations-dots,
body[data-theme="luxury"] .scheduler-zoom-control {
    background: var(--surface-elev-2);
    border-color: var(--border-subtle);
}

body[data-theme="luxury"] .scheduler-ops-axis-tick {
    color: var(--scheduler-text-muted);
    border-right-color: var(--scheduler-border);
}

body[data-theme="luxury"] .scheduler-ops-axis-tick.current-hour {
    color: var(--accent-primary);
    background: var(--accent-soft-bg);
}

body[data-theme="luxury"] .scheduler-ops-lane-hour-segment {
    background: var(--scheduler-border);
}

body[data-theme="luxury"] .scheduler-ops-row {
    background: var(--surface-elev-1);
    border-color: var(--scheduler-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body[data-theme="luxury"] .scheduler-ops-row-meta {
    background: var(--surface-elev-1);
    border-color: var(--border-subtle);
}

body[data-theme="luxury"] .scheduler-ops-row-lane {
    background: var(--scheduler-surface);
    border-color: var(--scheduler-border);
}

body[data-theme="luxury"] .scheduler-ops-row-empty {
    color: var(--scheduler-text-muted);
}

body[data-theme="luxury"] .scheduler-ops-event {
    background: var(--scheduler-surface);
    color: var(--scheduler-text);
    border-color: var(--scheduler-border);
    box-shadow: var(--shadow-sm);
}

body[data-theme="luxury"] .scheduler-ops-event:hover {
    border-color: var(--accent-soft-border);
    box-shadow: var(--shadow-md);
}

body[data-theme="luxury"] .scheduler-availability-panel,
body[data-theme="luxury"] .scheduler-working-hours-modal,
body[data-theme="luxury"] .scheduler-event-form-modal {
    background: var(--surface-overlay);
    border-color: var(--scheduler-border);
    box-shadow: var(--shadow-overlay);
}

body[data-theme="luxury"] .scheduler-availability-date-input,
body[data-theme="luxury"] .scheduler-form-row input,
body[data-theme="luxury"] .scheduler-form-row select,
body[data-theme="luxury"] .scheduler-form-row textarea,
body[data-theme="luxury"] .scheduler-availability-custom-row input,
body[data-theme="luxury"] .sched-dtp-trigger {
    background: var(--control-bg);
    color: var(--control-text);
    border-color: var(--control-border);
}

/* â”€â”€ Dark theme: restore dark navy gradient (beats body[data-theme="dark"] .modal in base.css) â”€â”€ */
body[data-theme|="dark"] .scheduler-availability-panel,
body[data-theme|="dark"] .scheduler-working-hours-modal,
body[data-theme|="dark"] .scheduler-event-form-modal {
    background: linear-gradient(180deg, rgba(21,25,36,0.98), rgba(15,23,42,0.98));
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 24px 60px rgba(2,6,23,0.5), 0 0 0 1px rgba(99,102,241,0.08);
}

body[data-theme|="dark"] .scheduler-availability-date-input,
body[data-theme|="dark"] .scheduler-form-row input,
body[data-theme|="dark"] .scheduler-form-row select,
body[data-theme|="dark"] .scheduler-form-row textarea,
body[data-theme|="dark"] .scheduler-availability-custom-row input,
body[data-theme|="dark"] .sched-dtp-trigger {
    background: rgba(15,23,42,0.85);
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.1);
}

body[data-theme="luxury"] .scheduler-availability-date-input:focus,
body[data-theme="luxury"] .scheduler-form-row input:focus,
body[data-theme="luxury"] .scheduler-form-row select:focus,
body[data-theme="luxury"] .scheduler-form-row textarea:focus,
body[data-theme="luxury"] .scheduler-availability-custom-row input:focus,
body[data-theme="luxury"] .sched-dtp-trigger:hover,
body[data-theme="luxury"] .sched-dtp-trigger:focus-visible {
    border-color: var(--control-border-focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

body[data-theme="luxury"] .scheduler-event-hover-tooltip {
    background: var(--surface-overlay);
    color: var(--scheduler-text);
    border-color: var(--border-default);
    box-shadow: var(--shadow-lg);
}

body[data-theme="luxury"] .scheduler-event-hover-tooltip-title {
    color: var(--scheduler-text);
}

body[data-theme="luxury"] .scheduler-event-hover-tooltip-meta,
body[data-theme="luxury"] .scheduler-event-hover-tooltip-description,
body[data-theme="luxury"] .scheduler-event-hover-tooltip-hint {
    color: var(--scheduler-text-muted);
}

body[data-theme="luxury"] .scheduler-event-hover-tooltip-badge {
    color: var(--accent-primary);
    border-color: var(--accent-soft-border);
    background: var(--accent-soft-bg);
}

body[data-theme="luxury"] .scheduler-event-hover-tooltip-open {
    border-color: var(--accent-soft-border);
    background: var(--accent-soft-bg);
    color: var(--accent-primary);
}

body[data-theme="luxury"] .scheduler-event-hover-tooltip-open:hover {
    background: rgba(var(--accent-primary-rgb), 0.18);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Scheduler Event Info Popup
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.sched-info-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 12002; /* above scheduler modal (6000) and event form (12001) */
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 16px;
}

.sched-info-overlay.active {
    display: flex;
}

.sched-info-modal {
    width: min(420px, calc(100vw - 32px));
    background: linear-gradient(180deg, rgba(21,25,36,0.99) 0%, rgba(15,23,42,0.99) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    box-shadow: 0 28px 64px rgba(2,6,23,0.6), 0 0 0 1px rgba(99,102,241,0.1);
    overflow: hidden;
    animation: schedInfoIn 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes schedInfoIn {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.sched-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(99,102,241,0.07), rgba(99,102,241,0));
}

.sched-info-type-chip {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(99,102,241,0.35);
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
    white-space: nowrap;
}

.sched-info-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.sched-info-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    .sched-info-actions {
        gap: 4px;
    }

    #schedInfoRunAutomationBtn {
        width: 32px;
        height: 32px;
        padding: 0;
        justify-content: center;
        font-size: 0;
        gap: 0;
    }
}

.sched-info-edit-btn {
    background: rgba(99,102,241,0.13);
    border-color: rgba(99,102,241,0.3);
    color: #a5b4fc;
}

.sched-info-edit-btn:hover {
    background: rgba(99,102,241,0.24);
    border-color: rgba(99,102,241,0.55);
    color: #c7d2fe;
}

.sched-info-delete-btn {
    background: rgba(239,68,68,0.09);
    border-color: rgba(239,68,68,0.25);
    color: #fca5a5;
}

.sched-info-delete-btn:hover {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.45);
    color: #fecaca;
}

.sched-info-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    flex-shrink: 0;
}

.sched-info-close-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
}

.sched-info-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sched-info-title {
    font-size: 18px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.sched-info-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sched-info-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    color: rgba(226,232,240,0.75);
    line-height: 1.4;
}

.sched-info-meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.55;
    margin-top: 1px;
}

.sched-info-viewing-label {
    color: #a5b4fc;
    font-weight: 600;
}

.sched-info-description {
    font-size: 13px;
    color: rgba(226,232,240,0.65);
    line-height: 1.6;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.sched-info-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sched-info-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(245,158,11,0.3);
    background: rgba(245,158,11,0.1);
    color: #fbbf24;
}

/* Luxury theme overrides */
body[data-theme="luxury"] .sched-info-modal {
    background: var(--surface-overlay);
    border-color: var(--scheduler-border);
    box-shadow: var(--shadow-overlay);
}

body[data-theme="luxury"] .sched-info-type-chip {
    background: var(--accent-soft-bg);
    border-color: var(--accent-soft-border);
    color: var(--accent-primary);
}

body[data-theme="luxury"] .sched-info-edit-btn {
    background: var(--accent-soft-bg);
    border-color: var(--accent-soft-border);
    color: var(--accent-primary);
}

/* Dark theme â€” inherit the same dark navy (base.css .modal override is specificity 021, this is 031) */
body[data-theme|="dark"] .sched-info-modal {
    background: linear-gradient(180deg, rgba(21,25,36,0.99) 0%, rgba(15,23,42,0.99) 100%);
    border-color: rgba(255,255,255,0.08);
}

/* â”€â”€ Cloud theme FullCalendar overrides â”€â”€ */
body[data-theme="cloud"] .fc {
    --fc-border-color: var(--scheduler-border);
    --fc-button-bg-color: var(--surface-elev-1);
    --fc-button-border-color: var(--border-default);
    --fc-button-hover-bg-color: var(--accent-soft-bg);
    --fc-button-hover-border-color: var(--accent-soft-border);
    --fc-button-active-bg-color: var(--nav-item-active-bg);
    --fc-today-bg-color: rgba(var(--accent-primary-rgb), 0.09);
    --fc-now-indicator-color: var(--scheduler-now-indicator);
    --fc-highlight-color: rgba(var(--accent-primary-rgb), 0.10);
    --fc-event-text-color: var(--scheduler-text);
    --fc-page-bg-color: var(--scheduler-bg);
    --fc-neutral-bg-color: var(--surface-elev-2);
    --fc-list-event-hover-bg-color: var(--table-row-hover-bg);
    color: var(--scheduler-text-muted);
}

body[data-theme="cloud"] .fc .fc-scrollgrid,
body[data-theme="cloud"] .fc .fc-scrollgrid table,
body[data-theme="cloud"] .fc .fc-scrollgrid td,
body[data-theme="cloud"] .fc .fc-scrollgrid th {
    border-color: var(--scheduler-border) !important;
}

body[data-theme="cloud"] .fc .fc-col-header-cell,
body[data-theme="cloud"] .fc .fc-daygrid-day {
    border-left: 2px solid rgba(99, 102, 241, 0.18) !important;
}

body[data-theme="cloud"] .fc .fc-col-header-cell {
    background: var(--surface-elev-2);
}

body[data-theme="cloud"] .fc .fc-col-header-cell-cushion {
    color: var(--scheduler-text);
}

body[data-theme="cloud"] .fc .fc-daygrid-day {
    background:
        linear-gradient(180deg, rgba(var(--accent-primary-rgb), 0.015), rgba(var(--accent-primary-rgb), 0.025)),
        var(--scheduler-surface);
}

body[data-theme="cloud"] .fc .fc-timegrid-col {
    background:
        linear-gradient(to left, var(--scheduler-border) 2px, transparent 2px),
        linear-gradient(180deg, rgba(var(--accent-primary-rgb), 0.015), rgba(var(--accent-primary-rgb), 0.025)),
        var(--scheduler-surface);
}

body[data-theme="cloud"] .fc .fc-timegrid-col.fc-day-today,
body[data-theme="cloud"] .fc .fc-daygrid-day.fc-day-today {
    background: rgba(var(--accent-primary-rgb), 0.07) !important;
}

body[data-theme="cloud"] .fc .fc-timegrid-slot-label-cushion,
body[data-theme="cloud"] .fc .fc-daygrid-day-number {
    color: var(--scheduler-text-muted);
}

body[data-theme="cloud"] .fc td.fc-timegrid-slot {
    border-top-color: var(--border-subtle);
}

body[data-theme="cloud"] .fc .fc-non-business {
    background: rgba(99, 102, 241, 0.04);
}

body[data-theme="cloud"] .fc-event {
    background: var(--scheduler-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--scheduler-border) !important;
    box-shadow: var(--shadow-sm);
}

body[data-theme="cloud"] .fc .fc-event-title,
body[data-theme="cloud"] .fc .fc-event-time,
body[data-theme="cloud"] .fc .fc-event-main,
body[data-theme="cloud"] .fc .fc-event-main-frame,
body[data-theme="cloud"] .fc .coordy-event-title {
    color: var(--text-primary) !important;
}

body[data-theme="cloud"] .fc-event:hover {
    border-color: var(--accent-soft-border) !important;
    box-shadow: var(--shadow-md);
}

body[data-theme="cloud"] .sched-info-modal {
    background: var(--surface-overlay);
    border-color: var(--scheduler-border);
    box-shadow: var(--shadow-overlay);
}

body[data-theme="cloud"] .sched-info-type-chip {
    background: var(--accent-soft-bg);
    border-color: var(--accent-soft-border);
    color: var(--accent-primary);
}

body[data-theme="cloud"] .sched-info-edit-btn {
    background: var(--accent-soft-bg);
    border-color: var(--accent-soft-border);
    color: var(--accent-primary);
}

/* =============================================================================
   MOBILE â€” Scheduler modal + FullCalendar responsive overrides
   ============================================================================= */

@media (max-width: 768px) {
    /* â”€â”€ Scheduler modal overlay: no padding, no centering â”€â”€ */
    #schedulerModal.modal-overlay.active {
        padding: 0 !important;
        align-items: stretch !important;
    }

    /* â”€â”€ Modal card: full-screen, column layout â”€â”€
       IMPORTANT: .scheduler-modal originally uses flex-direction: row (side-by-side panels).
       We switch to column so panels stack, BUT we use CSS order to put the
       right-panel (which has the close button) FIRST so it's always visible. */
    .scheduler-modal {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* â”€â”€ Right panel (calendar + close button): comes FIRST on mobile â”€â”€ */
    .scheduler-right-panel {
        order: -1 !important;      /* visually first */
        flex: 1 1 auto !important;
        min-height: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Right header row/close-button layout and the left-panel-as-drawer
       treatment now live in mobile.css's consolidated scheduler-shell
       section (loads after this file) -- kept out of this block so the
       two files don't define the same selectors twice. */

    /* Hide desktop-only controls that would overflow on small screens */
    .scheduler-mode-toggle  { display: none !important; }
    .scheduler-zoom-control { display: none !important; }

    /* Calendar container: fills remaining right-panel height */
    #schedulerCalendarContainer {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* Sidebar: horizontal layout inside to save vertical space */
    .scheduler-filters-section,
    .scheduler-legend {
        display: none !important; /* hide on tiny screens â€” accessible via desktop */
    }

    .scheduler-users-section {
        padding: 8px 10px !important;
    }

    /* â”€â”€ FullCalendar internals â”€â”€ */

    /* FC toolbar (inside calendar container) */
    .fc .fc-toolbar {
        flex-direction: column !important;
        gap: 6px !important;
        padding: 6px !important;
    }
    .fc .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .fc .fc-toolbar-title {
        font-size: 0.95rem !important;
    }
    .fc .fc-button {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }

    /* FC view: scrollable, constrained height */
    .fc .fc-view-harness {
        height: auto !important;
        min-height: 200px !important;
    }
    .fc .fc-scroller {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }
    .fc .fc-timegrid-axis { width: 34px !important; }
    .fc .fc-timegrid-slot-label-cushion,
    .fc .fc-col-header-cell-cushion,
    .fc .fc-daygrid-day-number {
        font-size: 10px !important;
        padding: 2px 3px !important;
    }
    .fc-event-title, .fc-event-time {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
    .fc .fc-daygrid-day-frame {
        min-height: 36px !important;
    }
}

/* Admin inline compact calendar: constrain the section */
@media (max-width: 768px) {
    .admin-ops-calendar-section {
        overflow: hidden !important;
    }

    /* Tab buttons row */
    .calendar-filter-row {
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }

    .calendar-filter-btn {
        flex: 1 !important;
        min-height: 40px !important;
        font-size: 12px !important;
        padding: 6px 4px !important;
        text-align: center !important;
    }

    /* Add Event button */
    .calendar-add-btn {
        min-height: 44px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    /* Stack calendar card + events panel vertically */
    .compact-calendar-layout {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .compact-calendar-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .compact-calendar-events-panel {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        max-height: 200px !important;
        box-sizing: border-box !important;
    }

    /* Calendar grid cells: touch-friendly */
    .compact-calendar-day {
        min-height: 30px !important;
        font-size: 12px !important;
    }
}

/* =============================================================================
   CLOUD THEME â€” Scheduler overrides
   All rules scoped to body[data-theme="cloud"] â€” no other themes touched.
   ============================================================================= */

body[data-theme="cloud"] .scheduler-modal {
    background: var(--scheduler-bg, #f4f5fb);
    border-color: rgba(99, 102, 241, 0.16);
    box-shadow: var(--shadow-overlay);
}

body[data-theme="cloud"] .scheduler-left-panel {
    background: var(--scheduler-panel-bg, #ffffff);
    border-right: 1px solid rgba(99, 102, 241, 0.14);
    box-shadow: inset -1px 0 0 rgba(99, 102, 241, 0.08);
}

body[data-theme="cloud"] .scheduler-right-panel {
    background: var(--scheduler-panel-bg, #ffffff);
}

body[data-theme="cloud"] .scheduler-left-header,
body[data-theme="cloud"] .scheduler-right-header,
body[data-theme="cloud"] .scheduler-availability-panel-header,
body[data-theme="cloud"] .scheduler-working-hours-header,
body[data-theme="cloud"] .scheduler-event-form-header {
    background: linear-gradient(135deg, #452b9d 0%, #5734e5 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

body[data-theme="cloud"] .scheduler-left-title,
body[data-theme="cloud"] .scheduler-nav-label,
body[data-theme="cloud"] .scheduler-operations-title,
body[data-theme="cloud"] .scheduler-working-hours-title,
body[data-theme="cloud"] .scheduler-event-form-title { color: #ffffff !important; }

body[data-theme="cloud"] #schedulerModal .scheduler-nav-label,
body[data-theme="cloud"] #schedulerModal .scheduler-left-title,
body[data-theme="cloud"] #schedulerModal .scheduler-mini-nav-label {
    color: #ffffff !important;
}

body[data-theme="cloud"] .scheduler-mini-nav-label,
body[data-theme="cloud"] .scheduler-mini-day,
body[data-theme="cloud"] .scheduler-section-label,
body[data-theme="cloud"] .scheduler-availability-date-label,
body[data-theme="cloud"] .scheduler-availability-section-label,
body[data-theme="cloud"] .scheduler-operations-subtitle,
body[data-theme="cloud"] .scheduler-ops-dot-label { color: #475569; }

body[data-theme="cloud"] .scheduler-mini-day-header { color: #4b5563; }

body[data-theme="cloud"] .scheduler-mini-day:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
}

body[data-theme="cloud"] .scheduler-mini-day.today,
body[data-theme="cloud"] .scheduler-mini-day.selected {
    background: rgba(99, 102, 241, 0.16);
    color: #6366f1;
}

body[data-theme="cloud"] .scheduler-mini-day.has-events::after { background: #6366f1; }

body[data-theme="cloud"] .scheduler-nav-btn,
body[data-theme="cloud"] .scheduler-nav-today,
body[data-theme="cloud"] .scheduler-view-btn,
body[data-theme="cloud"] .scheduler-zoom-btn,
body[data-theme="cloud"] .scheduler-mini-nav-btn,
body[data-theme="cloud"] .scheduler-availability-close-btn {
    color: #4b5563;
    border-color: rgba(99, 102, 241, 0.18);
    background: #f4f5fb;
}

body[data-theme="cloud"] .scheduler-nav-btn:hover,
body[data-theme="cloud"] .scheduler-nav-today:hover,
body[data-theme="cloud"] .scheduler-view-btn:hover,
body[data-theme="cloud"] .scheduler-zoom-btn:hover,
body[data-theme="cloud"] .scheduler-mini-nav-btn:hover,
body[data-theme="cloud"] .scheduler-availability-close-btn:hover {
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.40);
    background: rgba(99, 102, 241, 0.07);
}

body[data-theme="cloud"] .scheduler-view-btn.active,
body[data-theme="cloud"] .scheduler-zoom-btn.active {
    background: rgba(99, 102, 241, 0.14);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.35);
}

body[data-theme="cloud"] .scheduler-add-event-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.55);
}
body[data-theme="cloud"] .scheduler-add-event-btn:hover {
    background: linear-gradient(135deg, #252C35, #6b5fd0);
}

body[data-theme="cloud"] .scheduler-agent-row { border-bottom-color: rgba(99, 102, 241, 0.08); }
body[data-theme="cloud"] .scheduler-agent-row:hover { background: rgba(99, 102, 241, 0.05); }
body[data-theme="cloud"] .scheduler-agent-name  { color: #1e1b4b; }
body[data-theme="cloud"] .scheduler-agent-label { color: #475569; }

body[data-theme="cloud"] .scheduler-availability-bar { background: rgba(99, 102, 241, 0.12); }
body[data-theme="cloud"] .scheduler-find-availability-btn { color: #6366f1; border-color: rgba(99, 102, 241, 0.28); background: rgba(99, 102, 241, 0.06); }

/* Right panel calendar grid adapts via FullCalendar tokens â€” keep text legible */
body[data-theme="cloud"] .scheduler-right-panel .fc-col-header-cell,
body[data-theme="cloud"] .scheduler-right-panel .fc-daygrid-day-number,
body[data-theme="cloud"] .scheduler-right-panel .fc-timegrid-slot-label { color: #374151; }

body[data-theme="cloud"] .scheduler-right-panel .fc-col-header-cell-cushion { color: #374151; }

/* Scheduler event form inputs */
body[data-theme="cloud"] .scheduler-event-form-input,
body[data-theme="cloud"] .scheduler-event-form-select,
body[data-theme="cloud"] .scheduler-event-form-textarea {
    background: #f4f5fb;
    border-color: rgba(99, 102, 241, 0.22);
    color: #1e1b4b;
}
body[data-theme="cloud"] .scheduler-event-form-label { color: #374151; }

body[data-theme="cloud"] .scheduler-close-btn,
body[data-theme="cloud"] #schedulerModal .scheduler-close-btn,
body[data-theme="cloud"] #schedulerModal .modal-close {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    outline: none !important;
    padding: 4px 8px !important;
}
body[data-theme="cloud"] .scheduler-close-btn:hover,
body[data-theme="cloud"] #schedulerModal .scheduler-close-btn:hover,
body[data-theme="cloud"] #schedulerModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

/* ── Scheduler user rows (agent list) ──────────────────────────────────────── */
body[data-theme="cloud"] .scheduler-user-row {
    background: rgba(99, 102, 241, 0.03);
}
body[data-theme="cloud"] .scheduler-user-row:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.22);
}
body[data-theme="cloud"] .scheduler-user-label { color: #1e1b4b; }
body[data-theme="cloud"] .scheduler-user-meta  { color: #475569; }

/* ── Scheduler type filter rows ────────────────────────────────────────────── */
body[data-theme="cloud"] .scheduler-type-filter-row {
    background: rgba(99, 102, 241, 0.02);
}
body[data-theme="cloud"] .scheduler-type-filter-row:hover {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.20);
}
body[data-theme="cloud"] .scheduler-type-filter-label { color: #1e1b4b; }
body[data-theme="cloud"] .scheduler-type-filter-count { color: #475569; }

/* Cloud readability fix: calendar preset chips + loading state */
body[data-theme="cloud"] .scheduler-user-preset-btn {
    border-color: rgba(99, 102, 241, 0.30);
    background: rgba(99, 102, 241, 0.06);
    color: #2d1b69;
}
body[data-theme="cloud"] .scheduler-user-preset-btn:hover:not(:disabled) {
    border-color: rgba(99, 102, 241, 0.48);
    background: rgba(99, 102, 241, 0.12);
    color: #1e1b4b;
}
body[data-theme="cloud"] .scheduler-user-preset-btn.active {
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.18);
    color: #1e1b4b;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.16) inset, 0 8px 18px rgba(45, 27, 105, 0.14);
}
body[data-theme="cloud"] .scheduler-user-preset-btn:disabled {
    opacity: 0.58;
    color: #64748b;
}
body[data-theme="cloud"] .scheduler-users-state {
    border-color: rgba(99, 102, 241, 0.24);
    background: rgba(99, 102, 241, 0.05);
    color: #475569;
}

/* ── Find Availability / Working Hours buttons ──────────────────────────────── */
body[data-theme="cloud"] .scheduler-availability-btn,
body[data-theme="cloud"] .scheduler-working-hours-btn {
    background: rgba(99, 102, 241, 0.05);
    color: #374151;
    border-color: rgba(99, 102, 241, 0.20);
    border-left-color: rgba(99, 102, 241, 0.50);
}
body[data-theme="cloud"] .scheduler-availability-btn:hover,
body[data-theme="cloud"] .scheduler-working-hours-btn:hover {
    background: rgba(99, 102, 241, 0.09);
    color: #1e1b4b;
}

/* ── Cloud theme: Operations View ──────────────────────────────────────────── */

/* Main view background — neutral, no dark radial gradients */
body[data-theme="cloud"] .scheduler-operations-view {
    background: #ede9fe;
}

/* Time axis header — gray band with white tick labels */
body[data-theme="cloud"] .scheduler-operations-axis {
    background: #6366f1;
    border-color: rgba(99, 102, 241, 0.30);
}
body[data-theme="cloud"] .scheduler-ops-axis-tick {
    color: #e2e8f0;
    border-right-color: rgba(255, 255, 255, 0.12);
}

/* Day section headers — dark gray sticky band, white text */
body[data-theme="cloud"] .scheduler-ops-week-day-header {
    background: #452b9d;
    color: #e2e8f0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
body[data-theme="cloud"] .scheduler-ops-week-section.focused > .scheduler-ops-week-day-header {
    color: #c7d2fe;
}
body[data-theme="cloud"] .scheduler-ops-week-section.today .scheduler-ops-week-day-header {
    color: #a5b4fc;
}
body[data-theme="cloud"] .scheduler-ops-week-day-badge.count-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}
body[data-theme="cloud"] .scheduler-ops-week-day-badge.today-badge {
    background: rgba(165, 180, 252, 0.25);
    color: #c7d2fe;
}
body[data-theme="cloud"] .scheduler-ops-week-section + .scheduler-ops-week-section {
    border-top-color: rgba(99, 102, 241, 0.18);
}

/* Agent row container — light card */
body[data-theme="cloud"] .scheduler-ops-row {
    background: #f4f5fb;
    border-color: rgba(99, 102, 241, 0.16);
    box-shadow: 0 1px 3px rgba(45, 27, 105, 0.06);
}
body[data-theme="cloud"] .scheduler-ops-row.drop-target {
    border-color: rgba(91, 79, 207, 0.40);
    box-shadow: 0 0 0 1px rgba(91, 79, 207, 0.20) inset;
}

/* Left agent meta panel — medium gray */
body[data-theme="cloud"] .scheduler-ops-row-meta {
    background: #d9dbe8;
    border-color: rgba(99, 102, 241, 0.14);
}
body[data-theme="cloud"] .scheduler-ops-user-name { color: #1e1b4b; }
body[data-theme="cloud"] .scheduler-ops-user-initial {
    color: #ffffff;
    background: linear-gradient(180deg, #5b4fcf, #4338ca);
    border-color: rgba(91, 79, 207, 0.30);
}

/* User chips in agent panel */
body[data-theme="cloud"] .scheduler-ops-user-chip {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.20);
    color: #374151;
}
body[data-theme="cloud"] .scheduler-ops-week-section .scheduler-ops-user-chip.high {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}
body[data-theme="cloud"] .scheduler-ops-week-section .scheduler-ops-user-chip.escalated {
    background: rgba(248, 113, 113, 0.18);
    color: #991b1b;
}

/* Event lane — white content area */
body[data-theme="cloud"] .scheduler-ops-row-lane {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.14);
}
body[data-theme="cloud"] .scheduler-ops-lane-hour-segment {
    background: rgba(99, 102, 241, 0.08);
}
body[data-theme="cloud"] .scheduler-ops-row-empty { color: #94a3b8; }

/* Operations summary dots pill */
body[data-theme="cloud"] .scheduler-operations-dots {
    background: rgba(99, 102, 241, 0.10);
    border-color: rgba(99, 102, 241, 0.20);
}
body[data-theme="cloud"] .scheduler-ops-dot-label { color: #374151; }

/* Empty state */
body[data-theme="cloud"] .scheduler-operations-empty {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.18);
    color: #475569;
}

/* Scrollbar */
body[data-theme="cloud"] .scheduler-operations-rows::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.04);
}
body[data-theme="cloud"] .scheduler-operations-rows::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.20);
}

/* ── Operations header: dark purple band, ALL text white ─────── */
body[data-theme="cloud"] .scheduler-operations-header {
    background: linear-gradient(135deg, #452b9d 0%, #5734e5 100%);
    padding: 8px 14px;
    border-radius: 0;
    color: #ffffff !important;
}
body[data-theme="cloud"] .scheduler-operations-header *,
body[data-theme="cloud"] .scheduler-operations-title,
body[data-theme="cloud"] .scheduler-operations-subtitle,
body[data-theme="cloud"] .scheduler-operations-subtitle span,
body[data-theme="cloud"] #schedulerOperationsSubtitle {
    color: #ffffff !important;
}
body[data-theme="cloud"] .scheduler-ops-week-nav-btn {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}
body[data-theme="cloud"] .scheduler-ops-week-nav-btn:hover {
    background: rgba(255, 255, 255, 0.24) !important;
}

/* ── Day section headers — solid white text ──────────────────── */
body[data-theme="cloud"] .scheduler-ops-week-day-header {
    background: #452b9d !important;
    color: #ffffff !important;
}
body[data-theme="cloud"] .scheduler-ops-week-day-header *,
body[data-theme="cloud"] .scheduler-ops-week-section > .scheduler-ops-week-day-header {
    color: #ffffff !important;
}

/* ── Agent meta panel — darker so white name reads cleanly ────── */
body[data-theme="cloud"] .scheduler-ops-row-meta {
    background: #3730a3 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}
body[data-theme="cloud"] .scheduler-ops-user-name {
    color: #ffffff !important;
}
body[data-theme="cloud"] .scheduler-ops-user-chip {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}
body[data-theme="cloud"] .scheduler-ops-week-day-badge.count-badge {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}
body[data-theme="cloud"] .scheduler-ops-week-day-badge.today-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* ── Event pills — themed indigo instead of near-black ───────── */
body[data-theme="cloud"] .scheduler-ops-event {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}
body[data-theme="cloud"] .scheduler-ops-event:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.38);
}
body[data-theme="cloud"] .scheduler-ops-event-title {
    color: #ffffff;
}
body[data-theme="cloud"] .scheduler-ops-event-strip {
    background: rgba(255, 255, 255, 0.40);
}
body[data-theme="cloud"] .scheduler-ops-event-badge {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.30);
}

/* Cloud final contrast pass: operations timeline boxed areas. */
body[data-theme="cloud"] .scheduler-operations-header,
body[data-theme="cloud"] .scheduler-operations-header *,
body[data-theme="cloud"] .scheduler-operations-title,
body[data-theme="cloud"] .scheduler-operations-subtitle,
body[data-theme="cloud"] #schedulerOperationsSubtitle,
body[data-theme="cloud"] .scheduler-ops-week-nav-btn,
body[data-theme="cloud"] .scheduler-ops-week-day-header,
body[data-theme="cloud"] .scheduler-ops-week-day-header *,
body[data-theme="cloud"] .scheduler-ops-week-day-badge,
body[data-theme="cloud"] .scheduler-ops-row-meta,
body[data-theme="cloud"] .scheduler-ops-row-meta *,
body[data-theme="cloud"] .scheduler-ops-user-name,
body[data-theme="cloud"] .scheduler-ops-user-chip,
body[data-theme="cloud"] .scheduler-ops-event,
body[data-theme="cloud"] .scheduler-ops-event *,
body[data-theme="cloud"] .scheduler-ops-event-title {
    color: #ffffff !important;
}

body[data-theme="cloud"] .scheduler-ops-event {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}
