:root {
  --plm-blue: #003366;
  --plm-blue-mid: #1a4f8c;
  --plm-blue-light: #2c6cb0;
  --plm-gold: #d4af37;
  --plm-gold-pale: #f5e6b3;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-700: #495057;
  --gray-900: #212529;
  --risk-low: #198754;
  --risk-mod: #b8860b;
  --risk-high: #e07020;
  --risk-critical: #c82333;
  --shadow: 0 2px 8px rgba(0, 28, 56, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
}

a {
  color: var(--plm-blue-mid);
}

.text-muted {
  color: var(--gray-700);
}

.auth-body {
  margin: 0;
  min-height: 100vh;
}

.login-portal-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-portal-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a3a5c;
}

.login-portal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 51, 102, 0.82) 0%, rgba(0, 28, 56, 0.75) 100%);
}

.login-portal-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.login-portal-logo {
  display: block;
  margin: 0 auto 0.75rem;
}

.login-portal-uni {
  margin: 0;
  font-size: 1.05rem;
  color: var(--plm-blue);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-portal-campus {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.82rem;
  color: var(--gray-700);
}

.login-portal-sys {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--plm-blue-mid);
  line-height: 1.35;
}

.login-portal-form {
  text-align: left;
}

.login-portal-form label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.login-portal-form input {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.95rem;
}

.btn-login-primary {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.65rem;
  background: var(--plm-blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-login-primary:hover {
  background: var(--plm-blue-mid);
}

.login-portal-demo {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.8rem;
  text-align: left;
}

.login-portal-demo ul {
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
}

.portal-student {
  background: #eef2f6;
}

.portal-top {
  background: var(--white);
  border-bottom: 4px solid var(--plm-gold);
  box-shadow: var(--shadow);
}

.portal-top-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
}

.portal-brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}

.portal-logo {
  flex-shrink: 0;
}

.portal-titles {
  flex: 1;
  min-width: 0;
}

.portal-uni-gold {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1rem;
  color: #9a7b1a;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.portal-uni-sub {
  font-size: 0.72rem;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-sys-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--plm-blue);
  margin-top: 0.35rem;
  line-height: 1.3;
}

.portal-sys-sub {
  font-size: 0.72rem;
  color: var(--gray-700);
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0 0.75rem;
  align-items: center;
}

.portal-nav-link {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--plm-blue);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.portal-nav-link:hover {
  background: #e8eef5;
}

.portal-nav-link.is-active {
  background: var(--plm-blue);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.35);
}

.portal-nav-logout {
  margin-left: auto;
  color: var(--risk-critical);
}

.portal-welcome-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0 0.85rem;
  font-size: 0.88rem;
}

.portal-welcome-text strong {
  color: var(--plm-blue);
}

.portal-welcome-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-bell {
  position: relative;
  text-decoration: none;
  font-size: 1.1rem;
}

.portal-bell-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--risk-critical);
  color: var(--white);
  font-size: 0.65rem;
  min-width: 1.1rem;
  height: 1.1rem;
  line-height: 1.1rem;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
}

.portal-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 2px solid var(--plm-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--plm-blue);
}

.portal-page-title-bar {
  background: linear-gradient(90deg, var(--plm-blue) 0%, var(--plm-blue-mid) 100%);
  color: var(--white);
  padding: 0.55rem 1rem;
}

.portal-page-title {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 1.05rem;
  font-weight: 600;
}

.portal-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.portal-flash {
  margin-bottom: 1rem;
}

.portal-page-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

.portal-panel-span2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .portal-panel-span2 {
    grid-column: span 1;
  }
}

