/* =====================================================================
   THREESIXOH DARK CALENDAR FIX v1.1
   Sales + Production calendar surfaces only
   ===================================================================== */

/* ---------------------------------------------------------
   SALES CALENDAR — MONTH VIEW
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .tso-calendar-scroll {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-month-calendar {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-month-calendar .tso-calendar-weekday {
    background:#142f46 !important;
    color:#cbd5e1 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-month-calendar .tso-calendar-day-cell {
    background:#182235 !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-month-calendar .tso-calendar-day-cell.outside-month {
    background:#111827 !important;
    color:#64748b !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-month-calendar .tso-calendar-day-cell.today {
    background:#1b2b3e !important;
    box-shadow:inset 0 0 0 2px #2dd4bf !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-calendar-day-head {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-calendar-day-head a {
    color:#e2e8f0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-calendar-day-cell.outside-month .tso-calendar-day-head a {
    color:#64748b !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-calendar-day-cell.today .tso-calendar-day-head a {
    background:#2dd4bf !important;
    color:#07131f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-calendar-day-head span {
    background:#243247 !important;
    color:#94a3b8 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-calendar-more {
    color:#5eead4 !important;
}


/* ---------------------------------------------------------
   SALES CALENDAR — WEEK VIEW
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .tso-week-calendar {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-week-day {
    background:#182235 !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-week-day > header {
    background:#142f46 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-week-day > header a,
html[data-theme="dark"] body.tso-shell-enabled .tso-week-day > header strong {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-week-day > header span,
html[data-theme="dark"] body.tso-shell-enabled .tso-week-day > header small {
    color:#94a3b8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-week-day.today {
    box-shadow:inset 0 3px 0 #2dd4bf !important;
}


/* ---------------------------------------------------------
   SALES CALENDAR — DAY / AGENDA
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .tso-day-calendar,
html[data-theme="dark"] body.tso-shell-enabled .tso-agenda-calendar {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-day-appointment-row,
html[data-theme="dark"] body.tso-shell-enabled .tso-agenda-row {
    background:#182235;
    color:#f1f5f9 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-day-appointment-row:hover,
html[data-theme="dark"] body.tso-shell-enabled .tso-agenda-row:hover {
    background:#1e2d42 !important;
}


/* ---------------------------------------------------------
   PRODUCTION CALENDAR — MONTH VIEW
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-calendar-scroll {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-month-calendar {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-prod-month-calendar .tso-prod-calendar-weekday {
    background:#142f46 !important;
    color:#cbd5e1 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-prod-month-calendar .tso-prod-calendar-day-cell {
    background:#182235 !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-prod-month-calendar .tso-prod-calendar-day-cell.outside-month {
    background:#111827 !important;
    color:#64748b !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-prod-month-calendar .tso-prod-calendar-day-cell.today {
    background:#1b2b3e !important;
    box-shadow:inset 0 0 0 2px #2dd4bf !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-calendar-day-head {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-calendar-day-head a {
    color:#e2e8f0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-prod-calendar-day-cell.outside-month .tso-prod-calendar-day-head a {
    color:#64748b !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-prod-calendar-day-cell.today .tso-prod-calendar-day-head a {
    background:#2dd4bf !important;
    color:#07131f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-calendar-day-head span {
    background:#243247 !important;
    color:#94a3b8 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-calendar-more {
    color:#5eead4 !important;
}


/* ---------------------------------------------------------
   PRODUCTION CALENDAR — WEEK VIEW
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-calendar {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day {
    background:#182235 !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day > header {
    background:#142f46 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day > header a,
html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day > header strong {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day > header span,
html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day > header small {
    color:#94a3b8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-week-day.today {
    box-shadow:inset 0 3px 0 #2dd4bf !important;
}


/* ---------------------------------------------------------
   PRODUCTION CALENDAR — DAY VIEW
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-day-calendar {
    background:#182235 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-day-row {
    background:#182235;
    color:#f1f5f9 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-prod-day-row:hover {
    background:#1e2d42 !important;
}


/* ---------------------------------------------------------
   LEGACY CALENDAR SAFETY NET
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled .month-calendar .calendar-day-cell {
    background:#182235 !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.month-calendar .calendar-day-cell.outside-month {
    background:#111827 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .month-calendar .calendar-weekday {
    background:#142f46 !important;
    color:#cbd5e1 !important;
    border-color:#475569 !important;
}


/* End THREESIXOH DARK CALENDAR FIX v1.1 */

