/* ============================================
   MIT Placement Dashboard — Complete Stylesheet
   Converts all Tailwind utilities to vanilla CSS
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lexend:wght@400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Lexend', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --emerald-50: #ecfdf5;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --indigo-50: #eef2ff;
  --indigo-700: #4338ca;
  --max-w: 1280px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #f6f8fb;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--slate-900);
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
input, textarea { font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---- Animations ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-rise { animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in { animation: fade-in 0.6s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .animate-rise, .animate-fade-in { animation: none !important; }
}

/* ---- Typography ---- */
.font-display { font-family: var(--font-display); }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

/* ---- Layout ---- */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem;
}
@media (min-width: 640px) { .page-wrap { padding: 2.5rem 1.5rem; } }
@media (min-width: 1024px) { .page-wrap { padding: 2.5rem 2rem; } }

.min-h-screen { min-height: 100vh; display: flex; flex-direction: column; }
.flex-1 { flex: 1; }

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
}
.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
@media (min-width: 640px) { .navbar-inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .navbar-inner { padding: 0 2rem; } }

.navbar-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10;
  margin-left: -0.5rem;
  flex-shrink: 0;
}
@media (min-width: 640px) { .navbar-logos { margin-left: -1rem; } }
.navbar-logos img:first-child { height: 70px; width: auto; object-fit: contain; }
.navbar-logos img:last-child { height: 65px; width: auto; object-fit: contain; }

/* Desktop nav - pill style */
.navbar-desktop {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  margin-left: 1.25rem;
}
@media (min-width: 768px) { .navbar-desktop { display: flex; align-items: center; } }

.pill-nav {
  display: inline-flex;
  align-items: center;
  background: #1d4ed8;
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.6);
}
.pill-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.pill-nav a:hover { background: rgba(255,255,255,0.15); color: #fff; }
.pill-nav a.active {
  background: #ffffff;
  color: #1d4ed8;
}
.pill-nav a.active:hover { background: #ffffff; }

/* Toggle pills (for filters) */
.toggle-pills {
  display: inline-flex;
  align-items: center;
  background: var(--slate-100);
  border-radius: var(--radius-xl);
  padding: 3px;
  gap: 3px;
}
.toggle-pills button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  color: var(--slate-500);
}
.toggle-pills button:hover { color: var(--blue-700); }
.toggle-pills button.active {
  background: #ffffff;
  color: var(--blue-700);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Mobile hamburger */
.mobile-toggle {
  display: flex;
  align-items: center;
  z-index: 10;
}
@media (min-width: 768px) { .mobile-toggle { display: none; } }
.mobile-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--slate-600);
  transition: background 0.2s;
}
.mobile-toggle button:hover { background: var(--slate-100); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--slate-200);
  background: white;
  padding: 0.75rem 1rem;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav.open { display: flex; }
@media (min-width: 768px) { .mobile-nav { display: none !important; } }
.mobile-nav a {
  padding: 0.625rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-600);
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover { background: var(--blue-50); color: var(--blue-700); }
.mobile-nav a.active { background: var(--blue-700); color: white; }

/* ---- Hero Section ---- */
.hero {
  border-radius: var(--radius-3xl);
  background: linear-gradient(135deg, #1d4ed8 0%, #1d4ed8 60%, #1e40af 100%);
  padding: 2.5rem 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) { .hero { padding: 3.5rem 2.5rem; } }
.hero-circle-1 {
  position: absolute; right: -6rem; top: -6rem;
  width: 18rem; height: 18rem;
  border-radius: 50%; background: rgba(255,255,255,0.1);
}
.hero-circle-2 {
  position: absolute; right: -2.5rem; bottom: 0;
  width: 10rem; height: 10rem;
  border-radius: 50%; background: rgba(255,255,255,0.1);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.15);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 42rem;
  margin: 0;
}
@media (min-width: 640px) { .hero h1 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3rem; } }
.hero-subtitle {
  margin-top: 0.75rem;
  color: #bfdbfe;
  max-width: 36rem;
  font-size: 0.875rem;
}
@media (min-width: 640px) { .hero-subtitle { font-size: 1rem; } }

/* Search */
.search-wrap {
  margin-top: 1.75rem;
  max-width: 32rem;
  position: relative;
}
.search-wrap .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue-500);
  display: flex;
}
.search-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: var(--radius-xl);
  background: white;
  color: var(--slate-800);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  outline: none;
  box-shadow: var(--shadow-lg);
}
.search-wrap input::placeholder { color: var(--slate-400); }
.search-wrap input:focus { box-shadow: var(--shadow-lg), 0 0 0 2px var(--blue-300); }

