/* ==========================================================================
   NavkarSoft ResultPro - premium academic administration design system
   Navy + white + teal. Hand-built on top of Bootstrap 5 (bundled locally).
   ========================================================================== */

:root {
  --rp-navy-900: #06172e;
  --rp-navy-800: #0b2545;
  --rp-navy-700: #13335c;
  --rp-navy-600: #1c446f;
  --rp-teal-700: #0f766e;
  --rp-teal-600: #0d9488;
  --rp-teal-500: #14b8a6;
  --rp-teal-050: #ecfdf8;
  --rp-ink: #0f172a;
  --rp-ink-soft: #334155;
  --rp-muted: #64748b;
  --rp-line: #e2e8f0;
  --rp-line-strong: #cbd5e1;
  --rp-bg: #f3f6fb;
  --rp-card: #ffffff;
  --rp-ok: #0f766e;
  --rp-ok-bg: #ecfdf5;
  --rp-warn: #b45309;
  --rp-warn-bg: #fffbeb;
  --rp-danger: #b91c1c;
  --rp-danger-bg: #fef2f2;
  --rp-info: #1d4ed8;
  --rp-info-bg: #eff6ff;
  --rp-radius: 14px;
  --rp-radius-sm: 10px;
  --rp-shadow-sm: 0 1px 2px rgba(6, 23, 46, .06), 0 1px 3px rgba(6, 23, 46, .05);
  --rp-shadow-md: 0 14px 34px -22px rgba(6, 23, 46, .45);
  --rp-shadow-lg: 0 28px 60px -32px rgba(6, 23, 46, .5);
  --rp-sidebar: 268px;
  --rp-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--rp-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--rp-ink);
  background: var(--rp-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rp-teal-700); text-decoration: none; }
a:hover { color: var(--rp-navy-800); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { color: var(--rp-navy-800); font-weight: 650; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin-top: 0; }

:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .55);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 2000;
  background: #fff;
  color: var(--rp-navy-800);
  padding: .55rem .9rem;
  border-radius: 8px;
  box-shadow: var(--rp-shadow-md);
}
.skip-link:focus { left: 12px; }

/* ------------------------------- App shell ------------------------------- */
.rp-shell { display: flex; min-height: 100vh; }

.rp-sidebar {
  width: var(--rp-sidebar);
  flex: 0 0 var(--rp-sidebar);
  background:
    radial-gradient(1200px 420px at -10% -10%, rgba(20, 184, 166, .22), transparent 60%),
    linear-gradient(185deg, var(--rp-navy-900), var(--rp-navy-800) 55%, #0a2039);
  color: #dbe6f5;
  padding: 1.15rem .9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 60;
}

.rp-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .25rem .45rem 1rem;
  border-bottom: 1px solid rgba(219, 230, 245, .12);
  margin-bottom: .8rem;
  color: #fff;
  text-decoration: none;
}
.rp-brand:hover { color: #fff; text-decoration: none; }
.rp-brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--rp-teal-500), var(--rp-teal-700));
  color: #062a26; font-weight: 800; font-size: 1rem; letter-spacing: -.03em;
  box-shadow: 0 8px 18px -10px rgba(20, 184, 166, .85);
  overflow: hidden;
}
.rp-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.rp-brand-text { min-width: 0; }
.rp-brand-name { font-weight: 700; font-size: .98rem; line-height: 1.2; color: #fff; }
.rp-brand-sub { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: #8fb0d4; }

.rp-nav-label {
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #7c9ac0;
  padding: 1rem .65rem .35rem;
}

.rp-nav { display: flex; flex-direction: column; gap: 2px; }
.rp-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .58rem .7rem;
  border-radius: 9px;
  color: #c9d8ea;
  font-size: .91rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.rp-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.rp-nav a.is-active {
  background: rgba(20, 184, 166, .16);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--rp-teal-500);
}
.rp-nav a.is-active svg { color: var(--rp-teal-500); }
.rp-nav a.is-disabled { opacity: .55; cursor: not-allowed; }
.rp-nav svg { width: 18px; height: 18px; flex: 0 0 18px; color: #93aecb; }
.rp-nav .rp-nav-badge {
  margin-left: auto;
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .1);
  color: #d6e4f3;
  border-radius: 999px;
  padding: .12rem .42rem;
}

.rp-sidebar-foot {
  margin-top: auto;
  padding: .9rem .5rem 0;
  border-top: 1px solid rgba(219, 230, 245, .12);
  font-size: .74rem;
  color: #93aecb;
}
.rp-sidebar-foot a { color: #cfe1f4; }

.rp-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.rp-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem 1.4rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rp-line);
}
.rp-topbar-title { min-width: 0; }
.rp-topbar-title .rp-eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-muted); }
.rp-topbar-title h1 { margin: 0; font-size: 1.18rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.rp-icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--rp-line);
  background: #fff;
  color: var(--rp-navy-700);
  display: inline-grid; place-items: center;
  cursor: pointer;
}
.rp-icon-btn:hover { background: #f8fafc; }
.rp-sidebar-toggle { display: none; }

.rp-user {
  display: flex; align-items: center; gap: .55rem;
  padding: .25rem .4rem .25rem .3rem;
  border-radius: 999px;
  border: 1px solid var(--rp-line);
  background: #fff;
}
.rp-user-meta { line-height: 1.15; }
.rp-user-name { font-size: .84rem; font-weight: 650; color: var(--rp-navy-800); }
.rp-user-role { font-size: .7rem; color: var(--rp-muted); }
.rp-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #d7f5ef, #b7e8de);
  color: #0b4f47; font-weight: 700; font-size: .8rem;
  overflow: hidden; flex: 0 0 34px;
}
.rp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rp-avatar-lg { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.2rem; }

