/* ===================================================
   DELHI COLLEGE — RESULTS PORTAL  |  ACADEMIC STYLESHEET
   Clean professional typography, official report styling
   UPDATED: White card backgrounds, dark text, preserved dark cinematic overlay
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:wght@400;700&display=swap');

/* ── DESIGN TOKENS ──────────────────────────────── */
:root {
  /* Dark cinematic background (unchanged) */
  --bg-base:       #0a0f1a;
  --bg-2:          #0e1622;
  
  /* WHITE CARD SURFACES (new for academic white style) */
  --card-white:    rgba(255, 255, 255, 0.98);
  --card-white-solid: #ffffff;
  --surface-light: #f8fafc;
  --border-light:  rgba(0, 0, 0, 0.08);
  --border-light-2: rgba(0, 0, 0, 0.12);
  --border-light-3: rgba(0, 0, 0, 0.2);
  
  /* Accent colors remain professional */
  --cyan:          #2e9bff;
  --cyan-light:    rgba(46,155,255,0.12);
  --cyan-mid:      rgba(46,155,255,0.25);
  --cyan-text:     #1a73e8;
  --cyan-dark:     #0d5bbf;

  --gold:          #d4a017;
  --gold-bg:       rgba(212,160,23,0.10);
  --gold-border:   rgba(212,160,23,0.25);

  --green:         #2c7a4d;
  --green-bg:      rgba(44,122,77,0.10);
  --green-border:  rgba(44,122,77,0.25);

  --orange:        #e67e22;
  --orange-bg:     rgba(230,126,34,0.10);
  --orange-border: rgba(230,126,34,0.25);

  --red:           #c0392b;
  --red-bg:        rgba(192,57,43,0.10);
  --red-border:    rgba(192,57,43,0.25);

  --yellow:        #d4ac0d;
  --yellow-bg:     rgba(212,172,13,0.10);
  --yellow-border: rgba(212,172,13,0.25);

  /* DARK TEXT for white backgrounds */
  --text-dark-1:   #1e293b;
  --text-dark-2:   #334155;
  --text-dark-3:   #475569;
  --text-dark-4:   #64748b;
  --text-muted:    #6c757d;

  /* Input backgrounds (light) */
  --input-bg:      #ffffff;
  --input-border:  #cfdde6;
  --input-focus:   var(--cyan);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  26px;
  --transition: 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── BASE TYPOGRAPHY ────────────────────────────── */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-dark-1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow-x: hidden;
}

/* Dark cinematic ambient gradients (unchanged) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 5%, rgba(46,155,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 90%, rgba(30,100,220,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 55% 50%, rgba(240,180,41,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle moving shimmer line (unchanged) */
body::after {
  content: '';
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,119,204,0.5) 50%, transparent 100%);
  animation: scanline 12s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes scanline {
  to { top: 200%; }
}

/* ── SLIDESHOW (unchanged, dark cinematic) ──────────────────── */
.bg-slideshow {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.bg-slide.active { opacity: 1; }

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(5,10,20,0.85) 0%, rgba(8,18,35,0.92) 100%);
  z-index: -1;
}

/* ── LAYOUT WRAPPER ─────────────────────────────── */
.portal-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── LOGIN CARD (WHITE BACKGROUND) ─────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 450px;
  background: var(--card-white);
  backdrop-filter: blur(0px);
  border: 1px solid var(--border-light-2);
  border-radius: var(--radius-xl);
  padding: clamp(1.8rem, 5vw, 2.8rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: cardReveal 0.6s ease-out both;
  position: relative;
}

/* Top accent line */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--cyan), transparent);
  opacity: 0.9;
  border-radius: 0 0 4px 4px;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── LOGO BOX (academic serif headings) ─────────────────── */
.logo-box {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-box .logo-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,155,255,0.1), rgba(30,100,220,0.05));
  border: 2px solid var(--border-light-2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin: 0 auto 1rem;
  position: relative;
}

.logo-box .logo-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: var(--cyan-mid);
  opacity: 0.7;
  animation: orbit 6s linear infinite;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.logo-box img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-box h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: 700;
  color: var(--cyan-dark);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.logo-box h2 + h2 {
  font-size: clamp(0.7rem, 2.2vw, 0.85rem);
  color: var(--gold);
  font-weight: 600;
  margin-top: 0.25rem;
}

.logo-box p {
  font-size: 0.8rem;
  color: var(--text-dark-4);
  margin-top: 0.25rem;
}

.logo-box.compact {
  margin-bottom: 1rem;
}

.logo-box.compact .logo-ring {
  width: 65px;
  height: 65px;
}

.logo-box.compact img {
  width: 45px;
  height: 45px;
}

.logo-box.compact h2 {
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
}

/* ── FORM FIELDS (light backgrounds, dark text) ────────────────────────────────── */
.field-group {
  margin-top: 1.25rem;
}

label {
  display: block;
  font-family: 'Merriweather', serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark-3);
  margin-bottom: 0.5rem;
}

input,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-dark-1);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
}

