:root {
  --navy: #0d2d59;
  --navy-dark: #082344;
  --navy-light: #174d86;
  --green-btn: #087b5b;
  --green-hover: #066449;
  --blue-btn: #0b56ad;
  --blue-hover: #08458d;
  --gold: #d19a2c;
  --gold-dark: #b77e13;
  --bg-main: #eef1f7;
  --card-bg: #ffffff;
  --border: #d0d9ee;
  --border-focus: #5b7fcb;
  --text-main: #1a1a2e;
  --text-muted: #596579;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

/* Home page */
.home-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(235, 245, 253, .86), rgba(248, 251, 255, .94)),
    radial-gradient(circle at 18% 20%, rgba(111, 170, 224, .22), transparent 35%),
    radial-gradient(circle at 82% 12%, rgba(128, 187, 231, .18), transparent 34%),
    linear-gradient(135deg, #d9eafa 0%, #f8fbff 52%, #dcecf8 100%);
  position: relative;
}

.home-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255,255,255,.2) 9.1% 9.5%, transparent 9.6% 100%),
    linear-gradient(0deg, transparent 0 77%, rgba(255,255,255,.35) 77.1% 77.4%, transparent 77.5% 100%);
  opacity: .7;
}

.home-page {
  min-height: calc(100vh - 160px);
  padding: 42px 32px 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.home-hero {
  text-align: center;
  margin-bottom: 34px;
}

.home-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.08));
}

.home-hero h1 {
  margin: 0 0 12px;
  color: #0b214e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 3.15vw, 43px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.5px;
}

