/* Pathway Student Portal (PHP conversion) — shared stylesheet.
   Plain CSS, no framework/build step — deliberately mirrors the original
   Next.js app's approach (globals.css, no CSS framework) so nothing new
   needed to be introduced for this conversion either. */

:root {
  --brand: #0f4c81;
  --brand-dark: #0a3559;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #e0e4ea;
  --text: #1a2433;
  --muted: #6b7686;
  --danger: #c0392b;
  --success: #1e8e5a;
  --warning: #b8860b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.centered-page {
  max-width: 460px;
  margin: 60px auto;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.centered-page h1 { margin-top: 0; font-size: 22px; }
.centered-page.wide { max-width: 720px; }

.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 56px 1fr;
  min-height: 100vh;
}
.sidenav {
  grid-row: 1 / span 2;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}
.sidenav .brand {
  padding: 0 16px 16px;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidenav .brand a { color: #fff; }
.nav-links { list-style: none; margin: 0; padding: 0; flex: 1; }
.nav-links li a {
  display: block;
  padding: 10px 16px;
  color: #d7e3f0;
  font-size: 14px;
}
.nav-links li a.active, .nav-links li a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}
.nav-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 13px; }
.nav-user { color: #b9c8db; margin-bottom: 6px; word-break: break-all; }
.btn-link { color: #fff; }

.topbar {
  grid-column: 2;
  grid-row: 1;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.topbar-title { font-weight: 600; font-size: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Language + currency switchers (see public/partials/header.php) — added
   for the final handover's "add the option to translate the view" /
   currency-filter request. */
.lang-switcher { display: flex; gap: 4px; }
.lang-chip {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}
.lang-chip:hover { border-color: var(--border); }
.lang-chip.active { color: var(--brand); background: #eef3f8; border-color: var(--border); font-weight: 600; }
.currency-switcher select { padding: 5px 8px; font-size: 12px; }

/* RTL (Arabic) — a deliberately light-touch mirror, not a redesign: the
   browser's own bidi handling does most of the work once `dir="rtl"` is
   set on <html> (see header.php); this just fixes the few places this
   stylesheet hard-codes a physical left/right value that would otherwise
   look wrong mirrored (the fixed sidebar, and left-aligned progress/
   badge rows). Every other rule in this file already uses non-directional
   properties (margin/padding shorthand, flexbox with no explicit
   left/right) and needs no RTL-specific override. */
/* CSS Grid mirrors its own column order automatically once the grid
   container's `direction` is rtl (column 1 — the sidenav's 220px track —
   becomes the rightmost track, column 2 the leftmost) — so this is the
   only override actually needed; no grid-column reassignment. */
html[dir="rtl"] .app-shell { direction: rtl; }
html[dir="rtl"] .month-chip { direction: ltr; display: inline-block; } /* month labels stay LTR-readable */

.fee-original { font-weight: 500; }
.fee-converted { font-size: 0.92em; }

.app-main { grid-column: 2; grid-row: 2; padding: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 17px; }
.card h3 { font-size: 15px; margin: 16px 0 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.btn-secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.btn-danger { background: var(--danger); }
.btn.btn-small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2; }
.alert-success { background: #e9f7ef; color: var(--success); border: 1px solid #bfe6cf; }
.alert-info { background: #e8f1fb; color: #0f4c81; border: 1px solid #bcd3ee; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table th, table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 100px; font-size: 11.5px; font-weight: 600; }
.badge-complete, .badge-approved, .badge-published { background: #e9f7ef; color: var(--success); }
.badge-incomplete, .badge-required, .badge-draft { background: #fdf3e3; color: var(--warning); }
.badge-rejected, .badge-unpublished { background: #fdecea; color: var(--danger); }
.badge-neutral { background: #eef1f5; color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 7px 0; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 8px; }
.checklist li:last-child { border-bottom: none; }
.checklist .tick { font-weight: 700; }
.checklist .tick.yes { color: var(--success); }
.checklist .tick.no { color: var(--danger); }

.progress-bar { height: 8px; background: var(--border); border-radius: 100px; overflow: hidden; margin: 6px 0 2px; }
.progress-bar > div { height: 100%; background: var(--brand); }

.month-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 8px 0 16px; }
@media (max-width: 700px) { .month-grid { grid-template-columns: repeat(3, 1fr); } }
.month-chip {
  text-align: center;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  color: var(--text);
}
.month-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.programme-list { display: flex; flex-direction: column; gap: 10px; }
.programme-row { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.programme-row .meta { color: var(--muted); font-size: 13px; }
.empty-state { color: var(--muted); font-size: 14px; padding: 24px 0; text-align: center; }

.doc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.doc-row:last-child { border-bottom: none; }

/* --- Notification bell --- */
.notif-bell-wrap { position: relative; display: inline-block; }
.notif-bell-btn {
  background: none; border: none; cursor: pointer; font-size: 20px; color: inherit;
  position: relative; padding: 4px 8px;
}
.notif-badge {
  position: absolute; top: -2px; right: 0; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 100px; padding: 1px 5px; min-width: 16px; text-align: center;
}
.notif-dropdown {
  position: absolute; right: 0; top: 34px; width: 340px; max-height: 420px; overflow-y: auto;
  background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 100; display: none;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.notif-dropdown-header button { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 12px; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #eef5ff; }
.notif-item .notif-title { font-weight: 600; margin-bottom: 2px; }
.notif-item .notif-time { color: var(--muted); font-size: 11px; margin-top: 4px; }
.notif-empty { padding: 20px 14px; color: var(--muted); font-size: 13px; text-align: center; }

form.inline { display: inline; }
.helper-text { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* --- Programme detail page: fee breakdown (2026-10-16) --- */
.fd-meta { color: var(--muted); font-size: 13px; }
.fd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.fd-kpis.fd-two { grid-template-columns: repeat(2, 1fr); }
.fd-kpi { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #f9fbfd; }
.fd-kpi .fd-l { font-size: 12px; color: var(--muted); }
.fd-kpi .fd-v { font-size: 18px; font-weight: 700; margin-top: 2px; }
.fd-kpi.fd-hi { background: var(--brand); border-color: var(--brand); color: #fff; }
.fd-kpi.fd-hi .fd-l { color: #cfe0f1; }
.fd-box { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.fd-box h3 { margin: 0 0 8px; font-size: 14px; }
.fd-table td { padding: 6px 0; border-bottom: 1px solid #eef1f5; font-size: 13px; vertical-align: top; }
.fd-table td.fd-amt { text-align: end; white-space: nowrap; padding-inline-start: 10px; }
.fd-table tr.fd-sum td { font-weight: 700; border-bottom: none; border-top: 1.5px solid var(--border); }
.fd-table.fd-muted td { color: var(--muted); }
.fd-small { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.fd-notes { margin: 4px 0 0; padding-inline-start: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.fd-warn { font-size: 12.5px; color: #6b4e00; background: #fff6dd; border-radius: 6px; padding: 8px 10px; margin-top: 12px; line-height: 1.5; }
.fd-actions { display: flex; gap: 8px; margin-top: 14px; }
@media (max-width: 800px) { .fd-kpis, .fd-kpis.fd-two { grid-template-columns: 1fr; } }

.fd-elig { font-size: 13px; color: #0b3d62; background: #e8f3fc; border-inline-start: 4px solid #1f78c1; border-radius: 6px; padding: 9px 12px; margin: 10px 0 4px; line-height: 1.55; }
.fd-sub td { padding-top: 8px; }

/* v5: empty fee cell (not provided / not revised yet) */
.fd-dash { color:#8a94a3; font-weight:400; }