input::placeholder {
  color: var(--text-dark-4);
  font-weight: 400;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(46, 155, 255, 0.1);
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%232e9bff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  appearance: none;
}

select option {
  background: #ffffff;
  color: var(--text-dark-1);
}

/* ── PASSWORD TOGGLE ────────────────────────────── */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark-4);
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

.password-toggle:hover {
  color: var(--cyan);
}

.password-toggle i {
  font-size: 1.1rem;
}

/* ── PRIMARY BUTTON (blue gradient) ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.75rem;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, #1a73e8 0%, #0d5bbf 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.btn:hover {
  background: linear-gradient(135deg, #0d5bbf 0%, #0a4a9e 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 115, 232, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* ── ACTION BUTTONS (outlined variant on white card) ──────────── */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.action-buttons .btn {
  width: auto;
  min-width: 100px;
  flex: 1 1 auto;
  max-width: 150px;
  margin-top: 0;
  font-size: 0.6rem;
  padding: 0.7rem 1rem;
  background: #f1f5f9;
  border: 1.5px solid var(--border-light-3);
  color: var(--cyan-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background-image: none;
}

.action-buttons .btn::after {
  display: none;
}

.action-buttons .btn:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

/* ── LINKS ──────────────────────────────────────── */
.links {
  text-align: center;
  margin-top: 1.5rem;
}

.links a {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text-dark-3);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.links a:hover {
  color: var(--cyan);
}

/* ── ERROR & LOADING ────────────────────────────── */
.error {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.loading {
  display: none;
  text-align: center;
  margin: 1rem 0;
  color: var(--text-dark-3);
  font-size: 0.85rem;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 0.5rem;
  position: relative;
}

.spinner::before,
.spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
}

.spinner::before {
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}

.spinner::after {
  border-bottom-color: var(--cyan-mid);
  animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── RESULTS CARD (WHITE BACKGROUND) ───────────────────────────────── */
.results-card {
  display: none;
  width: 100%;
  max-width: 1100px;
  background: var(--card-white);
  border: 1px solid var(--border-light-2);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.2rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: cardReveal 0.6s ease-out both;
  position: relative;
}

.results-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--cyan), transparent);
  opacity: 0.8;
  border-radius: 0 0 4px 4px;
}

/* ── STUDENT INFO (light backgrounds, dark text) ───────────────────────────────── */
.student-info {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.75rem;
  background: var(--surface-light);
}

.student-info > div {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-light);
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #ffffff;
}

.student-info > div:nth-child(odd) {
  background: #f9fafc;
}

.student-info > div:last-child {
  border-bottom: none;
}

.student-info strong {
  font-family: 'Merriweather', serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dark-4);
  min-width: 110px;
  flex-shrink: 0;
}

.student-info > div > *:nth-child(2) {
  color: var(--text-dark-1);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ── STATUS + ATTENDANCE BADGES ─────────────────── */
.status-badge,
.attendance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-completed,
.attendance-excellent {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.status-active,
.attendance-good {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  color: #b8860b;
}

.status-inactive {
  background: var(--orange-bg);
  border: 1px solid var(--orange-border);
  color: var(--orange);
}

.status-pending {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.attendance-fair {
  background: var(--orange-bg);
  border: 1px solid var(--orange-border);
  color: var(--orange);
}

.attendance-poor {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.attendance-message {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-dark-3);
  padding: 0.2rem 0.6rem;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
}

/* ── SELECTORS ──────────────────────────────────── */
.form-group {
  margin: 0.9rem 0;
}

.select-wrap {
  position: relative;
}

/* ── COURSES CONTAINER (light background) ──────────────────────────── */
.courses-container {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.courses-container > * {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.courses-container h2,
.courses-container h3,
.courses-container h4 {
  font-family: 'Merriweather', serif;
  color: var(--cyan-dark);
  font-size: clamp(0.75rem, 2.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.courses-container p {
  color: var(--text-dark-2);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.courses-container strong {
  color: var(--text-dark-1);
  font-weight: 700;
}

/* ── TABLES (clean report style) ───────────────────────────────────── */
.courses-container table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
  font-size: clamp(0.8rem, 2vw, 0.92rem);
}

.courses-container thead th {
  font-family: 'Merriweather', serif;
  background: linear-gradient(135deg, #1a73e8 0%, #0d5bbf 100%);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  text-align: left;
}

.courses-container thead th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}

.courses-container thead th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}

.courses-container tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark-1);
  vertical-align: middle;
  background: #ffffff;
}

.courses-container tbody tr:nth-child(odd) td {
  background: #f8fafc;
}

.courses-container tbody tr:last-child td {
  border-bottom: none;
}

.courses-container tbody tr:hover td {
  background: #eef2ff;
}

/* ── METRICS (grade summaries) ────────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.metric {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.metric:hover {
  border-color: var(--cyan);
  background: #f0f7ff;
  box-shadow: 0 4px 12px rgba(46, 155, 255, 0.1);
  transform: translateY(-2px);
}

.metric .label {
  font-family: 'Merriweather', serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark-4);
  display: block;
  margin-bottom: 0.5rem;
}

.metric .value {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  color: var(--cyan-dark);
  line-height: 1.2;
}

/* ── GRADE BADGES ───────────────────────────────── */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  font-family: 'Merriweather', serif;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold);
}

.grade-badge.pass {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}

.grade-badge.fail {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red);
}

/* ── GRADE CELLS (exam performance coloring) ────────────────────────── */
.courses-container tbody td.grade-A,
.courses-container tbody td.grade-B,
.courses-container tbody td.grade-C,
.courses-container tbody td.grade-D,
.courses-container tbody td.grade-E,
.courses-container tbody td.grade-F {
  text-align: center;
  vertical-align: middle;
  font-family: 'Merriweather', serif !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
}

.courses-container tbody td.grade-A {
  color: #2c7a4d !important;
  background: rgba(44, 122, 77, 0.12) !important;
}

.courses-container tbody td.grade-B {
  color: #1a73e8 !important;
  background: rgba(26, 115, 232, 0.12) !important;
}

.courses-container tbody td.grade-C {
  color: #d4a017 !important;
  background: rgba(212, 160, 23, 0.12) !important;
}

.courses-container tbody td.grade-D {
  color: #e67e22 !important;
  background: rgba(230, 126, 34, 0.12) !important;
}

.courses-container tbody td.grade-E {
  color: #c0392b !important;
  background: rgba(192, 57, 43, 0.12) !important;
}

.courses-container tbody td.grade-F {
  color: #b91c1c !important;
  background: rgba(185, 28, 28, 0.12) !important;
}

/* ── FINAL SUMMARY SECTION (SIDE-BY-SIDE BOXES) ──────────────── */
.final-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.summary-box {
  background: #ffffff;
  border: 1.5px solid var(--border-light-2);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.summary-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 155, 255, 0.12);
  border-color: var(--cyan-mid);
}

