/**
 * Yuitor Smart Classes — Central Design System (ui.css)
 * Shared across ALL 9 panels: Public Website, Auth, Student, Teacher, Parent,
 * Staff, Admin, School Partner, and Setup/Offline/404.
 *
 * Light & Dark tokens mapped cleanly onto Yuitor's Deep Burgundy (#7A0F28) &
 * Champagne Gold (#D4A13E) brand palette without adding any external CSS framework.
 */

:root {
  /* Brand & Accent */
  --yu-primary: #7a0f28;
  --yu-primary-hover: #5e0b1f;
  --yu-primary-soft: #faf2f4;
  --yu-primary-border: #e5c6ce;
  --yu-gold: #d4a13e;
  --yu-gold-hover: #b8872a;
  --yu-gold-soft: #fdf7ea;
  --yu-gold-ink: #6e4e10;

  /* 60-30-10 Neutral Surfaces (Light Mode) */
  --yu-bg: #faf8f6;
  --yu-surface: #ffffff;
  --yu-surface-2: #f5f1ee;
  --yu-surface-hover: #efe9e4;
  --yu-border: #e5dcd6;
  --yu-border-strong: #d3c5bc;

  /* Typography Ink (WCAG AA >= 4.5:1) */
  --yu-ink: #1d1216;
  --yu-ink-2: #4b3a40;
  --yu-ink-muted: #69575d;
  --yu-ink-on-primary: #ffffff;

  /* Semantic States (Always paired with explicit text/icon) */
  --yu-ok: #15803d;
  --yu-ok-bg: #ecfdf3;
  --yu-ok-border: #bbf7d0;
  --yu-warn: #b45309;
  --yu-warn-bg: #fffbeb;
  --yu-warn-border: #fde68a;
  --yu-danger: #b91c1c;
  --yu-danger-bg: #fef2f2;
  --yu-danger-border: #fecaca;
  --yu-info: #1d4ed8;
  --yu-info-bg: #eff6ff;
  --yu-info-border: #bfdbfe;

  /* Typography Families (2+1 Rule) */
  --yu-font-display: "Playfair Display", Georgia, serif;
  --yu-font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --yu-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Spacing & Radii */
  --yu-space-1: 4px;
  --yu-space-2: 8px;
  --yu-space-3: 12px;
  --yu-space-4: 16px;
  --yu-space-5: 20px;
  --yu-space-6: 24px;
  --yu-space-8: 32px;
  --yu-r-sm: 6px;
  --yu-r-md: 10px;
  --yu-r-lg: 14px;
  --yu-r-xl: 18px;

  /* Single-Elevation Shadows */
  --yu-shadow-sm: 0 1px 2px rgba(29, 18, 22, 0.06);
  --yu-shadow-md: 0 8px 24px rgba(29, 18, 22, 0.1);
  --yu-shadow-lg: 0 20px 48px rgba(15, 10, 14, 0.24);

  /* Motion & Focus */
  --yu-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --yu-dur-fast: 160ms;
  --yu-dur: 220ms;
  --yu-ring: 0 0 0 3px rgba(122, 15, 40, 0.28);

  /* Layering */
  --yu-z-sticky: 900;
  --yu-z-bottom-nav: 940;
  --yu-z-fab: 960;
  --yu-z-dropdown: 980;
  --yu-z-modal: 10040;
  --yu-z-confirm: 10070;
  --yu-z-toast: 10090;
}