.rp-content { padding: 1.35rem 1.4rem 2.2rem; width: 100%; max-width: 1440px; }
.rp-footer {
  margin-top: auto;
  border-top: 1px solid var(--rp-line);
  padding: .9rem 1.4rem;
  font-size: .78rem;
  color: var(--rp-muted);
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
}

.rp-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6, 23, 46, .55);
  z-index: 55;
}

/* -------------------------------- Cards --------------------------------- */
.rp-card {
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-radius);
  box-shadow: var(--rp-shadow-sm);
}
.rp-card + .rp-card { margin-top: 1rem; }
.rp-card-head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--rp-line);
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.rp-card-head h2, .rp-card-head h3 { margin: 0; font-size: 1rem; }
.rp-card-head .rp-card-actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.rp-card-body { padding: 1.15rem; }
.rp-card-body.tight { padding: .85rem 1.15rem; }
.rp-card-foot { padding: .8rem 1.15rem; border-top: 1px solid var(--rp-line); background: #fbfcfe; border-radius: 0 0 var(--rp-radius) var(--rp-radius); }

.rp-page-head { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: 1.1rem; }
.rp-page-head .rp-page-head-text { min-width: 0; }
.rp-page-head h1 { margin-bottom: .2rem; }
.rp-page-head p { color: var(--rp-muted); margin: 0; max-width: 68ch; font-size: .92rem; }
.rp-page-head .rp-page-head-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.rp-eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-teal-700); font-weight: 700; }

/* ------------------------------- Stat cards ------------------------------ */
.rp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.rp-stat {
  position: relative;
  background: #fff;
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--rp-shadow-sm);
  min-height: 108px;
  display: flex; flex-direction: column; gap: .3rem;
  overflow: hidden;
}
.rp-stat::after {
  content: ""; position: absolute; inset: auto .9rem 0 .9rem; height: 3px;
  border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--rp-teal-500), var(--rp-teal-700));
  opacity: .65;
}
.rp-stat-label { font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--rp-muted); font-weight: 600; }
.rp-stat-value { font-size: 1.85rem; font-weight: 750; color: var(--rp-navy-800); line-height: 1.1; letter-spacing: -.02em; }
.rp-stat-note { font-size: .78rem; color: var(--rp-muted); margin-top: auto; }
.rp-stat-icon {
  position: absolute; top: .85rem; right: .9rem;
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--rp-teal-050); color: var(--rp-teal-700);
}
.rp-stat-icon svg { width: 18px; height: 18px; }
.rp-stat.is-warn .rp-stat-value { color: var(--rp-warn); }
.rp-stat.is-danger .rp-stat-value { color: var(--rp-danger); }

/* -------------------------------- Badges -------------------------------- */
.rp-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .74rem; font-weight: 650; letter-spacing: .015em;
  padding: .22rem .55rem; border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.rp-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.rp-badge.no-dot::before { display: none; }