.search-results {
  position: absolute;
  z-index: 20;
  margin-top: 0.5rem;
  width: 100%;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--slate-100);
  overflow: hidden;
  text-align: left;
}
.search-results.hidden { display: none; }
.search-result-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--slate-100);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(239, 246, 255, 0.6); }
.search-result-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-detail {
  font-size: 0.75rem;
  color: var(--slate-500);
}
.search-result-company {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-700);
  background: var(--blue-50);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  white-space: nowrap;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

/* ---- MIT Campus Section ---- */
.campus-section {
  margin-bottom: 2.5rem;
  background: white;
  border-radius: var(--radius-3xl);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.campus-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 1024px) { .campus-grid { grid-template-columns: 7fr 5fr; } }

.campus-info { padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between; }
@media (min-width: 640px) { .campus-info { padding: 2.5rem; } }

.campus-logo-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.campus-logo-row img { height: 3rem; width: auto; object-fit: contain; }
.campus-logo-row h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
  margin: 0;
}
@media (min-width: 640px) { .campus-logo-row h2 { font-size: 1.875rem; } }
.campus-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0 0 0.75rem 0;
}
@media (min-width: 640px) { .campus-info h3 { font-size: 1.5rem; } }
.campus-info > p {
  color: var(--slate-500);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.625;
  margin: 0 0 1.5rem 0;
}
.campus-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--slate-100);
}
.campus-stats .stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-700);
  font-size: 1.125rem;
}
@media (min-width: 640px) { .campus-stats .stat-value { font-size: 1.25rem; } }
.campus-stats .stat-label {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 500;
  margin-top: 0.125rem;
}
.campus-image {
  position: relative;
  min-height: 200px;
  background: var(--slate-100);
}
@media (min-width: 1024px) { .campus-image { min-height: 100%; } }
.campus-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.campus-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.4), transparent, transparent);
}
@media (min-width: 1024px) { .campus-image-overlay { display: none; } }

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--slate-900);
  font-size: 1.125rem;
  margin: 0;
}
.section-header p {
  font-size: 0.875rem;
  color: var(--slate-500);
  font-weight: 500;
  margin: 0;
}

/* ---- Stat Cards ---- */
.stat-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stat-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .stat-cards { grid-template-columns: repeat(5, 1fr); } }

.stat-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--slate-200);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-icon {
  width: 3rem; height: 3rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.blue { background: var(--blue-50); color: var(--blue-700); }
.stat-card-icon.green { background: var(--emerald-50); color: var(--emerald-700); }
.stat-card-icon.amber { background: var(--amber-50); color: var(--amber-700); }
.stat-card-icon.indigo { background: var(--indigo-50); color: var(--indigo-700); }

.stat-card-value {
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.stat-card-label {
  font-size: 0.875rem;
  color: var(--slate-500);
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card-sub {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin: 0.125rem 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Chart Panels ---- */
.charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 1024px) { .charts-row { grid-template-columns: 3fr 2fr; } }

.chart-panel {
  background: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--slate-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.chart-panel h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--slate-900);
  margin: 0 0 0.25rem 0;
}
.chart-panel .chart-subtitle {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin: 0 0 1rem 0;
}
.chart-panel .chart-container {
  width: 100%;
  height: 320px;
  position: relative;
}
.chart-panel .chart-container-tall {
  width: 100%;
  height: 384px;
  padding-top: 1rem;
  position: relative;
}
.chart-panel .chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.chart-panel .chart-source {
  font-size: 11px;
  color: var(--slate-400);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-100);
}

/* ---- Company Cards Grid ---- */
.company-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .company-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .company-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .company-grid { grid-template-columns: repeat(4, 1fr); } }

.company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--slate-200);
  padding: 1.25rem;
  transition: all 0.2s;
  cursor: pointer;
}
.company-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
}
.company-card.active {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 2px var(--blue-100), var(--shadow-lg);
  transform: scale(1.02);
}
.company-card .logo-wrap { margin-bottom: 0.75rem; }
.company-card .company-name {
  font-weight: 600;
  color: var(--slate-900);
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.company-card .student-count {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--slate-600);
  font-weight: 500;
  background: var(--slate-100);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  transition: background 0.2s, color 0.2s;
}
.company-card .student-count svg { color: var(--blue-600); }
.company-card:hover .student-count {
  background: var(--blue-50);
  color: var(--blue-700);
}

/* Logo tile */
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  padding: 0.5rem;
}
.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 80px;
}
.initials-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
  border-radius: var(--radius-xl);
  border: 1px solid var(--blue-100);
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
}

/* ---- Student Card ---- */
.student-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.student-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-sm);
}
.student-card .student-name {
  font-weight: 600;
  color: var(--slate-900);
  font-size: 1.125rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.student-card .student-branch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}