/* Unified Dark Theme across ALL panels (.dark, [data-theme="dark"], .portal-dark) */
html.dark,
html[data-theme="dark"],
.portal-dark {
  --yu-primary: #a31d3d;
  --yu-primary-hover: #be2549;
  --yu-primary-soft: rgba(163, 29, 61, 0.2);
  --yu-primary-border: rgba(212, 161, 62, 0.34);
  --yu-gold: #e0b354;
  --yu-gold-hover: #ecc46e;
  --yu-gold-soft: rgba(224, 179, 84, 0.16);
  --yu-gold-ink: #f6dfaa;

  --yu-bg: #0e1016;
  --yu-surface: #161922;
  --yu-surface-2: #1e222e;
  --yu-surface-hover: #252a38;
  --yu-border: #2c3142;
  --yu-border-strong: #3e455c;

  --yu-ink: #f4eff0;
  --yu-ink-2: #d4cdd0;
  --yu-ink-muted: #a69ea2;
  --yu-ink-on-primary: #ffffff;

  --yu-ok: #4ade80;
  --yu-ok-bg: rgba(22, 163, 74, 0.18);
  --yu-ok-border: rgba(74, 222, 128, 0.32);
  --yu-warn: #fbbf24;
  --yu-warn-bg: rgba(217, 119, 6, 0.18);
  --yu-warn-border: rgba(251, 191, 36, 0.34);
  --yu-danger: #f87171;
  --yu-danger-bg: rgba(220, 38, 38, 0.2);
  --yu-danger-border: rgba(248, 113, 113, 0.36);
  --yu-info: #60a5fa;
  --yu-info-bg: rgba(37, 99, 235, 0.18);
  --yu-info-border: rgba(96, 165, 250, 0.34);

  --yu-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --yu-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
  --yu-shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.62);
  --yu-ring: 0 0 0 3px rgba(224, 179, 84, 0.38);
}

/* Global Overflow Safety & Accessible Focus Rings */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body.yu-scroll-locked {
  overflow: hidden !important;
  touch-action: none;
}

.yu-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.yu-ico--sm {
  width: 15px;
  height: 15px;
}

.yu-ico--lg {
  width: 22px;
  height: 22px;
}

