/* ============================================
   UCSC STUDENT HEALTH — DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --blue-900: #001F3F;
  --blue-800: #003C6C;
  --blue-700: #005091;
  --blue-600: #0066B3;
  --blue-100: #E0EEFA;
  --blue-50:  #F0F7FF;

  --gold-500: #FDC700;
  --gold-400: #FFD540;
  --gold-100: #FFF8DC;
  --gold-50:  #FFFDF0;

  --green-500: #2DB67D;
  --green-100: #E6F7F1;
  --red-500:   #E05252;
  --red-100:   #FDEAEA;
  --orange-500: #F5A623;
  --orange-100: #FEF3E2;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white:    #FFFFFF;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
  --transition: 0.18s ease;

  --nav-h: 68px;
  --sidebar-w: 240px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }
ul { list-style: none; }

/* --- Typography --- */
h1 { font-size: 2rem;   font-weight: 700; line-height: 1.2; color: var(--gray-900); }
h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.3; color: var(--gray-900); }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--gray-900); }
h4 { font-size: 0.9375rem; font-weight: 600; color: var(--gray-900); }
p  { color: var(--gray-500); }

/* ============================================
   TOP NAV
   ============================================ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--blue-800);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 24px;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.topnav__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.topnav__logo {
  width: 36px;
  height: 36px;
  background: var(--gold-500);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topnav__logo svg { color: var(--blue-800); }
.topnav__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}
.topnav__sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  display: block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topnav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.topnav__link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.topnav__link:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.topnav__link.active {
  background: var(--gold-500);
  color: var(--blue-800);
}
.topnav__link svg { width: 16px; height: 16px; flex-shrink: 0; }

.topnav__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.topnav__mobile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.topnav__mobile-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.topnav__notif {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  position: relative;
  transition: background var(--transition);
  cursor: pointer;
}
.topnav__notif:hover { background: rgba(255,255,255,0.18); }
.notif-dot {
  width: 8px; height: 8px;
  background: var(--gold-500);
  border-radius: 50%;
  position: absolute;
  top: 8px; right: 8px;
  border: 2px solid var(--blue-800);
}
.topnav__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold-100);
  border: 2px solid var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue-800);
  cursor: pointer;
  transition: border-color var(--transition);
}
.topnav__avatar:hover { border-color: var(--gold-500); }

/* ─── Notification Dropdown ──────────────────────────────── */
.topnav__notif-wrap { position: relative; }
.notif-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 36px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 300;
}
.notif-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.notif-menu__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--gray-100);
}
.notif-menu__title { font-size: 0.9375rem; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff;
  border-radius: 99px; font-size: 0.6875rem; font-weight: 700;
}
.notif-menu__mark {
  font-size: 0.75rem; font-weight: 600; color: var(--blue-700);
  cursor: pointer; background: none; border: none; font-family: var(--font);
  transition: color var(--transition);
}
.notif-menu__mark:hover { color: var(--blue-800); }
.notif-menu__list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--gray-50); }
.notif-item--unread { background: var(--blue-50); }
.notif-item--unread:hover { background: #dbeeff; }
.notif-item__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title { font-size: 0.875rem; font-weight: 600; color: var(--gray-900); margin-bottom: 2px; }
.notif-item__text  { font-size: 0.8125rem; color: var(--gray-500); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item__time  { font-size: 0.6875rem; color: var(--gray-400); margin-top: 4px; font-weight: 500; }
.notif-item__dot {
  width: 8px; height: 8px;
  background: var(--blue-600);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-menu__footer {
  display: block;
  text-align: center;
  padding: 11px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-700);
  border-top: 1px solid var(--gray-100);
  text-decoration: none;
  transition: background var(--transition);
}
.notif-menu__footer:hover { background: var(--gray-50); color: var(--blue-800); }

/* ─── Profile Dropdown Menu ──────────────────────────────── */
.topnav__profile { position: relative; }
.profile-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 248px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 36px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 300;
}
.profile-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.profile-menu__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.profile-menu__avatar-lg {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gold-100);
  border: 2px solid var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9375rem; font-weight: 700;
  color: var(--blue-800);
  flex-shrink: 0;
}
.profile-menu__name  { font-size: 0.9375rem; font-weight: 700; color: var(--gray-900); }
.profile-menu__email { font-size: 0.75rem; color: var(--gray-500); margin-top: 1px; }
.profile-menu__divider { height: 1px; background: var(--gray-100); margin: 2px 0; }
.profile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition);
}
.profile-menu__item:hover { background: var(--gray-50); color: var(--gray-900); }
.profile-menu__item-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--gray-600);
}
.profile-menu__badge {
  margin-left: auto;
  background: var(--blue-800);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}