.student-card .student-branch svg { flex-shrink: 0; }
.student-card .student-reg {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-400);
  margin-top: 0.125rem;
  font-family: ui-monospace, monospace;
}
.student-card .student-badge {
  display: inline-block;
  margin-top: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  padding: 1rem;
  cursor: pointer;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: white;
  border-radius: var(--radius-3xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 56rem;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  background: rgba(248, 250, 252, 0.5);
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--slate-900);
  margin: 0;
}
.modal-header .modal-count {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 500;
}
.modal-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-500);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--slate-200); }
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) { .modal-body { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .modal-body { grid-template-columns: repeat(3, 1fr); } }

/* ---- Contact Page ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 2fr 3fr; } }

.info-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--slate-200);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  box-shadow: var(--shadow-sm);
}
.info-card-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-xl);
  background: var(--blue-50);
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.info-card-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-800);
  margin-top: 0.125rem;
  word-break: break-word;
}
.office-hours {
  background: var(--blue-700);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  color: white;
}
.office-hours p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}
.office-hours p:last-child {
  font-size: 0.875rem;
  color: #bfdbfe;
  margin: 0;
}

.contact-form-panel {
  background: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--slate-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) { .contact-form-panel { padding: 2rem; } }

.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.375rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  font-size: 0.875rem;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.form-group textarea { resize: none; }
.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 2px var(--blue-200);
  border-color: var(--blue-500);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  background: var(--blue-700);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--blue-800); }

.success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 0;
}
.success-state svg { color: var(--emerald-600); margin-bottom: 1rem; }
.success-state h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--slate-900);
  margin: 0 0 0.25rem 0;
}
.success-state p {
  font-size: 0.875rem;
  color: var(--slate-500);
  max-width: 24rem;
  margin: 0;
}

/* ---- Previous Year Page ---- */
.coming-soon {
  max-width: 56rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}
.coming-soon-box {
  background: white;
  border-radius: var(--radius-3xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 4rem 2rem;
  text-align: center;
}
.coming-soon-icon {
  width: 4rem; height: 4rem;
  border-radius: var(--radius-2xl);
  background: var(--blue-50);
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}
.coming-soon-box h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 0.75rem 0;
}
@media (min-width: 640px) { .coming-soon-box h1 { font-size: 1.875rem; } }
.coming-soon-box > p {
  color: var(--slate-500);
  max-width: 28rem;
  margin: 0 auto 1.5rem auto;
}
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: #fffbeb;
  color: var(--amber-700);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--slate-200);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  margin-top: 4rem;
  color: var(--slate-600);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
}
@media (min-width: 640px) { .footer-inner { padding: 3rem 1.5rem 2rem; } }
@media (min-width: 1024px) { .footer-inner { padding: 3rem 2rem 2rem; } }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--slate-100);
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 5fr 3fr 4fr; } }

.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-brand-logos img:first-child { height: 3rem; width: auto; object-fit: contain; }
.footer-brand-logos img:nth-child(2) { height: 2.75rem; width: auto; object-fit: contain; }
.footer-brand h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-900);
  line-height: 1.2;
  margin: 0;
}
.footer-brand .footer-sub {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 500;
  margin: 0;
}
.footer-brand .footer-desc {
  font-size: 0.8125rem;
  color: var(--slate-500);
  line-height: 1.625;
  max-width: 28rem;
  margin: 0;
}
.footer-links h4,
.footer-contact h4 {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--slate-900);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem 0;
}
.footer-links ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--blue-700); }

.footer-contact { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-contact .contact-label {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 500;
  display: block;
}
.footer-contact .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  color: var(--blue-700);
  transition: color 0.2s;
  margin-top: 0.125rem;
}
.footer-contact .contact-link:hover { color: var(--blue-800); text-decoration: underline; }
.footer-contact .contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--slate-700);
  transition: color 0.2s;
  margin-top: 0.125rem;
}
.footer-contact .contact-email:hover { color: var(--blue-700); }
.footer-contact .contact-address {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--slate-500);
  padding-top: 0.25rem;
}
.footer-contact .contact-address svg { flex-shrink: 0; margin-top: 0.125rem; color: var(--slate-400); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--slate-400);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom a { transition: color 0.2s; }
.footer-bottom a:hover { color: var(--blue-700); }
.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ---- Companies Page Header ---- */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .page-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 0;
}
@media (min-width: 640px) { .page-header h1 { font-size: 1.875rem; } }
.page-header .page-subtitle {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin: 0.25rem 0 0 0;
}