.yu-num {
  font-family: var(--yu-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Visible keyboard focus across all interactive elements */
.yu-btn:focus-visible,
.yu-input:focus-visible,
.yu-select:focus-visible,
.yu-textarea:focus-visible,
.yu-tab:focus-visible,
.yu-bottom-nav__btn:focus-visible,
[data-open]:focus-visible,
[data-close]:focus-visible,
[data-dropdown-toggle]:focus-visible,
[data-yu-sort]:focus-visible {
  outline: none;
  box-shadow: var(--yu-ring);
}

/* Dark Mode support for Public React Site & School Partner Portal */
html.dark body:not([data-yu-portal-body="1"]) {
  background-color: var(--yu-bg);
  color: var(--yu-ink);
}

html.dark body:not([data-yu-portal-body="1"]) header,
html.dark body:not([data-yu-portal-body="1"]) .bg-white,
html.dark body:not([data-yu-portal-body="1"]) .bg-\[\#FAF7F5\],
html.dark body:not([data-yu-portal-body="1"]) .bg-\[\#FFFDFB\] {
  background-color: var(--yu-surface);
  color: var(--yu-ink);
  border-color: var(--yu-border);
}

html.dark body:not([data-yu-portal-body="1"]) header a,
html.dark body:not([data-yu-portal-body="1"]) header button,
html.dark body:not([data-yu-portal-body="1"]) header .text-\[\#7A0F28\],
html.dark body:not([data-yu-portal-body="1"]) header .text-\[\#5A0A1D\] {
  color: #f7ede2 !important;
}

html.dark body:not([data-yu-portal-body="1"]) header .italic,
html.dark body:not([data-yu-portal-body="1"]) header .text-\[\#8B6A2B\] {
  color: #e8c26b !important;
}

html.dark body:not([data-yu-portal-body="1"]) header a[href^="tel:"],
html.dark body:not([data-yu-portal-body="1"]) header button[aria-label*="Menu"] {
  border-color: rgba(212, 161, 62, 0.35);
}

html.dark body:not([data-yu-portal-body="1"]) .text-\[\#1D1014\],
html.dark body:not([data-yu-portal-body="1"]) .text-\[\#2A171C\] {
  color: var(--yu-ink);
}

html.dark body:not([data-yu-portal-body="1"]) .text-\[\#4B3B40\],
html.dark body:not([data-yu-portal-body="1"]) .text-\[\#5E4B51\],
html.dark body:not([data-yu-portal-body="1"]) .text-\[\#6B5A60\] {
  color: var(--yu-ink-2);
}

html.dark body:not([data-yu-portal-body="1"]) .border-\[\#EADFE2\],
html.dark body:not([data-yu-portal-body="1"]) .border-\[\#F0E6E9\] {
  border-color: var(--yu-border);
}

html.dark body:not([data-yu-portal-body="1"]) input,
html.dark body:not([data-yu-portal-body="1"]) select,
html.dark body:not([data-yu-portal-body="1"]) textarea {
  background-color: var(--yu-surface-2);
  color: var(--yu-ink);
  border-color: var(--yu-border-strong);
}

/* Dark Mode support for School Partner Portal (high-contrast labels, links & outline buttons) */
html.dark .yu-school-body {
  background: var(--yu-bg);
  color: var(--yu-ink);
}

html.dark .yu-school-card,
html.dark .yu-school-stat,
html.dark .yu-school-footer {
  background: var(--yu-surface);
  color: var(--yu-ink);
  border-color: var(--yu-border);
}

html.dark .yu-school-card h1,
html.dark .yu-school-card h2,
html.dark .yu-school-card h3,
html.dark .yu-school-card label,
html.dark .yu-school-card strong,
html.dark .yu-school-stat strong {
  color: #f7ede2 !important;
}

html.dark .yu-school-card p,
html.dark .yu-school-card small,
html.dark .yu-school-stat span,
html.dark .yu-school-footer a {
  color: #cbbec2 !important;
}

html.dark .yu-school-card a {
  color: #e8c26b !important;
}

html.dark .yu-school-btn--outline {
  background: var(--yu-surface-2) !important;
  color: #f7ede2 !important;
  border-color: var(--yu-border-strong) !important;
}

html.dark .yu-school-btn--outline:hover {
  border-color: var(--yu-gold) !important;
  color: #fde68a !important;
}

html.dark .yu-school-body input,
html.dark .yu-school-body select,
html.dark .yu-school-body textarea {
  background: var(--yu-surface-2);
  color: var(--yu-ink);
  border-color: var(--yu-border-strong);
}

html.dark .yu-school-body table th {
  background: var(--yu-surface-2);
  color: var(--yu-gold-ink);
}

html.dark .yu-school-body table td {
  border-color: var(--yu-border);
  color: var(--yu-ink);
}

/* ==========================================================================
   1. 12-COLUMN GRID, CONTAINER, SECTION & DIVIDER
   ========================================================================== */
.yu-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--yu-space-4);
}

.yu-section {
  padding-block: var(--yu-space-6);
}

.yu-divider {
  border: 0;
  border-top: 1px solid var(--yu-border);
  margin: var(--yu-space-5) 0;
}

.yu-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--yu-space-4);
}

.yu-col-12 { grid-column: span 12 / span 12; }
.yu-col-6 { grid-column: span 6 / span 6; }
.yu-col-4 { grid-column: span 4 / span 4; }
.yu-col-3 { grid-column: span 3 / span 3; }

@media (max-width: 900px) {
  .yu-col-4,
  .yu-col-3 { grid-column: span 6 / span 6; }
}

@media (max-width: 640px) {
  .yu-col-6,
  .yu-col-4,
  .yu-col-3 { grid-column: span 12 / span 12; }
}

/* ==========================================================================
   2. BUTTONS (Primary, Secondary, Outline, Text, Icon, Loading, Disabled)
   ========================================================================== */
.yu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--yu-r-md);
  border: 1px solid transparent;
  font-family: var(--yu-font-sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--yu-dur-fast) var(--yu-ease),
    background-color var(--yu-dur-fast) var(--yu-ease),
    border-color var(--yu-dur-fast) var(--yu-ease),
    color var(--yu-dur-fast) var(--yu-ease);
}

.yu-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.yu-btn:disabled,
.yu-btn.is-loading {
  opacity: 0.62;
  cursor: not-allowed;
  pointer-events: none;
}

.yu-btn--primary {
  background: var(--yu-primary);
  color: var(--yu-ink-on-primary);
  border-color: var(--yu-primary);
}
.yu-btn--primary:hover:not(:disabled) {
  background: var(--yu-primary-hover);
  border-color: var(--yu-primary-hover);
}

.yu-btn--secondary {
  background: var(--yu-gold);
  color: #1f1104;
  border-color: var(--yu-gold);
}
.yu-btn--secondary:hover:not(:disabled) {
  background: var(--yu-gold-hover);
  border-color: var(--yu-gold-hover);
}

.yu-btn--outline {
  background: var(--yu-surface);
  color: var(--yu-ink);
  border-color: var(--yu-border-strong);
}
.yu-btn--outline:hover:not(:disabled) {
  background: var(--yu-surface-2);
  border-color: var(--yu-primary);
}

.yu-btn--text {
  background: transparent;
  color: var(--yu-primary);
  border-color: transparent;
  padding-inline: 10px;
}
html.dark .yu-btn--text,
.portal-dark .yu-btn--text {
  color: var(--yu-gold);
}
.yu-btn--text:hover:not(:disabled) {
  background: var(--yu-primary-soft);
}

.yu-btn--danger {
  background: var(--yu-danger);
  color: #ffffff;
  border-color: var(--yu-danger);
}
.yu-btn--danger:hover:not(:disabled) {
  filter: brightness(0.92);
}

.yu-btn--icon {
  min-width: 40px;
  min-height: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--yu-r-md);
  background: var(--yu-surface);
  color: var(--yu-ink);
  border-color: var(--yu-border);
}
.yu-btn--icon:hover:not(:disabled) {
  background: var(--yu-surface-2);
  border-color: var(--yu-border-strong);
}

.yu-btn--sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12.5px;
}

