/* Manzoma Pro — shared presentation layer for the school portal. */
:root {
  --mz-bg: #f6f8fb;
  --mz-surface: #ffffff;
  --mz-surface-soft: #edf2f7;
  --mz-text: #17202b;
  --mz-muted: #647184;
  --mz-line: #dce3eb;
  --mz-navy: #183a5a;
  --mz-navy-strong: #102c47;
  --mz-teal: #2e6f75;
  --mz-teal-soft: #e5f0f1;
  --mz-danger: #c33d4a;
  --mz-danger-soft: #fbeaec;
  --mz-success: #196b49;
  --mz-success-soft: #e5f4ec;
  --mz-warning: #815500;
  --mz-warning-soft: #fff2cf;
  --mz-info: #245f86;
  --mz-info-soft: #e6f1f8;
  --mz-placeholder: #718095;
  --mz-action: #236b70;
  --mz-success-solid: #176442;
  --mz-danger-solid: #a92f3f;
  --mz-shadow: 0 12px 34px rgba(18, 42, 64, .08);
  --bg-page: var(--mz-bg);
  --card-bg: var(--mz-surface);
  --bg-card: var(--mz-surface);
  --bg-secondary: var(--mz-surface-soft);
  --glass: var(--mz-surface);
  --glass-border: var(--mz-line);
  --text-primary: var(--mz-text);
  --text-secondary: var(--mz-muted);
  --text-muted: #5c6d80;
  --border: var(--mz-line);
  --primary: var(--mz-navy);
  --primary-dark: var(--mz-navy-strong);
  --gold: var(--mz-teal);
  --gold-dark: #236b70;
  --accent: var(--mz-teal);
  --accent-dark: #236b70;
  --success: var(--mz-success);
  --success-bg: var(--mz-success-soft);
  --danger: var(--mz-danger);
  --danger-bg: var(--mz-danger-soft);
  --warning: var(--mz-warning);
  --warning-bg: var(--mz-warning-soft);
  --info: var(--mz-info);
  --info-bg: var(--mz-info-soft);
  --shadow: var(--mz-shadow);
  --shadow-lg: 0 20px 55px rgba(18, 42, 64, .13);
  color-scheme: light;
}

html[data-theme="dark"] {
  --mz-bg: #18202b;
  --mz-surface: #202b38;
  --mz-surface-soft: #293746;
  --mz-text: #f4f7fa;
  --mz-muted: #aeb9c7;
  --mz-line: #344353;
  --mz-navy: #7db8c0;
  --mz-navy-strong: #0f273a;
  --mz-teal: #92c9bf;
  --mz-teal-soft: #294544;
  --mz-shadow: 0 14px 38px rgba(0, 0, 0, .25);
  --mz-danger: #ff9aa6;
  --mz-danger-soft: #47272f;
  --mz-success: #8ed9b7;
  --mz-success-soft: #203d34;
  --mz-warning: #ffd276;
  --mz-warning-soft: #46391f;
  --mz-info: #9acdec;
  --mz-info-soft: #223b4b;
  --mz-placeholder: #98a9b8;
  --mz-action: #2b7378;
  --mz-success-solid: #216c4c;
  --mz-danger-solid: #a93647;
  --bg-page: var(--mz-bg);
  --card-bg: var(--mz-surface);
  --bg-card: var(--mz-surface);
  --bg-secondary: var(--mz-surface-soft);
  --glass: var(--mz-surface-soft);
  --glass-border: var(--mz-line);
  --text-primary: var(--mz-text);
  --text-secondary: var(--mz-muted);
  --text-muted: #afbdca;
  --border: var(--mz-line);
  color-scheme: dark;
}

