/* Case Management System -- custom theme
   Palette chosen to feel calm and professional for a student
   wellbeing case-management tool (not a marketing site): a deep
   sea-teal as the primary working color, warm sand for soft
   surfaces, and muted status colors for referral/case tracking. */

:root {
  --bs-primary: #16495f;
  --bs-primary-rgb: 22, 73, 95;
  --bs-secondary: #6b6459;
  --bs-success: #3f7d5c;
  --bs-warning: #c98a34;
  --bs-danger: #a8452f;
  --bs-info: #3f7d92;
  --bs-light: #f6f4ef;
  --bs-body-bg: #f6f4ef;
  --bs-body-color: #24302f;
  --bs-border-radius: 0.5rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-link-color: #16495f;
  --bs-link-hover-color: #0f333f;

  --cms-sidebar-bg: #12313f;
  --cms-sidebar-fg: #cdd9dc;
  --cms-sidebar-fg-active: #ffffff;
  --cms-sidebar-accent: #c98a34;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-body);
}

h1, h2, h3, .display-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Layout shell --- */
.cms-shell {
  display: flex;
  min-height: 100vh;
}

.cms-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--cms-sidebar-bg);
  color: var(--cms-sidebar-fg);
  display: flex;
  flex-direction: column;
}

.cms-sidebar .brand {
  padding: 1.25rem 1.25rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cms-sidebar .brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--cms-sidebar-fg);
  opacity: 0.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.cms-sidebar .nav-link {
  color: var(--cms-sidebar-fg);
  padding: 0.55rem 1.25rem;
  border-left: 3px solid transparent;
  font-size: 0.93rem;
}

.cms-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.cms-sidebar .nav-link.active {
  color: var(--cms-sidebar-fg-active);
  border-left-color: var(--cms-sidebar-accent);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.cms-sidebar .nav-section-label {
  padding: 1rem 1.25rem 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

.cms-main {
  flex-grow: 1;
  min-width: 0;
}

.cms-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e0d5;
  padding: 0.75rem 1.5rem;
}

.cms-content {
  padding: 1.5rem;
}

/* --- Cards & surfaces --- */
.card {
  border: 1px solid #e5e0d5;
  box-shadow: 0 1px 2px rgba(18, 49, 63, 0.04);
}

.card-header {
  background: #fbfaf7;
  font-weight: 600;
  border-bottom: 1px solid #e5e0d5;
}

/* --- Status pills: the app's signature recurring element.
   Every list/detail view that shows a case status uses these same
   color-coded pills, so staff can scan for status at a glance. --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--neutral { background: #eceae3; color: #5c5548; }
.status-pill--active { background: #e4efe8; color: #2f6146; }
.status-pill--warning { background: #f7ecd9; color: #8a5a1c; }
.status-pill--info { background: #e2eef1; color: #285a68; }
.status-pill--danger { background: #f3e0da; color: #8a3521; }

/* --- Checklist grid used by the large yes/no intake forms --- */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.35rem 1.5rem;
}

.checklist-grid .form-check {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e5e0d5;
}

.form-section-title:first-child {
  margin-top: 0;
}

@media (max-width: 768px) {
  .cms-shell { flex-direction: column; }
  .cms-sidebar { width: 100%; }
}
