:root {
  --bg: #f4efe7;
  --surface: rgba(255, 255, 255, 0.82);
  --line: rgba(36, 28, 21, 0.09);
  --ink: #221b17;
  --muted: #726457;
  --brand: #b9472b;
  --brand-dark: #8e331d;
}

html {
  font-size: 15px;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(185, 71, 43, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(230, 207, 169, 0.65), transparent 22%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
}

.admin-body {
  background:
    radial-gradient(circle at top left, rgba(185, 71, 43, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(230, 207, 169, 0.65), transparent 22%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
}

.tenant-body {
  background:
    radial-gradient(circle at top right, rgba(55, 95, 145, 0.18), transparent 30%),
    radial-gradient(circle at top left, rgba(129, 177, 224, 0.18), transparent 22%),
    linear-gradient(180deg, #f3f7fb 0%, #e9eef5 100%);
}

.app-shell {
  background: linear-gradient(135deg, #231916 0%, #5a2619 100%);
  box-shadow: 0 12px 40px rgba(34, 27, 23, 0.18);
}

.tenant-shell {
  background: linear-gradient(135deg, #18263b 0%, #284868 100%);
  box-shadow: 0 12px 40px rgba(24, 38, 59, 0.18);
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: #18263b;
  border-radius: 0.5rem;
  transform: translateY(-150%);
  transition: transform 120ms ease;
}

.skip-link:focus { transform: translateY(0); color: #fff; }

.tenant-app-shell { min-height: 100vh; display: flex; }
.tenant-sidebar { position: fixed; z-index: 1030; inset: 0 auto 0 0; display: flex; width: 272px; flex-direction: column; color: #e8f0fa; background: linear-gradient(180deg, #18263b 0%, #203b5a 100%); box-shadow: 10px 0 35px rgba(24, 38, 59, 0.12); }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.35rem 1.35rem 1.1rem; }
.brand-mark { display: inline-flex; align-items: center; gap: 0.65rem; color: #fff; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.brand-symbol { display: grid; width: 2rem; height: 2rem; place-items: center; color: #18263b; background: #f4c07a; border-radius: 0.65rem; }
.sidebar-close { display: none; color: #d7e3f0; background: none; border: 0; font-size: 1.25rem; }
.sidebar-collapse { display: grid; width: 2rem; height: 2rem; place-items: center; color: #9db4cb; background: rgba(255,255,255,0.06); border: 0; border-radius: 0.55rem; }
.sidebar-collapse:hover, .sidebar-collapse:focus-visible { color: #fff; background: rgba(255,255,255,0.14); outline: none; }
.sidebar-tenant { margin: 0 1rem 1rem; padding: 0.8rem 0.9rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 0.8rem; background: rgba(255,255,255,0.07); }
.sidebar-tenant-label { display: block; margin-bottom: 0.2rem; color: #9db4cb; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar-tenant strong { display: block; overflow: hidden; color: #fff; font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 0.75rem; }
.sidebar-link, .sidebar-group summary { display: flex; min-height: 2.55rem; align-items: center; gap: 0.75rem; padding: 0.62rem 0.75rem; color: #bdd0e2; border-radius: 0.65rem; font-size: 0.9rem; text-decoration: none; transition: color 120ms ease, background 120ms ease; }
.sidebar-link i, .sidebar-group summary > span > i { width: 1.1rem; color: #8faccc; text-align: center; }
.sidebar-link:hover, .sidebar-group summary:hover, .sidebar-link:focus-visible, .sidebar-group summary:focus-visible { color: #fff; background: rgba(255,255,255,0.1); outline: none; }
.sidebar-link.is-active { color: #fff; font-weight: 600; background: #3278a8; box-shadow: inset 3px 0 #f4c07a; }
.sidebar-link.is-active i { color: #f4c07a; }
.sidebar-group { margin-top: 0.35rem; }
.sidebar-group summary { justify-content: space-between; cursor: pointer; list-style: none; color: #e3edf7; font-weight: 600; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary > span { display: inline-flex; align-items: center; gap: 0.75rem; }
.sidebar-chevron { color: #8faccc; font-size: 0.7rem; transition: transform 120ms ease; }
.sidebar-group[open] .sidebar-chevron { transform: rotate(180deg); }
.sidebar-subnav { margin: 0.15rem 0 0.3rem 0.7rem; padding-left: 0.7rem; border-left: 1px solid rgba(255,255,255,0.12); }
.sidebar-sublink { min-height: 2.25rem; padding-top: 0.48rem; padding-bottom: 0.48rem; font-size: 0.86rem; }
.sidebar-footer { padding: 0.9rem 0.75rem 1.1rem; border-top: 1px solid rgba(255,255,255,0.12); }
.sidebar-logout { display: flex; width: 100%; align-items: center; gap: 0.75rem; padding: 0.62rem 0.75rem; color: #bdd0e2; background: none; border: 0; border-radius: 0.65rem; font-size: 0.9rem; text-align: left; }
.sidebar-logout:hover, .sidebar-logout:focus-visible { color: #fff; background: rgba(255,255,255,0.1); outline: none; }
.tenant-content-shell { width: calc(100% - 272px); min-width: 0; margin-left: 272px; }
.tenant-unauthenticated-shell { width: 100%; margin-left: 0; }
.sidebar-collapsed .tenant-sidebar { width: 76px; }
.sidebar-collapsed .tenant-content-shell { width: calc(100% - 76px); margin-left: 76px; }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding-left: 0.75rem; padding-right: 0.75rem; }
.sidebar-collapsed .brand-mark > span:last-child, .sidebar-collapsed .sidebar-tenant, .sidebar-collapsed .sidebar-link span, .sidebar-collapsed .sidebar-logout span { display: none; }
.sidebar-collapsed .brand-mark { gap: 0; }
.sidebar-collapsed .sidebar-link, .sidebar-collapsed .sidebar-logout, .sidebar-collapsed .sidebar-group summary { justify-content: center; padding-left: 0.5rem; padding-right: 0.5rem; }
.sidebar-collapsed .sidebar-link i, .sidebar-collapsed .sidebar-group summary > span > i, .sidebar-collapsed .sidebar-logout i { width: auto; }
.sidebar-collapsed .sidebar-group summary > span { font-size: 0; }
.sidebar-collapsed .sidebar-group summary > span > i { font-size: 0.95rem; }
.sidebar-collapsed .sidebar-chevron { display: none; }
.sidebar-collapsed .sidebar-subnav { margin-left: 0; padding-left: 0; border-left: 0; }
.sidebar-collapsed .sidebar-footer { padding-left: 0.75rem; padding-right: 0.75rem; }
.tenant-topbar { display: flex; min-height: 4.5rem; align-items: center; justify-content: space-between; padding: 0.8rem clamp(1rem, 4vw, 3rem); background: rgba(255,255,255,0.7); border-bottom: 1px solid rgba(36, 28, 21, 0.07); }
.topbar-context { display: flex; flex-direction: column; gap: 0.1rem; }
.topbar-page { font-weight: 600; }
.topbar-home, .sidebar-toggle { color: #284868; background: none; border: 0; font-size: 1.1rem; text-decoration: none; }
.sidebar-toggle { display: none; }
.tenant-main { max-width: 1440px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem); }
.dashboard-section-header, .panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-title { margin: 0.35rem 0 0; font-size: 1.25rem; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.quick-action { display: flex; min-height: 5.2rem; align-items: center; gap: 0.7rem; padding: 0.85rem; color: var(--ink); background: rgba(255,255,255,0.72); border: 1px solid var(--line); border-radius: 1rem; text-decoration: none; transition: transform 120ms ease, box-shadow 120ms ease; }
.quick-action:hover, .quick-action:focus-visible { color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(55, 41, 32, 0.1); outline: none; }
.quick-action > span:nth-child(2) { flex: 1; }
.quick-action strong, .quick-action small { display: block; }
.quick-action small { margin-top: 0.2rem; color: var(--muted); font-size: 0.75rem; }
.quick-action > i { color: var(--muted); font-size: 0.75rem; }
.quick-action-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; color: #285d86; background: #e4eff8; border-radius: 0.7rem; }
.dashboard-lower-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
.dashboard-panel { min-height: 240px; }
.dashboard-metric-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.dashboard-metric-row:last-child { border-bottom: 0; }
.dashboard-metric-row span { color: var(--muted); }
.dashboard-metric-row i { width: 1.25rem; color: #3278a8; }
.dashboard-next { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.dashboard-next p { max-width: 34rem; margin: 1rem 0 1.25rem; }

@media (max-width: 991.98px) {
  .sidebar-collapse { display: none; }
  .sidebar-collapsed .tenant-sidebar { width: 272px; }
  .sidebar-collapsed .tenant-content-shell { width: 100%; margin-left: 0; }
  .sidebar-collapsed .brand-mark > span:last-child, .sidebar-collapsed .sidebar-tenant, .sidebar-collapsed .sidebar-link span, .sidebar-collapsed .sidebar-logout span { display: block; }
  .sidebar-collapsed .brand-mark { gap: 0.65rem; }
  .sidebar-collapsed .sidebar-link, .sidebar-collapsed .sidebar-logout, .sidebar-collapsed .sidebar-group summary { justify-content: initial; padding-left: 0.75rem; padding-right: 0.75rem; }
  .sidebar-collapsed .sidebar-group summary > span { font-size: inherit; }
  .sidebar-collapsed .sidebar-chevron { display: block; }
  .tenant-sidebar { width: 272px; transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar-open .tenant-sidebar { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-backdrop { position: fixed; z-index: 1020; inset: 0; display: none; background: rgba(11, 21, 33, 0.48); }
  .sidebar-open .sidebar-backdrop { display: block; }
  .tenant-content-shell { width: 100%; margin-left: 0; }
  .sidebar-toggle { display: block; }
  .topbar-home { margin-left: auto; }
  .quick-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .tenant-main { padding-top: 1.25rem; }
  .tenant-topbar { min-height: 4rem; }
  .dashboard-section-header, .panel-heading { align-items: flex-start; flex-direction: column; }
  .quick-actions-grid, .dashboard-lower-grid { grid-template-columns: 1fr; }
  .tenant-hero { padding: 1.1rem; }
}

.hero-card,
.panel-card,
.stat-card,
.menu-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(55, 41, 32, 0.08);
}

.hero-card,
.panel-card {
  padding: 1.5rem;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.stats-grid {
  display: grid;
  gap: 1rem;
}

.section-label {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

.stat-card {
  padding: 1.25rem;
}

.stat-card span {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  margin-top: 0.45rem;
}

.stat-card.tall {
  min-height: 140px;
}

.btn-brand {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #d4682e 100%);
  border: 0;
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
}

.form-control,
.form-select,
.form-check-input {
  border-color: rgba(88, 64, 46, 0.14);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(185, 71, 43, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(185, 71, 43, 0.12);
}

.academy-list {
  gap: 0.8rem;
  display: grid;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.menu-card {
  padding: 1.4rem;
  min-height: 180px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.menu-card:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 71, 43, 0.25);
  box-shadow: 0 22px 45px rgba(55, 41, 32, 0.11);
}

.menu-card h2 {
  font-size: 1.3rem;
  margin: 0.7rem 0 0.55rem;
}

.menu-card p {
  color: var(--muted);
  margin: 0;
}

.menu-kicker {
  display: inline-block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.muted-card {
  opacity: 0.85;
}

.tenant-hero {
  border-color: rgba(40, 72, 104, 0.12);
}

.academy-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.76);
}

.academy-item:hover {
  background: rgba(255, 247, 237, 0.95);
  border-color: rgba(185, 71, 43, 0.26);
}

.tenant-entry {
  font-size: 0.78rem;
  color: var(--brand-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty-state {
  border: 1px dashed rgba(88, 64, 46, 0.24);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

.table > :not(caption) > * > * {
  background: transparent;
}

.crud-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.crud-list {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.crud-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-toggle-form {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.status-toggle-form .form-check {
  margin: 0;
  min-height: 0;
}

.status-toggle-form .form-check-input {
  width: 2.7rem;
  cursor: pointer;
}

.status-toggle-label {
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 4.5rem;
  text-align: left;
}

.crud-icon-button {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(36, 28, 21, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.crud-icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 71, 43, 0.35);
  background: rgba(255, 247, 237, 0.98);
  color: var(--brand-dark);
}

.crud-icon-button.danger:hover {
  border-color: rgba(185, 71, 43, 0.5);
  background: rgba(255, 239, 236, 0.98);
  color: var(--brand-dark);
}

.crud-icon-button svg {
  width: 1rem;
  height: 1rem;
}

.footer {
  border-top: 1px solid rgba(36, 28, 21, 0.08);
}

.login-hub {
  margin-top: 2rem;
  padding: 2rem;
}

.login-note-card {
  padding: 1.5rem;
}

.login-page-shell {
  padding: 1.5rem 0 2rem;
}

.login-side {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-side::after {
  content: "";
  position: absolute;
  inset: auto -40px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 72%);
}

.login-side-admin {
  background:
    linear-gradient(180deg, rgba(255, 248, 244, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%),
    linear-gradient(135deg, rgba(185, 71, 43, 0.12) 0%, rgba(212, 104, 46, 0.08) 100%);
}

.login-side-tenant {
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%),
    linear-gradient(135deg, rgba(40, 72, 104, 0.12) 0%, rgba(78, 133, 191, 0.08) 100%);
}

.login-form-card {
  padding: 2rem;
}

.login-feature-list {
  display: grid;
  gap: 1.25rem;
  color: var(--muted);
}

.login-feature-list p {
  margin-top: 0.35rem;
}

.login-link {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
}

.login-link:hover {
  text-decoration: underline;
}

.login-brand-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(40, 72, 104, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.login-brand-badge span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4b6989;
}

.login-brand-badge strong {
  font-size: 1rem;
  color: #18324f;
}

.btn-tenant {
  background: linear-gradient(135deg, #284868 0%, #3d6994 100%);
}

.btn-tenant:hover,
.btn-tenant:focus {
  background: linear-gradient(135deg, #1e3650 0%, #284868 100%);
}

@media (max-width: 991.98px) {
  .login-hub,
  .login-side,
  .login-form-card {
    padding: 1.5rem;
  }
}

.class-calendar-shell,
.class-session-modal {
  border-color: rgba(40, 72, 104, 0.14);
}

.class-calendar-shell {
  position: relative;
}

.class-calendar-toolbar,
.class-calendar-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.class-calendar-toolbar {
  margin-bottom: 1.25rem;
}

.class-calendar-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.calendar-selection-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(40, 72, 104, 0.12);
}

.calendar-selection-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #68809b;
  margin-bottom: 0.15rem;
}

.class-calendar-summary {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(40, 72, 104, 0.12);
  flex-wrap: wrap;
}

.calendar-period-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5d7898;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.calendar-period-title {
  font-size: 1.25rem;
}

.calendar-summary-chip {
  min-width: 180px;
  border-radius: 16px;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, rgba(40, 72, 104, 0.12), rgba(95, 140, 188, 0.18));
}

.calendar-summary-hours {
  margin-left: auto;
}

.calendar-summary-chip strong,
.calendar-summary-chip span {
  display: block;
}

.calendar-summary-chip strong {
  font-size: 1.45rem;
}

.calendar-summary-chip span {
  color: #4f6782;
  font-size: 0.82rem;
}

.class-calendar-grid {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.time-column-head,
.calendar-day-head {
  height: 58px;
}

.time-column-body,
.calendar-day-body {
  position: relative;
  height: 1440px;
}

.time-slot-label,
.calendar-hour-line {
  height: 60px;
}

.time-slot-label {
  font-size: 0.76rem;
  color: #68809b;
  text-align: right;
  padding-right: 0.65rem;
  transform: translateY(-0.5rem);
}

.calendar-columns {
  display: grid;
  gap: 0.5rem;
}

.calendar-columns.is-week-view {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-columns.is-day-view {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-day-column {
  min-width: 0;
}

.calendar-day-head {
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(40, 72, 104, 0.12);
  border-bottom: 0;
  padding: 0.8rem 0.9rem;
}

.calendar-day-head span,
.calendar-day-head strong {
  display: block;
}

.calendar-day-head span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5f7a98;
}

.calendar-day-head.is-selected {
  background: linear-gradient(135deg, rgba(40, 72, 104, 0.18), rgba(97, 145, 197, 0.2));
}

.calendar-day-body {
  border: 1px solid rgba(40, 72, 104, 0.12);
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(242, 247, 252, 0.88) 100%);
  overflow: hidden;
  touch-action: none;
}

.calendar-day-body.is-selecting {
  cursor: crosshair;
}

.calendar-hour-slot {
  position: relative;
  height: 60px;
  overflow: visible;
}

.calendar-hour-line {
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(40, 72, 104, 0.08);
}

.calendar-block {
  position: absolute;
  left: 0.3rem;
  right: 0.3rem;
  border-radius: 14px;
  padding: 0.5rem 0.55rem;
  color: #17324f;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 12px 24px rgba(36, 72, 110, 0.14);
  overflow: hidden;
}

.calendar-block span,
.calendar-block strong {
  display: block;
}

.calendar-block span {
  font-size: 0.72rem;
}

.calendar-block strong {
  font-size: 0.84rem;
  line-height: 1.2;
  margin-top: 0.15rem;
  word-break: break-word;
}

.calendar-block.is-selected {
  border-color: rgba(17, 49, 82, 0.4);
  box-shadow: 0 14px 28px rgba(24, 50, 79, 0.22);
}

.class-schedule-create-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.schedule-builder-form-card,
.schedule-preview-card {
  border-color: rgba(40, 72, 104, 0.14);
}

.schedule-builder-form-card {
  position: sticky;
  top: 1.5rem;
}

.schedule-form-section {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(40, 72, 104, 0.1);
}

.schedule-builder-meta,
.schedule-preview-meta {
  margin-bottom: 0;
}

.schedule-secondary-note {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(40, 72, 104, 0.08);
  color: #4f6782;
}

.schedule-secondary-note strong {
  color: #17324f;
  font-size: 0.9rem;
}

.schedule-secondary-note span {
  font-size: 0.82rem;
}

.schedule-preview-card {
  overflow: hidden;
}

.schedule-preview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: #4f6782;
  font-size: 0.82rem;
}

.schedule-preview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.schedule-preview-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}

.schedule-preview-dot.is-draft {
  background: linear-gradient(135deg, #d36a32, #f0a25f);
}

.schedule-preview-dot.is-context {
  background: rgba(67, 112, 160, 0.45);
}

.schedule-preview-grid .calendar-day-head strong {
  font-size: 0.88rem;
}

.schedule-preview-day-body {
  pointer-events: auto;
  cursor: crosshair;
}

.schedule-preview-block {
  box-shadow: none;
  pointer-events: none;
}

.schedule-preview-block.is-context {
  background: rgba(67, 112, 160, 0.18);
  border-color: rgba(67, 112, 160, 0.18);
  color: #355270;
  opacity: 0.72;
}

.schedule-preview-block.is-draft {
  background: linear-gradient(135deg, rgba(211, 106, 50, 0.92), rgba(240, 162, 95, 0.92));
  border-color: rgba(211, 106, 50, 0.35);
  color: #fff7f0;
  z-index: 2;
}

.schedule-preview-block.is-draft span,
.schedule-preview-block.is-draft strong {
  color: inherit;
}

.schedule-preview-block.is-draft.is-inactive {
  background: linear-gradient(135deg, rgba(116, 132, 148, 0.9), rgba(163, 176, 190, 0.92));
  border-color: rgba(116, 132, 148, 0.38);
}

.schedule-preview-empty {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(40, 72, 104, 0.06);
  border: 1px dashed rgba(40, 72, 104, 0.18);
  color: #567089;
  font-size: 0.88rem;
}

.calendar-draft-selection {
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  border-radius: 14px;
  border: 1px dashed rgba(24, 60, 99, 0.38);
  background: linear-gradient(135deg, rgba(106, 160, 217, 0.24), rgba(72, 128, 191, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
  z-index: 2;
}

.calendar-draft-popover {
  position: absolute;
  width: min(320px, calc(100% - 2rem));
  z-index: 20;
}

.calendar-draft-popover-card {
  border-radius: 20px;
  padding: 1rem;
  border: 1px solid rgba(40, 72, 104, 0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(24, 38, 59, 0.18);
  backdrop-filter: blur(10px);
}

.status-active {
  background: linear-gradient(135deg, rgba(78, 169, 116, 0.26), rgba(127, 211, 155, 0.3));
}

.status-pending {
  background: linear-gradient(135deg, rgba(240, 190, 82, 0.28), rgba(247, 221, 156, 0.34));
}

.status-cancelled {
  background: linear-gradient(135deg, rgba(188, 90, 90, 0.22), rgba(233, 160, 160, 0.26));
}

.status-inactive,
.status-suspended {
  background: linear-gradient(135deg, rgba(129, 141, 156, 0.2), rgba(194, 203, 212, 0.28));
}

.class-calendar-month-header,
.class-calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.class-calendar-month-header {
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.class-calendar-month-header div {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #617d99;
  font-weight: 700;
  padding-left: 0.25rem;
}

.class-calendar-month-grid {
  gap: 0.75rem;
}

.month-cell {
  min-height: 170px;
  border-radius: 20px;
  border: 1px solid rgba(40, 72, 104, 0.12);
  background: rgba(255, 255, 255, 0.68);
  padding: 0.8rem;
}

.month-cell.is-muted {
  opacity: 0.55;
}

.month-cell.is-selected {
  border-color: rgba(40, 72, 104, 0.34);
  box-shadow: 0 12px 28px rgba(36, 72, 110, 0.12);
}

.month-cell-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.month-cell-head span {
  font-weight: 700;
}

.month-cell-head small {
  color: #67819c;
}

.month-cell-items {
  display: grid;
  gap: 0.45rem;
}

.month-item {
  display: block;
  border-radius: 14px;
  padding: 0.55rem 0.65rem;
  color: #17324f;
  text-decoration: none;
}

.month-item span,
.month-item strong {
  display: block;
}

.month-item span {
  font-size: 0.72rem;
}

.month-item strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.selected-class-card {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(40, 72, 104, 0.12);
  margin-bottom: 1rem;
}

.modal-selected-class-card {
  margin-bottom: 1.25rem;
}

.class-session-modal {
  border: 1px solid rgba(40, 72, 104, 0.14);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(251, 254, 255, 0.98), rgba(239, 245, 251, 0.98));
  box-shadow: 0 24px 80px rgba(24, 38, 59, 0.22);
}

.class-session-modal .modal-header,
.class-session-modal .modal-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.selection-metadata {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.selection-metadata div {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(40, 72, 104, 0.08);
}

.selection-metadata dt {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #68809b;
}

.selection-metadata dd {
  margin: 0.2rem 0 0;
}

.floating-toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1200;
  display: grid;
  gap: 0.75rem;
  pointer-events: none;
}

.floating-toast {
  min-width: min(360px, calc(100vw - 2rem));
  max-width: 420px;
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 40px rgba(18, 32, 48, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  gap: 0.2rem;
  color: #fff;
  opacity: 0;
  transform: translateY(-10px);
  animation: floating-toast-in 180ms ease-out forwards;
}

.floating-toast strong {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.floating-toast span {
  font-size: 0.95rem;
  line-height: 1.4;
}

.floating-toast.is-success {
  background: linear-gradient(135deg, rgba(43, 138, 87, 0.96), rgba(72, 186, 116, 0.93));
}

.floating-toast.is-error {
  background: linear-gradient(135deg, rgba(173, 45, 45, 0.96), rgba(222, 93, 93, 0.93));
}

.floating-toast.is-hiding {
  animation: floating-toast-out 220ms ease-in forwards;
}

@keyframes floating-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floating-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 1399.98px) {
  .class-calendar-toolbar,
  .class-calendar-summary,
  .calendar-selection-banner {
    flex-direction: column;
  }

  .class-calendar-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 991.98px) {
  .class-calendar-grid {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .class-schedule-create-grid {
    grid-template-columns: 1fr;
  }

  .schedule-builder-form-card {
    position: static;
  }

  .calendar-columns.is-week-view {
    grid-template-columns: repeat(7, minmax(110px, 1fr));
    overflow-x: auto;
  }

  .class-calendar-month-grid,
  .class-calendar-month-header {
    gap: 0.5rem;
  }

  .month-cell {
    min-height: 140px;
    padding: 0.7rem;
  }
}

@media (max-width: 767.98px) {
  .class-calendar-grid {
    display: block;
  }

  .time-column {
    display: none;
  }

  .calendar-columns {
    grid-template-columns: 1fr;
  }

  .schedule-preview-grid {
    display: block;
  }

  .schedule-preview-grid .time-column {
    display: none;
  }

  .schedule-preview-grid .calendar-columns.is-week-view {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .calendar-day-body {
    height: 720px;
  }

  .class-calendar-month-header {
    display: none;
  }

  .class-calendar-month-grid {
    grid-template-columns: 1fr;
  }

  .month-cell {
    min-height: 0;
  }

  .calendar-draft-popover {
    width: calc(100% - 1.5rem);
  }

  .floating-toast-stack {
    left: 0.75rem;
    right: 0.75rem;
    top: 0.75rem;
  }

  .floating-toast {
    min-width: 0;
    max-width: none;
  }
}