.summary-box .title {
  font-family: 'Merriweather', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark-4);
  margin-bottom: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-box .big-value {
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan-dark);
  line-height: 1.2;
}

.summary-box.grade .big-value {
  color: var(--green);
}

/* ── PRINT STYLES (official report) ───────────────────────────────── */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }

  body::before,
  body::after,
  .bg-slideshow,
  .bg-overlay {
    display: none !important;
  }

  .login-card {
    display: none !important;
  }

  .action-buttons,
  .btn {
    display: none !important;
  }

  .results-card {
    box-shadow: none;
    background: #fff;
    border: 1px solid #ccc;
    padding: 1rem;
  }

  .student-info {
    border: 1px solid #ccc;
  }

  .student-info > div {
    background: #fff !important;
    border-bottom: 1px solid #eee;
  }

  .courses-container thead th {
    background: #1a73e8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .courses-container tbody td {
    background: #fff !important;
  }

  .final-summary {
    break-inside: avoid;
  }

  .summary-box {
    border: 1px solid #ddd;
    background: #fff;
  }
}

/* ── RESPONSIVE ADJUSTMENTS ───────────────────────────────────── */
@media (max-width: 680px) {
  html {
    font-size: 15px;
  }

  body {
    padding: 1rem;
  }

  .login-card {
    padding: 1.5rem 1.2rem;
    border-radius: var(--radius-lg);
    max-width: 100%;
  }

  .results-card {
    padding: 1.2rem 1rem;
    border-radius: var(--radius-lg);
  }

  .logo-box .logo-ring {
    width: 70px;
    height: 70px;
  }

  .logo-box img {
    width: 48px;
    height: 48px;
  }

  .action-buttons {
    gap: 0.6rem;
  }

  .action-buttons .btn {
    min-width: 0;
    flex: 1 1 auto;
  }

  .student-info strong {
    min-width: 85px;
    font-size: 0.55rem;
  }

  .courses-container > * {
    padding: 1rem;
  }

  .courses-container table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .courses-container thead th,
  .courses-container tbody td {
    padding: 0.6rem 0.8rem;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .metric .value {
    font-size: 1.2rem;
  }

  .final-summary {
    gap: 0.8rem;
  }

  .summary-box .big-value {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  body {
    padding: 0.75rem;
  }

  .login-card {
    padding: 1.25rem 1rem;
  }

  .logo-box .logo-ring {
    width: 60px;
    height: 60px;
  }

  .logo-box img {
    width: 42px;
    height: 42px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .final-summary {
    gap: 0.7rem;
  }

  .summary-box .big-value {
    font-size: 1.4rem;
  }
}

@media (max-width: 560px) {
  .student-info > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .attendance-message {
    margin-left: 0;
  }
}

@media (max-height: 550px) and (orientation: landscape) {
  .logo-box .logo-ring {
    width: 50px;
    height: 50px;
  }

  .logo-box img {
    width: 35px;
    height: 35px;
  }

  .logo-box {
    margin-bottom: 0.75rem;
  }

  .field-group {
    margin-top: 0.7rem;
  }

  .btn {
    margin-top: 0.9rem;
    padding: 0.65rem;
  }
}