/* ============================================================
   MVIT ADMISSION PORTAL 2026 — style.css
   Font: Poppins | Theme: Navy #003580 + Gold #f5a623 (Educational Institute)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&display=swap');

/* ── CSS Variables (Educational Institute Theme) ── */
:root {
  --primary: #003580;
  --primary-dark: #002060;
  --secondary: #e8941a;
  --accent: #ffc04d;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --text-dark: #0d1b2a;
  --text-mid: #1e3a5f;
  --text-light: #5a7fa8;
  --border: #c8d8eb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 4px 24px rgba(0, 53, 128, .12);
  --shadow-lg: 0 8px 40px rgba(0, 53, 128, .18);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 10px;
}

/* ================================================================
   COLLEGE HEADER — Large Institutional Banner
   ================================================================ */
.college-header {
  background: linear-gradient(135deg, #001a4d 0%, var(--primary) 55%, #001533 100%);
  border-top: 5px solid var(--secondary); /* Professional Full Header Line Accent */
  border-bottom: 3px solid rgba(0,0,0,0.2);
  padding: 1.8rem 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.college-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.02) 75%, transparent 75%, transparent),
    radial-gradient(circle at 2px 2px, rgba(255,255,255, 0.05) 1px, transparent 0);
  background-size: 40px 40px, 20px 20px;
  pointer-events: none;
  opacity: 0.6;
}

.college-header img.clg-logo {
  height: auto;
  max-height: 130px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
  background: transparent;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.college-header-text {
  text-align: left;
  position: relative;
  z-index: 1;
}

.college-header-name {
  font-family: 'Playfair Display', 'Poppins', serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.2px;
  line-height: 1.1;
  text-shadow: 0 3px 15px rgba(0, 0, 0, .4);
  text-transform: uppercase;
}

.college-header-name .clg-abbr {
  color: var(--accent);
}

.college-header-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), transparent);
  margin: .5rem 0;
}

.college-header-sub {
  font-size: .82rem;
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  letter-spacing: .3px;
}

.college-header-tag {
  display: inline-block;
  font-size: .75rem;
  color: var(--accent);
  font-weight: 700;
  padding: .2rem .8rem;
  margin-top: .45rem;
  letter-spacing: .8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
}

/* ================================================================
   NAV BAR
   ================================================================ */
.navbar {
  background: linear-gradient(90deg, #002060 0%, var(--primary) 50%, #004aad 100%);
  padding: 0 2rem;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 53, 128, .3);
  border-top: 3px solid var(--secondary);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.navbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.navbar-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.3px;
}

.navbar-title span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  padding: .45rem .9rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ================================================================
   HOME PAGE
   ================================================================ */
.home-hero {
  min-height: calc(100vh - 155px);
  background: linear-gradient(160deg, #001030 0%, #003580 50%, #1a6dcc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.home-badge {
  background: rgba(232, 148, 26, .18);
  border: 1px solid rgba(255, 192, 77, .5);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: .4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.home-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  margin-bottom: .75rem;
}

.home-title span {
  color: var(--accent);
}

.home-subtitle {
  color: rgba(255, 255, 255, .65);
  font-size: 1.05rem;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 520px;
}

.home-cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.home-card {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 192, 77, .3);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 220px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.home-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, .12), transparent);
  opacity: 0;
  transition: var(--transition);
}

.home-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(255, 192, 77, .7);
  box-shadow: 0 20px 60px rgba(232, 148, 26, .3);
}

.home-card:hover::after {
  opacity: 1;
}

.home-card-icon {
  font-size: 2.8rem;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, rgba(232, 148, 26, .35), rgba(0, 53, 128, .4));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.home-card:hover .home-card-icon {
  transform: scale(1.1);
}

.home-card-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.home-card-desc {
  color: rgba(255, 255, 255, .6);
  font-size: .8rem;
}

.home-card-btn {
  background: linear-gradient(135deg, var(--secondary), #c27000);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .55rem 1.4rem;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.home-card:hover .home-card-btn {
  box-shadow: 0 4px 16px rgba(232, 148, 26, .55);
}

.home-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3.5rem;
  position: relative;
  z-index: 1;
}

.stat {
  text-align: center;
}

.stat-num {
  color: var(--accent);
  font-size: 2rem;
  font-weight: 800;
}

.home-mvit-badge {
  background: rgba(200, 169, 91, .15);
  border: 1px solid rgba(200, 169, 91, .35);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  padding: .35rem 1rem;
  border-radius: 100px;
  margin-bottom: .75rem;
  letter-spacing: 1px;
}

.stat-label {
  color: rgba(255, 255, 255, .55);
  font-size: .75rem;
}

/* ================================================================
   FORM PAGE WRAPPER
   ================================================================ */