html {
  font-size: 15px;
  overflow-x: clip;
  overflow-y: auto;
  height: auto;
  -webkit-overflow-scrolling: touch;
}
body {
  background: var(--mz-bg) !important;
  color: var(--mz-text) !important;
  font-size: 1rem;
  overflow-x: clip !important;
  overflow-y: visible !important;
  height: auto !important;
  touch-action: pan-x pan-y pinch-zoom;
}
body,.header,.main-nav,.main-content,.card,.stat-card,.table-container,.modal,.form-control,input,select,textarea {
  transition: background-color .24s ease, color .24s ease, border-color .24s ease, box-shadow .24s ease;
}
::selection { background: var(--mz-teal); color: #fff; }
a { color: var(--mz-teal); }
a:hover { color: var(--mz-navy); }
:focus-visible { outline: 3px solid rgba(46, 126, 131, .35); outline-offset: 2px; }

.header {
  height: 60px;
  padding-inline: clamp(16px, 2.2vw, 32px);
  background: rgba(255, 255, 255, .95) !important;
  color: var(--mz-text) !important;
  border-bottom: 1px solid var(--mz-line) !important;
  box-shadow: 0 4px 18px rgba(18, 42, 64, .05) !important;
  backdrop-filter: blur(18px);
}
html[data-theme="dark"] .header { background: rgba(32, 43, 56, .96) !important; }
.header-left { gap: 10px; }
.header-logo,
.header-logo.brand-mark {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 11px;
  background: transparent;
  object-fit: contain;
}
.header-title { color: var(--mz-text); font-size: .98rem; font-weight: 800; }
.header-right { gap: 8px; }
.header-icon,
.portal-theme-toggle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 1px solid var(--mz-line) !important;
  border-radius: 10px !important;
  background: var(--mz-surface-soft) !important;
  color: var(--mz-navy) !important;
}
.header-icon:hover,
.portal-theme-toggle:hover { background: var(--mz-teal-soft) !important; color: var(--mz-teal) !important; }
.user-menu { min-height: 40px; border: 1px solid transparent; }
.user-menu:hover { background: var(--mz-surface-soft) !important; border-color: var(--mz-line); }
.user-menu:focus-visible { outline: 3px solid color-mix(in srgb, var(--mz-teal) 28%, transparent); outline-offset: 2px; }
.user-avatar { border-color: var(--mz-line); width: 34px; height: 34px; }
.user-name { color: var(--mz-text); font-weight: 700; }
.user-identity { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; min-width:0; max-width:190px; line-height:1.25; }
[dir="rtl"] .user-identity { align-items:flex-end; }
.user-display-name { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--mz-text); font-size:.86rem; font-weight:800; }
.user-role-label { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--mz-muted); font-size:.76rem; font-weight:600; margin-top:1px; }
.user-menu-chevron { flex:0 0 auto; color:var(--mz-muted); font-size:.62rem; }
.user-dropdown-identity { display:flex; flex-direction:column; gap:4px; padding:11px 16px 12px; border-bottom:1px solid var(--mz-line); }
.user-dropdown-identity strong { color:var(--mz-text); font-size:.88rem; line-height:1.4; }
.user-dropdown-identity small { display:flex; align-items:center; gap:7px; color:var(--mz-muted); font-size:.74rem; line-height:1.4; }
.user-dropdown-identity small i { color:var(--mz-teal); }
.user-dropdown {
  background: var(--mz-surface) !important;
  border-color: var(--mz-line) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: 14px;
}
.user-dropdown a { color: var(--mz-muted) !important; min-height: 44px; }
.user-dropdown a:hover { background: var(--mz-teal-soft) !important; color: var(--mz-teal) !important; }
@media (max-width:1024px) {
  .user-identity { max-width:130px; }
  .user-role-label { display:none; }
}
@media (max-width:768px) {
  .user-menu { gap:6px; padding-inline:5px; }
  .user-identity { max-width:92px; }
  .user-display-name { font-size:.78rem; }
  .user-menu-chevron { display:none; }
}
@media (max-width:480px) {
  .user-identity { max-width:66px; }
}