.portal-title {
  display: inline-block;
  padding: 12px 28px 11px;
  border-radius: 18px;
  background: linear-gradient(180deg, #dfa838, #c4891c);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 4px;
  box-shadow: 0 4px 12px rgba(165, 112, 17, .22);
}

.home-hero p {
  margin: 10px 0 0;
  color: #4e5d74;
  font-size: 18px;
}

.login-grid {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.login-card {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: 17px;
  padding: 25px 30px 64px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 24px rgba(44, 74, 111, .10);
}

.student-card { border: 1px solid #b9e2d5; }
.admin-card { border: 1px solid #b9d4f4; }

.login-icon {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.student-card .login-icon {
  color: #057151;
  background: #dff4ec;
}

.admin-card .login-icon {
  color: #0b57ad;
  background: #dceafe;
}

.login-icon svg { width: 65px; height: 65px; }

.login-card h2 {
  margin: 0 0 10px;
  color: #0c204b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
}

.login-card p {
  min-height: 50px;
  margin: 0 0 19px;
  color: #536078;
  font-size: 16px;
  line-height: 1.45;
}

.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 51px;
  border-radius: 27px;
  color: white;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: transform .15s ease, filter .15s ease;
}

.home-btn span { font-size: 26px; line-height: 0; margin-top: -2px; }
.home-btn:hover { color: white; transform: translateY(-1px); filter: brightness(.95); }
.student-btn { background: linear-gradient(180deg, #138662, #087653); }
.admin-btn { background: linear-gradient(180deg, #155fb6, #0b4e9e); }

.card-wave {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -48px;
  height: 92px;
  border-radius: 50% 50% 0 0 / 55% 55% 0 0;
}
.student-card .card-wave { background: #e0f5ee; }
.admin-card .card-wave { background: #dfeefe; }

.home-footer {
  position: fixed;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 118px;
  padding: 36px 4vw 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  color: #fff;
  background: var(--navy);
  border-top: 3px solid var(--gold);
  clip-path: ellipse(85% 100% at 50% 100%);
}

.home-footer::before {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  top: -28px;
  height: 52px;
  background: var(--navy);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
}

.footer-left, .footer-right { position: relative; z-index: 1; font-size: 14px; line-height: 1.9; }
.footer-right { text-align: right; }
.footer-left span, .footer-right span { margin: 0 9px; opacity: .75; }
.footer-right div:last-child { font-size: 13px; }

/* Other pages retain the existing application styling. */
.app-body { background-color: var(--bg-main); }

.navbar {
  background-color: var(--navy) !important;
  border-bottom: 2px solid var(--gold);
}
.navbar-brand { font-family: Georgia, "Times New Roman", serif; letter-spacing: .3px; }
.card { border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); box-shadow: none; }
.card-header { border-bottom: 1px solid var(--border); color: var(--navy); }
.form-control:focus, .form-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 .2rem rgba(91,127,203,.25); }
.btn-primary { background-color: var(--green-btn); border-color: var(--green-btn); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: var(--green-hover) !important; border-color: var(--green-hover) !important; }
.btn-dark { background-color: var(--navy); border-color: var(--navy); }
.btn-dark:hover, .btn-dark:focus, .btn-dark:active { background-color: var(--navy-dark) !important; border-color: var(--navy-dark) !important; }
.btn-blue { background-color: var(--blue-btn); border-color: var(--blue-btn); color: #fff; }
.btn-blue:hover, .btn-blue:focus, .btn-blue:active { background-color: var(--blue-hover) !important; border-color: var(--blue-hover) !important; color: #fff !important; }
.btn-outline-secondary { color: var(--navy); border-color: var(--navy-light); }
.btn-outline-secondary:hover { background-color: var(--navy-light); border-color: var(--navy-light); }
.btn-success { background-color: var(--green-btn); border-color: var(--green-btn); }
.btn-success:hover, .btn-success:focus { background-color: var(--green-hover); border-color: var(--green-hover); }
.btn-warning { background-color: var(--gold); border-color: var(--gold); color: #fff; }
.btn-warning:hover { background-color: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.table thead th, .table > :not(caption) > * > * { background-color: transparent; }
code { color: var(--navy-light); }

@media (max-width: 800px) {
  .home-page { padding: 28px 18px 145px; }
  .login-grid { grid-template-columns: 1fr; max-width: 430px; }
  .home-footer { position: relative; clip-path: none; padding: 25px 22px; flex-direction: column; min-height: 150px; }
  .home-footer::before { display: none; }
  .footer-right { text-align: left; }
}

/* Admin/application pages redesigned to match the supplied dashboard reference. */
.app-body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(247, 250, 255, .91), rgba(244, 248, 253, .96)),
    url('../images/campus-bg.jpg') center top / cover fixed no-repeat;
  overflow-x: hidden;
}

.app-header {
  height: 140px;
  position: relative;
  z-index: 10;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.84) 57%, rgba(255,255,255,.18) 100%),
    url('../images/campus-bg.jpg') center 18% / cover no-repeat;
  border-bottom: 1px solid rgba(209, 224, 242, .7);
}

.app-header::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 0;
  width: 29%;
  height: 100%;
  background: var(--navy);
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%, 15% 82%, 24% 53%, 33% 28%);
  z-index: 0;
}

.app-header::before {
  content: "";
  position: absolute;
  right: 27.5%;
  top: 0;
  width: 4%;
  height: 100%;
  background: var(--gold);
  clip-path: polygon(70% 0, 100% 0, 42% 54%, 0 82%, 35% 60%);
  z-index: 1;
}

.app-header-inner {
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 34px 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 3;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
}

.app-brand img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex: 0 0 auto;
}

.app-brand-copy { min-width: 0; }
.app-college-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 2.05vw, 34px);
  font-weight: 700;
  line-height: 1.08;
  white-space: nowrap;
}
.app-college-meta {
  margin-top: 7px;
  color: #42516a;
  font-size: 16px;
  white-space: nowrap;
}
.app-college-meta span { margin: 0 9px; color: #68758a; }
.app-portal-name {
  margin-top: 8px;
  color: var(--gold-dark);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 4px;
}

.app-header-actions {
  min-width: 340px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  color: #fff;
}
.portal-label {
  font-size: 23px;
  font-weight: 500;
  white-space: nowrap;
}
.logout-btn {
  height: 49px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid rgba(255,255,255,.9);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 17px;
}
.logout-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logout-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.app-main {
  min-height: calc(100vh - 140px);
  padding: 39px 3.25% 160px;
  position: relative;
}

/* Consistent Home / Back navigation shown at the top of every admin
   feature page (everything except the dashboard itself), see base.html. */
.admin-page-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid var(--navy-light);
  background: #fff;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, color .15s, transform .1s;
}
.admin-nav-btn:hover { background: var(--navy-light); color: #fff; transform: translateY(-1px); }
.admin-nav-btn svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-nav-home { border-color: var(--green-btn); color: var(--green-btn); }
.admin-nav-home:hover { background: var(--green-btn); color: #fff; }

/* Full-screen blurred overlay + progress modal, reused for Excel-upload
   and bulk fee-receipt generation (see static/js/admin-progress.js). */
.admin-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 25, 48, .35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.admin-progress-modal {
  width: min(380px, 90vw);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(10, 25, 60, .28);
  padding: 26px 26px 24px;
  text-align: center;
}
.admin-progress-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #eaf3ff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-progress-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--blue-btn); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: admin-progress-spin 1.6s linear infinite; }
@keyframes admin-progress-spin { to { transform: rotate(360deg); } }
.admin-progress-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.admin-progress-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; min-height: 18px; }
.admin-progress-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: #e7ecf5;
  overflow: hidden;
  margin-bottom: 8px;
}
.admin-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--blue-btn), var(--green-btn));
  transition: width .25s ease;
}
.admin-progress-bar-track.is-indeterminate .admin-progress-bar-fill {
  width: 40% !important;
  animation: admin-progress-indeterminate 1.2s ease-in-out infinite;
}
@keyframes admin-progress-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
.admin-progress-pct { font-size: 13px; font-weight: 700; color: var(--navy); }

