:root {
  --app-bg: #F8FAFC;
  --panel-bg: #FFFFFF;
  --panel-bg-soft: #f1f5f9;
  --line-soft: #E2E8F0;
  --line-strong: #CBD5E1;
  --accent-text: #1E40AF;
  --accent-text-hover: #1D4ED8;
  --accent-button: #2563EB;
  --accent-button-hover: #1D4ED8;
  --accent-soft: #EFF6FF;
  --text-strong: #0F172A;
  --text-default: #334155;
  --text-muted: #64748B;
  --accent: var(--accent-button);
  --accent-strong: var(--accent-button-hover);
  --danger: #c0333f;
  --danger-strong: #932631;
  --success: #2d7a49;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.2);
  --radius-xs: 8px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
}

.school-themed {
  --school-bg: var(--panel-bg-soft);
  --school-border: var(--line-soft);
  --school-accent: var(--accent);
  --school-ink: var(--text-strong);
}

body {
  background:
    radial-gradient(1400px 680px at 88% -18%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-default);
}

.sidebar {
  background: #0F172A !important;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  padding: 20px 18px !important;
  margin-bottom: 24px !important;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.sidebar-brand::before {
  content: none !important;
}

.sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-brand:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.sidebar-brand-mark {
  display: inline-flex !important;
  flex-shrink: 0 !important;
  width: 40px !important;
  height: 40px !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.sidebar-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-logo-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-brand-text-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.sidebar-brand-title,
.sidebar-brand h1 a,
.sidebar-brand-text-wrap .title {
  font-family: "Cabinet Grotesk", "Inter", system-ui, sans-serif !important;
  font-size: 29px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  color: #ffffff !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.sidebar-brand-title span,
.sidebar-brand h1 strong {
  color: #60A5FA !important;
}

.sidebar-brand-copy,
.sidebar-brand p,
.sidebar-brand span.caption {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.sidebar-brand-copy {
  min-width: 0 !important;
  width: auto !important;
  display: block !important;
  text-align: left !important;
}

.sidebar-brand-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  white-space: nowrap !important;
  width: auto !important;
}

.sidebar-brand-letter {
  display: inline-block;
}

.sidebar-brand-hash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  font-weight: 900 !important;
  transform-origin: center;
}

.sidebar-brand-hash-left {
  color: #fbbf24 !important;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
  transform: rotate(-14deg) translateY(-1px);
}

.sidebar-brand-hash-right {
  color: #fb7185 !important;
  text-shadow: 0 0 14px rgba(251, 113, 133, 0.28);
  transform: rotate(16deg) translateY(1px);
}

.sidebar-brand-copy p {
  margin: 0 !important;
  color: #FFFFFF !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

a,
.interactive-link,
.table-action-link {
  color: var(--accent-text) !important;
}

a:hover,
.interactive-link:hover {
  color: var(--accent-text-hover) !important;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-status-notices {
  margin-top: 10px;
}

.sidebar-page-notice.success {
  background: rgba(32, 122, 73, 0.2);
  border-color: rgba(94, 201, 138, 0.52);
  color: #dff7e8;
}

.sidebar-page-notice.info {
  background: rgba(40, 93, 167, 0.22);
  border-color: rgba(122, 170, 238, 0.46);
  color: #deebff;
}

.sidebar-page-notice.warning {
  background: rgba(153, 108, 27, 0.24);
  border-color: rgba(233, 187, 96, 0.5);
  color: #fff0cf;
}

.sidebar-page-notice.error {
  background: rgba(166, 46, 58, 0.22);
  border-color: rgba(242, 128, 139, 0.52);
  color: #ffe2e5;
}

.sidebar-logout-btn {
  width: 100%;
}

.main {
  background: transparent;
}

.page h2 {
  margin-bottom: 18px;
}

.page-intro {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.semantic-note {
  border: 0;
  background: linear-gradient(180deg, #f9fbfe 0%, #f5f8fc 100%);
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.stat-card .number {
  color: var(--accent-strong);
}

.workspace-focus-shell,
.workspace-inner-content,
.workspace-class-card,
.workspace-constraint-card,
.workspace-school-panel,
.workspace-temporal-school-card,
.school-card,
.workspace-meta-card {
  border-color: var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.workspace-inner-tabs {
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.workspace-tab {
  border-radius: 999px;
  padding: 9px 14px;
}

.workspace-tab.active {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--accent-strong);
}

.controls {
  gap: 10px;
}

.workspace-coursemap-controls,
.workspace-inline-controls,
.workspace-temporal-toolbar,
.workspace-temporal-toolbar-row {
  gap: 10px;
}

.workspace-summary-card {
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.workspace-summary-card strong,
.workspace-class-title,
.workspace-focus-title,
.school-card-title {
  color: var(--text-strong);
}

.workspace-class-card.school-themed,
.workspace-school-panel.school-themed,
.workspace-school-chip.school-themed,
.school-card.school-themed,
.workspace-temporal-school-card.school-themed {
  background: #ffffff;
  border-color: var(--school-border);
}

.ontology-token.school-themed {
  border: 1px solid var(--school-border);
  color: var(--school-ink);
  background: var(--school-bg);
}

.ontology-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d4dfec;
  background: #f4f8fd;
  color: #29415b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}

.workspace-school-chip.school-themed .workspace-chip-remove {
  color: var(--school-accent);
}

.workspace-school-option.school-themed {
  border: 1px solid var(--school-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, var(--school-bg) 100%);
  padding: 8px 10px;
}

.workspace-school-option.school-themed:hover {
  border-color: var(--school-accent);
}

.workspace-temporal-rule-legend span,
.workspace-slot-badge {
  border-radius: 999px;
}

.dashboard-page .campus-map-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.students-school-grid {
  gap: 14px;
  margin-right: auto;
}

.school-card {
  border-left: 4px solid var(--school-accent);
}

.school-card-last-updated {
  color: var(--school-accent);
  opacity: 0.85;
}

.students-year-toggle {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.students-cohort-item {
  border: 1px solid var(--line-soft);
}

.students-school-body-scroll::-webkit-scrollbar {
  width: 10px;
}

.students-school-body-scroll::-webkit-scrollbar-thumb {
  background: rgba(96, 126, 158, 0.32);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.workspace-temporal-day {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.workspace-temporal-day.disabled-by-rule {
  opacity: 0.72;
}

.workspace-temporal-day[data-has-elective-zone="true"] {
  background: linear-gradient(180deg, #f8f3ff 0%, #ffffff 100%);
}

.workspace-temporal-rule-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
}

.workspace-temporal-school-summary-title,
.workspace-school-section-summary-title {
  color: var(--school-ink);
}

.workspace-temporal-school-summary-meta,
.workspace-school-section-summary-meta {
  color: var(--text-muted);
}

.workspace-temporal-rule-card.elective-zone,
.workspace-temporal-rule-status.elective-zone {
  background: #f1ebff;
  border-color: #dacdf3;
  color: #493681;
}