.main-nav {
  top: 60px;
  min-height: 46px;
  background: var(--mz-surface) !important;
  border-bottom: 1px solid var(--mz-line) !important;
  box-shadow: 0 4px 14px rgba(18, 42, 64, .04) !important;
}
.nav-container { padding-inline: clamp(10px, 2vw, 28px); gap: 4px; }
.nav-link {
  min-height: 40px;
  padding: 8px 12px;
  border: 0 !important;
  border-radius: 9px;
  color: var(--mz-muted) !important;
  font-size: .86rem;
  font-weight: 700;
}
.nav-link:hover,
.nav-link.active { background: var(--mz-teal-soft) !important; color: var(--mz-teal) !important; }
.nav-link.active { box-shadow: inset 0 -3px 0 var(--mz-teal); }
.nav-dropdown {
  top: calc(100% - 1px) !important;
  margin-top: 0;
  padding: 8px;
  min-width: 235px;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  background: var(--mz-surface) !important;
  border: 1px solid var(--mz-line) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-lg) !important;
}
.nav-item::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: calc(100% - 3px);
  height: 10px;
}
.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown,
.nav-dropdown:hover { display: block !important; }
@media (min-width: 1025px) {
  .nav-dropdown:has(> a:nth-child(10)) {
    min-width: 480px;
    max-width: min(560px, calc(100vw - 24px));
    padding: 10px;
  }
  .nav-item:hover > .nav-dropdown:has(> a:nth-child(10)),
  .nav-item:focus-within > .nav-dropdown:has(> a:nth-child(10)),
  .nav-dropdown:has(> a:nth-child(10)):hover {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(220px, max-content));
    gap: 4px 8px;
  }
}
.nav-dropdown a {
  min-height: 40px;
  padding: 9px 14px !important;
  border-radius: 9px;
  color: var(--mz-muted) !important;
  font-size: .83rem;
  font-weight: 700;
  white-space: nowrap !important;
  transition: background-color .16s ease, color .16s ease !important;
}
.nav-dropdown a:hover {
  padding: 9px 14px !important;
  background: var(--mz-teal-soft) !important;
  color: var(--mz-teal) !important;
}
.nav-dropdown a i { color: var(--mz-teal) !important; flex-shrink: 0; }

.main-content {
  margin-top: 106px;
  padding: 14px clamp(16px, 2vw, 28px) 28px;
  background: var(--mz-bg) !important;
}
.sub-nav {
  margin: 0 0 16px;
  padding: 6px 8px !important;
  gap: 5px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  background: var(--mz-surface) !important;
  border: 1px solid var(--mz-line) !important;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(18, 42, 64, .035);
}
.sub-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sub-nav a {
  flex: 0 0 auto !important;
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px !important;
  border-radius: 8px !important;
  color: var(--mz-muted) !important;
  background: transparent !important;
  font-size: .84rem !important;
  font-weight: 700;
  white-space: nowrap !important;
}
.sub-nav a:hover { background: var(--mz-surface-soft) !important; color: var(--mz-text) !important; }
.sub-nav a.active { background: var(--mz-teal-soft) !important; color: var(--mz-teal) !important; box-shadow: inset 0 -2px 0 var(--mz-teal); }
.page-header { margin-bottom: 24px; }
.page-header h1,
.page-title { color: var(--mz-text) !important; font-weight: 800; letter-spacing: -.02em; }
.page-header p { color: var(--mz-muted) !important; }

.stats-grid { gap: 20px; margin-bottom: 24px; }
.stat-card,
.card,
.page-card,
.settings-card,
.chart-card,
.table-container,
.t-card,
.filter-bar,
.filters-bar {
  background: var(--mz-surface) !important;
  color: var(--mz-text) !important;
  border: 1px solid var(--mz-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--mz-shadow) !important;
  backdrop-filter: none !important;
}
.stat-card { padding: 20px; gap: 14px; overflow: hidden; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg) !important; }
.stat-card::before { width: 4px; background: var(--mz-teal) !important; }
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--mz-teal-soft) !important;
  color: var(--mz-teal) !important;
}
.stat-number { color: var(--mz-text) !important; font-size: 1.45rem; }
.stat-label,.stat-info p,.card p { color: var(--mz-muted) !important; }

.table-container { overflow: hidden; }
.charts-grid { gap: 22px; align-items: stretch; }
.charts-grid .chart-card { min-width: 0; }
.charts-grid .chart-body { position: relative; height: clamp(235px, 24vw, 295px); min-height: 235px; padding: 18px !important; }
.table-header,
.chart-header,
.t-card-head {
  background: var(--mz-surface) !important;
  color: var(--mz-text) !important;
  border-bottom: 1px solid var(--mz-line) !important;
  padding: 13px 18px;
}
.table-header h3,
.chart-header h3,
.t-card-head h3 {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
}
table { color: var(--mz-text) !important; }
table thead,
table thead tr,
table thead th,
.table-container table thead th {
  background: var(--mz-surface-soft) !important;
  color: var(--mz-text) !important;
  border-color: var(--mz-line) !important;
  font-size: .83rem;
  font-weight: 800;
  padding: 10px 14px;
}
table tbody tr,
table tbody td { background: transparent !important; color: var(--mz-text) !important; border-color: var(--mz-line) !important; font-size: .9rem; line-height: 1.5; }
table tbody td small { font-size: .8rem; line-height: 1.45; }
table tbody tr:hover,
table tbody tr:hover td { background: var(--mz-teal-soft) !important; }

