:root {
  --bs-primary: #2457a5;
  --bs-primary-rgb: 36, 87, 165;
  --bs-link-color: #2457a5;
  --bs-link-hover-color: #173f7d;
}

body {
  background: #f5f7fb;
  color: #1e293b;
}

.cabinet-header {
  background: #172b4d;
}

.cabinet-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  text-decoration: none;
}

.cabinet-brand img {
  flex: none;
}

.cabinet-brand:hover,
.cabinet-header-link:hover {
  color: #dbeafe;
}

.cabinet-brand-names {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.cabinet-brand-names strong {
  font-size: 1.15rem;
  letter-spacing: -.02em;
}

.cabinet-brand-names small {
  color: #a9c9f5;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-top: .2rem;
}

.cabinet-brand-section {
  border-left: 1px solid #7891b5;
  color: #dbeafe;
  font-size: .95rem;
  font-weight: 400;
  margin-left: .25rem;
  padding-left: .75rem;
}

.cabinet-header-link {
  color: #fff;
  text-decoration: none;
}

.login-panel {
  max-width: 32rem;
}

.login-alternative {
  margin-top: 1.5rem;
}

.login-divider {
  align-items: center;
  color: #64748b;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-divider::before,
.login-divider::after {
  background: #dbe3ee;
  content: "";
  flex: 1;
  height: 1px;
}

.card {
  border-radius: .85rem;
}

.btn-primary {
  --bs-btn-bg: #2457a5;
  --bs-btn-border-color: #2457a5;
  --bs-btn-hover-bg: #173f7d;
  --bs-btn-hover-border-color: #173f7d;
}

.btn-outline-primary {
  --bs-btn-color: #2457a5;
  --bs-btn-border-color: #2457a5;
  --bs-btn-hover-bg: #2457a5;
  --bs-btn-hover-border-color: #2457a5;
}

.btn-outline-cabinet-navigation {
  --bs-btn-color: #176347;
  --bs-btn-border-color: #176347;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #176347;
  --bs-btn-hover-border-color: #176347;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #104c36;
  --bs-btn-active-border-color: #104c36;
  --bs-btn-focus-shadow-rgb: 23, 99, 71;
}

.table th,
.table td {
  padding: 1rem 1.25rem;
}

.table th {
  color: #526176;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.table td:last-child {
  white-space: nowrap;
}

.user-id {
  overflow-wrap: anywhere;
}

.family-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scene-drag-handle {
  flex: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.scene-drag-handle:active {
  cursor: grabbing;
}

.scene-dragging {
  background: #eaf2ff;
}

.family-image-preview {
  background: transparent;
  border: 0;
  border-radius: .4rem;
  color: #526176;
  cursor: pointer;
  padding: 0;
}

.family-image-preview:focus-visible {
  outline: 3px solid #2457a5;
  outline-offset: 3px;
}

.family-image-thumbnail {
  border-radius: .4rem;
  display: block;
  object-fit: cover;
}

.family-image-error {
  font-size: .875rem;
}

.family-image-full {
  max-height: 75vh;
  max-width: 100%;
  object-fit: contain;
}

.htmx-indicator {
  display: none;
}

.htmx-indicator.htmx-request {
  display: inline;
}

.cabinet-artist-popup {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
}

.cabinet-artist-results {
  max-height: 15rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cabinet-artist-results > button {
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .table th,
  .table td {
    padding: .85rem;
  }

  .table td:last-child {
    white-space: normal;
  }
}
.cabinet-timetable-scroll { overflow: auto; max-height: 75vh; background: var(--bs-body-bg); }
.cabinet-timetable-grid { display: grid; min-width: 100%; width: max-content; }
.cabinet-timetable-heading { position: sticky; top: 0; z-index: 3; padding: .75rem; background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); font-weight: 600; }
.cabinet-timetable-heading:first-child { left: 0; z-index: 4; }
.cabinet-timetable-axis { position: sticky; left: 0; z-index: 2; background: var(--bs-body-bg); }
.cabinet-timetable-axis span { position: absolute; left: 8px; font-size: .75rem; white-space: nowrap; }
.cabinet-timetable-column { position: relative; border-left: 1px solid var(--bs-border-color); }
.cabinet-timetable-line { position: absolute; width: 100%; border-top: 1px solid var(--bs-border-color); }
.cabinet-timetable-block { position: absolute; padding: 1px 2px; min-height: 2px; }
.cabinet-timetable-block-content { display: block; height: 100%; overflow: auto; padding: .25rem .4rem; border: 1px solid var(--bs-primary); border-radius: .35rem; background: var(--bs-primary-bg-subtle); color: var(--bs-body-color); text-decoration: none; font-size: .8rem; overflow-wrap: anywhere; }
.cabinet-timetable-block-content strong, .cabinet-timetable-block-content small { display: block; }
a.cabinet-timetable-block-content:hover { filter: brightness(.96); }
a.cabinet-timetable-block-content:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 1px; }
.cabinet-timetable-conflict .cabinet-timetable-block-content { background: var(--bs-warning-bg-subtle); border-color: var(--bs-warning); }
.cabinet-timetable-featured .cabinet-timetable-block-content { border-width: 2px; font-weight: 600; }