.yu-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: yu-spin 650ms linear infinite;
}

@keyframes yu-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. FORMS (Inputs, Switches, OTP, Dropzone, Multi-select, Validation)
   ========================================================================== */
.yu-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yu-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--yu-ink);
}

.yu-input,
.yu-select,
.yu-textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--yu-r-md);
  border: 1px solid var(--yu-border-strong);
  background: var(--yu-surface);
  color: var(--yu-ink);
  font-family: var(--yu-font-sans);
  font-size: 14px;
  transition: border-color var(--yu-dur-fast) var(--yu-ease), box-shadow var(--yu-dur-fast) var(--yu-ease);
}

.yu-textarea {
  min-height: 92px;
  resize: vertical;
}

.yu-field-msg {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.yu-field-msg--error { color: var(--yu-danger); }
.yu-field-msg--success { color: var(--yu-ok); }
.yu-input.is-invalid,
.yu-select.is-invalid,
.yu-textarea.is-invalid,
.yu-invalid {
  border-color: var(--yu-danger) !important;
}
.yu-input.is-valid,
.yu-select.is-valid,
.yu-textarea.is-valid {
  border-color: var(--yu-ok) !important;
}

/* Toggle Switch */
.yu-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 40px;
  font-size: 13.5px;
  color: var(--yu-ink);
}
.yu-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.yu-switch__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--yu-border-strong);
  position: relative;
  transition: background-color var(--yu-dur-fast) var(--yu-ease);
  flex-shrink: 0;
}
.yu-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform var(--yu-dur-fast) var(--yu-ease);
}
.yu-switch input:checked + .yu-switch__track {
  background: var(--yu-primary);
}
.yu-switch input:checked + .yu-switch__track::after {
  transform: translateX(20px);
}
.yu-switch input:focus-visible + .yu-switch__track {
  box-shadow: var(--yu-ring);
}