.grade-pills { display:flex; gap:8px; margin:14px 0 18px; flex-wrap:wrap; }
.grade-pill { min-height:36px; display:inline-flex; align-items:center; padding:6px 14px; border:1px solid var(--mz-line); border-radius:999px; background:var(--mz-surface); color:var(--mz-muted); font-size:.84rem; font-weight:700; text-decoration:none; }
.grade-pill:hover { border-color:var(--mz-teal); color:var(--mz-teal); }
.grade-pill.active { background:var(--mz-navy-strong); border-color:var(--mz-navy-strong); color:#fff; }

.form-control,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="color"]):not([type="range"]),
select {
  height: 36px;
  min-height: 36px;
  padding: 5px 11px;
  font-size: .86rem;
  font-weight: 600;
  background-color: var(--mz-surface) !important;
  color: var(--mz-text) !important;
  border-color: var(--mz-line) !important;
  border-radius: 8px !important;
}
textarea {
  min-height: 76px;
  padding: 8px 11px;
  font-size: .86rem;
  font-weight: 500;
  background-color: var(--mz-surface) !important;
  color: var(--mz-text) !important;
  border-color: var(--mz-line) !important;
  border-radius: 8px !important;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus { border-color: var(--mz-teal) !important; box-shadow: 0 0 0 3px rgba(46, 126, 131, .15) !important; }
select option { background: var(--mz-surface) !important; color: var(--mz-text) !important; font-weight: 500; }
label { color: var(--mz-text); font-size: .82rem; font-weight: 600; }
::placeholder { color: var(--mz-placeholder) !important; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--mz-teal); }

