/* Student portal theme.
   A deliberately distinct identity from the staff app (which is green on a warm
   base): the portal is indigo, with a coloured header band, so students feel they
   are in their own friendly space rather than an internal tool. Only the accent
   and page tints are re-pointed; the shared components (cards, tables, buttons,
   status pills) inherit these tokens and keep working in light and dark. */

.portal-theme {
  --series-1: #4f46e5;
  --series-1-soft: #e6e7fe;
  --series-1-strong: #3730a3;
  --good-text: #047857;
  --page: #f4f5fb;
  --surface-1: #ffffff;
  --raised: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .portal-theme {
    --series-1: #a5b4fc;
    --series-1-soft: #312e81;
    --series-1-strong: #c7d2fe;
    --page: #0b0b12;
    --surface-1: #17171f;
    --raised: #1c1c26;
  }
}

:root[data-theme="dark"] .portal-theme {
  --series-1: #a5b4fc;
  --series-1-soft: #312e81;
  --series-1-strong: #c7d2fe;
  --page: #0b0b12;
  --surface-1: #17171f;
  --raised: #1c1c26;
}

body.portal-theme,
body.auth-body.portal-theme { background: var(--page); }

/* Header band ------------------------------------------------------------- */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(95deg, var(--series-1), var(--series-1-strong));
  color: #fff;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.portal-brand:hover { text-decoration: none; }
.portal-brand img {
  height: 30px;
  width: auto;
  background: #fff;
  border-radius: 6px;
  padding: 3px 5px;
}
.portal-nav { display: flex; align-items: center; gap: 10px; }
.portal-who { color: rgba(255, 255, 255, 0.92); font-size: 13px; }
.portal-nav .btn {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.portal-nav .btn:hover { background: rgba(255, 255, 255, 0.28); }

/* Content ----------------------------------------------------------------- */
.portal-main { max-width: 900px; margin: 0 auto; padding: 28px 20px; }
.portal-main h1 { letter-spacing: -0.01em; }

/* Summary tiles get a soft tinted lift, so the money figures feel approachable. */
.portal-tile {
  flex: 1;
  min-width: 150px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--raised);
}
.portal-tile--accent {
  background: var(--series-1-soft);
  border-color: transparent;
}
.portal-tile__label { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 4px; }
.portal-tile__value { font-size: 22px; font-weight: 700; }

/* Home hub: the landing is a set of equal cards (tuition, supervision, support,
   notifications), so no single area — fees included — dominates the page. */
.portal-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.portal-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: var(--raised);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.portal-card:hover {
  text-decoration: none;
  border-color: var(--series-1);
  transform: translateY(-2px);
}
.portal-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--series-1-soft);
  color: var(--series-1-strong);
  font-size: 20px;
  margin-bottom: 12px;
}
.portal-card__title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.portal-card__meta { font-size: 13px; color: var(--text-secondary); }

/* The portal's auth screens (sign-in, set password) wear the indigo accent too. */
.portal-theme .auth__title { color: var(--series-1-strong); }