/* =====================================================================
   THREESIXOH DARK CALENDAR APPOINTMENT CONTRAST v1
   ===================================================================== */

/*
 * Calendar background remains Midnight.
 * Appointment cards receive a distinct blue-gray elevated surface.
 */

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment,
  .tso-day-appointment-row,
  .tso-agenda-row,
  .calendar-appointment,
  .appointment-chip,
  .sched-event,
  .tso-prod-calendar-job,
  .tso-prod-day-row
) {
    background:#263a52 !important;

    border-top-color:#3b526b !important;
    border-right-color:#3b526b !important;
    border-bottom-color:#3b526b !important;

    color:#f8fafc !important;

    box-shadow:
        0 1px 2px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.025) !important;
}

/*
 * Preserve the existing left-hand status color.
 * We intentionally do not redefine border-left-color here.
 */

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment,
  .tso-day-appointment-row,
  .tso-agenda-row,
  .calendar-appointment,
  .appointment-chip,
  .sched-event,
  .tso-prod-calendar-job,
  .tso-prod-day-row
):hover {
    background:#304965 !important;

    border-top-color:#506983 !important;
    border-right-color:#506983 !important;
    border-bottom-color:#506983 !important;

    box-shadow:
        0 3px 8px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.035) !important;
}


/* Main appointment text */

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment,
  .tso-day-appointment-row,
  .tso-agenda-row,
  .calendar-appointment,
  .appointment-chip,
  .sched-event,
  .tso-prod-calendar-job,
  .tso-prod-day-row
)
:where(strong,.calendar-appointment-title) {
    color:#f8fafc !important;
}


/* Secondary appointment information */

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment,
  .tso-day-appointment-row,
  .tso-agenda-row,
  .calendar-appointment,
  .appointment-chip,
  .sched-event,
  .tso-prod-calendar-job,
  .tso-prod-day-row
)
:where(small,.muted) {
    color:#a8b6c7 !important;
}


/* Appointment times remain prominent */

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment,
  .tso-day-appointment-row,
  .tso-agenda-row,
  .calendar-appointment,
  .appointment-chip,
  .sched-event,
  .tso-prod-calendar-job,
  .tso-prod-day-row
)
time {
    color:#60a5fa !important;
}


/* ---------------------------------------------------------
   MARKETSHARP
   Slightly more neutral than native ThreeSixOh! appointments.
   --------------------------------------------------------- */

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment.source-marketsharp,
  .tso-day-appointment-row.source-marketsharp,
  .tso-agenda-row.source-marketsharp,
  .calendar-appointment.source-marketsharp
) {
    background:#303b4d !important;

    border-top-color:#465569 !important;
    border-right-color:#465569 !important;
    border-bottom-color:#465569 !important;

    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled
:where(
  .tso-calendar-appointment.source-marketsharp,
  .tso-day-appointment-row.source-marketsharp,
  .tso-agenda-row.source-marketsharp,
  .calendar-appointment.source-marketsharp
):hover {
    background:#39475b !important;
}

html[data-theme="dark"] body.tso-shell-enabled
.tso-marketsharp-source-badge {
    color:#b7c4d2 !important;
    background:#26313f !important;
    border-color:#536276 !important;
}


/* End THREESIXOH DARK CALENDAR APPOINTMENT CONTRAST v1 */
