/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  --bg:          #f5f7f5;
  --bg-surface:  #ffffff;
  --bg-raised:   #edf2ef;
  --oes:         #016649;
  --oes-dark:    #024332;
  --oes-tint:    rgba(1,102,73,0.08);
  --oes-tint2:   rgba(2,67,50,0.12);
  --heading:     #0d1a15;
  --text:        #2e3d37;
  --text-dim:    #7a8c85;
  --divider:     rgba(0,0,0,0.08);
  --shadow:      0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg:   0 4px 24px rgba(0,0,0,0.11);
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   18px;
}

/* ── Material Symbols ─────────────────────────────────────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,247,245,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.nav-logo em { font-style: italic; color: var(--oes-dark); font-weight: 400; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  letter-spacing: 0.01em;
}
.nav-link:hover { color: var(--heading); }
.nav-link .material-symbols-outlined { font-size: 16px; }

/* ── Hero / Login ─────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
}

.pre-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oes-dark);
  margin-bottom: 28px;
}

.site-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  font-weight: 600;
  line-height: 0.92;
  color: var(--heading);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.site-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--oes);
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 48px;
}

/* ── Login card ───────────────────────────────────────────────────────────── */
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
  text-align: left;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}

.card-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Search ───────────────────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 38px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--heading);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: var(--oes);
  box-shadow: 0 0 0 3px var(--oes-tint);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
}

.search-result-item {
  padding: 11px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s;
  color: var(--heading);
}
.search-result-item:hover { background: var(--bg-raised); }
.search-result-item + .search-result-item { border-top: 1px solid var(--divider); }

/* ── Steps ────────────────────────────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }

/* Phone prefix display */
.phone-display {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-align: center;
}
.phone-display strong {
  color: var(--heading);
  font-weight: 600;
}

/* ── Fields ───────────────────────────────────────────────────────────────── */
.field { margin-bottom: 20px; }

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--heading);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder { color: var(--text-dim); }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--oes);
  box-shadow: 0 0 0 3px var(--oes-tint);
}

input.invalid { border-color: #dc2626; }
textarea { resize: vertical; min-height: 80px; }

/* OTP input */
.otp-input {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  padding: 12px 14px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background: var(--oes-dark);
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.12s;
}
.btn-primary:hover  { background: var(--oes); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--oes); color: var(--heading); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 10px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s;
  margin-bottom: 24px;
  padding: 0;
}
.back-btn:hover { color: var(--heading); }
.back-btn .material-symbols-outlined { font-size: 16px; }

/* ── Form error ───────────────────────────────────────────────────────────── */
.form-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin-bottom: 14px;
  display: none;
}
.form-error.visible { display: block; }

/* ── Directory ────────────────────────────────────────────────────────────── */
.directory-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.directory-header {
  margin-bottom: 32px;
}

.directory-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}

.directory-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.dir-search-wrap {
  position: relative;
  max-width: 340px;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.student-card {
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.student-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--oes-tint2);
}

.card-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-raised);
  display: block;
}

.card-photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 2.5rem;
}

.card-body {
  padding: 14px 14px 16px;
}

.card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 3px;
  line-height: 1.2;
}

.card-college {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Profile page ─────────────────────────────────────────────────────────── */
.profile-wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 48px 28px 100px;
}

/* Hero block */
.profile-hero {
  text-align: center;
  margin-bottom: 40px;
}

.profile-photo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.profile-photo,
.profile-photo-placeholder {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-raised);
  border: 4px solid var(--bg-surface);
  box-shadow: 0 0 0 2px var(--divider), var(--shadow-lg);
}

.profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.profile-photo-placeholder .material-symbols-outlined { font-size: 3.5rem; }

.photo-change-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--oes-dark);
  border: 2px solid var(--bg-surface);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.photo-change-btn:hover { background: var(--oes); }
.photo-change-btn .material-symbols-outlined { font-size: 15px; }

.profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.05;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.profile-college-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--oes-tint);
  border: 1px solid rgba(1,102,73,0.18);
  color: var(--oes-dark);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.profile-college-badge .material-symbols-outlined {
  font-size: 15px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.profile-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Contact / social cards */
.profile-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.profile-card-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-size: 0.9rem;
}
.info-row + .info-row {
  border-top: 1px solid var(--divider);
}

.info-row .material-symbols-outlined {
  font-size: 18px;
  color: var(--oes);
  flex-shrink: 0;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  width: 72px;
  flex-shrink: 0;
}

.info-value { color: var(--text); word-break: break-all; }
.info-value.empty { color: var(--text-dim); font-style: italic; font-weight: 400; }
.info-value a { color: var(--oes-dark); }
.info-value a:hover { text-decoration: underline; }

/* ── Edit form ────────────────────────────────────────────────────────────── */
.edit-form { display: none; }
.edit-form.visible { display: block; }

