:root {
  color-scheme: dark;
}

:root.light {
  color-scheme: light;
}

[x-cloak] {
  display: none !important;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 24%),
    linear-gradient(180deg, #020617 0%, #0f172a 28%, #0f172a 100%);
}

:root.light body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.07), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 40%, #e2e8f0 100%);
  color: #0f172a;
}

:root.light .page-glow {
  background:
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.1), transparent 22%),
    radial-gradient(circle at 85% 18%, rgba(56, 189, 248, 0.08), transparent 22%);
}

:root.light [class^="bg-slate-950"],
:root.light [class*=" bg-slate-950"] {
  background-color: rgb(255 255 255 / 0.94) !important;
}

:root.light [class^="bg-slate-900"],
:root.light [class*=" bg-slate-900"] {
  background-color: rgb(248 250 252 / 0.94) !important;
}

:root.light [class^="bg-slate-800"],
:root.light [class*=" bg-slate-800"] {
  background-color: rgb(226 232 240 / 0.9) !important;
}

:root.light [class^="bg-slate-700"],
:root.light [class*=" bg-slate-700"] {
  background-color: rgb(203 213 225 / 0.92) !important;
}

:root.light [class^="border-slate-"],
:root.light [class*=" border-slate-"] {
  border-color: rgb(203 213 225) !important;
}

:root.light [class^="text-slate-50"],
:root.light [class*=" text-slate-50"],
:root.light [class^="text-slate-100"],
:root.light [class*=" text-slate-100"] {
  color: rgb(15 23 42) !important;
}

:root.light [class^="text-slate-200"],
:root.light [class*=" text-slate-200"],
:root.light [class^="text-slate-300"],
:root.light [class*=" text-slate-300"] {
  color: rgb(30 41 59) !important;
}

:root.light [class^="text-slate-400"],
:root.light [class*=" text-slate-400"] {
  color: rgb(71 85 105) !important;
}

:root.light [class^="text-slate-500"],
:root.light [class*=" text-slate-500"] {
  color: rgb(100 116 139) !important;
}

:root.light .text-white:not([class*="bg-blue-"]):not([class*="bg-emerald-"]):not([class*="bg-rose-"]) {
  color: rgb(15 23 42) !important;
}

:root.light [class^="text-emerald-"],
:root.light [class*=" text-emerald-"] {
  color: rgb(4 120 87) !important;
}

:root.light [class^="text-amber-"],
:root.light [class*=" text-amber-"] {
  color: rgb(146 64 14) !important;
}

:root.light [class^="text-rose-"],
:root.light [class*=" text-rose-"] {
  color: rgb(190 18 60) !important;
}

:root.light .ui-card {
  border-color: rgb(203 213 225);
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 18px 45px rgb(15 23 42 / 0.12);
}

:root.light .form-control {
  border-color: rgb(148 163 184);
  background: rgb(255 255 255 / 0.96);
  color: rgb(15 23 42);
}

:root.light ::-webkit-scrollbar-track {
  background: rgb(226 232 240 / 0.9);
}

:root.light ::-webkit-scrollbar-thumb {
  background: rgb(148 163 184 / 0.9);
  border-color: rgb(226 232 240 / 0.9);
}

.page-glow {
  background:
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.14), transparent 22%),
    radial-gradient(circle at 85% 18%, rgba(56, 189, 248, 0.08), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(15, 23, 42, 0.45), transparent 40%);
  pointer-events: none;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.85);
}

::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.9);
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.85);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.95);
}

.ui-container {
  width: 100%;
  min-width: 0;
}

.ui-card {
  overflow: hidden;
  border: 1px solid rgb(30 41 59);
  border-radius: 1.5rem;
  background: rgb(30 41 59 / 0.8);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.ui-card-pad {
  padding: 1.25rem;
}

.form-control {
  display: block;
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgb(71 85 105);
  background: rgb(51 65 85 / 0.8);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: rgb(226 232 240);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.form-control::placeholder {
  color: rgb(100 116 139);
}

.form-control:focus {
  border-color: rgb(59 130 246);
  outline: 0;
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.4);
}

.ui-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-compact {
  display: inline-flex;
  min-height: 2.5rem;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 9999px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  background: rgb(37 99 235);
  padding: 0.75rem 1.25rem;
  color: white;
}

.btn-primary:hover {
  background: rgb(59 130 246);
}

.btn-secondary {
  border: 1px solid rgb(51 65 85);
  background: rgb(15 23 42 / 0.7);
  padding: 0.75rem 1.25rem;
  color: rgb(226 232 240);
}

.btn-secondary:hover {
  border-color: rgb(71 85 105);
  background: rgb(30 41 59 / 0.8);
}

.btn-danger {
  border: 1px solid rgb(190 18 60 / 0.7);
  background: rgb(127 29 29 / 0.45);
  padding: 0.75rem 1.25rem;
  color: rgb(255 228 230);
}

.btn-danger:hover {
  border-color: rgb(244 63 94);
  background: rgb(159 18 57 / 0.45);
}

.btn-compact {
  min-height: 2rem;
  border: 1px solid rgb(51 65 85);
  background: rgb(15 23 42 / 0.7);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: rgb(226 232 240);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgb(51 65 85 / 0.55);
}

.clickable-row:focus-within {
  outline: 2px solid rgb(59 130 246 / 0.65);
  outline-offset: -2px;
}

.text-safe {
  min-width: 0;
  overflow-wrap: anywhere;
}

.truncate-safe {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-density="compact"] .density-cell {
  padding: 0.55rem 0.85rem;
  font-size: 0.8125rem;
}

:root[data-density="comfortable"] .density-cell {
  padding: 0.8rem 1.1rem;
  font-size: 0.875rem;
}

:root[data-density="expanded"] .density-cell {
  padding: 1.1rem 1.25rem;
  font-size: 0.9375rem;
}

:root[data-density="compact"] .density-card {
  padding: 0.85rem;
}

:root[data-density="comfortable"] .density-card {
  padding: 1.25rem;
}

:root[data-density="expanded"] .density-card {
  padding: 1.65rem;
}

body.schedule-fullscreen {
  overflow: hidden;
}

body.schedule-fullscreen .schedule-sidebar,
.schedule-fullscreen-active .schedule-sidebar {
  width: 0;
  border-right-width: 0;
  overflow: hidden;
}

body.schedule-fullscreen main {
  padding: 0 !important;
}

.schedule-board-scroll {
  max-height: calc(100vh - 17rem);
  overflow: auto;
  overscroll-behavior: contain;
}

body.schedule-fullscreen .schedule-board-scroll {
  max-height: calc(100vh - 5.25rem);
}

.schedule-card {
  min-height: 3.25rem;
}

.schedule-card:hover {
  z-index: 70;
}
