:root {
  --app-bg: #f4f6f9;
  --app-muted-bg: #f8f9fa;
}

[data-bs-theme='dark'] {
  --app-bg: #111827;
  --app-muted-bg: #1f2937;
}

body {
  background: var(--app-bg);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.theme-toggle-floating {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-header {
  background: var(--bs-body-bg) !important;
  border-bottom-color: var(--bs-border-color) !important;
}

.feature-list .list-group-item {
  background: transparent;
  border: 0;
  padding-left: 0;
}

.metric-card h3 {
  font-size: 2rem;
}

#uploads-list .list-group-item,
#schedules-list .list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
}

.item-meta {
  color: #6c757d;
  font-size: 0.8rem;
}

.workspace-card .nav-tabs {
  --bs-nav-tabs-border-color: var(--bs-border-color);
  --bs-nav-tabs-link-active-bg: var(--bs-body-bg);
  --bs-nav-tabs-link-active-color: var(--bs-body-color);
  --bs-nav-tabs-link-hover-border-color: var(--bs-border-color);
}

.scheduler-card .card-body {
  min-height: 640px;
}

.player-sticky {
  position: sticky;
  top: 88px;
}

.workspace-card .workspace-body {
  min-height: 680px;
}

.workspace-card .nav-tabs .nav-link {
  font-weight: 600;
}

.workspace-card .tab-pane {
  min-height: 620px;
}

.schedule-help {
  padding: 0.45rem 0.6rem;
  background: rgba(13, 110, 253, 0.08);
  border: 1px solid rgba(13, 110, 253, 0.2);
  border-radius: 0.4rem;
}

.schedule-calendar {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  padding: 0.5rem;
  min-height: 560px;
}

.fc .fc-toolbar-title {
  font-size: 1.05rem;
}

.fc .fc-timegrid-slot-label {
  font-size: 0.8rem;
}

.fc .fc-event {
  border: 0;
  border-radius: 0.35rem;
}

@media (max-width: 991.98px) {
  .player-sticky {
    position: static;
  }

  .workspace-card .workspace-body,
  .workspace-card .tab-pane {
    min-height: auto;
  }
}

[data-bs-theme='dark'] .card,
[data-bs-theme='dark'] .list-group-item,
[data-bs-theme='dark'] .navbar,
[data-bs-theme='dark'] .modal-content {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme='dark'] .item-meta,
[data-bs-theme='dark'] .text-secondary {
  color: #a7b0bd !important;
}

[data-bs-theme='dark'] .bg-light,
[data-bs-theme='dark'] .bg-light-subtle {
  background: var(--app-muted-bg) !important;
}

[data-bs-theme='dark'] .schedule-calendar {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme='dark'] .workspace-card .nav-tabs .nav-link {
  color: #b7c0cd;
}

[data-bs-theme='dark'] .workspace-card .nav-tabs .nav-link.active {
  color: var(--bs-body-color);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-bs-theme='dark'] .schedule-help {
  background: rgba(110, 168, 254, 0.12);
  border-color: rgba(110, 168, 254, 0.3);
}

[data-bs-theme='dark'] .fc .fc-scrollgrid,
[data-bs-theme='dark'] .fc-theme-standard td,
[data-bs-theme='dark'] .fc-theme-standard th {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme='dark'] .fc .fc-col-header-cell,
[data-bs-theme='dark'] .fc .fc-timegrid-slot-label,
[data-bs-theme='dark'] .fc .fc-toolbar-title {
  color: var(--bs-body-color);
}

#now-playing-track {
  line-height: 1.25;
}

#now-playing-meta {
  line-height: 1.3;
}

#schedule-datetime:disabled,
#schedule-recurring:read-only {
  background: #eef1f4;
}

[data-bs-theme='dark'] #schedule-datetime:disabled,
[data-bs-theme='dark'] #schedule-recurring:read-only {
  background: #1a2433;
  color: #c5cfdd;
}