.form-page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.form-page-header {
  background: linear-gradient(135deg, var(--primary), #004aad);
  border-radius: var(--radius);
  padding: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-lg);
  border-left: 6px solid var(--secondary);
}

.form-page-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.form-page-title span {
  color: var(--accent);
  opacity: .9;
  font-size: 1rem;
  display: block;
  font-weight: 400;
}

.print-btn {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: .6rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: var(--transition);
}

.print-btn:hover {
  background: rgba(255, 255, 255, .25);
}

/* ── Form Card / Section ── */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.section-header {
  background: linear-gradient(135deg, var(--primary), #004aad);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: .9rem 1.5rem;
  gap: 1rem;
  border-left: 4px solid var(--secondary);
}

.section-title {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-date-label {
  color: rgba(255, 255, 255, .75);
  font-size: .75rem;
  font-weight: 500;
}

.section-date-input {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  border-radius: 7px;
  padding: .3rem .7rem;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  min-width: 130px;
}

.section-date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.section-body {
  padding: 1.75rem 1.5rem;
}

/* ── Form Grid ── */
.form-grid {
  display: grid;
  gap: 1.1rem;
}

.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: var(--text-dark);
  background: #f8fafc;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.form-control[readonly] {
  background: #eef2ff;
  color: var(--primary);
  font-weight: 600;
  cursor: default;
}

.form-control.caps-field {
  text-transform: uppercase;
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* marks row */
.marks-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.marks-row .form-control {
  flex: 1;
}

.marks-sep {
  color: var(--text-light);
  font-weight: 700;
  font-size: 1rem;
}

.marks-total {
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .75rem;
  font-size: .9rem;
  color: var(--text-light);
  min-width: 54px;
  text-align: center;
}

/* ================================================================
   TOGGLE PILL GROUP
   ================================================================ */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .2rem;
}

.toggle-pill {
  padding: .45rem 1.1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  color: var(--text-mid);
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  letter-spacing: .3px;
}

.toggle-pill:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: #eef4ff;
}

.toggle-pill.active {
  background: linear-gradient(135deg, var(--primary), #004aad);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 53, 128, .35);
  position: relative;
}

.toggle-pill.active::after {
  content: '✓';
  margin-left: 4px;
  font-size: .7rem;
}

.toggle-group-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .35rem;
  display: block;
}

/* branch grid */
.branch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ================================================================
   SIGNATURE SECTION
   ================================================================ */
.signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: .5rem;
}

.signature-box {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: .75rem;
  gap: .3rem;
  background: #fafbff;
}

.signature-line {
  width: 80%;
  height: 1.5px;
  background: var(--border);
}

.signature-label {
  font-size: .72rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ================================================================
   FORM ACTION BUTTONS
   ================================================================ */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem 2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #004aad);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 53, 128, .3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 53, 128, .45);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-mid);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #059669, var(--success));
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, .3);
}

.btn-success:hover {
  transform: translateY(-2px);
}

/* ── Other School Field ── */
#other-school-wrap,
#other-school-wrap-hsc,
#other-school-wrap-pg,
#other-school-wrap-le {
  display: none;
  margin-top: .6rem;
}

/* ── Success Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .9rem;
  font-weight: 500;
  border-left: 4px solid var(--success);
  z-index: 999;
  animation: slideIn .3s ease;
  max-width: 360px;
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ================================================================
   ADMIN DASHBOARD
   ================================================================ */
