/* NYSAIS Job Fair Portal
   Aligned to NYSAIS sister-app tokens (PL/sponsors/staff): navy #2b54a3,
   neutrals #1a1a1a / #f0f2f5 / #d1d5db. Orange accent #f4a72b is
   jobfair-specific brand. System fonts only. Vanilla CSS. */

:root {
  /* Canonical NYSAIS tokens (must match staff-site/pl-site/sponsors-site) */
  --primary: #2b54a3;
  --primary-hover: #1e3f7a;
  --navy: #1e3a5f;
  --bg: #f0f2f5;
  --bg-white: #ffffff;
  --bg-secondary: #f9fafb;
  --info-bg: #dbeafe;
  --info-text: #1e40af;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #737373;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --success: #059669;
  --error: #dc2626;
  --warning: #f59e0b;
  --max-width: 1200px;

  /* Jobfair-specific brand: orange accent */
  --accent: #f4a72b;
  --accent-soft: #fff4dc;
  --accent-ink: #7a4f00;

  /* Aliases retained so existing rules keep working */
  --bg-2: var(--bg-secondary);
  --card: var(--bg-white);
  --ink: var(--text-primary);
  --ink-2: #2a3553;
  --muted: var(--text-secondary);
  --muted-2: var(--text-muted);
  --border-2: var(--border-light);
  --primary-deep: var(--primary-hover);
  --primary-soft: #e3ecfa;
  --primary-ink: #ffffff;
  --danger: var(--error);
  --danger-deep: #9b2424;
  --danger-soft: #fde8e8;
  --success-soft: #e6f6ec;
  --warn: #b06b00;

  /* Shadow + radius */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 4px 14px rgba(20, 33, 61, .08), 0 18px 40px rgba(20, 33, 61, .10);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.25; margin: 0 0 14px; font-weight: 650; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
hr.rule { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- Top bar ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(20, 33, 61, .02);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sub {
  color: var(--muted); font-weight: 500; font-size: 14px;
  padding-left: 12px; border-left: 1px solid var(--border);
  line-height: 1;
}
.topnav { display: flex; align-items: center; gap: 14px; }
.who { color: var(--muted); font-size: 13px; line-height: 1.3; text-align: right; }
.who .name { color: var(--ink); font-weight: 600; display: block; }
.who .school { color: var(--muted-2); }
.logout-form { display: inline; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(20, 33, 61, .82) 0%, rgba(29, 67, 128, .72) 55%, rgba(42, 90, 163, .55) 100%),
    radial-gradient(1200px 280px at 80% 0%, rgba(244, 167, 43, .25), transparent 60%),
    linear-gradient(180deg, #1d4380, #14213d);
  color: #fff;
  border-bottom: 4px solid var(--accent);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.07) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 62%, rgba(255,255,255,.05) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 88%, rgba(255,255,255,.05) 0 2px, transparent 3px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 38px 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, .82);
  font-weight: 600;
  margin-bottom: 6px;
}
.hero h1 {
  color: #fff;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 8px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.hero .subtitle { color: rgba(255, 255, 255, .85); margin: 0; font-size: 15px; }
.hero .subtitle strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
  backdrop-filter: blur(6px);
}
.hero-meta .lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,.7); }
.hero-meta .val { font-weight: 600; }

/* ---------- Layout ---------- */
.page { padding: 28px 0 56px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head h2 { margin: 0; font-size: 22px; }
.match-summary { color: var(--muted); font-size: 14px; margin-top: 4px; }
.match-summary strong { color: var(--ink); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease, transform .04s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sidebar-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.navbar-brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(29, 67, 128, .25);
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); color: #fff; }
.btn-secondary {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.btn-secondary:hover { background: var(--primary-soft); }
.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--ink-2);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(29, 67, 128, .08); color: var(--primary); border-color: transparent; }
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(197, 48, 48, .25);
}
.btn-danger:hover { background: var(--danger-deep); border-color: var(--danger-deep); color: #fff; }
.btn-danger-outline {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
  font-weight: 600;
}
.btn-danger-outline:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }

