/* Shared visual language for the portal and its journal.
   No PHP/API/table structure is changed by this stylesheet. */
:root {
  color-scheme: dark;
  --ink: #f8f9fc;
  --muted: #b9c6de;
  --faint: #8497b6;
  --canvas: #0a0e1a;
  --surface: #151d30;
  --soft: #202b43;
  --line: #34446b;
  --blue: #6fa3ff;
  --cyan: #65b6ee;
  --violet: #adbaff;
  --success: #72c6a5;
  --navy: #0d1428;
  --danger: #ef6070;
  --shadow: 0 24px 55px rgba(0, 0, 0, .26);
  --font: "Manrope", system-ui, sans-serif;
  --display: "Manrope", system-ui, sans-serif;
}
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8f9fc;
  --muted: #b9c6de;
  --faint: #8497b6;
  --canvas: #0a0e1a;
  --surface: #151d30;
  --soft: #202b43;
  --line: #34446b;
  --blue: #6fa3ff;
  --cyan: #65b6ee;
  --violet: #adbaff;
  --success: #72c6a5;
  --navy: #0d1428;
  --danger: #ef6070;
}
body { background: var(--canvas); color: var(--ink); }
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 42% 35% at 72% 15%, rgba(22,91,225,.13), transparent 80%),
              radial-gradient(ellipse 40% 40% at 12% 82%, rgba(174,31,55,.06), transparent 82%);
}
.ambient::before { background: radial-gradient(circle, rgba(12,94,233,.12), transparent 70%); }
.ambient::after { background: radial-gradient(circle, rgba(229,35,56,.07), transparent 70%); }
.app-sidebar {
  border-color: var(--line);
  background: #11182a;
  box-shadow: 16px 0 50px #0003;
}
.app-header {
  background: rgba(10, 15, 29, .9);
  border-color: var(--line);
}
.app-brand__mark, .nav-icon {
  color: #f2f6ff;
  background: #1b2d58;
}
.sidebar-nav button.is-active .nav-icon, .sidebar-nav .is-active .nav-icon {
  color: #fff;
  background: #0b5be7;
  box-shadow: 0 7px 25px rgba(8,86,228,.23);
}
.content-card, .card, .student-overview article, .student-averages,
.student-entry-journal, .material-stat, .journal-subject {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 20px 45px rgba(0,0,0,.13);
}
.content-card, .card, .student-overview article, .journal-subject {
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .35s;
}
.cinematic-tilt {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-3px) !important;
}
.content-card:hover, .student-overview article:hover, .journal-subject:hover {
  border-color: #597bd1;
  box-shadow: 0 28px 55px rgba(0,0,0,.24), 0 0 38px rgba(12,87,222,.09);
  transform: translateY(-3px);
}
.student-overview article:nth-child(1), .student-overview article:nth-child(2),
.student-overview article:nth-child(3) {
  background: #16356d;
  border: 1px solid var(--line);
}
.student-overview article:nth-child(2) { background: #172844; }
.student-overview article:nth-child(3) { background: #232840; }
.student-overview article span, .student-overview article b { color: #f8f9fc; }
.student-tabs a.is-active, .sidebar-admin, body:not(.student-app) button:not(.secondary-button):not(.danger-button) {
  background: #075ee9;
  color: #fff;
}
.student-tabs a:not(.is-active) { color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.student-entry-table, .student-averages__table, .journal-table-wrap {
  border-color: var(--line);
  background: #101a2d;
}
.student-entry-table__head, .student-averages__head, .journal-table thead th {
  background: #213159;
  color: #dce7ff;
}
.student-entry-row:hover, .student-averages__row:hover { background: rgba(35,99,220,.1); }
.journal-chart__bar i { background: #1266ec; }
.journal-chart--attendance .journal-chart__bar i { background: #e72e49; }
.journal-absence { color: #ff8994 !important; }
.view-heading h1, body:not(.student-app) h1, .student-entry-journal h2 {
  letter-spacing: -.065em;
}
body:not(.student-app) > header { background: rgba(10,15,30,.9); }
body:not(.student-app) main { color: var(--ink); }
body:not(.student-app) .card { background: var(--surface); }
:focus-visible { outline: 2px solid #95b8ff; outline-offset: 3px; }
.app-brand__mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%;
  background: #fff url("assets/pgups-logo.webp") center / 78% no-repeat;
  font-size: 0;
}
.brand-mark { display:inline-grid; width:38px; height:38px; margin-right:10px; place-items:center; vertical-align:middle; border-radius:50%; background:#fff; }
.brand-mark img { width:30px; height:30px; object-fit:contain; }
body:not(.student-app) > header .brand::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 50%;
  background: #fff url("assets/pgups-logo.webp") center / 78% no-repeat;
}
.login-brand { width:50px; height:50px; margin-bottom:17px; }
.login-brand img { width:40px; height:40px; }
.admin-header-actions a:hover, .sidebar-nav a:hover { color: #fff; border-color: #4d85ed; }
@media (prefers-reduced-motion: reduce) {
  .content-card, .card, .student-overview article, .journal-subject { transition: none; }
  .content-card:hover, .student-overview article:hover, .journal-subject:hover { transform: none; }
}