/* 6-box OTP Input */
.yu-otp-group {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}
.yu-otp-box {
  width: 44px;
  height: 46px;
  text-align: center;
  font-family: var(--yu-font-mono);
  font-size: 18px;
  font-weight: 700;
  border-radius: var(--yu-r-md);
  border: 1.5px solid var(--yu-border-strong);
  background: var(--yu-surface);
  color: var(--yu-ink);
}

/* Drag & Drop File Upload Zone */
.yu-dropzone {
  border: 1.5px dashed var(--yu-border-strong);
  border-radius: var(--yu-r-lg);
  padding: 20px 16px;
  background: var(--yu-surface-2);
  color: var(--yu-ink-2);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--yu-dur-fast) var(--yu-ease), background-color var(--yu-dur-fast) var(--yu-ease);
}
.yu-dropzone.is-dragover,
.yu-dropzone:hover {
  border-color: var(--yu-primary);
  background: var(--yu-primary-soft);
}
.yu-dropzone__meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--yu-ink-muted);
}

/* ==========================================================================
   4. CARDS, BREADCRUMBS, TABS, PAGINATION, TABLES & ACCORDIONS
   ========================================================================== */
.yu-card {
  background: var(--yu-surface);
  color: var(--yu-ink);
  border: 1px solid var(--yu-border);
  border-radius: var(--yu-r-lg);
  padding: var(--yu-space-5);
  box-shadow: var(--yu-shadow-sm);
}

.yu-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--yu-space-4);
  flex-wrap: wrap;
}

.yu-card__title {
  margin: 0;
  font-family: var(--yu-font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--yu-ink);
  text-wrap: balance;
}

.yu-card__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--yu-ink-muted);
}

/* Breadcrumb */
.yu-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--yu-ink-muted);
}
.yu-breadcrumb a,
.yu-breadcrumb button {
  color: var(--yu-ink-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.yu-breadcrumb a:hover,
.yu-breadcrumb button:hover {
  color: var(--yu-primary);
  text-decoration: underline;
}
.yu-breadcrumb__current {
  color: var(--yu-ink);
  font-weight: 600;
}

/* Interactive Table Toolbar, Sorting & Pagination */
.yu-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.yu-table-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 340px;
}
.yu-table-search input {
  width: 100%;
  min-height: 36px;
  padding: 6px 12px 6px 34px;
  border-radius: var(--yu-r-md);
  border: 1px solid var(--yu-border-strong);
  background: var(--yu-surface);
  color: var(--yu-ink);
  font-size: 13px;
}
.yu-table-search .yu-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--yu-ink-muted);
  pointer-events: none;
}
.yu-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
th[data-yu-sort] {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th[data-yu-sort]::after {
  content: " ↕";
  font-size: 11px;
  opacity: 0.45;
}
th[data-yu-sort][aria-sort="ascending"]::after {
  content: " ↑";
  opacity: 1;
}
th[data-yu-sort][aria-sort="descending"]::after {
  content: " ↓";
  opacity: 1;
}

.yu-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--yu-ink-muted);
}
.yu-pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Segmented Filter Controls */
.yu-seg-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--yu-surface-2);
  border: 1px solid var(--yu-border);
  border-radius: var(--yu-r-md);
  flex-wrap: wrap;
}
.yu-seg-btn {
  border: 0;
  background: transparent;
  color: var(--yu-ink-2);
  padding: 6px 11px;
  min-height: 32px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--yu-dur-fast) var(--yu-ease), color var(--yu-dur-fast) var(--yu-ease);
}
.yu-seg-btn.is-active,
.yu-seg-btn[aria-pressed="true"] {
  background: var(--yu-primary);
  color: #ffffff;
}

/* ==========================================================================
   5. MODALS (Desktop Dialog + Mobile Bottom Sheet), CONFIRM & TOASTS
   ========================================================================== */
.yu-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--yu-z-modal);
  background: rgba(15, 10, 14, 0.58);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--yu-dur) var(--yu-ease);
}
.yu-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.yu-modal-backdrop--confirm {
  z-index: var(--yu-z-confirm);
}