/* ---------- Card ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-2);
}
.card-header h2 { margin: 0; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; line-height: 1.5; }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid #c9e9d3; }
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f4c1bc; }

/* ---------- Login ---------- */
.login-wrap {
  max-width: 480px;
  margin: 32px auto 64px;
  padding: 0 24px;
}
.login-hero {
  background:
    linear-gradient(135deg, rgba(20, 33, 61, .92) 0%, rgba(29, 67, 128, .82) 55%, rgba(42, 90, 163, .7) 100%),
    radial-gradient(600px 180px at 80% 0%, rgba(244, 167, 43, .28), transparent 60%),
    linear-gradient(180deg, #1d4380, #14213d);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 4px solid var(--accent);
  padding: 36px 28px 28px;
  text-align: center;
}
.login-hero .login-logo { height: 56px; width: auto; margin: 0 auto 14px; display: block; }
.login-hero h1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.login-hero .login-sub { color: rgba(255,255,255,.85); margin: 0; font-size: 14px; line-height: 1.5; }
.login-card {
  margin: 0;
  padding: 28px 32px 32px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.login-card h2 { font-size: 18px; margin: 0 0 4px; }
.login-card h1 { margin: 0 0 8px; font-size: 26px; }
.login-card .form { margin-top: 16px; }
.login-card .btn-primary { width: 100%; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.form input,
.form textarea,
.form select,
textarea,
.filter-grid input,
.filter-grid select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.form input:focus,
textarea:focus,
.filter-grid input:focus,
.filter-grid select:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 67, 128, .15);
}

/* ---------- Filter card (the marquee piece) ---------- */
.filter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 22px;
  position: relative;
}
.filter-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 60%, var(--accent) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr);
  gap: 14px 14px;
  align-items: end;
}
.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  min-width: 0;
}
.filter-grid input,
.filter-grid select { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 14px; width: 100%; min-width: 0; }
.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-2);
  flex-wrap: wrap;
}
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-spacer { flex: 1; }

/* Filter pill chips (the discoverable toggles) */
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  text-decoration: none;
  line-height: 1.2;
}
.chip-toggle:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip-toggle .ico { line-height: 1; }
.chip-toggle.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-deep);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--primary);
}
.chip-toggle .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 0 6px;
  height: 18px;
  border-radius: 9px;
  background: var(--border-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}