.portal-panel {
  background: var(--white);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portal-panel-head {
  background: linear-gradient(90deg, var(--plm-blue) 0%, var(--plm-blue-mid) 100%);
  color: var(--white);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.portal-panel-body {
  padding: 1rem;
}

.portal-info-split {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.portal-info-list p,
.portal-info-grid > div {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.portal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  flex: 1;
  min-width: 220px;
}

@media (max-width: 600px) {
  .portal-info-grid {
    grid-template-columns: 1fr;
  }
}

.portal-label {
  display: inline-block;
  min-width: 8.5rem;
  font-weight: 600;
  color: var(--gray-700);
}

.portal-photo-placeholder {
  width: 140px;
  height: 160px;
  border: 2px dashed #adb5bd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray-700);
  background: var(--gray-50);
  flex-shrink: 0;
}

.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.portal-table th {
  background: var(--plm-blue);
  color: var(--white);
  padding: 0.5rem 0.55rem;
  text-align: left;
  font-weight: 600;
}

.portal-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #dee2e6;
}

.portal-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.portal-small {
  font-size: 0.82rem;
}

.portal-lead {
  font-size: 0.95rem;
}

.portal-actions {
  margin-top: 0.75rem;
}

.portal-progress-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.portal-chart-sm {
  max-width: 200px;
}

.portal-attention {
  border: 1px solid #28a745;
  background: #f4fff8;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.86rem;
}

.portal-grade-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.portal-disclaimer,
.portal-student .mgmt-disclaimer {
  background: var(--plm-gold-pale);
  border-left: 4px solid var(--plm-gold);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border-radius: 0 6px 6px 0;
}

.portal-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-700);
  padding: 1rem;
  background: var(--white);
  border-top: 1px solid #dee2e6;
}

.enrollment-page-stack {
  max-width: 960px;
  margin: 0 auto;
}

.enrollment-registration-panel {
  border: 1px solid #c8d0da;
}

.enrollment-registration-body {
  padding: 1.25rem 1.5rem;
}

.enrollment-details-wrap {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.enrollment-details-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  flex: 1;
  min-width: 280px;
}

.enrollment-details-col {
  min-width: 240px;
}

.enrollment-field {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.45rem 0;
  font-size: 0.92rem;
}

.enrollment-field-label {
  min-width: 7.5rem;
  font-weight: 600;
  color: var(--gray-900);
}

.enrollment-field-sep {
  color: var(--gray-700);
}

.enrollment-field-value {
  flex: 1;
}

.enrollment-section-select {
  font-size: 0.9rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid #adb5bd;
  border-radius: 4px;
  background: var(--white);
  color: var(--gray-900);
  max-width: 12rem;
}

.enrollment-photo-placeholder {
  width: 130px;
  height: 170px;
  border: 2px solid #adb5bd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.enrollment-closed-message {
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
  color: #cc0000;
  margin: 1.75rem 0 0.75rem;
  line-height: 1.35;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.enrollment-prototype-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--gray-700);
  max-width: 720px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

.enrollment-admin-list {
  margin-bottom: 1.5rem;
}

.enrollment-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 1.5rem;
}

.enrollment-summary-grid p {
  margin: 0.35rem 0;
}

.study-plan-page {
  max-width: 1100px;
  margin: 0 auto;
}

.study-plan-program-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--plm-blue);
  margin: 0 0 0.75rem;
}

.study-plan-student-meta p {
  margin: 0.25rem 0;
  font-size: 0.92rem;
}

.study-plan-prototype-note {
  font-size: 0.85rem;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: var(--plm-gold-pale);
  border-left: 3px solid var(--plm-gold);
}

.study-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.study-plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.study-plan-summary-card {
  background: #f8fafc;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  text-align: center;
}

.study-plan-summary-label {
  font-size: 0.78rem;
  color: var(--gray-700);
  font-weight: 600;
}

.study-plan-summary-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--plm-blue);
}

.study-plan-progress-wrap {
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.study-plan-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--plm-blue), var(--plm-blue-mid));
  border-radius: 6px;
  min-width: 2%;
}

.study-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.study-plan-table th,
.study-plan-table td {
  border: 1px solid #212529;
  padding: 0.45rem 0.5rem;
  vertical-align: top;
}

.study-plan-table thead th {
  background: var(--plm-blue);
  color: #fff;
  font-weight: 600;
  text-align: left;
}

.study-plan-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

.study-plan-units {
  text-align: center;
  white-space: nowrap;
}

.study-plan-sem-total-label {
  text-align: right;
}

.study-plan-footnote {
  font-size: 0.88rem;
  margin: 0.35rem 0;
}

.print-only {
  display: none !important;
}

.study-plan-print-header {
  border: 2px solid #1a3f7a;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fff;
}

.study-plan-print-brand {
  text-align: center;
  margin-bottom: 0.75rem;
}