.yu-modal {
  width: 100%;
  max-width: 540px;
  max-height: min(88vh, 760px);
  background: var(--yu-surface);
  color: var(--yu-ink);
  border: 1px solid var(--yu-border);
  border-radius: var(--yu-r-xl);
  box-shadow: var(--yu-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform var(--yu-dur) var(--yu-ease);
}
.yu-modal-backdrop.is-open .yu-modal {
  transform: translateY(0) scale(1);
}

.yu-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--yu-border);
}
.yu-modal__title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--yu-ink);
}
.yu-modal__body {
  padding: 18px 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.55;
  color: var(--yu-ink-2);
}
.yu-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--yu-border);
  background: var(--yu-surface-2);
}

/* Mobile Bottom Sheet Presentation (Step 4 Rule 7) */
@media (max-width: 640px) {
  .yu-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .yu-modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(28px);
  }
  .yu-modal-backdrop.is-open .yu-modal {
    transform: translateY(0);
  }
  .yu-modal__head::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: var(--yu-border-strong);
  }
  .yu-modal__head {
    position: relative;
    padding-top: 22px;
  }
  .yu-btn,
  .yu-btn--icon,
  .yu-btn--sm,
  .yu-seg-btn {
    min-height: 44px;
  }
  .yu-btn--icon {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
}

/* Toast Stack (Auto-dismiss 4.5s, instant close, optional Undo) */
.yu-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: var(--yu-z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.yu-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--yu-r-md);
  background: var(--yu-surface);
  color: var(--yu-ink);
  border: 1px solid var(--yu-border-strong);
  box-shadow: var(--yu-shadow-md);
  font-size: 13.5px;
  line-height: 1.4;
  transform: translateY(8px);
  opacity: 0;
  transition: transform var(--yu-dur-fast) var(--yu-ease), opacity var(--yu-dur-fast) var(--yu-ease);
}
.yu-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.yu-toast--success { border-color: var(--yu-ok-border); background: var(--yu-ok-bg); color: var(--yu-ok); }
.yu-toast--error { border-color: var(--yu-danger-border); background: var(--yu-danger-bg); color: var(--yu-danger); }
.yu-toast--warning { border-color: var(--yu-warn-border); background: var(--yu-warn-bg); color: var(--yu-warn); }
.yu-toast--info { border-color: var(--yu-info-border); background: var(--yu-info-bg); color: var(--yu-info); }
.yu-toast__msg { flex: 1; color: var(--yu-ink); font-weight: 500; }
.yu-toast__undo {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.yu-toast__close {
  border: 0;
  background: transparent;
  color: var(--yu-ink-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.yu-toast__close:hover {
  background: var(--yu-surface-2);
  color: var(--yu-ink);
}

/* Alert Banner, Tooltip, Progress, Skeleton, Empty & Error States */
.yu-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--yu-r-md);
  border: 1px solid var(--yu-border);
  background: var(--yu-surface-2);
  color: var(--yu-ink);
  font-size: 13.5px;
}
.yu-alert--ok { background: var(--yu-ok-bg); border-color: var(--yu-ok-border); color: var(--yu-ok); }
.yu-alert--warn { background: var(--yu-warn-bg); border-color: var(--yu-warn-border); color: var(--yu-warn); }
.yu-alert--danger { background: var(--yu-danger-bg); border-color: var(--yu-danger-border); color: var(--yu-danger); }

.yu-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--yu-surface-2);
  overflow: hidden;
  border: 1px solid var(--yu-border);
}
.yu-progress__bar {
  height: 100%;
  background: var(--yu-primary);
  border-radius: 999px;
  transition: width 260ms var(--yu-ease);
}

