/* ClassPlus design system */
:root {
  --cu-primary: #0077b6;
  --cu-secondary: #00b4d8;
  --cu-accent: #90e0ef;
  --cu-neutral: #1b263b;
  --cu-alert: #ef4444;
  --cu-bg: #f0f9ff;
  --cu-surface: #ffffff;
  --cu-muted: #61718b;
  --cu-border: rgba(0, 119, 182, 0.12);
  --cu-shadow-sm: 0 6px 18px rgba(0, 77, 120, 0.08);
  --cu-shadow-md: 0 10px 28px rgba(0, 77, 120, 0.12);
  --cu-shadow-lg: 0 16px 40px rgba(0, 77, 120, 0.16);
  --cu-radius-sm: 12px;
  --cu-radius-md: 16px;
  --cu-radius-lg: 24px;
  --cu-radius-xl: 28px;
  --cu-radius-hero: 40px;
  --ui-text: var(--cu-neutral);
  --ui-muted: var(--cu-muted);
  --ui-border: #cfe8f5;
  --ui-border-strong: #b8ddef;
  --ui-surface: var(--cu-surface);
  --ui-surface-soft: #f7fcff;
  --ui-accent: var(--cu-primary);
  --ui-accent-strong: #005f92;
  --ui-success: #0f8f57;
  --ui-danger: #c53c3c;
  --ui-shadow-sm: var(--cu-shadow-sm);
  --ui-shadow-md: var(--cu-shadow-md);
}

@keyframes cu-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cu-fade-down {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-body {
  background: var(--cu-bg);
}

.app-frame {
  max-width: 860px;
  margin: 0 auto;
}

.app-main {
  min-height: 100vh;
}

/* Role shell */
.role-shell {
  min-height: 100vh;
  background: var(--cu-bg);
  padding: 0 0 24px;
  animation: cu-fade-up 0.35s ease;
}

.role-shell-with-bottom-nav {
  padding-bottom: 104px;
}

.role-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cu-primary) 0%, var(--cu-secondary) 100%);
  border-bottom-left-radius: var(--cu-radius-hero);
  border-bottom-right-radius: var(--cu-radius-hero);
  padding: 18px 18px 72px;
  box-shadow: var(--cu-shadow-lg);
}

.role-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
}

.role-hero-pattern::before,
.role-hero-pattern::after {
  content: "";
  position: absolute;
  border: 4px solid #fff;
  border-radius: 50%;
}

.role-hero-pattern::before {
  width: 120px;
  height: 120px;
  top: 12px;
  right: 16px;
}

.role-hero-pattern::after {
  width: 88px;
  height: 88px;
  bottom: 24px;
  left: 12px;
}

.role-hero-inner {
  position: relative;
  z-index: 1;
}

.role-back-row {
  direction: ltr;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.back-row-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--cu-radius-md);
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  backdrop-filter: none;
  border: 2px solid rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38);
  font-size: 1.15rem;
  transition: background 0.2s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.back-row-btn:hover,
.back-row-btn:focus {
  background: linear-gradient(135deg, #fcd34d 0%, #fb923c 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
}

.role-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.role-hero-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.role-greeting {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}

.role-photo {
  width: 56px;
  height: 56px;
  border-radius: var(--cu-radius-lg);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--cu-shadow-sm);
  overflow: hidden;
  position: relative;
}

.profile-avatar-image,
.role-photo .profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.role-owner-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.role-owner-caption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.role-owner-caption i {
  font-size: 0.95rem;
  opacity: 0.9;
}

.role-display-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-display-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.role-display-chip i {
  font-size: 0.78rem;
  opacity: 0.9;
}

.role-display-chips--profile .role-display-chip {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  color: #1e40af;
  border: 1px solid #bfdbfe;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  font-size: 0.78rem;
  padding: 6px 12px;
}

.role-display-chips--hero .role-display-chip {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: none;
}

.role-display-school {
  width: 100%;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.role-display-school--profile {
  color: var(--cu-muted);
  font-size: 0.76rem;
}

.role-display-school--hero {
  color: rgba(255, 255, 255, 0.82);
}

.bell-btn {
  position: relative;
}

.bell-unread-badge {
  position: absolute;
  top: -4px;
  inset-inline-start: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
  pointer-events: none;
}

.circle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--cu-radius-md);
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  box-shadow: var(--cu-shadow-sm);
  transition: background 0.2s ease, transform 0.16s ease;
  position: relative;
}

.circle-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #fff;
  transform: translateY(-1px);
}

.circle-btn.ticket-btn {
  background: #fff;
  backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #1e3a5f;
}

.circle-btn.ticket-btn:hover {
  background: #f8fafc;
  color: #1e3a5f;
}

.role-shell-content {
  margin-top: -48px;
  padding: 0 18px;
  position: relative;
  z-index: 2;
  animation: cu-fade-up 0.45s ease 0.08s backwards;
}

/* Bottom navigation */
.app-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(860px, 100%);
  background: var(--cu-surface);
  border-top-left-radius: var(--cu-radius-xl);
  border-top-right-radius: var(--cu-radius-xl);
  box-shadow: 0 -4px 14px rgba(0, 77, 120, 0.12);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 10px 18px 12px;
  z-index: 30;
  border-top: 1px solid rgba(0, 119, 182, 0.08);
}

.nav-item {
  color: #8a95a6;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
}

.nav-item.active {
  color: var(--cu-primary);
}

.nav-ico-wrap {
  padding: 6px;
  border-radius: var(--cu-radius-sm);
  transition: background 0.2s ease;
}

.nav-item.active .nav-ico-wrap {
  background: var(--cu-accent);
}

.nav-ico {
  font-size: 1.25rem;
  color: #94a3b8;
}

.nav-item.active .nav-ico {
  color: var(--cu-primary);
}

.nav-item.center {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-top: -34px;
  background: linear-gradient(135deg, var(--cu-primary) 0%, var(--cu-secondary) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0, 119, 182, 0.38);
  color: #fff;
  padding: 0;
}

.nav-item.center .center-dot {
  font-size: 1.45rem;
  color: #fff;
}

/* Home / profile entry */
.home-page {
  min-height: 100vh;
  background: var(--cu-bg);
  padding: 20px 18px 24px;
  animation: cu-fade-up 0.35s ease;
}

.home-page-with-bottom-nav {
  padding-bottom: 104px;
}

.entry-hero {
  background: linear-gradient(135deg, var(--cu-primary) 0%, var(--cu-secondary) 100%);
  border-radius: var(--cu-radius-xl);
  padding: 18px;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--cu-shadow-lg);
}

.entry-hero::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  top: -20px;
  left: -20px;
}

.entry-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.entry-hero h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.entry-top-note {
  margin-top: 4px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.88);
}

