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

/* ── 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: 14px 20px 1fr;
    align-items: center;
    gap: 8px;
    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: 13px;
    height: 13px;
    margin: 0;
    accent-color: #6366f1;
}

.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: 14px 8px 1fr auto;
    align-items: center;
    gap: 8px;
    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: 13px;
    height: 13px;
    margin: 0;
    accent-color: #6366f1;
}

.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: 14px 20px 1fr;
    align-items: center;
    gap: 8px;
    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: 13px;
    height: 13px;
    margin: 0;
    accent-color: #6366f1;
}

.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: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.015);
    padding: 9px 10px;
}

.scheduler-availability-mode-option {
    display: grid !important;
    grid-template-columns: 14px minmax(0, 1fr) !important;
    align-items: start !important;
    justify-content: flex-start !important;
    column-gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    line-height: 1.3 !important;
    font-size: 12px;
    color: #cbd5e1;
    cursor: pointer;
}

.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;
    justify-self: start !important;
    align-self: flex-start !important;
    accent-color: #6366f1;
}

.scheduler-availability-mode-copy {
    display: block !important;
    width: 100% !important;
    max-width: 420px !important;
    height: auto !important;
    flex: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    text-align: left !important;
    font-size: 13.5px !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: #dbe7ff;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

.scheduler-availability-mode-subtitle {
    display: block;
    color: #8ea4d7;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

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

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

.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-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 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.sched-dtp-clock-section.hidden { display: none; }
.sched-dtp-clock-readout {
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.06em;
}
.sched-dtp-clock-face {
    width: 200px;
    height: 200px;
    cursor: pointer;
    display: block;
    touch-action: none;
}
.sched-dtp-clock-face.dragging { cursor: grabbing; }
.sched-dtp-ampm-row { display: flex; gap: 6px; }
.sched-dtp-ampm {
    padding: 5px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
}
.sched-dtp-ampm.active { background: #6366f1; border-color: #6366f1; color: #fff; }
.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;
}

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

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

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