.btn,
button.btn,
input[type="submit"] {
  min-height: 36px;
  padding: 6px 14px;
  font-size: .84rem;
  border-radius: 8px !important;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn.btn-sm,
button.btn.btn-sm,
a.btn.btn-sm {
  min-height: 31px;
  padding: 4px 11px;
  font-size: .8rem;
  border-radius: 7px !important;
}
.btn.btn-xs,
button.btn.btn-xs,
a.btn.btn-xs {
  min-height: 28px;
  padding: 3px 9px;
  font-size: .76rem;
  border-radius: 6px !important;
}
@media (max-width: 1024px) {
  .form-control,
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea,
  .btn,
  button.btn,
  input[type="submit"] { min-height: 42px; }
  .btn.btn-sm, button.btn.btn-sm, a.btn.btn-sm { min-height: 38px; }
  .btn.btn-xs, button.btn.btn-xs, a.btn.btn-xs { min-height: 34px; }
}
.btn-primary,.btn.btn-primary { background: var(--mz-navy-strong) !important; border-color: var(--mz-navy-strong) !important; color: #fff !important; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 44, 71, .2); }
.btn-secondary,
.btn-outline,
.modal-footer .btn:not(.btn-primary):not(.btn-accent):not(.btn-success):not(.btn-danger) { background: var(--mz-surface-soft) !important; color: var(--mz-text) !important; border-color: var(--mz-line) !important; }
.btn-accent,.btn.btn-accent { background: var(--mz-action) !important; border-color: var(--mz-action) !important; color: #fff !important; box-shadow: none !important; }
.btn-accent:hover { background: var(--gold-dark) !important; border-color: var(--gold-dark) !important; }
.btn-success,.btn.btn-success { background: var(--mz-success-solid) !important; border-color: var(--mz-success-solid) !important; color: #fff !important; }
.btn-danger,.btn.btn-danger { background: var(--mz-danger-solid) !important; border-color: var(--mz-danger-solid) !important; color: #fff !important; }
.badge { border-radius: 999px !important; font-weight: 800; }
.badge-success { background: var(--mz-success-soft) !important; color: var(--mz-success) !important; }
.badge-danger { background: var(--mz-danger-soft) !important; color: var(--mz-danger) !important; }
.badge-warning { background: var(--mz-warning-soft) !important; color: var(--mz-warning) !important; }
.badge-info,.badge-primary { background: var(--mz-info-soft) !important; color: var(--mz-info) !important; }
.badge-secondary { background: var(--mz-surface-soft) !important; color: var(--mz-text) !important; border: 1px solid var(--mz-line) !important; }
.alert { background: var(--mz-surface) !important; border-color: var(--mz-line) !important; color: var(--mz-text) !important; }
.alert-success { background: var(--mz-success-soft) !important; color: var(--mz-success) !important; border-color: var(--mz-success) !important; }
.alert-danger { background: var(--mz-danger-soft) !important; color: var(--mz-danger) !important; border-color: var(--mz-danger) !important; }
.alert-warning { background: var(--mz-warning-soft) !important; color: var(--mz-warning) !important; border-color: var(--mz-warning) !important; }
.alert-info { background: var(--mz-info-soft) !important; color: var(--mz-info) !important; border-color: var(--mz-info) !important; }
button.fab { background:var(--mz-navy-strong) !important; box-shadow:0 10px 26px rgba(16,44,71,.25) !important; }
button.fab:hover { transform:translateY(-2px) !important; background:var(--mz-teal) !important; }

/* Unified modal and form contrast in light and dark themes. */
.modal-overlay { background: rgba(8, 18, 28, .58) !important; }
.modal {
  background: var(--mz-surface) !important;
  color: var(--mz-text) !important;
  border: 1px solid var(--mz-line) !important;
  box-shadow: 0 24px 70px rgba(8, 18, 28, .28) !important;
  backdrop-filter: none !important;
}
.modal-header,
.modal-footer,
.modal-tabs,
.modal form > div[style*="border-bottom"] {
  background: var(--mz-surface) !important;
  border-color: var(--mz-line) !important;
}
.modal-header h1,.modal-header h2,.modal-header h3,.modal-header h4 { color: var(--mz-teal) !important; }
.modal-close {
  min-width: 36px;
  min-height: 36px;
  background: var(--mz-surface-soft) !important;
  color: var(--mz-text) !important;
  border: 1px solid var(--mz-line) !important;
}
.modal-close:hover { background: var(--mz-danger-soft) !important; color: var(--mz-danger) !important; }
.modal .form-group label,
.modal .form-label,
.modal label { color: var(--mz-text) !important; opacity: 1 !important; }
.modal small,
.modal .help-text,
.modal .form-text { color: var(--mz-muted) !important; opacity: 1 !important; }
.modal .form-control,
.modal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.modal select,
.modal textarea {
  background: var(--mz-surface-soft) !important;
  color: var(--mz-text) !important;
  border: 1px solid var(--mz-line) !important;
}
.modal .form-control:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus { background: var(--mz-surface) !important; border-color: var(--mz-teal) !important; }
.modal-tab { color: var(--mz-muted) !important; }
.modal-tab:hover,.modal-tab.active { color: var(--mz-teal) !important; background: var(--mz-teal-soft) !important; border-bottom-color: var(--mz-teal) !important; }
input[type="date"],input[type="month"],input[type="time"],input[type="datetime-local"] { color-scheme: light !important; }
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="month"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="datetime-local"] { color-scheme: dark !important; }

/* Normalize legacy low-contrast helper text without changing semantic states. */
.main-content small,
.main-content .help-text,
.main-content .form-text,
.main-content [style*="color:#888"],
.main-content [style*="color: #888"],
.main-content [style*="color:#999"],
.main-content [style*="color: #999"] { color: var(--mz-muted) !important; }
.modal label[style*="color:rgba(255,255,255"],
.modal small[style*="color:rgba(255,255,255"],
.modal p[style*="color:rgba(255,255,255"],
.modal span[style*="color:rgba(255,255,255"] { color: var(--mz-muted) !important; }

.login-wrapper {
  background: radial-gradient(circle at 15% 15%, rgba(46, 126, 131, .13), transparent 30%), var(--mz-bg) !important;
}
.login-wrapper::before,.login-wrapper::after { display: none; }
.login-card {
  background: var(--mz-surface) !important;
  color: var(--mz-text) !important;
  border-color: var(--mz-line) !important;
  box-shadow: var(--shadow-lg) !important;
}
.login-logo img { width: 88px; height: 88px; border: 0; border-radius: 24px; padding: 0; background: transparent; }
.login-logo h1 { color: var(--mz-text) !important; }
.login-logo p { color: var(--mz-muted) !important; }

/* Platform release notes: one shared, customer-facing update centre. */
.release-notes-menu { position: relative; }
.release-notes-button { position: relative; padding: 0; font: inherit; cursor: pointer; }
.release-notes-badge {
  position: absolute; inset-block-start: -7px; inset-inline-end: -10px;
  min-width: 31px; height: 18px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--mz-surface); border-radius: 999px;
  background: var(--mz-danger); color: #fff;
  font-size: .68rem; font-weight: 900; line-height: 1;
  box-shadow: 0 4px 12px rgba(190, 45, 57, .25);
}
.release-notes-badge[hidden],.release-notes-dropdown[hidden] { display: none !important; }
.release-notes-dropdown {
  position: absolute; inset-block-start: calc(100% + 12px); inset-inline-end: 0;
  width: min(390px, calc(100vw - 24px)); z-index: 10020;
  overflow: hidden; color: var(--mz-text); background: var(--mz-surface);
  border: 1px solid var(--mz-line); border-radius: 18px; box-shadow: var(--mz-shadow-lg,0 22px 55px rgba(9,30,50,.24));
}
.release-notes-head { min-height: 58px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--mz-line); }
.release-notes-head span { display: inline-flex; align-items: center; gap: 8px; color: var(--mz-text); font-size: .86rem; font-weight: 900; }
.release-notes-head span i { color: var(--mz-teal); }
.release-notes-head small { padding: 4px 8px; border-radius: 999px; background: var(--mz-teal-soft); color: var(--mz-teal) !important; font-size: .62rem; font-weight: 800; }
.release-notes-items { max-height: 350px; overflow-y: auto; overscroll-behavior: contain; }
.release-note-item { min-height: 91px; padding: 13px 15px; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 11px; color: var(--mz-text); text-decoration: none; border-bottom: 1px solid var(--mz-line); transition: background .16s ease; }
.release-note-item:hover,.release-note-item:focus-visible { background: var(--mz-surface-soft); outline: none; }
.release-note-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--mz-teal-soft); color: var(--mz-teal); }
.release-note-copy { min-width: 0; }
.release-note-copy strong { display: block; color: var(--mz-text); font-size: .79rem; line-height: 1.55; }
.release-note-copy strong em { display: inline-flex; margin-inline-start: 6px; padding: 2px 6px; border-radius: 999px; background: var(--mz-teal); color: #fff; font-size: .5rem; font-style: normal; vertical-align: middle; }
.release-note-copy small { display: -webkit-box; margin-top: 3px; overflow: hidden; color: var(--mz-muted) !important; font-size: .68rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.release-note-copy time { display: block; margin-top: 5px; color: var(--mz-teal); font-size: .72rem; font-weight: 800; }
.release-notes-all { min-height: 46px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--mz-teal); background: var(--mz-surface-soft); text-decoration: none; font-size: .75rem; font-weight: 900; }
.release-notes-all:hover,.release-notes-all:focus-visible { text-decoration: underline; outline: none; }
.release-notes-empty { padding: 34px 16px; color: var(--mz-muted); text-align: center; font-size: .78rem; }

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (max-width: 768px) {
  .header { height: 64px; padding-inline: 12px; }
  .header-logo,.header-logo.brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .portal-theme-toggle { display: inline-flex; }
  .main-nav { top: 64px; }
  .main-nav.mobile-open { background: var(--mz-surface) !important; }
  .main-content { margin-top: 69px; padding: 16px; }
  .nav-link { min-height: 46px; }
  .charts-grid .chart-body { height: 300px; min-height: 300px; padding: 12px !important; }
  .release-notes-dropdown { position: fixed; inset-block-start: 70px; inset-inline: 12px; width: auto; max-height: calc(100dvh - 82px); }
}

/* Unified horizontal filter alignment & high-contrast card headers on desktop */
@media (min-width: 901px) {
  .filters-bar:has(.academic-class-filters) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 14px !important;
  }
  .filters-bar:has(.academic-class-filters) > .ordinary-filter-field {
    flex: 1 1 180px !important;
    max-width: 260px;
  }
  .filters-bar:has(.academic-class-filters) > .academic-class-filters {
    flex: 3 1 520px !important;
    width: auto !important;
  }
}
html:not([data-theme="dark"]) .sb-head-title {
  color: #0f172a !important;
}
html:not([data-theme="dark"]) .quiz-header {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border-bottom: 1px solid #bae6fd !important;
}
html:not([data-theme="dark"]) .quiz-header h4 {
  color: #0f172a !important;
}
html:not([data-theme="dark"]) .q-badge-draft { background: #fef3c7 !important; color: #b45309 !important; }
html:not([data-theme="dark"]) .q-badge-published { background: #dcfce7 !important; color: #15803d !important; }
html:not([data-theme="dark"]) .q-badge-closed { background: #ffe4e6 !important; color: #be123c !important; }
html:not([data-theme="dark"]) .q-badge-active { background: #dbeafe !important; color: #1d4ed8 !important; }

/* Header quick student search (desktop >= 900px) */
.header .header-quick-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.header .header-quick-search i {
  position: absolute;
  inset-inline-start: 11px;
  color: var(--mz-muted);
  font-size: .78rem;
  pointer-events: none;
}
.header .header-quick-search input {
  width: 228px;
  height: 34px;
  min-height: 34px;
  padding-block: 0 !important;
  padding-inline-start: 34px !important;
  padding-inline-end: 12px !important;
  border-radius: 9px;
  border: 1px solid var(--mz-line) !important;
  background: var(--mz-surface-soft) !important;
  color: var(--mz-text) !important;
  font-family: inherit;
  font-size: 12.5px !important;
  line-height: 1.3;
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, width .18s ease, background-color .18s ease;
}
.header .header-quick-search input::placeholder {
  color: var(--mz-muted);
  opacity: .85;
}
.header .header-quick-search input:focus {
  outline: none;
  border-color: var(--mz-teal) !important;
  background: var(--mz-surface) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mz-teal) 18%, transparent);
  width: 245px;
}
@media (max-width: 899px) {
  .header .header-quick-search { display: none !important; }
}

/* ==========================================================================
   GLOBAL PRINT ISOLATION & DARK-THEME INK RESET
   Ensures zero floating banners, support buttons, navbars, or dark surfaces
   leak onto printed A4/A3 sheets across the entire Manzoma platform.
   ========================================================================== */
@media print {
  :root,
  html,
  html[data-theme="dark"],
  html[data-theme="light"],
  body {
    --mz-bg: #ffffff !important;
    --mz-surface: #ffffff !important;
    --mz-surface-soft: #f8fafc !important;
    --mz-surface-raised: #ffffff !important;
    --mz-text: #0f172a !important;
    --mz-muted: #475569 !important;
    --mz-line: #cbd5e1 !important;
    --mz-shadow: none !important;
    --mz-shadow-sm: none !important;
    --text-primary: #0f172a !important;
    --text-secondary: #334155 !important;
    --text-muted: #475569 !important;
    --glass: #ffffff !important;
    --glass-border: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .header,
  .main-nav,
  .sub-nav,
  .mobile-menu-btn,
  .mobile-app-nav,
  #ordinaryAppNav,
  .mobile-app-overview,
  .mobile-app-notification-cta,
  .push-onboarding,
  #sub-banner,
  .mz-sa-impersonate-bar,
  .mz-support-fab,
  .mz-support-backdrop,
  #mzSupportBackdrop,
  .powered-manzoma-badge,
  .ordinary-powered-footer,
  #notifPopupContainer,
  .notif-popup,
  .filter-bar,
  .filters-bar,
  .msg-settings,
  .ordinary-child-switch,
  .exam-term-switcher,
  .modal,
  .modal-overlay,
  .collapse-strip,
  .addon-release-notes,
  .no-print {
    display: none !important;
  }

  body,
  .main-content,
  body.ordinary-app-shell .main-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .table-container,
  .card {
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  /* Prevent mobile (<768px / <900px / <1024px) card-table display:block rules from firing on A4 Portrait (190mm = 718px) */
  table,
  .data-table,
  .cop-print-table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
  }
  thead {
    display: table-header-group !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip-path: none !important;
    overflow: visible !important;
  }
  tbody { display: table-row-group !important; width: auto !important; }
  tfoot { display: table-footer-group !important; }
  tr { display: table-row !important; break-inside: avoid; page-break-inside: avoid; }
  th, td { display: table-cell !important; }
  td::before { content: none !important; display: none !important; }
}