.logout-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: none;
  color: #fff;
  border-radius: var(--cu-radius-sm);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.entry-card {
  background: var(--cu-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--cu-radius-xl);
  padding: 16px;
  box-shadow: var(--cu-shadow-md);
}

.entry-box {
  margin-top: 10px;
  border-radius: var(--cu-radius-md);
  padding: 12px 14px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-soft);
}

.entry-label {
  font-size: 0.82rem;
  color: var(--cu-muted);
  font-weight: 700;
}

.entry-value {
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--cu-neutral);
}

.entry-subvalue {
  margin-top: 3px;
  font-size: 0.84rem;
  color: var(--cu-muted);
}

.entry-value.mobile {
  direction: ltr;
  text-align: right;
}

.role-entry-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.role-entry-portal-list {
  margin-top: 10px;
}

a.profile-portal-card.role-entry-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.profile-portal-card.role-entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--cu-accent);
  box-shadow: var(--cu-shadow-md);
  color: inherit;
}

.role-entry-ticket-body {
  padding-top: 0;
  margin-top: 8px;
}

.profile-portal-head .role-entry-chevron {
  margin-inline-start: auto;
  color: var(--cu-muted);
  font-size: 0.84rem;
}

.role-entry-card {
  text-decoration: none;
  color: var(--cu-neutral);
  border: 1px solid var(--ui-border);
  background: var(--cu-surface);
  border-radius: var(--cu-radius-md);
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--cu-shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--cu-accent);
  box-shadow: var(--cu-shadow-md);
  color: var(--cu-neutral);
}

.role-entry-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--cu-radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.role-entry-icon {
  font-size: 1.05rem;
  color: var(--cu-neutral);
}

.role-entry-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.role-entry-ticket-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-ticket-stat {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4fb;
  color: #3b5f86;
}

.role-ticket-stat-new {
  background: #fff6e5;
  color: #92400e;
}

.role-ticket-stat-followup {
  background: #fce7f3;
  color: #9d174d;
}

.tone-student { background: #dbeafe; }
.tone-parent { background: #e9d5ff; }
.tone-staff { background: #d1fae5; }

.role-entry-chevron {
  color: var(--cu-muted);
  font-size: 0.84rem;
}

/* Menu grid */
.selected-parent-student-card {
  border: 1px solid var(--ui-border);
  background: var(--cu-surface);
  border-radius: var(--cu-radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--cu-shadow-sm);
}

.selected-parent-student-title {
  font-size: 0.8rem;
  color: var(--cu-muted);
  font-weight: 700;
}

.selected-parent-student-text {
  margin-top: 6px;
  font-size: 0.84rem;
  color: #1e40af;
  font-weight: 700;
  line-height: 1.6;
}

.selected-parent-student-card .role-display-chips {
  margin-top: 8px;
}

.role-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.menu-card {
  min-height: 128px;
  border-radius: var(--cu-radius-lg);
  background: var(--cu-surface);
  box-shadow: var(--cu-shadow-md);
  text-decoration: none;
  color: var(--cu-neutral);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.menu-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--cu-shadow-lg);
  color: var(--cu-neutral);
}

.menu-card:active {
  transform: scale(0.98);
}

.menu-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--cu-radius-md);
  display: grid;
  place-items: center;
  box-shadow: var(--cu-shadow-sm);
}

.menu-icon {
  font-size: 1.55rem;
  line-height: 1;
  color: var(--cu-neutral);
}

.menu-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-soon-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cu-muted);
}

.menu-card-coming-soon {
  border: 1px dashed #b8ddef;
  opacity: 0.88;
}

.menu-title {
  font-size: 0.98rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.4;
}

.menu-tone-blue .menu-icon-wrap { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.menu-tone-violet .menu-icon-wrap { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.menu-tone-emerald .menu-icon-wrap { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.menu-tone-amber .menu-icon-wrap { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.menu-tone-sky .menu-icon-wrap { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.menu-tone-rose .menu-icon-wrap { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }
.menu-tone-teal .menu-icon-wrap { background: linear-gradient(135deg, #ccfbf1, #99f6e4); }
.menu-tone-indigo .menu-icon-wrap { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }

/* Content panels */
.role-content-panel {
  background: var(--cu-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--cu-radius-lg);
  padding: 18px;
  box-shadow: var(--cu-shadow-md);
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.page-head-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--cu-radius-md);
  background: linear-gradient(135deg, var(--cu-accent), #caf0f8);
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  color: var(--cu-primary);
  flex-shrink: 0;
  box-shadow: var(--cu-shadow-sm);
}

.page-head h1 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--cu-neutral);
}

.page-head p {
  margin: 3px 0 0;
  color: var(--cu-muted);
  font-size: 0.86rem;
}

.flash-message {
  border-radius: var(--cu-radius-md);
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
  box-shadow: var(--cu-shadow-sm);
}

.flash-message.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-right: 4px solid var(--ui-success);
}

.flash-message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-right: 4px solid var(--ui-danger);
}

.flash-message.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-right: 4px solid var(--cu-primary);
}

.flash-message.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-right: 4px solid #f59e0b;
}

.empty-text,
.page-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--cu-muted);
}

.page-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.55;
}

.state-badge {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  white-space: nowrap;
}

.state-in-line { color: #15557f; background: #caf0f8; }
.state-in-progress { color: #825500; background: #ffe9bd; }
.state-done { color: #10683c; background: #d1fae5; }
.state-cancelled { color: #7b1f1f; background: #ffe1e1; }
.state-unknown { color: #475569; background: #e2e8f0; }

.hw-score-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.hw-score-band {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  white-space: nowrap;
}

.hw-score-band--very-bad {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.hw-score-band--below {
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid #fdba74;
}

.hw-score-band--expected {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.hw-score-band--beyond {
  color: #047857;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
}

.exam-state-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.exam-state-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: var(--cu-surface);
  color: var(--cu-text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.exam-state-tab.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.exam-state-tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.72rem;
  line-height: 20px;
  text-align: center;
}

.exam-state-tab.active .exam-state-tab-count {
  background: #1d4ed8;
  color: #fff;
}

.js-time-24h-input[type="time"] {
  direction: ltr;
  text-align: center;
}

.list-card {
  border: 1px solid var(--ui-border);
  background: var(--cu-surface);
  border-radius: var(--cu-radius-lg);
  padding: 14px;
  box-shadow: var(--cu-shadow-sm);
  display: grid;
  gap: 6px;
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cu-shadow-md);
}

.list-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.list-card-head strong {
  font-size: 0.96rem;
  color: var(--cu-neutral);
}

.list-card-subtitle {
  margin: 0;
  font-size: 0.84rem;
  color: var(--cu-muted);
}

.list-card-actions {
  margin-top: 6px;
}

.list-card-waiting {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--cu-muted);
}

.list-card-waiting i {
  margin-left: 4px;
}

.page-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cu-neutral);
  margin: 0 0 12px;
}

.list-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: var(--cu-muted);
}

.list-card-meta i {
  margin-left: 4px;
  color: var(--cu-primary);
}

.list-cards {
  display: grid;
  gap: 12px;
}

.list-card--active {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.menu-page-panel {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.menu-page-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--cu-radius-lg);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cu-accent), #caf0f8);
  color: var(--cu-primary);
  font-size: 1.85rem;
  margin-bottom: 14px;
  box-shadow: var(--cu-shadow-sm);
}

.menu-page-panel h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cu-neutral);
}