.study-plan-print-uni {
  margin: 0;
  font-weight: 700;
  color: #8b6914;
  font-size: 1.05rem;
}

.study-plan-print-uni-sub {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: #444;
}

.study-plan-print-title {
  margin: 0.5rem 0 0.35rem;
  text-align: center;
  font-size: 1.15rem;
  color: #1a3f7a;
}

.study-plan-print-college {
  margin: 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
}

.study-plan-print-program {
  margin: 0.25rem 0 0.85rem;
  text-align: center;
  font-size: 0.9rem;
}

.study-plan-print-meta {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.study-plan-print-meta th,
.study-plan-print-meta td {
  border: 1px solid #1a3f7a;
  padding: 0.4rem 0.55rem;
  text-align: left;
}

.study-plan-print-meta th {
  width: 18%;
  background: #eef3fb;
  font-weight: 600;
}

.study-status-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.study-badge-completed {
  background: #d1e7dd;
  color: #0f5132;
}

.study-badge-progress {
  background: #cff4fc;
  color: #055160;
}

.study-badge-risk {
  background: #f8d7da;
  color: #842029;
}

.study-badge-pending {
  background: #e9ecef;
  color: #495057;
}

@media print {
  .no-print,
  .portal-nav,
  .portal-welcome-row,
  .portal-flash,
  .portal-page-title-bar,
  .mgmt-sidebar,
  .mgmt-topbar {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .study-plan-page {
    margin: 0;
    padding: 0;
  }
  .study-plan-print-header {
    page-break-inside: avoid;
  }
  .study-plan-table th,
  .study-plan-table td {
    border-color: #000;
  }
}

.btn-portal-primary {
  background: var(--plm-blue);
  color: var(--white);
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-block;
}

.btn-portal-secondary {
  background: var(--gray-700);
  color: var(--white);
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
}

.theme-management {
  background: #eef2f6;
}

.mgmt-layout {
  display: flex;
  min-height: 100vh;
}

.mgmt-sidebar {
  width: 248px;
  background: linear-gradient(180deg, var(--plm-blue) 0%, #001f3d 100%);
  color: var(--white);
  flex-shrink: 0;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.mgmt-brand {
  display: flex;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 0.75rem;
}

.mgmt-brand-logo {
  flex-shrink: 0;
}

.mgmt-brand-title {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
}

.mgmt-brand-sub {
  font-size: 0.72rem;
  opacity: 0.85;
}

.mgmt-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.5rem;
  flex: 1;
}

.mgmt-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.86rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
}

.mgmt-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mgmt-nav a.is-active {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: var(--plm-gold);
  font-weight: 600;
}

.mgmt-nav-logout {
  color: #ffb4b4 !important;
}

.mgmt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mgmt-topbar {
  background: var(--white);
  border-bottom: 3px solid var(--plm-gold);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mgmt-page-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--plm-blue);
}

.mgmt-user {
  font-size: 0.88rem;
  color: var(--gray-700);
}

.mgmt-user-name {
  font-weight: 600;
  color: var(--plm-blue);
}

.mgmt-role-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 0.78rem;
  text-transform: capitalize;
}

.mgmt-content {
  padding: 1.25rem;
  flex: 1;
}

.mgmt-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mgmt-panel {
  background: var(--white);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mgmt-panel-head {
  background: linear-gradient(90deg, var(--plm-blue) 0%, var(--plm-blue-mid) 100%);
  color: var(--white);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.mgmt-panel-body {
  padding: 1rem;
}

.mgmt-lead {
  font-size: 1.02rem;
  line-height: 1.55;
  margin-top: 0;
}

.about-arch-heading {
  font-size: 1rem;
  color: var(--plm-blue);
  margin: 1.25rem 0 0.35rem;
}

.about-arch-heading:first-of-type {
  margin-top: 0.5rem;
}

.mgmt-toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.mgmt-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.mgmt-card-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.mgmt-source-card .mgmt-panel-body p:last-child {
  margin-bottom: 0;
}

.mgmt-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

form.inline-form {
  display: inline;
}

.mgmt-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-700);
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-info {
  background: #cce5ff;
  color: #004085;
}

.badge-warn {
  background: #fff3cd;
  color: #856404;
}

.eval-form input[type="number"] {
  max-width: 6rem;
}

.eval-summary li {
  margin-bottom: 0.35rem;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 3px solid var(--plm-gold);
  padding-left: 1rem;
}

.timeline-list li {
  position: relative;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.timeline-list li:last-child {
  border-bottom: none;
}

.timeline-title {
  font-weight: 600;
  color: var(--plm-blue);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--gray-700);
}

.risk-review-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
  align-items: flex-start;
}