.chip-toggle.active .count { background: var(--primary); color: #fff; }

/* Favorites pill specifically uses the heart/orange tint when active */
.chip-toggle.chip-fav.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.chip-toggle.chip-fav.active .count { background: var(--accent); color: #fff; }

/* ---------- Data table ---------- */
.list-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  table-layout: auto;
  font-size: 13px;
}
.data-table th, .data-table td { vertical-align: top; }
.data-table thead th { padding: 10px 8px; }
.data-table tbody td { padding: 11px 8px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 16px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 12px; }
.data-table .col-narrow { max-width: 90px; word-wrap: break-word; }
.data-table .col-tight { width: 1%; white-space: nowrap; }
/* Pin Actions column to the right edge so the Résumé button is always visible
   even when the table overflows horizontally. */
.data-table .col-actions {
  width: 1%;
  white-space: nowrap;
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -6px 0 8px -6px rgba(15, 23, 42, 0.12);
  z-index: 1;
}
.data-table tr.row-reviewed .col-actions { background: #f6faf7; }
.data-table tr:hover .col-actions { background: var(--bg-secondary); }
.row-actions { display: inline-flex; align-items: center; gap: 4px; }
.row-actions .pill { min-width: 28px; height: 28px; padding: 0 6px; }
.row-actions .resume-btn { margin-left: 6px; padding: 5px 10px; font-size: 12.5px; }
.data-table thead th {
  text-align: left;
  padding: 12px 14px;
  background: #f7f9fd;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.data-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: top;
  font-size: 14px;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafd; }
.data-table .row-reviewed td { background: #fbfcff; }
.data-table .row-reviewed .cand-name { color: var(--muted); }

.cand-name { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.cand-name:hover { color: var(--primary); text-decoration: none; }
.cand-email { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pronouns { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 400; }

/* Subject pair */
.subject-pair { display: flex; flex-direction: column; gap: 4px; }
.subject-1 { font-weight: 500; color: var(--ink); }
.subject-1 .other { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.subject-2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.subject-2::before {
  content: "2nd";
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-2);
  color: var(--muted-2);
}

/* ---------- Avatar ---------- */
.avatar {
  display: inline-flex;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #2a5aa3 100%);
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 3px rgba(20, 33, 61, .18);
  flex-shrink: 0;
}
.avatar.avatar-lg { width: 56px; height: 56px; font-size: 17px; }

/* ---------- Chips (data presentation) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #d6e0f1;
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.chip-grade { background: #fff5e0; border-color: #f1d99a; color: var(--accent-ink); }
.chip-region { background: #eaf6ee; border-color: #c9e3d3; color: #155f2c; }
.chip-muted { background: var(--bg-2); border-color: var(--border); color: var(--muted); }
.chip-empty { color: var(--muted); font-size: 13px; }

/* ---------- Status pills (in table row) ---------- */
.status-pills { display: inline-flex; gap: 6px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--muted-2);
  transition: background .12s, border-color .12s, color .12s, transform .04s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill:active { transform: scale(0.96); }
.pill.pill-fav.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.pill.pill-rev.active {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}
.pill.pill-note {
  background: var(--primary-soft);
  border-color: #cdd7e8;
  color: var(--primary);
  cursor: default;
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 8px;
}

/* ---------- Empty state ---------- */
.empty {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h3 { color: var(--ink-2); margin-bottom: 6px; }

/* ---------- Candidate detail ---------- */
.detail-back { margin-bottom: 14px; }
.detail-head {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.detail-head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}
.detail-head-main { display: flex; gap: 16px; align-items: flex-start; flex: 1 1 360px; }
.detail-head-text h1 { margin: 4px 0 6px; font-size: 26px; }
.detail-head-text .contact { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.detail-head-text .contact a { color: var(--primary); }
.detail-head-text .location { color: var(--muted); font-size: 13px; margin: 0; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-actions .pill { height: 38px; min-width: 0; padding: 0 16px; border-radius: 20px; font-size: 13px; font-weight: 500; }
.detail-actions .pill .lbl { margin-left: 4px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.detail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 18px 20px; }
.side-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 18px;
  margin: 0;
  font-size: 14px;
}
.kv dt {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  padding-top: 2px;
}
.kv dd { margin: 0; color: var(--ink); }
.kv dd.prewrap { white-space: pre-wrap; }
.kv-stack dt { padding-top: 0; }
.kv-stack { grid-template-columns: 1fr; gap: 4px 0; }
.kv-stack dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.kv-stack dd { margin-bottom: 10px; }
.kv-stack dd:last-child { margin-bottom: 0; }

.resume-text {
  white-space: pre-wrap;
  background: #fafbfd;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-sm);
  max-height: 540px;
  overflow: auto;
  font: 13px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink-2);
}

.notes-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
#notes-area {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font: inherit;
  background: #fffdf6;
}
#notes-area:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 67, 128, .15); background: #fff; }

/* ---------- Footer ---------- */
.sitefoot {
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: #fff;
}
.sitefoot p { margin: 0; color: var(--muted); font-size: 13px; }
.sitefoot a { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr 1fr; }
  .filter-grid .filter-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .hero-inner { padding: 28px 16px 22px; }
  .hero h1 { font-size: 26px; }
  .topbar-inner { padding: 12px 16px; }
  .who { display: none; }
  .filter-grid { grid-template-columns: 1fr; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table tr { border-bottom: 1px solid var(--border); padding: 12px 4px; }
  .data-table td { border: none; padding: 4px 12px; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv dt { padding-top: 8px; }
  .detail-head-main { flex: 1 1 100%; }
  .detail-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Note: candidate dashboard container override removed — all surfaces now use
   the canonical --max-width (1200px) shared with sister apps. Restore the
   override locally if data tables feel cramped after Tier 3 menu changes. */

/* No hide-at-breakpoint on data-table columns: prefer horizontal scroll
   inside .list-wrap with the Actions column sticky-pinned to the right
   so users can swipe to see Degree/Location/Region instead of having
   them disappear. */

/* Error / 404 page */
.error-wrap {
  max-width: 560px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.error-card { padding: 40px 32px; }
.error-status {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-2);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.error-card h1 { font-size: 26px; margin: 0 0 10px; }
.error-card p { margin: 0 0 14px; }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* Google sign-in button */
.btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
}
.btn-google:hover {
  background: #f8f9fa;
  border-color: #d2d4d7;
  color: #1f1f1f;
  text-decoration: none;
}
.btn-google:focus-visible { outline: 2px solid #4285F4; outline-offset: 2px; }
.btn-google .google-g { width: 20px; height: 20px; flex-shrink: 0; }
.btn-block { width: 100%; }

/* =====================================================================
   ADMIN LAYOUT (sidebar shell - mirrors staff-site/StaffLayout pattern)
   ===================================================================== */
.is-admin { background: var(--bg); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  position: fixed; left: 12px; top: 12px;
  background: var(--primary); color: #fff;
  padding: 8px 12px; border-radius: 6px;
  z-index: 200; font-weight: 600;
}

.staff-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.staff-layout-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.staff-layout-content {
  flex: 1;
  padding: 28px 32px;
  width: 100%;
  min-width: 0;
}
.auth-layout-content { padding: 0; }

/* === Top navbar (slim) === */
.navbar.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
}
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand img { height: 28px; width: auto; display: block; }
.navbar-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.navbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.navbar-user-name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.logout-form { margin: 0; display: inline-flex; }
.navbar-logout {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.navbar-logout:hover { background: var(--bg); }
.navbar-logout:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.navbar-mobile-toggle {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
.navbar-mobile-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hamburger-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }

/* === Sidebar === */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--border-light);
  padding: 16px 0;
  flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-group { margin-bottom: 8px; }
.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 20px 4px;
}
.sidebar-link {
  display: block;
  padding: 8px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  border-right: 3px solid transparent;
  transition: background .12s ease, color .12s ease;
}
.sidebar-link:hover {
  background: var(--bg);
  color: var(--text-primary);
  text-decoration: none;
}
.sidebar-link.active {
  color: var(--primary);
  background: #eef2ff;
  border-right-color: var(--primary);
  font-weight: 600;
}

/* Dashboard sections (used by /admin) */
.dash-section { margin-top: 32px; }
.dash-section:first-of-type { margin-top: 0; }
.section-head { font-size: 18px; margin: 0 0 12px; font-weight: 650; color: var(--ink); }
.section-head-muted { color: var(--muted); font-weight: 600; }
.section-head-muted + .muted { margin-top: -8px; margin-bottom: 12px; }

/* User row + table */
.user-row { display: flex; align-items: center; gap: 12px; }
.user-row-head { gap: 16px; }
.user-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}
.user-row-avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.user-row-text { min-width: 0; }
.user-row-name { font-weight: 600; color: var(--ink); }
.user-row-email { word-break: break-all; }
.users-table .row-disabled { opacity: 0.55; }

.role-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--ink-2);
}
.role-pill.role-admin { background: var(--primary-soft); color: var(--primary); }
.role-pill.role-staff { background: var(--accent-soft); color: var(--accent-ink); }
.role-pill.role-readonly { background: var(--bg-secondary); color: var(--muted); }
.cap-pill {
  display: inline-block;
  padding: 1px 7px;
  margin: 2px 3px 2px 0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--ink-2);
}
.self-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

/* Form card */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  max-width: 680px;
}
.form-card-secondary {
  background: var(--bg-secondary);
}
.form-card-secondary h3 { margin: 0 0 6px; font-size: 16px; }
.form-card-secondary p { margin: 0 0 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-row-split { flex-direction: row; gap: 16px; }
.form-row-split label { flex: 1 1 0; }
.form-row > .muted.small { margin-top: -2px; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.caps-fieldset {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0;
}
.caps-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 6px;
}
.cap-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}
.cap-checkbox input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.inline-form { display: inline; margin: 0; }

.alert-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

/* Users-table responsive column hides */
@media (max-width: 1100px) {
  .users-table .col-perms { display: none; }
}
@media (max-width: 900px) {
  .users-table .col-lastlogin { display: none; }
}

/* Year picker + year pill on /admin/analytics */
.year-pill {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 12px;
  font-size: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 600;
  vertical-align: middle;
}
.year-picker { display: inline-flex; align-items: center; }
.year-picker label { display: inline-flex; flex-direction: column; gap: 4px; }
.year-picker select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  min-width: 90px;
}