.menu-page-panel p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--cu-muted);
}

/* Profile page */
.profile-page {
  display: grid;
  gap: 12px;
  padding-bottom: 8px;
}

.profile-summary-card,
.profile-section-card {
  background: var(--cu-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--cu-radius-xl);
  padding: 16px;
  box-shadow: var(--cu-shadow-md);
}

.profile-summary-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cu-primary) 0%, var(--cu-secondary) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 119, 182, 0.28);
  overflow: hidden;
  position: relative;
}

.profile-photo-upload-form {
  margin: 0;
}

.profile-avatar-upload {
  position: relative;
  display: inline-grid;
  cursor: pointer;
}

.profile-photo-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-avatar-upload-badge {
  position: absolute;
  left: -4px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--cu-surface);
  color: var(--cu-primary);
  border: 1px solid var(--ui-border);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  box-shadow: var(--cu-shadow-sm);
}

.profile-photo-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--cu-muted);
}

.profile-flash {
  margin-bottom: 10px;
}

.profile-summary-text h1 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--cu-neutral);
}

.profile-mobile {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--cu-muted);
  direction: ltr;
  text-align: right;
}

.profile-summary-text .role-display-chips {
  margin-top: 8px;
}

.profile-summary-text .role-display-school {
  margin-top: 2px;
}

.profile-current-role {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 99px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  max-width: 100%;
}

.profile-logout-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: var(--ui-surface-soft);
  color: #b42318;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-logout-btn:hover {
  background: #fff1f1;
  border-color: #f2c4c4;
}

.profile-stats-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--ui-border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-stat {
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--cu-radius-md);
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
}

.profile-stat strong {
  display: block;
  font-size: 1.05rem;
  color: var(--cu-primary);
}

.profile-stat span {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--cu-muted);
  font-weight: 700;
}

.profile-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-section-head i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--cu-accent);
  color: var(--cu-primary);
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.profile-section-head h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--cu-neutral);
}

.profile-info-grid {
  display: grid;
  gap: 8px;
}

.profile-info-item {
  border: 1px solid var(--ui-border);
  border-radius: var(--cu-radius-md);
  background: var(--ui-surface-soft);
  padding: 10px 12px;
}

.profile-info-label {
  display: block;
  font-size: 0.76rem;
  color: var(--cu-muted);
  font-weight: 700;
  margin-bottom: 3px;
}

.profile-info-item strong {
  font-size: 0.9rem;
  color: var(--cu-neutral);
}

.profile-ltr-value {
  direction: ltr;
  text-align: right;
  display: block;
}

.profile-empty-text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--cu-muted);
}

.profile-year-box {
  border: 1px solid var(--ui-border);
  border-radius: var(--cu-radius-md);
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fd 100%);
  padding: 12px;
}

.profile-year-box strong {
  display: block;
  font-size: 0.95rem;
  color: var(--cu-neutral);
}

.profile-year-box span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--cu-muted);
}

.profile-role-badges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-role-badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 700;
}

.badge-student { background: #dbeafe; color: #1d4ed8; }
.badge-parent { background: #ede9fe; color: #6d28d9; }
.badge-staff { background: #dcfce7; color: #15803d; }

.profile-portal-list {
  display: grid;
  gap: 10px;
}

.profile-portal-card {
  border: 1px solid var(--ui-border);
  border-radius: var(--cu-radius-md);
  background: var(--ui-surface-soft);
  overflow: hidden;
}

.profile-portal-card.is-current {
  border-color: rgba(0, 119, 182, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 119, 182, 0.08);
}

.profile-portal-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px dashed var(--ui-border);
}

.profile-portal-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #1f2a3a;
}

.profile-portal-head strong {
  display: block;
  font-size: 0.88rem;
  color: var(--cu-neutral);
}

.profile-portal-school {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--cu-muted);
}

.profile-current-tag {
  padding: 3px 8px;
  border-radius: 99px;
  background: #e8f1ff;
  color: #2e5d93;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-portal-body {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
}

.profile-portal-row {
  display: grid;
  gap: 2px;
}

.profile-portal-row span {
  font-size: 0.74rem;
  color: var(--cu-muted);
  font-weight: 700;
}

.profile-portal-row strong {
  font-size: 0.84rem;
  color: var(--cu-neutral);
  line-height: 1.7;
}

.profile-portal-link,
.profile-action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px dashed var(--ui-border);
  text-decoration: none;
  color: var(--cu-primary);
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(0, 119, 182, 0.04);
}

.profile-portal-link:hover,
.profile-action-link:hover {
  background: rgba(0, 119, 182, 0.08);
  color: var(--cu-primary);
}

.profile-logout-block {
  margin-top: 4px;
}

.profile-logout-wide-btn {
  width: 100%;
  border: 1px solid #f2c4c4;
  background: #fff1f1;
  color: #972727;
  border-radius: var(--cu-radius-md);
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}

.profile-logout-wide-btn:hover {
  background: #ffe7e7;
}