.rp-badge.is-ok { background: var(--rp-ok-bg); color: var(--rp-ok); border-color: #b9ece1; }
.rp-badge.is-warn { background: var(--rp-warn-bg); color: var(--rp-warn); border-color: #fde68a; }
.rp-badge.is-danger { background: var(--rp-danger-bg); color: var(--rp-danger); border-color: #fecaca; }
.rp-badge.is-info { background: var(--rp-info-bg); color: var(--rp-info); border-color: #bfdbfe; }
.rp-badge.is-muted { background: #f1f5f9; color: #475569; border-color: var(--rp-line); }
.rp-badge.is-navy { background: #e8eef7; color: var(--rp-navy-800); border-color: #cfdcee; }

/* -------------------------------- Buttons -------------------------------- */
.btn {
  --bs-btn-border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  padding: .52rem .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.btn svg { width: 16px; height: 16px; }
.btn-navy { background: var(--rp-navy-800); border-color: var(--rp-navy-800); color: #fff; }
.btn-navy:hover, .btn-navy:focus { background: var(--rp-navy-700); border-color: var(--rp-navy-700); color: #fff; }
.btn-teal { background: var(--rp-teal-700); border-color: var(--rp-teal-700); color: #fff; }
.btn-teal:hover, .btn-teal:focus { background: #0b645e; border-color: #0b645e; color: #fff; }
.btn-outline-navy { border: 1px solid var(--rp-line-strong); color: var(--rp-navy-800); background: #fff; }
.btn-outline-navy:hover { background: #f6f9fd; color: var(--rp-navy-800); border-color: #b6c7dc; }
.btn-soft-danger { background: var(--rp-danger-bg); color: var(--rp-danger); border: 1px solid #fecaca; }
.btn-soft-danger:hover { background: #fee2e2; color: var(--rp-danger); }
.btn-soft-success { background: var(--rp-ok-bg); color: var(--rp-ok); border: 1px solid #b9ece1; }
.btn-soft-success:hover { background: #d9f8ef; color: var(--rp-ok); }
.btn-sm { padding: .34rem .65rem; font-size: .8rem; border-radius: 8px; }
.btn-link { color: var(--rp-teal-700); text-decoration: none; font-weight: 600; }

/* --------------------------------- Forms --------------------------------- */
.rp-form .form-label { font-size: .84rem; font-weight: 650; color: var(--rp-ink-soft); margin-bottom: .3rem; }
.rp-form .form-label .req { color: var(--rp-danger); margin-left: .15rem; }
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid var(--rp-line-strong);
  padding: .55rem .7rem;
  font-size: .92rem;
  color: var(--rp-ink);
  background-color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rp-teal-600);
  box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .14);
}
.form-text { font-size: .78rem; color: var(--rp-muted); }
.invalid-feedback { display: block; font-size: .78rem; }
.rp-field-error { color: var(--rp-danger); font-size: .78rem; margin-top: .25rem; }
.rp-form-section + .rp-form-section { margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px dashed var(--rp-line); }
.rp-form-section h3 { font-size: .92rem; margin-bottom: .75rem; color: var(--rp-navy-700); }
.form-check-input:checked { background-color: var(--rp-teal-700); border-color: var(--rp-teal-700); }
.rp-input-group { position: relative; }
.rp-input-group .rp-reveal {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--rp-muted);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .3rem .4rem; cursor: pointer;
}

/* -------------------------------- Tables --------------------------------- */
.rp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.rp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.rp-table thead th {
  text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--rp-muted); font-weight: 700;
  padding: .7rem .9rem; background: #f8fafc;
  border-bottom: 1px solid var(--rp-line);
  white-space: nowrap;
}
.rp-table tbody td { padding: .75rem .9rem; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.rp-table tbody tr:hover { background: #fbfdff; }
.rp-table .rp-cell-main { font-weight: 600; color: var(--rp-navy-800); }
.rp-table .rp-cell-sub { font-size: .78rem; color: var(--rp-muted); }
.rp-table .rp-row-actions { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.rp-table .rp-row-actions form { display: inline; }
.rp-table-empty { padding: 2rem 1rem; text-align: center; color: var(--rp-muted); }

/* ------------------------------ Alerts/banner ---------------------------- */
.rp-alert {
  display: flex; gap: .75rem; align-items: flex-start;
  border-radius: 12px; padding: .8rem .95rem;
  border: 1px solid var(--rp-line);
  background: #fff; font-size: .88rem;
  margin-bottom: 1rem;
}
.rp-alert svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .12rem; }
.rp-alert.is-success { background: var(--rp-ok-bg); border-color: #b9ece1; color: #065f56; }
.rp-alert.is-error { background: var(--rp-danger-bg); border-color: #fecaca; color: #991b1b; }
.rp-alert.is-warning { background: var(--rp-warn-bg); border-color: #fde68a; color: #92400e; }
.rp-alert.is-info { background: var(--rp-info-bg); border-color: #bfdbfe; color: #1e40af; }
.rp-alert .rp-alert-body { flex: 1; min-width: 0; }
.rp-alert strong { display: block; margin-bottom: .15rem; }

.rp-license-banner {
  border-radius: var(--rp-radius);
  padding: .95rem 1.1rem;
  display: flex; gap: .9rem; align-items: flex-start;
  margin-bottom: 1.1rem;
  border: 1px solid;
  box-shadow: var(--rp-shadow-sm);
}
.rp-license-banner > svg { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.rp-license-banner .rp-license-actions svg { width: 16px; height: 16px; }
.rp-license-banner h3 { font-size: .95rem; margin-bottom: .2rem; }
.rp-license-banner p { margin: 0; font-size: .86rem; }
.rp-license-banner .rp-license-actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.rp-license-banner.is-warn { background: var(--rp-warn-bg); border-color: #fcd34d; color: #78350f; }
.rp-license-banner.is-danger { background: var(--rp-danger-bg); border-color: #fca5a5; color: #7f1d1d; }
.rp-license-banner.is-info { background: var(--rp-info-bg); border-color: #93c5fd; color: #1e3a8a; }
.rp-license-banner.is-ok { background: var(--rp-ok-bg); border-color: #99e6d8; color: #065f56; }

/* -------------------------------- Checklist ------------------------------ */
.rp-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.rp-checklist li { display: flex; align-items: flex-start; gap: .6rem; font-size: .89rem; }
.rp-check-mark {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: #f1f5f9; color: #64748b; border: 1px solid var(--rp-line);
}
.rp-check-mark.is-done { background: var(--rp-ok-bg); color: var(--rp-ok); border-color: #a7e8d8; }
.rp-checklist a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(15, 23, 42, .18); }

/* -------------------------------- Progress ------------------------------- */
.rp-progress { height: 8px; border-radius: 999px; background: #e9eff7; overflow: hidden; }
.rp-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--rp-teal-600), var(--rp-teal-500)); border-radius: inherit; }

/* ------------------------------- Empty state ----------------------------- */
.rp-empty {
  text-align: center;
  padding: 2.4rem 1.2rem;
  border: 1px dashed var(--rp-line-strong);
  border-radius: var(--rp-radius);
  background: #fbfdff;
  color: var(--rp-muted);
}
.rp-empty svg { width: 42px; height: 42px; color: #a9bcd3; margin-bottom: .6rem; }
.rp-empty h3 { color: var(--rp-navy-700); font-size: .98rem; margin-bottom: .3rem; }
.rp-empty p { margin: 0 auto; max-width: 52ch; font-size: .87rem; }

/* -------------------------------- Upcoming ------------------------------- */
.rp-upcoming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.rp-upcoming-item {
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  padding: .7rem .8rem;
  background: #fbfdff;
  display: flex; gap: .55rem; align-items: flex-start;
}
.rp-upcoming-item .rp-upcoming-label { font-size: .84rem; font-weight: 600; color: var(--rp-ink-soft); }
.rp-upcoming-item .rp-upcoming-meta { font-size: .72rem; color: var(--rp-muted); }
.rp-lock { width: 16px; height: 16px; color: #94a3b8; flex: 0 0 16px; margin-top: .15rem; }
.rp-lock.is-open { color: var(--rp-teal-600); }

/* ------------------------------- Credentials ----------------------------- */
.rp-credential {
  background: linear-gradient(160deg, #f8fbff, #eef7f5);
  border: 1px solid #cfe6e1;
  border-radius: 12px;
  padding: 1rem;
}
.rp-credential dl { display: grid; grid-template-columns: 130px 1fr; gap: .45rem .9rem; margin: 0; font-size: .9rem; }
.rp-credential dt { color: var(--rp-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.rp-credential dd { margin: 0; font-weight: 650; color: var(--rp-navy-800); word-break: break-word; }
.rp-credential .rp-pass { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1rem; letter-spacing: .04em; background: #fff; border: 1px dashed #a9d8cf; border-radius: 8px; padding: .18rem .45rem; display: inline-block; }

/* --------------------------------- Auth ---------------------------------- */
.rp-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.rp-auth-visual {
  background:
    radial-gradient(900px 420px at 80% 0%, rgba(20, 184, 166, .3), transparent 55%),
    radial-gradient(600px 320px at 0% 100%, rgba(29, 78, 216, .22), transparent 60%),
    linear-gradient(160deg, var(--rp-navy-900), var(--rp-navy-800) 60%, #0c2b4d);
  color: #e6eefb;
  padding: 3rem 3rem 2.4rem;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.rp-auth-visual::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000 30%, transparent 75%);
  pointer-events: none;
}
.rp-auth-visual > * { position: relative; z-index: 1; }
.rp-auth-visual h1 { color: #fff; font-size: 2rem; line-height: 1.2; margin-top: 2.6rem; max-width: 24ch; }
.rp-auth-visual p { color: #b9cfe7; max-width: 46ch; font-size: .95rem; }
.rp-auth-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .7rem; }
.rp-auth-points li { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: #d2e2f4; }
.rp-auth-points svg { width: 17px; height: 17px; color: var(--rp-teal-500); flex: 0 0 17px; margin-top: .15rem; }
.rp-auth-foot { margin-top: auto; font-size: .78rem; color: #93aecb; padding-top: 2rem; }
.rp-auth-form { display: flex; align-items: center; justify-content: center; padding: 2.2rem 1.4rem; background: #fff; }
.rp-auth-card { width: 100%; max-width: 404px; }
.rp-auth-card h1 { font-size: 1.5rem; }
.rp-auth-card .rp-muted { color: var(--rp-muted); font-size: .9rem; }
.rp-auth-logo { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.6rem; }
.rp-auth-logo .rp-brand-mark { width: 44px; height: 44px; }
.rp-auth-logo .rp-brand-name { color: var(--rp-navy-800); }
.rp-auth-logo .rp-brand-sub { color: var(--rp-muted); }
.rp-auth-help { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--rp-line); font-size: .82rem; color: var(--rp-muted); }

/* ------------------------------ Public site ------------------------------ */
.rp-public { background: #f7fafd; min-height: 100vh; display: flex; flex-direction: column; }
.rp-public-head {
  background: linear-gradient(120deg, var(--rp-navy-900), var(--rp-navy-800) 62%, #0d3357);
  color: #fff;
  padding: 0;
  border-bottom: 3px solid var(--rp-teal-600);
}
.rp-public-head-inner { max-width: 1180px; margin: 0 auto; padding: 1.2rem 1.4rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rp-public-brand { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.rp-public-brand .rp-brand-mark { background: #fff; color: var(--rp-navy-800); }
.rp-public-brand-text { min-width: 0; }
.rp-public-brand-text strong { display: block; font-size: 1.02rem; line-height: 1.25; }
.rp-public-brand-text span { font-size: .76rem; color: #a9c3de; letter-spacing: .06em; text-transform: uppercase; }
.rp-public-head-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rp-lang-switch { display: inline-flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; }
.rp-lang-switch a { color: #d8e6f5; padding: .3rem .7rem; font-size: .78rem; font-weight: 600; text-decoration: none; }
.rp-lang-switch a.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
.rp-public-main { flex: 1; }
.rp-public-hero { max-width: 1180px; margin: 0 auto; padding: 2rem 1.4rem 0.4rem; }
.rp-public-hero h1 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); margin-bottom: .3rem; }
.rp-public-hero p { color: var(--rp-muted); max-width: 70ch; }
.rp-public-grid { max-width: 1180px; margin: 0 auto; padding: 1.2rem 1.4rem 2.6rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.rp-public-foot { border-top: 1px solid var(--rp-line); background: #fff; padding: 1rem 1.4rem; font-size: .8rem; color: var(--rp-muted); }
.rp-public-foot-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.rp-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rp-feed li { display: flex; gap: .75rem; align-items: center; border: 1px solid var(--rp-line); border-radius: 10px; padding: .65rem .8rem; background: #fbfdff; }
.rp-feed .rp-feed-icon { width: 34px; height: 34px; border-radius: 9px; background: #eaf4f2; color: var(--rp-teal-700); display: grid; place-items: center; flex: 0 0 34px; }
.rp-feed .rp-feed-title { font-weight: 600; font-size: .9rem; color: var(--rp-navy-800); }
.rp-feed .rp-feed-meta { font-size: .76rem; color: var(--rp-muted); }

/* --------------------------------- Setup --------------------------------- */
.rp-setup { background: #f3f6fb; min-height: 100vh; padding: 2rem 1.2rem 3rem; }
.rp-setup-shell { max-width: 1020px; margin: 0 auto; }
.rp-setup-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; }
.rp-setup-head h1 { margin: 0; font-size: 1.4rem; }
.rp-setup-head p { margin: 0; color: var(--rp-muted); font-size: .9rem; }
.rp-req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .45rem; }
.rp-req { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; padding: .45rem .55rem; border: 1px solid var(--rp-line); border-radius: 8px; background: #fff; }
.rp-req .rp-req-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: .38rem; flex: 0 0 8px; background: #cbd5e1; }
.rp-req.is-ok .rp-req-dot { background: var(--rp-teal-600); }
.rp-req.is-fail .rp-req-dot { background: var(--rp-danger); }
.rp-req .rp-req-detail { color: var(--rp-muted); font-size: .74rem; display: block; }

/* ------------------------------- Utilities ------------------------------- */
.rp-muted { color: var(--rp-muted); }
.rp-small { font-size: .82rem; }
.rp-xs { font-size: .75rem; }
.rp-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; }
.rp-strong { font-weight: 650; color: var(--rp-navy-800); }
.rp-divider { height: 1px; background: var(--rp-line); margin: 1rem 0; }
.rp-inline { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rp-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.rp-stack { display: grid; gap: .8rem; }
.rp-wrap-anywhere { overflow-wrap: anywhere; }
.rp-nowrap { white-space: nowrap; }
.rp-hidden { display: none !important; }
.rp-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.rp-chart { width: 100%; min-height: 220px; }
.rp-skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f7fafd 37%, #eef2f7 63%); background-size: 400% 100%; animation: rp-shimmer 1.3s ease infinite; border-radius: 8px; height: 14px; }
@keyframes rp-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.rp-offline-pill {
  display: none; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: 999px;
  background: var(--rp-warn-bg); color: var(--rp-warn); border: 1px solid #fde68a;
}
body.is-offline .rp-offline-pill { display: inline-flex; }

.rp-pagination { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.rp-pagination a, .rp-pagination span {
  min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--rp-line);
  display: inline-grid; place-items: center; padding: 0 .55rem;
  color: var(--rp-ink-soft); font-size: .84rem; background: #fff; text-decoration: none;
}
.rp-pagination a:hover { border-color: var(--rp-teal-600); color: var(--rp-teal-700); text-decoration: none; }
.rp-pagination .is-current { background: var(--rp-navy-800); color: #fff; border-color: var(--rp-navy-800); }

/* ------------------------------- Responsive ------------------------------ */
@media (max-width: 1199.98px) {
  .rp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-public-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
  .rp-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: var(--rp-shadow-lg);
    height: 100dvh;
  }
  body.rp-nav-open .rp-sidebar { transform: translateX(0); }
  body.rp-nav-open .rp-sidebar-overlay { display: block; }
  .rp-sidebar-toggle { display: inline-grid; }
  .rp-content { padding: 1.1rem 1rem 2rem; }
  .rp-topbar { padding: .7rem 1rem; }
  .rp-auth { grid-template-columns: 1fr; }
  .rp-auth-visual { display: none; }
  .rp-auth-form { min-height: 100vh; }
  .rp-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  h1 { font-size: 1.32rem; }
  .rp-stats { grid-template-columns: 1fr; }
  .rp-topbar-title .rp-eyebrow { display: none; }
  .rp-user-meta { display: none; }
  .rp-grid-2 { grid-template-columns: 1fr; }
  .rp-page-head .rp-page-head-actions { margin-left: 0; width: 100%; }
  .rp-card-head { padding: .85rem .9rem; }
  .rp-card-body { padding: .95rem; }
  .rp-credential dl { grid-template-columns: 1fr; gap: .15rem; }
  .rp-credential dd { margin-bottom: .5rem; }
  .rp-public-head-inner { padding: 1rem; }
  .rp-public-head-actions { width: 100%; margin-left: 0; }
  .rp-public-grid { padding: .9rem .9rem 2rem; }
  .rp-public-hero { padding: 1.4rem .9rem .2rem; }
  .rp-setup { padding: 1.1rem .8rem 2.4rem; }
  .rp-license-banner { flex-direction: column; }
  .rp-license-banner .rp-license-actions { margin-left: 0; }
  .rp-topbar-actions .rp-language-form { display: none; }
}

@media (max-width: 420px) {
  body { font-size: 14.5px; }
  .rp-stat-value { font-size: 1.6rem; }
  .rp-table { font-size: .84rem; }
  .rp-table thead th, .rp-table tbody td { padding: .6rem .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .rp-sidebar, .rp-topbar, .rp-footer, .rp-license-banner, .rp-page-head-actions, .btn { display: none !important; }
  .rp-content { padding: 0; }
  .rp-card { box-shadow: none; border-color: #ccc; }
  body { background: #fff; }
}

/* ==========================================================================
   Phase 2 - academic management, students and assignments
   Shares the Phase 1 navy / white / teal design tokens.
   ========================================================================== */

.req { color: #b91c1c; }

.rp-session-switch {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .45rem .2rem .55rem;
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  background: #fff;
}
.rp-session-switch label { margin: 0; white-space: nowrap; }
.rp-session-switch .form-select {
  border: 0;
  background-color: transparent;
  padding-top: .15rem;
  padding-bottom: .15rem;
  min-width: 140px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--rp-navy, #0b2545);
}
.rp-session-switch .form-select:focus { box-shadow: none; }

.rp-filterbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .85rem 1.1rem;
  background: #fff;
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-radius, 14px);
  margin-bottom: 1rem;
}
.rp-filterbar .form-control,
.rp-filterbar .form-select { min-width: 132px; }
.rp-filterbar-search { flex: 1 1 220px; min-width: 180px; }
.rp-filterbar-search .form-control { width: 100%; min-width: 0; }
.rp-filterbar-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rp-muted);
  font-weight: 700;
}
.rp-filterbar-status { margin-left: auto; font-size: .75rem; color: var(--rp-muted); }

.rp-stat-link { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.rp-stat-link:hover,
.rp-stat-link:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11, 37, 69, .12); color: inherit; }
.rp-stat.is-warn .rp-stat-value { color: #b45309; }

.rp-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.rp-chip-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.rp-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: #eef6f5;
  border: 1px solid #cfe7e4;
  color: #0f5c56;
  font-size: .78rem;
  font-weight: 600;
}
.rp-chip.is-warn { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.rp-chip.is-muted { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }

.rp-roll {
  display: inline-block;
  font-family: var(--rp-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .82rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 6px;
  background: #eef2f7;
  color: #0b2545;
}

.rp-avatar-sm { width: 30px; height: 30px; font-size: .68rem; }

.rp-details { border-top: 1px dashed var(--rp-line); margin-top: .4rem; }
.rp-details summary {
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  color: var(--rp-teal, #0f766e);
  padding: .35rem 0;
  list-style: none;
}
.rp-details summary::-webkit-details-marker { display: none; }
.rp-details summary::before { content: '+ '; font-weight: 700; }
.rp-details[open] summary::before { content: '– '; }
.rp-details-form { padding: .2rem 0 .6rem; min-width: 230px; }

.rp-form-title {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rp-muted);
  font-weight: 700;
  margin: 0 0 .2rem;
}

.rp-subject-picker {
  margin-top: 1rem;
  padding: .9rem;
  border: 1px solid var(--rp-line);
  border-radius: 12px;
  background: #f8fafc;
}
.rp-subject-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}
.rp-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .25rem .8rem;
  max-height: 260px;
  overflow: auto;
}
.rp-checkbox { display: flex; align-items: center; gap: .4rem; font-size: .85rem; margin: 0; }
.rp-checkbox input { margin: 0; }

.rp-student-photo,
.rp-photo-preview {
  display: inline-flex;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid var(--rp-line);
  align-items: center;
  justify-content: center;
}
.rp-student-photo img,
.rp-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.rp-photo-preview { margin-top: .5rem; }

.rp-table-compact td,
.rp-table-compact th { padding: .5rem .6rem; font-size: .84rem; }
.rp-table .is-invalid-row td { background: #fff7ed; }
.rp-error-list { margin: 0; padding-left: 1rem; font-size: .75rem; color: #b91c1c; }
.rp-error-list li { margin: 0; }

.rp-import-steps { margin: 0; padding-left: 1.1rem; font-size: .85rem; color: var(--rp-muted); }
.rp-import-steps li { margin-bottom: .3rem; }

@media (max-width: 767.98px) {
  .rp-session-switch { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .rp-session-switch .form-select { flex: 1; min-width: 0; }
  .rp-filterbar { padding: .7rem .8rem; gap: .4rem; }
  .rp-filterbar .form-control,
  .rp-filterbar .form-select { min-width: 0; flex: 1 1 130px; }
  .rp-filterbar-status { margin-left: 0; flex: 1 1 100%; }
  .rp-checkbox-grid { grid-template-columns: 1fr; }
  .rp-table-compact { font-size: .8rem; }
}

@media (max-width: 767.98px) {
  .rp-topbar { flex-wrap: wrap; row-gap: .5rem; }
  .rp-topbar-title { flex: 1 1 60%; }
  .rp-topbar-actions { width: 100%; margin-left: 0; flex-wrap: wrap; row-gap: .5rem; }
  .rp-session-switch { order: -1; flex: 1 1 100%; }
  .rp-session-switch .form-select { flex: 1; min-width: 0; text-align: left; }
}

/* ---------------- Phase 3: examinations, marks and results ---------------- */
.rp-field { display: flex; flex-direction: column; gap: .3rem; }
.rp-field > label { font-size: .82rem; font-weight: 600; color: var(--rp-navy-700); }
.rp-form-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.rp-num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-marks-card { padding: 0; }
.rp-marks-toolbar {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .7rem .9rem; border-bottom: 1px solid var(--rp-line);
  position: sticky; top: 0; z-index: 3; background: #fff;
}
.rp-marks-search { flex: 1 1 200px; max-width: 420px; }
.rp-marks-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 100%; margin-left: 0; }
.rp-marks-wrap { max-height: 68vh; overflow: auto; }
.rp-marks-table thead th { position: sticky; top: 0; z-index: 2; background: #f4f7fb; }
.rp-mark-input { width: 78px; text-align: right; font-variant-numeric: tabular-nums; }
.rp-mark-input.is-invalid { border-color: var(--rp-danger); background: #fff5f5; }
.rp-marks-table td, .rp-marks-table th { padding: .4rem .55rem; }
.rp-marks-table tbody tr[data-status="approved"] { background: #f6fdf9; }
.rp-marks-table tbody tr[data-status="returned"] { background: #fffdf3; }

.rp-marksheet { padding: 1.2rem 1.4rem; }
.rp-marksheet-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--rp-navy-800); padding-bottom: .8rem; }
.rp-marksheet-head h2 { margin: 0; font-size: 1.25rem; color: var(--rp-navy-800); }
.rp-marksheet-logo { width: 56px; height: 56px; object-fit: contain; }
.rp-marksheet-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; padding: .9rem 0; }
.rp-marksheet-meta div { display: flex; flex-direction: column; gap: .15rem; }
.rp-marksheet-table tfoot th { border-top: 2px solid var(--rp-navy-800); font-size: .9rem; }
.rp-marksheet-summary { display: flex; flex-wrap: wrap; gap: 1.4rem; padding: .9rem 0; border-top: 1px solid var(--rp-line); }
.rp-marksheet-summary div { display: flex; flex-direction: column; gap: .1rem; }
.rp-marksheet-summary strong { font-size: 1.05rem; color: var(--rp-navy-800); }

@media (max-width: 575.98px) {
  .rp-col-total, .rp-col-status { display: none; }
  .rp-marks-table th, .rp-marks-table td { padding: .3rem .3rem; }
  .rp-marks-table .rp-cell-main { font-size: .82rem; }
  .rp-mark-input { width: 46px; padding: .25rem .3rem; }
  .rp-marks-table { table-layout: fixed; width: 100%; }
  .rp-marks-table td:nth-child(2) { max-width: 150px; }
  .rp-marks-table .rp-cell-main { overflow-wrap: anywhere; }
  .rp-roll { font-size: .68rem; padding: .1rem .3rem; }
}

@media (max-width: 767.98px) {
  .rp-marks-toolbar { position: static; }
  .rp-marks-actions { width: 100%; margin-left: 0; }
  .rp-mark-input { width: 60px; padding: .3rem .35rem; }
  .rp-marks-table thead th, .rp-marks-table td { padding: .3rem .35rem; font-size: .8rem; }
  .rp-marks-table .rp-cell-sub { display: none; }
  .rp-marksheet-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-marksheet { padding: .9rem; }
}

@media print {
  .rp-sidebar, .rp-topbar, .no-print, .rp-page-head-actions, .rp-alert { display: none !important; }
  .rp-main, .rp-content { margin: 0 !important; padding: 0 !important; }
  .rp-card { box-shadow: none !important; border: 0 !important; }
  .rp-marksheet { padding: 0; }
}