/* Fair-events year section */
.fair-year { margin-bottom: 18px; }
.fair-year-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.fair-year-head h2 { margin: 0; font-size: 22px; }
.fair-year-meta { color: var(--muted); font-size: 13px; }
.fair-year-meta strong { color: var(--ink); font-weight: 700; }
.fairs-events tr.row-primary td { background: rgba(43, 84, 163, 0.04); }

/* Roadmap tiles */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.roadmap-tile {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.roadmap-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.roadmap-when {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.roadmap-tile p { margin: 8px 0 0; }

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::after {
    content: '';
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 55;
  }
  .navbar-mobile-toggle { display: inline-flex; }
  .staff-layout-content { padding: 20px 18px; }
  .navbar-user-name { display: none; }
  .navbar-logout { padding: 6px 10px; }
}
@media (max-width: 540px) {
  .navbar-brand span { display: none; }
}
.admin-pill {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-weight: 600;
}
.admin-page { max-width: var(--max-width); }
.admin-page-head { margin: 8px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-page-head h1 { margin: 0 0 2px; font-size: 26px; }
.admin-hero { margin: 4px 0 24px; }
.admin-hero h1 { font-size: 28px; margin: 0 0 4px; }

/* KPI / stat row */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-num { font-size: 32px; font-weight: 700; color: var(--ink); margin: 6px 0 2px; line-height: 1.1; }
.stat-sub { color: var(--muted-2); font-size: 13px; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.kpi-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.kpi-num { font-size: 26px; font-weight: 700; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.kpi-sub { color: var(--muted-2); font-size: 12px; }

/* Card grid (dashboard nav cards) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.hover-card {
  display: block;
  color: var(--ink);
  border: 1px solid var(--border);
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.hover-card:hover {
  text-decoration: none;
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.hover-card h3 { color: var(--primary); }
.card-cta { font-size: 13px; font-weight: 600; color: var(--primary); display: inline-block; margin-top: 10px; }
.card-soft { background: var(--bg-2); border-style: dashed; }
.card-soft h3 { color: var(--muted); }
.card.no-pad { padding: 0; overflow: hidden; }

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.chart-card { display: flex; flex-direction: column; }
.chart-card h3 { margin-bottom: 4px; }
.chart-card .muted.small { margin-bottom: 8px; }
.chart-wide { grid-column: 1 / -1; }
.chart-canvas-wrap { position: relative; height: 300px; flex: 1; }
.chart-canvas-wrap.chart-square { height: 240px; max-width: 280px; margin: 0 auto; }
.chart-canvas-wrap.chart-tall { height: 380px; }

/* Filter bar */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.filterbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.filterbar label { flex: 1 1 150px; min-width: 0; }
.filterbar input, .filterbar select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
  width: 100%;
}
.filterbar input:focus, .filterbar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,67,128,.12); }
.btn-soft { background: var(--bg-2); border-color: var(--border); color: var(--ink-2); }
.btn-soft:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* Audit table */
.audit-table { width: 100%; border-collapse: collapse; }
.audit-table th, .audit-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-2);
  vertical-align: top;
}
.audit-table th { background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.audit-table tr:last-child td { border-bottom: none; }
.audit-table .nowrap { white-space: nowrap; }
.audit-table .empty { padding: 32px; text-align: center; }
.audit-table .col-ip { white-space: nowrap; }
.empty-state { padding: 40px 28px; text-align: center; }
.empty-state h3 { font-size: 17px; margin: 0 0 6px; color: var(--ink); }
.empty-state p { margin: 0 0 16px; }
@media (max-width: 980px) {
  .audit-table .col-ip { display: none; }
}
.audit-table .actor-name { display: block; font-weight: 600; color: var(--ink); }
.audit-table .details { color: var(--muted); max-width: 380px; word-break: break-word; }
.evt-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--muted);
}
.evt-pill.evt-success { background: var(--success-soft); color: var(--success); }
.evt-pill.evt-info { background: var(--primary-soft); color: var(--primary); }
.evt-pill.evt-danger { background: var(--danger-soft); color: var(--danger); }
.evt-pill.evt-muted { background: var(--bg-2); color: var(--muted-2); }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 8px;
}

@media (max-width: 720px) {
  .stat-grid, .kpi-row { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