/* University autocomplete */
.autocomplete-wrap { position: relative; }
.autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  max-height: 220px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 10px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--heading);
  transition: background 0.1s;
}
.autocomplete-item:hover { background: var(--bg-raised); }
.autocomplete-item + .autocomplete-item { border-top: 1px solid var(--divider); }

.edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.admin-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 4px;
}

.admin-sub { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.student-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
}

.student-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  color: var(--text);
  vertical-align: middle;
}

.student-table tr:hover td { background: var(--bg-raised); }

/* ── Tags / chips ─────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
}

.tag-active   { background: #dcfce7; color: #166534; }
.tag-inactive { background: #fef9c3; color: #854d0e; }
.tag-self     { background: #e0f2fe; color: #0369a1; }
.tag-nophone  { background: var(--bg-raised); color: var(--text-dim); border: 1px solid var(--divider); }

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading-dots { display: inline-flex; gap: 5px; align-items: center; }
.loading-dots span {
  width: 5px; height: 5px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: dot-pulse 1.1s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .18s; }
.loading-dots span:nth-child(3) { animation-delay: .36s; }

@keyframes dot-pulse {
  0%,100% { opacity: .25; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,24,20,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: overlay-in 0.2s ease;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 40px 36px 36px;
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none; border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px;
  border-radius: 4px;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--heading); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-style: italic;
}

/* ── College filter pills ─────────────────────────────────────────────────── */
.college-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.college-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 100px;
  border: 1px solid var(--divider);
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}
.college-pill:hover {
  border-color: var(--oes);
  color: var(--oes-dark);
}
.college-pill.active {
  background: var(--oes-dark);
  border-color: var(--oes-dark);
  color: #fff;
}
.college-pill .pill-count {
  background: rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
}
.college-pill:not(.active) .pill-count {
  background: var(--bg-raised);
  color: var(--text-dim);
}

/* ── Card college "X others" badge ───────────────────────────────────────── */
.card-college-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-others {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--oes);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Completeness nudge ───────────────────────────────────────────────────── */
.completeness-nudge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--oes-tint);
  border: 1px solid rgba(1,102,73,0.18);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 28px;
  animation: fade-up 0.3s ease;
}
.completeness-nudge .material-symbols-outlined {
  color: var(--oes-dark);
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 20px;
}
.nudge-text { flex: 1; }
.nudge-text strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--oes-dark);
  margin-bottom: 2px;
}
.nudge-text span { font-size: 0.8rem; color: var(--text-dim); }
.nudge-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
}
.nudge-dismiss:hover { color: var(--heading); }
.nudge-dismiss .material-symbols-outlined { font-size: 18px; }

/* ── Map page ─────────────────────────────────────────────────────────────── */
.map-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
}

#map {
  flex: 1;
}

.map-sidebar {
  position: absolute;
  top: 72px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  min-width: 200px;
  max-width: 240px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.map-sidebar-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.map-no-college {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--text);
  border-top: 1px solid var(--divider);
}
.map-no-college:first-of-type { border-top: none; }
.map-no-college img,
.map-no-college .avatar-ph {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-raised);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-dim);
}

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  border: 1px solid var(--divider) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}
.leaflet-popup-content { margin: 0 !important; width: auto !important; }
.leaflet-popup-tip-container { margin-top: -1px; }

.map-popup {
  padding: 14px 16px;
  min-width: 180px;
  max-width: 260px;
}
.map-popup-college {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 10px;
  line-height: 1.2;
}
.map-popup-students {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-popup-student {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
}
.map-popup-student img,
.map-popup-student .pp-ph {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-raised);
  border: 2px solid var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 18px;
}
.map-popup-student span {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }

/* ── Mobile nav ───────────────────────────────────────────────────────────── */
.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-menu-btn:hover { color: var(--heading); background: var(--bg-raised); }
.nav-menu-btn .material-symbols-outlined { font-size: 22px; display: block; }

/* Nav overlay (mobile) */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 56px 0 0;
  z-index: 98;
  background: rgba(13,26,21,0.3);
  backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

@media (max-width: 680px) {
  .nav-menu-btn { display: flex; align-items: center; }

  .nav-actions {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0;
    z-index: 99;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--divider);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
    animation: nav-slide-down 0.18s ease;
  }
  .nav-actions.open { display: flex; }

  .nav-link {
    padding: 12px 24px;
    font-size: 0.88rem;
    border-radius: 0;
    justify-content: flex-start;
    gap: 10px;
  }
  .nav-link:hover { background: var(--bg-raised); }

  @keyframes nav-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-nav { padding: 0 16px; }
  .login-card { padding: 32px 24px 28px; }
  .directory-wrap, .profile-wrap, .admin-wrap { padding: 28px 16px 60px; }
  .student-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-actions { justify-content: center; }
  .student-table { display: block; overflow-x: auto; }
}