@media (min-width: 700px) {
  .role-hero {
    padding: 22px 24px 76px;
  }

  .role-shell-content {
    padding: 0 24px;
  }

  .home-page {
    padding: 24px;
  }

  .menu-card {
    min-height: 136px;
  }

  .profile-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tuition-page-panel.class-exams-page-panel,
.support-tickets-page-panel.class-exams-page-panel,
.teacher-contents-page-panel.class-exams-page-panel,
.educational-contents-page-panel.class-exams-page-panel,
.teacher-content-detail-page-panel.class-exams-page-panel {
  background: #ffffff;
  border: 1px solid #dbe7f3;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(24, 43, 68, 0.08);
}

.tuition-page-panel .class-exams-head,
.support-tickets-page-panel .class-exams-head,
.teacher-contents-page-panel .class-exams-head,
.educational-contents-page-panel .class-exams-head,
.teacher-content-detail-page-panel .class-exams-head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tuition-page-panel .class-exams-head-text,
.support-tickets-page-panel .class-exams-head-text,
.teacher-contents-page-panel .class-exams-head-text,
.educational-contents-page-panel .class-exams-head-text,
.teacher-content-detail-page-panel .class-exams-head-text{
  flex: 1;
  min-width: 0;
}

.tuition-page-panel .class-exams-head-icon,
.support-tickets-page-panel .class-exams-head-icon,
.teacher-contents-page-panel .class-exams-head-icon,
.educational-contents-page-panel .class-exams-head-icon,
.teacher-content-detail-page-panel .class-exams-head-icon{
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #edf5fe;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #111827;
  flex-shrink: 0;
}

.tuition-page-panel .class-exams-head h1,
.support-tickets-page-panel .class-exams-head h1,
.teacher-contents-page-panel .class-exams-head h1,
.educational-contents-page-panel .class-exams-head h1,
.teacher-content-detail-page-panel .class-exams-head h1{
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1b2b44;
}

.tuition-page-panel .class-exams-head p,
.support-tickets-page-panel .class-exams-head p,
.teacher-contents-page-panel .class-exams-head p,
.educational-contents-page-panel .class-exams-head p,
.teacher-content-detail-page-panel .class-exams-head p{
  margin: 2px 0 0;
  color: #68798f;
  font-size: 0.85rem;
}

.tuition-page-panel .class-exams-new-btn,
.support-tickets-page-panel .class-exams-new-btn,
.teacher-contents-page-panel .class-exams-new-btn,
.educational-contents-page-panel .class-exams-new-btn,
.teacher-content-detail-page-panel .class-exams-new-btn{
  flex-shrink: 0;
  white-space: nowrap;
}

.tuition-page-panel .filter-box-collapsible,
.support-tickets-page-panel .filter-box-collapsible,
.teacher-contents-page-panel .filter-box-collapsible,
.educational-contents-page-panel .filter-box-collapsible,
.teacher-content-detail-page-panel .filter-box-collapsible{
  margin-top: 0;
}

.tuition-page-panel .tuition-state-tabs,
.support-tickets-page-panel .tuition-state-tabs,
.teacher-contents-page-panel .tuition-state-tabs,
.educational-contents-page-panel .tuition-state-tabs,
.teacher-content-detail-page-panel .tuition-state-tabs{
  margin-top: 12px;
  margin-bottom: 0;
}

.tuition-page-panel .class-exams-list,
.support-tickets-page-panel .class-exams-list,
.teacher-contents-page-panel .class-exams-list,
.educational-contents-page-panel .class-exams-list,
.teacher-content-detail-page-panel .class-exams-list{
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
  background: #fbfdff;
}

.tuition-page-panel .class-exams-list-header,
.support-tickets-page-panel .class-exams-list-header,
.teacher-contents-page-panel .class-exams-list-header,
.educational-contents-page-panel .class-exams-list-header,
.teacher-content-detail-page-panel .class-exams-list-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8eef5;
}

.tuition-page-panel .class-exams-list-header h2,
.support-tickets-page-panel .class-exams-list-header h2,
.teacher-contents-page-panel .class-exams-list-header h2,
.educational-contents-page-panel .class-exams-list-header h2,
.teacher-content-detail-page-panel .class-exams-list-header h2{
  font-size: 0.95rem;
  color: #1f2a3a;
  margin: 0;
  font-weight: 800;
}

.tuition-page-panel .empty-text,
.support-tickets-page-panel .empty-text,
.teacher-contents-page-panel .empty-text,
.educational-contents-page-panel .empty-text,
.teacher-content-detail-page-panel .empty-text{
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  color: #6d7d92;
  font-size: 0.88rem;
}

.tuition-page-panel .class-exam-items,
.support-tickets-page-panel .class-exam-items,
.teacher-contents-page-panel .class-exam-items,
.educational-contents-page-panel .class-exam-items,
.teacher-content-detail-page-panel .class-exam-items{
  display: grid;
  gap: 8px;
}

.tuition-page-panel .class-exam-item,
.support-tickets-page-panel .class-exam-item,
.teacher-contents-page-panel .class-exam-item,
.educational-contents-page-panel .class-exam-item,
.teacher-content-detail-page-panel .class-exam-item{
  border: 1px solid #d9e6f3;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(24, 46, 73, 0.06);
  display: grid;
  gap: 6px;
}

.tuition-page-panel .class-exam-item-head,
.support-tickets-page-panel .class-exam-item-head,
.teacher-contents-page-panel .class-exam-item-head,
.educational-contents-page-panel .class-exam-item-head,
.teacher-content-detail-page-panel .class-exam-item-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.tuition-page-panel .class-exam-item-head strong,
.support-tickets-page-panel .class-exam-item-head strong,
.teacher-contents-page-panel .class-exam-item-head strong,
.educational-contents-page-panel .class-exam-item-head strong,
.teacher-content-detail-page-panel .class-exam-item-head strong{
  font-size: 0.95rem;
  color: #1f2a3a;
  line-height: 1.4;
}

.tuition-page-panel .class-exam-class,
.support-tickets-page-panel .class-exam-class,
.teacher-contents-page-panel .class-exam-class,
.educational-contents-page-panel .class-exam-class,
.teacher-content-detail-page-panel .class-exam-class{
  margin: 0;
  font-size: 0.82rem;
  color: #6d7d92;
}

.tuition-page-panel .class-exam-meta,
.support-tickets-page-panel .class-exam-meta,
.teacher-contents-page-panel .class-exam-meta,
.educational-contents-page-panel .class-exam-meta,
.teacher-content-detail-page-panel .class-exam-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.79rem;
  color: #4f6179;
}

.tuition-page-panel .class-exam-meta i,
.support-tickets-page-panel .class-exam-meta i,
.teacher-contents-page-panel .class-exam-meta i,
.educational-contents-page-panel .class-exam-meta i,
.teacher-content-detail-page-panel .class-exam-meta i{
  margin-left: 3px;
  color: #8aa0b8;
}

.tuition-page-panel .class-exam-date,
.support-tickets-page-panel .class-exam-date,
.teacher-contents-page-panel .class-exam-date,
.educational-contents-page-panel .class-exam-date,
.teacher-content-detail-page-panel .class-exam-date{
  color: #8a9bb0;
  font-size: 0.75rem;
}

.tuition-page-panel .class-exam-date i,
.support-tickets-page-panel .class-exam-date i,
.teacher-contents-page-panel .class-exam-date i,
.educational-contents-page-panel .class-exam-date i,
.teacher-content-detail-page-panel .class-exam-date i{
  margin-left: 3px;
}

.tuition-page-panel .class-exam-actions,
.support-tickets-page-panel .class-exam-actions,
.teacher-contents-page-panel .class-exam-actions,
.educational-contents-page-panel .class-exam-actions,
.teacher-content-detail-page-panel .class-exam-actions{
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed #e4ecf5;
}

