/* ──────────────────────────────────────────────────────────────────
 * FullCalendar Outlook-style theme (build 917 spike)
 * Targets: meridiam dark dashboard. Mirrors Outlook on the Web's
 * structure (header bar, time grid, event pills, today tint).
 * ────────────────────────────────────────────────────────────────── */

#calFcPane {
  display: flex;
  flex: 1;
  flex-direction: row;
  background: #0f172a;
  color: #e2e8f0;
  padding: 0;
  height: 100%;
  min-height: 0;
}

#calFcMount {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 12px 16px 16px;
  background: #0f172a;
}

#calFcTasks {
  display: none;
  flex-direction: column;
  width: 280px;
  background: #131c30;
  border-left: 1px solid #1e2a45;
  color: #e2e8f0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  overflow: hidden;
}
.fc-tasks-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #1e2a45;
}
.fc-tasks-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: #f1f5f9; }
.fc-tasks-close {
  background: transparent; border: 0; color: #94a3b8;
  font-size: 18px; cursor: pointer; padding: 0 6px; border-radius: 4px;
}
.fc-tasks-close:hover { background: #1e293b; color: #f1f5f9; }
.fc-tasks-newrow { padding: 10px 12px; border-bottom: 1px solid #1e2a45; }
.fc-task-input {
  width: 100%; box-sizing: border-box;
  background: #0f172a; border: 1px solid #334155; border-radius: 4px;
  color: #f1f5f9; padding: 7px 10px; font-size: 13px; font-family: inherit;
  outline: none;
}
.fc-task-input:focus { border-color: #0078d4; }
.fc-tasks-list { list-style: none; padding: 4px 0; margin: 0; overflow-y: auto; flex: 1; }
.fc-tasks-empty { padding: 16px 14px; color: #64748b; font-style: italic; font-size: 12px; }
.fc-task {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; cursor: default;
}
.fc-task:hover { background: #1e293b; }
.fc-task-cb { flex: 0 0 auto; cursor: pointer; }
.fc-task-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-task-due { flex: 0 0 auto; color: #94a3b8; font-size: 11px; }
.fc-task-del {
  background: transparent; border: 0; color: #64748b;
  font-size: 16px; cursor: pointer; padding: 0 4px; opacity: 0; transition: opacity 0.1s;
}
.fc-task:hover .fc-task-del { opacity: 1; }
.fc-task-del:hover { color: #ef4444; }
.fc-task--done .fc-task-title { text-decoration: line-through; color: #64748b; }
.fc-tasks-done {
  border-top: 1px solid #1e2a45; padding: 6px 0;
}
.fc-tasks-done summary {
  padding: 6px 14px; cursor: pointer; color: #94a3b8; font-size: 12px;
}
.fc-tasks-done summary:hover { color: #cbd5e1; }

.fc-loading {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.fc-loading--err { color: #f87171; }

/* ── FullCalendar root (Apple/Outlook hybrid) ── */
.fc {
  --fc-border-color: #2a3548;
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: #0f172a;
  --fc-neutral-text-color: #94a3b8;
  --fc-today-bg-color: rgba(43, 154, 255, 0.07);
  --fc-now-indicator-color: #ef4444;
  --fc-list-event-hover-bg-color: #1e293b;
  --fc-button-bg-color: transparent;
  --fc-button-border-color: #334155;
  --fc-button-text-color: #cbd5e1;
  --fc-button-hover-bg-color: #1e293b;
  --fc-button-hover-border-color: #475569;
  --fc-button-active-bg-color: #0078d4;
  --fc-button-active-border-color: #0078d4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  font-size: 13px;
}

/* Header toolbar — Outlook command bar feel */
.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #1e2a45;
}

.fc .fc-toolbar-title {
  font-size: 18px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.fc .fc-button {
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  box-shadow: none;
  transition: background 0.12s, border-color 0.12s;
}

.fc .fc-button:focus { box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.35); }

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: #0078d4;
  border-color: #0078d4;
  color: #ffffff;
}

.fc .fc-today-button {
  background: #0078d4;
  border-color: #0078d4;
  color: #fff;
}
.fc .fc-today-button:hover:not(:disabled) {
  background: #106ebe;
  border-color: #106ebe;
}
.fc .fc-today-button:disabled { opacity: 0.4; }

/* Day headers — Outlook style: weekday + number */
.fc .fc-col-header-cell {
  background: #131c30;
  border-color: #1e2a45;
  padding: 8px 0;
}

.fc .fc-col-header-cell-cushion {
  color: #cbd5e1;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.fc .fc-day-today .fc-col-header-cell-cushion {
  color: #2b9aff;
  font-weight: 700;
}

/* Apple-Calendar-style stacked day header (big number above day name) */
.fc-dh-stack {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 12px 4px;
}
.fc-dh-num {
  font-size: 24px; font-weight: 600; color: #e2e8f0; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fc-dh-name {
  font-size: 13px; color: #94a3b8; text-transform: none; letter-spacing: 0;
  font-weight: 400;
}
.fc .fc-day-today .fc-dh-num { color: #2b9aff; font-weight: 700; }
.fc .fc-day-today .fc-dh-name { color: #2b9aff; }
.fc .fc-col-header-cell { padding: 0; }
.fc .fc-col-header-cell-cushion { padding: 0; display: block; text-align: left; }

/* Hatched stripe pattern for all-day events (matches Apple Calendar OOO style) */
.fc-event-allday {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.10) 0,
    rgba(255,255,255,0.10) 6px,
    transparent 6px,
    transparent 12px
  ) !important;
}

/* Recurring-event glyph */
.fc-event-recurring .fc-event-title::after {
  content: ' ⟳';
  opacity: 0.7;
  font-size: 0.9em;
  margin-left: 2px;
}

/* ── Bulk dark theme — kill all default white backgrounds in FC internals ── */
.fc .fc-view-harness,
.fc .fc-view-harness-active > .fc-view,
.fc .fc-scroller,
.fc .fc-scrollgrid,
.fc .fc-scrollgrid > tbody,
.fc .fc-scrollgrid-section,
.fc .fc-scrollgrid-section > *,
.fc .fc-scrollgrid-sync-table,
.fc .fc-daygrid-body,
.fc .fc-timegrid-body,
.fc .fc-timegrid-cols,
.fc .fc-timegrid-slots,
.fc .fc-list,
.fc .fc-list-table,
.fc table {
  background-color: #0f172a;
}

/* All-day row cells in Day/Week views — FC renders these as plain td.fc-day
   inside fc-daygrid-body without a background, so they fell through to the
   browser default white. Pin them dark to match the rest of the grid. */
.fc .fc-daygrid-day,
.fc .fc-daygrid-day-frame,
.fc td.fc-day,
.fc td.fc-day-future,
.fc td.fc-day-past {
  background-color: #0f172a;
}

/* Time grid — clean solid hour gridlines ONLY (no dashed half-hour) */
.fc-theme-standard td,
.fc-theme-standard th {
  border-color: #1e2a45;
}

.fc-theme-standard .fc-scrollgrid {
  border-color: #334155;
}

/* ── Full-height vertical day separators (Apple/Outlook style) ──
   border-left and box-shadow get eaten by FC's layered table render.
   Absolute-positioned ::before pseudo-elements always render — they're
   real DOM nodes inside positioned parents. */

/* Header column separators */
.fc .fc-col-header-cell { position: relative; }
.fc .fc-col-header-cell:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: #475569;
  pointer-events: none;
  z-index: 2;
}

/* Time-grid (Day/Week view) column separators */
.fc .fc-timegrid-col { position: relative; }
.fc .fc-timegrid-col:not(:first-of-type)::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: #475569;
  pointer-events: none;
  z-index: 4;
}

/* All-day cell separators (so they line up with time-grid below) */
.fc .fc-daygrid-day { position: relative; }
.fc .fc-daygrid-day:not(:first-of-type)::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: #475569;
  pointer-events: none;
  z-index: 2;
}

/* All-day row in time-grid views (separate from Month-view daygrid above) */
.fc .fc-timegrid-axis-frame { position: relative; }
.fc tr.fc-scrollgrid-section-body[role="presentation"] td.fc-day {
  position: relative;
}
.fc tr.fc-scrollgrid-section-body[role="presentation"] td.fc-day:not(:first-of-type)::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: #475569;
  pointer-events: none;
}

/* Outlook-style subtle weekend tint on Week view */
.fc .fc-day-sat,
.fc .fc-day-sun {
  background-color: rgba(255, 255, 255, 0.018);
}
.fc .fc-day-today {
  background: rgba(0, 120, 212, 0.08) !important;
}

.fc .fc-timegrid-slot {
  height: 32px;
  border-color: #1a2238;
}

.fc .fc-timegrid-slot-minor { border-top-style: none; }

.fc .fc-timegrid-slot-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  border: 0;
  padding-right: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: top;
}
.fc .fc-timegrid-slot-label-cushion {
  position: relative;
  top: -6px;
}

.fc .fc-timegrid-axis {
  background: transparent;
  border-color: #1e2a45;
}

.fc .fc-timegrid-axis-cushion {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Today column tint */
.fc .fc-day-today {
  background: rgba(0, 120, 212, 0.07) !important;
}

/* Now indicator — Outlook red bar */
.fc .fc-timegrid-now-indicator-line {
  border-top: 2px solid #d83b01;
}
.fc .fc-timegrid-now-indicator-arrow {
  border-color: #d83b01;
  border-top-color: #d83b01;
  border-bottom-color: #d83b01;
}

/* Events — Apple/Outlook hybrid: rounded, solid fill, thin left stripe */
.fc-event {
  border-radius: 5px;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.fc-event::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: rgba(255,255,255,0.5);
  border-radius: 5px 0 0 5px;
}

.fc .fc-timegrid-event {
  border-radius: 5px;
  border: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.fc .fc-timegrid-event .fc-event-main {
  padding: 4px 6px 4px 10px;
  color: #fff;
}
.fc .fc-daygrid-event {
  padding: 0;
}
.fc .fc-daygrid-event .fc-event-main {
  padding: 3px 6px 3px 10px;
  color: #fff;
}

.fc-event:hover { filter: brightness(1.12); }

.fc-event-title { font-weight: 600; line-height: 1.3; }
.fc-event-time { font-weight: 400; opacity: 0.85; font-size: 11px; }

/* Month grid */
.fc .fc-daygrid-day-number {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 6px;
  text-decoration: none !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background: #0078d4;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
  padding: 0;
}

.fc .fc-daygrid-day {
  background: #0f172a;
}

.fc .fc-day-other {
  background: #0c1424;
}
.fc .fc-day-other .fc-daygrid-day-number {
  color: #475569;
}

/* List (Agenda) view */
.fc .fc-list {
  border-color: #1e2a45;
  background: #0f172a;
}

.fc .fc-list-day-cushion {
  background: #131c30;
  color: #cbd5e1;
}

.fc .fc-list-event:hover td {
  background: #1e293b;
}

.fc .fc-list-event-dot {
  border-color: #0078d4;
}

.fc .fc-list-event-title a {
  color: #e2e8f0;
  text-decoration: none;
}

/* All-day band — pure black, sharply separated from time grid (Apple style) */
.fc .fc-timegrid-all-day-events,
.fc .fc-timegrid-axis,
.fc .fc-day.fc-daygrid-day {
  /* Time grid main bg stays #0f172a */
}
.fc .fc-scrollgrid-section-header + .fc-scrollgrid-section,
.fc .fc-timegrid-divider {
  background: #050813;
}
.fc .fc-timegrid > table > tbody > tr:nth-child(2) td,
.fc .fc-timegrid-cols td.fc-day,
.fc .fc-timegrid-axis-frame {
  /* keep day cells transparent so the section bg shows */
}
/* The all-day section is the second tbody row; FC renders it as a
   .fc-scrollgrid-section just under the header. Force pure-black bg. */
.fc .fc-timegrid-axis.fc-scrollgrid-shrink {
  background: #050813;
}
.fc table.fc-scrollgrid > tbody > tr:has(.fc-timegrid-all-day-events) td,
.fc table.fc-scrollgrid > tbody > tr:nth-child(2) td {
  background-color: #050813 !important;
}
/* Sharper bottom border separating all-day from time grid */
.fc .fc-timegrid-divider.fc-divider {
  border-top: 1px solid #2a3548;
  height: 0;
  padding: 0;
}

/* ── Event peek panel (Outlook-style hover card) ── */
#fcPeek {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.fc-peek-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  width: 380px;
  max-width: 92vw;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
}

.fc-peek-head {
  padding: 12px 14px;
  background: #131c30;
  border-bottom: 1px solid #1e2a45;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-peek-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  word-break: break-word;
}

.fc-peek-close {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.fc-peek-close:hover { background: #334155; color: #f1f5f9; }

.fc-peek-body {
  padding: 12px 14px 16px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.fc-peek-time {
  color: #2b9aff;
  font-weight: 500;
  margin-bottom: 8px;
}

.fc-peek-row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.fc-peek-icon { flex: 0 0 auto; opacity: 0.85; }

.fc-peek-desc {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #334155;
  white-space: pre-wrap;
  color: #94a3b8;
}

.fc-peek-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #f1f5f9;
  font: 14px 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 9px 12px;
  outline: none;
  box-sizing: border-box;
}
.fc-peek-input:focus { border-color: #0078d4; box-shadow: 0 0 0 2px rgba(0,120,212,0.25); }

.fc-peek-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.fc-peek-btn {
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  font-family: inherit;
}

.fc-peek-btn--primary {
  background: #0078d4;
  color: #fff;
}
.fc-peek-btn--primary:hover { background: #106ebe; }

.fc-peek-btn--secondary {
  background: transparent;
  border-color: #334155;
  color: #cbd5e1;
}
.fc-peek-btn--secondary:hover { background: #1e293b; border-color: #475569; }

.fc-peek-btn--danger {
  background: transparent;
  border-color: #ef4444;
  color: #ef4444;
  margin-right: auto;
}
.fc-peek-btn--danger:hover { background: rgba(239,68,68,0.1); }

.fc-peek-card--wide { width: 460px; max-width: 92vw; max-height: 86vh; overflow-y: auto; }

.fc-edit-lbl {
  display: block; font-size: 11px; color: #94a3b8; text-transform: uppercase;
  letter-spacing: 0.4px; margin: 12px 0 4px;
}
.fc-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.fc-fb-hint {
  margin-top: 6px; padding: 6px 8px; border-radius: 4px;
  background: #0f172a; font-size: 12px; line-height: 1.4;
}

/* ── Outlook-style event modal ───────────────────────────────────── */
.fc-evt-modal {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  width: 1000px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  overflow: hidden;
}
.fc-evt-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #0f172a;
  border-bottom: 1px solid #1e2a45;
  flex-wrap: wrap;
}
.fc-evt-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #cbd5e1;
  font: 13px 'Segoe UI', -apple-system, sans-serif;
  cursor: pointer;
}
.fc-evt-tb-btn:hover { background: #1e2a45; color: #f1f5f9; }
.fc-evt-tb-btn--primary { background: #0078d4; color: #fff; border-color: #0078d4; }
.fc-evt-tb-btn--primary:hover { background: #106ebe; color: #fff; }
.fc-evt-tb-btn--toggle.active { background: rgba(0,120,212,0.18); color: #2b9aff; border-color: #2b5fa3; }
.fc-evt-tb-sep { width: 1px; align-self: stretch; background: #334155; margin: 0 4px; }
.fc-evt-tb-group { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; }
.fc-evt-tb-sel {
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font: 13px 'Segoe UI', -apple-system, sans-serif;
  cursor: pointer;
  outline: none;
}
.fc-evt-tb-sel:focus { color: #f1f5f9; }
.fc-evt-tb-sel option { background: #1e293b; color: #cbd5e1; }
.fc-evt-tb-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
}
.fc-evt-tb-dot--free { background: #10b981; }
.fc-evt-tb-dot--busy { background: #f59e0b; }
.fc-evt-tb-dot--tentative { background: #94a3b8; }
.fc-evt-tb-dot--oof { background: #a855f7; }

.fc-evt-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.fc-evt-form {
  flex: 1 1 auto;
  padding: 14px 18px 18px;
  overflow-y: auto;
}
.fc-evt-day {
  flex: 0 0 280px;
  border-left: 1px solid #1e2a45;
  background: #131c30;
  overflow-y: auto;
  padding: 10px 12px;
}
.fc-evt-day-head {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e2a45;
}
.fc-evt-day-empty {
  color: #64748b;
  font-size: 12px;
  padding: 8px 0;
}
.fc-evt-day-item {
  border-left: 3px solid #0078d4;
  padding: 6px 8px;
  margin-bottom: 6px;
  background: #0f172a;
  border-radius: 0 4px 4px 0;
}
.fc-evt-day-time {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
}
.fc-evt-day-title {
  font-size: 12px;
  color: #f1f5f9;
  font-weight: 500;
}

.fc-evt-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #1e2a45;
}
.fc-evt-row:last-child { border-bottom: 0; }
.fc-evt-row--icon .fc-evt-row-ic {
  flex: 0 0 24px;
  text-align: center;
  font-size: 16px;
  color: #94a3b8;
  padding-top: 8px;
}
.fc-evt-input {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  color: #f1f5f9;
  font: 14px 'Segoe UI', -apple-system, sans-serif;
  padding: 7px 4px;
  outline: none;
  box-sizing: border-box;
}
.fc-evt-input:focus { border-bottom-color: #0078d4; }
.fc-evt-input--title {
  font-size: 18px;
  font-weight: 500;
  padding: 8px 4px;
}
.fc-evt-input--small { flex: 0 0 auto; min-width: 180px; }
.fc-evt-input--body {
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 8px 10px;
  background: #0f172a;
  font-size: 13px;
  resize: vertical;
}
.fc-evt-input--body:focus { border-color: #0078d4; }
select.fc-evt-input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 6px 8px;
}
select.fc-evt-input:focus { border-color: #0078d4; }
select.fc-evt-input option { background: #1e293b; color: #f1f5f9; }
.fc-evt-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.fc-evt-to {
  color: #64748b;
  font-size: 13px;
}
.fc-evt-allday {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.fc-evt-allday input { accent-color: #0078d4; }
.fc-evt-attendee-toggle {
  margin-top: 4px;
  font-size: 12px;
}
.fc-evt-attendee-toggle a { color: #2b9aff; text-decoration: none; }
.fc-evt-attendee-toggle a:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .fc-evt-day { display: none; }
}

.fc-help-row {
  margin-bottom: 14px; line-height: 1.5;
}
.fc-help-row b { color: #f1f5f9; }
.fc-help-row code {
  background: #0f172a; padding: 1px 6px; border-radius: 3px;
  font-size: 12px; color: #2b9aff;
}

/* Custom toolbar buttons (notify, sync, tasks) */
.fc .fc-notifyToggle-button,
.fc .fc-syncHelp-button,
.fc .fc-tasksToggle-button {
  font-size: 14px;
  padding: 5px 10px;
}
.fc .fc-button-active {
  background: #0078d4 !important;
  border-color: #0078d4 !important;
  color: #fff !important;
}

/* ───────────────────────────────────────────────────────────────────────
   Light theme overrides — mirror the messenger.css approach. Calendar-fc
   was authored dark-only; in light mode the global meridiam.css rule
   (`html[data-theme="light"] input { background: var(--bg-elevated) }`)
   forces inputs white while the surrounding modal / FC grid stayed dark,
   producing the high-contrast mess Igor flagged. Below: re-paint the
   FC root vars + every literal-color rule for light mode. */
html[data-theme="light"] .fc {
  --fc-border-color: #e5e7eb;
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: #ffffff;
  --fc-neutral-text-color: #6b7280;
  --fc-today-bg-color: rgba(37, 99, 235, 0.08);
  --fc-now-indicator-color: #ef4444;
  --fc-list-event-hover-bg-color: #f3f4f6;
  --fc-button-bg-color: #ffffff;
  --fc-button-border-color: #d1d5db;
  --fc-button-text-color: #111827;
  --fc-button-hover-bg-color: #f9fafb;
  --fc-button-hover-border-color: #9ca3af;
  --fc-button-active-bg-color: #2563eb;
  --fc-button-active-border-color: #2563eb;
}

/* FC toolbar + day headers */
html[data-theme="light"] .fc .fc-toolbar.fc-header-toolbar { border-bottom-color: #e5e7eb; }
html[data-theme="light"] .fc .fc-toolbar-title { color: #111827; }
html[data-theme="light"] .fc .fc-col-header-cell { background: #f9fafb; border-color: #e5e7eb; }
html[data-theme="light"] .fc .fc-col-header-cell-cushion { color: #6b7280; }
html[data-theme="light"] .fc .fc-day-today .fc-col-header-cell-cushion { color: #2563eb; }
html[data-theme="light"] .fc-dh-num { color: #111827; }
html[data-theme="light"] .fc-dh-name { color: #6b7280; }
html[data-theme="light"] .fc .fc-day-today .fc-dh-num,
html[data-theme="light"] .fc .fc-day-today .fc-dh-name { color: #2563eb; }
html[data-theme="light"] .fc .fc-col-header-cell:not(:first-child)::before,
html[data-theme="light"] .fc .fc-timegrid-col:not(:first-of-type)::before,
html[data-theme="light"] .fc .fc-daygrid-day:not(:first-of-type)::before,
html[data-theme="light"] .fc tr.fc-scrollgrid-section-body[role="presentation"] td.fc-day:not(:first-of-type)::before {
  background: #d1d5db;
}

/* FC grid backgrounds */
html[data-theme="light"] .fc .fc-view-harness,
html[data-theme="light"] .fc .fc-view-harness-active > .fc-view,
html[data-theme="light"] .fc .fc-scroller,
html[data-theme="light"] .fc .fc-scrollgrid,
html[data-theme="light"] .fc .fc-scrollgrid > tbody,
html[data-theme="light"] .fc .fc-scrollgrid-section,
html[data-theme="light"] .fc .fc-scrollgrid-section > *,
html[data-theme="light"] .fc .fc-scrollgrid-sync-table,
html[data-theme="light"] .fc .fc-daygrid-body,
html[data-theme="light"] .fc .fc-timegrid-body,
html[data-theme="light"] .fc .fc-timegrid-cols,
html[data-theme="light"] .fc .fc-timegrid-slots,
html[data-theme="light"] .fc .fc-list,
html[data-theme="light"] .fc .fc-list-table,
html[data-theme="light"] .fc table { background-color: #ffffff; }
html[data-theme="light"] .fc .fc-daygrid-day,
html[data-theme="light"] .fc .fc-daygrid-day-frame,
html[data-theme="light"] .fc td.fc-day,
html[data-theme="light"] .fc td.fc-day-future,
html[data-theme="light"] .fc td.fc-day-past { background-color: #ffffff; }
html[data-theme="light"] .fc-theme-standard td,
html[data-theme="light"] .fc-theme-standard th { border-color: #e5e7eb; }
html[data-theme="light"] .fc-theme-standard .fc-scrollgrid { border-color: #d1d5db; }
html[data-theme="light"] .fc .fc-day-sat,
html[data-theme="light"] .fc .fc-day-sun { background-color: #f9fafb; }
html[data-theme="light"] .fc .fc-day-today { background: rgba(37, 99, 235, 0.06) !important; }

/* Time grid axis + slots */
html[data-theme="light"] .fc .fc-timegrid-slot { border-color: #f3f4f6; }
html[data-theme="light"] .fc .fc-timegrid-slot-label { color: #9ca3af; }
html[data-theme="light"] .fc .fc-timegrid-axis { border-color: #e5e7eb; }
html[data-theme="light"] .fc .fc-timegrid-axis-cushion { color: #6b7280; }

/* All-day band — was pure black, now light gray to separate from time grid */
html[data-theme="light"] .fc .fc-scrollgrid-section-header + .fc-scrollgrid-section,
html[data-theme="light"] .fc .fc-timegrid-divider,
html[data-theme="light"] .fc .fc-timegrid-axis.fc-scrollgrid-shrink { background: #f3f4f6; }
html[data-theme="light"] .fc table.fc-scrollgrid > tbody > tr:has(.fc-timegrid-all-day-events) td,
html[data-theme="light"] .fc table.fc-scrollgrid > tbody > tr:nth-child(2) td { background-color: #f3f4f6 !important; }
html[data-theme="light"] .fc .fc-timegrid-divider.fc-divider { border-top-color: #d1d5db; }

/* Month grid day numbers */
html[data-theme="light"] .fc .fc-daygrid-day-number { color: #4b5563; }
html[data-theme="light"] .fc .fc-day-today .fc-daygrid-day-number { background: #2563eb; color: #fff; }
html[data-theme="light"] .fc .fc-day-other { background: #f9fafb; }
html[data-theme="light"] .fc .fc-day-other .fc-daygrid-day-number { color: #d1d5db; }

/* List view */
html[data-theme="light"] .fc .fc-list { border-color: #e5e7eb; background: #ffffff; }
html[data-theme="light"] .fc .fc-list-day-cushion { background: #f3f4f6; color: #4b5563; }
html[data-theme="light"] .fc .fc-list-event:hover td { background: #f3f4f6; }
html[data-theme="light"] .fc .fc-list-event-title a { color: #111827; }

/* Event peek (read-only popup) */
html[data-theme="light"] #fcPeek { background: rgba(0,0,0,0.35); }
html[data-theme="light"] .fc-peek-card { background: #ffffff; border-color: #d1d5db; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
html[data-theme="light"] .fc-peek-head { background: #f9fafb; border-bottom-color: #e5e7eb; }
html[data-theme="light"] .fc-peek-title { color: #111827; }
html[data-theme="light"] .fc-peek-close { color: #6b7280; }
html[data-theme="light"] .fc-peek-close:hover { background: #e5e7eb; color: #111827; }
html[data-theme="light"] .fc-peek-body { color: #4b5563; }
html[data-theme="light"] .fc-peek-time { color: #2563eb; }
html[data-theme="light"] .fc-peek-desc { color: #6b7280; border-top-color: #e5e7eb; }
html[data-theme="light"] .fc-peek-input { background: #ffffff; border-color: #d1d5db; color: #111827; }
html[data-theme="light"] .fc-peek-input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.18); }
html[data-theme="light"] .fc-peek-btn--secondary { border-color: #d1d5db; color: #4b5563; }
html[data-theme="light"] .fc-peek-btn--secondary:hover { background: #f3f4f6; border-color: #9ca3af; }
html[data-theme="light"] .fc-edit-lbl { color: #6b7280; }
html[data-theme="light"] .fc-fb-hint { background: #f3f4f6; }

/* Event create/edit modal — toolbar */
html[data-theme="light"] .fc-evt-modal { background: #ffffff; border-color: #d1d5db; box-shadow: 0 12px 36px rgba(0,0,0,0.18); }
html[data-theme="light"] .fc-evt-toolbar { background: #f9fafb; border-bottom-color: #e5e7eb; }
html[data-theme="light"] .fc-evt-tb-btn { color: #4b5563; }
html[data-theme="light"] .fc-evt-tb-btn:hover { background: #f3f4f6; color: #111827; }
html[data-theme="light"] .fc-evt-tb-btn--toggle.active { background: rgba(37,99,235,0.12); color: #2563eb; border-color: #93c5fd; }
html[data-theme="light"] .fc-evt-tb-sep { background: #e5e7eb; }
html[data-theme="light"] .fc-evt-tb-sel,
html[data-theme="light"] .fc-evt-tb-group .fc-evt-tb-sel { background: transparent !important; border: 0 !important; color: #4b5563 !important; }
html[data-theme="light"] .fc-evt-tb-sel:focus { color: #111827 !important; }
html[data-theme="light"] .fc-evt-tb-sel option { background: #ffffff !important; color: #111827 !important; }

/* Event modal body — form + day pane */
html[data-theme="light"] .fc-evt-day { background: #f9fafb; border-left-color: #e5e7eb; }
html[data-theme="light"] .fc-evt-day-head { color: #111827; border-bottom-color: #e5e7eb; }
html[data-theme="light"] .fc-evt-day-empty { color: #9ca3af; }
html[data-theme="light"] .fc-evt-day-item { background: #ffffff; border-left-color: #2563eb; }
html[data-theme="light"] .fc-evt-day-time { color: #6b7280; }
html[data-theme="light"] .fc-evt-day-title { color: #111827; }
html[data-theme="light"] .fc-evt-row { border-bottom-color: #e5e7eb; }
html[data-theme="light"] .fc-evt-row--icon .fc-evt-row-ic { color: #9ca3af; }
html[data-theme="light"] .fc-evt-to { color: #9ca3af; }
html[data-theme="light"] .fc-evt-allday { color: #4b5563; }
html[data-theme="light"] .fc-evt-attendee-toggle a { color: #2563eb; }

/* Event modal — every input/select/textarea explicitly themed. We need
   !important on these because the global meridiam.css:601 rule
   (`html[data-theme="light"] input, select, textarea { background: var(--bg-elevated) }`)
   already targets us; without !important the outline-style inputs we want
   stay #f8fafc with extra UA chrome. */
html[data-theme="light"] .fc-evt-input { background: transparent !important; color: #111827 !important; border: 0 !important; border-bottom: 1px solid transparent !important; }
html[data-theme="light"] .fc-evt-input:focus { border-bottom-color: #2563eb !important; }
html[data-theme="light"] .fc-evt-input--body { background: #ffffff !important; border: 1px solid #d1d5db !important; }
html[data-theme="light"] .fc-evt-input--body:focus { border-color: #2563eb !important; }
html[data-theme="light"] select.fc-evt-input { background-color: #ffffff !important; border: 1px solid #d1d5db !important; color: #111827 !important; }
html[data-theme="light"] select.fc-evt-input:focus { border-color: #2563eb !important; }
html[data-theme="light"] select.fc-evt-input option { background: #ffffff !important; color: #111827 !important; }

/* Tasks side panel (calendar tasks) — same dark-to-light treatment */
html[data-theme="light"] .fc-tasks-head h3 { color: #111827; }
html[data-theme="light"] .fc-tasks-close { color: #6b7280; }
html[data-theme="light"] .fc-tasks-close:hover { background: #f3f4f6; color: #111827; }
html[data-theme="light"] .fc-tasks-newrow { border-bottom-color: #e5e7eb; }
html[data-theme="light"] .fc-task-input { background: #ffffff; border-color: #d1d5db; color: #111827; }
html[data-theme="light"] .fc-task-input:focus { border-color: #2563eb; }
html[data-theme="light"] .fc-tasks-empty { color: #9ca3af; }
html[data-theme="light"] .fc-task:hover { background: #f3f4f6; }
html[data-theme="light"] .fc-task-due { color: #6b7280; }
html[data-theme="light"] .fc-task--done .fc-task-title { color: #9ca3af; }
html[data-theme="light"] .fc-tasks-done summary { color: #6b7280; }
html[data-theme="light"] .fc-tasks-done summary:hover { color: #111827; }
html[data-theme="light"] .fc-help-row b { color: #111827; }
html[data-theme="light"] .fc-help-row code { background: #f3f4f6; color: #2563eb; }

/* Chip-input attendee picker (replaces multi-select; empty by default) */
.fc-evt-chiprow { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; min-height: 0; }
.fc-evt-chiprow:empty { display: none; }
.fc-evt-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  padding: 2px 8px 2px 10px;
  font-size: 12px; line-height: 1.4;
}
.fc-evt-chip-x {
  background: transparent; border: 0; color: inherit;
  font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px;
  opacity: 0.7;
}
.fc-evt-chip-x:hover { opacity: 1; }
html[data-theme="light"] .fc-evt-chip {
  background: #dbeafe; color: #1e3a8a; border-color: #93c5fd;
}