.yu-skeleton {
  background: linear-gradient(90deg, var(--yu-surface-2) 25%, var(--yu-surface-hover) 50%, var(--yu-surface-2) 75%);
  background-size: 200% 100%;
  border-radius: var(--yu-r-sm);
  animation: yu-shimmer 1.3s ease-in-out infinite;
}
@keyframes yu-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.yu-empty-state,
.yu-error-state {
  padding: 28px 20px;
  text-align: center;
  border: 1px dashed var(--yu-border-strong);
  border-radius: var(--yu-r-lg);
  background: var(--yu-surface-2);
  color: var(--yu-ink-2);
}

/* ==========================================================================
   6. GLOBAL UTILITY BAR (Notification Bell, Language Switch, Theme, FABs, Bottom Nav)
   ========================================================================== */
.yu-util-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.yu-util-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--yu-r-md);
  border: 1px solid var(--yu-border-strong);
  background: var(--yu-surface);
  color: var(--yu-ink);
  font-family: var(--yu-font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: background-color var(--yu-dur-fast) var(--yu-ease), border-color var(--yu-dur-fast) var(--yu-ease);
}
.yu-util-btn:hover {
  background: var(--yu-surface-2);
  border-color: var(--yu-primary);
}
.yu-util-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--yu-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yu-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  z-index: var(--yu-z-dropdown);
  background: var(--yu-surface);
  color: var(--yu-ink);
  border: 1px solid var(--yu-border-strong);
  border-radius: var(--yu-r-lg);
  box-shadow: var(--yu-shadow-md);
  padding: 12px;
  display: none;
}
.yu-dropdown-panel.is-open {
  display: block;
}
.yu-notif-item {
  padding: 9px 10px;
  border-radius: var(--yu-r-sm);
  border-bottom: 1px solid var(--yu-border);
  font-size: 12.5px;
}
.yu-notif-item:last-child { border-bottom: 0; }
.yu-notif-item strong { display: block; color: var(--yu-ink); font-size: 13px; }
.yu-notif-item span { color: var(--yu-ink-muted); font-size: 11.5px; }

/* Notice Ticker (Public Top Utility Strip — distinct deep charcoal-gold tone) */
.yu-notice-ticker {
  background: #1f1116;
  border-bottom: 1px solid rgba(212, 161, 62, 0.35);
  color: #fff8f0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(212, 161, 62, 0.35);
}
.yu-notice-ticker__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.yu-notice-ticker__text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.yu-notice-ticker__controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.yu-notice-ticker__btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.yu-notice-ticker__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Floating Action Stack (WhatsApp, Call, Scroll-to-Top) — compact, never overlaps chatbot */
.yu-fab-stack {
  position: fixed;
  left: 16px;
  bottom: 20px;
  z-index: var(--yu-z-fab);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.yu-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--yu-border);
  background: var(--yu-surface);
  color: var(--yu-ink);
  box-shadow: var(--yu-shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--yu-dur-fast) var(--yu-ease), opacity var(--yu-dur-fast) var(--yu-ease);
}
.yu-fab:hover { transform: translateY(-2px); }
.yu-fab--wa { background: #16a34a; color: #ffffff; border-color: #15803d; }
.yu-fab--call { background: var(--yu-primary); color: #ffffff; border-color: var(--yu-primary); }
.yu-fab--top { opacity: 0; pointer-events: none; transform: translateY(8px); }
.yu-fab--top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Mobile Bottom Nav Bar for Dashboard Portals (<= 768px, compact 56px height) */
.yu-bottom-nav {
  display: none;
}
@media (max-width: 768px) {
  .yu-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    z-index: var(--yu-z-bottom-nav);
    background: var(--yu-surface);
    border-top: 1px solid var(--yu-border);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(15, 10, 14, 0.08);
  }
  .yu-bottom-nav__btn {
    border: 0;
    background: transparent;
    color: var(--yu-ink-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    padding: 4px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .yu-bottom-nav__btn.is-active {
    color: var(--yu-primary);
  }
  html.dark .yu-bottom-nav__btn.is-active,
  .portal-dark .yu-bottom-nav__btn.is-active {
    color: var(--yu-gold);
  }
  body.yu-has-bottom-nav {
    padding-bottom: 68px !important;
  }
  body.yu-has-bottom-nav .yu-fab-stack {
    bottom: 68px;
  }
  body.yu-has-bottom-nav .yu-toast-stack {
    bottom: 68px;
  }
}

/* ==========================================================================
   7. COACHING SPECIAL WIDGETS (Attendance Calendar, Quiz Palette, Charts, Wizard, Pipeline)
   ========================================================================== */
.yu-widget-panel {
  margin-top: 16px;
  margin-bottom: 16px;
  background: var(--yu-surface);
  color: var(--yu-ink);
  border: 1px solid var(--yu-border);
  border-radius: var(--yu-r-lg);
  padding: 16px;
}

/* Attendance Calendar */
.yu-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.yu-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.yu-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--yu-ink-muted);
  padding: 4px 0;
}
.yu-cal-day {
  min-height: 42px;
  border-radius: var(--yu-r-sm);
  border: 1px solid var(--yu-border);
  background: var(--yu-surface-2);
  color: var(--yu-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-family: var(--yu-font-mono);
  font-variant-numeric: tabular-nums;
}
.yu-cal-day--present { background: var(--yu-ok-bg); border-color: var(--yu-ok-border); color: var(--yu-ok); font-weight: 700; }
.yu-cal-day--absent { background: var(--yu-danger-bg); border-color: var(--yu-danger-border); color: var(--yu-danger); font-weight: 700; }
.yu-cal-day--late { background: var(--yu-warn-bg); border-color: var(--yu-warn-border); color: var(--yu-warn); font-weight: 700; }
.yu-cal-day--empty { opacity: 0.25; border-style: dashed; }
.yu-cal-day small { font-family: var(--yu-font-sans); font-size: 9.5px; font-weight: 700; }
.yu-cal-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--yu-ink-muted);
}