.tuition-page-panel .state-badge,
.support-tickets-page-panel .state-badge,
.teacher-contents-page-panel .state-badge,
.educational-contents-page-panel .state-badge,
.teacher-content-detail-page-panel .state-badge{
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tuition-plan-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.tuition-page-panel .class-exam-item.tuition-plan-item {
  display: grid;
  gap: 0;
}

.tuition-plan-item-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.tuition-page-panel .class-exam-item.tuition-plan-link,
.support-tickets-page-panel .class-exam-item.tuition-plan-link,
.class-exams-page-panel .class-exam-item.tuition-plan-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.tuition-plan-item-link:hover {
  border-color: #b8cfe8;
  box-shadow: 0 8px 20px rgba(24, 46, 73, 0.1);
  transform: translateY(-1px);
  color: inherit;
}

.tuition-plan-item-link:hover .tuition-plan-chevron {
  color: #3b82f6;
}

.tuition-plan-link-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.tuition-plan-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #9aadc4;
  font-size: 1rem;
  align-self: center;
}

.tuition-plan-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.tuition-plan-stat {
  background: #f4f8fc;
  border: 1px solid #e3ebf5;
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.tuition-plan-stat-label {
  font-size: 0.72rem;
  color: #7a8ea6;
  font-weight: 700;
}

.tuition-plan-stat-value {
  font-size: 0.82rem;
  color: #1f2a3a;
  font-weight: 800;
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tuition-plan-stat-value small {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7a8ea6;
}

.tuition-plan-detail-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 2px solid #fcd34d;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.btn.btn-sm.app-back-btn,
.app-back-btn,
.tuition-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 11px 16px !important;
  border: none !important;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn.btn-sm.app-back-btn:hover,
.btn.btn-sm.app-back-btn:focus,
.app-back-btn:hover,
.app-back-btn:focus,
.tuition-back-btn:hover,
.tuition-back-btn:focus {
  color: #fff !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.42);
  filter: brightness(1.04);
}

.app-back-btn i,
.tuition-back-btn i {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.top-row {
  margin-bottom: 12px;
}

.top-row .app-back-btn {
  width: 100%;
}

.form-actions .app-back-btn {
  width: auto;
  min-width: 120px;
}

.tuition-plan-detail-summary strong {
  display: block;
  font-size: 0.95rem;
  color: #1f2a3a;
  margin-bottom: 6px;
}

.tuition-back-btn i {
  margin-left: 4px;
}

/* legacy alias: tuition-back-btn inherits app-back-btn styles above */

.tuition-list-section {
  margin-top: 0;
}

.tuition-installment-items .tuition-installment-item {
  border: 1px solid #e0e9f4;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.tuition-state-1 { background: #fef3c7; color: #92400e; }
.tuition-state-2 { background: #dbeafe; color: #1e40af; }
.tuition-state-3 { background: #d1fae5; color: #065f46; }
.tuition-state-4 { background: #fee2e2; color: #991b1b; }
.tuition-state-5 { background: #ede9fe; color: #5b21b6; }

.tuition-plan-state-1 { background: #dbeafe; color: #1e40af; }
.tuition-plan-state-2 { background: #d1fae5; color: #065f46; }

.tuition-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.tuition-payment-meta {
  margin-top: 8px;
}

.tuition-plan-detail-stats {
  margin: 10px 0 6px;
}

.tuition-report-summary {
  padding: 12px;
  border: 1px solid #e0e9f4;
  border-radius: 12px;
  background: #f8fbff;
}

.tuition-report-category-total {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef4ff;
  text-align: left;
}

/* Manager report tables */
.cer-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  margin-bottom: 12px;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  background: #fff;
}

.cer-table-scroll-hint {
  display: none;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff8e6;
  color: #7a5b00;
  font-size: 0.78rem;
  font-weight: 600;
}

.cer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.cer-table th,
.cer-table td {
  border: 1px solid #cfd9e6;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.cer-table thead th {
  background: #fff3cd;
  color: #5c4a00;
  font-weight: 800;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: normal;
}

.cer-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.cer-table tbody tr:nth-child(even) {
  background: #f3f8ff;
}

.cer-table tbody td.empty-text {
  text-align: center;
  color: #64748b;
  padding: 18px 12px;
}

.cer-table .cer-table-cell-title {
  text-align: right;
  white-space: normal;
  min-width: 96px;
  font-weight: 700;
  color: #1e293b;
}

.cer-table .cer-table-cell-num {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.financial-report-table {
  min-width: 920px;
}

.financial-report-table thead th:first-child,
.financial-report-table tbody td.cer-table-cell-title,
.financial-report-table tfoot th:first-child {
  position: sticky;
  right: 0;
  z-index: 2;
  box-shadow: -3px 0 6px rgba(15, 23, 42, 0.06);
}

.financial-report-table thead th:first-child {
  z-index: 3;
}

.financial-report-table tbody tr:nth-child(odd) td.cer-table-cell-title {
  background: #ffffff;
}

.financial-report-table tbody tr:nth-child(even) td.cer-table-cell-title {
  background: #f3f8ff;
}

.financial-report-table tfoot .financial-report-total-row th {
  background: #dbeafe;
  color: #1e3a5f;
  font-weight: 800;
  border-top: 2px solid #93c5fd;
}

.financial-report-table tfoot .financial-report-total-row th:first-child {
  background: #dbeafe;
}

@media (max-width: 720px) {
  .cer-table-scroll-hint {
    display: block;
  }

  .manager-report-page .cer-table-wrap {
    margin-inline: -4px;
    border-radius: 10px;
  }
}

.tuition-receipt-link {
  margin-top: 4px;
}

.tuition-modal-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}

.tuition-modal-amount-grid .modal-field {
  margin-bottom: 0;
}

body > .modal.tuition-create-modal .modal-dialog {
  max-width: min(560px, calc(100vw - 24px));
}

body > .modal .modal-field {
  margin-bottom: 12px;
}

body > .modal .modal-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5f728a;
}

.tuition-installment-builder {
  margin-top: 4px;
  border: 1px solid #e0e9f4;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.tuition-installment-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.tuition-installment-builder-head strong {
  font-size: 0.88rem;
  color: #1f2a3a;
}

.tuition-installment-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1.5fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.tuition-installment-row-header {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e3ebf5;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7a8ea6;
}

.tuition-installment-row-header .tuition-row-num {
  font-weight: 700;
  color: #7a8ea6;
}

.tuition-installment-row .tuition-inst-date-wrap {
  min-width: 0;
}

.tuition-installment-row .jdate-filter-wrap {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.tuition-installment-row .jdate-filter-wrap .form-control {
  flex: 1;
  min-width: 0;
}

.tuition-installment-row .jdate-filter-btn {
  flex: 0 0 auto;
  padding-inline: 8px;
}

.tuition-row-num {
  font-weight: 700;
  color: var(--cu-primary, #2563eb);
  text-align: center;
  font-size: 0.85rem;
}

.tuition-remove-installment {
  flex: 0 0 auto;
  padding-inline: 8px;
}

.tuition-modal-student-picker {
  margin-bottom: 12px;
}

.tuition-modal-student-search {
  margin-bottom: 8px;
}

.tuition-modal-student-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed #d5e0ef;
  border-radius: 10px;
  background: #f8fbff;
}

.tuition-modal-student-list {
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  border: 1px solid #e0e9f4;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.tuition-student-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e9f2;
  border-radius: 10px;
  padding: 7px 8px;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.tuition-student-option:hover {
  border-color: #b8cbe3;
  background: #f7fbff;
}

.tuition-student-option:has(input:checked) {
  border-color: #7ca9e2;
  background: #edf5fe;
}

.tuition-student-option span {
  font-weight: 700;
  color: #1d2b40;
  font-size: 0.88rem;
}

.tuition-student-option input {
  margin: 0;
  flex: 0 0 auto;
}

.js-en-numeric-input,
.js-en-amount-input {
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 576px) {
  .tuition-plan-stats {
    grid-template-columns: 1fr;
  }

  .tuition-modal-amount-grid {
    grid-template-columns: 1fr;
  }

  .tuition-page-panel .class-exams-head,
  .support-tickets-page-panel .class-exams-head,
  .teacher-contents-page-panel .class-exams-head,
  .educational-contents-page-panel .class-exams-head,
  .teacher-content-detail-page-panel .class-exams-head {
    flex-wrap: wrap;
  }

  .tuition-installment-row {
    grid-template-columns: 28px 1fr auto;
    grid-template-areas:
      "num amount action"
      "num date action";
  }

  .tuition-installment-row .tuition-remove-installment {
    grid-area: action;
    align-self: center;
  }

  .tuition-installment-row .tuition-row-num {
    grid-area: num;
    align-self: center;
  }

  .tuition-installment-row .inst-amount,
  .tuition-installment-row > input {
    grid-area: amount;
  }

  .tuition-installment-row .tuition-inst-date-wrap {
    grid-area: date;
  }

  .tuition-installment-row-header {
    display: none;
  }
}

.support-tickets-page-panel .ticket-list-section {
  margin-top: 0;
}

.support-tickets-page-panel .ticket-item-link {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.support-tickets-page-panel .class-exam-item.ticket-item-link {
  display: flex;
}

.support-tickets-page-panel .ticket-item-link:hover {
  border-color: #b8cfe8;
  box-shadow: 0 8px 20px rgba(24, 46, 73, 0.1);
  transform: translateY(-1px);
  color: inherit;
}

.support-tickets-page-panel .ticket-item-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: #9aadc4;
  font-size: 1rem;
  align-self: center;
}

.support-tickets-page-panel .ticket-item-link:hover .ticket-item-chevron {
  color: #3b82f6;
}

.support-tickets-page-panel .ticket-item-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding-left: 2px;
}

.support-tickets-page-panel .ticket-item-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.support-tickets-page-panel .ticket-item-head-row strong {
  font-size: 0.95rem;
  color: #1f2a3a;
  line-height: 1.4;
  min-width: 0;
}

.support-tickets-page-panel .ticket-item-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.support-tickets-page-panel .ticket-item-category {
  margin: 0;
  font-size: 0.82rem;
  color: #6d7d92;
}

.support-tickets-page-panel .ticket-item-date {
  color: #8a9bb0;
  font-size: 0.75rem;
  white-space: nowrap;
}

.support-tickets-page-panel .ticket-item-date i {
  margin-left: 3px;
}

.support-tickets-page-panel .ticket-thread-section {
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
  background: #fbfdff;
  display: grid;
  gap: 10px;
}

.support-tickets-page-panel .ticket-message-card {
  border: 1px solid #d9e6f3;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.support-tickets-page-panel .ticket-message-staff {
  border-color: #b9d8f5;
  background: #f3f9ff;
}

.support-tickets-page-panel .ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.support-tickets-page-panel .ticket-message-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 0.88rem;
  color: #1f2a3a;
}

.support-tickets-page-panel .ticket-reply-form {
  border-top: 1px dashed #d9e6f3;
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.support-tickets-page-panel .ticket-reply-form h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2a3a;
}

.support-tickets-page-panel .ticket-item-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.support-tickets-page-panel .ticket-unread-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fff6e5;
  color: #92400e;
}

.support-tickets-page-panel .ticket-unread-badge-answer {
  background: #dbeafe;
  color: #1e40af;
}

.support-tickets-page-panel .ticket-state-1 { background: #eef4ff; color: #1e4f91; }
.support-tickets-page-panel .ticket-state-2 { background: #fff6e5; color: #8d5f05; }
.support-tickets-page-panel .ticket-state-3 { background: #e9f8ef; color: #116434; }
.support-tickets-page-panel .ticket-state-4 { background: #f3f4f6; color: #4b5563; }

.counseling-sessions-page-panel .filter-box-collapsible {
  margin-bottom: 16px;
}

.counseling-sessions-page-panel .exam-state-tabs {
  margin-top: 4px;
}

.counseling-sessions-page-panel .counseling-state-1,
.support-tickets-page-panel .counseling-state-1 { background: #eef4ff; color: #1e4f91; }
.counseling-sessions-page-panel .counseling-state-2,
.support-tickets-page-panel .counseling-state-2 { background: #e9f8ef; color: #116434; }
.counseling-sessions-page-panel .counseling-state-3,
.support-tickets-page-panel .counseling-state-3 { background: #f3f4f6; color: #4b5563; }

.counseling-sessions-page-panel .counseling-session-item {
  display: grid;
  gap: 8px;
}

.counseling-sessions-page-panel .counseling-session-actions {
  padding: 0 12px 12px;
}

.teacher-contents-page-panel .ticket-item-head-row,
.educational-contents-page-panel .ticket-item-head-row,
.teacher-contents-page-panel .ticket-item-category-row,
.educational-contents-page-panel .ticket-item-category-row,
.teacher-content-detail-page-panel .ticket-item-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.teacher-contents-page-panel .ticket-item-link,
.educational-contents-page-panel .ticket-item-link{
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: color 0.16s ease;
}

.teacher-contents-page-panel .ticket-item-link:hover,
.educational-contents-page-panel .ticket-item-link:hover{
  color: inherit;
}

.teacher-contents-page-panel .ticket-item-chevron,
.educational-contents-page-panel .ticket-item-chevron{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: #9aadc4;
  font-size: 1rem;
  align-self: center;
}

.teacher-contents-page-panel .ticket-item-link:hover .ticket-item-chevron,
.educational-contents-page-panel .ticket-item-link:hover .ticket-item-chevron{
  color: #3b82f6;
}

.teacher-contents-page-panel .ticket-item-body,
.educational-contents-page-panel .ticket-item-body{
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.teacher-contents-page-panel .ticket-item-head-row strong,
.educational-contents-page-panel .ticket-item-head-row strong{
  font-size: 0.95rem;
  color: #1f2a3a;
  line-height: 1.4;
  min-width: 0;
}

.teacher-contents-page-panel .ticket-item-category,
.educational-contents-page-panel .ticket-item-category{
  margin: 0;
  font-size: 0.82rem;
  color: #6d7d92;
}

.teacher-contents-page-panel .ticket-item-date,
.educational-contents-page-panel .ticket-item-date{
  color: #8a9bb0;
  font-size: 0.75rem;
  white-space: nowrap;
}

.teacher-contents-page-panel .ticket-item-date i,
.educational-contents-page-panel .ticket-item-date i{
  margin-left: 3px;
}

.teacher-content-detail-page-panel .ticket-item-category,
.teacher-content-detail-page-panel .ticket-item-date {
  margin: 0;
  font-size: 0.82rem;
  color: #6d7d92;
}

.teacher-content-detail-page-panel .ticket-item-date {
  color: #8a9bb0;
  font-size: 0.75rem;
  white-space: nowrap;
}

.teacher-content-detail-page-panel .ticket-item-date i {
  margin-left: 3px;
}

.teacher-contents-page-panel .teacher-content-desc,
.educational-contents-page-panel .teacher-content-desc,
.teacher-content-detail-page-panel .teacher-content-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #5f7088;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.teacher-contents-page-panel .state-badge.teacher-content-pub-badge,
.educational-contents-page-panel .state-badge.teacher-content-pub-badge{
  background: #eef4ff;
  color: #1e4f91;
}

.teacher-content-detail-page-panel .teacher-content-preview-card {
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
  background: #fbfdff;
  display: grid;
  gap: 10px;
}

.educational-contents-page-panel .educational-content-video-card {
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  padding: 10px;
  margin-top: 8px;
  background: #fbfdff;
}

.educational-contents-page-panel .educational-content-item {
  gap: 10px;
}

.educational-contents-page-panel .educational-content-list-section {
  margin-top: 0;
}

.educational-contents-page-panel .educational-content-filter-box {
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  background: #fbfdff;
}

.educational-contents-page-panel .educational-content-filter-box h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2a3a;
}

.educational-contents-page-panel .educational-content-filter-box .filter-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: #6d7d92;
}

.educational-contents-page-panel .educational-content-filter-box .filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.educational-contents-page-panel .teacher-content-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d9e6f3;
  background: #000;
}

.educational-contents-page-panel .teacher-content-video-wrap iframe {
  border: 0;
}

.teacher-content-detail-page-panel .teacher-content-preview-card .teacher-content-desc {
  display: block;
  -webkit-line-clamp: unset;
}

.teacher-content-detail-page-panel .teacher-content-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d9e6f3;
  background: #000;
}

.teacher-content-detail-page-panel .teacher-content-video-wrap iframe {
  border: 0;
}

.teacher-content-detail-page-panel .class-exams-list-header .inline-form {
  margin: 0;
}

body > .modal.teacher-content-modal .modal-dialog {
  max-width: min(640px, calc(100vw - 24px));
}

body > .modal.ticket-create-modal .modal-dialog {
  max-width: min(560px, calc(100vw - 24px));
}

.role-list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e8eef5;
}

.role-list-pagination-meta {
  font-size: 0.82rem;
  color: #6d7d92;
  font-weight: 700;
}

.role-list-pagination-actions {
  display: flex;
  gap: 8px;
}

/* Manager report filters — aligned with filter-box-collapsible / field-grid */
.manager-report-page .filter-box-collapsible {
  margin-top: 0;
  margin-bottom: 14px;
}

.manager-report-page .manager-report-filter-fields {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .manager-report-page .manager-report-filter-fields {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

  .manager-report-page .manager-report-filter-fields--dates-only {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 520px;
  }
}

.manager-report-page .manager-report-filter-entity .form-select,
.manager-report-page .manager-report-filter-entity .form-control,
.manager-report-page .manager-report-jdate-wrap .form-control {
  min-height: 38px;
}

.manager-report-page .manager-report-jdate-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.manager-report-page .manager-report-jdate-wrap:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.22rem rgba(37, 140, 251, 0.18);
}

.manager-report-page .manager-report-jdate-wrap .form-control {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
}

.manager-report-page .manager-report-jdate-wrap .jdate-filter-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-inline-start: 1px solid #dee2e6;
  border-radius: 0;
  background: #f8fafc;
  color: #64748b;
  line-height: 1;
}

.manager-report-page .manager-report-jdate-wrap .jdate-filter-btn:hover {
  background: #eef4ff;
  color: #2563eb;
}

.manager-report-page .manager-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.manager-report-page .manager-report-chart-wrap {
  margin-top: 1rem;
  max-width: 100%;
}

.manager-report-page .table-total {
  background: #f8fafc;
}

.educational-content-display {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.content-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.82rem;
  border: 1px solid #dbeafe;
  transition: background 0.15s ease, color 0.15s ease;
}

.content-link-chip:hover {
  background: #dbeafe;
  color: #1e40af;
}

.content-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.content-image-gallery-item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  aspect-ratio: 4 / 3;
}

.content-image-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-files-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-file-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  text-decoration: none;
  font-size: 0.84rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.content-file-card:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.teacher-content-edit-gallery .teacher-content-keep-image {
  position: relative;
}

.teacher-content-keep-image span,
.teacher-content-keep-file span {
  display: block;
  font-size: 0.75rem;
  margin-top: 4px;
}

.teacher-content-keep-image input,
.teacher-content-keep-file input {
  margin-left: 6px;
}

/* School content: stories, banners, introduction */
.landscape-aspect {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f5f9;
}

.portrait-aspect {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f5f9;
}

.landscape-aspect img,
.portrait-aspect img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-story-strip {
  margin-bottom: 14px;
  padding: 8px 4px 4px;
}

.home-story-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.home-story-circle {
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
  cursor: pointer;
}

.home-story-ring {
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
}

.home-story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}

.home-story-label {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-story-viewer-content {
  background: #0f172a;
  border: 0;
  position: relative;
}

.home-story-viewer-body {
  max-width: 420px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.home-story-viewer-body img {
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  pointer-events: none;
}

.home-story-caption {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  color: #fff;
  background: rgba(15, 23, 42, 0.65);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  pointer-events: none;
}

.home-story-close {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1066;
  filter: invert(1);
  pointer-events: auto;
}

.home-banner-carousel {
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.home-banner-slide {
  display: block;
  width: 100%;
}

.home-banner-caption {
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.75));
  padding-bottom: 1rem;
}

.school-hub-page,
.school-intro-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.school-hub-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.school-hub-tabs::-webkit-scrollbar {
  display: none;
}

.school-hub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbeafe;
  color: #334155;
  font-size: 0.82rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.school-hub-tab i {
  color: #2563eb;
  font-size: 0.95rem;
}

.school-hub-tab.active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.school-hub-tab.active i {
  color: #fff;
}

.school-info-card {
  background: #fff;
  border-radius: 24px;
  padding: 18px 16px;
  border: 1px solid #e8f0f8;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.school-info-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.school-info-card-head i {
  color: #2563eb;
  font-size: 1.15rem;
}

.school-info-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.school-info-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.school-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e8f0f8;
}

.school-info-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.school-info-row-body span {
  display: block;
  font-size: 0.74rem;
  color: #64748b;
  margin-bottom: 3px;
}

.school-info-row-body strong {
  display: block;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.65;
  word-break: break-word;
}

.school-info-row-body strong a {
  color: #2563eb;
  text-decoration: none;
}

.school-info-row-body strong.is-empty {
  color: #94a3b8;
  font-weight: 500;
}

.school-highlight-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.school-highlight-card {
  border-radius: 18px;
  padding: 16px 10px;
  text-align: center;
  color: #fff;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.school-highlight-card span {
  font-size: 0.72rem;
  opacity: 0.92;
}

.school-highlight-card strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.school-highlight-card strong.is-empty {
  opacity: 0.75;
}

.school-highlight-card.tone-blue {
  background: linear-gradient(160deg, #38bdf8, #2563eb);
}

.school-highlight-card.tone-green {
  background: linear-gradient(160deg, #34d399, #059669);
}

.school-highlight-card.tone-purple {
  background: linear-gradient(160deg, #a78bfa, #db2777);
}

.school-info-about-text {
  margin: 0;
  line-height: 1.9;
  font-size: 0.9rem;
  color: #334155;
  white-space: pre-line;
}

.school-info-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.school-info-personnel-group + .school-info-personnel-group {
  margin-top: 14px;
}

.school-info-personnel-group h3 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #475569;
}

.school-info-personnel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.school-info-person {
  text-align: center;
  padding: 10px 6px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e8f0f8;
}

.school-info-person-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border-radius: 50%;
  overflow: hidden;
  background: #e2e8f0;
  display: grid;
  place-items: center;
}

.school-info-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-info-person strong {
  display: block;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #1e293b;
}

.school-intro-gallery-carousel {
  margin-top: 4px;
}

.school-intro-gallery-indicators {
  margin-bottom: 0;
}

.school-intro-gallery-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.55);
}

.school-intro-gallery-indicators .active {
  background-color: #fff;
}

.school-intro-edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.school-intro-manage-images {
  margin-top: 16px;
}

.school-intro-manage-image-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.school-intro-manage-image-row img {
  width: 80px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .school-highlight-cards {
    grid-template-columns: 1fr;
  }

  .school-highlight-card {
    min-height: 72px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 12px 16px;
  }
}

.school-banner-manage-list,
.school-story-manage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.school-banner-manage-item,
.school-story-manage-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.school-banner-thumb {
  width: 160px;
  flex-shrink: 0;
}

.school-story-thumb {
  width: 72px;
  flex-shrink: 0;
}

.item-card-thumb {
  margin-bottom: 8px;
}

.bulletin-detail-image {
  margin: 10px 0;
}

.event-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.event-gallery-item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* ── Person list (drivers, passengers, staff) ── */
.person-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person-list-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.person-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cu-border, #dbe7f3);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.person-list-link .person-list-item {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.person-list-link:hover .person-list-item,
.person-list-link:focus-visible .person-list-item {
  border-color: #b8d4f0;
  box-shadow: 0 4px 14px rgba(24, 43, 68, 0.08);
}

.person-list-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cu-primary) 0%, var(--cu-secondary) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.person-list-avatar .profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.person-list-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1f2a3a;
  line-height: 1.35;
}

.person-list-subtitle {
  font-size: 0.8rem;
  color: #6d7d92;
  line-height: 1.35;
}

.person-list-meta {
  font-size: 0.75rem;
  color: #7d8ea5;
  line-height: 1.35;
}

.person-list-chevron {
  color: #8fa3bc;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.person-list-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cu-border, #dbe7f3);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  margin: 0;
}

.person-list-check-item:has(input:checked) {
  border-color: #9ec5eb;
  background: #f5faff;
}

.person-list-check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--cu-primary, #0077b6);
}

.person-list-check-item .person-list-item {
  flex: 1;
  border: none;
  padding: 0;
  background: transparent;
  min-width: 0;
}

.person-list-scroll {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 8px;
  border: 1px solid #e0e9f3;
  border-radius: 12px;
  padding: 8px;
  background: #fbfdff;
}

.manager-service-page .classes-list,
.manager-service-page .class-students-section {
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  padding: 12px;
  background: #fbfdff;
}

.manager-service-page .classes-list-head h2,
.manager-service-page .class-students-section h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
  color: #1f2a3a;
}

.manager-service-driver-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e0e9f4;
  border-radius: 14px;
  background: #fbfdff;
}

.manager-service-driver-header .person-list-avatar {
  width: 52px;
  height: 52px;
  font-size: 1.05rem;
}

.manager-service-driver-header .person-list-name {
  font-size: 1rem;
}

.service-driver-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.service-driver-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.service-driver-item-row .person-list-item {
  flex: 1;
  min-width: 180px;
  border: none;
  padding: 0;
  background: transparent;
}

.service-driver-item-card {
  border: 1px solid #d9e6f3;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.driver-passenger-list {
  margin-top: 4px;
}

.driver-passenger-card {
  border: 1px solid var(--cu-border, #dbe7f3);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.driver-passenger-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}

.driver-passenger-card-head .person-list-item {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0;
  background: transparent;
}

.driver-passenger-status {
  flex-shrink: 0;
  margin-top: 4px;
}

.driver-parent-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contacts-label {
  color: #5f728a;
  font-size: 0.84rem;
  font-weight: 700;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf5fe;
  color: #1d4f91;
  text-decoration: none;
  font-size: 0.82rem;
}

.driver-passenger-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hw-attachment {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.hw-attachment-preview {
  width: 100%;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: #fff;
}

.hw-attachment-preview--image {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.hw-attachment-preview--frame {
  display: none;
  min-height: 70vh;
  border: none;
}

.hw-attachment--pdf .hw-attachment-preview--frame {
  display: block;
}


