:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-300: #93c5fd;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-600: #dc2626;
  --green-50: #f0fdf4;
  --green-700: #15803d;
}

/* Attendance learning checks: fixed clip/vocabulary fields plus teacher-defined score columns. */
.nz-attendance-table table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.nz-attendance-table th,
.nz-attendance-table td { border-right: 1px solid var(--slate-200); white-space: nowrap; }
.nz-attendance-table th:last-child,
.nz-attendance-table td:last-child { border-right: 0; }
.nz-attendance-table thead th { text-align: center; }
.nz-attendance-table .attendance-index-col { width: 48px; min-width: 48px; text-align: center; }
.nz-attendance-table .attendance-code-col { width: 92px; min-width: 92px; }
.nz-attendance-table .attendance-student-col { width: 108px; min-width: 108px; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.nz-attendance-table .attendance-status-col { width: 150px; min-width: 150px; }
.nz-attendance-table .attendance-status-col .input { width: 100% !important; }
.nz-attendance-table .attendance-clip-col { width: 140px !important; min-width: 140px; text-align: center; }
.nz-attendance-table .attendance-vocabulary-col,
.nz-attendance-table .attendance-assessment-col { width: 124px; min-width: 124px; text-align: center; }
.nz-attendance-table .attendance-add-col { width: 52px; min-width: 52px; padding-right: 8px; padding-left: 8px; text-align: center; }
.nz-attendance-table .attendance-note-col { width: 210px; min-width: 210px; }
.nz-attendance-table .attendance-note-col .input,
.nz-attendance-table .attendance-score-input,
.nz-attendance-table .attendance-assessment-input { width: 100%; }
.attendance-column-head { position: relative; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.attendance-column-drag-wrap { display: flex; width: 100%; height: 100%; min-width: 0; align-items: center; justify-content: center; gap: 5px; }
.attendance-column-drag-wrap .attendance-column-head { min-width: 0; flex: 1; }
.attendance-draggable-column { position: relative; cursor: grab; user-select: none; transition: opacity .15s ease, background-color .15s ease; }
.attendance-draggable-column:active { cursor: grabbing; }
.attendance-draggable-column input,
.attendance-draggable-column button { cursor: auto; user-select: text; }
.attendance-column-drag-handle { flex: 0 0 auto; color: var(--slate-400); font-size: 14px; line-height: 1; cursor: grab; }
.attendance-draggable-column:hover .attendance-column-drag-handle { color: var(--brand-600); }
.attendance-draggable-column.is-dragging { opacity: .42; }
.attendance-draggable-column.is-drop-before::before,
.attendance-draggable-column.is-drop-after::after { position: absolute; z-index: 8; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; background: var(--brand-600); content: ""; }
.attendance-draggable-column.is-drop-before::before { left: -2px; }
.attendance-draggable-column.is-drop-after::after { right: -2px; }
.attendance-column-name { width: 100%; height: 100% !important; min-height: 0; padding: 0 14px 0 0 !important; border: 0 !important; border-radius: 0; color: inherit; background: transparent !important; box-shadow: none !important; font-size: inherit !important; font-weight: inherit; letter-spacing: inherit; text-align: center; text-transform: inherit; white-space: nowrap; }
.attendance-column-name::placeholder { color: inherit; opacity: 1; }
.attendance-column-name:focus { outline: none; }
.attendance-column-remove { position: absolute; top: 50%; right: -2px; display: grid; width: 16px; height: 16px; padding: 0; transform: translateY(-50%); place-items: center; border: 0; border-radius: 4px; color: var(--slate-400); background: transparent; font-size: 14px; line-height: 1; cursor: pointer; }
.attendance-column-remove:hover { color: var(--red-600); background: var(--red-50); }
.attendance-column-remove:disabled { opacity: .45; cursor: not-allowed; }
.attendance-assessment-input { text-align: center; }
.attendance-add-column { display: inline-grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 1px dashed var(--brand-300); border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: 21px; line-height: 1; cursor: pointer; }
.attendance-add-column:hover { border-style: solid; background: var(--brand-100); }
.attendance-add-column:disabled { opacity: .45; cursor: not-allowed; }
.attendance-clip-check { position: relative; display: inline-grid; width: 28px; height: 28px; place-items: center; cursor: pointer; }
.attendance-clip-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attendance-clip-check span { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--slate-300); border-radius: 7px; color: transparent; background: white; font-size: 15px; font-weight: 800; }
.attendance-clip-check input:checked + span { border-color: var(--brand-600); color: white; background: var(--brand-600); }
.attendance-clip-check input:focus-visible + span { outline: 2px solid var(--brand-300); outline-offset: 2px; }
.attendance-clip-check input:disabled + span { opacity: .55; cursor: not-allowed; }
.nz-attendance-table .attendance-index-col,
.nz-attendance-table .attendance-code-col,
.nz-attendance-table .attendance-student-col { position: sticky; z-index: 2; background: white; }
.nz-attendance-table thead .attendance-index-col,
.nz-attendance-table thead .attendance-code-col,
.nz-attendance-table thead .attendance-student-col { z-index: 6; background: var(--slate-50); }
.nz-attendance-table .attendance-index-col { left: 0; }
.nz-attendance-table .attendance-code-col { left: 48px; }
.nz-attendance-table .attendance-student-col { left: 140px; }
.nz-attendance-table tbody tr:hover .attendance-index-col,
.nz-attendance-table tbody tr:hover .attendance-code-col,
.nz-attendance-table tbody tr:hover .attendance-student-col { background: var(--slate-50); }
.nz-attendance-table tr.is-absent-row .attendance-clip-col,
.nz-attendance-table tr.is-absent-row .attendance-vocabulary-col,
.nz-attendance-table tr.is-absent-row .attendance-assessment-col,
.nz-attendance-table tr.is-absent-row .attendance-note-col { background: var(--slate-50); }
.nz-attendance-table tr.is-absent-row [data-attendance-grade] { color: var(--slate-400); background: var(--slate-50); }

@media (max-width: 600px) {
  /* Điểm danh mobile: kéo ngang tự do, chỉ cố định cột Học viên. Chỉ đổi CSS, giữ nguyên markup/logic. */
  .nz-class-page:has(#attendance-form) { padding-bottom: 84px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-head { align-items: stretch; flex-direction: column; gap: 8px; padding: 10px 12px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-actions { display: grid; grid-template-columns: 1fr auto; width: 100%; gap: 8px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-session { grid-column: 1 / -1; width: 100%; min-width: 0; height: 44px !important; font-size: 15px !important; }
  .nz-class-page:has(#attendance-form) .nz-attendance-actions .nz-check { min-height: 44px; font-size: 14px !important; }
  .nz-class-page:has(#attendance-form) .nz-attendance-actions .primary-btn { position: fixed; right: 14px; bottom: 14px; z-index: 60; height: 50px !important; padding: 0 28px !important; border-radius: 999px; box-shadow: 0 8px 24px rgba(37, 99, 235, .4); font-size: 15px !important; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table { max-height: none; -webkit-overflow-scrolling: touch; }
  /* STT + Mã HV cuộn theo bảng, chỉ cố định cột Học viên — kéo ngang nhập điểm vẫn biết đang ở hàng nào */
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-index-col,
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-code-col { position: static; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-index-col { width: 36px; min-width: 36px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-student-col { left: 0; width: 110px; min-width: 110px; box-shadow: 1px 0 0 var(--slate-200); }
  .nz-class-page:has(#attendance-form) .nz-attendance-table tr.is-absent-row .attendance-student-col { background: var(--slate-50); }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-status-col { width: 140px; min-width: 140px; }
  /* Ô nhập to, dễ chạm */
  .nz-class-page:has(#attendance-form) .nz-attendance-table th { height: 40px !important; padding: 0 8px; font-size: 11px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table td { padding: 8px 6px !important; font-size: 13px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-status-col .input { height: 44px !important; font-size: 16px !important; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-clip-col { width: 76px !important; min-width: 76px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-clip-col .attendance-head-label { white-space: normal; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-clip-check { width: 44px; height: 44px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-clip-check span { width: 32px; height: 32px; border-radius: 9px; font-size: 19px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-vocabulary-col,
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-assessment-col { width: 116px; min-width: 116px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-note-col { width: 190px; min-width: 190px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-assessment-input,
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-score-input,
  .nz-class-page:has(#attendance-form) .nz-attendance-table .attendance-note-col .input { height: 44px !important; font-size: 16px !important; }
  /* Cột "+" thu về 0 — chỉ còn nút + ghim mép phải, không còn cột chết phía dưới */
  .nz-class-page:has(#attendance-form) .nz-attendance-table td.attendance-add-col { width: 0; min-width: 0; padding: 0; border: 0; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table thead .attendance-add-col { position: sticky; right: 0; z-index: 6; width: 0; min-width: 0; padding: 0; border: 0; direction: rtl; overflow: visible; background: transparent; }
  .nz-class-page:has(#attendance-form) .nz-attendance-table thead .attendance-add-col .attendance-add-column { width: 38px; height: 38px; box-shadow: 0 1px 4px rgba(15, 23, 42, .18); }
}

* { box-sizing: border-box; border-color: var(--slate-200); }
html, body, #root { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; color: var(--slate-900); background: #f6f8fb; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.icon { width: 15px; height: 15px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 28px; height: 28px; }

/* Login — giữ đúng bố cục của trang đăng nhập gốc. */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, var(--brand-50), var(--slate-50), white); }
.login-wrap { width: 100%; max-width: 384px; }
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; text-align: center; }
.logo-tile { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 12px; color: white; background: var(--brand-600); box-shadow: 0 10px 20px rgba(37, 99, 235, .25); }
.login-logo h1 { margin: 0; font-size: 24px; line-height: 32px; letter-spacing: -.025em; }
.login-logo p { margin: 4px 0 0; color: var(--slate-500); font-size: 14px; }
.login-card { padding: 24px; border: 1px solid var(--slate-200); border-radius: 12px; background: white; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.login-card > h2 { margin: 0 0 16px; color: var(--slate-800); font-size: 15px; text-align: center; }
.login-form .primary-btn { width: 100%; min-height: 42px; justify-content: center; }
.login-role-list { display: grid; gap: 10px; }
.login-role-list button { width: 100%; min-height: 48px; display: grid; grid-template-columns: 22px minmax(0,1fr) 18px; gap: 10px; align-items: center; padding: 0 15px; border: 1px solid var(--slate-200); border-radius: 8px; color: var(--slate-800); background: white; font-size: 14px; font-weight: 600; text-align: left; }
.login-role-list button:hover { color: var(--brand-700); border-color: var(--brand-300); background: var(--brand-50); }
.login-role-list button:disabled { opacity: .6; cursor: wait; }
.login-role-list button.frozen,
.login-role-list button.frozen:hover,
.login-role-list button.frozen:disabled {
  color: var(--slate-400);
  border-color: var(--slate-200);
  background: var(--slate-50);
  cursor: not-allowed;
  opacity: 1;
}
.login-role-list button .icon:first-child { color: var(--brand-600); }
.login-role-list button .icon:last-child { width: 16px; color: var(--slate-400); }
.login-role-list button.frozen .icon { color: var(--slate-400); }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 6px; color: var(--slate-700); font-size: 13px; font-weight: 600; }
.field-hint { display: block; margin-top: 5px; color: var(--slate-500); font-size: 11px; }
.input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--slate-300); border-radius: 7px; color: var(--slate-900); background: white; outline: none; font-size: 14px; }
.input:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border: 0; border-radius: 8px; color: white; background: var(--brand-600); font-size: 14px; font-weight: 600; }
.primary-btn:hover { background: var(--brand-700); }
.primary-btn:disabled { opacity: .55; cursor: wait; }
.full { width: 100%; }
.login-error { min-height: 18px; margin: 12px 0 0; color: var(--red-600); font-size: 13px; text-align: center; }
.login-help { margin: 16px 0 0; color: var(--slate-500); font-size: 12px; line-height: 1.55; text-align: center; }
.login-copy { margin: 24px 0 0; color: var(--slate-400); font-size: 12px; text-align: center; }
.demo-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--slate-200); }
.demo-row button { padding: 5px 8px; border: 1px solid var(--slate-200); border-radius: 6px; color: var(--slate-600); background: white; font-size: 11px; }
.demo-row small { flex-basis: 100%; color: var(--slate-400); }

/* Admin shell — sao theo AppShell hiện có. */
.admin-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: row; overflow: hidden; }
.admin-sidebar { width: 224px; height: 100vh; height: 100dvh; flex: 0 0 224px; display: flex; flex-direction: column; border-right: 1px solid var(--slate-200); background: white; }
.student-shell .admin-sidebar { width: 268px; flex: 0 0 268px; }
.admin-brand { height: 48px; flex: 0 0 48px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--slate-200); }
.admin-brand .logo-tile { width: 22px; height: 22px; margin: 0; border-radius: 6px; box-shadow: none; }
.admin-brand .icon { width: 13px; height: 13px; }
.admin-brand strong { font-size: 13px; letter-spacing: -.015em; }
.admin-nav { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 6px; }
.nav-group { margin-bottom: 0; }
.nav-title { margin: 0; padding: 0 8px 2px; color: var(--slate-400); font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 26px; display: flex; align-items: center; gap: 6px; padding: 3px 8px; border: 0; border-radius: 6px; color: var(--slate-700); background: transparent; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; font-weight: 400; line-height: 1.2; text-align: left; }
.nav-item:hover { color: var(--slate-900); background: var(--slate-100); }
.nav-item.active { color: var(--brand-700); background: var(--brand-50); font-weight: 500; }
.nav-item.active .icon { color: var(--brand-600); }
.nav-folder { margin: 0; }
.nav-folder-heading { min-height: 26px; display: flex; align-items: center; gap: 6px; padding: 3px 8px; border: 0; border-radius: 6px; color: var(--slate-700); background: transparent; font: inherit; font-size: 13px; line-height: 1.2; text-align: left; user-select: none; }
.nav-folder.active > .nav-folder-heading { color: var(--brand-700); font-weight: 500; }
.nav-folder.active > .nav-folder-heading > .icon:first-child { color: var(--brand-600); }
.nav-folder-heading > span { min-width: 0; flex: 1; }
.nav-folder.frozen .nav-folder-heading { width: 100%; color: var(--slate-400); cursor: not-allowed; }
.nav-folder.frozen .nav-folder-heading .icon { color: var(--slate-400); }
.nav-folder-items { position: relative; display: grid; margin: 0 0 2px 12px; padding-left: 6px; }
.nav-folder-items::before { content: ""; position: absolute; inset: 2px auto 2px 0; width: 1px; background: var(--slate-200); }
.nav-folder-items .nav-item { min-height: 24px; padding: 2px 7px; font-size: 12px; }
.admin-shell:not(.student-shell) .admin-nav .icon { width: 14px; height: 14px; }
.student-shell .nav-item { min-height: 28px; padding: 4px 8px; font-size: 13px; }
.student-shell .nav-folder-heading { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.student-shell .nav-folder-items .nav-item { min-height: 26px; }
.portal-tree details.nav-folder > summary { list-style: none; cursor: pointer; }
.portal-tree details.nav-folder > summary::-webkit-details-marker { display: none; }
.portal-tree details.nav-folder > summary.nav-folder-heading:hover { color: var(--slate-900); background: var(--slate-100); }
.portal-tree .nav-folder-heading .icon:last-child { width: 14px; height: 14px; flex: 0 0 14px; color: var(--slate-400); transform: rotate(-90deg); transition: transform .16s ease; }
.portal-tree details[open] > summary > .icon:last-child { transform: rotate(0); }
.portal-tree .nav-folder-heading span, .portal-tree .nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-tree .nav-day { min-height: 28px; font-size: 12px; padding: 4px 8px; }
.portal-tree .nav-folder-items .nav-folder { margin: 0; }
.portal-tree .nav-folder-items .nav-folder-heading { min-height: 30px; font-size: 12px; }
.student-next-lesson > .card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.student-next-lesson .student-next-copy { min-width: 0; flex: 1; }
.student-next-lesson .primary-btn { flex: 0 0 auto; white-space: nowrap; }
.student-shell .admin-content { padding: 14px 16px; }
.portal-overview { display: grid; gap: 10px; align-content: start; }
.portal-overview .profile-summary-grid { gap: 8px; margin: 0; }
.portal-overview .summary-card { padding: 10px 12px; }
.portal-overview .summary-card strong { margin-top: 4px; font-size: 14px; line-height: 1.3; }
.portal-overview .student-progress { height: 4px; margin-top: 6px; }
.portal-overview .card-header { padding: 10px 14px; }
.portal-overview .card-header h2 { margin: 0; font-size: 13px; }
.portal-overview .card-header p { margin: 2px 0 0; font-size: 12px; }
.portal-overview-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 10px; min-width: 0; }
.portal-overview .profile-info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 2px 10px 8px; }
.portal-overview .profile-info-grid > div { padding: 8px 6px; }
.portal-overview .profile-info-grid dt { margin-bottom: 2px; font-size: 10px; }
.portal-overview .profile-info-grid dd { font-size: 13px; }
.portal-overview .table-wrap th { height: 32px; padding: 0 10px; }
.portal-overview .table-wrap td { padding: 8px 10px; }
.portal-overview .student-reward-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
.portal-overview .student-reward-list article { min-height: 0; padding: 10px 14px; border-bottom: 0; border-right: 1px solid var(--slate-100); }
.portal-overview .student-reward-list article:last-child { border-right: 0; }
.portal-overview .student-reward-list .primary-btn, .portal-overview .student-reward-list .secondary-btn { min-width: 88px; height: 30px; padding: 0 10px; font-size: 12px; }
.admin-topbar-user { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; margin-left: auto; padding-left: 14px; border-left: 1px solid var(--slate-200); }
.avatar { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--brand-700); background: var(--brand-100); font-size: 11px; font-weight: 600; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; line-height: 1.25; font-weight: 500; }
.user-copy small { color: var(--slate-500); font-size: 10px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 4px; border: 0; border-radius: 6px; color: var(--slate-400); background: white; }
.icon-button:hover { color: var(--brand-600); background: var(--slate-100); }
.icon-button.danger:hover { color: var(--red-600); }
.admin-workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar { height: 48px; flex: 0 0 48px; display: flex; align-items: center; gap: 8px; padding: 0 24px; border-bottom: 1px solid var(--slate-200); background: white; }
.topbar-action { height: 32px; margin-left: auto; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.admin-topbar:has(.topbar-action) .admin-topbar-user { margin-left: 0; }
.admin-page-title { min-width: 0; margin: 0; overflow: hidden; color: var(--slate-950); font-size: 14px; font-weight: 700; line-height: 1.25rem; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.admin-content { min-height: 0; flex: 1; overflow-y: auto; padding: 24px; }

.sy-catalog-table th:last-child { white-space: nowrap; padding-right: 32px; }
.sy-catalog-table td.settings-actions-cell { padding-right: 32px; }
.sy-course-units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sy-course-units li { min-width: 0; }
.sy-pay-status { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; transform: translateZ(0); }
.sy-pay-status.unpaid { color: #b45309; background: #fffbeb; }
.sy-pay-status.paid { color: #047857; background: #ecfdf5; }
.sy-pay-status.jump, .sy-status-jump { animation: sy-status-pop .45s ease; }
@keyframes sy-status-pop { 0% { transform: scale(.86); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes sy-wait-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.sy-pay-card > .card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--slate-200); }
.sy-pay-panel { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px; }
.sy-pay-panel img { width: 200px; height: 200px; border: 1px solid var(--slate-200); border-radius: 8px; background: white; }
.sy-pay-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sy-pay-click { cursor: pointer; }
.sy-pay-panel img.sy-pay-click:hover { outline: 2px solid var(--brand-500); }
.sy-pay-status.unpaid { animation: sy-wait-pulse 1.4s ease infinite; }
.sy-bank-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding: 0 20px 20px; }
.admin-content:has(.tuition-page) { display: flex; flex-direction: column; overflow: hidden; }
.tuition-page { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.tuition-list-card { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.tuition-page .people-table { max-height: none; min-height: 0; flex: 1; }
.tuition-toolbar { padding: 12px 16px 0; }
.tuition-toolbar .class-filters { margin-top: 0; max-width: none; grid-template-columns: minmax(220px,1.4fr) repeat(3, minmax(160px,1fr)); }
.tuition-hint { margin: 0; padding: 12px 16px 14px; color: var(--slate-500); font-size: 13px; border-top: 1px solid var(--slate-200); }
.tuition-modal-note { margin: 0 20px 12px; color: var(--amber-700, #b45309); font-size: 13px; }
.modal-card.tuition-collection-modal { display: flex; width: min(1180px,calc(100vw - 40px)); max-width: 1180px; max-height: calc(100dvh - 40px); flex-direction: column; }
.tuition-collection-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.tuition-modal-body { display: grid; min-height: 0; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); grid-template-areas: "student student" "collection notice"; align-items: start; gap: 14px; padding: 16px 20px; overflow-x: hidden; overflow-y: auto; }
.tuition-student-summary { display: grid; grid-area: student; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-200); }
.tuition-student-summary > div { display: flex; min-width: 0; padding: 11px 13px; flex-direction: column; background: white; }
.tuition-student-summary small, .tuition-student-summary span { overflow: hidden; color: var(--slate-500); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tuition-student-summary strong { margin: 4px 0 3px; overflow: hidden; color: var(--slate-900); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tuition-modal-section { display: grid; min-width: 0; gap: 12px; padding: 14px; border: 1px solid var(--slate-200); border-radius: 12px; background: white; }
.tuition-collection-section { grid-area: collection; }
.tuition-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.tuition-section-heading h3, .tuition-section-heading p, .tuition-notice-toolbar h3, .tuition-notice-toolbar p { margin: 0; }
.tuition-section-heading h3, .tuition-notice-toolbar h3 { color: var(--slate-900); font-size: 14px; }
.tuition-section-heading p, .tuition-notice-toolbar p { margin-top: 3px; color: var(--slate-500); font-size: 11px; }
.tuition-section-heading > strong { flex: 0 0 auto; color: var(--brand-700); font-size: 18px; }
.tuition-payment-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.tuition-payment-fields .field, .tuition-notice-toolbar .field { margin: 0; }
.tuition-paid-message { padding: 10px 12px; border-radius: 8px; color: #047857; background: #ecfdf5; font-size: 12px; }
.tuition-notice-section { grid-area: notice; border-color: #bfdbfe; background: #f8fbff; }
.tuition-notice-toolbar { display: grid; grid-template-columns: minmax(0,1fr) 190px auto; align-items: end; gap: 12px; }
.tuition-notice-toolbar > div, .tuition-notice-toolbar .field, .tuition-notice-toolbar .input { min-width: 0; }
.tuition-notice-toolbar .input { width: 100%; }
.tuition-notice-toolbar .secondary-btn { height: 38px; white-space: nowrap; }
.tuition-notice-toolbar .secondary-btn:disabled { cursor: not-allowed; opacity: .5; }
.tuition-notice-preview { display: grid; grid-template-columns: minmax(0,1fr) 132px; gap: 18px; align-items: center; padding: 14px; border: 1px solid #dbeafe; border-radius: 10px; background: white; }
.tuition-notice-copy { min-width: 0; }
.tuition-notice-copy h4 { margin: 8px 0 4px; overflow: hidden; color: var(--slate-900); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tuition-notice-copy > p { margin: 0; color: var(--slate-500); font-size: 12px; }
.tuition-notice-copy dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.tuition-notice-copy dl > div { min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--slate-50); }
.tuition-notice-copy dt { color: var(--slate-500); font-size: 10px; }
.tuition-notice-copy dd { margin: 4px 0 0; overflow: hidden; color: var(--slate-900); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tuition-notice-copy dl > div:last-child dd { color: var(--brand-700); }
.tuition-notice-copy > small { color: var(--slate-500); font-size: 11px; }
.tuition-notice-copy > small strong { color: var(--slate-800); font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
.tuition-notice-qr { display: flex; align-items: center; flex-direction: column; gap: 5px; }
.tuition-notice-qr img, .tuition-notice-no-qr { width: 116px; height: 116px; border: 1px solid var(--slate-200); border-radius: 8px; background: white; }
.tuition-notice-no-qr { display: grid; place-items: center; padding: 8px; color: var(--slate-500); font-size: 10px; line-height: 1.4; text-align: center; }
.tuition-notice-qr small { color: var(--slate-500); font-size: 10px; }
.tuition-collection-form > .settings-modal-footer { flex: 0 0 auto; background: white; }
.tuition-breakdown { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); font-size: 13px; }
.tuition-breakdown-row, .tuition-breakdown-total { display: grid; grid-template-columns: minmax(120px,1fr) minmax(150px,auto) minmax(100px,auto); align-items: center; gap: 12px; }
.tuition-breakdown-row { color: var(--slate-600); }
.tuition-breakdown-total { padding-top: 8px; border-top: 1px solid var(--slate-200); font-size: 14px; }
.tuition-breakdown-total strong { color: var(--brand-700); text-align: right; }
.tuition-page .primary-btn { height: 34px; padding: 0 12px; font-size: 13px; }
.admin-content:has(.cashbook-page) { display: flex; flex-direction: column; overflow: hidden; }
.cashbook-ledger-card { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.cashbook-ledger-card > .people-table { min-height: 0; max-height: none; flex: 1; overflow: auto; }
.cashbook-filter-bar { padding: 12px 16px; border-bottom: 1px solid var(--slate-200); }
.cashbook-page .cashbook-filters { display: flex; width: 100%; align-items: flex-end; gap: 8px; margin: 0; }
.cashbook-filters .field { margin: 0; }
.cashbook-filters .field > span { margin-bottom: 5px; font-size: 12px; }
.cashbook-page .cashbook-filters .input { height: 34px; padding: 0 9px; font-size: 12px; }
.cashbook-filter-date { flex: 0 0 165px; }
.cashbook-filter-kind { flex: 0 0 120px; }
.cashbook-filter-method { flex: 0 0 150px; }
.cashbook-filter-branch { flex: 0 0 180px; }
.cashbook-add-btn { min-height: 34px; margin-left: auto; padding: 0 12px; white-space: nowrap; }
.cashbook-table { width: 100%; min-width: 1080px; table-layout: fixed; }
.cashbook-table .cash-col-index { width: 64px; }
.cashbook-table .cash-col-date { width: 112px; }
.cashbook-table .cash-col-kind { width: 72px; }
.cashbook-table .cash-col-source { width: 88px; }
.cashbook-table .cash-col-category { width: 110px; }
.cashbook-table .cash-col-content { width: auto; }
.cashbook-table .cash-col-method { width: 112px; }
.cashbook-table .cash-col-amount { width: 130px; }
.cashbook-table .cash-col-voucher { width: 104px; }
.cashbook-table .cash-col-delete { width: 52px; }
.cashbook-table .recon-col-status { width: 116px; }
.cashbook-table .recon-col-action { width: 84px; }
.recon-approve-btn { min-height: 30px; padding: 0 12px; font-size: 12px; }
.recon-undo-btn { border-color: var(--slate-300); color: var(--slate-600); }
.recon-undo-btn:hover { border-color: var(--brand-300); color: var(--brand-700); }
.cashbook-table th, .cashbook-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cashbook-table th:not(:last-child), .cashbook-table td:not(:last-child) { border-right: 1px solid var(--slate-200); }
.cash-description-cell { min-width: 0; }
.cash-amount-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cash-voucher-cell { width: 1%; white-space: nowrap; }
.cash-voucher-btn { min-height: 30px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
.nz-student-card [data-receipt-print] { height: 32px; padding: 0 10px; font-size: 12px; }
.sy-bank-form .field { margin: 0; }
.sy-bank-row { display: flex; align-items: flex-end; gap: 10px; max-width: 680px; }
.sy-bank-row .field { flex: 1 1 0; min-width: 0; }
.sy-bank-row .primary-btn { height: 38px; flex: 0 0 auto; }
.sy-bank-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sy-bank-chip { min-height: 34px; padding: 0 12px; border: 1px solid var(--slate-300); border-radius: 999px; color: var(--slate-700); background: white; font-size: 13px; font-weight: 600; cursor: pointer; }
.sy-bank-chip:hover { border-color: var(--brand-400); color: var(--brand-700); }
.sy-bank-chip.active { border-color: var(--brand-600); color: var(--brand-700); background: var(--brand-50); }
.sy-qr-upload { display: flex; max-width: 680px; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); }
.sy-qr-preview { display: grid; width: 132px; height: 132px; flex: 0 0 132px; place-items: center; overflow: hidden; padding: 6px; border: 1px solid var(--slate-200); border-radius: 8px; color: var(--slate-500); background: white; font-size: 11px; line-height: 1.4; text-align: center; }
.sy-qr-preview img { width: 100%; height: 100%; object-fit: contain; }
.sy-qr-upload-copy { min-width: 0; }
.sy-qr-upload-copy > strong { color: var(--slate-900); font-size: 14px; }
.sy-qr-upload-copy > p { margin: 5px 0 12px; color: var(--slate-500); font-size: 12px; line-height: 1.5; }
.sy-qr-upload-copy > div { display: flex; flex-wrap: wrap; gap: 8px; }
.sy-qr-file-button { cursor: pointer; }
.sy-bank-save { display: flex; }
.settings-card:has(.sy-bank-form) { overflow: visible; }
.sy-review-table { overflow-x: hidden; }
.sy-review-table table { table-layout: fixed; width: 100%; }
.sy-review-table th:nth-child(1), .sy-review-table td:nth-child(1) { width: 48px; }
.sy-review-table th:nth-child(2), .sy-review-table td:nth-child(2) { width: 120px; }
.sy-review-table th:nth-child(4), .sy-review-table td:nth-child(4) { width: 110px; }
.sy-review-table th:nth-child(5), .sy-review-table td:nth-child(5) { width: 268px; }
.sy-review-table td { padding: 8px 10px; }
.sy-review-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sy-review-actions .input { width: 112px; min-width: 112px; max-width: 112px; height: 34px; padding: 0 8px; }
.sy-review-actions .primary-btn, .sy-review-actions .secondary-btn { height: 34px; padding: 0 10px; flex: 0 0 auto; }

/* Syllabus admin page — sao theo bảng/card gốc. */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.people-page > .page-header,
.classes-page > .page-header,
.calendar-page > .page-header,
.audit-page > .page-header { display: none; }
.page-header h1 { margin: 0; color: var(--slate-900); font-size: 20px; line-height: 28px; letter-spacing: -.02em; }
.page-header p { margin: 4px 0 0; color: var(--slate-500); font-size: 14px; }
.card { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 12px; background: white; box-shadow: 0 1px 2px rgba(15, 23, 42, .025); }
.card-header { padding: 20px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-heading h2 { margin: 0; font-size: 16px; }
.card-heading p { margin: 4px 0 0; color: var(--slate-500); font-size: 13px; }
.filter-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr; gap: 12px; margin-top: 16px; }
.filter-grid .field { margin: 0; }
.filter-grid .input { height: 34px; font-size: 13px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--slate-200); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap th { height: 42px; padding: 0 12px; color: var(--slate-500); background: var(--slate-50); font-size: 11px; font-weight: 600; letter-spacing: .03em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table-wrap td { padding: 12px; border-top: 1px solid var(--slate-200); color: var(--slate-700); vertical-align: top; }
.table-wrap tbody tr { cursor: pointer; }
.table-wrap tbody tr:hover { background: var(--slate-50); }
.cell-index { width: 42px; color: var(--slate-400); }
.syllabus-link { display: block; color: var(--brand-700); font-weight: 500; }
.code { display: block; margin-top: 2px; color: var(--brand-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.description { max-width: 310px; color: var(--slate-600); }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-green { color: var(--green-700); background: var(--green-50); }
.badge-blue { color: var(--brand-700); background: var(--brand-50); }
.badge-amber { color: #b45309; background: #fffbeb; }
.badge-slate { color: var(--slate-600); background: var(--slate-100); }
.text-red { color: #b91c1c; font-weight: 600; }
.badge-red { color: #b91c1c; background: #fef2f2; }
.trash-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #fecaca; border-radius: 6px; color: var(--red-600); background: white; }
.detail-card { max-width: 980px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.detail-top h2 { margin: 3px 0 0; font-size: 18px; }
.back-link { display: inline-flex; align-items: center; align-self: flex-start; margin: 0 0 6px; padding: 0; border: 0; color: var(--brand-700); background: transparent; font-size: 13px; font-weight: 600; text-align: left; }
.unit-stack { display: grid; gap: 10px; }
.unit-box { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 8px; }
.unit-no { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--brand-700); background: var(--brand-50); font-size: 12px; font-weight: 700; }
.unit-box strong, .unit-box small { display: block; }
.unit-box small { margin-top: 3px; color: var(--slate-500); font-size: 12px; }

/* PortalShell hiện có. */
.portal-shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--slate-50); }
.portal-header { height: 64px; flex: 0 0 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--slate-200); background: white; }
.portal-header .brand { color: var(--slate-900); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.portal-header .portal-name { color: var(--slate-800); font-size: 14px; font-weight: 600; }
.portal-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.portal-actions .icon-button { width: 44px; height: 44px; color: var(--slate-800); }
.portal-avatar { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--brand-700); background: var(--brand-50); font-size: 14px; font-weight: 700; }
.portal-body { min-height: 0; flex: 1; display: flex; }
.portal-sidebar { width: 260px; flex: 0 0 260px; display: flex; flex-direction: column; border-right: 1px solid var(--slate-200); background: white; }
.portal-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.portal-nav .nav-item { min-height: 44px; gap: 12px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
.nav-separator { height: 1px; margin: 16px 0; background: var(--slate-200); }
.portal-main { min-width: 0; flex: 1; overflow-y: auto; }
.portal-content { width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px 32px; }
.portal-content h1 { margin: 0; font-size: 20px; font-weight: 600; }
.portal-content h2 { margin: 0; font-size: 18px; font-weight: 600; }
.portal-content > p { margin: 4px 0 0; color: var(--slate-500); font-size: 14px; }
.portal-summary { margin-top: 16px; padding: 24px; border: 1px solid var(--slate-200); border-radius: 16px; background: white; }
.portal-summary > strong { display: block; font-size: 18px; }
.soft-btn { display: inline-flex; height: 32px; align-items: center; margin-top: 16px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: 12px; font-weight: 500; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 0; }
.metric-grid span { color: var(--slate-500); font-size: 14px; }
.portal-section { margin-top: 48px; }
.portal-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.text-link { border: 0; color: var(--brand-700); background: transparent; font-size: 14px; font-weight: 500; }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.portal-card { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--slate-200); border-radius: 16px; background: white; text-align: left; transition: .15s; }
.portal-card:hover { transform: translateY(-2px); border-color: var(--brand-600); }
.portal-card .overline { color: var(--slate-500); font-size: 12px; font-weight: 600; }
.portal-card strong { margin-top: 4px; color: var(--slate-900); font-size: 18px; }
.portal-card p { margin: 12px 0 0; color: var(--slate-600); font-size: 14px; }
.progress { width: 100%; height: 8px; margin-top: 16px; border: 0; border-radius: 99px; background: var(--slate-100); appearance: none; overflow: hidden; }
.progress::-webkit-progress-bar { background: var(--slate-100); }
.progress::-webkit-progress-value, .progress::-moz-progress-bar { background: var(--brand-600); }
.portal-card small { margin-top: 8px; color: var(--slate-500); }
.portal-unit { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--slate-200); }
.portal-unit:first-child { border-top: 0; }
.portal-unit input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.portal-unit .unit-copy { flex: 1; }
.portal-unit strong, .portal-unit small { display: block; }
.portal-unit strong { font-size: 14px; }
.portal-unit small { margin-top: 2px; color: var(--slate-500); font-size: 12px; }
.portal-unit .state { color: var(--slate-400); font-size: 12px; }
.portal-unit.done .state { color: var(--green-700); }

/* Student adventure portal */
.kids-portal { --kid-purple:#6558f5; --kid-purple-dark:#4c3edb; --kid-yellow:#ffc83d; --kid-cyan:#32c5ff; --kid-ink:#26324b; color:var(--kid-ink); background:#f7f8ff; }
.kids-portal .portal-header { height:68px; flex-basis:68px; padding:0 28px; border-bottom:0; box-shadow:0 3px 18px rgba(65,72,125,.08); }
.kids-brand { display:flex; align-items:center; gap:8px; padding:0; border:0; color:var(--kid-purple); background:transparent; }
.kids-brand > span { width:34px; height:34px; display:flex; align-items:center; justify-content:center; border-radius:11px; color:white; background:linear-gradient(145deg,var(--kid-purple),#8b7cff); box-shadow:0 6px 14px rgba(101,88,245,.28); }
.kids-brand strong { color:var(--kid-ink); font-size:17px; letter-spacing:.04em; }
.kids-brand small { padding:4px 7px; border-radius:99px; color:#8a5200; background:#fff1b8; font-size:9px; font-weight:800; text-transform:uppercase; }
.star-wallet { height:42px; display:grid; grid-template-columns:18px auto; grid-template-rows:20px 12px; align-items:center; column-gap:7px; padding:4px 14px; border:1px solid #ffe18a; border-radius:13px; color:#8a5200; background:#fff9df; text-align:left; }
.star-wallet .icon { grid-row:1/3; width:18px; height:18px; fill:var(--kid-yellow); stroke:#e4a900; }
.star-wallet span { font-size:14px; font-weight:800; line-height:1; }
.star-wallet small { font-size:9px; line-height:1; }
.kids-portal .portal-avatar { width:40px; height:40px; border:2px solid white; color:white; background:linear-gradient(145deg,#35b8f2,#6558f5); box-shadow:0 3px 10px rgba(76,62,219,.22); }
.kids-portal .portal-sidebar { width:250px; flex-basis:250px; border-right:0; box-shadow:5px 0 22px rgba(71,76,126,.06); }
.kid-mini-profile { display:flex; align-items:center; gap:10px; margin:18px 14px 6px; padding:12px; border-radius:15px; background:linear-gradient(135deg,#f1efff,#eef8ff); }
.kid-avatar { width:42px; height:42px; display:flex; align-items:center; justify-content:center; flex:0 0 42px; border:2px solid white; border-radius:50%; background:#c9f0ff; font-size:22px; box-shadow:0 3px 10px rgba(65,88,130,.12); }
.kid-mini-profile strong,.kid-mini-profile small { display:block; }
.kid-mini-profile strong { overflow:hidden; color:var(--kid-ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.kid-mini-profile small { margin-top:3px; color:#78829a; font-size:9px; }
.kids-portal .portal-nav { padding:12px; }
.kids-portal .portal-nav .nav-item { min-height:48px; margin-bottom:6px; padding:0 14px; border-radius:13px; color:#5d6680; font-size:13px; font-weight:650; }
.kids-portal .portal-nav .nav-item .icon { width:18px; height:18px; }
.kids-portal .portal-nav .nav-item.active { color:var(--kid-purple-dark); background:#efedff; box-shadow:inset 3px 0 var(--kid-purple); }
.kid-sidebar-goal { display:flex; align-items:center; gap:9px; margin:12px; padding:12px; border:1px solid #ffe6b1; border-radius:14px; background:#fffaf0; }
.kid-sidebar-goal > span { font-size:23px; }
.kid-sidebar-goal strong,.kid-sidebar-goal small { display:block; }
.kid-sidebar-goal strong { color:#884b13; font-size:11px; }
.kid-sidebar-goal small { margin-top:3px; color:#a57952; font-size:9px; line-height:1.35; }
.kids-portal .portal-main { background:radial-gradient(circle at 90% 2%,rgba(139,124,255,.11),transparent 28%),radial-gradient(circle at 10% 90%,rgba(50,197,255,.1),transparent 25%),#f7f8ff; }
.kids-portal .portal-content { max-width:1180px; padding:30px 34px 60px; }
.kid-page-title { margin-bottom:22px; }
.kid-page-title h1 { margin:3px 0 0; color:var(--kid-ink); font-size:27px; font-weight:800; letter-spacing:-.03em; }
.kid-page-title p { margin:6px 0 0; color:#75809a; font-size:13px; }
.kid-eyebrow { color:var(--kid-purple); font-size:9px; font-weight:850; letter-spacing:.12em; }
.kid-profile-hero { display:grid; grid-template-columns:112px minmax(0,1fr) 150px; gap:22px; align-items:center; padding:24px 28px; border-radius:22px; color:white; background:linear-gradient(125deg,#6558f5,#7568f7 55%,#3bbff1); box-shadow:0 15px 35px rgba(86,75,216,.2); }
.kid-profile-avatar { position:relative; width:98px; height:98px; display:flex; align-items:center; justify-content:center; border:4px solid rgba(255,255,255,.75); border-radius:50%; background:#c7f1ff; font-size:50px; }
.kid-profile-avatar span { position:absolute; right:-7px; bottom:-3px; padding:4px 8px; border:2px solid white; border-radius:99px; color:#755000; background:var(--kid-yellow); font-size:9px; font-weight:900; }
.kid-profile-copy h2 { margin:0; font-size:24px; }
.kid-profile-copy p { margin:5px 0 14px; color:#e9e7ff; font-size:12px; }
.kid-level { height:9px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.22); }
.kid-level span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#ffe170,#ffc83d); }
.kid-profile-copy > small { display:block; margin-top:7px; color:#e9e7ff; font-size:10px; }
.kid-star-total { display:flex; align-items:center; justify-content:center; flex-direction:column; min-height:112px; border-radius:18px; background:rgba(255,255,255,.16); backdrop-filter:blur(5px); }
.kid-star-total .icon { width:25px; height:25px; fill:var(--kid-yellow); stroke:#ffe479; }
.kid-star-total strong { margin-top:4px; font-size:30px; }
.kid-star-total span { font-size:10px; }
.kid-profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:18px; }
.kid-info-card,.kid-badge-card,.kid-reward-shop { padding:22px; border:1px solid #e8e9f6; border-radius:20px; background:white; box-shadow:0 6px 22px rgba(65,72,125,.05); }
.kid-info-card h2,.kid-badge-card h2,.kid-reward-shop h2 { margin:0; font-size:16px; }
.kid-info-card dl { display:grid; grid-template-columns:1fr 1fr; gap:0; margin:14px 0 0; }
.kid-info-card dl > div { padding:11px 4px; border-top:1px solid #f0f1f7; }
.kid-info-card dt { color:#8a93a7; font-size:9px; }
.kid-info-card dd { margin:4px 0 0; color:var(--kid-ink); font-size:12px; font-weight:700; }
.kid-badges { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-top:15px; }
.kid-badges > div { display:flex; align-items:center; flex-direction:column; padding:13px 6px; border:1px solid #ececf6; border-radius:13px; text-align:center; }
.kid-badges span { font-size:26px; }
.kid-badges strong { margin-top:6px; font-size:10px; }
.kid-badges small { margin-top:3px; color:#8b93a6; font-size:8px; }
.kid-badges .locked { filter:grayscale(1); opacity:.45; }
.kid-badges .earned { border-color:#ffe6a0; background:#fffaf0; }
.kid-reward-shop { margin-top:18px; }
.kid-section-head { display:flex; align-items:center; justify-content:space-between; }
.shop-balance { display:flex; align-items:center; gap:5px; padding:7px 11px; border-radius:99px; color:#915d00; background:#fff6d2; font-size:11px; font-weight:800; }
.shop-balance .icon { fill:var(--kid-yellow); stroke:#e2a900; }
.kid-reward-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; margin-top:17px; }
.kid-reward-grid article { display:flex; align-items:center; flex-direction:column; padding:18px 12px 13px; border:1px solid #ececf6; border-radius:16px; background:#fbfbff; text-align:center; }
.kid-reward-grid article > span { font-size:36px; }
.kid-reward-grid article strong { margin-top:8px; font-size:12px; }
.kid-reward-grid article small { margin-top:4px; color:#8a93a7; font-size:9px; }
.kid-reward-grid button { width:100%; height:34px; margin-top:12px; border:0; border-radius:9px; color:white; background:var(--kid-purple); font-size:10px; font-weight:750; }
.kid-reward-grid button:disabled { color:#9ca3b5; background:#eceef4; cursor:not-allowed; }
.kid-next-class { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 20px; border-radius:17px; color:white; background:linear-gradient(120deg,#23a6e8,#5d63ed); }
.kid-next-class > div { display:grid; grid-template-columns:34px auto; }
.kid-next-class > div > span { grid-row:1/3; font-size:28px; }
.kid-next-class strong,.kid-next-class small { display:block; }
.kid-next-class strong { font-size:13px; }.kid-next-class small { margin-top:3px; color:#e7f5ff; font-size:10px; }
.kid-next-class button { padding:9px 13px; border:0; border-radius:10px; color:#3c4daf; background:white; font-size:10px; font-weight:750; }
.kid-schedule-list { display:grid; gap:13px; margin-top:18px; }
.kid-schedule-item { display:grid; grid-template-columns:90px minmax(0,1fr) auto; gap:17px; align-items:center; padding:20px; border:1px solid #e7e9f4; border-radius:18px; background:white; box-shadow:0 5px 18px rgba(65,72,125,.04); }
.kid-schedule-item.next { border-color:#c9c4ff; box-shadow:0 8px 24px rgba(101,88,245,.1); }
.kid-date-bubble { min-height:66px; display:flex; align-items:center; justify-content:center; flex-direction:column; border-radius:14px; color:#4d42cb; background:#efedff; }
.kid-date-bubble strong { font-size:18px; }.kid-date-bubble span { margin-top:3px; font-size:8px; }
.kid-schedule-item h2 { margin:3px 0 4px; font-size:15px; }.kid-schedule-item p { margin:0; color:#67718a; font-size:11px; }.kid-schedule-item small { color:#929aad; font-size:9px; }
.kid-reminder { padding:7px 10px; border-radius:99px; color:#317542; background:#ebf9ee; font-size:9px; font-weight:700; }
.kid-tip-card { display:flex; gap:12px; margin-top:18px; padding:17px 20px; border:1px dashed #f2c96f; border-radius:16px; background:#fffaf0; }
.kid-tip-card > span { font-size:25px; }.kid-tip-card strong { color:#87571d; font-size:12px; }.kid-tip-card p { margin:4px 0 0; color:#9a7954; font-size:10px; }
.roadmap-hero { position:relative; min-height:218px; display:grid; grid-template-columns:minmax(0,1fr) 210px; overflow:hidden; padding:32px 38px; border-radius:26px; color:white; background:linear-gradient(125deg,#4f43d7,#7264f5 55%,#2fb6ef); box-shadow:0 17px 35px rgba(76,62,219,.2); }
.roadmap-hero::before,.roadmap-hero::after { position:absolute; border-radius:50%; background:rgba(255,255,255,.08); content:""; }.roadmap-hero::before { width:260px; height:260px; right:-70px; top:-110px; }.roadmap-hero::after { width:150px; height:150px; left:45%; bottom:-105px; }
.roadmap-hero > div { position:relative; z-index:1; }.roadmap-hero .kid-eyebrow { color:#dcd8ff; }
.roadmap-hero h1 { max-width:620px; margin:8px 0 0; color:white; font-size:30px; font-weight:850; line-height:1.18; letter-spacing:-.035em; }
.roadmap-hero p { max-width:620px; margin:10px 0 0; color:#e7e5ff; font-size:13px; line-height:1.55; }
.roadmap-hero-actions { display:flex; align-items:center; gap:12px; margin-top:22px; }
.roadmap-hero-actions button { height:40px; padding:0 16px; border:0; border-radius:12px; color:#4235bd; background:var(--kid-yellow); font-size:11px; font-weight:850; box-shadow:0 7px 15px rgba(39,35,109,.2); }
.roadmap-hero-actions span { display:flex; align-items:center; gap:5px; padding:8px 11px; border-radius:99px; background:rgba(255,255,255,.14); font-size:10px; font-weight:750; }.roadmap-hero-actions .icon { fill:var(--kid-yellow); stroke:#ffe37a; }
.roadmap-mascot { align-self:center; justify-self:center; font-size:90px; transform:rotate(8deg); filter:drop-shadow(0 12px 14px rgba(31,27,93,.25)); }.roadmap-mascot span { display:block; margin-top:-5px; padding:5px 9px; border-radius:99px; color:#493daf; background:white; font-size:9px; font-weight:900; text-align:center; transform:rotate(-8deg); }
.roadmap-summary { display:grid; grid-template-columns:150px 150px 150px minmax(250px,1fr); gap:10px; margin-top:14px; }
.roadmap-summary > div { display:grid; grid-template-columns:36px auto; padding:13px 15px; border:1px solid #e7e9f5; border-radius:15px; background:white; box-shadow:0 4px 15px rgba(65,72,125,.04); }.roadmap-summary > div > span { grid-row:1/3; font-size:25px; }.roadmap-summary strong,.roadmap-summary small { display:block; }.roadmap-summary strong { font-size:13px; }.roadmap-summary small { margin-top:2px; color:#8a93a7; font-size:8px; }
.roadmap-summary .roadmap-progress { display:block; }.roadmap-progress > span { display:flex; justify-content:space-between; font-size:10px; }.roadmap-progress > span strong { color:var(--kid-purple); }.roadmap-progress > div { height:8px; margin-top:9px; overflow:hidden; border-radius:99px; background:#ececf6; }.roadmap-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#6558f5,#35c1ed); transition:.3s; }
.roadmap-unit { margin-top:22px; padding:24px; border:1px solid #e7e9f5; border-radius:22px; background:white; box-shadow:0 8px 25px rgba(65,72,125,.05); }
.roadmap-unit-head { display:flex; align-items:center; gap:14px; padding-bottom:19px; border-bottom:1px solid #eff0f6; }.roadmap-unit-number { width:62px; height:62px; display:flex; align-items:center; justify-content:center; flex:0 0 62px; border-radius:18px; color:white; background:linear-gradient(145deg,#6558f5,#8d7efb); font-size:11px; font-weight:900; box-shadow:0 8px 18px rgba(101,88,245,.25); }.roadmap-unit-head h2 { margin:3px 0 0; font-size:19px; }.roadmap-unit-head p { margin:4px 0 0; color:#80899e; font-size:10px; }
.roadmap-day { display:grid; grid-template-columns:55px minmax(0,1fr); padding-top:22px; }.roadmap-day-marker { display:flex; align-items:center; flex-direction:column; }.roadmap-day-marker span { width:37px; height:37px; display:flex; align-items:center; justify-content:center; border:4px solid #dedaff; border-radius:50%; color:white; background:var(--kid-purple); font-size:12px; font-weight:850; }.roadmap-day-marker i { width:3px; flex:1; min-height:250px; margin-top:6px; border-radius:99px; background:linear-gradient(#a69dfc,#e7e5ff); }
.roadmap-day-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; }.roadmap-day-head h2 { margin:4px 0 0; font-size:18px; }.roadmap-day-head p { margin:5px 0 0; color:#858ea3; font-size:10px; }.day-status { padding:6px 10px; border-radius:99px; color:#4d42cb; background:#efedff; font-size:9px; font-weight:750; }
.roadmap-game-grid { display:grid; grid-template-columns:1fr 1fr; gap:11px; margin-top:16px; }
.roadmap-game-card { min-width:0; display:grid; grid-template-columns:52px minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px; border:1px solid #ececf6; border-radius:16px; background:#fbfbff; transition:.15s; }.roadmap-game-card:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(65,72,125,.08); }.roadmap-game-card.locked { filter:grayscale(.7); opacity:.55; }.roadmap-game-card.done { border-color:#bceaca; background:#f6fff8; }.roadmap-game-icon { width:48px; height:48px; display:flex; align-items:center; justify-content:center; border-radius:14px; font-size:24px; }.tone-purple .roadmap-game-icon { background:#ebe8ff; }.tone-blue .roadmap-game-icon { background:#e3f6ff; }.tone-orange .roadmap-game-icon { background:#fff0dc; }.tone-green .roadmap-game-icon { background:#e5f8e9; }.roadmap-game-card.done .roadmap-game-icon { color:white; background:#3cbc69; font-size:20px; font-weight:900; }
.roadmap-game-copy > span { color:var(--kid-purple); font-size:8px; font-weight:850; letter-spacing:.1em; }.roadmap-game-copy h3 { margin:3px 0 0; overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }.roadmap-game-copy p { margin:3px 0 0; overflow:hidden; color:#838ca1; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }.roadmap-game-copy small { display:flex; align-items:center; gap:3px; margin-top:6px; color:#9b6d00; font-size:8px; font-weight:750; }.roadmap-game-copy small .icon { width:10px; height:10px; fill:var(--kid-yellow); stroke:#e0a400; }
.roadmap-game-card > button { min-width:72px; height:33px; padding:0 9px; border:0; border-radius:9px; color:white; background:var(--kid-purple); font-size:9px; font-weight:750; }.roadmap-game-card.done > button { color:#277943; background:#def6e5; }.roadmap-game-card > button:disabled { color:#8c93a2; background:#e8eaf0; cursor:not-allowed; }
.roadmap-next-day { display:flex; align-items:center; gap:12px; margin:18px 0 0 55px; padding:15px; border:1px dashed #d8d9e7; border-radius:15px; background:#fafaff; opacity:.75; }.roadmap-next-day > span { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:11px; background:#ebecf3; }.roadmap-next-day strong,.roadmap-next-day small { display:block; }.roadmap-next-day strong { font-size:11px; }.roadmap-next-day small { margin-top:3px; color:#8c94a7; font-size:9px; }
.kid-game-backdrop { z-index:120; background:rgba(28,25,64,.68); backdrop-filter:blur(4px); }.kid-game-modal { position:relative; width:min(92vw,590px); padding:25px; border:3px solid white; border-radius:24px; background:#f9f9ff; box-shadow:0 24px 70px rgba(20,18,64,.38); }.kid-game-close { position:absolute; top:12px; right:12px; width:32px; height:32px; border:0; border-radius:50%; color:#687089; background:#ececf5; font-size:20px; }.kid-game-top { display:grid; grid-template-columns:58px minmax(0,1fr) auto; gap:13px; align-items:center; padding-right:30px; }.kid-game-top > span { width:56px; height:56px; display:flex; align-items:center; justify-content:center; border-radius:16px; background:#ebe8ff; font-size:29px; }.kid-game-top small { color:var(--kid-purple); font-size:8px; font-weight:850; letter-spacing:.08em; }.kid-game-top h2 { margin:4px 0 0; font-size:18px; }.kid-game-top > b { display:flex; align-items:center; gap:4px; padding:7px 10px; border-radius:99px; color:#8c5b00; background:#fff2bc; font-size:10px; }.kid-game-top > b .icon { fill:var(--kid-yellow); stroke:#dda000; }.kid-listen-button { display:block; margin:20px auto 0; padding:12px 20px; border:0; border-radius:99px; color:white; background:linear-gradient(135deg,#5a4ce7,#7f70f8); font-size:12px; font-weight:750; box-shadow:0 7px 15px rgba(88,76,222,.22); }.kid-game-question { margin-top:21px; text-align:center; }.kid-game-question > span { width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:white; background:#32b6ea; font-weight:850; }.kid-game-question h3 { margin:10px 0 0; font-size:17px; }.kid-game-options { display:grid; gap:9px; margin-top:18px; }.kid-game-options button { min-height:49px; display:grid; grid-template-columns:30px 1fr; gap:9px; align-items:center; padding:8px 13px; border:1px solid #dedfea; border-radius:12px; color:var(--kid-ink); background:white; font-size:12px; font-weight:700; text-align:left; }.kid-game-options button:hover { color:var(--kid-purple-dark); border-color:#a89ffc; background:#f1efff; transform:translateX(3px); }.kid-game-options button span { width:28px; height:28px; display:flex; align-items:center; justify-content:center; border-radius:9px; color:#6558f5; background:#efedff; font-size:10px; }.kid-game-hint { margin:15px 0 0; color:#8b93a5; font-size:9px; text-align:center; }
/* Refined student portal: quiet, content-first visual language. */
.clean-portal { --kid-purple:#2563eb; --kid-purple-dark:#1d4ed8; --kid-yellow:#f4b740; --kid-cyan:#2563eb; --kid-ink:#172033; background:#f5f7fa; }
.clean-portal .portal-header { height:60px; flex-basis:60px; border-bottom:1px solid var(--slate-200); box-shadow:none; }
.clean-portal .kids-brand { gap:10px; }.clean-portal .kids-brand strong { color:#172033; font-size:14px; letter-spacing:0; }.clean-portal .kids-brand small { padding:3px 7px; color:#526079; background:#eef1f5; font-size:9px; }
.clean-portal .star-wallet { height:36px; border-color:#e1e5eb; border-radius:8px; color:#4d596f; background:white; }.clean-portal .portal-avatar { width:34px; height:34px; border:0; background:#2563eb; box-shadow:none; }
.clean-portal .portal-sidebar { width:238px; flex-basis:238px; border-right:1px solid var(--slate-200); box-shadow:none; }.clean-portal .kid-mini-profile { margin:14px 12px 4px; padding:11px; border:1px solid #e5e8ee; border-radius:9px; background:#fafbfc; }.clean-portal .kid-avatar { width:36px; height:36px; flex-basis:36px; border:0; color:white; background:#64748b; font-size:13px; font-weight:700; box-shadow:none; }
.clean-portal .portal-nav .nav-item { min-height:42px; margin-bottom:3px; border-radius:7px; color:#526079; font-size:12px; font-weight:550; }.clean-portal .portal-nav .nav-item.active { color:#1d4ed8; background:#eef4ff; box-shadow:none; }.clean-portal .portal-main { background:#f5f7fa; }.clean-portal .portal-content { max-width:1080px; padding:28px 30px 50px; }
.clean-portal .kid-eyebrow { color:#64748b; font-size:9px; letter-spacing:.08em; }.clean-portal .kid-page-title h1 { font-size:24px; }.clean-portal .kid-page-title p { color:#64748b; }
.clean-portal .roadmap-hero { min-height:0; grid-template-columns:1fr; padding:26px 28px; border:1px solid #dce2ea; border-left:4px solid #2563eb; border-radius:11px; color:#172033; background:white; box-shadow:none; }.clean-portal .roadmap-hero::before,.clean-portal .roadmap-hero::after,.clean-portal .roadmap-mascot { display:none; }.clean-portal .roadmap-hero .kid-eyebrow { color:#2563eb; }.clean-portal .roadmap-hero h1 { margin-top:5px; color:#172033; font-size:25px; line-height:1.25; letter-spacing:-.02em; }.clean-portal .roadmap-hero p { margin-top:7px; color:#64748b; font-size:12px; }.clean-portal .roadmap-hero-actions { margin-top:18px; }.clean-portal .roadmap-hero-actions button { height:36px; padding:0 14px; border-radius:7px; color:white; background:#2563eb; box-shadow:none; font-size:11px; }.clean-portal .roadmap-hero-actions span { padding:0; color:#64748b; background:transparent; font-size:10px; font-weight:500; }
.clean-portal .roadmap-summary { grid-template-columns:145px 145px 145px minmax(230px,1fr); gap:10px; }.clean-portal .roadmap-summary > div { display:block; padding:13px 15px; border-color:#e1e5eb; border-radius:9px; box-shadow:none; }.clean-portal .roadmap-summary > div > span { display:block; color:#7a8497; font-size:9px; }.clean-portal .roadmap-summary strong { margin-top:4px; font-size:15px; }.clean-portal .roadmap-summary small { margin-top:2px; }.clean-portal .roadmap-progress > span { display:flex; }.clean-portal .roadmap-progress > div { height:6px; }.clean-portal .roadmap-progress i { background:#2563eb; }
.clean-portal .roadmap-unit { margin-top:18px; padding:21px; border-color:#dfe4eb; border-radius:11px; box-shadow:none; }.clean-portal .roadmap-unit-head { padding-bottom:16px; }.clean-portal .roadmap-unit-number { width:46px; height:46px; flex-basis:46px; border-radius:8px; background:#2563eb; box-shadow:none; font-size:14px; }.clean-portal .roadmap-unit-head h2 { font-size:17px; }.clean-portal .roadmap-day { grid-template-columns:43px minmax(0,1fr); padding-top:18px; }.clean-portal .roadmap-day-marker span { width:30px; height:30px; border:3px solid #dbeafe; background:#2563eb; }.clean-portal .roadmap-day-marker i { width:2px; background:#dbeafe; }.clean-portal .roadmap-day-head h2 { font-size:16px; }.clean-portal .day-status { padding:5px 9px; color:#1d4ed8; background:#eff6ff; }
.clean-portal .roadmap-game-grid { gap:9px; margin-top:14px; }.clean-portal .roadmap-game-card { grid-template-columns:42px minmax(0,1fr) auto; padding:13px; border-color:#e2e6ec; border-radius:9px; background:white; }.clean-portal .roadmap-game-card:hover { transform:none; border-color:#b9c7dc; box-shadow:none; }.clean-portal .roadmap-game-card.done { border-color:#b9ddc4; background:#fbfffc; }.clean-portal .roadmap-game-icon,.clean-portal .tone-purple .roadmap-game-icon,.clean-portal .tone-blue .roadmap-game-icon,.clean-portal .tone-orange .roadmap-game-icon,.clean-portal .tone-green .roadmap-game-icon { width:38px; height:38px; border-radius:7px; color:#475569; background:#eef1f5; font-size:11px; font-weight:750; }.clean-portal .roadmap-game-card.done .roadmap-game-icon { color:#18703a; background:#eaf7ee; }.clean-portal .roadmap-game-copy > span { color:#64748b; }.clean-portal .roadmap-game-copy h3 { font-size:11px; }.clean-portal .roadmap-game-card > button { min-width:66px; height:31px; border-radius:6px; background:#2563eb; }.clean-portal .roadmap-game-card.done > button { color:#1d4ed8; background:#eef4ff; }.clean-portal .roadmap-next-day { margin-left:43px; padding:12px; border-radius:8px; }.clean-portal .roadmap-next-day > span { width:30px; height:30px; border-radius:6px; font-size:11px; }
.clean-portal .kid-profile-hero,.clean-portal .kid-next-class { border:1px solid #dfe4eb; border-left:4px solid #2563eb; border-radius:10px; color:#172033; background:white; box-shadow:none; }.clean-portal .kid-profile-copy p,.clean-portal .kid-profile-copy > small,.clean-portal .kid-next-class small { color:#64748b; }.clean-portal .kid-level span { background:#2563eb; }.clean-portal .kid-star-total { border:1px solid #e2e6ec; border-radius:9px; background:#fafbfc; }.clean-portal .kid-info-card,.clean-portal .kid-badge-card,.clean-portal .kid-reward-shop,.clean-portal .kid-schedule-item { border-radius:10px; box-shadow:none; }.clean-portal .kid-reward-grid article { border-radius:8px; }.clean-portal .kid-reward-grid button,.clean-portal .kid-next-class button { border-radius:6px; color:white; background:#2563eb; }.clean-portal .kid-schedule-item.next { box-shadow:none; }

.standalone-game { min-height:100vh; overflow:auto; color:#172033; background:#f5f7fa; }.standalone-game-header { height:60px; display:flex; align-items:center; gap:14px; padding:0 28px; border-bottom:1px solid #dfe4eb; background:white; }.standalone-game-header strong { font-size:14px; }.standalone-game-header span { color:#64748b; font-size:11px; }.standalone-game-header b { display:flex; align-items:center; gap:5px; margin-left:auto; color:#8a5a00; font-size:10px; }.standalone-game-header b .icon { fill:#f4b740; stroke:#d99c22; }.standalone-game-shell { width:min(92vw,680px); margin:36px auto; padding:28px; border:1px solid #dfe4eb; border-radius:11px; background:white; }.standalone-game-title { display:flex; align-items:center; gap:12px; padding-bottom:18px; border-bottom:1px solid #e7eaf0; }.standalone-game-title > span { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:7px; color:#475569; background:#eef1f5; font-size:12px; font-weight:750; }.standalone-game-title small { color:#64748b; font-size:9px; font-weight:700; letter-spacing:.08em; }.standalone-game-title h1 { margin:4px 0 0; font-size:19px; }.standalone-listen { display:block; margin:22px auto 0; padding:9px 17px; border:0; border-radius:7px; color:white; background:#2563eb; font-size:11px; font-weight:650; }.standalone-question { margin-top:26px; }.standalone-question > span { color:#64748b; font-size:9px; font-weight:700; text-transform:uppercase; }.standalone-question h2 { margin:5px 0 0; font-size:17px; }.standalone-options { display:grid; gap:9px; margin-top:18px; }.standalone-options button { min-height:48px; display:grid; grid-template-columns:28px 1fr; gap:10px; align-items:center; padding:8px 12px; border:1px solid #dfe4eb; border-radius:8px; color:#263248; background:white; font-size:12px; font-weight:600; text-align:left; }.standalone-options button:hover { border-color:#91abd0; background:#f7faff; }.standalone-options button span { width:27px; height:27px; display:flex; align-items:center; justify-content:center; border-radius:5px; color:#1d4ed8; background:#eff6ff; font-size:10px; }.standalone-game-shell footer { display:flex; align-items:center; gap:15px; margin-top:22px; padding-top:16px; border-top:1px solid #e7eaf0; }.standalone-game-shell footer button { padding:0; border:0; color:#64748b; background:transparent; font-size:10px; }.standalone-game-shell footer small { margin-left:auto; color:#8a93a3; font-size:9px; }.standalone-result { width:min(92vw,560px); margin:70px auto; padding:40px; border:1px solid #dfe4eb; border-radius:11px; background:white; text-align:center; }.result-check { width:52px; height:52px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:white; background:#229451; font-size:25px; }.standalone-result h1 { margin:18px 0 0; font-size:23px; }.standalone-result p { margin:8px 0 0; color:#64748b; font-size:12px; }.standalone-result > div { display:flex; justify-content:center; gap:8px; margin-top:24px; }

/* Student pages deliberately reuse the Admin/Teacher shell, cards, buttons and badges. */
.student-portal-page, .student-game-page { min-width: 0; }
.student-reward-card { overflow: hidden; }
.student-reward-list { display: grid; padding: 0 20px 12px; }
.student-reward-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--slate-100); }
.student-reward-list article:last-child { border-bottom: 0; }
.student-reward-list strong, .student-reward-list small { display: block; }
.student-reward-list strong { font-size: 13px; }
.student-reward-list small { margin-top: 4px; color: var(--slate-500); font-size: 11px; }
.student-reward-list .primary-btn, .student-reward-list .secondary-btn { min-width: 112px; }
.student-progress { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: var(--slate-100); }
.student-progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand-600); }
.student-roadmap-sticky { position: sticky; top: -24px; z-index: 15; margin: -24px -24px 14px; padding: 24px 24px 12px; background: var(--slate-50); box-shadow: 0 1px 0 var(--slate-200); }
.student-roadmap-sticky .page-header { margin-bottom: 14px; }
.student-roadmap-sticky .class-summary-grid { margin-bottom: 0; }
.student-roadmap-card { overflow: hidden; }
.student-roadmap-card + .student-roadmap-card { margin-top: 14px; }
.student-unit-accordion > summary, .student-day-accordion > summary { list-style: none; cursor: pointer; }
.student-unit-accordion > summary::-webkit-details-marker, .student-day-accordion > summary::-webkit-details-marker { display: none; }
.student-unit-summary { user-select: none; }
.student-unit-summary:focus-visible, .student-day-accordion > summary:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.student-accordion-toggle { width: 30px; height: 30px; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--slate-200); border-radius: 7px; color: var(--slate-500); background: white; }
.student-accordion-toggle .icon { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform .16s ease; }
.student-unit-accordion[open] > .student-unit-summary > .student-accordion-toggle .icon, .student-day-accordion[open] > summary .student-accordion-toggle .icon { transform: rotate(0); }
.student-unit-content { background: white; }
.student-phase-block { padding: 12px 0 4px; }
.student-phase-block h3 { margin: 0; padding: 8px 20px 4px; color: var(--slate-500); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.student-day-actions { display: inline-flex; align-items: center; gap: 10px; }
.student-day-head, .student-next-day { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); background: var(--slate-50); }
.student-day-head strong, .student-day-head small, .student-next-day strong, .student-next-day small { display: block; }
.student-day-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--slate-500); font-size: 10px; }
.student-day-meta .badge { font-size: 9px; }
.student-day-head strong, .student-next-day strong { font-size: 13px; }
.student-day-head small, .student-next-day small { margin-top: 3px; color: var(--slate-500); font-size: 11px; }
.student-game-list { display: grid; padding: 8px 20px; }
.student-game-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-height: 76px; padding: 10px 0; border-bottom: 1px solid var(--slate-100); }
.student-game-row:last-child { border-bottom: 0; }
.student-game-code { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: 11px; font-weight: 700; }
.student-game-row.done .student-game-code { color: var(--green-700); background: var(--green-50); }
.student-game-row > div > small, .student-game-row > div > strong, .student-game-row > div > p { display: block; }
.student-game-row > div > small { color: var(--brand-700); font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.student-game-row > div > strong { margin-top: 3px; font-size: 13px; }
.student-game-row > div > p { margin: 3px 0 0; color: var(--slate-500); font-size: 11px; }
.student-game-row .primary-btn, .student-game-row .secondary-btn { min-width: 88px; }
.student-game-row button:disabled, .student-reward-list button:disabled { opacity: .55; cursor: not-allowed; }
.student-next-day { border-bottom: 0; }
.student-day-accordion[open] > .student-next-day { border-bottom: 1px solid var(--slate-200); }
.student-day-locked-copy { padding: 18px 20px; color: var(--slate-500); font-size: 12px; }
.student-game-page .back-link { display: inline-flex; margin-bottom: 14px; border: 0; background: transparent; }
.student-question-card, .student-game-complete { max-width: 860px; }
.student-question-card .card-header h2 { margin: 6px 0 0; font-size: 17px; }
.student-answer-list { display: grid; gap: 8px; padding: 20px; }
.student-answer-list button { min-height: 48px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--slate-800); background: white; text-align: left; }
.student-answer-list button:hover { color: var(--brand-700); border-color: var(--brand-300); background: var(--brand-50); }
.student-answer-list button span { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--brand-700); background: var(--brand-50); font-size: 11px; font-weight: 700; }
.student-answer-list button strong { font-size: 13px; }
.student-game-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--slate-200); }
.student-game-footer small { color: var(--slate-500); font-size: 11px; }
.student-game-complete { padding: 28px; }
.student-game-complete h2 { margin: 14px 0 0; font-size: 18px; }
.student-game-complete p { margin: 6px 0 0; color: var(--slate-600); font-size: 13px; }
.student-game-complete .page-actions { margin-top: 20px; }

.teacher-empty { max-width: 760px; padding: 28px; border: 1px solid var(--slate-200); border-radius: 12px; background: white; }
.teacher-empty h1 { margin: 0; font-size: 20px; }
.teacher-empty p { color: var(--slate-500); font-size: 14px; }
.teacher-metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.teacher-metric-grid .summary-card { min-width: 0; }
.teacher-metric-grid .summary-card strong { overflow-wrap: anywhere; font-size: 18px; }
.teacher-dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.teacher-panel { overflow: hidden; }
.teacher-panel .card-header, .teacher-syllabus-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--slate-200); }
.teacher-panel h2, .teacher-panel p, .teacher-syllabus-card h2, .teacher-syllabus-card p { margin: 0; }
.teacher-panel h2, .teacher-syllabus-card h2 { font-size: 17px; }
.teacher-panel p, .teacher-syllabus-card p { margin-top: 4px; color: var(--slate-500); font-size: 12px; }
.teacher-card-list, .teacher-session-list { display: grid; padding: 8px 18px 18px; }
.teacher-class-card, .teacher-session-row { display: grid; width: 100%; align-items: center; gap: 12px; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--slate-100); color: var(--slate-800); background: transparent; text-align: left; cursor: pointer; }
.teacher-class-card { grid-template-columns: 38px minmax(0,1fr) auto; }
.teacher-session-row { grid-template-columns: 112px minmax(0,1fr) auto; }
.teacher-class-card:hover, .teacher-session-row:hover { color: var(--brand-700); background: var(--brand-50); }
.teacher-class-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--brand-700); background: var(--brand-50); }
.teacher-class-card strong, .teacher-class-card small, .teacher-class-card em, .teacher-session-row strong, .teacher-session-row small, .teacher-session-row time { display: block; }
.teacher-class-card strong, .teacher-session-row strong { font-size: 13px; }
.teacher-class-card small, .teacher-session-row small { margin-top: 3px; color: var(--slate-500); font-size: 11px; }
.teacher-class-card em { margin-top: 5px; color: var(--brand-700); font-size: 11px; font-style: normal; }
.teacher-session-row time { color: var(--slate-800); font-size: 12px; font-weight: 600; }
.teacher-session-row time small { font-weight: 400; }
.teacher-empty-copy { margin: 0; padding: 20px 4px; color: var(--slate-500); font-size: 13px; }
.teacher-dashboard-tabs { margin-bottom: 14px; }.teacher-task-card { overflow: hidden; }.teacher-task-card .card-header { padding: 12px 16px; border-bottom: 1px solid var(--slate-200); }.teacher-task-card h2, .teacher-task-card p { margin: 0; }.teacher-task-card h2 { font-size: 16px; }.teacher-task-card p { color: var(--slate-500); font-size: 12px; }.teacher-task-table th:nth-child(1) { width: 6%; }.teacher-task-table th:nth-child(2) { width: 24%; }.teacher-task-table th:nth-child(3) { width: 15%; }.teacher-task-table th:nth-child(4) { width: 22%; }.teacher-task-table th:nth-child(5) { width: 8%; }.teacher-task-table th:nth-child(6) { width: 15%; }.teacher-task-table th:last-child, .teacher-task-table td:last-child { text-align: right; }.teacher-task-table td { vertical-align: middle; }.teacher-task-table tbody tr { cursor: default; }.teacher-task-action .secondary-btn { min-height: 32px; padding: 0 12px; font-size: 12px; }
.teacher-tasks .teacher-metric-grid { margin-bottom: 14px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.teacher-tasks-card { overflow: hidden; }
.teacher-tasks-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.teacher-task-filter { width: 196px; margin: 0; }
.teacher-task-filter > span { margin-bottom: 4px; font-size: 11px; }
.teacher-task-filter .input { height: 34px; font-size: 13px; }
.teacher-my-tasks-table th,
.teacher-my-tasks-table td { white-space: nowrap; vertical-align: middle; }
.teacher-my-tasks-table th:nth-child(1) { width: 48px; }
.teacher-my-tasks-table th:nth-child(2) { width: 108px; }
.teacher-my-tasks-table th:nth-child(3) { width: 96px; }
.teacher-my-tasks-table th:nth-child(4) { width: auto; }
.teacher-my-tasks-table th:nth-child(6) { width: 64px; }
.teacher-my-tasks-table td:nth-child(4) { white-space: normal; }
.teacher-my-tasks-table .people-subline { display: block; margin-top: 2px; }
.teacher-my-tasks-table tr.is-done td { color: var(--slate-500); }
.teacher-syllabus-card { overflow: hidden; }
.teacher-syllabus-card .card-header .code { margin-bottom: 7px; }
.teacher-unit-stack { display: grid; gap: 10px; padding: 16px; }
.teacher-unit { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 10px; background: white; }
.teacher-unit summary { display: grid; grid-template-columns: 80px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.teacher-unit summary::-webkit-details-marker { display: none; }
.teacher-unit summary:hover { background: var(--slate-50); }
.teacher-unit summary > span { color: var(--brand-700); font-size: 11px; font-weight: 700; }
.teacher-unit summary > strong { font-size: 14px; }
.teacher-unit summary > small { color: var(--slate-500); font-size: 11px; }
.teacher-unit-overview { margin: 0; padding: 0 16px 14px; color: var(--slate-600); font-size: 12px; }
.teacher-day-list { display: grid; gap: 1px; padding: 1px; background: var(--slate-200); }
.teacher-day { padding: 14px 16px; background: var(--slate-50); }
.teacher-day > div:first-child { display: flex; align-items: baseline; gap: 9px; margin-bottom: 9px; }
.teacher-day > div:first-child b { color: var(--brand-700); font-size: 12px; }
.teacher-day > div:first-child span { font-size: 13px; font-weight: 600; }
.teacher-day > p { margin: 0; color: var(--slate-500); font-size: 12px; }
.teacher-lesson { margin-top: 8px; padding: 11px 12px; border: 1px solid var(--slate-200); border-radius: 8px; background: white; }
.teacher-lesson > strong, .teacher-lesson > small { display: block; }
.teacher-lesson > strong { font-size: 13px; }
.teacher-lesson > span { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.teacher-lesson em { padding: 3px 7px; border-radius: 99px; color: var(--brand-700); background: var(--brand-50); font-size: 10px; font-style: normal; font-weight: 600; }
.teacher-lesson > small { margin-top: 8px; color: var(--slate-500); font-size: 11px; }
.teacher-lesson ol { margin: 8px 0 0; padding-left: 20px; color: var(--slate-600); font-size: 11px; }

.loading { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--slate-500); font-size: 14px; }
.bootstrap-error { min-height: 100vh; display: grid; place-items: center; padding: 24px; color: var(--slate-800); background: var(--slate-50); }
.bootstrap-error section { width: min(100%,460px); padding: 28px; border: 1px solid var(--slate-200); border-radius: 14px; background: white; text-align: center; box-shadow: 0 14px 40px rgba(15,23,42,.08); }
.bootstrap-error h1 { margin: 0; font-size: 20px; }
.bootstrap-error p { margin: 10px 0 18px; color: var(--slate-500); line-height: 1.55; }
.bootstrap-error small { display: block; margin-top: 12px; color: var(--slate-400); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--slate-200); border-top-color: var(--brand-600); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 300; transform: translateY(18px); padding: 10px 14px; border-radius: 8px; color: white; background: var(--slate-900); opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 10px 25px rgba(15,23,42,.2); font-size: 13px; }
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-menu { display: none; }
.backdrop { display: none; }

/* Complete Syllabus workspace */
.link-button { padding: 0; border: 0; background: transparent; text-align: left; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.mini-btn { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--slate-200); border-radius: 6px; color: var(--slate-600); background: white; }
.mini-btn:hover { color: var(--brand-700); border-color: var(--brand-300); background: var(--brand-50); }
.empty-cell { padding: 40px; color: var(--slate-500); text-align: center; }
.secondary-btn, .danger-btn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--slate-700); background: white; font-size: 13px; font-weight: 600; }
.danger-btn { color: var(--red-600); border-color: #fecaca; }
.secondary-btn:hover { border-color: var(--brand-300); color: var(--brand-700); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,23,42,.52); }
.modal-card { width: 100%; max-width: 620px; overflow: hidden; border-radius: 14px; background: white; box-shadow: 0 24px 80px rgba(15,23,42,.3); }
.modal-card.payroll-detail { max-height: min(90vh, 820px); display: flex; flex-direction: column; }
.payroll-detail-body { min-height: 0; overflow: auto; }
.payroll-session-list { padding: 0 20px 16px; }
.payroll-session-list h3 { margin: 0 0 10px; color: var(--slate-700); font-size: 13px; font-weight: 600; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px; border-bottom: 1px solid var(--slate-200); }
.modal-head h2, .modal-head p { margin: 0; }.modal-head h2 { font-size: 18px; }.modal-head p { margin-top: 4px; color: var(--slate-500); font-size: 13px; }
.close-btn { border: 0; color: var(--slate-500); background: transparent; font-size: 26px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }.form-grid.padded, .modal-card .form-grid { padding: 20px; }.form-grid .field { margin: 0; }.span-2 { grid-column: 1 / -1; }
.textarea { height: auto; min-height: 70px; padding-top: 9px; padding-bottom: 9px; resize: vertical; line-height: 1.45; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.sy-detail { min-height: calc(100vh - 96px); margin: -24px; display: flex; flex-direction: column; background: #f8fafc; }
.sy-detail-header { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--slate-200); background: white; }
.sy-detail-header h1 { margin: 5px 0 0; font-size: 20px; }.sy-detail-header p { margin: 3px 0 0; color: var(--slate-500); font-size: 13px; }
.sy-tabs { display: flex; gap: 4px; padding: 8px 22px; border-bottom: 1px solid var(--slate-200); background: white; }
.sy-tabs button { padding: 7px 12px; border: 0; border-radius: 7px; color: var(--slate-500); background: transparent; font-size: 13px; font-weight: 600; }
.sy-tabs button.active { color: var(--brand-700); background: var(--brand-50); }
.overview-wrap { max-width: 880px; width: 100%; padding: 20px; }
.sy-workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: 272px minmax(0,1fr); }
.sy-workspace > aside { border-right: 1px solid var(--slate-200); background: white; overflow-y: auto; }
.sy-panel { min-width: 0; padding: 18px; overflow-y: auto; }
.sy-overview { display: grid; align-content: start; gap: 8px; min-width: 0; width: 100%; max-width: 100%; }
.sy-spiral { min-width: 0; max-width: 100%; overflow: hidden; }
.sy-spiral-head { min-width: 0; }
.sy-spiral-scroll { overflow-x: auto; overflow-y: hidden; max-width: 100%; padding-bottom: 8px; }
.sy-overview-info { padding: 12px 14px; }
.sy-overview-info h1 { margin: 0; font-size: 16px; }
.sy-overview-info > p { margin: 4px 0 0; }
.sy-overview-tags { margin-top: 8px; }
.sy-overview-info form { margin-top: 10px; }
.sy-overview-courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sy-overview-courses article { padding: 10px 12px; }
.sy-overview-courses h2 { margin: 2px 0 0; font-size: 15px; }
.sy-overview-courses p { margin: 4px 0 0; }
.sy-overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sy-overview-stats > div { padding: 10px 12px; }
.sy-overview-stats strong { display: block; font-size: 20px; line-height: 1.2; }
.sy-overview-stats span { display: block; margin-top: 2px; color: var(--slate-500); font-size: 12px; }
.sy-vocab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sy-vocab-grid textarea { min-width: 0; overflow: hidden; resize: none; }
.sy-day-split { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; min-width: 0; }
.sy-day-split > * { display: flex; flex-direction: column; flex: 1 1 18rem; min-width: min(18rem, 100%); }
.sy-day-split textarea { flex: 1 1 auto; min-height: 140px; overflow: auto; }
.sy-lang-map { min-width: 0; padding-top: 4px; }
.sy-lang-table { width: 100%; border-collapse: collapse; background: white; }
.sy-lang-table th, .sy-lang-table td { padding: 7px 10px; border: 1px solid var(--slate-200); vertical-align: top; text-align: left; }
.sy-lang-table thead th { color: var(--slate-500); background: var(--slate-50); font-size: 12px; font-weight: 600; }
.sy-lang-table thead tr:first-child th { color: var(--slate-700); font-size: 13px; font-weight: 700; }
.sy-lang-table tbody th { width: 180px; color: var(--slate-600); background: white; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sy-lang-table textarea { min-height: 22px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.sy-lang-table textarea:focus { border: 0; box-shadow: none; }
.sy-prod-table { width: 100%; margin-top: 12px; border-collapse: collapse; background: white; table-layout: fixed; }
.sy-prod-table th, .sy-prod-table td { padding: 7px 10px; border: 1px solid var(--slate-200); vertical-align: top; text-align: left; }
.sy-prod-table thead th { color: var(--slate-500); background: var(--slate-50); font-size: 12px; font-weight: 600; }
.sy-prod-table thead tr:first-child th { color: var(--slate-700); font-size: 13px; font-weight: 700; }
.sy-prod-table textarea { width: 100%; min-height: 88px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; resize: none; overflow: hidden; }
.sy-prod-table textarea:focus { border: 0; box-shadow: none; outline: none; }
.sy-dna { min-width: 0; padding-top: 4px; }
.sy-dna-table { width: 100%; border-collapse: collapse; background: white; }
.sy-dna-table th, .sy-dna-table td { padding: 7px 10px; border: 1px solid var(--slate-200); vertical-align: top; text-align: left; }
.sy-dna-table thead th { color: var(--slate-500); background: var(--slate-50); font-size: 12px; font-weight: 600; }
.sy-dna-table thead tr:first-child th { color: var(--slate-700); font-size: 13px; font-weight: 700; }
.sy-dna-table tbody th { width: 200px; color: var(--slate-600); background: white; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sy-dna-tree { display: inline-block; width: 14px; margin-right: 6px; color: var(--slate-400); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 400; }
.sy-dna-table textarea { min-height: 22px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.sy-dna-table textarea:focus { border: 0; box-shadow: none; }
.sy-dna-story { display: grid; gap: 6px; }
.sy-dna-story-row { display: flex; align-items: flex-start; gap: 8px; }
.sy-dna-story-row textarea { min-width: 0; flex: 1; cursor: pointer; }
.sy-dna-story-row textarea:hover { color: var(--brand-700); }
.sy-dna-play { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; padding: 0; border: 0; background: transparent; color: var(--slate-400); cursor: pointer; }
.sy-dna-play:hover { color: var(--brand-700); }
.sy-dna-play:disabled { color: var(--slate-300); cursor: default; }
.sy-dna-url { width: 100%; padding: 0; border: 0; background: transparent; color: var(--slate-400); font-size: 11px; }
.sy-dna-url:focus { outline: none; color: var(--slate-600); }
.sy-dna-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0f172a; }
.sy-dna-player iframe, .sy-dna-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sy-dna-phonics { display: flex; align-items: center; gap: 10px; }
.sy-dna-letters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sy-dna-letter { min-width: 28px; padding: 2px 8px; border: 1px solid var(--slate-200); border-radius: 6px; background: white; color: var(--slate-700); font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.sy-dna-letter:hover { color: var(--brand-700); border-color: var(--brand-200); }
.sy-dna-phonics-store { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }
.sy-aids { display: grid; gap: 8px; }
.sy-aids-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sy-aid { display: flex; min-width: 0; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.sy-aid img { width: 100%; height: 72px; object-fit: contain; border: 1px solid var(--slate-200); border-radius: 8px; background: #fff; }
.sy-aid-file { height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--slate-200); border-radius: 8px; background: var(--slate-50); color: var(--brand-700); font-size: 10px; font-weight: 700; }
.sy-aid-file.exam { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.sy-aid strong { overflow: hidden; color: var(--slate-600); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sy-aid-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 6px; align-items: center; }
.sy-aid-row input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--slate-600); font-size: 12px; }
.sy-aid-row input:focus { outline: none; color: var(--slate-900); }
.sy-aid-remove { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; color: var(--slate-400); background: transparent; cursor: pointer; }
.sy-aid-remove:hover { color: #dc2626; background: #fef2f2; }
.sy-aid-add { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 0; border: 0; background: transparent; color: var(--brand-700); font-size: 12px; font-weight: 600; cursor: pointer; }
.sy-flashcard { display: block; width: 100%; height: 220px; padding: 0; border: 0; background: transparent; perspective: 900px; -webkit-perspective: 900px; }
.sy-flashcard-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 0.5s; }
.sy-flashcard.is-flipped .sy-flashcard-inner { transform: rotateY(180deg); }
.sy-flashcard-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgb(15 23 42 / 6%); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sy-flashcard-front { z-index: 2; }
.sy-flashcard-back { transform: rotateY(180deg); }
.sy-flashcard img { width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.sy-flashcard-empty { color: var(--slate-400); font-size: 16px; font-weight: 600; }
.sy-flashcard-word { font-size: 2.25rem; font-weight: 600; letter-spacing: 0.025em; color: #0f172a; line-height: 1.2; }
.sy-plan-list { background: transparent; }
.sy-plan-row + .sy-plan-row { border-top: 1px solid var(--slate-100); }
.sy-plan-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: transparent; color: var(--slate-700); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.sy-plan-head:hover { background: var(--slate-50); }
.sy-plan-row.open .sy-plan-head { color: var(--brand-700); background: var(--brand-50); }
.sy-plan-body { padding: 0 12px 12px 32px; }
.sy-plan-text, .sy-plan-body textarea.sy-plan-text {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0;
  color: var(--slate-600);
  line-height: 1.55;
  white-space: pre-wrap;
}
.sy-plan-text:focus, .sy-plan-body textarea.sy-plan-text:focus {
  border: 0 !important;
  outline: none;
  box-shadow: none !important;
}
.sy-plan-store { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }
.sy-speak-table { width: 100%; border-collapse: collapse; background: white; }
.sy-speak-table th, .sy-speak-table td { padding: 6px 8px; border: 1px solid #cbd5e1; vertical-align: top; text-align: left; }
.sy-speak-table thead th { color: white; background: #1e3a5f; font-size: 11px; font-weight: 700; }
.sy-speak-table tbody th { width: 28%; color: #334155; background: transparent; font-size: 11px; font-weight: 700; }
.sy-speak-table tbody td { color: #334155; font-size: 12px; line-height: 1.45; }
.sy-speak-table tbody tr:nth-child(even) { background: #f1f5f9; }
.sy-speak-table tbody tr.active { background: #dbeafe; }
.sy-speak-table textarea { min-height: 22px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.sy-speak-table textarea:focus { border: 0; box-shadow: none; }
.sy-plan-audio { display: flex; align-items: flex-start; gap: 10px; }
.sy-plan-audio textarea { min-width: 0; flex: 1; }
.sy-audio-play { display: inline-flex; height: 32px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; margin-top: 1px; padding: 0 12px; border: 0; border-radius: 999px; color: var(--brand-700); background: var(--brand-50); font-size: 12px; font-weight: 700; cursor: pointer; }
.sy-audio-play:hover { background: #dbeafe; }
.sy-tree { padding: 10px; }.tree-section { margin-top: 3px; }
.tree-item { width: 100%; display: flex; flex-direction: column; align-items: flex-start; padding: 8px 10px; border: 0; border-radius: 7px; color: var(--slate-600); background: transparent; font-size: 13px; text-align: left; }
.tree-item:hover { background: var(--slate-100); }.tree-item.active { color: var(--brand-700); background: var(--brand-50); }.tree-item small { margin-top: 2px; color: var(--slate-400); font-size: 9px; letter-spacing: .05em; }
.tree-unit { font-weight: 600; }.tree-day { padding-left: 22px; font-size: 12px; }
.editor-card { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 12px; background: white; box-shadow: 0 1px 3px rgba(15,23,42,.04); }.editor-card.padded, .editor-card .padded { padding: 20px; }
.editor-card > h2, .editor-card.padded > h2 { margin: 0; font-size: 17px; }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); }.editor-head h2, .editor-head p { margin: 0; }.editor-head h2 { font-size: 16px; }.editor-head p { margin-top: 3px; color: var(--slate-500); font-size: 12px; }
.muted { color: var(--slate-500); font-size: 13px; }.empty-state { padding: 40px; border: 1px solid var(--slate-200); border-radius: 12px; color: var(--slate-500); background: white; text-align: center; }
.add-panel, .inline-form { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 16px; padding: 14px; border: 1px dashed var(--brand-300); border-radius: 12px; background: rgba(239,246,255,.55); }.add-panel .field, .inline-form .field { margin: 0; }.grow { flex: 1; }.small-input { width: 90px; }
.outline-list { display: grid; gap: 8px; margin-top: 16px; }.outline-list button { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--slate-200); border-radius: 8px; color: var(--slate-700); background: white; text-align: left; }.outline-list small { color: var(--slate-500); }
.subsection, .lesson-block { padding: 18px; border-top: 1px solid var(--slate-200); }.subsection h3 { margin: 0 0 12px; font-size: 15px; }
.day-list { display: grid; gap: 6px; }.day-list button { display: grid; grid-template-columns: 85px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--slate-200); border-radius: 7px; color: var(--slate-700); background: white; text-align: left; }.day-list span { color: var(--brand-700); font-size: 12px; font-weight: 700; }
.skill-checks { display: flex; flex-wrap: wrap; gap: 18px; }.skill-checks label { display: flex; align-items: center; gap: 6px; color: var(--slate-700); font-size: 13px; }.skill-checks input { accent-color: var(--brand-600); }
.block-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }.block-title h3 { margin: 0; font-size: 15px; }.block-title span { color: var(--slate-500); font-size: 12px; }
.resource-form { display: grid; grid-template-columns: 150px 1fr 1.4fr 1fr auto; gap: 8px; }.resource-list { margin-top: 12px; }.resource-list article { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--slate-100); }.resource-list strong, .resource-list small { display: block; }.resource-list small { margin-top: 2px; color: var(--slate-500); }.resource-list a { color: var(--brand-700); }.resource-list p { margin: 3px 0 0; color: var(--slate-600); font-size: 12px; }
.exercise-grid { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 14px; }.exercise-list { display: grid; align-content: start; gap: 6px; }.exercise-list button { display: flex; flex-direction: column; align-items: flex-start; padding: 10px; border: 1px solid var(--slate-200); border-radius: 8px; color: var(--slate-700); background: white; text-align: left; }.exercise-list button.active { border-color: var(--brand-300); background: var(--brand-50); }.exercise-list span { color: var(--brand-700); font-size: 9px; font-weight: 700; letter-spacing: .05em; }.exercise-list strong { margin-top: 3px; font-size: 13px; }.exercise-list small { margin-top: 2px; color: var(--slate-500); }
.exercise-editor { padding: 14px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); }.exercise-preview { margin: 14px 0; padding: 16px; border: 1px solid var(--slate-200); border-radius: 9px; background: white; }.exercise-preview > span { color: var(--brand-700); font-size: 10px; font-weight: 700; text-transform: uppercase; }.exercise-preview h4 { margin: 5px 0; }.exercise-preview p, .exercise-preview div { color: var(--slate-600); font-size: 13px; white-space: pre-wrap; }
.inline-loading { min-height: 300px; }
.admin-content.sy-react-detail { padding: 0; overflow: hidden; }
.sy-day-add-control { display: flex; height: 0; align-items: center; justify-content: center; overflow: hidden; opacity: 0; pointer-events: none; transition: height .15s ease, opacity .15s ease; }
.sy-day-tree-item:hover > .sy-day-add-control { height: 20px; opacity: 1; pointer-events: auto; }
.sy-empty-unit-add-control { display: flex; height: 0; align-items: center; justify-content: center; overflow: hidden; opacity: 0; pointer-events: none; transition: height .15s ease, opacity .15s ease; }
.sy-unit-tree-item:hover > .sy-empty-unit-add-control { height: 24px; opacity: 1; pointer-events: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 16px 0; }.stats-grid article { padding: 16px; border: 1px solid var(--slate-200); border-radius: 11px; background: white; }.stats-grid strong, .stats-grid span { display: block; }.stats-grid strong { font-size: 24px; }.stats-grid span { margin-top: 3px; color: var(--slate-500); font-size: 12px; }
.sequence-list { margin-top: 12px; }.sequence-list div, .portal-outline { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--slate-100); font-size: 13px; }.sequence-list small, .portal-outline small { color: var(--slate-500); }
.portal-sy-view { display: grid; grid-template-columns: 240px minmax(0,1fr); margin-top: 16px; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 14px; background: white; }.portal-sy-view > aside { border-right: 1px solid var(--slate-200); }.portal-sy-pane { min-width: 0; padding: 22px; }.portal-sy-pane > h2 { margin: 4px 0 8px; }.portal-sy-pane > p { color: var(--slate-600); line-height: 1.6; }.portal-sy-pane .stats-grid { grid-template-columns: repeat(3,1fr); }
.portal-lesson { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--slate-200); }.portal-lesson h3 { margin: 20px 0 8px; font-size: 15px; }.portal-lesson p, .portal-lesson li { color: var(--slate-600); font-size: 13px; line-height: 1.6; }.skill-tags { display: flex; gap: 6px; }.skill-tags span { padding: 3px 8px; border-radius: 99px; color: var(--brand-700); background: var(--brand-50); font-size: 10px; font-weight: 700; }
.vocab-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }.vocab-grid article { padding: 12px; border: 1px solid var(--slate-200); border-radius: 8px; }.vocab-grid strong, .vocab-grid span { display: block; }.vocab-grid span { margin-top: 4px; color: var(--slate-500); font-size: 12px; }
.portal-resources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }.portal-resources a { padding: 9px 11px; border: 1px solid var(--brand-100); border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: 12px; font-weight: 600; }.portal-resources small { color: var(--slate-500); }
.portal-exercises { display: grid; gap: 12px; margin-top: 18px; }.portal-exercise { padding: 16px; border: 1px solid var(--slate-200); border-radius: 10px; }.portal-exercise > span { color: var(--brand-700); font-size: 10px; font-weight: 700; }.portal-exercise h4 { margin: 5px 0; }.portal-exercise p, .exercise-body { color: var(--slate-600); font-size: 13px; white-space: pre-wrap; }.portal-exercise img { max-width: 100%; margin-top: 10px; border-radius: 8px; }.portal-exercise audio { width: 100%; margin-top: 10px; }.portal-question { display: grid; gap: 5px; margin-top: 12px; font-size: 13px; }.portal-question span { color: var(--slate-600); }

/* Activity engines: admin builder, Portal cards and isolated student player. */
.activity-builder { position: relative; }
.activity-icon, .portal-game-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--brand-700); background: var(--brand-50); }
.activity-icon { width: 32px; height: 32px; }.activity-number { display: inline-flex; width: 30px; height: 30px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: 12px; font-weight: 700; }
.portal-unit-block + .portal-unit-block { margin-top: 10px; }.portal-games { display: grid; gap: 8px; margin: 0 12px 14px 48px; padding: 12px; border: 1px solid var(--slate-200); border-top: 0; border-radius: 0 0 12px 12px; background: #f8fafc; }.portal-games > p { margin: 0 0 2px; color: var(--slate-500); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }.portal-game { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--slate-200); border-radius: 10px; color: var(--slate-900); background: white; text-align: left; cursor: pointer; }.portal-game:hover { border-color: var(--brand-300); box-shadow: 0 4px 14px rgba(37,99,235,.08); }.portal-game-icon { width: 30px; height: 30px; }.portal-game-icon svg { width: 15px; }.portal-game > span:nth-child(2) { min-width: 0; flex: 1; }.portal-game strong, .portal-game small { display: block; }.portal-game small { margin-top: 2px; color: var(--slate-500); font-size: 11px; text-transform: capitalize; }.portal-game-play { color: var(--brand-700); font-size: 12px; font-weight: 700; }
.activity-preview-page { min-height: 100vh; color: #0f172a; background: linear-gradient(145deg,#eff6ff 0%,#f8fafc 45%,#ecfeff 100%); }.activity-preview-header { position: sticky; top: 0; z-index: 20; display: flex; height: 64px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--slate-200); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }.activity-preview-header > div { display: flex; flex-direction: column; align-items: center; }.activity-preview-header strong { font-size: 14px; }.activity-preview-header span { color: var(--slate-500); font-size: 11px; }.activity-preview-content { width: min(100% - 32px,1000px); margin: 0 auto; padding: 36px 0 64px; }
.activity-stage { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 20px; background: white; box-shadow: 0 20px 60px rgba(15,23,42,.10); }.activity-stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 30px; color: white; background: linear-gradient(135deg,#2563eb,#4f46e5); }.activity-stage-head span:first-child { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .82; }.activity-stage-head h1 { margin: 5px 0; font-size: 25px; }.activity-stage-head p { margin: 0; opacity: .9; }.activity-stars { flex: 0 0 auto; padding: 7px 11px; border-radius: 99px; background: rgba(255,255,255,.18); font-size: 13px; font-weight: 700; }.activity-game { min-height: 420px; padding: 36px 30px; }.activity-progress { display: inline-flex; padding: 5px 9px; border-radius: 99px; color: var(--brand-700); background: var(--brand-50); font-size: 11px; font-weight: 700; }.activity-option { min-height: 52px; padding: 12px 15px; border: 2px solid var(--slate-200); border-radius: 12px; color: var(--slate-800); background: white; text-align: left; cursor: pointer; transition: .15s; }.activity-option:hover { border-color: var(--brand-300); }.activity-option.selected { border-color: var(--brand-600); color: var(--brand-700); background: var(--brand-50); }.activity-option:disabled { opacity: .55; cursor: default; }.activity-flash-stack { display: flex; max-width: 420px; margin: 20px auto 16px; flex-direction: column; align-items: center; }
.activity-flash-wrap { position: relative; width: 100%; margin: 0; perspective: 900px; }
.activity-flashcard { display: block; width: 100%; height: 280px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.activity-flash-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s; }
.activity-flashcard.revealed .activity-flash-inner { transform: rotateY(180deg); }
.activity-flash-face { position: absolute; inset: 0; display: flex; overflow: hidden; align-items: center; justify-content: center; border: 1px solid var(--slate-200); border-radius: 20px; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.activity-flash-back { transform: rotateY(180deg); }
.activity-flashcard img { width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.activity-flashcard strong { margin: 0; }
.activity-speak { display: inline-flex; min-width: 120px; height: 44px; align-items: center; justify-content: center; gap: 8px; margin: 12px auto 0; padding: 0 16px; border: 0; border-radius: 999px; color: var(--brand-700); background: var(--brand-50); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.activity-speak:hover { background: #dbeafe; }.activity-sentence, .activity-reader { min-height: 110px; padding: 22px; border: 1px solid var(--slate-200); border-radius: 14px; background: #f8fafc; white-space: pre-wrap; line-height: 1.75; }.activity-token { padding: 9px 13px; border: 1px solid var(--brand-200); border-radius: 9px; color: var(--brand-700); background: var(--brand-50); font-weight: 600; cursor: pointer; }.activity-reader { min-height: 260px; margin: 18px 0; font-size: 17px; }.activity-media { width: 100%; max-height: 420px; border-radius: 14px; background: #0f172a; }.activity-record { display: inline-flex; width: 150px; height: 150px; margin-top: 28px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 50%; color: white; background: var(--brand-600); cursor: pointer; box-shadow: 0 0 0 10px var(--brand-50); }.activity-record.recording { background: #dc2626; animation: activity-pulse 1.4s infinite; }.activity-record svg { width: 30px; height: 30px; }.activity-record span { font-size: 12px; font-weight: 700; }.activity-result { display: flex; min-height: 420px; flex-direction: column; align-items: center; justify-content: center; color: var(--slate-700); text-align: center; }.activity-result > svg { color: #f59e0b; }.activity-result h2 { margin: 12px 0 0; font-size: 26px; }.activity-result strong { margin: 8px 0; color: var(--brand-700); font-size: 42px; }.activity-result p { margin: 0 0 5px; }.activity-result small { margin-bottom: 20px; color: var(--slate-500); }
@keyframes activity-pulse { 50% { box-shadow: 0 0 0 18px rgba(220,38,38,.12); } }

/* Settings mirrors the original NZ LMS card, tab, table and modal language. */
.settings-sticky { position: sticky; top: -24px; z-index: 20; margin: -24px -24px 20px; padding: 0 24px; background: var(--slate-50); }.settings-tabs { display: flex; width: 100%; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); }.settings-tabs button { flex: 0 0 auto; margin-bottom: -1px; padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--slate-500); background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }.settings-tabs button:hover { color: var(--slate-800); border-bottom-color: var(--slate-300); }.settings-tabs button.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }.settings-card-header { border-bottom: 1px solid var(--slate-200); }.settings-card .table-wrap { border-top: 0; }.settings-card tbody tr { cursor: default; }.settings-card td strong { color: var(--slate-900); font-weight: 600; }.settings-actions-cell { width: 1%; text-align: right !important; white-space: nowrap; }.settings-row-actions { justify-content: flex-end; }.settings-row-actions .trash-btn { width: 30px; height: 30px; border-radius: 6px; }.settings-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--slate-200); }.settings-card .field small { display: block; margin-top: 5px; color: var(--slate-400); font-size: 11px; }.settings-card .primary-btn:disabled { cursor: not-allowed; }
.tabular { font-variant-numeric: tabular-nums; }.people-page { display: flex; min-height: 0; flex: 1; flex-direction: column; }.people-card-header { display: block; }.people-filters { display: grid; grid-template-columns: minmax(200px,1.2fr) repeat(3, minmax(140px,1fr)); align-items: end; gap: 12px; margin-top: 16px; }.people-filter-actions { display: flex; align-items: center; gap: 8px; min-height: 42px; }.people-filter-actions .text-btn { padding: 8px 4px; border: 0; color: var(--brand-700); background: transparent; font-weight: 600; white-space: nowrap; }.people-filter-actions .text-btn:hover { text-decoration: underline; }.people-filters.teacher-filter { grid-template-columns: minmax(280px,1fr) auto; max-width: 720px; }.people-filters .field { margin: 0; }.people-table { max-height: calc(100vh - 310px); overflow: auto; }.people-table th { position: sticky; top: 0; z-index: 2; }.people-table td { vertical-align: middle; }.people-table td.code { display: table-cell; margin-top: 0; vertical-align: middle; }.people-name { color: var(--brand-700) !important; }.people-subline { display: block; margin-top: 3px; color: var(--slate-500); font-size: 11px; }.people-modal { max-width: 760px; }.student-status-select { min-width: 126px; padding: 6px 28px 6px 9px; border: 1px solid var(--slate-200); border-radius: 99px; font-size: 11px; font-weight: 700; outline: 0; }.student-status-select:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.12); }.status-unassigned { color: #475569; background: #f1f5f9; }.status-studying { color: #047857; background: #ecfdf5; }.status-paused { color: #b45309; background: #fffbeb; }.status-reserved { color: #6d28d9; background: #f5f3ff; }.class-chip { display: inline-flex; margin: 2px; padding: 3px 8px; border-radius: 99px; color: var(--brand-700); background: var(--brand-50); font-size: 11px; font-weight: 600; }
.admin-content:has(.attendance-report-page) { display: flex; flex-direction: column; overflow: hidden; }
.attendance-report-page { min-width: 0; }
.attendance-report-card { display: flex; min-width: 0; min-height: 0; height: 100%; flex: 1; flex-direction: column; overflow: hidden; }
.attendance-report-toolbar { display: flex; flex: 0 0 auto; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--slate-200); }
.attendance-report-filter { width: min(100%,380px); }
.attendance-report-filter .field { margin: 0; }
.attendance-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; color: var(--slate-600); font-size: 12px; font-weight: 600; }
.attendance-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.attendance-legend-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; }
.attendance-matrix-wrap { min-width: 0; min-height: 0; max-height: none; flex: 1; overflow: auto; border-top: 0; scrollbar-gutter: stable; }
.attendance-matrix-wrap .attendance-matrix { width: var(--attendance-desktop-width); min-width: var(--attendance-desktop-width); max-width: var(--attendance-desktop-width); table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.attendance-matrix th, .attendance-matrix td { height: 48px; padding: 7px 9px; white-space: nowrap; }
.attendance-matrix thead th { position: sticky; top: 0; z-index: 6; background: var(--slate-50); }
.attendance-matrix th:nth-child(-n+4), .attendance-matrix td:nth-child(-n+4) { position: sticky; background: white; }
.attendance-matrix th:nth-child(1), .attendance-matrix td:nth-child(1) { left: 0; width: 40px; min-width: 40px; max-width: 40px; padding-right: 6px; padding-left: 10px; }
.attendance-matrix th:nth-child(2), .attendance-matrix td:nth-child(2) { left: 40px; width: 96px; min-width: 96px; max-width: 96px; padding-right: 7px; padding-left: 7px; }
.attendance-matrix th:nth-child(3), .attendance-matrix td:nth-child(3) { left: 136px; width: 150px; min-width: 150px; max-width: 150px; overflow: hidden; padding-right: 7px; padding-left: 7px; text-overflow: ellipsis; }
.attendance-matrix th:nth-child(4), .attendance-matrix td:nth-child(4) { left: 286px; width: 84px; min-width: 84px; max-width: 84px; padding-right: 4px; padding-left: 4px; text-align: center; box-shadow: 5px 0 8px -7px rgba(15,23,42,.55); }
.attendance-matrix thead th:nth-child(-n+4) { z-index: 8; background: var(--slate-50); }
.attendance-matrix tbody tr:hover td:nth-child(-n+4) { background: var(--slate-50); }
.attendance-matrix td.empty-cell { position: static; width: auto; min-width: 0; max-width: none; }
.attendance-session-column, .attendance-session-cell { width: 48px; min-width: 48px; max-width: 48px; height: 48px; padding: 0; text-align: center; }
.attendance-session-column { color: var(--slate-600); font-size: 10px; font-variant-numeric: tabular-nums; }
.attendance-session-cell { border-left: 1px solid var(--slate-200); }
.attendance-rate { color: var(--brand-700); font-weight: 700; font-variant-numeric: tabular-nums; }
.attendance-status { display: grid; width: 100%; height: 100%; place-items: center; border: 0; border-radius: 0; font-size: 13px; font-weight: 800; }
.attendance-status.attendance-present { color: #047857; background: #d1fae5; }
.attendance-status.attendance-excused { color: #a16207; background: #fef3c7; }
.attendance-status.attendance-absent { color: #b91c1c; background: #fee2e2; }
.attendance-legend-dot.attendance-present { background: #10b981; }
.attendance-legend-dot.attendance-excused { background: #f59e0b; }
.attendance-legend-dot.attendance-absent { background: #ef4444; }
.attendance-not-marked { color: var(--slate-400); }
.attendance-empty-note { flex: 0 0 auto; margin: 0; padding: 13px 16px; border-top: 1px solid var(--slate-200); color: var(--slate-500); font-size: 12px; }
.admin-content:has(.academic-report-page) { display: flex; flex-direction: column; overflow: hidden; }
.academic-report-page { min-width: 0; height: 100%; overflow: hidden; }
.academic-report-page .class-summary-grid { flex: 0 0 auto; gap: 10px; margin-bottom: 10px; }
.academic-report-page .summary-card { padding: 10px 14px; }
.academic-report-page .summary-card strong { margin-top: 4px; font-size: 17px; }
.academic-report-card { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.academic-report-card > .card-header { flex: 0 0 auto; padding: 11px 14px; }
.academic-report-card .card-heading h2 { font-size: 15px; }
.academic-report-card .card-heading p { margin-top: 2px; font-size: 11px; }
.academic-report-filters { width: 100%; grid-template-columns: minmax(190px,1.35fr) repeat(2,minmax(150px,1fr)) repeat(2,minmax(130px,.75fr)); gap: 8px; margin-top: 10px; }
.academic-report-filters .field { margin: 0; }
.academic-report-filters .field > span { margin-bottom: 4px; font-size: 10px; }
.academic-report-filters .input { height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 11px; }
.academic-report-table { min-height: 0; max-height: none; flex: 1; overflow: auto; }
.academic-report-table table { width: 100%; min-width: 0; table-layout: fixed; }
.academic-report-table th, .academic-report-table td { padding: 8px 7px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.academic-report-table th:nth-child(1) { width: 3.5%; }
.academic-report-table th:nth-child(2) { width: 10%; }
.academic-report-table th:nth-child(3) { width: 12%; }
.academic-report-table th:nth-child(4) { width: 12%; }
.academic-report-table th:nth-child(5) { width: 6.5%; }
.academic-report-table th:nth-child(6) { width: 10%; }
.academic-report-table th:nth-child(7) { width: 8.5%; }
.academic-report-table th:nth-child(8) { width: 8.5%; }
.academic-report-table th:nth-child(9) { width: 12%; }
.academic-report-table th:nth-child(10) { width: 8%; }
.academic-report-table th:nth-child(11) { width: 9%; }
.academic-report-table td { height: 52px; vertical-align: middle; }
/* Trang của giáo viên trên điện thoại: bỏ thẻ tổng, lọc 2 cột, bảng còn 4 cột. */
@media (max-width: 680px) {
  .teacher-academic-report .class-summary-grid { display: none; }
  .teacher-academic-report .academic-report-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .teacher-academic-report .academic-hide-mobile { display: none; }
  .teacher-academic-report .academic-report-table { overflow-x: hidden; }
  .teacher-academic-report .academic-report-table table { min-width: 0; table-layout: auto; }
  .teacher-academic-report .academic-report-table th { width: auto; }
  .teacher-academic-report .academic-report-table th:first-child { width: 34px; }
  .teacher-academic-report .academic-report-table td { height: auto; padding: 10px 7px; }
  .teacher-academic-report .academic-view-btn { min-height: 30px; font-size: 11px; }
}
.academic-date-cell strong, .academic-date-cell small, .academic-subline { display: block; }
.academic-date-cell strong { white-space: nowrap; }
.academic-date-cell small, .academic-subline { margin-top: 3px; color: var(--slate-500); font-size: 10px; font-weight: 500; white-space: nowrap; }
.academic-session-cell { white-space: nowrap; }
.academic-score-list { display: flex; min-width: 0; flex-wrap: nowrap; gap: 5px; overflow: hidden; }
.academic-score-chip { display: inline-flex; gap: 4px; align-items: center; padding: 4px 7px; border-radius: 999px; color: var(--brand-700); background: var(--brand-50); font-size: 10px; white-space: nowrap; }
.academic-note-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.academic-view-btn { width: 100%; min-height: 32px; padding: 0 6px; font-size: 10px; white-space: nowrap; }
.academic-row-actions { display: flex; flex-direction: column; gap: 4px; }
/* Phiếu khổ dọc A4 để xem hết cột trên PC và mobile, không phải kéo ngang. */
.academic-report-modal { display: flex; width: min(800px,calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 32px); flex-direction: column; }
.academic-sheet-modal { position: relative; padding-top: 18px; }
.academic-sheet-close { position: absolute; top: 10px; right: 12px; }
.academic-letterhead { display: flex; flex: 0 0 auto; align-items: stretch; gap: 16px; padding: 4px 22px 12px; border-bottom: 1px solid var(--slate-300); }
.academic-letterhead-logo { width: auto; height: 72px; object-fit: contain; background: #fff; }
.academic-letterhead-copy { display: flex; flex-direction: column; justify-content: space-between; min-height: 72px; }
.academic-letterhead-copy h1 { margin: 0; color: #1e3a8a; font-size: 18px; font-weight: 800; letter-spacing: 0; }
.academic-letterhead-copy p { margin: 0; color: var(--slate-600); font-size: 12px; line-height: 1.2; }
.academic-letterhead-meta { display: flex; flex: 0 0 auto; flex-direction: column; gap: 2px; margin: 10px 22px 0; color: var(--slate-800); font-size: 12px; word-spacing: normal; }
.academic-letterhead-meta strong { font-weight: 700; }
.academic-letterhead-meta span { color: var(--slate-600); font-size: 11px; font-weight: 400; }
/* Trên PC hai lớp bọc này trong suốt, giữ nguyên tỉ lệ cũ của popup. */
.academic-sheet-viewport,
.academic-sheet-scale { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.academic-modal-table { min-height: 0; flex: 1; margin: 10px 22px 0; overflow-x: hidden; overflow-y: auto; border: 0; background: white; }
.academic-modal-table tbody tr { cursor: default; }
.academic-sheet-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.academic-sheet-table th,
.academic-sheet-table td { height: 28px; padding: 3px 7px; border: 1px solid #64748b; text-align: center; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
.academic-sheet-table th { position: sticky; top: 0; z-index: 2; color: white; background: #0078d4; font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.academic-sheet-table th.academic-stt-head { padding-right: 2px; padding-left: 2px; white-space: nowrap; overflow-wrap: normal; }
.academic-sheet-table td.code { display: table-cell; margin-top: 0; color: inherit; font-family: inherit; font-size: inherit; }
.academic-sheet-table th:nth-child(2),
.academic-sheet-table td.academic-name-cell { text-align: left; }
.academic-sheet-table td.academic-sheet-note { text-align: left; white-space: pre-wrap; }
.academic-sheet-table td.cell-index { padding-right: 2px; padding-left: 2px; white-space: nowrap; overflow-wrap: normal; }
/* Mức điểm của trung tâm: dưới 50% đỏ, 50-80% vàng, từ 80% xanh. */
.academic-score-red { background: #FF0000; }
.academic-score-yellow { background: #FFFF00; }
.academic-score-green { background: #00FF00; }
.academic-score-legend { display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; margin: 10px 22px 0; color: var(--slate-800); font-size: 11px; }
.academic-legend-item { display: flex; gap: 7px; align-items: center; }
.academic-legend-dot { width: 15px; height: 9px; flex: 0 0 auto; border: 1px solid #64748b; }
.academic-clip-cell { text-align: center; }
.academic-clip-done { color: var(--green-700); font-size: 16px; font-weight: 800; }
.academic-modal-footer { flex: 0 0 auto; background: white; }
/* Màn hình hẹp: phiếu giữ đúng bố cục PC, chỉ thu nhỏ cho vừa bề ngang (fitAcademicSheet). */
@media (max-width: 680px) {
  .modal-backdrop:has(.academic-sheet-modal) { padding: 6px; }
  .academic-report-modal { width: 100%; max-height: calc(100dvh - 12px); }
  .academic-sheet-viewport { overflow: auto; -webkit-overflow-scrolling: touch; }
  .academic-sheet-scale { --academic-sheet-width: 760px; width: var(--academic-sheet-width); flex: 0 0 auto; transform-origin: top left; }
  .academic-sheet-scale .academic-modal-table { flex: 0 0 auto; overflow: visible; }
  .academic-sheet-scale .academic-letterhead { padding: 4px 22px 12px; }
  .academic-sheet-scale .academic-letterhead-meta,
  .academic-sheet-scale .academic-modal-table { margin-left: 22px; margin-right: 22px; }
  .academic-sheet-table th { position: static; }
}
.admin-content:has(.periodic-report-page) { display: flex; flex-direction: column; overflow: hidden; }
.periodic-report-page { min-width: 0; height: 100%; overflow: hidden; }
.periodic-report-page .class-summary-grid { flex: 0 0 auto; gap: 10px; margin-bottom: 10px; }
.periodic-report-page .summary-card { padding: 10px 14px; }
.periodic-report-page .summary-card strong { margin-top: 4px; font-size: 17px; }
.periodic-report-card { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.periodic-report-card > .card-header { flex: 0 0 auto; padding: 11px 14px; }
.periodic-report-header { display: block; }
.periodic-report-card .card-heading h2 { font-size: 15px; }
.periodic-report-card .card-heading p { margin-top: 2px; font-size: 11px; }
.periodic-report-filters { width: 100%; gap: 10px; margin-top: 10px; }
.periodic-report-filters.is-empty, .periodic-report-filters.is-monthly { grid-template-columns: minmax(300px,2fr) minmax(220px,1fr); }
.periodic-report-filters.is-course { grid-template-columns: minmax(300px,1.5fr) repeat(2,minmax(220px,1fr)); }
.periodic-report-filters .field { min-width: 0; margin: 0; }
.periodic-report-filters .field > span { margin-bottom: 4px; font-size: 10px; }
.periodic-report-filters .input { height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 11px; }
.periodic-filter-hint { display: flex; min-height: 34px; align-items: center; align-self: end; padding: 0 12px; border: 1px dashed var(--slate-300); border-radius: 8px; color: var(--slate-500); background: var(--slate-50); font-size: 11px; }
.periodic-student-list { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; border-top: 1px solid var(--slate-200); }
.periodic-pane-head { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--slate-200); }
.periodic-pane-head h3, .periodic-pane-head p { margin: 0; }
.periodic-pane-head h3 { font-size: 13px; }
.periodic-pane-head p { margin-top: 3px; color: var(--slate-500); font-size: 10px; }
.periodic-period-status { display: flex; align-items: center; gap: 10px; color: var(--slate-700); font-size: 11px; white-space: nowrap; }
.periodic-student-table { min-height: 0; flex: 1; overflow: auto; border-top: 0; }
.periodic-student-table table { min-width: 820px; table-layout: fixed; }
.periodic-student-table th, .periodic-student-table td { height: 48px; padding: 7px 12px; font-size: 11px; vertical-align: middle; }
.periodic-student-table th { position: sticky; top: 0; z-index: 2; }
.periodic-student-table th:nth-child(1) { width: 7%; }
.periodic-student-table th:nth-child(2) { width: 15%; }
.periodic-student-table th:nth-child(3) { width: 30%; }
.periodic-student-table th:nth-child(4) { width: 20%; }
.periodic-student-table th:nth-child(5) { width: 18%; }
.periodic-student-table th:nth-child(6) { width: 10%; text-align: right; }
.periodic-student-table td:last-child { text-align: right; }
.periodic-student-open { min-width: 72px; min-height: 32px; padding: 0 14px; font-size: 11px; white-space: nowrap; }
.periodic-roster-empty { display: grid; min-height: 0; flex: 1; place-items: center; padding: 24px; border-top: 1px solid var(--slate-200); color: var(--slate-500); text-align: center; }
.periodic-roster-empty strong { color: var(--slate-800); }
.periodic-roster-empty p { max-width: 320px; margin: 6px 0 0; font-size: 12px; }
.periodic-report-modal { display: flex; width: min(920px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); flex-direction: column; }
.periodic-report-modal > form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.periodic-report-modal-body { min-height: 0; padding: 16px 18px; overflow-x: hidden; overflow-y: auto; }
.periodic-report-identity { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-200); }
.periodic-report-identity > div { display: flex; min-width: 0; min-height: 82px; padding: 11px 12px; flex-direction: column; background: var(--slate-50); }
.periodic-report-identity span, .periodic-report-identity strong, .periodic-report-identity small { display: block; overflow: hidden; text-overflow: ellipsis; }
.periodic-report-identity span, .periodic-report-identity small { color: var(--slate-500); font-size: 10px; }
.periodic-report-identity strong { margin: 5px 0 4px; font-size: 12px; white-space: nowrap; }
.periodic-report-editor { margin-top: 14px; padding: 16px; border: 1px solid var(--slate-200); border-radius: 12px; }
.periodic-editor-heading h3, .periodic-editor-heading p { margin: 0; }
.periodic-editor-heading h3 { font-size: 15px; }
.periodic-editor-heading p { margin-top: 4px; color: var(--slate-500); font-size: 11px; }
.periodic-skill-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.periodic-skill-field, .periodic-comment-field { min-width: 0; margin: 0; }
.periodic-comment-field { margin-top: 14px; }
.periodic-comment-field textarea { min-height: 120px; line-height: 1.55; }
.periodic-report-modal-footer { flex: 0 0 auto; background: white; }
@media (max-width: 1500px) {
  .periodic-report-card { min-height: 560px; }
}
@media (max-width: 900px) {
  .periodic-report-page { height: auto; overflow: visible; }
  .periodic-report-filters.is-empty, .periodic-report-filters.is-monthly, .periodic-report-filters.is-course { grid-template-columns: 1fr; }
  .periodic-student-list { min-height: 520px; }
  .periodic-pane-head { align-items: flex-start; flex-direction: column; }
  .periodic-report-identity { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .periodic-skill-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .periodic-report-modal .modal-head { padding: 14px 16px; }
}
@media (max-width: 600px) {
  .periodic-report-identity { grid-template-columns: 1fr; }
  .periodic-report-identity > div { min-height: 0; }
  .periodic-report-modal-body { padding: 12px; }
  .periodic-report-editor { padding: 12px; }
  .periodic-report-modal-footer { flex-wrap: wrap; padding: 10px 12px; }
}
.people-detail { min-height: 0; }.profile-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }.profile-summary-grid .summary-card { min-width: 0; }.profile-summary-grid .summary-card strong { overflow-wrap: anywhere; font-size: 15px; }.profile-card { overflow: hidden; }.profile-info-grid, .session-view-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 0; padding: 6px 20px 20px; }.profile-info-grid > div, .session-view-grid > div { min-width: 0; padding: 14px 10px; border-bottom: 1px solid var(--slate-100); }.profile-info-grid dt, .session-view-grid dt { margin-bottom: 6px; color: var(--slate-500); font-size: 11px; font-weight: 600; }.profile-info-grid dd, .session-view-grid dd { margin: 0; color: var(--slate-900); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }.summary-link, .detail-link { padding: 0; border: 0; color: var(--brand-700); background: transparent; font-weight: 600; text-align: left; cursor: pointer; }.summary-link { display: block; margin-top: 8px; font-size: 18px; }.summary-link:hover, .detail-link:hover { text-decoration: underline; }.session-view-grid { padding-top: 10px; }.session-view-grid .badge { display: inline-flex; }
.admin-content:has(.dashboard-page.activity) { display: flex; flex-direction: column; overflow: hidden; }.dashboard-page.activity { display: flex; min-height: 0; flex: 1; flex-direction: column; }.dashboard-tabs { display: flex; flex: 0 0 auto; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--slate-200); }.dashboard-tab { margin-bottom: -1px; padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--slate-500); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; }.dashboard-tab:hover { color: var(--slate-800); }.dashboard-tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }.dashboard-chart-card { max-width: 920px; overflow: hidden; }.dashboard-activity-card { display: flex; width: 100%; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }.dashboard-chart-card .card-header, .dashboard-activity-card .card-header { flex: 0 0 auto; border-bottom: 1px solid var(--slate-200); }.dashboard-chart-card h2, .dashboard-chart-card p, .dashboard-activity-card h2, .dashboard-activity-card p { margin: 0; }.dashboard-chart-card h2, .dashboard-activity-card h2 { font-size: 17px; }.dashboard-chart-card p, .dashboard-activity-card p { margin-top: 5px; color: var(--slate-500); font-size: 13px; }.dashboard-chart-body { display: grid; grid-template-columns: minmax(240px,320px) minmax(280px,1fr); gap: 42px; align-items: center; padding: 32px 38px 38px; }.dashboard-donut { position: relative; width: min(100%,280px); aspect-ratio: 1; justify-self: center; border-radius: 50%; background: var(--dashboard-chart); }.dashboard-donut::after { position: absolute; inset: 22%; border-radius: 50%; background: white; content: ""; }.dashboard-donut > div { position: absolute; inset: 22%; z-index: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 50%; text-align: center; }.dashboard-donut strong { color: var(--slate-900); font-size: 38px; line-height: 1; }.dashboard-donut span { margin-top: 7px; color: var(--slate-500); font-size: 13px; }.dashboard-legend { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }.dashboard-legend li { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--slate-100); }.dashboard-legend-swatch { width: 10px; height: 10px; border-radius: 50%; }.dashboard-legend-copy strong, .dashboard-legend-copy small { display: block; }.dashboard-legend-copy strong { color: var(--slate-800); font-size: 13px; font-weight: 600; }.dashboard-legend-copy small { margin-top: 3px; color: var(--slate-500); font-size: 11px; }.dashboard-legend b { color: var(--slate-900); font-size: 17px; }.dashboard-activity-card .table-wrap { min-height: 0; flex: 1; overflow: auto; border-top: 0; }.dashboard-activity-table th { position: sticky; top: 0; z-index: 3; }.dashboard-activity-table th:nth-child(1) { width: 14%; }.dashboard-activity-table th:nth-child(2) { width: 23%; }.dashboard-activity-table th:nth-child(3), .dashboard-activity-table th:nth-child(4) { width: 19%; }.dashboard-activity-table th:nth-child(5), .dashboard-activity-table th:nth-child(6) { width: 12%; }.dashboard-activity-table th:nth-child(5), .dashboard-activity-table td:nth-child(5) { text-align: center; }.dashboard-activity-table th:last-child, .dashboard-activity-table td:last-child { text-align: right; }.dashboard-activity-table td { height: 40px; vertical-align: middle; }.dashboard-activity-table tbody tr { cursor: default; }.dashboard-time { white-space: nowrap; }
.mgmt-card .table-wrap { min-height: 0; flex: 1; overflow: auto; border-top: 0; }
.mgmt-table td { height: 40px; vertical-align: middle; }
.mgmt-table tbody tr { cursor: default; }
.mgmt-total-row td { border-top: 2px solid var(--slate-300); background: var(--slate-50); }.dashboard-class-link, .dashboard-attendance-link { color: var(--brand-700); font-size: 13px; }.dashboard-attendance-link { width: 100%; text-align: right; }
.dashboard-page.activity .dashboard-tabs { margin-bottom: 10px; }.dashboard-page.activity .dashboard-tab { padding: 7px 12px; }.dashboard-activity-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; }.dashboard-activity-heading { display: flex; align-items: baseline; gap: 10px; }.dashboard-activity-card .dashboard-activity-heading p { margin: 0; }.dashboard-activity-date { display: flex; align-items: center; gap: 8px; color: var(--slate-500); font-size: 11px; font-weight: 600; white-space: nowrap; }.dashboard-activity-date .input { width: 180px; height: 34px; font-size: 12px; }.dashboard-activity-table .dashboard-attendance-link { display: inline-flex; align-items: center; }
.dashboard-attendance-note { display: block; margin-top: 3px; color: var(--slate-500); font-size: 11px; font-weight: 500; line-height: 15px; white-space: pre-line; }
.dashboard-attendance-note.is-complete { color: var(--green-700); }
.dashboard-activity-table th:nth-child(1) { width: 5%; }.dashboard-activity-table th:nth-child(2) { width: 21%; }.dashboard-activity-table th:nth-child(3) { width: 13%; }.dashboard-activity-table th:nth-child(4), .dashboard-activity-table th:nth-child(5) { width: 19%; }.dashboard-activity-table th:nth-child(6) { width: 10%; }.dashboard-activity-table th:nth-child(7) { width: 13%; }.dashboard-activity-table th:nth-child(5), .dashboard-activity-table td:nth-child(5) { text-align: left; }.dashboard-activity-table th:nth-child(6), .dashboard-activity-table td:nth-child(6) { text-align: center; }

/* Class management, teaching calendar and audit log follow NZ LMS patterns. */
.classes-page, .class-detail, .calendar-page, .audit-page { min-height: 0; }
.class-filters { grid-template-columns: minmax(280px,2fr) minmax(180px,1fr) minmax(180px,1fr); margin-top: 16px; }
.class-filters .field { margin: 0; }
.table-link { padding: 0; border: 0; color: var(--brand-700); background: transparent; font-weight: 600; text-align: left; cursor: pointer; }
.table-link:hover { text-decoration: underline; }
.schedule-cell { min-width: 180px; color: var(--slate-600); font-size: 12px; white-space: nowrap; }
.classes-page .schedule-cell { min-width: 150px; }
.classes-page .class-name-cell { max-width: 190px; }
.classes-page .class-name-cell .table-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.classes-page .class-progress-cell { white-space: nowrap; font-weight: 700; text-align: center; }
@media (min-width: 901px) {
  .classes-page .class-filters { grid-template-columns: minmax(200px,1.4fr) repeat(3, minmax(150px,1fr)); }
}
.class-modal { max-width: 900px; max-height: calc(100vh - 36px); overflow-y: auto; }
.form-section-title { margin: 2px 0 -4px; padding-top: 10px; border-top: 1px solid var(--slate-200); color: var(--slate-500); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.form-section-title:first-child { padding-top: 0; border-top: 0; }
.schedule-builder { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 8px; align-items: center; }
.schedule-list { margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 8px; list-style: none; }
.schedule-list li { display: grid; grid-template-columns: 100px 110px 1fr 32px; gap: 8px; align-items: center; min-height: 40px; padding: 5px 10px; border-top: 1px solid var(--slate-100); font-size: 12px; }
.schedule-list li:first-child { border-top: 0; }.schedule-list li small { color: var(--slate-500); }.schedule-list .empty-schedule { display: block; padding: 13px; color: var(--slate-500); text-align: center; }
.student-check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 190px; padding: 9px; overflow-y: auto; border: 1px solid var(--slate-200); border-radius: 8px; background: var(--slate-50); }
.student-check-list label { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 7px; background: white; cursor: pointer; }.student-check-list input { accent-color: var(--brand-600); }.student-check-list strong, .student-check-list small { display: block; }.student-check-list strong { font-size: 12px; }.student-check-list small { margin-top: 2px; color: var(--slate-500); font-size: 10px; }
.page-actions { display: flex; align-items: center; gap: 8px; }.class-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }.summary-card { padding: 16px; }.summary-card small, .summary-card strong { display: block; }.summary-card small { color: var(--slate-500); font-size: 11px; }.summary-card strong { margin-top: 8px; font-size: 18px; }.detail-section { margin-top: 14px; overflow: hidden; }.detail-section .card-header { border-bottom: 1px solid var(--slate-200); }.detail-section h2, .detail-section p { margin: 0; }.detail-section h2 { font-size: 16px; }.detail-section p { margin-top: 4px; color: var(--slate-500); font-size: 12px; }
.calendar-card { display: flex; min-height: calc(100vh - 185px); flex-direction: column; overflow: hidden; }.calendar-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--slate-200); }.calendar-nav-buttons { display: flex; align-items: center; gap: 6px; min-width: 0; }.calendar-nav-buttons strong { margin-left: 7px; font-size: 13px; white-space: nowrap; }.secondary-btn.square { width: 36px; padding: 0; font-size: 20px; }.calendar-view-buttons { display: flex; margin-left: auto; padding: 3px; border-radius: 8px; background: var(--slate-100); }.calendar-view-buttons button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 6px; color: var(--slate-500); background: transparent; font-size: 12px; font-weight: 600; }.calendar-view-buttons button.active { color: var(--brand-700); background: white; box-shadow: 0 1px 3px rgba(15,23,42,.1); }.calendar-filters { display: flex; gap: 7px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid var(--slate-200); }.calendar-filters .input { width: auto; min-width: 180px; height: 34px; font-size: 12px; }.calendar-board { min-height: 0; flex: 1; overflow: auto; background: var(--slate-200); }.calendar-grid { display: grid; grid-template-columns: 78px repeat(var(--calendar-days),minmax(155px,1fr)); gap: 1px; min-width: 760px; }.calendar-corner, .calendar-day-head { position: sticky; top: 0; z-index: 3; min-height: 55px; padding: 9px; background: var(--slate-50); }.calendar-corner { color: var(--slate-400); font-size: 11px; font-weight: 700; text-transform: uppercase; }.calendar-day-head strong, .calendar-day-head span { display: block; }.calendar-day-head strong { font-size: 13px; }.calendar-day-head span { margin-top: 2px; color: var(--slate-500); font-size: 11px; }.calendar-time { padding: 10px 8px; color: var(--slate-700); background: white; font-size: 12px; font-weight: 600; }.calendar-time small { display: block; margin-top: 3px; color: var(--slate-400); }.calendar-cell { min-height: 78px; padding: 5px; background: white; }.calendar-empty { min-height: 220px; display: flex; align-items: center; justify-content: center; color: var(--slate-500); background: white; }.calendar-session { position: relative; display: flex; width: 100%; flex-direction: column; gap: 2px; margin-bottom: 4px; padding: 8px; overflow: hidden; border: 1px solid #bfdbfe; border-left: 3px solid var(--brand-600); border-radius: 7px; color: var(--slate-700); background: #eff6ff; text-align: left; cursor: pointer; }.calendar-session:hover { border-color: var(--brand-500); }.calendar-session strong { font-size: 11px; }.calendar-session span, .calendar-session small { color: var(--slate-500); font-size: 10px; }.calendar-session em { color: var(--brand-700); font-size: 9px; font-style: normal; font-weight: 700; }.calendar-session.status-completed { border-color: #86efac; border-left-color: #16a34a; background: #f0fdf4; }.calendar-session.status-cancelled { border-color: #fecaca; border-left-color: #dc2626; background: #fef2f2; opacity: .72; text-decoration: line-through; }.calendar-session.compact { padding: 4px 5px; }.calendar-session.compact strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.month-weekdays { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; min-width: 760px; background: var(--slate-200); }.month-weekdays span { padding: 8px; color: var(--slate-500); background: var(--slate-50); font-size: 11px; font-weight: 700; text-align: center; }.month-grid { display: grid; grid-template-columns: repeat(7,minmax(108px,1fr)); gap: 1px; min-width: 760px; }.month-day { min-height: 115px; padding: 6px; background: white; }.month-day.outside { background: var(--slate-50); opacity: .65; }.month-day > strong { display: block; margin-bottom: 5px; color: var(--slate-600); font-size: 11px; }.month-day > small { color: var(--slate-400); font-size: 9px; }

/* NZ-style teaching calendar: one compact control row and aligned session lanes. */
.admin-content:has(.nz-calendar-page) { display: flex; flex-direction: column; overflow: hidden; }
.nz-calendar-page { display: flex; min-height: 0; flex: 1; }
.nz-calendar-page .calendar-card { min-height: 0; height: 100%; flex: 1; border-radius: 14px; }
.nz-calendar-page .calendar-toolbar { flex: 0 0 auto; flex-wrap: nowrap; gap: 8px; padding: 8px 10px; overflow: hidden; }
.nz-calendar-page .calendar-nav-buttons { flex: 0 0 auto; }
.nz-calendar-page .calendar-nav-buttons strong { margin: 0 2px 0 6px; color: var(--slate-900); font-size: 13px; }
.nz-calendar-page .calendar-filters { min-width: 0; flex: 1 1 auto; gap: 7px; padding: 0; overflow: visible; border: 0; }
.nz-calendar-page .calendar-filters .input { width: 100%; min-width: 125px; height: 34px; flex: 1 1 145px; background-color: white; font-size: 12px; }
.nz-calendar-page .calendar-filters .input[name="teacher"] { min-width: 150px; }
.nz-calendar-page .calendar-filters .input[name="class"] { flex-grow: 1.25; }
.nz-calendar-page .calendar-view-buttons { flex: 0 0 auto; margin-left: auto; }
.nz-calendar-page .calendar-view-buttons button { min-height: 32px; padding: 0 12px; font-size: 12px; }
.nz-calendar-page .calendar-board { overflow-x: hidden; overflow-y: auto; }
.nz-calendar-page .calendar-grid { width: 100%; grid-template-columns: 96px repeat(var(--calendar-days),minmax(0,1fr)); min-width: 0; }
.nz-calendar-page .calendar-corner,
.nz-calendar-page .calendar-day-head { min-height: 52px; padding: 8px 10px; background: #f8fafc; }
.nz-calendar-page .calendar-corner { left: 0; z-index: 5; font-size: 12px; }
.nz-calendar-page .calendar-day-head strong { color: var(--slate-900); font-size: 13px; }
.nz-calendar-page .calendar-day-head span { font-size: 11px; }
.nz-calendar-page .calendar-day-head.is-today { color: var(--slate-900); background: #cbd5e1; box-shadow: inset 2px 0 #94a3b8, inset -2px 0 #94a3b8; }
.nz-calendar-page .calendar-day-head.is-today span { color: var(--slate-700); font-weight: 700; }
.nz-calendar-page .calendar-time { position: sticky; left: 0; z-index: 2; display: flex; align-items: baseline; gap: 2px; min-height: 48px; padding: 10px 8px; color: var(--slate-700); background: #fff; font-size: 11px; white-space: nowrap; }
.nz-calendar-page .calendar-time span { color: var(--slate-500); }
.nz-calendar-page .calendar-cell { display: grid; min-width: 0; overflow: hidden; grid-template-rows: repeat(var(--calendar-lanes),minmax(48px,auto)); min-height: 48px; padding: 0; }
.nz-calendar-page .calendar-cell.is-today { background: #e2e8f0; box-shadow: inset 2px 0 #cbd5e1, inset -2px 0 #cbd5e1; }
.nz-calendar-page .calendar-lane { min-width: 0; min-height: 48px; padding: 4px; overflow: hidden; border-top: 1px solid var(--slate-200); }
.nz-calendar-page .calendar-lane:first-child { border-top: 0; }
.nz-calendar-page .calendar-session { min-width: 0; max-width: 100%; min-height: 40px; gap: 1px; margin: 0; padding: 4px 6px; overflow: hidden; border: 1px solid #bfdbfe; border-radius: 6px; color: #075985; background: #eff6ff; }
.nz-calendar-page .calendar-session:hover { filter: brightness(.98); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.nz-calendar-page .calendar-session strong { display: block; width: 100%; min-width: 0; overflow: hidden; font-size: 10px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.nz-calendar-page .calendar-session span { color: inherit; font-size: 9px; line-height: 12px; }
.nz-calendar-page .calendar-session-teacher { display: flex; width: 100%; min-width: 0; align-items: center; gap: 4px; overflow: hidden; opacity: .78; text-overflow: ellipsis; white-space: nowrap; }
.nz-calendar-page .calendar-session-teacher .icon { width: 10px; height: 10px; flex: 0 0 auto; }
.nz-calendar-page .calendar-session.tone-0 { border-color: #a7f3d0; color: #047857; background: #ecfdf5; }
.nz-calendar-page .calendar-session.tone-1 { border-color: #ddd6fe; color: #6d28d9; background: #f5f3ff; }
.nz-calendar-page .calendar-session.tone-2 { border-color: #bae6fd; color: #0369a1; background: #f0f9ff; }
.nz-calendar-page .calendar-session.tone-3 { border-color: #fde68a; color: #b45309; background: #fffbeb; }
.nz-calendar-page .calendar-session.tone-4 { border-color: #fecdd3; color: #be123c; background: #fff1f2; }
.nz-calendar-page .calendar-session.status-completed { border-color: #86efac; color: #047857; background: #f0fdf4; }
.nz-calendar-page .calendar-session.status-cancelled { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.nz-calendar-page .calendar-session.compact { min-height: 0; margin-bottom: 4px; padding: 5px 6px; }
.nz-calendar-page .month-weekdays { width: 100%; min-width: 0; }
.nz-calendar-page .month-grid { width: 100%; min-width: 0; }
.nz-calendar-page .month-day { min-width: 0; overflow: hidden; }
.nz-calendar-page .month-day.is-today { background: #cbd5e1; box-shadow: inset 0 0 0 2px #94a3b8; }
.nz-calendar-page .month-day.is-today > strong { color: var(--slate-900); font-weight: 800; }
.danger-outline-btn { min-height: 36px; margin-right: auto; padding: 0 12px; border: 1px solid #fecaca; border-radius: 8px; color: #dc2626; background: white; font-size: 12px; font-weight: 600; }
.audit-filters { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 10px; margin-top: 16px; }.audit-filters .field { margin: 0; }.audit-time { white-space: nowrap; }.audit-create { color: #047857; background: #ecfdf5; }.audit-update { color: var(--brand-700); background: var(--brand-50); }.audit-delete { color: #b91c1c; background: #fef2f2; }.audit-login { color: #475569; background: #f1f5f9; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--slate-300); }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

@media (max-width: 1100px) {
  .tuition-modal-body { grid-template-columns: 1fr; grid-template-areas: "student" "collection" "notice"; }
}

@media (max-width: 900px) {
  .admin-sidebar, .portal-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-101%); transition: transform .2s; }
  body.menu-open .admin-sidebar, body.menu-open .portal-sidebar { transform: translateX(0); }
  body.menu-open .backdrop { position: fixed; inset: 0; z-index: 40; display: block; border: 0; background: rgba(15,23,42,.4); }
  .admin-topbar, .portal-header { padding: 0 14px; }
  .admin-topbar-user .user-copy { display: none; }
  .mobile-menu { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 7px; background: white; }
  .admin-content { padding: 18px; }
  .student-roadmap-sticky { top: -18px; margin: -18px -18px 14px; padding: 18px 18px 12px; }
  .portal-content { padding: 20px 16px; }
  .filter-grid { grid-template-columns: 1fr; }
  .cashbook-page .cashbook-filters { display: grid; grid-template-columns: 1fr; }
  .cashbook-filter-date, .cashbook-filter-kind, .cashbook-filter-method, .cashbook-filter-branch { width: 100%; }
  .cashbook-add-btn { width: 100%; margin-left: 0; }
  .portal-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .portal-name { display: none; }
  .sy-detail { margin: -18px; }.sy-workspace { display: block; }.sy-workspace > aside { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--slate-200); }.form-grid { grid-template-columns: 1fr; }.span-2 { grid-column: auto; }.add-panel, .inline-form { align-items: stretch; flex-direction: column; }.resource-form { grid-template-columns: 1fr; }.exercise-grid { grid-template-columns: 1fr; }.sy-panel { padding: 12px; }.sy-overview-courses, .sy-overview-stats { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }.portal-sy-view { grid-template-columns: 1fr; }.portal-sy-view > aside { border-right: 0; border-bottom: 1px solid var(--slate-200); }.vocab-grid { grid-template-columns: 1fr 1fr; }
  .portal-games { margin-left: 12px; }.activity-preview-header { padding: 0 12px; }.activity-preview-content { width: min(100% - 20px,1000px); padding-top: 16px; }.activity-stage-head, .activity-game { padding: 20px; }.activity-stage-head h1 { font-size: 21px; }
  .settings-sticky { top: -18px; margin: -18px -18px 18px; padding: 0 18px; }.settings-card .card-heading { align-items: stretch; flex-direction: column; }.settings-card .primary-btn { align-self: flex-start; }
  .sy-bank-row { max-width: none; align-items: stretch; flex-direction: column; }
  .sy-qr-upload { max-width: none; align-items: flex-start; }
  .tuition-breakdown-row { grid-template-columns: 1fr auto; gap: 4px 10px; }.tuition-breakdown-row strong { grid-column: 2; }.tuition-breakdown-total { grid-template-columns: 1fr auto; }
  .modal-card.tuition-collection-modal { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
  .tuition-collection-modal .modal-head { padding: 14px 16px; }
  .tuition-modal-body { grid-template-columns: 1fr; grid-template-areas: "student" "collection" "notice"; gap: 10px; padding: 12px; }
  .tuition-student-summary { grid-template-columns: 1fr; }
  .tuition-student-summary > div { padding: 9px 11px; }
  .tuition-payment-fields, .tuition-notice-toolbar { grid-template-columns: 1fr; }
  .tuition-notice-toolbar .secondary-btn { width: 100%; }
  .tuition-notice-preview { grid-template-columns: minmax(0,1fr) 96px; gap: 10px; padding: 10px; }
  .tuition-notice-copy dl { grid-template-columns: 1fr; gap: 5px; }
  .tuition-notice-copy dl > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; }
  .tuition-notice-copy dd { margin: 0; }
  .tuition-notice-qr img, .tuition-notice-no-qr { width: 88px; height: 88px; }
  .tuition-collection-form > .settings-modal-footer { padding: 10px 12px; }
  .people-filters, .people-filters.teacher-filter { grid-template-columns: 1fr; max-width: none; }.people-table { max-height: none; }.profile-summary-grid { grid-template-columns: repeat(2,1fr); }.profile-info-grid, .session-view-grid { grid-template-columns: 1fr; }.profile-info-grid .span-2, .session-view-grid .span-2 { grid-column: auto; }.dashboard-chart-body { grid-template-columns: 1fr; gap: 24px; padding: 24px; }.dashboard-donut { width: min(100%,250px); }
  .dashboard-activity-card .card-header { align-items: stretch; flex-direction: column; gap: 8px; }.dashboard-activity-date { width: 100%; justify-content: space-between; }.dashboard-activity-date .input { min-width: 0; flex: 1; }
  .attendance-report-toolbar { align-items: stretch; flex-direction: column; gap: 10px; padding: 10px 12px; }
  .attendance-report-filter { width: 100%; }
  .attendance-legend { justify-content: flex-start; gap: 7px 12px; font-size: 11px; }
  .attendance-matrix th, .attendance-matrix td { height: 46px; padding: 6px 7px; font-size: 10px; }
  .attendance-matrix-wrap .attendance-matrix { width: var(--attendance-mobile-width); min-width: var(--attendance-mobile-width); max-width: var(--attendance-mobile-width); }
  .attendance-matrix th:nth-child(1), .attendance-matrix td:nth-child(1) { width: 34px; min-width: 34px; max-width: 34px; padding-right: 4px; padding-left: 7px; }
  .attendance-matrix th:nth-child(2), .attendance-matrix td:nth-child(2) { left: 34px; width: 72px; min-width: 72px; max-width: 72px; }
  .attendance-matrix th:nth-child(3), .attendance-matrix td:nth-child(3) { left: 106px; width: 120px; min-width: 120px; max-width: 120px; }
  .attendance-matrix th:nth-child(4), .attendance-matrix td:nth-child(4) { left: 226px; width: 70px; min-width: 70px; max-width: 70px; }
  .attendance-session-column, .attendance-session-cell { width: 46px; min-width: 46px; max-width: 46px; height: 46px; padding: 0; }
  .attendance-status { font-size: 11px; }
  .academic-report-page { height: auto; overflow: visible; }
  .academic-report-card { min-height: 520px; }
  .academic-report-table table { min-width: 1040px; }
  .academic-letterhead { padding: 4px 14px 12px; }
  .academic-letterhead-meta, .academic-modal-table { margin-left: 14px; margin-right: 14px; }
  .class-filters, .audit-filters { grid-template-columns: 1fr; }.class-summary-grid { grid-template-columns: repeat(2,1fr); }.class-modal { max-height: calc(100vh - 20px); }.schedule-builder { grid-template-columns: 1fr; }.student-check-list { grid-template-columns: 1fr; }.calendar-toolbar { align-items: stretch; flex-wrap: wrap; }.calendar-view-buttons { margin-left: 0; }.calendar-toolbar > .primary-btn { margin-left: auto; }
  .teacher-dashboard-grid { grid-template-columns: 1fr; }.teacher-unit summary { grid-template-columns: 65px minmax(0,1fr); }.teacher-unit summary > small { grid-column: 2; }.teacher-session-row { grid-template-columns: 92px minmax(0,1fr) auto; }
  .kids-portal .portal-header { padding:0 12px; }.kids-brand small { display:none; }.star-wallet small { display:none; }.star-wallet { grid-template-columns:18px auto; grid-template-rows:1fr; padding:4px 10px; }.star-wallet .icon { grid-row:auto; }.kids-portal .portal-content { padding:18px 13px 45px; }.kid-page-title h1 { font-size:23px; }
  .kid-profile-hero { grid-template-columns:82px minmax(0,1fr); padding:20px; }.kid-profile-avatar { width:76px; height:76px; font-size:38px; }.kid-star-total { grid-column:1/3; min-height:auto; padding:13px; flex-direction:row; gap:8px; }.kid-star-total strong { margin:0; font-size:22px; }.kid-profile-grid,.kid-reward-grid { grid-template-columns:1fr; }.kid-badges { grid-template-columns:repeat(3,1fr); }
  .kid-next-class { align-items:flex-start; flex-direction:column; }.kid-schedule-item { grid-template-columns:74px minmax(0,1fr); }.kid-reminder { grid-column:2; justify-self:start; }
  .roadmap-hero { grid-template-columns:1fr; min-height:auto; padding:25px 22px; }.roadmap-hero h1 { font-size:24px; }.roadmap-mascot { display:none; }.roadmap-summary { grid-template-columns:1fr 1fr; }.roadmap-summary .roadmap-progress { grid-column:1/3; }.roadmap-unit { padding:17px 12px; }.roadmap-unit-head { align-items:flex-start; }.roadmap-unit-number { width:48px; height:48px; flex-basis:48px; border-radius:14px; font-size:9px; }.roadmap-day { grid-template-columns:35px minmax(0,1fr); }.roadmap-day-marker span { width:30px; height:30px; }.roadmap-game-grid { grid-template-columns:1fr; }.roadmap-game-card { grid-template-columns:44px minmax(0,1fr); }.roadmap-game-icon { width:42px; height:42px; }.roadmap-game-card > button { grid-column:2; justify-self:start; }.roadmap-next-day { margin-left:35px; }.roadmap-day-head { flex-direction:column; }.kid-game-modal { padding:20px 15px; }.kid-game-top { grid-template-columns:48px minmax(0,1fr); }.kid-game-top > span { width:46px; height:46px; }.kid-game-top > b { grid-column:2; justify-self:start; }.kid-game-question h3 { font-size:15px; }
  .clean-portal .roadmap-hero { padding:20px; }.clean-portal .roadmap-summary { grid-template-columns:1fr 1fr; }.clean-portal .roadmap-summary .roadmap-progress { grid-column:1/3; }.clean-portal .roadmap-game-card { grid-template-columns:38px minmax(0,1fr); }.clean-portal .roadmap-game-card > button { grid-column:2; }.standalone-game-header { padding:0 14px; }.standalone-game-shell { margin:16px auto; padding:20px 16px; }.standalone-game-shell footer { align-items:flex-start; flex-direction:column; }.standalone-game-shell footer small { margin-left:0; }.standalone-result { margin:30px auto; padding:30px 18px; }
  .student-game-row { grid-template-columns: 36px minmax(0,1fr) auto; }.student-game-row .badge { grid-column: 2; justify-self: start; }.student-game-row .primary-btn, .student-game-row .secondary-btn { grid-column: 3; grid-row: 1 / span 2; }.student-day-head, .student-next-day, .student-game-footer { align-items: flex-start; flex-direction: column; }.student-reward-list article { align-items: flex-start; flex-direction: column; }
  .portal-overview-split { grid-template-columns: 1fr; }
  .student-shell .admin-content:has(.portal-overview) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px 12px 12px;
  }
  .student-shell .admin-content:has(.portal-overview) .portal-overview {
    flex: 1;
    min-height: 0;
    height: 100%;
    gap: 8px;
    align-content: start;
    grid-template-rows: none;
    overflow: auto;
  }
  .portal-overview .summary-card { padding: 8px 10px; }
  .portal-overview .summary-card strong { margin-top: 2px; font-size: 13px; }
  .portal-overview .student-progress { height: 3px; margin-top: 4px; }
  .student-next-lesson > .card-header { padding: 8px 10px; gap: 8px; }
  .student-next-lesson .student-next-copy p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .student-next-lesson .primary-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
  .portal-overview-split { display: contents; }
  .portal-overview .card-header { padding: 8px 10px; }
  .portal-overview .profile-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 8px 8px;
  }
  .portal-overview .profile-info-grid > div { padding: 6px; }
  .portal-overview .profile-info-grid dt { margin-bottom: 1px; font-size: 9px; }
  .portal-overview .profile-info-grid dd { font-size: 12px; }
  .portal-overview .student-reward-card { overflow: hidden; }
  .portal-overview .student-reward-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portal-overview .student-reward-list article {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    padding: 8px;
    border-right: 1px solid var(--slate-100);
    border-bottom: 0;
  }
  .portal-overview .student-reward-list .primary-btn,
  .portal-overview .student-reward-list .secondary-btn {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }
}

.sy-day-export.is-exporting .sy-export-hide { display: none !important; }

.nz-class-syllabus { position: relative; min-height: calc(100vh - 240px); overflow: hidden; border: 1px solid var(--slate-200); border-radius: 12px; background: white; }
.sy-tree-add {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}
.sy-tree-add:hover { background: #dbeafe; }
.sy-tree-add:active { transform: scale(0.98); }
.sy-tree-empty-add { display: flex; align-items: center; padding: 4px 8px 6px 28px; }
.sy-custom-tag {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.sy-readonly .sy-export-hide,
.sy-readonly button[type="submit"],
.sy-readonly .sy-day-add-control,
.sy-readonly .sy-empty-unit-add-control,
.sy-readonly .sy-edit-only,
.sy-readonly .sy-aid-row { display: none !important; }
.sy-readonly input:not([type="hidden"]):not([type="checkbox"]),
.sy-readonly textarea,
.sy-readonly select:not(.sy-nav-select) {
  pointer-events: none;
  cursor: default;
  color: #0f172a;
  background: #f8fafc;
}
.sy-readonly input[type="checkbox"] { pointer-events: none; cursor: default; }
.sy-readonly .sy-flashcard,
.sy-readonly .sy-flashcard * { pointer-events: auto; }
.admin-content:has(.nz-class-page) { display: flex; flex-direction: column; overflow: hidden; }
.nz-class-page { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 0; }
.nz-class-page > .back-link,
.nz-class-page > .page-header,
.nz-class-page > .nz-class-tabs { flex: 0 0 auto; }
.nz-class-page > .page-header { margin-bottom: 8px; }
.nz-class-page > .page-header p { margin-top: 2px; }
.nz-class-heading { min-width: 0; flex: 1; }
.nz-class-heading-row { display: flex; min-width: 0; align-items: center; gap: 8px; }
.nz-class-heading-row h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nz-class-heading-row .page-actions { flex: 0 0 auto; width: auto; flex-wrap: nowrap; }
.nz-class-tabs { display: flex; gap: 4px; margin: 0 0 10px; overflow-x: auto; border-bottom: 1px solid var(--slate-200); }
.nz-tab { flex: 0 0 auto; margin-bottom: -1px; padding: 10px 12px; border: 0; border-bottom: 2px solid transparent; color: var(--slate-500); background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.nz-tab:hover { color: var(--slate-800); border-bottom-color: var(--slate-300); }
.nz-tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.nz-class-card { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.nz-class-card > form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.nz-class-card.shrink { margin-bottom: 12px; flex: 0 0 auto; }
/* Cả trang nằm trong một màn hình: cột trái gọn lại, lịch buổi học bên phải cao hết chỗ còn lại. */
.class-info-content { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0,1fr) minmax(520px,1fr); gap: 12px; overflow: hidden; }
.class-info-column { display: grid; min-width: 0; min-height: 0; gap: 10px; align-content: start; overflow-y: auto; scrollbar-gutter: stable; }
/* min-content: thẻ không được bóp nhỏ hơn nội dung, nếu không khối lịch học bị cắt. */
.class-info-card { display: block; height: auto; min-height: min-content; overflow: hidden; }
.class-info-card > form { display: block; height: auto; min-height: 0; overflow: visible; }
.class-info-card .nz-class-split { height: auto; min-height: 0; overflow: visible; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 8px 12px 10px; }
.class-info-card .nz-class-fields { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px 10px; }
.class-info-card .nz-class-fields .field > span { font-size: 10px; }
.class-info-card .nz-class-fields .input { height: 30px; font-size: 12px; }
.class-info-card .nz-class-note { min-height: 30px; height: 30px; }
.class-info-head { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.class-info-head .nz-section-label { margin: 0; }
.class-info-head .nz-class-hint { margin: 0; font-size: 11px; }
.class-config-column { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 10px; }
.class-off-card { width: 100%; min-height: 0; flex: 1; align-self: stretch; overflow: hidden; }
.class-off-card > form { display: grid; min-height: 0; grid-template-rows: auto auto minmax(0,1fr) auto auto; }
.class-off-head { display: grid; min-height: 48px; align-items: end; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--slate-200); grid-template-columns: minmax(0,1fr) 160px; }
.class-off-head h2 { margin: 0; font-size: 15px; line-height: 20px; }
.class-off-head p { margin: 2px 0 0; color: var(--slate-500); font-size: 10px; line-height: 14px; }
.class-off-head .field { width: auto; margin: 0; }
.class-off-head .field > span { margin-bottom: 2px; font-size: 11px; }
.class-off-head .input { height: 32px; font-size: 12px; }
.class-off-card form[data-mode="COURSE"] .class-off-head { align-items: start; grid-template-columns: 1fr; }
.class-course-config-fields { display: grid; width: 100%; min-width: 0; gap: 8px; grid-template-columns: minmax(0,1.35fr) minmax(120px,.65fr); }
.class-course-config-fields .field { min-width: 0; }
.class-off-summary { display: grid; min-height: 0; gap: 5px; padding: 6px 12px; overflow: visible; border-bottom: 1px solid var(--slate-200); background: var(--slate-50); grid-template-columns: repeat(4,minmax(0,1fr)); }
.class-off-summary > span { display: inline-flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 5px; padding: 4px 7px; border: 1px solid var(--slate-200); border-radius: 7px; color: var(--slate-500); background: white; font-size: 9px; white-space: nowrap; }
.class-off-summary strong { color: var(--slate-900); font-size: 12px; }
.class-off-table { min-height: 0; overflow-x: auto; overflow-y: auto; scrollbar-gutter: stable; }
.class-off-table table { width: 100%; min-width: 0; table-layout: fixed; }
.class-off-table thead { position: sticky; top: 0; z-index: 3; }
.class-off-table th,
.class-off-table td { overflow: hidden; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.class-off-table th { height: 28px; padding: 0 6px; font-size: 10px; }
.class-off-table td { height: 30px; padding: 0 6px; font-size: 11px; }
.class-off-table th:first-child,
.class-off-table td:first-child { width: 28px; text-align: center; }
.class-off-table th:nth-child(2),
.class-off-table td:nth-child(2) { width: 36px; text-align: center; white-space: nowrap; }
.class-off-table th:nth-child(3),
.class-off-table td:nth-child(3) { width: 52px; }
.class-off-table th:nth-child(4),
.class-off-table td:nth-child(4) { width: 88px; }
.class-off-table th:nth-child(5),
.class-off-table td:nth-child(5) { width: 32px; }
.class-off-table th:nth-child(6),
.class-off-table td:nth-child(6) { width: 80px; }
.class-off-table th:nth-child(7),
.class-off-table td:nth-child(7) { width: auto; }
.class-off-table .badge { padding: 2px 6px; font-size: 10px; }
.class-off-table input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #f59e0b; cursor: pointer; }
.class-off-table tr.is-off td { background: #fffbeb; }
.class-materials-block { display: grid; align-items: end; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--slate-200); background: var(--slate-50); grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
.class-materials-head { min-width: 0; }
.class-materials-head h3 { margin: 0; color: var(--slate-900); font-size: 13px; line-height: 18px; }
.class-materials-head p { margin: 2px 0 0; overflow: hidden; color: var(--slate-500); font-size: 10px; line-height: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.class-materials-fields { display: grid; min-width: 0; gap: 8px; grid-template-columns: 130px minmax(0,1fr); }
.class-materials-fields .field { margin: 0; }
.class-materials-fields .field > span { margin-bottom: 2px; font-size: 11px; }
.class-materials-fields .input { height: 32px; font-size: 12px; }
.class-off-footer { position: sticky; bottom: 0; z-index: 4; display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 14px; border-top: 1px solid var(--slate-200); background: white; }
.class-off-footer p { margin: 0; color: var(--slate-500); font-size: 9px; line-height: 13px; }
.class-off-footer .primary-btn { height: 32px; padding: 0 13px; font-size: 11px; }
.class-tuition-notice-card { display: block; width: 100%; min-height: min-content; padding: 9px 14px 11px; overflow: hidden; }
.class-tuition-notice-head { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.class-tuition-notice-head h2 { flex: 0 0 auto; margin: 0; font-size: 15px; line-height: 20px; }
.class-tuition-notice-head p { min-width: 0; margin: 0; overflow: hidden; color: var(--slate-500); font-size: 9px; line-height: 13px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.class-tuition-notice-controls { display: grid; min-width: 0; align-items: end; gap: 8px; grid-template-columns: minmax(0,1fr) 130px; }
.class-tuition-notice-card .field { min-width: 0; margin: 0; }
.class-tuition-notice-card .field > span { margin-bottom: 2px; font-size: 10px; }
.class-tuition-notice-card .input { width: 100%; height: 34px; min-width: 0; padding: 0 8px; font-size: 11px; }
.class-tuition-notice-card .primary-btn { width: 100%; height: 34px; justify-content: center; padding: 0 10px; font-size: 11px; }
.class-tuition-notice-preview { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 7px 8px; border: 1px solid var(--slate-200); border-radius: 8px; background: var(--slate-50); }
.class-tuition-notice-preview span { min-width: 0; overflow: hidden; color: var(--slate-500); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.class-tuition-notice-preview strong { flex: 0 0 auto; color: var(--brand-700); font-size: 12px; }
.nz-lock-note { margin: 0; padding: 10px 20px; border-bottom: 1px solid #fde68a; color: #92400e; background: #fffbeb; font-size: 12px; }
.nz-class-split { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; min-height: 0; flex: 1; padding: 10px 14px 12px; align-content: start; overflow: visible; }
.nz-class-fields { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px 10px; align-content: start; }
.nz-class-fields .field { margin: 0; min-width: 0; }
.nz-class-fields .field > span { margin-bottom: 2px; font-size: 11px; }
.nz-class-fields .input { height: 32px; padding: 0 10px; font-size: 12px; }
.nz-class-fields .input:disabled { color: var(--slate-700); background: var(--slate-50); }
.nz-class-fields .span-3 { grid-column: 1 / -1; }
.nz-class-hint { margin: -2px 0 2px; color: var(--slate-500); font-size: 12px; }
.nz-class-note { min-height: 32px; height: 32px; padding: 6px 10px; resize: vertical; }
.nz-class-side { display: grid; gap: 6px; align-content: start; }
.class-info-card .nz-class-side { gap: 6px; padding: 7px 9px 8px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); }
.class-info-card .nz-class-side .input { height: 30px; font-size: 12px; }
.class-info-card .nz-class-side .schedule-list { background: white; }
.class-info-card .nz-class-side .schedule-list.compact li { min-height: 32px; padding: 3px 8px; }
/* Chọn thứ, tiết và nút Thêm nằm cùng hàng tiêu đề để danh sách lịch được nhiều chỗ hơn. */
.class-info-card .nz-schedule-head { gap: 8px; }
.class-info-card .nz-schedule-head .schedule-builder { min-width: 0; flex: 1; gap: 6px; grid-template-columns: 92px minmax(0,1fr) auto; }
.class-info-card .nz-schedule-head .secondary-btn { height: 30px; padding: 0 9px; }
.nz-class-side .field { margin: 0; }
.nz-class-side .field > span { margin-bottom: 4px; font-size: 12px; }
.nz-class-side .input { height: 34px; font-size: 13px; }
.nz-class-side .input:disabled { color: var(--slate-700); background: var(--slate-50); }
.nz-class-save { display: flex; grid-column: 1 / -1; }
.nz-class-save { align-items: end; }
.nz-class-save .primary-btn { height: 32px; padding: 0 13px; font-size: 12px; }
.nz-schedule-block { display: grid; gap: 8px; }
.schedule-list.compact { margin: 0; max-height: 146px; overflow: auto; }
.schedule-list.compact li { grid-template-columns: 54px minmax(0,1fr) 28px; gap: 6px; }
.schedule-list.compact li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-list.compact.readonly li { grid-template-columns: 54px minmax(0,1fr); }
.nz-class-col { display: grid; gap: 12px; align-content: start; }
.nz-class-col .form-section-title { margin-top: 4px; }
.nz-schedule-head { display: flex; align-items: center; justify-content: space-between; color: var(--slate-700); font-size: 12px; font-weight: 600; }
.nz-schedule-head .secondary-btn { height: 30px; padding: 0 10px; font-size: 12px; }
.nz-attendance-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--slate-200); }
.nz-attendance-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nz-attendance-title h2 { margin: 0; font-size: 16px; }
.nz-attendance-head p { margin: 6px 0 0; color: var(--slate-500); font-size: 13px; }
.nz-attendance-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.nz-attendance-session { width: min(280px, 36vw); min-width: 196px; height: 38px; font-size: 13px; }
.nz-check { display: inline-flex; align-items: center; gap: 8px; color: var(--slate-700); font-size: 13px; font-weight: 600; cursor: pointer; }
.nz-check.tight { font-weight: 600; }
.nz-check input { width: 15px; height: 15px; accent-color: var(--brand-600); }
.nz-attendance-table { min-height: 0; flex: 1; overflow: auto; }
.nz-attendance-table thead { position: sticky; top: 0; z-index: 4; }
.nz-attendance-table .input { min-width: 0; }
.nz-attendance-table .attendance-status-col .input,
.nz-attendance-table .attendance-note-col .input { width: 100%; }
.nz-attendance-hint { margin: 0; padding: 12px 20px 16px; color: var(--slate-500); font-size: 13px; }
.nz-attendance-status { margin: 0; padding: 8px 20px 0; font-size: 13px; line-height: 18px; white-space: pre-line; }
.teacher-task-table .dashboard-attendance-note { white-space: normal; }
.nz-class-page:has(#attendance-form) .nz-attendance-head { gap: 10px; padding: 8px 12px; }
.nz-class-page:has(#attendance-form) .nz-attendance-title { gap: 6px; }
.nz-class-page:has(#attendance-form) .nz-attendance-title h2 { font-size: 15px; }
.nz-class-page:has(#attendance-form) .nz-attendance-head p { margin-top: 2px; font-size: 12px; }
.nz-class-page:has(#attendance-form) .nz-attendance-actions { gap: 8px; }
.nz-class-page:has(#attendance-form) .nz-attendance-session { height: 34px; font-size: 12px; }
.nz-class-page:has(#attendance-form) .nz-attendance-actions .primary-btn { height: 34px; padding: 0 12px; font-size: 12px; }
.nz-class-page:has(#attendance-form) .nz-check { gap: 6px; font-size: 12px; }
.nz-class-page:has(#attendance-form) .nz-attendance-table th { height: 34px; padding: 0 10px; }
.nz-class-page:has(#attendance-form) .nz-attendance-table td { padding: 7px 10px; }
.nz-class-page:has(#attendance-form) .nz-attendance-table .input { height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 12px; }
.nz-class-page:has(#attendance-form) .nz-attendance-hint { padding: 8px 14px 10px; font-size: 12px; }
.nz-class-page:has(#attendance-form) .nz-attendance-status { padding: 6px 14px 0; font-size: 12px; }
.admin-content:has(.nz-student-page) { display: flex; flex-direction: column; overflow: hidden; padding: 16px 20px; }
.nz-student-page { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.nz-student-page > .page-header { margin-bottom: 8px; }
.nz-student-page > .page-header p { margin-top: 2px; }
.nz-student-card { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.nz-student-body { min-height: 0; flex: 1; padding: 14px 16px 16px; overflow: auto; }
.nz-section-label { margin: 0 0 8px; color: var(--slate-500); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nz-student-form { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 12px; align-items: start; }
.nz-student-form .field { display: flex; margin: 0; min-width: 0; flex-direction: column; }
.nz-student-form .field > span { margin-bottom: 4px; color: var(--slate-700); font-size: 12px; font-weight: 600; }
.nz-student-form .input { height: 34px; font-size: 13px; }
.nz-student-form .input:disabled { color: var(--slate-700); background: var(--slate-50); }
.tuition-exempt-field { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; align-self: end; color: var(--slate-700); font-size: 13px; font-weight: 600; cursor: pointer; }
.tuition-exempt-field input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand-600); cursor: pointer; }
.tuition-exempt-field:has(input:checked) { color: #047857; }
.tuition-exempt-label { color: #047857; font-weight: 700; }
.nz-student-save { display: flex; align-items: end; min-height: 54px; }
.nz-student-save .primary-btn { height: 34px; padding: 0 14px; font-size: 13px; }
.nz-student-account { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--slate-200); }
@media (max-width: 1400px) {
  .class-info-content { grid-template-columns: minmax(0,.92fr) minmax(470px,1.08fr); }
  .class-info-card .nz-class-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .class-materials-block { grid-template-columns: 1fr; }
}
/* Màn hẹp: hai khối xếp dọc nên trang được phép cuộn lại. */
@media (max-width: 1250px) {
  .class-info-content { grid-template-columns: 1fr; overflow-y: auto; }
  .class-info-column { overflow: visible; }
  .class-config-column { min-height: 440px; }
  .class-off-table { max-height: 300px; }
}
@media (max-width: 1100px) {
  .class-off-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .nz-class-split { grid-template-columns: 1fr; }
  .nz-class-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-content:has(.nz-student-page), .admin-content:has(.nz-class-page) { overflow-y: auto; }
  .class-off-head { align-items: stretch; grid-template-columns: 1fr; }
  .class-off-card form[data-mode="COURSE"] .class-off-head { grid-template-columns: 1fr; }
  .class-off-head .field { width: 100%; }
  .nz-student-form { grid-template-columns: 1fr; }
  .nz-student-save { min-height: 0; }
  .nz-attendance-head { align-items: stretch; flex-direction: column; }
  .nz-attendance-actions { justify-content: flex-start; }
  .nz-attendance-session { width: 100%; min-width: 0; }
}

@media (max-width: 600px) {
  .sy-qr-upload { flex-direction: column; }
  .sy-qr-preview { width: 144px; height: 144px; flex-basis: 144px; }
  /* Bảng điểm danh mobile dùng bố cục kéo ngang ở đầu file (cố định STT + Học viên + Điểm danh). */
  .nz-class-page:has(#attendance-form) .nz-attendance-hint { padding: 7px 10px 8px; font-size: 11px; line-height: 15px; }
  .nz-class-page:has(#attendance-form) .nz-attendance-status { padding: 6px 10px 0; font-size: 11px; line-height: 15px; }
}

.class-transfer-cell { width: 1%; white-space: nowrap; }
.class-transfer-btn { min-height: 30px; padding: 0 10px; font-size: 11px; }
.class-students-card .people-table td { white-space: nowrap; }
.class-students-card .people-table td:nth-child(2), .class-students-card .cell-ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.class-student-modal { max-width: 680px; }
.class-transfer-modal { max-width: 520px; }
.class-student-modal-body { display: grid; gap: 12px; padding: 18px 20px; }
.class-student-modal-body .field { margin: 0; }
.class-student-picker { max-height: min(52vh,420px); grid-template-columns: 1fr 1fr; }
.class-student-picker [hidden] { display: none; }
.class-transfer-note { margin: 0; padding: 10px 12px; border-radius: 8px; color: var(--slate-600); background: var(--slate-50); font-size: 12px; line-height: 18px; }

/* Teacher mobile workspace: keep desktop tables intact and give phone screens task-focused views. */
.teacher-week-agenda { display: none; }

@media (max-width: 600px) {
  /* My classes: keep the phone table to the three operational columns. */
  .teacher-classes .page-header { margin-bottom: 8px; }
  .teacher-classes .page-header h1 { font-size: 18px; }
  .teacher-classes .page-header p { margin-top: 2px; font-size: 11px; line-height: 15px; }
  .teacher-classes .settings-card > .card-header { padding: 9px 10px; }
  .teacher-classes .settings-card > .card-header h2 { font-size: 14px; }
  .teacher-classes .settings-card > .card-header p { display: none; }
  .teacher-classes .table-wrap { overflow-x: hidden; }
  .teacher-classes-table { width: 100%; table-layout: fixed; }
  .teacher-classes-table th:nth-child(2), .teacher-classes-table td:nth-child(2),
  .teacher-classes-table th:nth-child(5), .teacher-classes-table td:nth-child(5),
  .teacher-classes-table th:nth-child(6), .teacher-classes-table td:nth-child(6),
  .teacher-classes-table th:nth-child(7), .teacher-classes-table td:nth-child(7) { display: none; }
  .teacher-classes-table th:nth-child(1) { width: 34px; }
  .teacher-classes-table th:nth-child(3) { width: 41%; }
  .teacher-classes-table th,
  .teacher-classes-table td { height: 38px; padding: 6px 5px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .teacher-classes-table td:nth-child(3) .table-link { display: block; width: 100%; overflow: hidden; font-size: 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }

  /* Dashboard overview */
  .teacher-dashboard > .page-header { margin-bottom: 10px; }
  .teacher-dashboard > .page-header h1 { font-size: 20px; line-height: 26px; }
  .teacher-dashboard > .page-header p { margin-top: 3px; font-size: 12px; line-height: 17px; }
  .teacher-dashboard-tabs { margin-bottom: 10px; }
  .teacher-metric-grid { gap: 8px; margin-bottom: 0; }
  .teacher-metric-grid .summary-card { min-height: 88px; padding: 13px 14px; }
  .teacher-metric-grid .summary-card strong { margin-top: 7px; font-size: 22px; }

  /* Dashboard tasks: only STT, class, state and action remain on phones. */
  .teacher-task-card .card-header { padding: 9px 10px; }
  .teacher-task-card .dashboard-activity-heading { display: flex; min-width: 0; align-items: baseline; gap: 6px; }
  .teacher-task-card .dashboard-activity-heading h2 { flex: 0 0 auto; font-size: 15px; }
  .teacher-task-card .dashboard-activity-heading p { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .teacher-task-card .dashboard-activity-date { width: 100%; justify-content: space-between; }
  .teacher-task-card .dashboard-activity-date .input { min-width: 0; flex: 1; }
  .teacher-task-card .table-wrap { overflow: hidden; }
  .teacher-task-table { width: 100%; table-layout: fixed; }
  .teacher-task-table th,
  .teacher-task-table td { height: auto; padding: 8px 4px; font-size: 10px; line-height: 14px; }
  .teacher-task-table th:nth-child(3), .teacher-task-table td:nth-child(3),
  .teacher-task-table th:nth-child(4), .teacher-task-table td:nth-child(4),
  .teacher-task-table th:nth-child(5), .teacher-task-table td:nth-child(5) { display: none; }
  .teacher-task-table th:nth-child(1) { width: 30px; }
  .teacher-task-table th:nth-child(2) { width: auto; }
  .teacher-task-table th:nth-child(6) { width: 96px; }
  .teacher-task-table th:nth-child(7) { width: 76px; }
  .teacher-task-table th:nth-child(6), .teacher-task-table td:nth-child(6) { text-align: center; }
  .teacher-task-table td:nth-child(2) .table-link { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 15px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .teacher-task-table td:nth-child(6) .badge { max-width: 92px; padding: 3px 5px; font-size: 8px; line-height: 11px; text-align: center; white-space: normal; }
  .teacher-task-action .secondary-btn { min-height: 30px; width: 72px; padding: 0 4px; font-size: 9px; }
  .teacher-tasks .page-header { margin-bottom: 8px; }
  .teacher-tasks .page-header h1 { font-size: 18px; }
  .teacher-tasks .page-header p { margin-top: 2px; font-size: 11px; line-height: 15px; }
  .teacher-tasks .teacher-metric-grid { gap: 8px; margin-bottom: 10px; grid-template-columns: 1fr 1fr; }
  .teacher-tasks-card > .card-header { padding: 9px 10px; }
  .teacher-tasks-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .teacher-task-filter { width: 100%; }
  .teacher-tasks-card > .card-header p { display: none; }
  .teacher-my-tasks-table th:nth-child(3), .teacher-my-tasks-table td:nth-child(3),
  .teacher-my-tasks-table th:nth-child(5), .teacher-my-tasks-table td:nth-child(5),
  .teacher-my-tasks-table th:nth-child(6), .teacher-my-tasks-table td:nth-child(6) { display: none; }
  .teacher-my-tasks-table th:nth-child(1) { width: 30px; }
  .teacher-my-tasks-table th:nth-child(2) { width: 86px; }
  .teacher-my-tasks-table th:nth-child(7) { width: 92px; }
  .teacher-my-tasks-table th:nth-child(8) { width: 76px; }

  /* Teacher calendar: a readable seven-day agenda replaces the squeezed desktop grid. */
  .admin-content:has(.teacher-calendar-page) { padding: 8px; overflow: hidden; }
  .teacher-calendar-page .calendar-card { border-radius: 12px; }
  .teacher-calendar-page .calendar-toolbar { display: grid; gap: 7px; padding: 8px; grid-template-columns: 1fr; overflow: visible; }
  .teacher-calendar-page .calendar-nav-buttons { display: grid; width: 100%; gap: 5px; grid-template-columns: 36px minmax(0,1fr) 36px; }
  .teacher-calendar-page .calendar-nav-buttons .secondary-btn { min-height: 34px; }
  .teacher-calendar-page .calendar-nav-buttons strong { grid-column: 1 / -1; grid-row: 2; margin: 0; padding-top: 1px; font-size: 12px; text-align: center; }
  .teacher-calendar-page .calendar-filters { display: block; width: 100%; }
  .teacher-calendar-page .calendar-filters .input[name="class"] { width: 100%; min-width: 0; height: 34px; }
  .teacher-calendar-page .calendar-view-buttons { display: none; }
  .teacher-calendar-page.teacher-calendar-view-week .teacher-calendar-desktop-board { display: none; }
  .teacher-calendar-page.teacher-calendar-view-week .teacher-week-agenda { display: block; min-height: 0; flex: 1; overflow-y: auto; background: var(--slate-100); scrollbar-gutter: stable; }
  .teacher-agenda-day { background: white; }
  .teacher-agenda-day + .teacher-agenda-day { margin-top: 6px; }
  .teacher-agenda-day > header { position: sticky; top: 0; z-index: 3; display: flex; min-height: 38px; align-items: center; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--slate-200); background: #f8fafc; }
  .teacher-agenda-day > header span { display: flex; align-items: baseline; gap: 6px; }
  .teacher-agenda-day > header strong { font-size: 12px; }
  .teacher-agenda-day > header small { color: var(--slate-500); font-size: 10px; }
  .teacher-agenda-day > header em { color: var(--slate-400); font-size: 9px; font-style: normal; }
  .teacher-agenda-day.is-today > header { color: var(--brand-700); background: #eff6ff; }
  .teacher-agenda-day.is-today > header em { color: var(--brand-700); font-weight: 700; }
  .teacher-agenda-session { display: grid; width: 100%; min-width: 0; min-height: 48px; align-items: center; gap: 8px; padding: 6px 9px; border: 0; border-bottom: 1px solid var(--slate-100); border-left: 3px solid #60a5fa; color: #075985; background: #f8fbff; text-align: left; grid-template-columns: 74px minmax(0,1fr) 12px; }
  .teacher-agenda-session time { font-size: 11px; font-weight: 700; white-space: nowrap; }
  .teacher-agenda-session time span { display: block; margin-top: 1px; color: var(--slate-500); font-size: 9px; font-weight: 500; }
  .teacher-agenda-class { min-width: 0; }
  .teacher-agenda-class strong,
  .teacher-agenda-class small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .teacher-agenda-class strong { font-size: 11px; line-height: 15px; }
  .teacher-agenda-class small { margin-top: 1px; color: var(--slate-500); font-size: 9px; }
  .teacher-agenda-arrow { color: var(--slate-400); font-size: 18px; }
  .teacher-agenda-session.tone-0 { border-left-color: #10b981; color: #047857; background: #f0fdf9; }
  .teacher-agenda-session.tone-1 { border-left-color: #8b5cf6; color: #6d28d9; background: #faf8ff; }
  .teacher-agenda-session.tone-2 { border-left-color: #0ea5e9; color: #0369a1; background: #f5fbff; }
  .teacher-agenda-session.tone-3 { border-left-color: #f59e0b; color: #b45309; background: #fffcf3; }
  .teacher-agenda-session.tone-4 { border-left-color: #f43f5e; color: #be123c; background: #fff8f9; }
  .teacher-agenda-session.status-completed { border-left-color: #16a34a; color: #047857; background: #f0fdf4; }
  .teacher-agenda-session.status-cancelled { opacity: .7; text-decoration: line-through; }
  .teacher-agenda-empty { margin: 0; padding: 10px; color: var(--slate-400); font-size: 10px; text-align: center; }

  /* Class workspace: header and three tabs stay put; only the selected tab scrolls. */
  .admin-content:has(.nz-class-page) { display: flex; padding: 7px 8px 8px; overflow: hidden; }
  .nz-class-page > .back-link { margin-bottom: 1px; font-size: 10px; line-height: 16px; }
  .nz-class-page > .page-header { gap: 3px; margin-bottom: 2px; }
  .nz-class-page > .page-header h1 { font-size: 16px; line-height: 20px; }
  .nz-class-page > .page-header p { max-width: 100%; margin-top: 0; overflow: hidden; font-size: 10px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .nz-class-heading-row { gap: 6px; }
  .nz-class-heading-row .page-actions { gap: 4px; }
  .nz-class-page > .page-header .badge { padding: 3px 7px; font-size: 9px; }
  .nz-class-page > .page-header .danger-btn { min-height: 28px; padding: 0 8px; font-size: 10px; }
  .nz-class-page .nz-class-tabs { width: 100%; flex: 0 0 auto; gap: 0; margin-bottom: 4px; overflow: hidden; }
  .nz-class-page .nz-tab { min-width: 0; padding: 7px 2px; flex: 1 1 0; overflow: hidden; font-size: 9px; line-height: 14px; text-align: center; text-overflow: ellipsis; }
  .nz-class-page .nz-class-card { min-height: 0; flex: 1; }
  .class-info-content { gap: 8px; }
  .nz-class-split { gap: 8px; padding: 9px 10px 10px; }
  .nz-class-fields { grid-template-columns: 1fr; gap: 7px; }
  .nz-class-fields .span-3 { grid-column: 1; }
  .nz-class-fields .field > span { font-size: 10px; }
  .nz-class-fields .input { height: 32px; font-size: 11px; }
  .nz-class-note { min-height: 46px; height: 46px; }
  .nz-class-save .primary-btn { width: 100%; }
  .class-off-head { gap: 8px; padding: 10px; }
  .class-off-head h2 { font-size: 14px; }
  .class-off-head p { margin-top: 2px; font-size: 10px; line-height: 14px; }
  .class-off-head .field > span { font-size: 10px; }
  .class-off-head .input { height: 32px; font-size: 11px; }
  .class-off-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding: 6px 10px; overflow: visible; }
  .class-off-summary > span { min-width: 0; justify-content: space-between; padding: 4px 7px; font-size: 9px; }
  .class-off-summary strong { font-size: 11px; }
  .class-materials-block { padding: 8px 10px; }
  .class-materials-fields { grid-template-columns: 1fr; }
  .class-off-table { max-height: 260px; overflow-x: auto; }
  .class-off-table table { width: 100%; min-width: 0; table-layout: fixed; }
  .class-off-table th { height: 28px; padding: 0 4px; font-size: 9px; }
  .class-off-table td { height: 30px; padding: 0 4px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .class-off-table th:first-child,
  .class-off-table td:first-child { width: 26px; }
  .class-off-table th:nth-child(2),
  .class-off-table td:nth-child(2) { width: 34px; text-align: center; white-space: nowrap; }
  .class-off-table th:nth-child(3),
  .class-off-table td:nth-child(3) { width: 48px; }
  .class-off-table th:nth-child(4),
  .class-off-table td:nth-child(4) { width: 82px; }
  .class-off-table th:nth-child(5),
  .class-off-table td:nth-child(5) { width: 28px; }
  .class-off-table th:nth-child(6),
  .class-off-table td:nth-child(6) { width: 78px; }
  .class-off-table .badge { padding: 2px 5px; font-size: 9px; }
  .class-off-footer { padding: 8px 10px; }
  .class-off-footer p { max-width: 62%; font-size: 9px; line-height: 13px; }
  .class-off-footer .primary-btn { height: 32px; padding: 0 10px; font-size: 10px; }
  .class-tuition-notice-card { padding: 8px 10px 10px; }
  .class-tuition-notice-head { align-items: flex-start; flex-direction: column; gap: 1px; }
  .class-tuition-notice-head p { max-width: 100%; text-align: left; }
  .class-tuition-notice-controls { grid-template-columns: minmax(0,1fr); }

  /* Student list inside a class: phone view keeps only order and student name. */
  .class-students-card > .card-header { padding: 8px 10px; }
  .class-students-card > .card-header h2 { font-size: 14px; }
  .class-students-card > .card-header p { display: none; }
  .class-students-card > .people-table { min-height: 0; flex: 1; overflow-x: hidden; overflow-y: auto; }
  .class-students-card table { width: 100%; table-layout: fixed; }
  .class-students-card th:nth-child(3), .class-students-card td:nth-child(3),
  .class-students-card th:nth-child(4), .class-students-card td:nth-child(4),
  .class-students-card th:nth-child(5), .class-students-card td:nth-child(5),
  .class-students-card th:nth-child(6), .class-students-card td:nth-child(6),
  .class-students-card th:nth-child(7), .class-students-card td:nth-child(7),
  .class-students-card th:nth-child(8), .class-students-card td:nth-child(8) { display: none; }
  .class-students-card th:nth-child(1) { width: 42px; }
  .class-students-card th,
  .class-students-card td { height: 38px; padding: 6px 9px; font-size: 11px; }
  .class-students-card thead { position: sticky; top: 0; z-index: 4; }
  .class-student-modal-body { padding: 12px; }
  .class-student-picker { max-height: 55vh; grid-template-columns: 1fr; }

  /* Điểm danh mobile dùng bố cục kéo ngang ở đầu file — bỏ grid siêu nhỏ cũ tại đây. */
}

/* Dự thu - Dự chi: compact, read-only financial overview. Keep this block last. */
.admin-content:has(.forecast-page) { display: flex; overflow: hidden; }
.forecast-page { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 10px; }
.forecast-summary-grid { display: grid !important; flex: 0 0 auto; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 10px; }
.forecast-summary { position: relative; display: block; min-width: 0; min-height: 92px; padding: 14px 16px 13px; overflow: hidden; border: 1px solid var(--slate-900); box-shadow: none; }
.forecast-summary::before { display: none; }
.forecast-summary small,.forecast-summary strong,.forecast-summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forecast-summary small { color: var(--slate-500); font-size: 11px; font-weight: 600; }
.forecast-summary strong { margin-top: 7px; color: var(--slate-900); font-size: 20px; line-height: 25px; }
.forecast-summary span { margin-top: 2px; color: var(--slate-500); font-size: 10px; }
.forecast-list-card { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.forecast-list-head { display: block; flex: 0 0 auto; padding: 12px 14px; }
.forecast-list-head > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.forecast-list-head h2,.forecast-list-head p { margin: 0; }
.forecast-list-head h2 { font-size: 15px; }
.forecast-list-head p { color: var(--slate-500); font-size: 11px; }
.forecast-filters { display: grid !important; width: 100%; align-items: end; grid-template-columns: minmax(220px,1.7fr) minmax(115px,.55fr) minmax(145px,.7fr) minmax(145px,.7fr) minmax(145px,.7fr) !important; gap: 9px; margin-top: 10px; }
.forecast-filters .field { min-width: 0; margin: 0; }
.forecast-filters .field > span { margin-bottom: 4px; font-size: 10px; }
.forecast-filters .input { height: 34px; font-size: 12px; }
.forecast-table { min-height: 0; max-height: none; flex: 1; overflow: auto; }
.forecast-table table { width: 100%; min-width: 980px; table-layout: fixed; }
.forecast-table th { height: 34px; padding: 7px 10px; border-right: 1px solid var(--slate-200); font-size: 10px; white-space: nowrap; }
.forecast-table td { height: 44px; max-width: 0; padding: 7px 10px; overflow: hidden; border-right: 1px solid var(--slate-200); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.forecast-table th:last-child,.forecast-table td:last-child { border-right: 0; }
.forecast-table th:nth-child(1) { width: 48px; }
.forecast-table th:nth-child(2) { width: 82px; }
.forecast-table th:nth-child(3) { width: 190px; }
.forecast-table th:nth-child(4) { width: auto; }
.forecast-table th:nth-child(5) { width: 132px; }
.forecast-table th:nth-child(6) { width: 132px; }
.forecast-table th:nth-child(7) { width: 108px; }
.forecast-table th:nth-child(8) { width: 104px; }
.forecast-table th:nth-child(9) { width: 72px; }
.forecast-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forecast-table td:nth-child(3) strong { display: inline; }
.forecast-source { display: inline; margin: 0 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forecast-note { white-space: nowrap; }
.forecast-table .money-cell { font-weight: 700; white-space: nowrap; }
.forecast-view-btn { width: 58px; height: 30px; padding: 0 10px; font-size: 11px; }
.danger-text { color: #dc2626 !important; font-weight: 700; }
.forecast-view-modal { width: min(680px,calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; }
.forecast-view-body { padding: 18px 22px; overflow: auto; }
.forecast-view-amount { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); }
.forecast-view-amount span { color: var(--slate-500); font-size: 13px; font-weight: 600; }
.forecast-view-amount strong { font-size: 24px; }
.forecast-view-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 14px 0 0; }
.forecast-view-grid > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--slate-200); border-radius: 9px; }
.forecast-view-grid .span-2 { grid-column: 1 / -1; }
.forecast-view-grid dt { margin-bottom: 5px; color: var(--slate-500); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.forecast-view-grid dd { margin: 0; color: var(--slate-900); font-size: 13px; line-height: 1.45; }
.forecast-view-grid dd small { display: block; margin-top: 3px; color: var(--slate-500); font-size: 11px; }

@media (max-width: 1100px) {
  .forecast-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .forecast-filters { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .forecast-filters .field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .admin-content:has(.forecast-page) { padding: 8px; }
  .forecast-summary-grid { grid-template-columns: 1fr 1fr !important; gap: 6px; }
  .forecast-summary { min-height: 80px; padding: 10px 11px; }
  .forecast-summary strong { margin-top: 4px; font-size: 15px; line-height: 20px; }
  .forecast-list-head > div:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .forecast-filters { grid-template-columns: 1fr !important; }
  .forecast-filters .field:first-child { grid-column: auto; }
  .forecast-view-modal { width: calc(100vw - 16px); }
  .forecast-view-body { padding: 12px; }
  .forecast-view-grid { grid-template-columns: 1fr; }
  .forecast-view-grid .span-2 { grid-column: auto; }
}