/* "Missing Enrollment No." indicator on the Bulk-Generate table, and the
   disabled state of a row that can't be selected because of it. */
.enrollment-missing-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f3c2bd;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
tr.row-missing-enrollment { background: #fff8f7; }
tr.row-missing-enrollment td { color: #8a8f9a; }

.admin-dashboard { max-width: 100%; }
.admin-page-title {
  margin: 0 0 20px;
  color: #0c214d;
  font-size: clamp(34px, 3vw, 43px);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -.8px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}
.admin-stat-card {
  min-height: 137px;
  border: 1px solid;
  border-radius: 13px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 5px 15px rgba(44, 74, 111, .07);
  display: flex;
  align-items: center;
  padding: 20px 26px;
  gap: 21px;
}
.stat-blue { border-color: #c6dbf8; }
.stat-green { border-color: #bce7d7; }
.stat-gold { border-color: #f2dda5; }
.stat-red { border-color: #f3c5d0; }
.stat-icon {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.stat-icon svg { width: 53px; height: 53px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.stat-blue .stat-icon { background: #dceafd; color: #0766d5; }
.stat-green .stat-icon { background: #d8f2e6; color: #07935d; }
.stat-gold .stat-icon { background: #fbeac0; color: #e39108; }
.stat-red .stat-icon { background: #f8d8e1; color: #dc3347; }
.stat-copy { min-width: 0; }
.stat-label { color: #33415b; font-size: 17px; line-height: 1.3; }
.stat-number { margin-top: 3px; color: #08173d; font-size: 43px; line-height: 1; font-weight: 750; letter-spacing: .5px; }

.academic-card {
  border: 1px solid #cadcf3;
  border-radius: 15px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 6px 16px rgba(44, 74, 111, .08);
  padding: 19px 27px 23px;
  margin-bottom: 25px;
}
.section-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 19px; }
.section-heading svg { width: 32px; height: 32px; fill: #0b4ca4; }
.section-heading h2 { margin: 0; color: #092c6d; font-size: 23px; font-weight: 750; }
.academic-table-wrap { overflow: hidden; border: 1px solid #c9dcf4; border-radius: 10px; }
.academic-table { width: 100%; border-collapse: collapse; font-size: 17px; color: #14274f; }
.academic-table th { background: #e3eefb; color: #10203d; font-weight: 750; text-align: left; padding: 13px 23px; }
.academic-table td { padding: 10px 23px; border-top: 1px solid #d4e1f2; background: rgba(255,255,255,.75); }
.academic-table tbody tr:last-child td { padding-bottom: 12px; }

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
}
.admin-action {
  min-height: 55px;
  padding: 0 20px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  transition: transform .12s ease, filter .12s ease;
}
.admin-action:hover { transform: translateY(-1px); filter: brightness(.98); }
.admin-action svg { width: 25px; height: 25px; flex: 0 0 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action-green { background: #0b8a5d; color: #fff; border: 1px solid #0b8a5d; }
.action-outline-blue { background: rgba(255,255,255,.72); color: #103e83; border: 2px solid #2c5e9f; }
.action-outline-gold { background: rgba(255,255,255,.72); color: #ed9a00; border: 2px solid #f0a400; }
.missing-action { flex-basis: 308px; }

.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  min-height: 142px;
  padding: 42px 4.7% 23px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  color: #fff;
  background: var(--navy);
  border-top: 3px solid var(--gold);
  clip-path: ellipse(86% 100% at 50% 100%);
}
.app-footer::before {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  top: -31px;
  height: 57px;
  background: var(--navy);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
}
.app-footer .footer-left, .app-footer .footer-right { position: relative; z-index: 1; font-size: 14px; line-height: 1.9; }
.app-footer .footer-right { text-align: right; }
.app-footer .footer-left span, .app-footer .footer-right span { margin: 0 9px; opacity: .75; }
.app-footer .footer-right div:last-child { font-size: 13px; }

@media (max-width: 1100px) {
  .app-header { height: 124px; }
  .app-brand img { width: 82px; height: 82px; }
  .app-college-name { font-size: 25px; }
  .app-college-meta { font-size: 13px; }
  .app-portal-name { font-size: 14px; }
  .app-header-actions { min-width: 250px; gap: 14px; }
  .portal-label { font-size: 18px; }
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-main { min-height: calc(100vh - 124px); }
}

@media (max-width: 760px) {
  .app-header { height: auto; min-height: 132px; }
  .app-header::after, .app-header::before { display: none; }
  .app-header-inner { padding: 14px 18px; align-items: flex-start; gap: 15px; flex-direction: column; }
  .app-brand { gap: 13px; }
  .app-brand img { width: 65px; height: 65px; }
  .app-college-name { font-size: 20px; white-space: normal; }
  .app-college-meta { white-space: normal; line-height: 1.4; }
  .app-portal-name { margin-top: 4px; }
  .app-header-actions { width: 100%; min-width: 0; justify-content: space-between; }
  .app-main { min-height: auto; padding: 25px 18px 180px; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-stat-card { min-height: 118px; }
  .admin-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-action, .missing-action { width: auto; flex-basis: auto; }
  .app-footer { position: relative; clip-path: none; padding: 25px 22px; flex-direction: column; min-height: 150px; }
  .app-footer::before { display: none; }
  .app-footer .footer-right { text-align: left; }
}

/* Final sizing adjustment for the Admin Dashboard — closer to the reference scale. */
@media (min-width: 1101px) {
  .app-main { padding: 34px 3.25% 150px; }
  .admin-page-title { font-size: 40px; margin-bottom: 18px; }
  .admin-stat-grid { gap: 18px; margin-bottom: 22px; }
  .admin-stat-card { min-height: 137px; padding: 18px 24px; gap: 18px; }
  .stat-icon { width: 88px; height: 88px; flex-basis: 88px; }
  .stat-icon svg { width: 49px; height: 49px; }
  .stat-label { font-size: 16px; }
  .stat-number { font-size: 40px; }
  .academic-card { padding: 17px 26px 20px; margin-bottom: 22px; }
  .section-heading { gap: 13px; margin-bottom: 16px; }
  .section-heading svg { width: 29px; height: 29px; }
  .section-heading h2 { font-size: 22px; }
  .academic-table { font-size: 16px; }
  .academic-table th { padding: 11px 22px; }
  .academic-table td { padding: 9px 22px; }
  .admin-actions { gap: 10px 9px; }
  .admin-action { min-height: 55px; padding: 0 18px; font-size: 16px; gap: 10px; }
  .admin-action svg { width: 23px; height: 23px; flex-basis: 23px; }
}

/* Professional Admin Dashboard refinement */
.app-body {
  background: linear-gradient(180deg, #f6f9fd 0%, #edf3f9 100%);
}

.app-header {
  height: 108px;
  background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.91) 62%, rgba(255,255,255,.18) 100%), url('../images/campus-bg.jpg') center 28% / cover no-repeat;
  box-shadow: 0 2px 14px rgba(16,42,76,.08);
}
.app-header::after { width: 27%; }
.app-header-inner { padding: 10px 32px 10px 36px; }
.app-brand { gap: 17px; }
.app-brand img { width: 78px; height: 78px; }
.app-college-name { font-size: clamp(24px, 1.8vw, 30px); }
.app-college-meta { margin-top: 5px; font-size: 14px; }
.app-portal-name { margin-top: 6px; font-size: 14px; letter-spacing: 3px; }
.app-header-actions { min-width: 300px; gap: 20px; }
.portal-label { font-size: 20px; font-weight: 600; }
.logout-btn { height: 44px; padding: 0 16px; border-radius: 8px; font-size: 15px; }

.app-main {
  min-height: calc(100vh - 108px);
  padding: 30px 34px 150px;
}
.admin-dashboard { width: min(1420px, 100%); margin: 0 auto; }
.admin-page-title {
  font-size: 36px;
  margin-bottom: 20px;
  letter-spacing: -.6px;
}

.admin-stat-grid { gap: 16px; margin-bottom: 22px; }
.admin-stat-card {
  min-height: 126px;
  padding: 18px 22px;
  gap: 17px;
  border-radius: 12px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 18px rgba(32,62,96,.07);
}
.stat-icon { width: 78px; height: 78px; flex-basis: 78px; }
.stat-icon svg { width: 43px; height: 43px; }
.stat-label { font-size: 15px; line-height: 1.28; }
.stat-number { font-size: 38px; margin-top: 5px; }

.academic-card {
  padding: 17px 22px 20px;
  margin-bottom: 21px;
  border-radius: 13px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 5px 18px rgba(32,62,96,.06);
}
.section-heading { gap: 12px; margin-bottom: 14px; }
.section-heading svg { width: 27px; height: 27px; }
.section-heading h2 { font-size: 20px; }
.academic-table { font-size: 15px; }
.academic-table th { padding: 11px 18px; }
.academic-table td { padding: 9px 18px; }

.quick-actions-card {
  margin-top: 4px;
  padding: 18px 20px 20px;
  border: 1px solid #dce7f3;
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 5px 18px rgba(32,62,96,.055);
}
.quick-actions-head { margin-bottom: 14px; }
.quick-actions-head h2 { margin: 0; color: #102f62; font-size: 19px; font-weight: 700; }
.quick-actions-head p { margin: 3px 0 0; color: #718096; font-size: 12px; }
.admin-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.admin-action {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  justify-content: flex-start;
  box-shadow: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.admin-action:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(30,55,85,.10); }
.admin-action svg { width: 22px; height: 22px; flex: 0 0 22px; padding: 7px; box-sizing: content-box; border-radius: 8px; }
.action-green { background: #f3faf7; color: #08764f; border: 1px solid #b9dfd0; }
.action-green svg { background: #d9f1e7; }
.action-outline-blue { background: #f5f8fd; color: #164b8f; border: 1px solid #bfd2eb; }
.action-outline-blue svg { background: #dfeafb; }
.action-outline-gold { background: #fffaf0; color: #b87500; border: 1px solid #efd18d; }
.action-outline-gold svg { background: #ffedc2; }

.app-footer {
  min-height: 112px;
  padding: 31px 4.5% 18px;
  background: #103565;
  border-top: 3px solid var(--gold);
}
.app-footer::before { top: -25px; height: 48px; }
.app-footer .footer-left, .app-footer .footer-right { font-size: 13px; line-height: 1.75; }
.app-footer .footer-right div:last-child { font-size: 12px; }

@media (max-width: 1100px) {
  .app-header { height: 104px; }
  .app-main { min-height: calc(100vh - 104px); padding: 26px 24px 145px; }
  .app-brand img { width: 68px; height: 68px; }
  .app-college-name { font-size: 23px; }
  .app-college-meta { font-size: 12px; }
  .admin-page-title { font-size: 32px; }
  .stat-icon { width: 70px; height: 70px; flex-basis: 70px; }
  .stat-number { font-size: 34px; }
}

@media (max-width: 760px) {
  .app-header { height: auto; min-height: 125px; }
  .app-header-inner { padding: 12px 16px; }
  .app-main { padding: 22px 16px 170px; }
  .admin-page-title { font-size: 29px; }
  .admin-stat-card { min-height: 108px; }
  .admin-actions { grid-template-columns: 1fr; gap: 9px; }
  .admin-action { width: 100%; }
}

/* Final Admin Dashboard polish: compact left-aligned Quick Actions + clean portal control */
@media (min-width: 1101px) {
  .app-header::after {
    right: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(135deg, #173f70 0%, #0d2d59 100%);
    clip-path: none;
    border-radius: 88px 0 0 0;
  }
  .app-header::before {
    right: 29.3%;
    width: 2.2%;
    height: 100%;
    background: var(--gold);
    clip-path: polygon(100% 0, 100% 100%, 0 100%, 55% 55%);
  }
  .app-header-actions {
    position: relative;
    z-index: 5;
    min-width: 320px;
    padding-right: 2px;
    gap: 20px;
  }
  .portal-label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
    color: #fff;
    font-size: 19px;
    font-weight: 650;
  }
  .logout-btn {
    height: 44px;
    padding: 0 17px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: 9px;
    background: rgba(255,255,255,.06);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  }

  .quick-actions-card {
    width: min(930px, 100%);
    margin: 4px 0 0;
    padding: 17px 19px 18px;
  }
  .quick-actions-head {
    margin-bottom: 12px;
  }
  .quick-actions-head h2 {
    font-size: 18px;
  }
  .quick-actions-head p {
    font-size: 12px;
  }
  .admin-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .admin-action {
    min-height: 58px;
    padding: 9px 11px;
    font-size: 13px;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .app-header::after {
    right: 0;
    width: 28%;
    background: linear-gradient(135deg, #173f70, #0d2d59);
    clip-path: none;
    border-radius: 55px 0 0 0;
  }
  .app-header::before { display: none; }
  .app-header-actions { position: relative; z-index: 5; }
  .quick-actions-card { width: min(860px, 100%); margin-left: 0; }
  .admin-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Desktop dashboard layout: compact scale with portrait Quick Actions on the left. */
@media (min-width: 1101px) {
  .app-main { padding: 26px 34px 135px; }
  .admin-dashboard { width: min(1420px, 100%); }
  .admin-page-title { font-size: 34px; margin-bottom: 17px; }
  .admin-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 18px; align-items: start; }
  .admin-primary { min-width: 0; }
  .admin-stat-grid { gap: 14px; margin-bottom: 18px; }
  .admin-stat-card { min-height: 112px; padding: 15px 18px; gap: 13px; }
  .stat-icon { width: 68px; height: 68px; flex-basis: 68px; }
  .stat-icon svg { width: 38px; height: 38px; }
  .stat-label { font-size: 14px; }
  .stat-number { font-size: 34px; margin-top: 4px; }
  .academic-card { padding: 15px 18px 17px; margin-bottom: 0; }
  .section-heading { margin-bottom: 11px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading svg { width: 25px; height: 25px; }
  .academic-table { font-size: 14px; }
  .academic-table th { padding: 9px 16px; }
  .academic-table td { padding: 8px 16px; }

  .quick-actions-card { width: auto; margin: 0; padding: 17px 14px 15px; border-radius: 13px; position: sticky; top: 18px; }
  .quick-actions-head { padding: 0 4px; margin-bottom: 11px; }
  .quick-actions-head h2 { font-size: 18px; }
  .quick-actions-head p { font-size: 11px; }
  .admin-actions { display: flex; flex-direction: column; gap: 8px; }
  .admin-action { min-height: 54px; padding: 8px 10px; font-size: 12.5px; border-radius: 9px; }
  .admin-action svg { width: 20px; height: 20px; flex-basis: 20px; padding: 6px; border-radius: 7px; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .admin-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
  .quick-actions-card { width: auto; margin: 0; }
  .admin-actions { display: flex; flex-direction: column; gap: 8px; }
  .admin-action { width: 100%; }
}

@media (max-width: 760px) {
  .admin-layout { display: flex; flex-direction: column; }
  .admin-primary { width: 100%; }
  .quick-actions-card { width: 100%; box-sizing: border-box; order: 2; }
  .admin-primary { order: 1; }
}
.qa-icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items:center; justify-content:center; flex:0 0 32px; font-size:17px; font-weight:700; background: rgba(0,0,0,.035); }
.action-green .qa-icon { background:#d9f1e7; }
.action-outline-blue .qa-icon { background:#dfeafb; }
.action-outline-gold .qa-icon { background:#ffedc2; }

/* Global compact scale — keeps every portal screen comfortable on standard laptop/desktop displays. */
@media (min-width: 761px) {
  .app-header { height: 96px; }
  .app-header-inner { padding: 8px 28px 8px 30px; }
  .app-brand { gap: 14px; }
  .app-brand img { width: 68px; height: 68px; }
  .app-college-name { font-size: 25px; }
  .app-college-meta { margin-top: 3px; font-size: 13px; }
  .app-portal-name { margin-top: 4px; font-size: 13px; letter-spacing: 2.8px; }
  .app-header-actions { min-width: 270px; gap: 16px; }
  .portal-label { font-size: 17px; }
  .logout-btn { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
  .logout-btn svg { width: 19px; height: 19px; }

  .app-main { min-height: calc(100vh - 96px); padding: 22px 30px 125px; }
  .app-main > .row { --bs-gutter-x: 1rem; --bs-gutter-y: .5rem; }
  .app-main h4 { font-size: 21px; }
  .app-main h5 { font-size: 18px; }
  .app-main h6 { font-size: 15px; }
  .app-main p { font-size: 14px; }
  .app-main .form-label { font-size: 13px; margin-bottom: 5px; }
  .app-main .form-control,
  .app-main .form-select { min-height: 38px; padding: 7px 10px; font-size: 14px; }
  .app-main .form-text,
  .app-main .small { font-size: 12px !important; }
  .app-main .mb-3 { margin-bottom: .75rem !important; }
  .app-main .mt-3 { margin-top: .75rem !important; }
  .app-main .card { border-radius: 10px; }
  .app-main .card-body { padding: 16px; }
  .app-main .card-header { padding: 10px 14px; font-size: 14px; }
  .app-main .btn { font-size: 13px; }
  .app-main .btn-sm { padding: 5px 9px; font-size: 12px; }
  .app-main .table { font-size: 13px; }
  .app-main .table > :not(caption) > * > * { padding: 7px 9px; }

  .app-footer { min-height: 98px; padding: 27px 4.5% 15px; }
  .app-footer::before { top: -21px; height: 42px; }
  .app-footer .footer-left, .app-footer .footer-right { font-size: 12px; line-height: 1.65; }
  .app-footer .footer-right div:last-child { font-size: 11px; }

  /* Login / reset screens */
  .app-main > .row.justify-content-center .col-md-5 { max-width: 430px; }
  .app-main > .row.justify-content-center .col-md-5 .card-body { padding: 22px; }
  .app-main > .row.justify-content-center .card-title { font-size: 21px; margin-bottom: 14px !important; }
  .app-main > .row.justify-content-center .btn { min-height: 40px; }
}

/* Home page — slightly more compact than the original reference while retaining the same design. */
@media (min-width: 761px) {
  .home-page { min-height: calc(100vh - 104px); padding: 30px 28px 105px; }
  .home-hero { margin-bottom: 25px; }
  .home-logo { width: 84px; height: 84px; margin-bottom: 8px; }
  .home-hero h1 { font-size: clamp(27px, 2.8vw, 38px); margin-bottom: 9px; }
  .portal-title { padding: 10px 24px 9px; font-size: 16px; letter-spacing: 3.5px; border-radius: 15px; }
  .home-hero p { margin-top: 8px; font-size: 16px; }
  .login-grid { width: min(720px, 100%); gap: 20px; }
  .login-card { min-height: 315px; padding: 22px 26px 55px; border-radius: 15px; }
  .login-icon { width: 98px; height: 98px; margin-bottom: 10px; }
  .login-icon svg { width: 55px; height: 55px; }
  .login-card h2 { font-size: 24px; margin-bottom: 8px; }
  .login-card p { min-height: 46px; margin-bottom: 15px; font-size: 14px; }
  .home-btn { height: 46px; font-size: 15px; }
  .home-btn span { font-size: 23px; }
  .card-wave { bottom: -43px; height: 82px; }
  .home-footer { min-height: 100px; padding: 29px 4vw 18px; }
  .home-footer::before { top: -22px; height: 44px; }
  .footer-left, .footer-right { font-size: 12px; line-height: 1.7; }
  .footer-right div:last-child { font-size: 11px; }
}

@media (max-width: 760px) {
  .app-header-inner { padding: 10px 14px; }
  .app-main { padding: 18px 14px 160px; }
  .app-main .card-body { padding: 14px; }
  .app-main .btn { font-size: 13px; }
  .home-page { padding-top: 24px; }
  .home-logo { width: 76px; height: 76px; }
  .home-hero h1 { font-size: 27px; }
  .login-card { min-height: 300px; }
}