.admin-page {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.admin-header {
  background: linear-gradient(135deg, #001030, var(--primary));
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  border-left: 6px solid var(--secondary);
}

.admin-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-title span {
  color: var(--accent);
  font-size: .95rem;
  font-weight: 400;
  display: block;
}

.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #001030, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.admin-login-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.admin-login-card h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.admin-login-card p {
  color: rgba(255, 255, 255, .6);
  font-size: .88rem;
  margin-bottom: 1.5rem;
}

.admin-login-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.admin-filter-bar {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.admin-filter-bar select,
.admin-filter-bar input {
  flex: 1;
  min-width: 160px;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-stat-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
  text-align: center;
}

.admin-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.admin-college-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: .9;
}

.admin-stat-label {
  font-size: .78rem;
  color: var(--text-light);
  font-weight: 500;
}

.table-wrap {
  background: #fff;
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.admin-table th {
  background: linear-gradient(135deg, var(--primary), #9b1425);
  color: #fff;
  padding: .85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

.admin-table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-dark);
  white-space: nowrap;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.badge-ug {
  background: #dbeafe;
  color: #1e40af;
}

.badge-pg {
  background: #d1fae5;
  color: #065f46;
}

.badge-le {
  background: #fde68a;
  color: #92400e;
}

.badge-ug2 {
  background: #ede9fe;
  color: #6d28d9;
}

.badge-all {
  background: #e2e8f0;
  color: #334155;
}

/* ── Admin Tab Buttons (dedicated, no btn-primary conflict) ── */
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.1rem;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid #c8d8eb;
  background: #f1f5f9;
  color: #1e3a5f;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}

.admin-tab:hover {
  background: #e2e8f0;
  border-color: #94b4d1;
}

.admin-tab.active {
  background: linear-gradient(135deg, #003580, #004aad) !important;
  color: #fff !important;
  border-color: #003580 !important;
  box-shadow: 0 3px 12px rgba(0,53,128,.35);
}

.badge-branch {
  background: #ede9fe;
  color: #5b21b6;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

/* ================================================================
   MODAL (detail view)
   ================================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary), #004aad);
  border-top: 3px solid var(--secondary);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: rgba(255, 255, 255, .2);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, .35);
}

.modal-body {
  padding: 1.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}


.detail-key {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-light);
}

.detail-val {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-dark);
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {

  .navbar,
  .print-btn,
  .form-actions,
  .toast,
  .home-hero,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .form-page {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .form-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    margin-bottom: .5rem;
  }

  .section-header {
    background: linear-gradient(135deg, var(--primary), #004aad) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .toggle-pill.active {
    background: var(--primary) !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .form-page-header {
    background: var(--primary) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .navbar-title {
    font-size: .95rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem;
    gap: .25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .signature-row {
    grid-template-columns: 1fr;
  }

  .home-cards {
    flex-direction: column;
    align-items: center;
  }

  .home-card {
    width: 100%;
    max-width: 320px;
  }

  .home-stats {
    gap: 2rem;
  }

  .admin-filter-bar {
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-full {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .form-page {
    padding: 0 .75rem 3rem;
  }

  .section-body {
    padding: 1.25rem 1rem;
  }

  .form-page-header {
    padding: 1.25rem 1rem;
  }

  .toggle-pill {
    font-size: .78rem;
    padding: .38rem .85rem;
  }

  .home-stats {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ================================================================
   PDF RENDER TEMPLATE — off-screen A4 container for html2canvas
   ================================================================ */
#pdf-render-container {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px;
  background: #ffffff;
  font-family: 'Times New Roman', Times, serif;
  color: #000;
  padding: 28px 36px 36px;
  box-sizing: border-box;
  z-index: -1;
}

/* College header in PDF */
.pt-college-header {
  text-align: center;
  border-bottom: 2.5px solid #003580;
  padding-bottom: 10px;
  margin-bottom: 6px;
}

.pt-clg-name {
  font-size: 17px;
  font-weight: bold;
  color: #003580;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pt-clg-sub {
  font-size: 10.5px;
  color: #333;
  margin-top: 2px;
}

.pt-clg-tag {
  font-size: 10px;
  color: #7a5c00;
  font-style: italic;
  margin-top: 3px;
}

/* Form title */
.pt-form-title {
  text-align: center;
  font-size: 14.5px;
  font-weight: bold;
  color: #003580;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 10px 0 4px;
  border-bottom: 1px solid #003580;
  padding-bottom: 5px;
}

.pt-date-row {
  text-align: right;
  font-size: 11px;
  margin-bottom: 8px;
  color: #222;
}

/* Main data table */
.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.pt-table td {
  border: 1px solid #aaa;
  padding: 5px 8px;
  vertical-align: top;
  line-height: 1.45;
}

.pt-label {
  background: #eef3fb;
  font-weight: bold;
  color: #003580;
  white-space: nowrap;
  width: 22%;
}

.pt-val {
  color: #111;
  word-break: break-word;
}

/* Section divider rows */
.pt-section {
  background: #003580;
  color: #ffffff;
  font-weight: bold;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  padding: 5px 8px;
}

/* Branch opted large cell */
.pt-branch {
  font-size: 15px;
  font-weight: bold;
  color: #003580;
  text-align: center;
  letter-spacing: 2px;
  padding: 10px 8px;
}

/* Signature row */
.pt-sig-row {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 40px;
}

.pt-sig-box {
  flex: 1;
  text-align: center;
}

.pt-sig-line {
  width: 100%;
  height: 1px;
  background: #000;
  margin-bottom: 6px;
}

.pt-sig-label {
  font-size: 10.5px;
  color: #444;
}

/* Download PDF button styling */
.btn-download-pdf {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 4px 16px rgba(22, 163, 74, .3);
}

.btn-download-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(22, 163, 74, .45);
}

/* ================================================================
   SITE FOOTER — Copyright
   ================================================================ */
.site-footer {
  background: linear-gradient(90deg, #001a4d 0%, #002060 50%, #001a4d 100%);
  border-top: 3px solid var(--secondary);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .4px;
}

.site-footer span {
  color: var(--accent);
  font-weight: 700;
}

@media print {
  .site-footer { display: none; }
}