/* Quiz Timer & Question Palette */
.yu-quiz-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--yu-r-md);
  background: var(--yu-surface-2);
  border: 1px solid var(--yu-border);
  margin-bottom: 12px;
}
.yu-quiz-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--yu-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--yu-primary);
}
html.dark .yu-quiz-timer,
.portal-dark .yu-quiz-timer { color: var(--yu-gold); }
.yu-quiz-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.yu-q-node {
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--yu-r-sm);
  border: 1px solid var(--yu-border-strong);
  background: var(--yu-surface);
  color: var(--yu-ink);
  font-family: var(--yu-font-mono);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.yu-q-node.is-answered { background: var(--yu-ok-bg); border-color: var(--yu-ok-border); color: var(--yu-ok); }
.yu-q-node.is-current { border-color: var(--yu-primary); box-shadow: var(--yu-ring); }

/* SVG Bar Chart & Scorecard */
.yu-chart-bars {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.yu-chart-row {
  display: grid;
  grid-template-columns: minmax(90px, 140px) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.yu-chart-track {
  height: 10px;
  border-radius: 999px;
  background: var(--yu-surface-2);
  overflow: hidden;
  border: 1px solid var(--yu-border);
}
.yu-chart-fill {
  height: 100%;
  background: var(--yu-primary);
  border-radius: 999px;
}
html.dark .yu-chart-fill,
.portal-dark .yu-chart-fill { background: var(--yu-gold); }

/* Step-by-Step Admission Wizard */
.yu-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.yu-step-item {
  padding: 8px 10px;
  border-radius: var(--yu-r-md);
  border: 1px solid var(--yu-border);
  background: var(--yu-surface-2);
  color: var(--yu-ink-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.yu-step-item.is-active {
  background: var(--yu-primary);
  border-color: var(--yu-primary);
  color: #ffffff;
}
.yu-step-item.is-done {
  background: var(--yu-ok-bg);
  border-color: var(--yu-ok-border);
  color: var(--yu-ok);
}

/* Reduced Motion Respect (Step 4 Rule 8) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