/* Companies search bar */
.company-search {
  position: relative;
  width: 100%;
}
@media (min-width: 640px) { .company-search { width: 20rem; } }
.company-search .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue-500);
  display: flex;
}
.company-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  background: white;
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.company-search input:focus {
  box-shadow: 0 0 0 2px var(--blue-200);
  border-color: var(--blue-500);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 5rem 0;
  color: var(--slate-400);
}
.empty-state svg { margin: 0 auto 0.75rem; }
.empty-state p { font-weight: 500; }

.empty-chart {
  height: 18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--slate-400);
}

/* ---- Utility ---- */
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.hidden { display: none !important; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   Previous Year Page Styles
   ============================================ */

/* ---- Previous Year Hero ---- */
.py-hero {
  border-radius: var(--radius-3xl);
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 40%, #2563eb 100%);
  padding: 2rem 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .py-hero { padding: 2.5rem 2.5rem; } }
.py-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}
.py-hero-content { position: relative; z-index: 1; }
.py-hero h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.75rem 0 0 0;
}
@media (min-width: 640px) { .py-hero h1 { font-size: 2rem; } }
@media (min-width: 1024px) { .py-hero h1 { font-size: 2.5rem; } }
.py-hero .hero-subtitle {
  margin-top: 0.5rem;
  color: #bfdbfe;
  max-width: 36rem;
  font-size: 0.875rem;
}

/* ---- Year Selector ---- */
.py-year-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.py-year-pills {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.py-year-pills button {
  padding: 0 20px;
  height: 38px;
  font-size: 14px;
  border-radius: 12px;
}
.py-year-pills button.active {
  background: var(--blue-700);
  color: white;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}
.py-year-pills button:hover:not(.active) {
  background: var(--blue-50);
  color: var(--blue-700);
}

/* ---- Previous Year Stat Cards ---- */
.py-stat-cards {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1024px) { .py-stat-cards { grid-template-columns: repeat(5, 1fr); } }

/* ---- Data Tables ---- */
.py-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}
.py-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.py-table thead th {
  background: var(--slate-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--slate-200);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.py-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}
.py-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.5);
}
.py-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table alternating rows */
.py-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}
.py-table tbody tr:nth-child(even):hover {
  background: rgba(239, 246, 255, 0.5);
}

/* Branch name cell */
.py-branch-name {
  font-weight: 500;
  color: var(--slate-800);
  min-width: 200px;
}

/* Degree badge */
.py-degree-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  margin-right: 0.375rem;
  white-space: nowrap;
}

/* Numeric cells */
.py-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}
.py-pct {
  font-weight: 600;
  color: var(--slate-900);
}

/* Progress bar */
.py-progress-col {
  min-width: 120px;
}
.py-progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--slate-100);
  overflow: hidden;
}
.py-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Total row */
.py-total-row {
  background: var(--blue-50) !important;
}
.py-total-row td {
  border-top: 2px solid var(--blue-200);
  border-bottom: none !important;
  color: var(--blue-800);
  font-weight: 600;
}

/* ---- Student Table Specific ---- */
.py-student-table {
  font-size: 0.8125rem;
}
.py-student-name {
  font-weight: 600;
  color: var(--slate-900);
  white-space: nowrap;
}
.py-mono {
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: var(--slate-500);
}
.py-company-cell {
  font-weight: 600;
  color: var(--blue-700);
  white-space: nowrap;
}
.py-ctc-cell {
  font-weight: 700;
  color: var(--emerald-700);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.py-ctc-col {
  text-align: right;
}

/* Sortable headers */
.py-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 1.5rem !important;
  transition: color 0.2s;
}
.py-sortable:hover {
  color: var(--blue-700);
}
.py-sortable::after {
  content: '⇅';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--slate-400);
}
.py-sortable.py-sort-asc::after {
  content: '↑';
  color: var(--blue-700);
}
.py-sortable.py-sort-desc::after {
  content: '↓';
  color: var(--blue-700);
}

/* ---- Pagination ---- */
.py-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1.5rem 0 0.5rem;
}
.py-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
  background: white;
  border: 1px solid var(--slate-200);
  transition: all 0.2s;
}
.py-page-btn:hover:not(:disabled) {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
}
.py-page-btn.active {
  background: var(--blue-700);
  color: white;
  border-color: var(--blue-700);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}
.py-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Responsive Tables ---- */
@media (max-width: 768px) {
  .py-table {
    font-size: 0.75rem;
  }
  .py-table thead th,
  .py-table tbody td {
    padding: 0.5rem 0.625rem;
  }
  .py-progress-col {
    min-width: 80px;
  }
  .py-branch-name {
    min-width: 150px;
  }
  .py-student-table .py-progress-col {
    display: none;
  }
}