.profile-menu__item--out { color: var(--red-500); }
.profile-menu__item--out:hover { background: var(--red-100); color: var(--red-500); }
.profile-menu__item--out .profile-menu__item-icon { background: var(--red-100); color: var(--red-500); }

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page-wrapper {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.page-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 28px 64px;
}
.page-header {
  margin-bottom: 32px;
}
.page-header p {
  margin-top: 6px;
  font-size: 0.9375rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--blue-800);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-gold {
  background: var(--gold-500);
  color: var(--blue-800);
}
.btn-gold:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--blue-800);
  border: 1.5px solid var(--blue-800);
}
.btn-outline:hover { background: var(--blue-50); }

.btn-ghost {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-300); }

.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 13px 28px; font-size: 0.9375rem; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}
.card-pad { padding: 24px; }
.card-pad-lg { padding: 32px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

/* ============================================
   BADGES / STATUS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-green  { background: var(--green-100); color: #1a7a54; }
.badge-red    { background: var(--red-100);   color: #b53030; }
.badge-orange { background: var(--orange-100);color: #a06010; }
.badge-blue   { background: var(--blue-100);  color: var(--blue-800); }
.badge-gray   { background: var(--gray-100);  color: var(--gray-500); }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(0,102,179,0.1);
}
.form-control::placeholder { color: var(--gray-300); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 20px 0;
}

/* ============================================
   ICON CIRCLE
   ============================================ */
.icon-circle {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-circle svg { width: 20px; height: 20px; }
.icon-circle-blue   { background: var(--blue-100);   color: var(--blue-800); }
.icon-circle-gold   { background: var(--gold-100);   color: #a07000; }
.icon-circle-green  { background: var(--green-100);  color: #1a7a54; }
.icon-circle-orange { background: var(--orange-100); color: #a06010; }
.icon-circle-red    { background: var(--red-100);    color: #b53030; }

/* ============================================
   QUICK ACTIONS GRID (home)
   ============================================ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.quick-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0,60,108,0.12);
}
.quick-card__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-900);
}
.quick-card__desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============================================
   MAIN GRID (two-col)
   ============================================ */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.main-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ============================================
   APPOINTMENT ITEM
   ============================================ */
.appt-list { display: flex; flex-direction: column; gap: 12px; }
.appt-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  transition: border-color var(--transition), background var(--transition);
}
.appt-item:hover { background: var(--blue-50); border-color: var(--blue-100); }
.appt-date-box {
  width: 52px; height: 56px;
  background: var(--blue-800);
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}
.appt-date-box .month { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }
.appt-date-box .day   { font-size: 1.375rem; font-weight: 700; line-height: 1; }
.appt-info { flex: 1; min-width: 0; }
.appt-info h4 { font-size: 0.9375rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-info p  { font-size: 0.8125rem; }
.appt-time { font-size: 0.8125rem; font-weight: 600; color: var(--blue-700); white-space: nowrap; }

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 60%, #0078c8 100%);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
}
.hero-banner::before {
  content: '';
  position: absolute;
  right: -40px; top: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(253,199,0,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-banner::after {
  content: '';
  position: absolute;
  right: 100px; bottom: -80px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-text h1 { color: var(--white); font-size: 1.625rem; }
.hero-text p  { color: rgba(255,255,255,0.72); margin-top: 8px; font-size: 0.9375rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 20px; }
.hero-graphic {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-stat {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  min-width: 100px;
}
.hero-stat .stat-num  { font-size: 1.5rem; font-weight: 700; color: var(--gold-500); }
.hero-stat .stat-label{ font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 2px; font-weight: 500; }

/* ============================================
   RESULT CARDS
   ============================================ */
.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
  cursor: pointer;
}
.result-item:hover { border-color: var(--blue-100); background: var(--blue-50); }
.result-item__name { flex: 1; font-size: 0.9375rem; font-weight: 500; color: var(--gray-900); }
.result-item__date { font-size: 0.8125rem; color: var(--gray-500); }
.result-item__arrow { color: var(--gray-300); }

/* ============================================
   RESOURCE CARDS
   ============================================ */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.resource-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.resource-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.resource-card__header { display: flex; align-items: flex-start; gap: 12px; }
.resource-card__name { font-size: 0.9375rem; font-weight: 600; color: var(--gray-900); }
.resource-card__type { font-size: 0.75rem; color: var(--gray-500); margin-top: 1px; }
.resource-card__detail { font-size: 0.8125rem; color: var(--gray-500); display: flex; align-items: center; gap: 6px; }
.resource-card__detail svg { width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; }
.resource-card__actions { display: flex; gap: 8px; margin-top: 4px; }

/* ============================================
   SECTION HEADING WITH RULE
   ============================================ */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-heading h2 { font-size: 1.125rem; }
.section-heading .rule { flex: 1; height: 1px; background: var(--gray-100); }

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 24px;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
}
.tab-btn.active {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}
.tab-btn:hover:not(.active) { color: var(--gray-700); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================
   ALERT BANNER
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-info  { background: var(--blue-50);   border: 1px solid var(--blue-100);   color: var(--blue-700); }
.alert-warn  { background: var(--orange-100); border: 1px solid #f5d99a;           color: #7a4a00; }
.alert-success{ background: var(--green-100); border: 1px solid #a3e6cc;           color: #1a5c3e; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}
.empty-state svg {
  width: 48px; height: 48px;
  color: var(--gray-300);
  margin: 0 auto 16px;
}
.empty-state h3 { font-size: 1rem; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p  { font-size: 0.875rem; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 24px 28px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-size: 1.125rem; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  transition: background var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}
.modal-close:hover { background: var(--gray-300); }
.modal-body { padding: 20px 28px 28px; }

/* ============================================
   SEARCH BAR
   ============================================ */
.search-wrap {
  position: relative;
  max-width: 400px;
}
.search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--gray-400);
  pointer-events: none;
}
.search-wrap input {
  padding-left: 38px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--blue-900);
  color: rgba(255,255,255,0.6);
  padding: 32px 28px;
  margin-top: 64px;
}
.footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand-name { font-size: 0.875rem; font-weight: 600; color: var(--white); }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: 0.8125rem; transition: color var(--transition); }
.footer__links a:hover { color: var(--white); }
.footer__copy { font-size: 0.75rem; }

/* ============================================
   PROGRESS / HEALTH METRIC
   ============================================ */
.metric-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.metric-item { display: flex; flex-direction: column; gap: 6px; }
.metric-label { display: flex; justify-content: space-between; font-size: 0.8125rem; }
.metric-label span:first-child { font-weight: 500; color: var(--gray-700); }
.metric-label span:last-child  { color: var(--gray-500); }
.metric-bar { height: 6px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.metric-fill { height: 100%; border-radius: 99px; }
.metric-fill-blue  { background: var(--blue-700); }
.metric-fill-gold  { background: var(--gold-500); }
.metric-fill-green { background: var(--green-500); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .main-grid  { grid-template-columns: 1fr; }
  .hero-graphic { display: none; }
  .main-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topnav__links { display: none; }
  .page-content { padding: 24px 16px 48px; }
  .hero-banner { padding: 28px 24px; }
  .main-grid-3 { grid-template-columns: 1fr; }
}