.mgmt-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #dee2e6;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--plm-gold);
}

.mgmt-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-700);
}

.mgmt-card-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--plm-blue);
}

.mgmt-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .mgmt-two-col {
    grid-template-columns: 1fr;
  }
}

.mgmt-list {
  margin: 0;
  padding-left: 1.2rem;
}

.mgmt-list li {
  margin-bottom: 0.35rem;
}

.mgmt-disclaimer {
  background: var(--plm-gold-pale);
  border-left: 4px solid var(--plm-gold);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border-radius: 0 6px 6px 0;
}

.reports-big-stat {
  font-size: 2rem;
  color: var(--plm-blue);
  margin: 0;
  font-weight: 700;
}

.theme-management .panel {
  background: var(--white);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.theme-management .panel h2 {
  margin: 0;
  background: linear-gradient(90deg, var(--plm-blue) 0%, var(--plm-blue-mid) 100%);
  color: var(--white);
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.theme-management .panel > form,
.theme-management .panel > .table-wrap,
.theme-management .panel > .search-input,
.theme-management .panel > p,
.theme-management .panel > ul,
.theme-management .panel > div:not(:first-child) {
  padding-left: 1rem;
  padding-right: 1rem;
}

.theme-management .panel .table-wrap {
  padding-bottom: 1rem;
}

.portal-student .panel {
  background: var(--white);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.portal-student .panel h2 {
  margin: 0;
  background: linear-gradient(90deg, var(--plm-blue) 0%, var(--plm-blue-mid) 100%);
  color: var(--white);
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.portal-student .panel > form,
.portal-student .panel > .table-wrap,
.portal-student .panel > p,
.portal-student .panel > ul,
.portal-student .panel > div:not(:first-child) {
  padding-left: 1rem;
  padding-right: 1rem;
}

.portal-student .panel .table-wrap {
  padding-bottom: 1rem;
}

.theme-management .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 960px) {
  .theme-management .two-col {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data-table th,
table.data-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

table.data-table th {
  background: var(--plm-blue);
  color: var(--white);
  font-weight: 600;
}

table.data-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.search-input {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--plm-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--plm-blue-mid);
}

.btn-secondary {
  background: #6c757d;
  color: var(--white);
}

.btn-success {
  background: #198754;
  color: var(--white);
}

.btn-success:hover {
  background: #157347;
}

.btn-danger {
  background: var(--risk-critical);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--plm-blue);
  color: var(--plm-blue);
}

.btn-sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

form.stacked label {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
}

form.stacked input,
form.stacked select,
form.stacked textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.45rem 0.55rem;
  margin-top: 0.25rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.flash-messages {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.65rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.flash.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.risk-low {
  background: #d4edda;
  color: var(--risk-low);
}
.risk-mod {
  background: #fff3cd;
  color: #856404;
}
.risk-high {
  background: #ffe5d0;
  color: var(--risk-high);
}
.risk-critical {
  background: #f8d7da;
  color: var(--risk-critical);
}

.disclaimer,
.mgmt-disclaimer {
  font-size: 0.86rem;
}

.chart-box {
  max-width: 420px;
}

.portal-gwa-banner {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
  border: 1px solid #d0d8e0;
}

.portal-gwa-value {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 1.35rem;
  color: #003366;
}

.portal-grade-primary {
  font-weight: 600;
  color: #003366;
}

@media (max-width: 900px) {
  .mgmt-layout {
    flex-direction: column;
  }
  .mgmt-sidebar {
    width: 100%;
  }
  .mgmt-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media print {
  .no-print,
  .mgmt-sidebar,
  .mgmt-topbar,
  .portal-nav,
  .portal-welcome-row,
  .portal-footer,
  .portal-page-title-bar,
  .mgmt-toolbar,
  .portal-top {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .mgmt-main,
  .portal-main {
    margin: 0;
    padding: 0;
  }
}
