/* ===== Theme tokens ===== */
:root,
html[data-theme='gradient'] {
  --teal: #00a3a3;
  --teal-bright: #00c8c8;
  --teal-deep: #007a7a;
  --gold: #ffd700;
  --gold-mid: #d4af37;
  --bg: #080d0e;
  --bg-lift: #0c1416;
  --text: #f7f4ec;
  --muted: rgba(247, 244, 236, 0.78);
  --text-accent: #ffd700;
  --border: rgba(0, 163, 163, 0.28);
  --font-body: 'Open Sans', Helvetica Neue, Arial, sans-serif;
  --font-head: 'Trebuchet MS', Lucida Grande, Arial, sans-serif;
  --aa-bg-glow-1: rgba(0, 163, 163, 0.12);
  --aa-bg-glow-2: rgba(255, 215, 0, 0.05);
  --aa-page-bg:
    radial-gradient(820px 420px at 8% -8%, rgba(0, 163, 163, 0.12), transparent 58%),
    radial-gradient(640px 360px at 100% 0%, rgba(255, 215, 0, 0.05), transparent 52%),
    linear-gradient(168deg, #080d0e 0%, #0b1315 48%, #0a1416 100%);
  --card-bg: linear-gradient(180deg, #0f1719 0%, #0c1416 100%);
  --surface: #0c1416;
  --glow-ring: rgba(0, 200, 200, 0.22);
  --glow-1: rgba(0, 163, 163, 0.22);
  --glow-2: rgba(0, 200, 200, 0.14);
  --glow-3: rgba(255, 215, 0, 0.1);
  --input-bg: rgba(0, 0, 0, 0.28);
  --zen-radius: 0.85rem;
  --zen-radius-sm: 0.55rem;
  --zen-space: 0.85rem;
  --zen-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  --zen-shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.18);
  color-scheme: dark;
}

/* Standard dark — gray-black (not pure black) */
html[data-theme='dark'] {
  --teal: #5eead4;
  --teal-bright: #99f6e4;
  --teal-deep: #14b8a6;
  --gold: #fbbf24;
  --gold-mid: #fcd34d;
  --bg: #1c1e22;
  --bg-lift: #2a2e34;
  --text: #f3f4f6;
  --muted: rgba(243, 244, 246, 0.78);
  --text-accent: #99f6e4;
  --border: rgba(156, 163, 175, 0.35);
  --aa-bg-glow-1: rgba(94, 234, 212, 0.1);
  --aa-bg-glow-2: rgba(251, 191, 36, 0.07);
  --aa-page-bg:
    radial-gradient(900px 500px at 12% -8%, rgba(94, 234, 212, 0.1), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(251, 191, 36, 0.07), transparent 52%),
    linear-gradient(165deg, #1c1e22 0%, #23262c 45%, #2a2e34 100%);
  --card-bg: linear-gradient(180deg, #2a2e34 0%, #23262c 55%, #1c1e22 100%);
  --surface: #2a2e34;
  --glow-ring: rgba(94, 234, 212, 0.4);
  --glow-1: rgba(94, 234, 212, 0.42);
  --glow-2: rgba(153, 246, 228, 0.28);
  --glow-3: rgba(251, 191, 36, 0.18);
  --input-bg: rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

/* Standard white — dark text on light surfaces */
html[data-theme='light'] {
  --teal: #0f766e;
  --teal-bright: #0d9488;
  --teal-deep: #115e59;
  --gold: #b45309;
  --gold-mid: #92400e;
  --bg: #eef1f4;
  --bg-lift: #ffffff;
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.68);
  --text-accent: #0f766e;
  --border: rgba(15, 23, 42, 0.16);
  --aa-bg-glow-1: rgba(15, 118, 110, 0.1);
  --aa-bg-glow-2: rgba(180, 83, 9, 0.06);
  --aa-page-bg:
    radial-gradient(900px 500px at 10% -10%, rgba(15, 118, 110, 0.1), transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(180, 83, 9, 0.06), transparent 50%),
    linear-gradient(180deg, #f7f9fb 0%, #eef1f4 55%, #e8ecf0 100%);
  --card-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --surface: #ffffff;
  --glow-ring: rgba(13, 148, 136, 0.45);
  --glow-1: rgba(13, 148, 136, 0.35);
  --glow-2: rgba(15, 118, 110, 0.22);
  --glow-3: rgba(180, 83, 9, 0.16);
  --input-bg: #f1f5f9;
  color-scheme: light;
}

/* Brand — JS fills dark logo gradient + glow */
html[data-theme='brand'] {
  --teal: var(--brand-primary-bright, #00c8c8);
  --teal-bright: var(--brand-primary-bright, #00c8c8);
  --teal-deep: var(--brand-primary-deep, #007a7a);
  /* Text/chrome accents stay light; raw logo colors only drive bg/glow via --brand-* */
  --gold: var(--brand-text-accent, #ffe08a);
  --gold-mid: var(--brand-accent-mid, #ffe08a);
  --bg: var(--brand-bg, #080d0e);
  --bg-lift: var(--brand-bg-lift, #0c1416);
  /* Always light text on dark brand backgrounds — never same-as-bg */
  --text: #f7f4ec;
  --muted: rgba(247, 244, 236, 0.8);
  --text-accent: var(--brand-text-accent, #ffe08a);
  --border: color-mix(in srgb, var(--teal) 38%, transparent);
  --aa-bg-glow-1: color-mix(in srgb, var(--brand-primary, #00a3a3) 24%, transparent);
  --aa-bg-glow-2: color-mix(in srgb, var(--brand-accent, #ffd700) 14%, transparent);
  --aa-page-bg: var(--brand-page-bg, linear-gradient(165deg, #080d0e 0%, #0c1416 50%, #062022 100%));
  --card-bg: var(--brand-card-bg, linear-gradient(180deg, #0e1818 0%, #0a1212 55%, #080d0e 100%));
  --surface: var(--brand-bg-lift, #0c1416);
  --glow-ring: color-mix(in srgb, var(--brand-primary, #00a3a3) 48%, transparent);
  --glow-1: color-mix(in srgb, var(--brand-primary, #00a3a3) 45%, transparent);
  --glow-2: color-mix(in srgb, var(--brand-primary-bright, #00c8c8) 30%, transparent);
  --glow-3: color-mix(in srgb, var(--brand-accent, #ffd700) 22%, transparent);
  --input-bg: rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}
html[data-theme='brand'] .aa-btn:not(.aa-btn-ghost) {
  background: linear-gradient(180deg, var(--brand-fill, var(--teal-bright)), var(--brand-fill-deep, var(--teal-deep)));
  color: var(--brand-on-fill, #fff);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
a { color: var(--teal-bright); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0 0 0.4rem; color: var(--text); }

.aa-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--aa-page-bg);
}

/* Light: readable dark text (override hardcoded whites) */
html[data-theme='light'] .aa-sidebar {
  background: linear-gradient(180deg, #ffffff, #f1f5f7);
  border-right-color: var(--border);
}
html[data-theme='light'] .aa-academy-bar {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7f8 100%);
}
html[data-theme='light'] .aa-panel,
html[data-theme='light'] .aa-modal,
html[data-theme='light'] .aa-period-filter,
html[data-theme='light'] .aa-period-filters,
html[data-theme='light'] .aa-sal-hist-filters {
  background: var(--surface);
  color: var(--text);
}
html[data-theme='light'] .aa-card--student,
html[data-theme='light'] .aa-card--profile {
  background: var(--card-bg) !important;
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text);
}
html[data-theme='light'] .aa-input,
html[data-theme='light'] .aa-select,
html[data-theme='light'] .aa-textarea {
  background: var(--input-bg);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.16);
}
html[data-theme='light'] .aa-nav a,
html[data-theme='light'] .aa-side-foot,
html[data-theme='light'] .aa-route-label,
html[data-theme='light'] .aa-stu-tree-label,
html[data-theme='light'] .aa-stu-tree-row,
html[data-theme='light'] .aa-stu-class strong,
html[data-theme='light'] .aa-stu-name,
html[data-theme='light'] .aa-brand strong,
html[data-theme='light'] .aa-theme-opt strong,
html[data-theme='light'] .aa-chip-btn,
html[data-theme='light'] .aa-period-mode,
html[data-theme='light'] .aa-stu-tree-row--status,
html[data-theme='light'] .aa-table td,
html[data-theme='light'] .aa-more-item,
html[data-theme='light'] .aa-more-btn {
  color: var(--text) !important;
}
html[data-theme='light'] .aa-stu-class em,
html[data-theme='light'] .aa-muted,
html[data-theme='light'] .aa-empty,
html[data-theme='light'] .aa-card-sub,
html[data-theme='light'] .aa-label,
html[data-theme='light'] .aa-table th,
html[data-theme='light'] .aa-theme-opt span,
html[data-theme='light'] .aa-period-label,
html[data-theme='light'] .aa-side-foot,
html[data-theme='light'] #pageSub {
  color: var(--muted) !important;
}
html[data-theme='light'] .aa-nav a.active {
  color: #0f172a !important;
  background: rgba(13, 148, 136, 0.14);
  border-color: rgba(13, 148, 136, 0.4);
}
html[data-theme='light'] .aa-stu-name,
html[data-theme='light'] .aa-class-pill {
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.45) !important;
  background: #fff !important;
}
html[data-theme='light'] .aa-stu-photo,
html[data-theme='light'] .aa-stu-photo-empty {
  background: #e2e8f0;
  color: var(--teal-deep);
}
html[data-theme='light'] .aa-stu-tree-caret::before {
  border-color: transparent transparent transparent rgba(15, 23, 42, 0.55);
}
html[data-theme='light'] .aa-chip-btn {
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.28);
}
html[data-theme='light'] .aa-chip-btn.is-on {
  background: rgba(13, 148, 136, 0.2);
  color: var(--teal-deep) !important;
}
html[data-theme='light'] .aa-btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.18);
}
html[data-theme='light'] .aa-more-menu {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme='light'] .aa-theme-opt {
  background: #fff;
}

/* Hard rule: dark themes → light text; light theme → dark text (never same-as-bg) */
html[data-theme='gradient'] body,
html[data-theme='dark'] body,
html[data-theme='brand'] body {
  color: #f7f4ec;
}
html[data-theme='gradient'] .aa-empty,
html[data-theme='dark'] .aa-empty,
html[data-theme='brand'] .aa-empty,
html[data-theme='gradient'] .aa-muted,
html[data-theme='dark'] .aa-muted,
html[data-theme='brand'] .aa-muted,
html[data-theme='gradient'] .aa-card-sub,
html[data-theme='dark'] .aa-card-sub,
html[data-theme='brand'] .aa-card-sub,
html[data-theme='gradient'] .aa-dash-heading,
html[data-theme='dark'] .aa-dash-heading,
html[data-theme='brand'] .aa-dash-heading,
html[data-theme='gradient'] .aa-nav a,
html[data-theme='dark'] .aa-nav a,
html[data-theme='brand'] .aa-nav a,
html[data-theme='gradient'] .aa-brand strong,
html[data-theme='dark'] .aa-brand strong,
html[data-theme='brand'] .aa-brand strong,
html[data-theme='gradient'] .aa-stu-tree-label,
html[data-theme='dark'] .aa-stu-tree-label,
html[data-theme='brand'] .aa-stu-tree-label,
html[data-theme='gradient'] .aa-stu-class strong,
html[data-theme='dark'] .aa-stu-class strong,
html[data-theme='brand'] .aa-stu-class strong,
html[data-theme='gradient'] .aa-route-label,
html[data-theme='dark'] .aa-route-label,
html[data-theme='brand'] .aa-route-label {
  color: rgba(247, 244, 236, 0.92) !important;
}
html[data-theme='gradient'] .aa-empty,
html[data-theme='dark'] .aa-empty,
html[data-theme='brand'] .aa-empty,
html[data-theme='gradient'] .aa-muted,
html[data-theme='dark'] .aa-muted,
html[data-theme='brand'] .aa-muted,
html[data-theme='gradient'] .aa-card-sub,
html[data-theme='dark'] .aa-card-sub,
html[data-theme='brand'] .aa-card-sub,
html[data-theme='gradient'] .aa-route-label,
html[data-theme='dark'] .aa-route-label,
html[data-theme='brand'] .aa-route-label,
html[data-theme='gradient'] .aa-stu-class em,
html[data-theme='dark'] .aa-stu-class em,
html[data-theme='brand'] .aa-stu-class em,
html[data-theme='gradient'] .aa-stat span,
html[data-theme='dark'] .aa-stat span,
html[data-theme='brand'] .aa-stat span {
  color: rgba(247, 244, 236, 0.78) !important;
}
html[data-theme='gradient'] .aa-stat strong,
html[data-theme='dark'] .aa-stat strong,
html[data-theme='brand'] .aa-stat strong {
  color: var(--text-accent) !important;
}
html[data-theme='gradient'] .aa-dash-heading,
html[data-theme='dark'] .aa-dash-heading,
html[data-theme='brand'] .aa-dash-heading {
  color: #f7f4ec !important;
}

html[data-theme='light'] body {
  color: #0f172a;
}
html[data-theme='light'] .aa-dash-heading,
html[data-theme='light'] .aa-brand strong,
html[data-theme='light'] .aa-nav a,
html[data-theme='light'] .aa-stat strong {
  color: #0f172a !important;
}
html[data-theme='light'] .aa-stat strong {
  color: var(--text-accent) !important;
}
html[data-theme='light'] .aa-empty,
html[data-theme='light'] .aa-muted,
html[data-theme='light'] .aa-card-sub,
html[data-theme='light'] .aa-route-label {
  color: rgba(15, 23, 42, 0.68) !important;
}

/* Brand/dark: never paint body copy with dark gold-mid / deep brand tones */
html[data-theme='brand'] .aa-live-status,
html[data-theme='dark'] .aa-live-status,
html[data-theme='gradient'] .aa-live-status,
html[data-theme='brand'] .aa-adm-info,
html[data-theme='dark'] .aa-adm-info,
html[data-theme='gradient'] .aa-adm-info,
html[data-theme='brand'] .aa-panel h3,
html[data-theme='dark'] .aa-panel h3,
html[data-theme='gradient'] .aa-panel h3,
html[data-theme='brand'] .aa-section-title,
html[data-theme='dark'] .aa-section-title,
html[data-theme='gradient'] .aa-section-title,
html[data-theme='brand'] label,
html[data-theme='dark'] label,
html[data-theme='gradient'] label,
html[data-theme='brand'] .aa-label,
html[data-theme='dark'] .aa-label,
html[data-theme='gradient'] .aa-label {
  color: rgba(247, 244, 236, 0.9) !important;
}

html[data-theme='dark'] .aa-sidebar,
html[data-theme='dark'] .aa-academy-bar {
  background: linear-gradient(180deg, #2a2e34, #1c1e22);
}
html[data-theme='dark'] .aa-panel,
html[data-theme='dark'] .aa-modal,
html[data-theme='dark'] .aa-period-filter,
html[data-theme='dark'] .aa-period-filters {
  background: var(--surface);
  color: var(--text);
}
html[data-theme='brand'] .aa-sidebar,
html[data-theme='brand'] .aa-academy-bar,
html[data-theme='gradient'] .aa-sidebar,
html[data-theme='gradient'] .aa-academy-bar {
  background: linear-gradient(180deg, var(--bg-lift), var(--bg));
}
html[data-theme='brand'] .aa-panel,
html[data-theme='brand'] .aa-modal,
html[data-theme='gradient'] .aa-panel,
html[data-theme='gradient'] .aa-modal {
  background: var(--surface);
  color: var(--text);
}

.aa-theme-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  margin: 0.35rem 0 0.25rem;
  overflow-x: auto;
}
.aa-theme-opt {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
  text-align: left;
  padding: 0.45rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.aa-theme-opt:hover {
  border-color: var(--teal-bright);
  transform: translateY(-1px);
}
.aa-theme-opt.is-on {
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 1px var(--glow-ring), 0 0 14px var(--glow-1);
}
.aa-theme-swatch {
  height: 2rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--swatch, var(--bg));
}
.aa-theme-opt strong {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: normal;
  overflow: visible;
  line-height: 1.25;
}
.aa-theme-opt span {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  line-height: 1.3;
}

.aa-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.aa-academy-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    'brand notify actions'
    'title notify actions';
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.12rem;
  width: 100%;
  flex-shrink: 0;
  padding: 0.55rem 1.15rem 0.6rem;
  background: linear-gradient(180deg, #0f1719 0%, #0c1416 100%);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}
.aa-academy-bar .aa-menu-btn {
  display: none;
  flex-shrink: 0;
  grid-area: menu;
}
.aa-academy-bar > .aa-route-label {
  grid-area: title;
}
.aa-academy-bar-main {
  grid-area: brand;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
}
.aa-academy-bar > .aa-notify-btn {
  grid-area: notify;
}
.aa-academy-bar > .aa-topbar-actions {
  grid-area: actions;
}
.aa-academy-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 1rem;
  align-items: start;
}
.aa-msg-panel h2 {
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
}
@media (max-width: 980px) {
  .aa-academy-sheet {
    grid-template-columns: 1fr;
  }
}
.aa-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.aa-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0c1416, #080d0e);
  border-right: 1px solid var(--border);
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.aa-brand {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  flex: 0 1 auto;
  max-width: 100%;
  width: fit-content;
  padding: 0.1rem 0.2rem;
  text-decoration: none;
  color: inherit;
  border-radius: 0.45rem;
  transition: background 0.15s ease;
}
.aa-brand:hover {
  background: rgba(0, 163, 163, 0.1);
}
.aa-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 0.4rem;
  background: #fff;
  padding: 1px;
  box-sizing: border-box;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}
.aa-brand strong {
  display: inline;
  font-family: var(--font-head);
  font-size: clamp(0.98rem, 1.55vw, 1.22rem);
  line-height: 1.2;
  font-weight: 800;
  color: #f7f4ec;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}
.aa-brand { position: relative; }
.aa-brand-pop {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  min-width: 10.5rem;
  max-width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 163, 163, 0.45);
  background: #0c1416;
}
.aa-brand-pop button {
  width: 100%;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: #f7f4ec;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  text-align: left;
}
.aa-brand-pop button:hover { background: rgba(0, 163, 163, 0.2); }
.aa-brand-pop #aaBrandSubscription { color: #00c8c8; }
.aa-brand-pop #aaBrandSubscription:hover { color: #ffd700; }
.aa-brand-user,
.aa-brand-role {
  margin: 0;
  padding: 0.35rem 0.6rem 0.1rem;
  color: #f7f4ec;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}
.aa-brand-user { font-weight: 700; }
.aa-brand-role {
  color: #d4af37;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding-bottom: 0.35rem;
}
.aa-brand-sub {
  margin: 0.15rem 0.35rem 0.4rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 163, 163, 0.28);
  background: rgba(0, 163, 163, 0.08);
}
.aa-brand-sub-title {
  margin: 0 0 0.35rem;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #00c8c8;
}
.aa-brand-sub-loading {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(247, 244, 236, 0.65);
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}
.aa-brand-sub-row {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.18rem 0;
  font-size: 0.78rem;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}
.aa-brand-sub-row span {
  color: rgba(247, 244, 236, 0.55);
  flex: 0 0 auto;
}
.aa-brand-sub-row strong {
  color: #f7f4ec;
  font-weight: 700;
  text-align: right;
}
.aa-brand-sub-status { color: #00c8c8 !important; }
.aa-brand-sub-hist { margin-top: 0.55rem !important; }
.aa-brand-sub-pays {
  max-height: 9.5rem;
  overflow: auto;
  margin-top: 0.15rem;
}
.aa-brand-sub-pay {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(247, 244, 236, 0.1);
  font-size: 0.74rem;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}
.aa-brand-sub-pay strong { color: #ffd700; }
.aa-brand-sub-pay span { color: rgba(247, 244, 236, 0.8); }
.aa-brand-sub-pay-due { color: rgba(247, 244, 236, 0.5) !important; }
.aa-sub-page {
  position: relative;
  z-index: 0;
  padding: 0.15rem 0 1.25rem;
  cursor: default;
}
.aa-sub-page-title {
  margin: 0 0 0.35rem;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 1.35rem;
  color: #007a7a;
}
.aa-sub-page-sub { margin: 0 0 0.75rem; }
.aa-sub-page-h3 {
  margin: 0 0 0.5rem;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 1.05rem;
  color: #007a7a;
}
.aa-sub-report-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  margin: 0.15rem 0 0.65rem;
  position: relative;
  z-index: 1;
}
.aa-sub-report-bar #aaSubShowing {
  margin: 0;
  flex: 1 1 auto;
  min-width: 10rem;
}
.aa-sub-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.aa-sub-report-actions .aa-btn {
  position: static;
  z-index: auto;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}
.aa-sub-pay-list,
.aa-sub-table {
  position: relative;
  z-index: 0;
  clear: both;
}
.aa-settings-camera-only .aa-academy-main > :not(#basicSettingsForm),
.aa-settings-camera-only #basicSettingsForm > :not(.aa-attcam-settings) {
  display: none !important;
}
.aa-row-limit { margin: 0; min-width: 6.2rem; }
.aa-row-limit .aa-select { min-width: 4.4rem; }
.aa-note-wa-list { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.aa-note-form .aa-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.aa-row-pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.aa-brand-arrow {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.28rem;
  border: 1px solid rgba(0, 163, 163, 0.45);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.aa-route-label {
  margin: 0;
  padding-left: calc(46px + 0.55rem + 0.2rem);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.aa-page-sub-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.aa-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; overflow: auto; }
.aa-nav-group { display: flex; flex-direction: column; gap: 0.15rem; }
.aa-nav-parent {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  cursor: pointer;
}
.aa-nav-parent .aa-nav-chev {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.7;
  transform: rotate(180deg);
  transition: transform 0.15s ease;
}
.aa-nav-group.is-open .aa-nav-parent .aa-nav-chev { transform: rotate(0deg); }
.aa-nav-group.is-active > .aa-nav-parent,
.aa-nav-group.is-open > .aa-nav-parent {
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  color: var(--gold);
}
.aa-nav-group.is-active > .aa-nav-parent .aa-nav-ico { color: var(--gold); }
.aa-nav-sub {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0 0.25rem 0.85rem;
}
.aa-nav-group.is-open .aa-nav-sub { display: flex; }
.aa-nav-sub a {
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 0.5rem;
}
.aa-settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}
.aa-settings-subnav a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
}
.aa-settings-subnav a.is-on {
  border-color: #00a3a3;
  box-shadow: 0 0 0 1px #00a3a3;
  color: #00a3a3;
}
.aa-nav a {  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.7rem; border-radius: 0.55rem;
  color: rgba(247,244,236,.82); font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent;
}
.aa-nav-ico {
  width: 1.05rem; height: 1.05rem; flex: 0 0 1.05rem;
  color: var(--teal-bright);
}
.aa-nav-ico,
.aa-nav-ico * {
  stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.aa-nav a.active .aa-nav-ico { color: var(--gold); }
.aa-nav a:hover { background: color-mix(in srgb, var(--teal) 12%, transparent); }
.aa-nav a.active {
  background: color-mix(in srgb, var(--teal) 22%, transparent);
  border-color: color-mix(in srgb, var(--teal-bright) 55%, transparent);
  color: #fff;
  box-shadow: 0 0 14px color-mix(in srgb, var(--teal) 25%, transparent);
}
html[data-theme='brand'] .aa-nav a.active .aa-nav-ico { color: var(--gold); }
html[data-theme='brand'] .aa-nav a:hover { background: color-mix(in srgb, var(--teal) 16%, transparent); }
html[data-theme='brand'] .aa-nav a.active {
  background: color-mix(in srgb, var(--teal) 22%, transparent);
  border-color: color-mix(in srgb, var(--teal) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--teal) 28%, transparent);
}
.aa-side-foot { padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--muted); }
.aa-address-block { grid-column: 1 / -1; }
.aa-address-block > .aa-form-grid { margin-top: 0.35rem; }
.aa-address-span { grid-column: 1 / -1; }
.aa-contact-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: flex-start;
  grid-column: 1 / -1;
}
.aa-contact-pair > .aa-muted { flex: 1 0 100%; }
.aa-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: max-content;
  max-width: 100%;
}
.aa-contact-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.aa-contact-row .aa-dial {
  width: 8.6rem;
  flex: 0 0 8.6rem;
  padding-right: 0.25rem;
}
.aa-contact-row .aa-input[data-contact='mobile'] {
  width: 9.5rem;
  flex: 0 0 9.5rem;
}
.aa-pass-field {
  position: relative;
  display: block;
}
.aa-pass-field .aa-input { padding-right: 2.4rem; }
.aa-pass-eye {
  position: absolute;
  right: 0.3rem;
  bottom: 0.32rem;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--teal-bright);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.aa-pass-eye svg { width: 1.05rem; height: 1.05rem; stroke: currentColor; fill: none; stroke-width: 1.8; }
.aa-contact-row .aa-input[data-contact='email'] {
  width: 18rem;
  flex: 0 0 18rem;
}
.aa-contact-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.aa-main { flex: 1; padding: 0.85rem 1.25rem 2rem; min-width: 0; }
.aa-notify-btn {
  position: relative;
  margin-left: auto;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 215, 0, 0.55);
  background: rgba(0, 163, 163, 0.18);
  color: #ffd700;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.aa-notify-btn[hidden] { display: none; }
.aa-notify-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aa-notify-count {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ffd700;
  color: #080d0e;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
}
.aa-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: 0.45rem;
}
.aa-notify-btn[hidden] + .aa-topbar-actions { margin-left: auto; }
.aa-topbar-actions:empty { display: none; }
.aa-topbar-actions .aa-btn {
  white-space: nowrap;
}
.aa-panel {
  background: rgba(12, 20, 22, 0.62);
  border: 1px solid var(--border);
  border-radius: var(--zen-radius, 0.85rem);
  padding: var(--zen-space, 1rem);
  box-shadow: var(--zen-shadow-soft, none);
}
.aa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.65rem; margin-bottom: 1rem; }
.aa-stat {
  padding: 0.8rem 0.85rem;
  border-radius: var(--zen-radius-sm, 0.55rem);
  border: 1px solid var(--border);
  background: rgba(0, 163, 163, 0.06);
}
.aa-stat span { display: block; font-size: 0.72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.aa-stat strong { font-size: 1.25rem; color: var(--text-accent); }
.aa-stat--gold { background: rgba(255, 215, 0, 0.14); border-color: rgba(184, 134, 11, 0.45); }
.aa-stat--gold strong { color: #b8860b; }
.aa-sub-pay-now {
  display: inline-flex;
  margin-top: 0.55rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: #00a3a3;
  color: #f7f4ec;
  border: 0;
  border-radius: 0.45rem;
  cursor: pointer;
}
.aa-sub-pay-now:hover { background: #00c8c8; color: #080d0e; }
.aa-sub-pay-now:disabled { opacity: 0.65; cursor: wait; }
.aa-sub-open-inv {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.08);
}
.aa-sub-open-inv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.aa-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.85rem; align-items: center; }
.aa-toolbar--students {
  gap: 0.55rem 0.65rem;
}
.aa-stu-search {
  max-width: 220px;
  flex: 1 1 160px;
  min-width: 140px;
  background: rgba(8, 13, 14, 0.92);
  border-color: rgba(0, 163, 163, 0.35);
}
.aa-stu-add { flex: 0 0 auto; white-space: nowrap; }
.aa-stu-icon-row .aa-stu-tile {
  width: 1.7rem;
  padding: 0;
}
.aa-stu-tile svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aa-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.aa-batch-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(0, 163, 163, 0.4);
  background: linear-gradient(180deg, #0e1818 0%, #0a1212 100%);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.aa-batch-card strong {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: #fff;
}
.aa-batch-card span {
  font-size: 0.78rem;
  color: var(--muted);
}
.aa-batch-card:hover {
  border-color: rgba(0, 200, 200, 0.7);
  background: rgba(0, 163, 163, 0.16);
}
.aa-batch-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.aa-batch-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.05rem;
}
.aa-stu-split {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  min-height: 60vh;
}
.aa-stu-split.is-cards-only {
  grid-template-columns: 1fr;
}
.aa-stu-tree-pane {
  position: sticky;
  top: 0.5rem;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
  padding: 0.15rem 0.1rem 0.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.aa-stu-cards-pane {
  min-width: 0;
  overflow: visible;
  padding: 2px 2px 6px;
}
/* Students split list: one card per row, still fixed height + square photo */
.aa-stu-split .aa-card-grid--students {
  grid-template-columns: 1fr;
  gap: 0.9rem;
  padding: 4px;
}
.aa-stu-tree {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-width: none;
  padding: 0;
}
.aa-stu-tree-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 0.35rem;
}
.aa-stu-tree-row:hover {
  background: rgba(0, 163, 163, 0.14);
  box-shadow:
    0 0 10px rgba(0, 163, 163, 0.35),
    0 0 18px rgba(255, 215, 0, 0.12);
}
.aa-stu-tree-row.is-on {
  background: rgba(0, 163, 163, 0.18);
  box-shadow:
    0 0 12px rgba(0, 163, 163, 0.4),
    0 0 22px rgba(0, 200, 200, 0.18);
}
.aa-stu-tree-row--status {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f7f4ec;
  font-size: 0.92rem;
}
.aa-stu-tree-row--batch .aa-stu-tree-label {
  color: rgba(247, 244, 236, 0.9);
  font-size: 0.84rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  line-height: 1.25;
}
.aa-stu-tree-row--student .aa-stu-tree-label {
  color: rgba(247, 244, 236, 0.78);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}
.aa-stu-tree-label {
  flex: 1;
  min-width: 0;
}
.aa-stu-tree-row--batch,
.aa-stu-tree-row--student {
  align-items: flex-start;
}
.aa-stu-tree-row--batch .aa-stu-tree-caret {
  margin-top: 0.12rem;
}
.aa-stu-tree-caret {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.aa-stu-tree-caret::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4.5px 0 4.5px 6.5px;
  border-color: transparent transparent transparent rgba(247, 244, 236, 0.85);
  transition: transform 0.15s ease;
}
.aa-stu-tree-caret.is-open::before {
  transform: rotate(90deg);
}
.aa-stu-tree-badge {
  display: none;
}
.aa-stu-tree-kids {
  padding-left: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
}
.aa-stu-tree-kids--stu {
  padding-left: 1rem;
}
.aa-stu-tree-empty {
  margin: 0.25rem 0 0.5rem 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.aa-card--student.is-selected {
  border-color: rgba(0, 200, 200, 0.75);
  box-shadow:
    0 0 0 1px rgba(0, 200, 200, 0.32),
    0 0 10px rgba(0, 163, 163, 0.4),
    0 0 20px rgba(0, 200, 200, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.32);
}
@media (max-width: 900px) {
  .aa-stu-split {
    grid-template-columns: 1fr;
  }
  .aa-stu-tree-pane {
    position: relative;
    top: 0;
    max-height: 38vh;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(0, 163, 163, 0.22);
  }
}
.aa-period-filter,
.aa-period-filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(0, 163, 163, 0.28);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.18);
}
.aa-period-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.55rem 0.75rem;
  width: 100%;
  overflow-x: auto;
}
.aa-period-filter .aa-period-modes,
.aa-period-filters .aa-period-modes {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  align-self: flex-end;
  flex: 0 0 auto;
}
.aa-period-fieldline {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
  flex: 0 0 auto;
}
.aa-period-filter .aa-period-inputs,
.aa-period-filters .aa-period-panels,
.aa-period-filters .aa-period-panel {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: flex-end;
  min-width: 0;
  flex: 0 0 auto;
}
.aa-period-filter .aa-period-inputs .aa-label,
.aa-period-filters .aa-period-panel .aa-label {
  min-width: 8.5rem;
  width: 8.5rem;
  flex: 0 0 8.5rem;
  margin: 0;
  gap: 0.22rem;
}
.aa-period-actions-inline,
.aa-period-filters .aa-period-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: center;
  align-self: flex-end;
  flex: 0 0 auto;
}
.aa-period-actions-inline .aa-btn,
.aa-period-filters .aa-period-actions .aa-btn {
  height: 2.35rem;
  padding: 0 0.85rem;
  white-space: nowrap;
}
.aa-period-filter .aa-period-label,
.aa-period-filter > #aaPeriodLabel {
  flex: 1 0 100%;
  margin: 0.1rem 0 0 !important;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}
.aa-profile-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.aa-profile-save .aa-status {
  margin: 0;
  flex: 1 1 12rem;
}
.aa-profile-save--footer {
  border-top: 0;
  padding-top: 0.35rem;
  margin-top: 0.95rem;
}
.aa-btn {
  border: 0; border-radius: 0.55rem; padding: 0.55rem 0.9rem; cursor: pointer;
  background: linear-gradient(180deg, var(--teal-bright), var(--teal-deep));
  color: #fff; font-weight: 700; font-family: inherit;
  transition: box-shadow 0.22s ease, transform 0.18s ease, filter 0.22s ease;
}
.aa-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(0, 122, 122, 0.35);
}
.aa-btn-ghost {
  background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.14); color: var(--text);
}
.aa-btn-ghost:hover {
  border-color: rgba(0, 200, 200, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}
.aa-pay-mode {
  display: inline-block;
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #080d0e;
  background: #ffd700;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.aa-pay-mode.is-live {
  background: #00a3a3;
  color: #f7f4ec;
}
.aa-webhook-line {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.aa-webhook-line .aa-input { flex: 1; }
.aa-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.aa-fee-collect { margin-top: 1rem; }
.aa-fee-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.aa-fee-opts--sub { margin-top: 0.85rem; }
.aa-fee-opt {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--input-bg, rgba(0, 0, 0, 0.25));
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.85rem 0.9rem;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  cursor: pointer;
}
.aa-fee-opt.is-on {
  border-color: #00a3a3;
  box-shadow: 0 0 0 1px #00a3a3;
}
.aa-fee-opt strong { display: block; font-size: 1rem; color: var(--text); }
.aa-fee-opt span {
  display: block;
  margin-top: 0.25rem;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.aa-fee-steps {
  margin: 0.85rem 0 0.75rem;
  padding-left: 1.2rem;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
}
.aa-fee-steps li { margin: 0.28rem 0; }
.aa-upi-qr-wrap { margin-top: 0.9rem; }
.aa-upi-qr {
  display: block;
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 0.5rem;
  padding: 8px;
}
.aa-fee-collect .aa-btn,
.aa-fee-collect a.aa-btn { text-decoration: none; }
.aa-multi-gw {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.aa-multi-gw-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  color: #00a3a3;
}
.aa-multi-gw-hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}
.aa-pg-accounts { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.65rem; }
.aa-pg-account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--input-bg, rgba(0, 0, 0, 0.2));
}
.aa-pg-account-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.5rem; min-width: 0; }
.aa-pg-account-name { font-size: 0.95rem; }
.aa-pg-account-key {
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}
.aa-pg-account-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.aa-pg-add-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.4fr auto;
  gap: 0.55rem;
  align-items: end;
}
.aa-pg-add-grid--4 {
  grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr auto;
}
.aa-pg-add-actions { padding-bottom: 0.05rem; }
@media (max-width: 1100px) {
  .aa-pg-add-grid,
  .aa-pg-add-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .aa-pg-add-grid,
  .aa-pg-add-grid--4 { grid-template-columns: 1fr; }
}
.aa-chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(0, 163, 163, 0.18);
  color: #00a3a3;
  vertical-align: middle;
}
.aa-chip--live {
  background: rgba(255, 215, 0, 0.2);
  color: #b8860b;
}
.aa-qp-hits {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
  max-height: 10rem;
  overflow: auto;
}
.aa-qp-hit {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--input-bg, rgba(0, 0, 0, 0.25));
  color: var(--text);
  border-radius: 0.55rem;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font: inherit;
}
.aa-qp-hit strong { display: block; }
.aa-qp-hit span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.aa-modal--quickpay {
  max-width: 42rem;
  width: calc(100vw - 2rem);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
}
.aa-qp-pick-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.45rem 0;
}
.aa-qp-pick-toolbar .aa-input { flex: 1 1 12rem; min-width: 8rem; }
.aa-qp-pick-list {
  max-height: 11rem;
  overflow: auto;
  border: 1px solid rgba(0, 163, 163, 0.28);
  border-radius: 0.45rem;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.35rem;
  background: rgba(0, 0, 0, 0.18);
}
.aa-qp-editor { min-height: 7.5rem; }
.aa-modal--quickpay .aa-editor-bar select {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  border-radius: 0.35rem;
  padding: 0.28rem 0.4rem;
  font: inherit;
}
.aa-stat--btn {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.aa-stat--btn.is-on {
  border-color: #00a3a3;
  box-shadow: 0 0 0 1px #00a3a3;
}
.aa-stat--btn.is-on strong { color: #00a3a3; }
@media (max-width: 720px) {
  .aa-fee-opts { grid-template-columns: 1fr; }
}
.aa-input.aa-pay-need {
  border-color: #ffd700;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.55);
}
.aa-input, .aa-select, .aa-textarea {
  width: 100%; padding: 0.55rem 0.7rem; border-radius: 0.5rem;
  border: 1px solid var(--border); background: var(--input-bg, rgba(0,0,0,.35)); color: var(--text);
  font: inherit;
}
/* Hide number up/down spinner arrows everywhere */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.aa-label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.aa-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
body.aa-no-delete [data-del],
body.aa-no-delete [data-more='remove'] { display: none !important; }
body.aa-no-edit [data-edit],
body.aa-no-edit [data-more='edit'] { display: none !important; }
body.aa-student .aa-sidebar { display: none; }
body.aa-student .aa-menu-btn { display: none !important; }
body.aa-student #studentLogoutBtn { margin-left: auto; flex-shrink: 0; }
.aa-stu-home { display: flex; flex-direction: column; gap: 0.85rem; max-width: 920px; }
.aa-stu-home-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(0, 163, 163, 0.08), rgba(8, 13, 14, 0.72));
  padding: 1rem 1.05rem 0.9rem;
}
.aa-stu-home-card h3,
.aa-stu-home-card h4 {
  margin: 0.85rem 0 0.45rem;
  font-family: var(--font-head);
  color: var(--gold);
  font-size: 1rem;
}
.aa-stu-home-card > h3:first-child { margin-top: 0; }
.aa-stu-home-hero { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.85rem; }
.aa-stu-home-photo {
  position: relative;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: #0a1414;
}
.aa-stu-home-photo img,
.aa-stu-home-photo span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--gold);
}
.aa-stu-home-id h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--text);
  text-transform: uppercase;
}
.aa-stu-home-id p { margin: 0.25rem 0 0; color: var(--gold); font-size: 0.92rem; }
.aa-stu-home-facts .aa-card-row { font-size: 0.92rem; padding: 0.38rem 0; }
.aa-stu-home-head,
.aa-stu-home-row {
  display: grid;
  grid-template-columns: 8.2rem minmax(0, 1.5fr) 6.2rem minmax(5.5rem, 0.7fr) auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
}
.aa-attcam-creds {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  max-width: 38rem;
}
.aa-pw-line { display: flex; gap: 0.35rem; align-items: center; }
.aa-pw-line .aa-input { flex: 1; min-width: 0; }
.aa-pw-mini {
  height: 2.15rem;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.aa-stu-change-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.35rem 0 0.75rem; }
.aa-stu-home-actions { display: flex; gap: 0.35rem; justify-content: flex-end; flex-wrap: wrap; }
.aa-stu-home-actions .aa-btn { padding: 0.28rem 0.55rem; font-size: 0.75rem; }
.aa-brand-arrow[data-login-edit] { cursor: pointer; }
body.aa-student .aa-brand-arrow[data-login-edit]:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.aa-stu-home-head {
  padding: 0.2rem 0 0.45rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.28);
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.aa-stu-home-row {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.9rem;
}
.aa-stu-home-row .aa-rc-amt { font-family: var(--font-head); font-weight: 700; color: var(--gold); }
.aa-stu-home-row .aa-rc-inv { color: var(--muted); }
@media (max-width: 720px) {
  .aa-stu-home-hero { align-items: flex-start; }
  .aa-stu-home-head { display: none; }
  .aa-stu-home-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "date amt" "class class" "inv actions";
  }
  .aa-stu-home-row .aa-rc-date { grid-area: date; }
  .aa-stu-home-row .aa-rc-class { grid-area: class; font-weight: 600; }
  .aa-stu-home-row .aa-rc-amt { grid-area: amt; text-align: right; }
  .aa-stu-home-row .aa-rc-inv { grid-area: inv; }
  .aa-stu-home-row .aa-stu-home-actions { grid-area: actions; }
}
#staffLoginBox:not([hidden]) { display: contents; }
.aa-class-day-slot {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(12rem, 1.15fr) minmax(12rem, 1.15fr);
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0,163,163,.25);
  border-radius: 0.55rem;
  background: rgba(0,163,163,.05);
}
.aa-class-day-slot[hidden] { display: none !important; }
@media (max-width: 720px) {
  .aa-class-day-slot {
    grid-template-columns: 1fr;
  }
}
.aa-table-wrap { overflow: auto; }
.aa-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.aa-table th, .aa-table td { padding: 0.55rem 0.45rem; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.aa-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; }
.aa-due-class-status { display: inline-block; max-width: 16rem; line-height: 1.35; font-size: 0.78rem; white-space: normal; }
.aa-due-class-status strong { color: #ffd700; font-weight: 700; }
html[data-theme='light'] .aa-due-class-status strong { color: #b8860b; }
.aa-stu-class .aa-due-class-status { display: block; max-width: none; margin-top: 0.15rem; font-size: 0.68rem; white-space: normal; }
.aa-stu-per-class { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.35rem; }
.aa-stu-per-class .aa-due-class-status { display: block; max-width: 11rem; font-size: 0.68rem; }
.aa-sal-hist-filters {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(0, 163, 163, 0.28);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.18);
}
.aa-period-filters .aa-period-modes {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  align-self: flex-end;
}
.aa-period-mode {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.7rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.aa-period-mode.is-on {
  color: var(--text);
  border-color: var(--teal);
  background: rgba(0, 163, 163, 0.18);
  color: #7ff0f0;
}
.aa-profile-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.aa-bell {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 163, 163, 0.45);
  background: rgba(0, 0, 0, 0.25);
  color: #ffd700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aa-bell svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.aa-bell-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ee4142;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1rem;
}
.aa-note-history, .aa-pick-list { display: flex; flex-direction: column; gap: 0.45rem; }
.aa-note-card, .aa-note-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(0, 163, 163, 0.28);
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  border-radius: 0.55rem;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.aa-note-item.is-unread strong { color: #7ff0f0; }
.aa-note-body { line-height: 1.5; margin: 0.75rem 0 1rem; }
.aa-note-facts th { width: 9rem; text-transform: none; letter-spacing: 0; font-size: 0.82rem; }
.aa-note-body a { color: #00c8c8; }
.aa-editor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.aa-editor-bar button, .aa-editor-bar label {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  border-radius: 0.35rem;
  padding: 0.28rem 0.45rem;
  font-family: inherit;
  cursor: pointer;
}
.aa-editor {
  min-height: 9rem;
  border: 1px solid rgba(0, 163, 163, 0.35);
  border-radius: 0.45rem;
  padding: 0.7rem 0.8rem;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 0.75rem;
}
.aa-pick-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.aa-period-panels {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.aa-period-panel {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.aa-period-panel[hidden] { display: none !important; }
.aa-period-panel .aa-label {
  min-width: 8rem;
  flex: 1;
}
.aa-period-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.aa-sal-hist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}
.aa-sal-hist-row .aa-label {
  min-width: 8rem;
  flex: 1;
}
.aa-td-actions .aa-more {
  position: relative;
  top: auto;
  right: auto;
  display: inline-block;
}
.aa-toolbar .aa-sal-person-pick {
  width: auto;
  min-width: 14rem;
  margin: 0;
  flex: 0 0 14rem;
}
.aa-modal .aa-sal-person-pick {
  margin: 0 0 0.75rem;
  max-width: 22rem;
}
.aa-empty { padding: 1.5rem; text-align: center; color: var(--muted); }
.aa-exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.aa-exp-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 163, 163, 0.35);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition:
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    transform 0.22s ease,
    filter 0.22s ease;
}
.aa-exp-card:hover {
  z-index: 2;
  border-color: var(--teal-bright);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--glow-ring),
    0 0 11px var(--glow-1),
    0 0 24px var(--glow-2),
    0 0 36px var(--glow-3),
    0 12px 28px rgba(0, 0, 0, 0.42);
  filter: saturate(1.05);
}
.aa-exp-card.is-default {
  border-color: #ffd700;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}
.aa-exp-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
}
.aa-exp-badge {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.aa-exp-due { color: #ffd700; font-weight: 700; }
.aa-exp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 0.85rem;
}
.aa-exp-kinds { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.aa-exp-account-name { font-family: var(--font-head); font-size: 1.05rem; }
html[data-theme='light'] .aa-exp-card { background: #fff; }
.aa-spin {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: conic-gradient(from 90deg, rgba(0, 163, 163, 0.15), #00a3a3 55%, #ffd700);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  animation: aa-spin 0.7s linear infinite;
}
.aa-busy {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.25rem;
  margin: 0;
  background: rgba(8, 13, 14, 0.62);
  color: #f7f4ec;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: wait;
  pointer-events: auto;
}
.aa-busy-label { letter-spacing: 0.01em; }
.aa-status.aa-status--busy {
  display: flex;
  align-items: center;
}
.aa-status.aa-status--busy .aa-busy {
  color: #f7f4ec;
}
.aa-stu-photo.is-uploading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.35rem;
  height: 1.35rem;
  margin: -0.67rem 0 0 -0.67rem;
  border-radius: 50%;
  z-index: 3;
  background: conic-gradient(from 90deg, rgba(0, 163, 163, 0.15), #00a3a3 55%, #ffd700);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: aa-spin 0.7s linear infinite;
}
@keyframes aa-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .aa-spin,
  .aa-stu-photo.is-uploading::after { animation-duration: 1.6s; }
}
.aa-modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow: auto;
}
.aa-modal-bg--center,
.aa-modal-bg--confirm {
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.aa-modal-bg ~ .aa-modal-bg { z-index: 60; background: rgba(0,0,0,.65); }
.aa-modal-bg--confirm { z-index: 80; background: rgba(0, 0, 0, 0.72); }
.aa-modal {
  width: min(720px, 100%); background: #0c1416; border: 1px solid var(--border);
  border-radius: 0.9rem; padding: 1rem 1.1rem 1.2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.aa-modal--confirm {
  width: min(480px, 100%);
  text-align: left;
  border-color: rgba(0, 163, 163, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 200, 200, 0.2),
    0 0 28px rgba(0, 163, 163, 0.28),
    0 24px 56px rgba(0, 0, 0, 0.55);
}
.aa-confirm-msg {
  margin: 0.35rem 0 0;
  color: var(--text, #0f172a);
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-line;
  font-variant-numeric: tabular-nums;
}
html[data-theme='light'] .aa-modal--confirm,
html[data-theme='light'] .aa-modal--confirm h2,
html[data-theme='light'] .aa-modal--confirm .aa-confirm-msg {
  color: #0f172a;
}
html[data-theme='dark'] .aa-modal--confirm,
html[data-theme='dark'] .aa-modal--confirm h2,
html[data-theme='dark'] .aa-modal--confirm .aa-confirm-msg,
html[data-theme='brand'] .aa-modal--confirm,
html[data-theme='brand'] .aa-modal--confirm h2,
html[data-theme='brand'] .aa-modal--confirm .aa-confirm-msg,
html[data-theme='gradient'] .aa-modal--confirm,
html[data-theme='gradient'] .aa-modal--confirm h2,
html[data-theme='gradient'] .aa-modal--confirm .aa-confirm-msg {
  color: #f7f4ec;
}
.aa-modal--admission { width: min(1080px, 100%); }
.aa-modal--invoice {
  width: min(820px, 100%);
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.aa-inv-sheet {
  background: var(--panel, #0c1416);
  color: var(--text, #f7f4ec);
  border: 1px solid rgba(0, 163, 163, 0.35);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  font-family: var(--font-body);
}
.aa-inv-topbar {
  height: 10px;
  background: linear-gradient(90deg, #080d0e 0%, #007a7a 45%, #00a3a3 100%);
}
.aa-inv-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.1rem;
  border-bottom: 1px solid rgba(0, 163, 163, 0.35);
  background: linear-gradient(135deg, rgba(0, 163, 163, 0.12), transparent 50%);
}
.aa-inv-brand h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.65rem;
  color: var(--text, #f7f4ec);
  line-height: 1.15;
}
.aa-inv-brand p {
  margin: 0.3rem 0 0;
  color: var(--muted, #9aa4a1);
  font-size: 0.82rem;
}
.aa-inv-badge-wrap { text-align: right; }
.aa-inv-badge {
  display: inline-block;
  background: #00a3a3;
  color: #080d0e;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
}
.aa-inv-no {
  margin-top: 0.55rem;
  color: var(--gold, #ffd700);
  font-weight: 700;
  font-size: 0.92rem;
}
.aa-inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 1rem 1.5rem 0.35rem;
}
.aa-inv-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #00a3a3;
  border-radius: 6px;
  padding: 0.85rem 1rem;
}
.aa-inv-card h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-head);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #ffd700);
}
.aa-inv-card strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text, #f7f4ec);
  margin-bottom: 0.25rem;
}
.aa-inv-card span {
  display: block;
  color: var(--muted, #9aa4a1);
  font-size: 0.84rem;
  line-height: 1.4;
}
.aa-inv-card .aa-label {
  margin-top: 0.45rem;
  color: var(--muted, #9aa4a1);
}
.aa-inv-card .aa-input {
  background: #0a1214;
  color: var(--text, #f7f4ec);
  border-color: rgba(0, 163, 163, 0.35);
}
.aa-inv-body { padding: 0.75rem 1.5rem 0.35rem; }
.aa-inv-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
}
.aa-inv-items thead th {
  background: rgba(0, 163, 163, 0.18);
  color: var(--gold, #ffd700);
  text-align: left;
  padding: 0.65rem 0.8rem;
  font-family: var(--font-head);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0, 163, 163, 0.35);
}
.aa-inv-items thead th:last-child { text-align: right; }
.aa-inv-items td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text, #f7f4ec);
  vertical-align: middle;
}
.aa-inv-items tr.zebra td { background: rgba(255, 255, 255, 0.02); }
.aa-inv-meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted, #9aa4a1);
  font-size: 0.78rem;
}
.aa-inv-amt {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  width: 8.5rem;
}
.aa-inv-amt-inp {
  width: 7.25rem;
  max-width: 100%;
  text-align: right;
  background: #0a1214 !important;
  color: var(--teal-bright, #00c8c8) !important;
  border-color: rgba(0, 163, 163, 0.45) !important;
  font-weight: 700;
}
.aa-inv-totals {
  margin: 1rem 0 0 auto;
  width: min(100%, 260px);
  border: 1px solid rgba(0, 163, 163, 0.35);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.aa-inv-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted, #9aa4a1);
}
.aa-inv-totals > div:last-child { border-bottom: 0; }
.aa-inv-totals strong { color: var(--gold, #ffd700); }
.aa-inv-grand {
  background: rgba(0, 163, 163, 0.16) !important;
  color: var(--text, #f7f4ec) !important;
  font-family: var(--font-head);
  font-weight: 800;
}
.aa-inv-grand strong { color: var(--teal-bright, #00c8c8) !important; }
.aa-inv-note {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  background: rgba(0, 163, 163, 0.08);
  border: 1px dashed rgba(0, 163, 163, 0.4);
  border-radius: 6px;
  color: var(--muted, #9aa4a1);
  font-size: 0.82rem;
}
.aa-inv-note strong { color: var(--teal-bright, #00c8c8); }
.aa-inv-actions {
  padding: 0.85rem 1.5rem 1.25rem;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.aa-modal--invoice .aa-status {
  margin: 0 1.5rem;
}
@media (max-width: 700px) {
  .aa-inv-head,
  .aa-inv-parties { grid-template-columns: 1fr; }
  .aa-inv-badge-wrap { text-align: left; }
}
.aa-modal h2 { margin-bottom: 0.85rem; }
.aa-modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.aa-adm-photo {
  display: flex; gap: 0.85rem; align-items: center; margin-bottom: 0.85rem; flex-wrap: wrap;
}
.aa-adm-due-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0.35rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(0, 163, 163, 0.35);
  border-radius: 0.55rem;
  background: rgba(0, 163, 163, 0.06);
}
.aa-adm-due-settings-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 12rem;
  flex: 1 1 12rem;
}
.aa-adm-due-settings-head strong {
  font-family: var(--font-head, 'Trebuchet MS', sans-serif);
  font-size: 0.95rem;
  color: var(--text, #f7f4ec);
}
.aa-adm-due-settings .aa-due-mode-toggle {
  flex: 0 0 auto;
}
.aa-adm-due-settings .aa-due-mode-toggle-label {
  display: none;
}
.aa-adm-due-settings .aa-due-mode-chip {
  padding: 0.42rem 0.75rem;
  font-size: 0.8rem;
}
html[data-theme='light'] .aa-adm-due-settings {
  background: rgba(0, 163, 163, 0.08);
  border-color: rgba(0, 122, 122, 0.28);
}
html[data-theme='light'] .aa-adm-due-settings-head strong {
  color: #0c1416;
}
.aa-due-mode-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 7.5rem;
}
.aa-due-mode-toggle--compact .aa-due-mode-toggle-label {
  font-family: var(--font-head, 'Trebuchet MS', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #9aa4a8);
}
.aa-due-mode-toggle-opts {
  display: inline-flex;
  border: 1px solid rgba(0, 163, 163, 0.45);
  border-radius: 0.45rem;
  overflow: hidden;
  background: rgba(8, 13, 14, 0.55);
}
.aa-due-mode-chip {
  border: 0;
  margin: 0;
  padding: 0.35rem 0.65rem;
  background: transparent;
  color: var(--muted, #c5cdc8);
  font-family: var(--font-body, 'Open Sans', sans-serif);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.1;
}
.aa-due-mode-chip.is-on {
  background: #00a3a3;
  color: #080d0e;
}
.aa-due-mode-chip:hover:not(.is-on) {
  color: var(--text, #f7f4ec);
  background: rgba(0, 163, 163, 0.18);
}
.aa-profile-due-toggle {
  margin-top: 0.55rem;
  width: 100%;
  align-items: stretch;
}
.aa-due-mode-help {
  margin: 0.2rem 0 0;
  font-family: var(--font-body, 'Open Sans', Helvetica Neue, Arial, sans-serif);
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted, #a8b0b2);
  max-width: 14rem;
}
html[data-theme='light'] .aa-due-mode-toggle-opts {
  background: #fff;
  border-color: rgba(0, 122, 122, 0.35);
}
html[data-theme='light'] .aa-due-mode-chip {
  color: rgba(15, 23, 42, 0.72);
}
html[data-theme='light'] .aa-due-mode-chip.is-on {
  background: #00a3a3;
  color: #fff;
}
html[data-theme='light'] .aa-due-mode-help {
  color: rgba(15, 23, 42, 0.68);
}
.aa-adm-photo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.aa-adm-photo-preview {
  width: 100%; height: 100%; border-radius: 0.65rem;
  border: 1px dashed var(--border); background: rgba(0,0,0,.35) center/cover no-repeat;
  display: grid; place-items: center; color: var(--muted); font-size: 0.78rem;
  overflow: hidden;
}
.aa-adm-face-photos { margin: 0 0 0.85rem; }
.aa-adm-face-photo-list { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.aa-adm-face-photo { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 76px; }
.aa-adm-face-photo-thumb,
.aa-adm-face-photo-add {
  width: 76px; height: 76px; border-radius: 0.55rem; border: 1px dashed var(--border);
  background: rgba(0,0,0,.35) center/cover no-repeat;
}
.aa-adm-face-photo-add { cursor: pointer; font-size: 1.4rem; color: var(--muted); }
.aa-adm-face-photo-label { font-size: 0.72rem; text-align: center; }
.aa-adm-photo-edit {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  z-index: 2;
  border: 1px solid rgba(255, 215, 0, 0.65);
  border-radius: 0.35rem;
  padding: 0.22rem 0.45rem;
  background: rgba(8, 13, 14, 0.88);
  color: var(--gold, #ffd700);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1.1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.aa-adm-photo-edit:hover {
  background: #00a3a3;
  color: #080d0e;
  border-color: #00c8c8;
}
.aa-adm-photo-menu {
  position: absolute;
  left: calc(100% + 0.4rem);
  bottom: 0;
  z-index: 20;
  min-width: 9.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.3rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 200, 200, 0.45);
  background: #0f1719;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
.aa-adm-photo-menu--float {
  position: fixed !important;
  left: 0;
  top: 0;
  bottom: auto;
  z-index: 7500 !important;
  min-width: 13rem;
  box-shadow:
    0 0 0 1px rgba(0, 200, 200, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.65);
}
.aa-modal-bg--camera {
  z-index: 7600 !important;
  background: rgba(0, 0, 0, 0.78) !important;
}
.aa-adm-photo-menu-item {
  border: 0;
  background: transparent;
  color: #f7f4ec;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 0.3rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.aa-adm-photo-menu-item:hover {
  background: rgba(0, 163, 163, 0.22);
  color: #ffd700;
}
.aa-adm-photo-menu-item.is-danger { color: #ffb4a2; }
.aa-adm-photo-menu-item.is-danger:hover {
  background: rgba(255, 180, 162, 0.16);
  color: #ffb4a2;
}
/* Menu plate is always dark; light theme must not paint navy text on it. */
html[data-theme='light'] .aa-adm-photo-menu-item {
  color: #f7f4ec !important;
}
html[data-theme='light'] .aa-adm-photo-menu-item:hover {
  color: #ffd700 !important;
}
html[data-theme='light'] .aa-adm-photo-menu-item.is-danger,
html[data-theme='light'] .aa-adm-photo-menu-item.is-danger:hover {
  color: #ffb4a2 !important;
}
.aa-logo-box {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-top: 0.35rem;
  padding: 0;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 200, 200, 0.45);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.aa-logo-box:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--glow-ring),
    0 0 14px var(--glow-1);
}
.aa-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.aa-logo-empty {
  color: #007a7a;
  font-family: var(--font-head);
  font-size: 0.85rem;
}
.aa-modal--camera {
  width: min(420px, 100%);
}
.aa-cam-frame {
  border-radius: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(0, 200, 200, 0.35);
  background: #000;
  aspect-ratio: 1 / 1;
  width: min(100%, 22rem);
  margin-inline: auto;
}
.aa-cam-frame video,
.aa-cam-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  transform: scaleX(-1);
}
@media (max-width: 640px) {
  .aa-adm-photo-menu {
    left: 0;
    right: auto;
    bottom: calc(100% + 0.35rem);
  }
}
.aa-thumb {
  width: 40px; height: 40px; border-radius: 0.4rem; object-fit: cover;
  border: 1px solid var(--border); vertical-align: middle; background: rgba(0,0,0,.25);
}
.aa-link { color: var(--teal-bright, #00c8c8); text-decoration: underline; font-weight: 600; }
.aa-link:hover { color: var(--gold, #ffd700); }
.aa-adm-section-title {
  font-family: var(--font-head); color: var(--gold-mid); font-size: 0.95rem;
  margin: 0.85rem 0 0.45rem;
}
.aa-adm-rule {
  border: 0; border-top: 1px solid var(--border); margin: 1.1rem 0;
}
.aa-adm-enroll-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}
.aa-adm-enroll-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.45rem;
}
.aa-adm-enroll-line > .aa-label {
  flex: 1 1 0;
  min-width: 0;
}
.aa-adm-due-kind-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
.aa-adm-enroll-line > .aa-adm-enroll-remove {
  flex: 0 0 1.7rem;
  width: 1.7rem;
  height: 1.7rem;
  min-width: 1.7rem;
  max-width: 1.7rem;
  padding: 0;
  margin: 0 0 0.2rem;
  border-radius: 0.4rem;
  font-size: 1rem;
  line-height: 1;
}
.aa-adm-invoice {
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 0.75rem;
  background:
    linear-gradient(180deg, rgba(0,163,163,.08), rgba(8,13,14,.35)),
    rgba(12,20,22,.9);
  padding: 0.85rem 0.95rem 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.aa-adm-invoice-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-head); font-size: 0.82rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--gold-mid, #d4af37);
  padding-bottom: 0.55rem; margin-bottom: 0.35rem;
  border-bottom: 1px dashed rgba(255,215,0,.28);
}
.aa-adm-inv-line {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  min-height: 2.35rem;
}
.aa-adm-inv-line[hidden],
.aa-adm-inv-line.is-hidden,
[data-fee-discount-row][hidden],
[data-fee-discount-row].is-hidden {
  display: none !important;
}
.aa-adm-inv-line--reg { padding-top: 0.2rem; }
.aa-adm-reg-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  cursor: pointer;
  position: relative;
}
.aa-adm-reg-tick input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.aa-adm-reg-tick-box {
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid rgba(0, 200, 200, 0.65);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.aa-adm-reg-tick input:checked + .aa-adm-reg-tick-box {
  background: #00a3a3;
  border-color: #00c8c8;
}
.aa-adm-reg-tick input:checked + .aa-adm-reg-tick-box::after {
  content: '';
  display: block;
  width: 0.28rem;
  height: 0.55rem;
  margin: 0.12rem auto 0;
  border: solid #f7f4ec;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.aa-adm-reg-tick[hidden] { display: none !important; }
.aa-adm-inv-label {
  color: var(--muted); font-size: 0.88rem; white-space: nowrap;
}
.aa-adm-inv-label em {
  font-style: normal; margin-left: 0.35rem;
  color: var(--teal-bright, #00c8c8); font-size: 0.72rem; font-weight: 700;
}
.aa-adm-inv-dots {
  flex: 1; min-width: 1rem; height: 1px;
  border-bottom: 1px dotted rgba(247,244,236,.22);
  transform: translateY(0.35rem);
}
.aa-adm-inv-amt {
  width: 6.5rem !important; max-width: 6.5rem !important; min-width: 5.5rem !important;
  text-align: right !important; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.28) !important;
}
.aa-adm-inv-text {
  width: min(16rem, 46vw) !important;
  max-width: 16rem !important;
  min-width: 8rem !important;
  text-align: right !important;
  flex-shrink: 0;
  background: rgba(0,0,0,.28) !important;
}
.aa-adm-seg {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex-shrink: 0;
  width: 15.75rem;
  min-width: 15.75rem;
  gap: 0.28rem;
  padding: 0.22rem;
  border: 1px solid rgba(0, 200, 200, 0.4);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}
.aa-adm-seg-btn {
  border: 1px solid transparent;
  border-radius: 0.4rem;
  background: transparent;
  color: rgba(247, 244, 236, 0.5);
  padding: 0.48rem 0.45rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.aa-adm-seg-btn:not(.on):hover {
  color: #f7f4ec;
  background: rgba(255, 255, 255, 0.06);
}
.aa-adm-seg-btn::after {
  content: '';
  display: inline-block;
  width: 1em;
  margin-left: 0.15rem;
  text-align: center;
  vertical-align: baseline;
}
.aa-adm-seg-btn.on {
  background: linear-gradient(180deg, #00c8c8 0%, #00a3a3 100%);
  color: #080d0e;
  border-color: #ffd700;
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.55),
    0 0 10px rgba(0, 200, 200, 0.35);
  font-weight: 800;
}
.aa-adm-seg-btn.on::after {
  content: '✓';
  font-weight: 900;
}
.aa-adm-invoice-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 0.88rem;
}
.aa-adm-invoice-row--stack {
  flex-direction: column; align-items: stretch; gap: 0.45rem;
}
.aa-adm-invoice-row--inline { justify-content: stretch; }
.aa-adm-invoice-inline {
  display: flex; flex: 1; align-items: center; gap: 0.55rem; min-width: 0;
}
.aa-adm-invoice-row--inline .aa-adm-toggle { flex: 1; min-width: 0; max-width: none; }
.aa-adm-invoice-row--inline .aa-input {
  max-width: 6.5rem; min-width: 5rem; flex-shrink: 0; text-align: right;
}
.aa-adm-invoice-row span { color: var(--muted); min-width: 10rem; }
.aa-adm-invoice-row .aa-input { max-width: 160px; text-align: right; }
.aa-adm-invoice-row--stack .aa-input { max-width: none; text-align: left; }
.aa-adm-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.28rem;
}
.aa-adm-tog {
  border: 1px solid var(--border); background: rgba(0,0,0,.3); color: var(--muted);
  border-radius: 0.4rem; padding: 0.4rem 0.5rem; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.78rem; line-height: 1.2;
}
.aa-adm-tog.on {
  background: rgba(0,163,163,.22); border-color: rgba(0,200,200,.55); color: #fff;
}
.aa-adm-hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.78rem; }
.aa-pay-simple {
  --aa-pay-ctrl-h: 2.35rem;
  --aa-pay-tool-h: 1.85rem;
  /* desc | dop | cycle | months(lock+n) | discount(seg+lock+amt) | amount | paid */
  --aa-pay-cols: minmax(8.5rem, 1.1fr) minmax(7rem, 7.75rem) minmax(7rem, 7.75rem) minmax(5.6rem, 6.4rem) minmax(12.5rem, 14.25rem) minmax(5.4rem, 6.1rem) minmax(5.4rem, 6.1rem);
  padding-top: 0.65rem;
}
.aa-pay-table-head {
  display: grid;
  grid-template-columns: var(--aa-pay-cols);
  gap: 0.4rem;
  align-items: end;
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 0.45rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px dashed rgba(255, 215, 0, 0.28);
}
.aa-pay-table-head span:nth-child(4) {
  text-align: center;
}
.aa-pay-table-head span:nth-child(5) {
  text-align: center;
}
.aa-pay-table-head span:nth-child(6),
.aa-pay-table-head span:nth-child(7) {
  text-align: right;
}
/* Column titles live in the table head — hide duplicate field captions on desktop */
.aa-pay-simple .aa-pay-date-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.aa-pay-reg {
  margin: 0.15rem 0 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.aa-pay-reg[hidden] { display: none !important; }
.aa-pay-reg-tip {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
}
.aa-pay-line-main {
  display: grid;
  grid-template-columns: var(--aa-pay-cols);
  gap: 0.4rem;
  align-items: center;
  min-height: var(--aa-pay-ctrl-h);
}
.aa-pay-line-main > * {
  min-width: 0;
}
/* One shared control height for every value box in the pay row */
.aa-pay-simple .aa-pay-date,
.aa-pay-simple .aa-pay-months,
.aa-pay-simple .aa-pay-disc-amt,
.aa-pay-simple .aa-pay-amt {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: var(--aa-pay-ctrl-h) !important;
  min-height: var(--aa-pay-ctrl-h) !important;
  max-height: var(--aa-pay-ctrl-h) !important;
  padding: 0 0.45rem !important;
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
  border-radius: 0.45rem !important;
  flex-shrink: 1 !important;
}
.aa-pay-months {
  text-align: center;
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
}
/* Single-row discount: %/₹ toggle · lock · value — aligned with other columns */
.aa-pay-disc-cell {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  height: var(--aa-pay-ctrl-h);
}
.aa-pay-disc-cell.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.aa-pay-simple .aa-pay-disc-cell .aa-pay-disc-seg.aa-adm-seg,
.aa-pay-simple .aa-pay-disc-seg {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: var(--aa-pay-ctrl-h) !important;
  min-height: var(--aa-pay-ctrl-h) !important;
  padding: 0.14rem;
  gap: 0.16rem;
  border-radius: 0.45rem;
}
.aa-pay-disc-seg .aa-adm-seg-btn {
  flex: 1;
  font-size: 0.62rem;
  padding: 0.1rem 0.16rem;
  line-height: 1.1;
  white-space: nowrap;
  min-width: 0;
}
.aa-pay-simple .aa-pay-disc-cell > .aa-adm-disc-lock {
  flex: 0 0 var(--aa-pay-tool-h);
  width: var(--aa-pay-tool-h);
  height: var(--aa-pay-tool-h);
  min-width: var(--aa-pay-tool-h);
  border-radius: 0.4rem;
}
.aa-pay-simple .aa-pay-disc-cell > .aa-adm-disc-lock .aa-adm-disc-lock-icon {
  width: 0.92rem;
  height: 0.92rem;
}
.aa-pay-simple .aa-pay-disc-cell > .aa-pay-disc-amt {
  flex: 0 1 3.6rem;
  width: 3.6rem !important;
  max-width: 3.6rem !important;
  min-width: 2.75rem !important;
  text-align: right;
}
.aa-pay-date-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  min-width: 0;
  margin: 0;
}
.aa-pay-months-field {
  overflow: hidden;
}
.aa-pay-simple .aa-pay-months-field .aa-adm-months-tools {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 0.28rem;
  height: var(--aa-pay-ctrl-h);
}
.aa-pay-simple .aa-pay-months-field .aa-adm-disc-lock {
  flex: 0 0 var(--aa-pay-tool-h);
  width: var(--aa-pay-tool-h);
  height: var(--aa-pay-tool-h);
  min-width: var(--aa-pay-tool-h);
}
.aa-pay-simple .aa-pay-months-field .aa-pay-months {
  flex: 1 1 auto;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}
.aa-pay-date-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-mid, #d4af37);
  line-height: 1.15;
}
.aa-pay-date {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.aa-pay-date-slot {
  display: block;
  min-height: 1px;
}
.aa-pay-line-desc {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: var(--aa-pay-ctrl-h);
}
.aa-pay-line-desc--reg {
  padding-left: 0.15rem;
}
.aa-pay-line-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  min-width: 0;
}
.aa-pay-line-title strong {
  color: var(--text, #f7f4ec);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}
.aa-pay-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 0.3rem;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}
.aa-pay-badge--due {
  color: #080d0e;
  background: linear-gradient(180deg, #ffd700, #d4af37);
}
.aa-pay-badge--new {
  color: #080d0e;
  background: linear-gradient(180deg, #00c8c8, #00a3a3);
}
.aa-pay-expand {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(0, 200, 200, 0.45);
  border-radius: 0.35rem;
  background: rgba(0, 163, 163, 0.12);
  color: var(--teal-bright, #00c8c8);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.15s ease, border-color 0.15s ease;
}
.aa-pay-expand:hover {
  background: rgba(0, 163, 163, 0.28);
  border-color: rgba(0, 200, 200, 0.75);
}
.aa-pay-line.is-expanded .aa-pay-expand {
  transform: rotate(180deg);
  background: rgba(255, 215, 0, 0.16);
  border-color: rgba(255, 215, 0, 0.55);
  color: var(--gold, #ffd700);
}
.aa-pay-amt {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.aa-pay-amt[readonly] {
  opacity: 0.92;
  cursor: default;
  color: var(--gold-mid, #d4af37);
}
.aa-pay-line-detail {
  margin: 0.4rem 0 0.55rem;
  padding: 0.55rem 0.6rem 0.45rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 200, 200, 0.28);
  background: rgba(0, 163, 163, 0.08);
}
.aa-pay-line-detail[hidden] { display: none !important; }
.aa-pay-detail-tip {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
}
.aa-pay-simple .aa-adm-fee-subjects {
  margin-top: 0.15rem;
}
.aa-pay-simple .aa-adm-fee-card.aa-pay-line {
  padding: 0.35rem 0 0.45rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.aa-pay-simple .aa-pay-class-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
  margin: 0;
  cursor: pointer;
}
@media (max-width: 900px) {
  .aa-pay-table-head,
  .aa-pay-line-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.35rem 0.4rem;
  }
  .aa-pay-table-head {
    display: none;
  }
  .aa-pay-simple .aa-pay-date-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .aa-pay-line-desc,
  .aa-pay-disc-cell {
    grid-column: 1 / -1;
  }
  .aa-pay-date-slot {
    display: none;
  }
  .aa-pay-simple .aa-pay-months,
  .aa-pay-simple .aa-pay-disc-amt,
  .aa-pay-simple .aa-pay-amt,
  .aa-pay-simple .aa-pay-date {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}
@media (max-width: 720px) {
  .aa-pay-table-head {
    display: none;
  }
}
.aa-adm-go-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 215, 0, 0.55);
  background: rgba(184, 134, 11, 0.18);
  color: #f7f4ec;
  font-size: 0.78rem;
  line-height: 1.35;
}
.aa-adm-go-banner strong { color: #ffd700; font-weight: 800; }
.aa-adm-go-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.55rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #ffd700;
  color: #080d0e;
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  animation: aa-go-pulse 1.4s ease-in-out infinite;
}
.aa-adm-go-mark--inline {
  margin-right: 0.15rem;
  vertical-align: middle;
}
.aa-adm-go-mark--btn {
  margin-right: 0.28rem;
  background: #080d0e;
  color: #ffd700;
  border: 1px solid #ffd700;
  animation: aa-go-pulse 1.4s ease-in-out infinite;
}
@keyframes aa-go-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(255, 215, 0, 0); }
}
.aa-adm-inv-line.is-need-go,
.aa-adm-fee-card.is-need-go {
  border-radius: 0.4rem;
  outline: 1px solid rgba(255, 215, 0, 0.45);
  background: rgba(184, 134, 11, 0.1);
}
.aa-adm-fee-card.is-need-go {
  padding: 0.35rem 0.4rem 0.45rem;
  margin: 0.15rem 0 0.45rem;
}
.aa-adm-fee-table-cta {
  white-space: nowrap;
  font-size: 0.68rem !important;
  padding: 0.38rem 0.48rem !important;
  background: #00a3a3 !important;
  color: #080d0e !important;
  border: 1px solid #00c8c8 !important;
  font-weight: 700 !important;
  line-height: 1.15;
  display: none;
  align-items: center;
  gap: 0.1rem;
  max-width: 16.5rem;
}
.aa-fee-week-table th,
.aa-fee-week-table td {
  text-align: center;
  white-space: nowrap;
}
.aa-fee-week-table th:first-child,
.aa-fee-week-table td:first-child {
  text-align: left;
}
.aa-fee-week-cell,
.aa-fee-week-add {
  min-width: 4.2rem;
  font-size: 0.78rem !important;
  padding: 0.28rem 0.4rem !important;
}
.aa-adm-fee-table-cta.is-shown {
  display: inline-flex !important;
}
.aa-adm-fee-table-cta[hidden] {
  display: none !important;
}
.aa-input.aa-date {
  cursor: pointer;
  color-scheme: inherit;
  min-height: 2.65rem;
  color: var(--text, #f7f4ec);
  position: relative;
}
html[data-theme='light'] .aa-input.aa-date {
  color-scheme: light;
  color: #0f172a;
}
html[data-theme='dark'] .aa-input.aa-date,
html[data-theme='brand'] .aa-input.aa-date,
html[data-theme='gradient'] .aa-input.aa-date {
  color-scheme: dark;
}
.aa-label.aa-date-field {
  cursor: pointer;
}
.aa-label.aa-date-field .aa-input.aa-date {
  pointer-events: auto;
}
/* Full-field hit target — one click anywhere opens the calendar */
input.aa-date::-webkit-calendar-picker-indicator {
  cursor: pointer;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.01;
  color: transparent;
  background: transparent;
  z-index: 2;
}
.aa-input.aa-time {
  cursor: text;
  color-scheme: inherit;
  min-height: 2.65rem;
  color: var(--text, #f7f4ec);
}
.aa-label.aa-time-field {
  cursor: pointer;
}
.aa-label.aa-time-field .aa-input.aa-time {
  pointer-events: auto;
}
input.aa-time::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: invert(1) brightness(1.35);
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
}
/* Locale-independent class time: Hour : Minute AM/PM */
.aa-ampm-field {
  min-width: 0;
}
.aa-ampm-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  min-width: 0;
}
.aa-ampm-row .aa-select {
  min-height: 2.55rem;
  min-width: 0;
}
.aa-ampm-hour {
  flex: 0 0 4.25rem;
  width: 4.25rem;
}
.aa-ampm-min {
  flex: 0 0 4.5rem;
  width: 4.5rem;
}
.aa-ampm-meridiem {
  flex: 0 0 5rem;
  width: 5rem;
  font-weight: 700;
  color: var(--teal-bright, #00c8c8);
}
.aa-ampm-sep {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--muted);
  font-size: 1.05rem;
}
html[data-theme='light'] .aa-ampm-meridiem {
  color: #0f766e;
}
.aa-adm-invoice-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0.7rem; padding-top: 0.65rem;
  border-top: 1px dashed rgba(255,215,0,.35);
  font-family: var(--font-head);
}
.aa-adm-invoice-total strong { color: var(--gold); font-size: 1.25rem; }
.aa-adm-pay-split-head,
.aa-adm-pay-split-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 5.75rem 5.75rem 5.25rem;
  gap: 0.45rem;
  align-items: center;
}
.aa-adm-pay-split-head {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-mid, #d4af37);
  padding-bottom: 0.45rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px dashed rgba(255, 215, 0, 0.28);
}
.aa-adm-pay-split-head span:not(:first-child),
.aa-adm-pay-split-row > .aa-adm-inv-amt,
.aa-adm-pay-split-row > .aa-adm-pay-due {
  text-align: right;
  justify-self: end;
}
.aa-adm-pay-split-row {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.aa-adm-pay-split-subj {
  min-width: 0;
}
.aa-adm-pay-split-subj strong {
  display: block;
  color: var(--text, #f7f4ec);
  font-size: 0.9rem;
  line-height: 1.25;
}
.aa-adm-pay-split-subj em {
  display: block;
  margin-top: 0.12rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.72rem;
}
.aa-adm-pay-split .aa-adm-inv-amt {
  width: 5.75rem !important;
  max-width: 5.75rem !important;
  min-width: 5rem !important;
}
.aa-adm-pay-recv {
  border-color: rgba(0, 163, 163, 0.45) !important;
  color: var(--teal-bright, #00c8c8) !important;
  font-weight: 700;
}
.aa-adm-pay-due {
  color: #ff6b6b;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  min-width: 4.5rem;
  text-align: right;
}
.aa-adm-pay-due.is-clear { color: var(--gold); }
.aa-adm-pay-split-rule {
  height: 0;
  margin: 0.55rem 0 0.35rem;
  border-top: 1px solid rgba(255, 215, 0, 0.35);
}
@media (max-width: 640px) {
  .aa-adm-pay-split-head,
  .aa-adm-pay-split-row {
    grid-template-columns: minmax(0, 1fr) 4.75rem 4.75rem 4.5rem;
    gap: 0.3rem;
  }
  .aa-adm-pay-split .aa-adm-inv-amt {
    width: 4.75rem !important;
    max-width: 4.75rem !important;
    min-width: 4.25rem !important;
  }
}
.aa-pay-summary {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: linear-gradient(180deg, rgba(12, 20, 22, 0.98), rgba(8, 13, 14, 0.98));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}
.aa-pay-invoice {
  position: static;
  box-shadow: none;
}
.aa-pay-periods {
  margin: 0.35rem 0 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 163, 163, 0.35);
  background: rgba(8, 13, 14, 0.55);
}
.aa-pay-inv-head {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #ffd700);
  margin: 0 0 0.2rem;
}
.aa-pay-inv-hint {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}
.aa-pay-inv-group {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.55rem 0 0.2rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(0, 163, 163, 0.28);
}
.aa-pay-inv-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.aa-pay-inv-group-label {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold, #ffd700);
  font-size: 0.92rem;
}
.aa-pay-inv-group-meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.aa-pay-inv-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.38rem 0.35rem;
  margin: 0.12rem 0;
  border-radius: 0.4rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.aa-pay-inv-line.is-on {
  background: rgba(0, 163, 163, 0.1);
  border-color: rgba(0, 163, 163, 0.28);
}
.aa-pay-inv-line.is-off {
  opacity: 0.55;
}
.aa-pay-inv-line input[type='checkbox'] {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.15rem 0 0;
  accent-color: #00a3a3;
  cursor: pointer;
}
.aa-pay-inv-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
}
.aa-pay-inv-text strong {
  font-family: var(--font-body, 'Open Sans', Helvetica, Arial, sans-serif);
  font-weight: 600;
  color: var(--text, #f7f4ec);
  font-size: 0.88rem;
}
.aa-pay-inv-text em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--teal-bright, #00c8c8);
}
.aa-pay-inv-pause {
  background: rgba(0, 163, 163, 0.08);
  border-color: rgba(0, 163, 163, 0.28);
  cursor: default;
  pointer-events: none;
}
.aa-pay-inv-pause .aa-pay-inv-amt {
  color: #007a7a;
}
.aa-pay-inv-amt {
  flex: 0 0 auto;
  font-family: var(--font-head);
  color: var(--gold, #ffd700);
  font-size: 0.98rem;
  white-space: nowrap;
}
.aa-pay-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.22rem 0;
  font-size: 0.92rem;
}
.aa-pay-summary-row span { color: var(--muted); }
.aa-pay-summary-row strong { font-family: var(--font-head); color: var(--gold); font-size: 1.05rem; }
.aa-pay-summary-row--recv strong { color: var(--teal-bright); }
.aa-pay-summary-row--bal strong { color: #ff6b6b; }
.aa-pay-summary-row--bal.is-paid strong { color: var(--gold); }
.aa-pay-summary-status {
  margin-top: 0.35rem;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
}
.aa-pay-summary-status.is-due {
  background: #c62828;
  color: #fff;
}
.aa-pay-summary-status.is-paid,
.aa-pay-summary-status[hidden] {
  display: none !important;
}
.aa-adm-invoice-row--reg em {
  font-style: normal; color: var(--teal-bright, #00c8c8); font-size: 0.75rem; font-weight: 600;
}
.aa-adm-fee-subjects {
  display: flex; flex-direction: column; gap: 0.7rem;
  margin-top: 0.55rem;
}
.aa-adm-fee-card {
  border: 1px solid rgba(0,200,200,.22);
  border-radius: 0.55rem;
  background: rgba(8,13,14,.5);
  padding: 0.55rem 0.7rem 0.45rem;
}
.aa-adm-fee-card.is-wallet {
  border-color: rgba(212, 175, 55, 0.35);
}
.aa-adm-wallet-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.15rem;
}
.aa-adm-wallet-block[hidden] {
  display: none !important;
}
.aa-pay-badge--special {
  background: rgba(255, 215, 0, 0.18);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.45);
}
.aa-pay-badge--wallet {
  background: rgba(0, 163, 163, 0.22);
  border: 1px solid rgba(0, 200, 200, 0.55);
  color: var(--teal-bright, #00c8c8);
}
.aa-pay-line--wallet {
  border-color: rgba(212, 175, 55, 0.35);
}
.aa-pay-wallet-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.aa-pay-wallet-cell .aa-pay-date-label {
  color: var(--gold-mid, #d4af37);
  font-size: 0.68rem;
  font-weight: 700;
}
.aa-pay-line--wallet [data-wallet-deposit] {
  border-color: rgba(0, 200, 200, 0.45);
}
/* Wallet lives under the class in mid — never a second finance block. */
.aa-stu-wallet-line {
  display: block;
  margin-top: 0.08rem;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
  color: #00e0e0 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.aa-stu-wallet-line.is-low {
  color: #ffd700 !important;
  white-space: normal;
  overflow: visible;
}
.aa-wallet-recharge-wa {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #ffd700;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.aa-wallet-recharge-wa:hover {
  color: #00c8c8;
}
.aa-pay-wallet-dep-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.aa-adm-wallet-block .aa-adm-months-tools,
.aa-pay-wallet-cell .aa-adm-months-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.aa-stu-class--wallet .aa-stu-wallet-meta {
  color: #00e0e0 !important;
  font-weight: 800;
}
.aa-stu-class--wallet .aa-stu-wallet-meta.is-low {
  color: #ffd700 !important;
}
.aa-card--student .aa-stu-finance > .aa-stu-wallet {
  display: none !important;
}
.aa-adm-fee-card-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
  margin-bottom: 0.35rem; padding-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(255,255,255,.1);
}
.aa-adm-fee-card-head strong {
  font-family: var(--font-head); color: var(--gold-mid, #d4af37);
  font-size: 0.9rem; font-weight: 700;
}
.aa-adm-fee-subtotal {
  color: var(--teal-bright, #00c8c8); font-weight: 700; font-size: 0.95rem; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.aa-adm-fee-amt-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
  min-width: 6.5rem;
  max-width: 16rem;
}
.aa-adm-first-month {
  margin: -0.15rem 0 0.55rem;
  padding: 0 0.15rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--teal-bright, #00c8c8);
}
.aa-adm-disc-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}
.aa-adm-months-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}
.aa-adm-months-tools .aa-adm-inv-amt,
.aa-adm-months-tools .aa-pay-months {
  width: 4.5rem;
  min-width: 4.5rem;
}
.aa-pay-months-field .aa-adm-months-tools {
  width: 100%;
}
.aa-adm-inv-line--months .aa-adm-months-tools .aa-adm-inv-amt,
.aa-adm-inv-line--disc .aa-adm-months-tools .aa-adm-inv-amt {
  width: 4.5rem;
}
/* Months + discount locks sit to the LEFT of the value box. */
.aa-adm-months-tools,
.aa-pay-disc-amt-tools {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
}
.aa-pay-months-field [data-months-lock],
.aa-adm-inv-line--months [data-months-lock],
.aa-adm-inv-line--disc [data-disc-lock],
.aa-pay-disc-amt-tools [data-disc-lock] {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  order: 0;
  flex: 0 0 auto;
  align-self: center;
}
.aa-adm-months-tools .aa-adm-inv-amt,
.aa-adm-months-tools .aa-pay-months,
.aa-pay-disc-amt-tools .aa-pay-disc-amt {
  order: 1;
}
.aa-adm-inv-line--disc {
  align-items: center;
}
.aa-adm-inv-line--disc .aa-adm-disc-tools {
  flex: 0 1 auto;
}
.aa-pay-disc-amt-tools {
  min-height: var(--aa-pay-tool-h, 1.95rem);
}
.aa-pay-months-field .aa-adm-months-tools {
  width: 100%;
  min-height: var(--aa-pay-ctrl-h, 2.35rem);
}
.aa-pay-disc-amt-tools .aa-pay-disc-amt {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
.aa-enroll-locks {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
  margin-top: 0.55rem;
}
.aa-enroll-lock-card {
  flex: 1 1 11.5rem;
  min-width: 10.5rem;
  max-width: 16rem;
  padding: 0.5rem 0.6rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border, rgba(247, 244, 236, 0.14));
  background: var(--surface, rgba(12, 20, 22, 0.55));
  color: var(--text, #f7f4ec);
  font-family: var(--font-body, 'Open Sans', Helvetica Neue, Arial, sans-serif);
}
.aa-enroll-lock-card.is-locked {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.08);
}
.aa-enroll-lock-card.is-unlocked {
  border-color: rgba(0, 163, 163, 0.28);
}
.aa-enroll-lock-card.is-paused,
.aa-enroll-lock-card--pause.is-paused {
  border-color: rgba(0, 200, 200, 0.5);
  background: rgba(0, 163, 163, 0.12);
}
.aa-enroll-lock-name {
  display: block;
  font-family: var(--font-heading, 'Trebuchet MS', Lucida Grande, Arial, sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text, #f7f4ec);
  margin-bottom: 0.35rem;
}
.aa-enroll-lock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.aa-enroll-disc-seg.aa-adm-seg {
  display: flex;
  width: 100%;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 0 0.45rem;
  padding: 0.16rem;
  gap: 0.18rem;
  border-radius: 0.45rem;
  min-height: 2rem;
  box-sizing: border-box;
}
.aa-enroll-disc-seg .aa-adm-seg-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  padding: 0.28rem 0.35rem;
  line-height: 1.15;
  white-space: nowrap;
  min-width: 0;
  min-height: 1.65rem;
}
.aa-enroll-lock-card .aa-enroll-lock-row {
  flex-wrap: nowrap;
  align-items: center;
  min-height: 2rem;
}
.aa-enroll-lock-card .aa-adm-disc-lock {
  flex: 0 0 1.95rem;
  width: 1.95rem;
  height: 1.95rem;
  min-width: 1.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.4rem;
}
.aa-enroll-lock-unit {
  font-size: 0.78rem;
  color: var(--muted, #a8b0b2);
  white-space: nowrap;
  line-height: 1.95rem;
}
.aa-enroll-lock-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.4rem;
  border-radius: 0.28rem;
  white-space: nowrap;
  line-height: 1.2;
}
.aa-enroll-lock-badge.is-on {
  color: #080d0e;
  background: #d4af37;
}
.aa-enroll-lock-badge.is-off {
  color: var(--text, #f7f4ec);
  background: rgba(0, 163, 163, 0.22);
  border: 1px solid rgba(0, 163, 163, 0.45);
}
.aa-enroll-lock-badge.is-pause {
  color: #080d0e;
  background: #00c8c8;
}
.aa-enroll-lock-hint {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted, #a8b0b2);
}
.aa-enroll-months-inp,
.aa-enroll-disc-inp {
  width: 3.6rem !important;
  min-width: 3.6rem !important;
  height: 1.95rem;
  text-align: center;
  padding: 0.15rem 0.3rem !important;
  background: var(--input-bg, rgba(0, 0, 0, 0.35)) !important;
  color: var(--text, #f7f4ec) !important;
  border: 1px solid var(--border, rgba(0, 163, 163, 0.28)) !important;
}
.aa-enroll-pause-btn {
  height: 1.95rem;
  padding: 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-color: rgba(0, 163, 163, 0.55) !important;
  color: var(--text, #f7f4ec) !important;
  background: rgba(0, 163, 163, 0.16) !important;
}
.aa-enroll-pause-history-btn {
  height: 1.95rem !important;
  padding: 0 0.65rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}
.aa-enroll-pause-btn.is-paused {
  background: rgba(0, 163, 163, 0.28) !important;
  border-color: #00a3a3 !important;
  color: var(--teal-bright, #00c8c8) !important;
}
.aa-enroll-pause-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--muted, #a8b0b2);
  font-family: var(--font-body, 'Open Sans', Helvetica, Arial, sans-serif);
}
.aa-enroll-pause-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 163, 163, 0.4);
  background: rgba(0, 163, 163, 0.12);
  color: #f7f4ec;
}
.aa-enroll-pause-chip strong {
  color: #00c8c8;
  font-weight: 700;
  margin-right: 0.15rem;
}
.aa-enroll-pause-history {
  margin-top: 0.55rem;
  width: 100%;
  border: 1px solid rgba(0, 163, 163, 0.28);
  border-radius: 0.45rem;
  background: rgba(8, 13, 14, 0.45);
  overflow: hidden;
}
.aa-enroll-pause-history-head {
  font-family: var(--font-heading, 'Trebuchet MS', Lucida Grande, Arial, sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #00c8c8;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(0, 163, 163, 0.22);
}
.aa-enroll-pause-table {
  display: flex;
  flex-direction: column;
}
.aa-enroll-pause-tr {
  display: grid;
  grid-template-columns: minmax(9rem, 1.6fr) minmax(4.5rem, 0.7fr) auto auto;
  gap: 0.4rem 0.55rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-top: 1px solid rgba(247, 244, 236, 0.06);
  font-size: 0.78rem;
  color: #f7f4ec;
  font-family: var(--font-body, 'Open Sans', Helvetica Neue, Arial, sans-serif);
}
.aa-enroll-pause-tr--head {
  border-top: 0;
  color: var(--muted, #a8b0b2);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.aa-enroll-pause-tr.is-removed {
  opacity: 0.72;
}
.aa-enroll-pause-tr span {
  min-width: 0;
}
.aa-enroll-pause-tr strong {
  display: block;
  font-weight: 600;
}
.aa-enroll-pause-tr em {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  color: var(--muted, #a8b0b2);
  margin-top: 0.12rem;
}
.aa-enroll-pause-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}
.aa-enroll-pause-edit {
  height: 1.7rem !important;
  padding: 0 0.55rem !important;
  font-size: 0.72rem !important;
}
.aa-enroll-pause-del {
  height: 1.7rem;
  padding: 0 0.45rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 138, 138, 0.45);
  background: transparent;
  color: #ff8a8a;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body, 'Open Sans', Helvetica Neue, Arial, sans-serif);
}
.aa-enroll-pause-del:hover {
  background: rgba(255, 138, 138, 0.12);
}
@media (max-width: 640px) {
  .aa-enroll-pause-tr,
  .aa-enroll-pause-tr--head {
    grid-template-columns: 1fr 1fr;
  }
  .aa-enroll-pause-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
.aa-modal--pause {
  max-width: 28rem;
}
.aa-modal--pause-simple {
  max-width: 26rem;
  max-height: min(90vh, 36rem);
  overflow: auto;
}
.aa-pause-simple-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.65rem 0 0.25rem;
}
.aa-pause-simple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 163, 163, 0.25);
  background: rgba(8, 13, 14, 0.4);
}
.aa-pause-simple-row.is-latest {
  border-color: rgba(0, 200, 200, 0.55);
  background: rgba(0, 163, 163, 0.12);
}
.aa-pause-simple-row.is-removed {
  opacity: 0.65;
}
.aa-pause-simple-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.aa-pause-simple-main strong {
  font-size: 0.86rem;
  color: var(--text, #f7f4ec);
}
.aa-pause-simple-main span {
  font-size: 0.75rem;
  color: var(--muted, #a8b0b2);
}
html[data-theme='light'] .aa-pause-simple-row {
  background: rgba(0, 163, 163, 0.08);
  border-color: rgba(0, 122, 122, 0.35);
}
html[data-theme='light'] .aa-pause-simple-row.is-latest {
  background: rgba(0, 163, 163, 0.14);
  border-color: #00a3a3;
}
html[data-theme='light'] .aa-pause-simple-main strong {
  color: #0c1416;
}
html[data-theme='light'] .aa-pause-simple-main span {
  color: #4a5557;
}
html[data-theme='light'] .aa-pause-form-head {
  color: #b8860b;
}
.aa-pause-empty {
  margin: 0.5rem 0 0.25rem;
}
.aa-pause-form {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(0, 163, 163, 0.22);
}
.aa-pause-form-head {
  font-family: var(--font-heading, 'Trebuchet MS', Lucida Grande, Arial, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 0.3rem;
}
.aa-pause-range-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.45rem 0 0.55rem;
}
.aa-pause-range-tab {
  appearance: none;
  border: 1px solid rgba(0, 163, 163, 0.35);
  background: rgba(8, 13, 14, 0.35);
  color: var(--text, #f7f4ec);
  border-radius: 0.35rem;
  padding: 0.4rem 0.45rem;
  font-family: var(--font-body, 'Open Sans', Helvetica Neue, Arial, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.aa-pause-range-tab.is-on {
  border-color: #00a3a3;
  background: rgba(0, 163, 163, 0.22);
  color: #ffd700;
}
.aa-pause-month-wrap {
  margin: 0.15rem 0 0.35rem;
}
.aa-pause-month-wrap[hidden],
.aa-pause-custom-wrap[hidden],
.aa-pause-grid[hidden],
#aaPauseHistoryPanel[hidden],
#aaPauseForm[hidden] {
  display: none !important;
}
.aa-pause-month-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted, #a8b0b2);
}
.aa-pause-month-field .aa-input {
  min-height: 2.35rem;
}
.aa-pause-range-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--muted, #a8b0b2);
  font-family: var(--font-body, 'Open Sans', Helvetica Neue, Arial, sans-serif);
}
html[data-theme='light'] .aa-pause-range-tab {
  background: #fff;
  color: #0c1416;
  border-color: rgba(0, 122, 122, 0.35);
}
html[data-theme='light'] .aa-pause-range-tab.is-on {
  background: rgba(0, 163, 163, 0.12);
  color: #007a7a;
  border-color: #00a3a3;
}
html[data-theme='light'] .aa-pause-range-hint,
html[data-theme='light'] .aa-pause-month-field {
  color: #4a5557;
}
.aa-pause-form #aaPauseNote {
  margin-top: 0.45rem;
}
.aa-pause-grid,
.aa-pause-custom-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.35rem 0 0.5rem;
}
.aa-pause-mode {
  margin: 0.35rem 0 0;
  color: var(--gold-mid, #d4af37);
  font-family: var(--font-body, 'Open Sans', Helvetica, Arial, sans-serif);
  font-size: 0.9rem;
}
.aa-pause-preview {
  margin: 0.35rem 0 0.75rem;
  color: var(--teal-bright, #00c8c8);
  font-size: 0.85rem;
  font-family: var(--font-body, 'Open Sans', Helvetica, Arial, sans-serif);
}
.aa-adm-disc-lock {
  flex: 0 0 auto;
  width: 1.95rem;
  height: 1.95rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 163, 163, 0.55);
  background: rgba(8, 13, 14, 0.92);
  color: #d4af37;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease;
}
.aa-adm-disc-lock:hover {
  border-color: #00c8c8;
  color: #00c8c8;
  background: rgba(0, 163, 163, 0.18);
}
.aa-adm-disc-lock.is-unlocked {
  color: #d4af37;
}
.aa-adm-disc-lock.is-locked {
  border-color: #ffd700;
  color: #ffd700;
  background: rgba(184, 134, 11, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}
.aa-adm-disc-lock.is-pop {
  animation: aa-disc-lock-pop 0.28s ease;
}
.aa-adm-disc-lock-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  pointer-events: none;
}
@keyframes aa-disc-lock-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  40% {
    transform: scale(1.18) rotate(-8deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
.aa-adm-fee-amt-slot .aa-adm-inv-amt {
  width: 6.5rem !important;
  max-width: 6.5rem !important;
}
.aa-adm-fee-amt-slot .aa-adm-inv-amt:not([readonly]) {
  border-color: rgba(0, 200, 200, 0.65) !important;
  box-shadow: 0 0 0 1px rgba(0, 163, 163, 0.25);
}
.aa-adm-fee-amt-slot .aa-adm-inv-amt[readonly] {
  opacity: 0.92;
  cursor: default;
  color: #f7f4ec;
  border-color: rgba(255, 255, 255, 0.35);
}
.aa-adm-fee-table-cta:hover {
  background: #00c8c8 !important;
}
.aa-adm-fee-card .aa-adm-inv-line:last-of-type { border-bottom: 0; }
@media (max-width: 860px) {
  .aa-adm-enroll-row {
    position: relative;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.7rem 0.65rem;
    border: 1px solid color-mix(in srgb, var(--aa-logo-menu, #207060) 22%, transparent);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--surface, #0c1416) 88%, transparent);
  }
  html[data-theme='light'] .aa-adm-enroll-row {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
  }
  .aa-adm-enroll-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    align-items: stretch;
    flex-wrap: unset;
  }
  .aa-adm-enroll-line > .aa-label {
    flex: none;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
    margin: 0;
  }
  .aa-adm-enroll-line > .aa-label .aa-select,
  .aa-adm-enroll-line > .aa-label .aa-input,
  .aa-adm-enroll-line > .aa-label .aa-date {
    width: 100%;
    max-width: none;
    min-height: 2.55rem;
    font-size: 16px;
  }
  .aa-adm-enroll-line > .aa-adm-enroll-remove {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    margin: 0;
    z-index: 2;
  }
  .aa-adm-due-kind-hint {
    font-size: 0.72rem;
    line-height: 1.35;
  }
  /* One scroll surface — stop nested modal scrollbars */
  .aa-modal-bg {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .aa-modal--admission {
    max-height: none;
    overflow: visible;
  }

  /* Fee invoice / registration — clean stacked alignment */
  .aa-adm-invoice {
    padding: 0.75rem 0.8rem 0.85rem;
    min-width: 0;
  }
  .aa-adm-invoice-head {
    align-items: center;
    gap: 0.5rem;
  }
  .aa-adm-inv-dots {
    display: none !important;
  }
  .aa-adm-inv-label {
    white-space: normal;
    line-height: 1.3;
  }
  .aa-adm-inv-line,
  .aa-adm-inv-line--toggle,
  .aa-adm-inv-line--months,
  .aa-adm-inv-line--disc,
  .aa-adm-inv-line--pay,
  .aa-adm-inv-line--cycle {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: 0.55rem 0;
    min-height: 0;
  }
  .aa-adm-inv-line--reg {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'tick label'
      'amt amt';
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.5rem;
    padding: 0.55rem 0;
  }
  .aa-adm-inv-line--reg > .aa-adm-reg-tick {
    grid-area: tick;
  }
  .aa-adm-inv-line--reg > .aa-adm-inv-label {
    grid-area: label;
    min-width: 0;
  }
  .aa-adm-inv-line--reg > .aa-adm-fee-amt-slot {
    grid-area: amt;
  }
  .aa-adm-seg {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .aa-adm-fee-amt-slot,
  .aa-adm-months-tools,
  .aa-adm-disc-tools,
  .aa-pay-disc-amt-tools {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
    flex-wrap: nowrap;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 0.45rem;
  }
  .aa-adm-disc-tools {
    flex-direction: column;
    align-items: stretch;
  }
  .aa-adm-disc-tools .aa-adm-seg {
    width: 100%;
  }
  .aa-adm-inv-amt,
  .aa-adm-fee-amt-slot .aa-adm-inv-amt,
  .aa-adm-months-tools .aa-adm-inv-amt,
  .aa-adm-months-tools .aa-pay-months,
  .aa-pay-disc-amt-tools .aa-pay-disc-amt,
  .aa-pay-amt,
  .aa-pay-months,
  .aa-pay-disc-amt {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    text-align: left !important;
    min-height: 2.55rem;
    box-sizing: border-box;
  }
  .aa-adm-disc-lock,
  .aa-adm-months-tools .aa-adm-disc-lock,
  .aa-adm-inv-line--disc .aa-adm-disc-lock,
  .aa-adm-inv-line--months .aa-adm-disc-lock {
    flex: 0 0 2.45rem !important;
    width: 2.45rem !important;
    height: 2.45rem !important;
    min-width: 2.45rem;
    align-self: center;
  }
  .aa-adm-fee-card {
    padding: 0.7rem 0.75rem 0.65rem;
    min-width: 0;
  }
  .aa-adm-fee-card-head {
    gap: 0.5rem;
    align-items: flex-start;
  }
  .aa-adm-fee-card-head strong {
    min-width: 0;
    line-height: 1.3;
  }
  .aa-adm-fee-card .aa-adm-hint,
  .aa-adm-first-month {
    margin: 0.15rem 0 0.35rem;
  }
  .aa-adm-invoice-total {
    margin-top: 0.55rem;
    padding-top: 0.65rem;
  }
  .aa-adm-fee-table-cta {
    width: 100%;
    min-height: 2.45rem;
  }
  .aa-adm-fee-amt-slot:has(.aa-adm-fee-table-cta.is-shown),
  .aa-adm-fee-amt-slot:has(.aa-adm-fee-table-cta:not([hidden])) {
    flex-wrap: wrap;
  }
}
.aa-status { margin: 0.5rem 0; font-size: 0.88rem; }
.aa-status.ok { color: var(--teal-bright); }
.aa-status.warn { color: #ffb4a2; }
.aa-card-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.aa-card {
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: linear-gradient(180deg, rgba(0,163,163,.06), rgba(8,13,14,.5));
  padding: 0.65rem 0.75rem 0.6rem;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.aa-card:hover {
  border-color: rgba(0,200,200,.5);
  transform: translateY(-1px);
}
.aa-card--long { min-height: 0; }
.aa-card--compact { min-height: 0; }
.aa-card-head {
  display: flex; align-items: center; gap: 0.55rem;
  margin-bottom: 0.4rem;
}
.aa-card-head-text { flex: 1; min-width: 0; }
.aa-card-avatar {
  width: 40px; height: 40px; border-radius: 0.45rem; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.aa-card-avatar--empty {
  display: grid; place-items: center;
  background: rgba(0,163,163,.18); color: var(--teal-bright);
  font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
}
.aa-card-title {
  margin: 0; font-family: var(--font-head); color: var(--gold-mid);
  font-size: 0.95rem; line-height: 1.2;
}
.aa-card-sub { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.72rem; }
.aa-card-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem;
  padding: 0.22rem 0; font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.aa-card-row span { color: var(--muted); flex-shrink: 0; }
.aa-card-row strong {
  text-align: right; font-weight: 600; color: var(--text);
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem;
}
.aa-card-actions {
  display: flex; gap: 0.35rem; justify-content: flex-end;
  margin-top: 0.45rem; padding-top: 0.3rem;
}
.aa-card-actions--inline {
  margin: 0; padding: 0; flex-shrink: 0;
}
.aa-card-actions--inline .aa-btn,
.aa-card-actions--inline button {
  padding: 0.28rem 0.5rem; font-size: 0.72rem;
}
.aa-card-meta-inline {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem;
  color: var(--muted); font-size: 0.75rem;
  padding-top: 0.15rem;
}
.aa-enroll-tag-wrap {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0.15rem 0 0.35rem;
}
.aa-enroll-tag {
  display: flex; flex-direction: column; gap: 0.08rem;
  min-width: 9.5rem; max-width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(0,200,200,.35);
  background: rgba(0,163,163,.12);
}
.aa-enroll-tag strong {
  font-size: 0.78rem; color: #fff; font-weight: 700;
}
.aa-enroll-tag em {
  font-style: normal; font-size: 0.7rem; color: var(--gold-mid);
}
.aa-enroll-tag span {
  font-size: 0.68rem; color: var(--muted);
}
.aa-enroll-tag.is-off {
  opacity: 0.65;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
.aa-enroll-tag.is-off strong { text-decoration: line-through; color: var(--muted); }
.aa-muted { color: var(--muted); font-size: 0.78rem; }
.aa-pill {
  display: inline-block; padding: 0.15rem 0.45rem;
  border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: rgba(0,163,163,.2); border: 1px solid rgba(0,200,200,.35); color: #fff;
}
.aa-pill.is-off {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); color: var(--muted);
  text-decoration: line-through;
}
.aa-modal--detail { width: min(640px, 100%); }
.aa-detail-body { max-height: min(70vh, 640px); overflow: auto; }
.aa-detail-top {
  display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 0.75rem;
}
.aa-detail-photo {
  width: 96px; height: 96px; border-radius: 0.65rem; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.aa-detail-photo-box.aa-stu-photo {
  flex: 0 0 96px;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  height: 96px;
  min-height: 96px;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  border-right: 1px solid var(--border);
  align-self: flex-start;
}
.aa-detail-meta { flex: 1; min-width: 0; }
.aa-detail-section {
  margin-top: 0.75rem; padding: 0.65rem 0.7rem;
  border: 1px solid rgba(0,163,163,.22); border-radius: 0.55rem;
  background: rgba(0,0,0,.22);
}
.aa-detail-section h3 {
  margin: 0 0 0.45rem; font-size: 0.92rem; color: var(--gold-mid);
}
.aa-detail-list {
  margin: 0.35rem 0 0; padding-left: 1.1rem; color: var(--text);
}
.aa-detail-list li { margin: 0.25rem 0; }
.aa-enroll-chip {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.65rem;
  padding: 0.55rem 0.6rem; margin-bottom: 0.45rem;
  border: 1px solid rgba(0,200,200,.28); border-radius: 0.5rem;
  background: rgba(0,163,163,.08);
}
.aa-enroll-chip.is-inactive {
  opacity: 0.72; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.03);
}
.aa-enroll-chip-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1 1 auto; }
.aa-enroll-chip-main strong { color: var(--text); }
.aa-enroll-chip-main > span { color: var(--muted); font-size: 0.8rem; }
.aa-enroll-chip .aa-enroll-toggle { flex: 0 0 auto; margin-top: 0.1rem; }
.aa-modal--reminder h2 {
  color: var(--gold-mid);
}
.aa-modal-bg--reminder .aa-confirm-msg {
  white-space: pre-line;
}
.aa-class-stu-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}
.aa-class-stu-toggle:hover {
  background: rgba(0, 200, 200, 0.12);
}
.aa-class-stu-toggle strong {
  display: block;
  font-family: var(--font-head);
  color: var(--gold-mid);
  font-size: 0.95rem;
}
.aa-class-stu-toggle span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}
.aa-class-stu-chevron {
  flex-shrink: 0;
  color: var(--teal-bright);
  font-size: 1rem;
}
.aa-class-stu-roster {
  border-top: 1px solid rgba(0, 163, 163, 0.22);
  padding: 0.35rem 0.55rem 0.55rem;
}
.aa-class-stu-block.is-open .aa-class-stu-toggle {
  background: rgba(0, 163, 163, 0.14);
}
.aa-enroll-status-btns--solo {
  margin-top: 0.65rem;
}
.aa-btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 0.4rem;
}
.aa-subj-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.aa-menu-btn { display: none; }

.aa-module-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.aa-module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: rgba(8, 13, 14, 0.55);
  cursor: pointer;
}
.aa-module-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.aa-module-meta strong {
  font-family: var(--font-head);
  font-size: 0.95rem;
}
.aa-module-meta small {
  color: var(--muted);
  font-size: 0.8rem;
}
.aa-module-toggle input[type='checkbox'] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--teal);
}
.aa-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
}
.aa-pill.on { color: var(--teal-bright); border-color: rgba(0, 163, 163, 0.45); }
.aa-pill.off { color: var(--muted); }
.aa-adm-info { color: var(--muted); display: block; margin-top: 0.2rem; }
.aa-adm-warn { color: #ffb4a2; display: block; margin-top: 0.2rem; }

@media (max-width: 860px) {
  .aa-shell { flex-direction: column; }
  .aa-academy-bar .aa-menu-btn { display: inline-flex; }
  .aa-sidebar {
    width: 100%;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform .2s ease;
    max-width: 280px;
    height: 100vh;
  }
  .aa-app.nav-open .aa-sidebar { transform: none; }
  .aa-menu-btn { display: inline-flex; }
  .aa-main { padding-top: 0.75rem; }
}

/* Auth */
.aa-auth {
  min-height: 100vh; display: grid; place-items: center; padding: 1.25rem;
}
.aa-auth-card {
  width: min(420px, 100%);
  background: rgba(12,20,22,.88);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.4rem 1.25rem 1.5rem;
  box-shadow: 0 18px 48px rgba(0,0,0,.4);
}
.aa-auth-card--wide { width: min(480px, 100%); }
.aa-auth-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.aa-auth-card img { display: block; width: min(220px, 70%); margin: 0 auto 0.85rem; }
.aa-auth-card h1 { text-align: center; font-size: 1.35rem; }
.aa-auth-card .lead { text-align: center; color: var(--muted); margin: 0 0 1rem; font-size: 0.9rem; }
.aa-auth-card .aa-label { margin-bottom: 0.7rem; }
.aa-auth-card .aa-btn { width: 100%; margin-top: 0.35rem; }
.aa-auth-switch { text-align: center; margin-top: 0.9rem; font-size: 0.88rem; color: var(--muted); }
.aa-footer-copy { text-align: center; margin-top: 1.25rem; font-size: 0.75rem; color: var(--muted); }

/* Dashboard — today's classes + daily updates */
.aa-dash-section { margin-top: 1.25rem; }
.aa-dash-heading {
  margin: 0 0 0.65rem;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text);
}
.aa-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.aa-live-card {
  padding: 0.85rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: rgba(12, 20, 22, 0.75);
}
.aa-live-card--live {
  border-color: rgba(0, 200, 200, 0.65);
  background: linear-gradient(145deg, rgba(0, 163, 163, 0.22), rgba(12, 20, 22, 0.9));
  box-shadow: 0 0 0 1px rgba(0, 200, 200, 0.2);
}
.aa-live-card--live.is-flash {
  animation: aaLiveFlash 1.4s ease-in-out infinite;
}
@keyframes aaLiveFlash {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0, 200, 200, 0.25), 0 0 12px rgba(0, 200, 200, 0.15); }
  50% { box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.55), 0 0 22px rgba(0, 200, 200, 0.4); }
}
.aa-live-card--upcoming {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(184, 134, 11, 0.12);
}
.aa-live-card--done {
  opacity: 0.78;
  border-color: rgba(255, 255, 255, 0.12);
}
.aa-live-card-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.aa-live-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  background: rgba(0, 163, 163, 0.25);
  color: var(--teal-bright);
  border: 1px solid rgba(0, 200, 200, 0.35);
}
.aa-live-card--live .aa-live-badge {
  background: rgba(255, 215, 0, 0.2);
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.45);
}
.aa-live-card--upcoming .aa-live-badge {
  background: rgba(212, 175, 55, 0.22);
  color: var(--gold-mid);
}
.aa-due-card,
.aa-join-card,
.aa-bday-card { cursor: pointer; }
.aa-due-card-body {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.aa-due-card-main { min-width: 0; flex: 1; }
.aa-live-photo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 163, 163, 0.12);
  border: 1px solid rgba(0, 163, 163, 0.28);
}
.aa-live-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aa-live-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #007a7a;
  background: linear-gradient(160deg, rgba(0, 163, 163, 0.16), rgba(255, 215, 0, 0.12));
}
.aa-bday-card { position: relative; overflow: visible; }
.aa-bday-card--today .aa-live-badge {
  background: #ffd700 !important;
  color: #080d0e !important;
  border-color: #b8860b !important;
}
.aa-bday-card--today {
  border-color: #d4af37 !important;
  background: linear-gradient(165deg, #fff8dc 0%, #ffe08a 48%, #fffdf5 100%) !important;
  animation: aaBdayShake 0.55s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.45), 0 8px 22px rgba(184, 134, 11, 0.28);
}
.aa-bday-card--late {
  border-color: #e11d48 !important;
  background: #fff1f2 !important;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.28);
}
.aa-bday-card--late .aa-live-badge {
  background: #e11d48 !important;
  color: #fff !important;
  border-color: #be123c !important;
}
.aa-bday-action {
  margin: 0.45rem 0 0;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f766e;
}
.aa-bday-card--today .aa-bday-action { color: #b8860b; }
.aa-bday-card--late .aa-bday-action { color: #be123c; }
/* Today/late cards always use light plates — force dark text in every theme */
.aa-bday-card--today,
.aa-bday-card--late {
  color: #0f172a;
}
.aa-bday-card--today .aa-live-title,
.aa-bday-card--late .aa-live-title {
  color: #0f172a !important;
}
.aa-bday-card--today .aa-live-meta,
.aa-bday-card--late .aa-live-meta {
  color: rgba(15, 23, 42, 0.78) !important;
}
html[data-theme='light'] .aa-bday-card--today .aa-live-badge {
  background: #ffd700 !important;
  color: #080d0e !important;
  border-color: #b8860b !important;
}
html[data-theme='light'] .aa-bday-card--late .aa-live-badge {
  background: #e11d48 !important;
  color: #fff !important;
  border-color: #be123c !important;
}
.aa-bday-spark {
  position: absolute;
  inset: -8px;
  pointer-events: none;
  border-radius: 0.85rem;
  background:
    radial-gradient(circle at 12% 18%, #ffd700 0 3px, transparent 4px),
    radial-gradient(circle at 88% 16%, #ffe08a 0 3px, transparent 4px),
    radial-gradient(circle at 78% 82%, #ffd700 0 2px, transparent 3px),
    radial-gradient(circle at 18% 78%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 50% 0%, #ffd700 0 4px, transparent 6px);
  animation: aaBdayBurst 1.1s ease-in-out infinite;
}
.aa-bday-balloon {
  position: absolute;
  top: -0.85rem;
  left: 0.45rem;
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
  animation: aaBalloon 1.5s ease-in-out infinite;
}
.aa-bday-balloon--2 {
  left: auto;
  right: 0.45rem;
  animation-delay: 0.35s;
}
@keyframes aaBdayShake {
  0%, 100% { transform: rotate(-1.1deg); }
  50% { transform: rotate(1.1deg); }
}
@keyframes aaBdayBurst {
  0%, 100% { opacity: 0.45; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}
@keyframes aaBalloon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.aa-live-card--done .aa-live-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.15);
}
.aa-live-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-head);
  font-size: 0.92rem;
  color: #fff;
}
.aa-info-btn {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 200, 200, 0.45);
  background: rgba(0, 163, 163, 0.15);
  color: var(--teal-bright);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.78rem;
  font-style: italic;
  cursor: pointer;
  line-height: 1;
}
.aa-info-btn:hover {
  background: rgba(0, 163, 163, 0.35);
  border-color: var(--gold-mid);
  color: var(--gold);
}
.aa-live-status {
  margin: 0.45rem 0 0.2rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold-mid);
}
.aa-live-card--live .aa-live-status { color: var(--teal-bright); }
.aa-live-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}
.aa-daily-panel { padding: 0.85rem 1rem; }
.aa-daily-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text);
}
.aa-daily-list li::marker { color: var(--teal-bright); }

/* Shared profile cards: photo | body | side — edge-to-edge photo */
.aa-card--profile {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 108px;
  height: 140px;
  max-height: 140px;
  overflow: hidden;
  isolation: isolate;
  align-items: stretch;
  padding: 0;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}
.aa-card--profile:hover {
  border-color: var(--teal-bright);
  outline: none;
  box-shadow:
    0 0 0 1px var(--glow-ring),
    0 0 11px var(--glow-1),
    0 0 24px var(--glow-2),
    0 0 36px var(--glow-3),
    0 12px 28px rgba(0, 0, 0, 0.42);
  filter: saturate(1.05);
}
/* Students: edge-to-edge photo like teacher cards */
.aa-card-grid--students {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1rem;
  align-items: stretch;
  overflow: visible;
  padding: 4px; /* room for outer outline glow — not clipped */
}
.aa-card-grid--students > .aa-card--student {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.aa-card--student {
  --stu-card-min: 7.5rem;
  --stu-card-radius: var(--zen-radius, 0.85rem);
  --stu-finance-w: 10.75rem;
  --stu-finance-w-qp: 14.8rem;
  position: relative;
  display: flex;
  flex-direction: row;
  /* Same column height on every academy card; finance centers its own cluster. */
  align-items: stretch;
  height: var(--stu-card-min);
  min-height: var(--stu-card-min);
  max-height: var(--stu-card-min);
  /* Clip photo/content under the border — glow stays outside via outline */
  overflow: hidden;
  isolation: isolate;
  padding: 0 1.55rem 0 0;
  background: var(--card-bg);
  border: 1px solid rgba(0, 163, 163, 0.28);
  border-radius: var(--stu-card-radius);
  box-shadow: var(--zen-shadow-soft, 0 4px 14px rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition:
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    outline-color 0.28s ease,
    transform 0.22s ease;
}
.aa-card--student.is-menu-open {
  z-index: 30;
  overflow: visible; /* kebab menu must escape the card */
}
/* Wallet cards stay the same fixed row as monthly — no stretch / no extra finance block. */
.aa-card--student.has-wallet {
  height: var(--stu-card-min);
  min-height: var(--stu-card-min);
  max-height: var(--stu-card-min);
  align-items: stretch;
  overflow: hidden;
}
.aa-card--student.has-per-class {
  height: auto;
  max-height: none;
  align-items: flex-start;
}
.aa-card--student.has-per-class .aa-stu-photo {
  align-self: flex-start;
}
.aa-card--student.has-per-class .aa-stu-mid,
.aa-card--student.has-per-class .aa-stu-classes,
.aa-card--student.has-per-class .aa-stu-finance {
  overflow: visible;
  max-height: none;
}
.aa-card--student.is-due {
  border-color: rgba(0, 200, 200, 0.55);
}
.aa-card--student:hover,
.aa-card--student.is-selected {
  z-index: 6;
  border-color: rgba(0, 200, 200, 0.55);
  transform: translateY(-1px);
  outline: none;
  box-shadow:
    0 0 0 1px var(--glow-ring),
    var(--zen-shadow, 0 8px 24px rgba(0, 0, 0, 0.28));
  filter: none;
}
/* Photo: locked square — never stretch with card height */
.aa-card--student > .aa-stu-photo,
.aa-stu-photo {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  flex: 0 0 var(--stu-card-min);
  width: var(--stu-card-min);
  min-width: var(--stu-card-min);
  max-width: var(--stu-card-min);
  height: var(--stu-card-min);
  min-height: var(--stu-card-min);
  max-height: var(--stu-card-min);
  aspect-ratio: 1 / 1;
  align-self: center;
  /* Square cut on the right; left follows card clip */
  border-radius: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(0, 163, 163, 0.35);
  background: #0a1414;
  margin: 0;
}
.aa-stu-photo.is-editable {
  cursor: pointer;
}
.aa-stu-photo.is-editable:hover .aa-stu-photo-hint,
.aa-stu-photo.is-editable:focus-visible .aa-stu-photo-hint,
.aa-stu-photo.is-editable .aa-stu-photo-empty ~ .aa-stu-photo-hint {
  opacity: 1;
}
.aa-stu-photo.is-editable .aa-stu-photo-empty ~ .aa-stu-photo-hint {
  color: var(--teal-bright);
  background: linear-gradient(transparent, rgba(8, 13, 14, 0.92));
  letter-spacing: 0.06em;
}
.aa-stu-photo.is-uploading {
  opacity: 0.65;
  pointer-events: none;
}
.aa-stu-photo-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.35rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: #f7f4ec;
  background: linear-gradient(transparent, rgba(8, 13, 14, 0.88));
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.aa-stu-photo img,
.aa-stu-photo-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.aa-card--student > .aa-stu-photo img {
  object-fit: cover;
  object-position: center top;
}
.aa-stu-photo-empty {
  place-items: center;
  display: grid;
  font-size: 1.35rem;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--teal-bright);
  background: #0a1414;
}
.aa-stu-mid {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.4rem 0.55rem 0.4rem 0.65rem;
  justify-content: center;
  overflow: hidden;
}
/* No white strip — name in white outline chip, right after photo */
.aa-stu-name-band {
  margin: 0;
  padding: 0;
  width: auto;
  min-height: 0;
  background: none;
  box-shadow: none;
  border: 0;
}
.aa-stu-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.aa-stu-name {
  margin: 0;
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-stu-name-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
}
.aa-card[data-class-id] .aa-stu-mid {
  justify-content: center;
  gap: 0.22rem;
  padding: 0.32rem 0.5rem 0.32rem 0.55rem;
  overflow: hidden;
}
.aa-card[data-class-id] .aa-stu-name-band {
  width: 100%;
  min-width: 0;
}
.aa-card[data-class-id] .aa-stu-name-row {
  flex-wrap: nowrap;
  gap: 0.3rem;
  min-width: 0;
  padding-right: 1.25rem; /* clear kebab menu */
}
.aa-card[data-class-id] .aa-stu-name-pills {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.aa-card[data-class-id] .aa-stu-name-pills .aa-stu-name,
.aa-card[data-class-id] .aa-class-pill {
  flex: 0 1 auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  background: #080d0e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.aa-card[data-class-id] .aa-class-pill--class {
  height: 1.35rem;
  padding: 0 0.48rem;
  font-size: 0.7rem;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 58%;
}
.aa-card[data-class-id] .aa-class-pill--day {
  height: 1.2rem;
  padding: 0 0.38rem;
  font-size: 0.62rem;
  border-width: 1px;
  flex: 0 0 auto;
}
.aa-card[data-class-id] .aa-class-pill--time {
  height: 1.15rem;
  padding: 0 0.34rem;
  font-size: 0.6rem;
  border-width: 1px;
  flex: 0 0 auto;
}
.aa-card[data-class-id] .aa-stu-photo-empty {
  font-size: 1.55rem;
}
.aa-card[data-class-id] .aa-stu-classes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.12rem;
  overflow: hidden;
}
/* Small Students box pinned right — same height rhythm as student cards */
.aa-card[data-class-id] .aa-stu-finance {
  align-self: center;
  justify-content: center;
  align-items: flex-end;
  max-width: 4.75rem;
  padding: 0.28rem 0.3rem 0.28rem 0.1rem;
}
.aa-card[data-class-id] .aa-stu-due--meta {
  min-width: 0;
  width: 4.15rem;
  max-width: 4.15rem;
  padding: 0.22rem 0.28rem 0.28rem;
  border-radius: 0.32rem;
  border-width: 1px;
  gap: 0;
}
.aa-card[data-class-id] .aa-stu-due--meta .aa-stu-due-copy {
  align-items: center;
  text-align: center;
  gap: 0.05rem;
  width: 100%;
}
.aa-card[data-class-id] .aa-stu-due--meta .aa-stu-due-copy b {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.aa-card[data-class-id] .aa-stu-due--meta .aa-stu-due-copy strong {
  font-size: 1.28rem;
  line-height: 1;
}
.aa-card--class,
.aa-card[data-class-id] {
  flex-wrap: wrap;
  height: auto;
  max-height: none;
  min-height: var(--stu-card-min);
}
.aa-card--class .aa-stu-photo,
.aa-card[data-class-id] .aa-stu-photo {
  align-self: flex-start;
}
.aa-card--class .aa-stu-mid,
.aa-card--class .aa-stu-finance,
.aa-card[data-class-id] .aa-stu-mid,
.aa-card[data-class-id] .aa-stu-finance {
  min-height: var(--stu-card-min);
}
.aa-card-footer {
  flex: 1 0 100%;
  width: 100%;
  padding: 0 0.65rem 0.55rem 0.55rem;
  box-sizing: border-box;
}
.aa-class-fee-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.aa-class-fee-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
  padding: 0.4rem 0.5rem 0.42rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 163, 163, 0.5);
  background: rgba(0, 163, 163, 0.14);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.16s ease;
}
.aa-class-fee-btn b {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
  line-height: 1.15;
}
.aa-class-fee-btn strong {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.aa-class-fee-btn.is-paid {
  border-color: rgba(0, 200, 200, 0.55);
  background: rgba(0, 163, 163, 0.2);
}
.aa-class-fee-btn.is-due {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(184, 134, 11, 0.16);
}
.aa-class-fee-btn:hover {
  border-color: var(--teal-bright);
  background: rgba(0, 163, 163, 0.3);
  transform: translateY(-1px);
}
.aa-class-fee-btn.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}
.aa-class-fee-strip--detail {
  margin: 0 0 0.85rem;
}
.aa-modal--class-fees {
  width: min(880px, 100%);
}
.aa-class-fee-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 0.7rem;
}
.aa-class-fee-month strong {
  font-family: var(--font-head);
  min-width: 9.5rem;
  text-align: center;
  font-size: 1rem;
  color: var(--gold);
}
.aa-class-fee-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.aa-class-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.7rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 163, 163, 0.28);
  background: rgba(0, 163, 163, 0.08);
}
.aa-class-fee-row-main {
  flex: 1 1 auto;
  min-width: 10rem;
  width: auto;
  display: block;
  overflow: visible;
}
.aa-class-fee-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--text);
}
.aa-class-fee-line strong {
  font-family: var(--font-head);
  font-size: 0.92rem;
  color: var(--text);
}
.aa-class-fee-row .aa-stu-icon-row {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  flex-wrap: nowrap;
}
/* Teacher card: tiny C/S box (classes/students) so name has room */
.aa-card[data-teacher-id] .aa-stu-finance {
  max-width: 4.1rem;
  min-width: 3.6rem;
  padding: 0.3rem 0.25rem 0.3rem 0.1rem;
  gap: 0.22rem;
  align-self: center;
  justify-content: center;
  align-items: flex-end;
}
.aa-card[data-teacher-id] .aa-stu-mid {
  min-width: 0;
  padding-right: 0.35rem;
  justify-content: center;
}
.aa-card[data-teacher-id] .aa-stu-name {
  max-width: min(100%, 14rem);
}
.aa-card[data-teacher-id] .aa-stu-due--meta,
.aa-card[data-teacher-id] .aa-stu-due--meta-compact {
  min-width: 0;
  width: 3.55rem;
  max-width: 3.55rem;
  padding: 0.18rem 0.22rem 0.22rem;
  border-radius: 0.28rem;
  border-width: 1px;
  gap: 0;
}
.aa-card[data-teacher-id] .aa-stu-due--meta .aa-stu-due-copy {
  align-items: center;
  text-align: center;
  gap: 0.02rem;
  width: 100%;
}
.aa-card[data-teacher-id] .aa-stu-due--meta .aa-stu-due-copy b {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.aa-card[data-teacher-id] .aa-stu-due--meta .aa-stu-due-copy strong {
  font-size: 0.95rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.aa-card[data-teacher-id] .aa-stu-icon-row {
  max-width: 3.55rem;
  justify-content: center;
}
.aa-card[data-teacher-id] .aa-stu-tile {
  font-size: 0.62rem;
  padding: 0.2rem 0.35rem;
  min-width: 0;
  width: 100%;
}
.aa-stu-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.aa-stu-badge {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: #e8fffb;
  border: 1px solid rgba(0, 200, 200, 0.55);
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  background: rgba(0, 163, 163, 0.42);
  cursor: pointer;
  line-height: 1.2;
}
.aa-stu-badge--day {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(184, 134, 11, 0.16);
  cursor: default;
}
.aa-stu-badge--time {
  color: #99f6e4;
  border-color: rgba(0, 200, 200, 0.55);
  background: rgba(0, 163, 163, 0.2);
  cursor: default;
}
.aa-stu-badge:hover {
  border-color: #ffd700;
  color: #ffd700;
  background: rgba(0, 163, 163, 0.28);
}
.aa-stu-badge--day:hover,
.aa-stu-badge--time:hover {
  border-color: inherit;
  color: inherit;
  background: inherit;
}
.aa-stu-badge.is-inactive {
  color: #f0e6b8; /* lightest gold */
  border-color: rgba(240, 230, 184, 0.45);
  background: rgba(184, 134, 11, 0.14);
}
.aa-stu-classes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 0.75rem;
  max-height: none;
  overflow: hidden;
  padding-left: 0.05rem;
  min-height: 0;
}
.aa-stu-class {
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
  min-width: 0;
  line-height: 1.1;
}
.aa-stu-class strong {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.aa-stu-class em {
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 600;
  color: rgba(247, 244, 236, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aa-stu-class--paydates {
  grid-column: 1 / -1;
  gap: 0.04rem;
  margin-top: 0.08rem;
}
.aa-stu-class--paydates em {
  color: rgba(255, 215, 0, 0.88);
  font-weight: 700;
}
.aa-stu-class.is-off { opacity: 0.5; }
.aa-stu-class.is-off strong {
  text-decoration: line-through;
  color: var(--muted);
}
.aa-stu-finance {
  position: relative;
  z-index: 2;
  flex: 0 0 var(--stu-finance-w);
  width: var(--stu-finance-w);
  max-width: var(--stu-finance-w);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 0.3rem 0.2rem 0.3rem 0.2rem;
  overflow: hidden;
  align-self: stretch;
  box-sizing: border-box;
}
.aa-card--student > .aa-stu-finance {
  /* Full card height + centered cluster = same vertical position on every academy. */
  align-self: stretch;
  justify-content: center;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}
.aa-card--student.has-wallet > .aa-stu-finance {
  justify-content: center;
  gap: 0;
}
.aa-card--student.has-wallet > .aa-stu-mid {
  justify-content: center;
  overflow: hidden;
}
.aa-stu-finance-cluster {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.28rem;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.aa-card--student.has-quick-pay .aa-stu-finance {
  flex-basis: var(--stu-finance-w-qp);
  width: var(--stu-finance-w-qp);
  max-width: var(--stu-finance-w-qp);
  padding-right: 0.3rem;
}
.aa-card--student .aa-stu-finance-cluster .aa-stu-due-stack,
.aa-card--student .aa-stu-finance-cluster .aa-stu-icon-row {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}
.aa-card--student .aa-stu-finance-cluster .aa-stu-icon-row {
  justify-content: space-between;
  gap: 0.22rem;
}
/* Old overflow rail hidden — only a short Print / WA / Call / Bd row */
.aa-stu-strip,
.aa-stu-icon-rail {
  display: none !important;
}
.aa-stu-icon-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  width: 100%;
  max-width: 10.5rem;
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 0;
}
.aa-stu-due-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.3rem;
  width: 100%;
  max-width: 100%;
}
.aa-stu-due-stack:not(:has(> :nth-child(2))) {
  width: 100%;
}
.aa-stu-due {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  max-width: none;
  min-height: 2.75rem;
  height: 2.75rem;
  padding: 0.28rem 0.35rem 0.28rem 0.45rem;
  border-radius: 0.28rem;
  border: 1.5px solid #b71c1c;
  background: #c62828;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: box-shadow 0.22s ease, transform 0.18s ease, filter 0.22s ease;
}
/* Enrollment + registration split: grow enough so all 3 lines stay readable. */
.aa-card--student .aa-stu-due.has-reg-note {
  height: auto;
  min-height: 3.15rem;
  max-height: 3.45rem;
  align-items: center;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  overflow: hidden;
}
.aa-card--student .aa-stu-due.has-reg-note .aa-stu-due-copy {
  gap: 0.04rem;
}
.aa-card--student .aa-stu-due.has-reg-note .aa-stu-due-copy b {
  font-size: 0.6rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.aa-card--student .aa-stu-due.has-reg-note .aa-stu-due-copy strong {
  font-size: 1.02rem;
  line-height: 1.05;
}
.aa-card--student .aa-stu-due.has-reg-note .aa-due-reg-note {
  display: block;
  margin-top: 0;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.aa-card--student .aa-stu-due.has-reg-note .aa-stu-due-pay {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  align-self: center;
}
/* One badge look on every academy: label + amount; date stays in mid column. */
.aa-card--student .aa-stu-due-meta {
  display: none !important;
}
.aa-card--student .aa-stu-due-copy {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.06rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.aa-card--student .aa-stu-due--quickpay .aa-stu-due-copy {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.06rem;
}
.aa-card--student .aa-paid-settle {
  position: absolute;
  right: 0.22rem;
  bottom: 0.12rem;
  margin: 0 !important;
  min-height: 0;
  line-height: 1;
  pointer-events: none;
}
/* PAID + Quick pay: equal twin tiles, one fixed row height */
.aa-stu-due-stack:has(> :nth-child(2)) > .aa-stu-due,
.aa-stu-due-stack:has(> :nth-child(2)) > .aa-stu-due--paid {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 2.75rem;
  height: 2.75rem;
  gap: 0.22rem;
  padding: 0.22rem 0.28rem 0.22rem 0.35rem;
  align-items: center;
}
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-copy,
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due--quickpay .aa-stu-due-copy {
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.05rem;
}
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-copy b {
  font-size: 0.56rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
}
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-copy strong,
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-amt {
  font-size: 0.88rem !important;
  line-height: 1.1 !important;
}
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-meta {
  display: none; /* long date blows the fixed card height */
}
.aa-stu-due-stack:has(> :nth-child(2)) .aa-paid-settle {
  /* Overlay so ✓ / dots never change tile height or twin alignment. */
  position: absolute;
  right: 0.22rem;
  bottom: 0.12rem;
  margin: 0;
  min-height: 0;
  line-height: 1;
  pointer-events: none;
}
.aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-pay {
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.75rem;
  flex: 0 0 1.3rem;
  align-self: center;
}
/* Cancel on a Previous balance due badge — keep the existing ghost button readable. */
.aa-stu-due [data-legacy-cancel],
.aa-status-hero [data-legacy-cancel],
.aa-live-meta [data-legacy-cancel],
.aa-profile-facts [data-legacy-cancel] {
  flex: 0 0 auto;
  height: auto;
  min-height: 1.6rem;
  padding: 0.12rem 0.4rem;
  font-size: 0.72rem;
  line-height: 1.2;
}
.aa-stu-due [data-legacy-cancel],
.aa-status-hero--due [data-legacy-cancel] {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: transparent;
}
.aa-status-hero--prev {
  gap: 0.4rem;
}

.aa-stu-due--quickpay {
  border-color: #b71c1c;
  background: #c62828;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.aa-stu-due--quickpay .aa-stu-due-copy {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem 0.35rem;
}
.aa-stu-due--quickpay:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 14px rgba(255, 80, 80, 0.55),
    0 0 26px rgba(255, 215, 0, 0.22);
}
.aa-stu-due--quickpay .aa-stu-due-pay {
  color: #b71c1c;
  border-color: #fff;
  background: #fff;
}
.aa-stu-due--quickpay-paid {
  cursor: default;
  border-color: #1b5e20;
  background: #2e7d32;
  color: #fff;
}
.aa-stu-due--quickpay-paid:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 14px rgba(46, 125, 50, 0.65);
}
.aa-status-hero--quickpay {
  border-color: #b71c1c !important;
  background: #c62828 !important;
  color: #fff !important;
}
.aa-status-hero--quickpay-paid {
  border-color: #1b5e20 !important;
  background: #2e7d32 !important;
  color: #fff !important;
}
.aa-stu-due--quickpay .aa-paid-settle,
.aa-stu-due--quickpay-paid .aa-paid-settle,
.aa-status-hero--quickpay .aa-paid-settle,
.aa-status-hero--quickpay-paid .aa-paid-settle {
  margin-top: 0.15rem;
}
.aa-stu-due--quickpay .aa-settle-tick,
.aa-stu-due--quickpay-paid .aa-settle-tick,
.aa-status-hero--quickpay .aa-settle-tick,
.aa-status-hero--quickpay-paid .aa-settle-tick {
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.aa-stu-due--quickpay .aa-settle-dots i,
.aa-stu-due--quickpay-paid .aa-settle-dots i,
.aa-status-hero--quickpay .aa-settle-dots i,
.aa-status-hero--quickpay-paid .aa-settle-dots i {
  background: #fff;
}
.aa-stu-due:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 14px rgba(255, 80, 80, 0.55),
    0 0 26px rgba(255, 215, 0, 0.22);
}
.aa-stu-due--paid {
  cursor: default;
  border-color: #1b5e20;
  background: #2e7d32;
  color: #fff;
}
.aa-stu-due--paid:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 14px rgba(46, 125, 50, 0.65),
    0 0 26px rgba(0, 200, 200, 0.28);
}
.aa-stu-due-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}
.aa-stu-due-copy b {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.aa-due-reg-note {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1.15;
}
.aa-status-hero .aa-due-reg-note {
  color: rgba(15, 23, 42, 0.72);
}
.aa-stu-due-copy strong {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.aa-stu-due--paid .aa-stu-due-copy b { color: #fff; }
.aa-stu-due--paid .aa-stu-due-copy strong,
.aa-stu-due-meta {
  font-size: 0.72rem !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600 !important;
}
.aa-stu-due-amt {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  line-height: 1.1 !important;
}
.aa-paid-settle,
.aa-stu-due--paid .aa-paid-settle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  min-height: 1rem;
  line-height: 1;
}
.aa-settle-tick {
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.aa-settle-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  height: 0.7rem;
}
.aa-settle-dots i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #fff;
  opacity: 0.25;
  animation: aa-settle-dot 1.05s ease-in-out infinite;
}
.aa-settle-dots i:nth-child(2) {
  animation-delay: 0.18s;
}
.aa-settle-dots i:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes aa-settle-dot {
  0%,
  80%,
  100% {
    opacity: 0.22;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-0.08rem);
  }
}
.aa-status-hero--paid .aa-paid-settle {
  margin-top: 0.25rem;
}
.aa-status-hero--paid .aa-settle-tick,
.aa-status-hero--paid .aa-settle-dots i {
  color: #0c1416;
  background: #0c1416;
}
.aa-status-hero--paid .aa-settle-tick {
  background: transparent;
  color: #0c1416 !important;
  text-shadow: none;
}
html[data-theme='light'] .aa-stu-due--paid .aa-settle-tick {
  color: #fff !important;
}
html[data-theme='light'] .aa-stu-due--paid .aa-settle-dots i {
  background: #fff;
}
.aa-stu-due-pay {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.25rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: #b71c1c;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}
.aa-stu-due--paid .aa-stu-due-pay {
  color: #1b5e20;
}
/* Teacher / staff / class side panels (same frame as Due/Paid) */
.aa-stu-due--meta {
  cursor: default;
  border-color: rgba(0, 163, 163, 0.55);
  background: rgba(0, 122, 122, 0.55);
  color: #fff;
}
button.aa-stu-due--meta {
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  appearance: none;
  -webkit-appearance: none;
}
button.aa-stu-due--meta:hover {
  border-color: rgba(0, 200, 200, 0.8);
  background: rgba(0, 163, 163, 0.72);
}
.aa-stu-due--meta .aa-stu-due-copy b,
.aa-stu-due--meta .aa-stu-due-copy strong {
  color: #fff;
}
.aa-stu-due--earn {
  cursor: pointer;
  border-color: rgba(212, 175, 55, 0.7);
  background: rgba(184, 134, 11, 0.72);
  color: #fff;
}
.aa-stu-due--earn .aa-stu-due-copy b,
.aa-stu-due--earn .aa-stu-due-copy strong {
  color: #fff;
}
.aa-stu-due--earn .aa-stu-due-pay {
  color: #b8860b;
}
/* Action icons: one-line slide pages under Due/Paid (same width, animated) */
.aa-stu-strip {
  display: none !important;
}
.aa-card--student .aa-stu-finance-cluster > .aa-stu-due-stack,
.aa-card--student .aa-stu-finance-cluster > .aa-stu-icon-row {
  flex: 0 0 auto;
}
.aa-stu-icon-rail {
  width: 100%;
  max-width: 10.5rem;
}
.aa-stu-icon-viewport {
  width: 100%;
  overflow: hidden;
}
.aa-stu-icon-track {
  display: flex;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.28s ease;
  will-change: transform;
}
.aa-stu-icon-rail.is-page-1 .aa-stu-icon-track {
  transform: translateX(-50%);
}
.aa-stu-icon-page,
.aa-stu-icon-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  box-sizing: border-box;
}
.aa-stu-icon-page {
  width: 50%;
  flex: 0 0 50%;
  padding: 0;
}
.aa-stu-tile {
  display: grid;
  place-items: center;
  width: auto;
  height: 1.7rem;
  min-width: 1.7rem;
  min-height: 1.7rem;
  flex-shrink: 0;
  border-radius: 0.28rem;
  border: 1px solid rgba(8, 13, 14, 0.12);
  background: #fff;
  color: #080d0e;
  font-size: 0.58rem;
  font-weight: 800;
  font-family: var(--font-head);
  text-decoration: none;
  cursor: pointer;
  padding: 0 0.28rem;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.22s ease, transform 0.18s ease, filter 0.22s ease;
}
.aa-stu-tile--bday {
  background: #ffd700;
  border-color: rgba(184, 134, 11, 0.55);
  color: #080d0e;
}
.aa-stu-tile:hover:not(.is-off),
.aa-stu-tile:focus-visible:not(.is-off) {
  background: #fff;
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(0, 200, 200, 0.65),
    0 0 12px rgba(0, 163, 163, 0.75),
    0 0 22px rgba(255, 215, 0, 0.4);
}
.aa-stu-tile.is-off {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.aa-stu-tile--pay { background: #c4a574; }
.aa-stu-tile--more {
  background: rgba(0, 163, 163, 0.22);
  border-color: rgba(0, 200, 200, 0.55);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}
.aa-stu-icon-rail.is-page-1 .aa-stu-tile--more[data-icon-prev] {
  color: #ffd700;
}
.aa-card--student > .aa-more {
  top: 0.4rem;
  right: 0.35rem;
  transform: none;
}
.aa-card--student .aa-more-btn {
  width: 1.35rem;
  height: auto;
  min-height: 2.2rem;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: #d4af37;
  font-size: 1.15rem;
  letter-spacing: -0.06em;
  line-height: 0.55;
}
.aa-card--student .aa-more-btn:hover {
  color: #ffd700;
  text-shadow:
    0 0 8px rgba(255, 215, 0, 0.85),
    0 0 18px rgba(0, 200, 200, 0.55);
}
.aa-card--student .aa-card-side-col { padding-top: 0; }

/* Keep older profile card photo columns — fixed square, left round / right square */
.aa-card-photo-col {
  box-sizing: border-box;
  width: 140px;
  height: 140px;
  min-width: 140px;
  min-height: 140px;
  max-width: 140px;
  max-height: 140px;
  border-radius: 0.75rem 0 0 0.75rem; /* left edges round; right side square cut */
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(0, 163, 163, 0.4);
  background: #0a1414;
  flex-shrink: 0;
}
.aa-card-photo-lg {
  width: 140px;
  height: 140px;
  min-width: 140px;
  min-height: 140px;
  max-width: 140px;
  max-height: 140px;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 0;
}
.aa-card-photo-lg--empty {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  min-width: 140px;
  min-height: 140px;
  max-width: 140px;
  max-height: 140px;
  font-size: 1.45rem;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--teal-bright);
  background: #0a1414;
  border: 0;
}
.aa-card-main-col {
  min-width: 0; height: 140px; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.12rem;
  padding: 0.45rem 0.55rem 0.4rem 0.5rem;
  border-right: 1px solid rgba(0, 163, 163, 0.22);
  background: transparent;
}
.aa-card-status-col {
  height: 140px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.65rem;
  border-right: 1px solid rgba(255,255,255,.06);
  background: rgba(0, 0, 0, 0.12);
}
.aa-card-side-col {
  height: 140px; overflow: hidden;
  display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem;
  padding: 0.4rem 0.45rem;
}
.aa-card-body-col {
  min-width: 0; height: 140px; max-height: 140px; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.4rem 0.55rem 0.35rem;
}
.aa-card--profile .aa-card-title {
  margin: 0;
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-head);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: flex-start;
}
.aa-card--profile .aa-card-sub {
  margin: 0; font-size: 0.68rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aa-class-list {
  display: flex; flex-direction: column; gap: 0.12rem;
  margin-top: 0.15rem; overflow: hidden; flex: 1; min-height: 0;
}
.aa-class-line { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.aa-class-line strong {
  font-size: 0.72rem; color: #fff; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aa-class-line em {
  font-style: normal; font-size: 0.62rem; color: var(--gold-mid);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aa-class-line.is-off { opacity: 0.55; }
.aa-class-line.is-off strong { text-decoration: line-through; color: var(--muted); }
.aa-card-actions--stack {
  display: flex; flex-direction: column; gap: 0.16rem; margin: 0; padding: 0;
}
.aa-card-actions--stack .aa-btn,
.aa-card-actions--stack button {
  padding: 0.18rem 0.3rem; font-size: 0.66rem; width: 100%;
  font-weight: 650; line-height: 1.1;
}
.aa-card-status-slot {
  display: flex; justify-content: center; align-items: center; flex: 1; min-height: 0;
}
.aa-status-hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0.55rem 0.6rem; border-radius: 0.5rem; width: 100%;
  max-width: 14rem; min-height: 5.4rem; line-height: 1.05; margin: 0 auto;
  cursor: default; appearance: none; font: inherit; color: inherit;
}
button.aa-status-hero {
  cursor: pointer; border-style: solid;
}
button.aa-status-hero:hover {
  filter: brightness(1.08);
}
.aa-status-hero b {
  font-family: var(--font-head); font-size: 1.65rem; letter-spacing: 0.06em; font-weight: 800;
}
.aa-status-hero span { font-size: 1.15rem; font-weight: 800; margin-top: 0.22rem; }
.aa-status-hero--due {
  background: rgba(184, 134, 11, 0.28);
  border: 1px solid rgba(212, 175, 55, 0.65); color: var(--gold);
}
.aa-status-hero--due.is-flash, .aa-live-card.is-flash {
  animation: aaLiveFlash 1.4s ease-in-out infinite;
}
.aa-status-hero--paid {
  background: linear-gradient(145deg, #007a7a 0%, #00a3a3 100%);
  border: 1px solid #006666;
  color: #f7f4ec;
}
.aa-status-hero--paid b {
  color: #ffd700 !important;
}
.aa-status-hero--paid .aa-paid-meta {
  color: rgba(247, 244, 236, 0.95) !important;
}
html[data-theme='light'] .aa-status-hero--paid {
  background: linear-gradient(145deg, #0f766e 0%, #00a3a3 100%);
  border-color: #0f766e;
  color: #fff;
}
html[data-theme='light'] .aa-status-hero--paid b {
  color: #ffd700 !important;
}
html[data-theme='light'] .aa-status-hero--paid .aa-paid-meta {
  color: rgba(255, 255, 255, 0.95) !important;
}
.aa-card-side-col .aa-icon-row { justify-content: center; margin-top: auto; }
.aa-card-side-col .aa-icon-btn--pay {
  min-width: 2rem; height: 2rem; font-size: 0.85rem;
}
.aa-earn-btn {
  margin-top: auto; border: 1px solid rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.12); color: var(--gold);
  border-radius: 0.35rem; padding: 0.28rem 0.35rem;
  font-family: var(--font-head); font-weight: 800; font-size: 0.78rem; cursor: pointer;
}
.aa-pay-inv-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.4rem;
}
.aa-pay-inv-head em { display: block; font-style: normal; font-size: 0.75rem; color: var(--muted); margin-top: 0.12rem; }
.aa-adm-inv-line--pay .aa-adm-inv-label { color: var(--gold-mid); font-weight: 700; }
.aa-adm-inv-line--pay .aa-adm-inv-amt {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.08);
}
.aa-pay-class-check span { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.aa-pay-class-check strong { line-height: 1.25; }
.aa-card--student.is-due { border-color: rgba(212, 175, 55, 0.55); }
.aa-icon-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; }
.aa-icon-btn {
  display: inline-grid; place-items: center;
  min-width: 1.55rem; height: 1.55rem; padding: 0 0.22rem; border-radius: 0.3rem;
  border: 1px solid rgba(0, 200, 200, 0.4); background: rgba(0, 163, 163, 0.12);
  color: var(--teal-bright); text-decoration: none; font-size: 0.6rem; font-weight: 700;
  cursor: pointer; font-family: var(--font-head);
}
.aa-icon-btn.is-off { opacity: 0.35; cursor: default; pointer-events: none; }
.aa-icon-btn--receipt {
  background: rgba(0, 163, 163, 0.16); border-color: rgba(0, 200, 200, 0.5); color: var(--teal-bright);
}
.aa-icon-btn--share {
  background: rgba(255, 215, 0, 0.12); border-color: rgba(212, 175, 55, 0.5); color: var(--gold-mid);
}
.aa-fee-row-actions {
  display: flex; flex-wrap: wrap; gap: 0.22rem; align-items: center; justify-content: flex-end;
}
.aa-fee-row-actions .aa-btn {
  padding: 0.16rem 0.32rem;
  font-size: 0.62rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  min-height: 1.55rem;
  border-radius: 0.35rem;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    filter 0.2s ease;
}
.aa-fee-row-actions .aa-btn:hover,
.aa-fee-row-actions .aa-btn:focus-visible {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.06);
  box-shadow: 0 4px 12px rgba(0, 122, 122, 0.28);
  outline: none;
}
.aa-fee-row-actions .aa-btn:active {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.98);
  transition-duration: 0.12s;
}
/* Fees invoices: Print / Share stay pinned while other columns scroll */
.aa-table-wrap--sticky-actions {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.aa-table--sticky-actions {
  border-collapse: separate;
  border-spacing: 0;
}
.aa-table--sticky-actions th.aa-td-sticky-actions,
.aa-table--sticky-actions td.aa-td-sticky-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 5.6rem;
  max-width: 6.1rem;
  padding-left: 0.4rem;
  padding-right: 0.35rem;
  background: var(--surface, #0c1416);
  box-shadow: -8px 0 14px rgba(0, 0, 0, 0.28);
  vertical-align: middle;
  transition: box-shadow 0.25s ease;
}
.aa-table--sticky-actions thead th.aa-td-sticky-actions {
  z-index: 4;
  background: var(--surface, #0c1416);
}
html[data-theme='light'] .aa-table--sticky-actions th.aa-td-sticky-actions,
html[data-theme='light'] .aa-table--sticky-actions td.aa-td-sticky-actions {
  background: #ffffff;
  box-shadow: -8px 0 14px rgba(15, 23, 42, 0.1);
}
@media (max-width: 860px) {
  .aa-table--sticky-actions th.aa-td-sticky-actions,
  .aa-table--sticky-actions td.aa-td-sticky-actions {
    min-width: 5.35rem;
    max-width: 5.85rem;
  }
  .aa-table--sticky-actions .aa-fee-row-actions {
    flex-wrap: nowrap;
    gap: 0.18rem;
  }
  .aa-table--sticky-actions .aa-fee-row-actions .aa-btn {
    padding: 0.2rem 0.3rem;
    min-height: 1.65rem;
    font-size: 0.6rem;
  }
}
.aa-table tr[data-fee-id],
.aa-table tr[data-rate-id] {
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.aa-table tr.aa-pressing {
  background: rgba(0, 163, 163, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 200, 200, 0.45);
}
.aa-longpress-hint {
  font-size: 0.78rem;
  opacity: 0.85;
}
.aa-sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.aa-sheet {
  width: min(320px, 100%);
  background: #0f1719;
  border: 1px solid rgba(0, 200, 200, 0.4);
  border-radius: 0.7rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  padding: 0.85rem 0.85rem 0.7rem;
  animation: aa-sheet-in 0.16s ease;
}
.aa-sheet--anchored {
  position: fixed;
  margin: 0;
  width: min(260px, calc(100vw - 1rem));
}
.aa-sheet h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--gold-mid, #d4af37);
  font-weight: 700;
}
.aa-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.aa-sheet-btn {
  border: 1px solid rgba(0, 200, 200, 0.28);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  color: #f7f4ec;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  text-align: left;
}
.aa-sheet-btn:hover {
  background: rgba(0, 163, 163, 0.22);
  border-color: #00c8c8;
  color: #ffd700;
}
.aa-sheet-btn.danger {
  color: #ffb4a2;
  border-color: rgba(255, 120, 100, 0.45);
}
.aa-sheet-btn.danger:hover {
  background: rgba(180, 40, 30, 0.28);
  color: #ffd0c6;
}
.aa-sheet-btn.cancel {
  color: rgba(247, 244, 236, 0.65);
  font-weight: 600;
  margin-top: 0.15rem;
}
@keyframes aa-sheet-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.aa-muted-tiny { color: var(--muted); font-size: 0.75rem; }
.aa-card-side-col .aa-icon-row {
  justify-content: center; margin-top: auto; flex-wrap: wrap; gap: 0.18rem;
}
.aa-icon-btn--bday { border-color: rgba(212, 175, 55, 0.4); }
.aa-card--profile .aa-enroll-tag-wrap {
  display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.15rem 0 0; max-height: 2.5rem; overflow: hidden;
}
.aa-enroll-chip-mini {
  display: inline-block; padding: 0.12rem 0.35rem; border-radius: 0.3rem;
  border: 1px solid rgba(0, 200, 200, 0.35); background: rgba(0, 163, 163, 0.12);
  font-size: 0.65rem; font-weight: 700; color: #fff;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.aa-sal-cycle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  max-width: 100%;
}
.aa-sal-cycle .aa-input.aa-date {
  width: 8.25rem !important;
  max-width: 8.25rem !important;
  min-width: 7rem !important;
  text-align: left !important;
  padding: 0.35rem 0.3rem !important;
  font-size: 0.78rem !important;
}
.aa-sal-cycle-sep {
  color: var(--gold-mid, #d4af37);
  font-weight: 700;
  flex-shrink: 0;
}
.aa-adm-inv-line--cycle {
  align-items: center;
}
#salPayDate.aa-adm-inv-amt {
  width: 8.25rem !important;
  max-width: 8.25rem !important;
  text-align: left !important;
}
.aa-pay-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.55rem;
}
.aa-pay-top strong { font-family: var(--font-head); color: var(--gold-mid); font-size: 1rem; }
.aa-pay-dates {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 0 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(0, 163, 163, 0.45);
  background: var(--surface, #0f1719);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.aa-pay-dates .aa-label,
.aa-pay-dates .aa-pay-date-field,
.aa-pay-dates .aa-pay-date-label,
.aa-pay-dates .aa-pay-date-req {
  color: var(--gold-mid, #d4af37) !important;
}
.aa-pay-dates .aa-pay-date-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  margin: 0 0 0.25rem;
}
.aa-pay-dates .aa-pay-date-req {
  font-weight: 800;
  color: var(--gold, #ffd700) !important;
}
.aa-pay-dates .aa-input.aa-date {
  min-height: 2.55rem;
  background: var(--input-bg, rgba(8, 13, 14, 0.85));
  color: var(--text, #f7f4ec);
  border-color: var(--border, rgba(0, 200, 200, 0.35));
  color-scheme: inherit;
}
/* Light theme: no black plate — match modal surface so labels stay readable. */
html[data-theme='light'] .aa-pay-dates {
  background: #f1f5f9;
  border: 1px solid rgba(15, 118, 110, 0.35);
  box-shadow: none;
}
html[data-theme='light'] .aa-pay-dates label,
html[data-theme='light'] .aa-pay-dates .aa-label,
html[data-theme='light'] .aa-pay-dates .aa-pay-date-field,
html[data-theme='light'] .aa-pay-dates .aa-pay-date-label,
html[data-theme='light'] .aa-pay-dates .aa-pay-date-label span {
  color: #0f766e !important;
}
html[data-theme='light'] .aa-pay-dates .aa-pay-date-req {
  color: #b45309 !important;
}
html[data-theme='light'] .aa-pay-dates .aa-input.aa-date {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.22) !important;
  color-scheme: light;
}
.aa-pay-class-lines {
  display: grid; gap: 0.55rem; margin: 0.5rem 0; max-height: min(48vh, 420px); overflow: auto;
}
.aa-pay-class-line {
  padding: 0.55rem 0.65rem; border-radius: 0.5rem;
  border: 1px solid rgba(0, 200, 200, 0.28); background: rgba(0, 163, 163, 0.08);
}
.aa-pay-class-check { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.88rem; }
.aa-pay-class-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.4rem;
}
.aa-card--profile,
.aa-card--student {
  position: relative;
}
.aa-more {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 5;
}
.aa-more.is-open {
  z-index: 80;
}
.aa-more-btn {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 200, 200, 0.45);
  background: rgba(8, 13, 14, 0.72);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 800;
}
.aa-more-menu {
  position: absolute;
  top: calc(100% + 0.2rem);
  right: 0;
  min-width: 10.5rem;
  max-height: min(70vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  background: #0f1719;
  border: 1px solid rgba(0, 200, 200, 0.4);
  border-radius: 0.45rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  z-index: 90;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.2, 0.85, 0.25, 1);
  pointer-events: none;
}
.aa-more-menu.is-open-anim {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.aa-more-menu[hidden] { display: none !important; }
.aa-more-item {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-radius: 0.3rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
}
.aa-more-item:hover { background: rgba(0, 163, 163, 0.2); }
.aa-more-item--danger { color: #ff8f8f; }
.aa-icon-btn--lg {
  min-width: 2.05rem !important;
  height: 2.05rem !important;
  font-size: 0.78rem !important;
  border-radius: 0.4rem;
}
.aa-icon-row--lg { gap: 0.32rem !important; }
.aa-status-hero b {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.15;
  max-width: 100%;
}
.aa-status-hero--paid .aa-paid-meta,
.aa-paid-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(247, 244, 236, 0.85);
  line-height: 1.25;
}
.aa-status-filter {
  display: inline-flex;
  gap: 0.3rem;
  margin-right: 0.35rem;
}
.aa-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(0, 200, 200, 0.35);
  background: rgba(0, 163, 163, 0.08);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.18s ease;
}
.aa-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #ffd700;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.aa-chip-btn.is-on .aa-chip-count {
  background: rgba(0, 200, 200, 0.22);
  border-color: rgba(0, 200, 200, 0.55);
  color: var(--teal-bright, #00c8c8);
}
html[data-theme='light'] .aa-chip-count {
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400e;
}
html[data-theme='light'] .aa-chip-btn.is-on .aa-chip-count {
  background: rgba(15, 118, 110, 0.14);
  border-color: rgba(15, 118, 110, 0.4);
  color: #0f766e;
}
.aa-chip-btn:hover {
  color: var(--teal-bright);
  border-color: rgba(0, 220, 220, 0.8);
  transform: translateY(-1px);
  box-shadow:
    0 0 10px rgba(0, 163, 163, 0.55),
    0 0 20px rgba(255, 215, 0, 0.25);
}
.aa-chip-btn.is-on {
  background: rgba(0, 163, 163, 0.28);
  border-color: rgba(0, 200, 200, 0.7);
  color: var(--teal-bright);
  box-shadow:
    0 0 8px rgba(0, 163, 163, 0.4),
    0 0 16px rgba(0, 200, 200, 0.22);
}
.aa-share-pop {
  position: fixed;
  z-index: 80;
  min-width: 12rem;
  background: #0f1719;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
}
.aa-share-pop button {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 0.35rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.84rem;
}
.aa-share-pop button:hover { background: rgba(255, 215, 0, 0.12); color: var(--gold); }
.aa-due-panel { margin: 0.65rem 0 1rem; }
.aa-due-click { cursor: pointer; }
.aa-due-click:hover { outline: 1px solid rgba(212, 175, 55, 0.55); }
.aa-fee-mini-dash {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem; margin-bottom: 0.75rem; align-items: stretch;
}
.aa-fee-mini-dash .aa-btn { align-self: center; }
.aa-account { display: flex; flex-direction: column; gap: 0.85rem; }
.aa-account-head {
  display: flex; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap;
}
.aa-account-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--text);
}
.aa-account-tabs {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}
.aa-account-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 0.4rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.86rem;
}
.aa-account-tab.is-on {
  color: var(--teal-bright);
  border-color: rgba(0, 200, 200, 0.45);
  background: rgba(0, 163, 163, 0.14);
}
.aa-account-panel {
  background: rgba(12, 20, 22, 0.55);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.9rem 1rem;
}
.aa-account-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.aa-account-row:last-child { border-bottom: 0; }
.aa-account-row strong { display: block; font-family: var(--font-head); }
.aa-account-row span { color: var(--muted); font-size: 0.8rem; }
.aa-account-student-link {
  color: inherit;
  text-decoration: none;
}
.aa-account-student-link:hover strong,
.aa-account-student-link:focus strong {
  color: var(--brand, #00a3a3);
  text-decoration: underline;
}
.aa-receipt-head,
.aa-receipt-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(7rem, 1.2fr) minmax(6rem, 0.9fr) 5.5rem minmax(7rem, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}
.aa-receipt-head {
  padding: 0.35rem 0 0.55rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.22);
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.aa-receipt-row {
  justify-content: initial;
}
.aa-receipt-row .aa-rc-date,
.aa-receipt-row .aa-rc-class,
.aa-receipt-row .aa-rc-account,
.aa-receipt-row .aa-rc-amt,
.aa-receipt-row .aa-rc-inv {
  color: var(--text);
  font-size: 0.88rem;
}
.aa-receipt-row .aa-rc-account {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.8rem;
}
.aa-receipt-row .aa-rc-amt {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold);
}
.aa-hx-pay-note {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.aa-receipt-row .aa-rc-inv {
  font-family: var(--font-body);
  word-break: break-all;
  color: var(--muted);
}
.aa-receipt-row .aa-fee-row-actions {
  justify-self: end;
}
.aa-history-head,
.aa-history-row {
  grid-template-columns: 7.5rem minmax(8rem, 1.4fr) 5.5rem minmax(7rem, 1fr);
}
@media (max-width: 720px) {
  .aa-receipt-head { display: none; }
  .aa-receipt-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "date amt"
      "class class"
      "account account"
      "inv actions";
  }
  .aa-history-row {
    grid-template-areas:
      "date amt"
      "class class"
      "inv inv";
  }
  .aa-receipt-row .aa-rc-date { grid-area: date; }
  .aa-receipt-row .aa-rc-class { grid-area: class; font-weight: 600; }
  .aa-receipt-row .aa-rc-account { grid-area: account; }
  .aa-receipt-row .aa-rc-amt { grid-area: amt; text-align: right; }
  .aa-receipt-row .aa-rc-inv { grid-area: inv; }
  .aa-receipt-row .aa-fee-row-actions { grid-area: actions; justify-self: end; }
}
.aa-account-status-wrap .aa-status-hero {
  min-height: auto;
  max-width: 16rem;
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.55rem;
}
.aa-profile-shell { display: flex; flex-direction: column; gap: 0.85rem; }
.aa-profile-top { display: flex; align-items: flex-start; gap: 0.65rem; }
.aa-profile-back {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}
.aa-profile-card {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(200px, 240px) minmax(280px, 1fr);
  gap: 0.85rem 1.35rem;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.9rem 1.15rem 0.85rem;
  background: rgba(8, 13, 14, 0.72);
}
.aa-profile-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}
.aa-profile-photo .aa-detail-photo-box.aa-stu-photo,
.aa-profile-photo .aa-stu-photo {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  height: 168px;
  min-height: 168px;
  aspect-ratio: 1 / 1;
  flex: 0 0 168px;
  border-radius: 0.7rem;
}
.aa-profile-tools .aa-stu-icon-row {
  justify-content: flex-start;
  width: auto;
  max-width: none;
  gap: 0.4rem;
}
.aa-profile-tools .aa-stu-tile {
  width: 2.45rem;
  height: 2.45rem;
  min-width: 2.45rem;
  min-height: 2.45rem;
  border-radius: 0.45rem;
  padding: 0;
}
.aa-profile-tools .aa-stu-tile svg {
  width: 1.15rem;
  height: 1.15rem;
}
.aa-profile-id {
  padding-left: 0.35rem;
  padding-top: 0.15rem;
}
.aa-profile-photo .aa-stu-photo img,
.aa-profile-photo .aa-stu-photo-empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aa-profile-name {
  margin: 0 0 0.8rem;
  font-family: var(--font-head);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--text);
}
.aa-profile-id .aa-status-hero { max-width: 100%; }
.aa-profile-facts .aa-card-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
}
.aa-profile-facts .aa-card-row span { color: var(--muted); }
.aa-profile-facts .aa-card-row strong { font-weight: 600; text-align: right; }
.aa-profile-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.aa-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  padding: 0.1rem 0.15rem 0.2rem;
}
.aa-profile-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.15rem 0;
}
.aa-profile-tab.is-on { color: var(--text); }
.aa-att-head,
.aa-att-row {
  grid-template-columns: 8rem 6rem minmax(8rem, 1fr) 6rem;
}
@media (max-width: 900px) {
  .aa-profile-card { grid-template-columns: 1fr; }
  .aa-profile-photo .aa-detail-photo-box.aa-stu-photo,
  .aa-profile-photo .aa-stu-photo {
    width: 168px;
    max-width: 168px;
    min-width: 168px;
    height: 168px;
    min-height: 168px;
  }
}
html[data-theme='light'] .aa-profile-card {
  background: var(--surface);
  color: var(--text);
}
html[data-theme='light'] .aa-profile-facts .aa-card-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
html[data-theme='light'] .aa-account-panel,
html[data-theme='light'] .aa-detail-section,
html[data-theme='light'] h3.aa-detail-section,
html[data-theme='light'] .aa-stu-home-card,
html[data-theme='light'] .aa-exp-card,
html[data-theme='light'] .aa-module-row,
html[data-theme='light'] .aa-profile-back,
html[data-theme='light'] .aa-more-btn,
html[data-theme='light'] .aa-stu-search {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme='light'] h3.aa-detail-section,
html[data-theme='light'] .aa-detail-section h3,
html[data-theme='light'] .aa-stu-home-card h3,
html[data-theme='light'] .aa-stu-home-card h4 {
  color: #0f172a !important;
  background: #f8fafc;
}
html[data-theme='light'] .aa-account-row,
html[data-theme='light'] .aa-receipt-row,
html[data-theme='light'] .aa-receipt-row .aa-rc-date,
html[data-theme='light'] .aa-receipt-row .aa-rc-class,
html[data-theme='light'] .aa-receipt-row .aa-rc-inv,
html[data-theme='light'] .aa-hx-pay-note,
html[data-theme='light'] .aa-stu-home-row,
html[data-theme='light'] .aa-enroll-chip-main strong,
html[data-theme='light'] .aa-enroll-chip-main span,
html[data-theme='light'] .aa-profile-name,
html[data-theme='light'] .aa-profile-facts .aa-card-row strong,
html[data-theme='light'] .aa-profile-facts .aa-card-row span {
  color: #0f172a !important;
}
html[data-theme='light'] .aa-receipt-head,
html[data-theme='light'] .aa-stu-home-head,
html[data-theme='light'] .aa-receipt-row .aa-rc-amt,
html[data-theme='light'] .aa-stu-home-row .aa-rc-amt {
  color: #9a3412 !important;
}
html[data-theme='light'] .aa-account-row,
html[data-theme='light'] .aa-stu-home-row,
html[data-theme='light'] .aa-profile-facts .aa-card-row {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
html[data-theme='gradient'] .aa-account-panel,
html[data-theme='dark'] .aa-account-panel,
html[data-theme='brand'] .aa-account-panel,
html[data-theme='gradient'] .aa-receipt-row .aa-rc-date,
html[data-theme='dark'] .aa-receipt-row .aa-rc-date,
html[data-theme='brand'] .aa-receipt-row .aa-rc-date,
html[data-theme='gradient'] .aa-receipt-row .aa-rc-class,
html[data-theme='dark'] .aa-receipt-row .aa-rc-class,
html[data-theme='brand'] .aa-receipt-row .aa-rc-class,
html[data-theme='gradient'] h3.aa-detail-section,
html[data-theme='dark'] h3.aa-detail-section,
html[data-theme='brand'] h3.aa-detail-section {
  color: #f7f4ec !important;
}
html[data-theme='gradient'] .aa-receipt-head,
html[data-theme='dark'] .aa-receipt-head,
html[data-theme='brand'] .aa-receipt-head,
html[data-theme='gradient'] .aa-receipt-row .aa-rc-amt,
html[data-theme='dark'] .aa-receipt-row .aa-rc-amt,
html[data-theme='brand'] .aa-receipt-row .aa-rc-amt {
  color: #ffd700 !important;
}
.aa-hx-flag {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.aa-hx-flag.is-due { color: #ff6b6b; font-weight: 800; }
.aa-hx-flag.is-settled { color: var(--gold); }
.aa-rc-inv.aa-hx-flag.is-due {
  color: #ff6b6b;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.aa-card--profile .aa-card-side-col { padding-top: 1.6rem; }

@media (max-width: 1100px) {
  .aa-card-grid--students {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .aa-card--student,
  .aa-card--student.has-wallet {
    --stu-card-min: 6.25rem;
    height: var(--stu-card-min);
    min-height: var(--stu-card-min);
    max-height: var(--stu-card-min);
    flex-wrap: nowrap;
    padding: 0 1.4rem 0 0;
    overflow: hidden;
  }
  .aa-card--student.has-per-class {
    height: auto;
    max-height: none;
  }
  .aa-card--student > .aa-stu-photo,
  .aa-stu-photo {
    border-radius: 0;
    flex: 0 0 var(--stu-card-min);
    width: var(--stu-card-min);
    min-width: var(--stu-card-min);
    max-width: var(--stu-card-min);
    height: var(--stu-card-min);
    min-height: var(--stu-card-min);
    max-height: var(--stu-card-min);
    align-self: center;
    aspect-ratio: 1 / 1;
  }
  .aa-stu-mid {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.3rem 0.45rem 0.3rem 0.5rem;
    padding-right: 1.4rem;
    overflow: hidden;
  }
  .aa-stu-name-band { margin: 0; width: auto; }
  .aa-stu-finance {
    flex: 0 0 var(--stu-finance-w);
    width: var(--stu-finance-w);
    max-width: var(--stu-finance-w);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 0.3rem 0.15rem;
    border-top: 0;
  }
  .aa-card--student.has-quick-pay .aa-stu-finance {
    flex-basis: var(--stu-finance-w-qp);
    width: var(--stu-finance-w-qp);
    max-width: var(--stu-finance-w-qp);
  }
  .aa-stu-name { font-size: 0.88rem; }
  .aa-stu-classes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .aa-card--profile {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }
  .aa-card-photo-col, .aa-card-photo-lg, .aa-card-photo-lg--empty {
    width: 100%;
    height: 11rem;
    min-height: 11rem;
    max-height: 11rem;
  }
  .aa-card-main-col,
  .aa-card-status-col,
  .aa-card-side-col,
  .aa-card-body-col {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .aa-status-hero { min-height: 0; padding: 0.35rem 0.4rem; max-width: none; width: 100%; }
  .aa-status-hero b { font-size: 1.2rem; }
  .aa-status-hero span { font-size: 0.9rem; }
  .aa-card-actions--stack .aa-btn,
  .aa-card-actions--stack button { font-size: 0.68rem; padding: 0.22rem 0.4rem; }
  .aa-card--profile .aa-card-title { font-size: 0.95rem; }
  .aa-stu-tile { width: 1.85rem; height: 1.85rem; }
}


/* ===== Attendance mark ===== */
.aa-att-mark {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.aa-att-controls { margin-bottom: 0.75rem; }
.aa-att-controls.aa-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.aa-att-controls > .aa-date-field {
  width: 100%;
  max-width: none;
}
.aa-att-field-stack {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}
.aa-att-field-stack > .aa-label {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  transition: flex 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.aa-att-field-stack > .aa-label .aa-input,
.aa-att-field-stack > .aa-label .aa-select {
  width: 100%;
  min-width: 0;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}
/* Focused field grows a little; sibling shrinks — outer stack width stays fixed */
.aa-att-field-stack:focus-within > .aa-label:focus-within {
  flex: 1.55 1 0;
}
.aa-att-field-stack:focus-within > .aa-label:not(:focus-within) {
  flex: 0.7 1 0;
}
.aa-att-field-stack > .aa-label:focus-within .aa-input,
.aa-att-field-stack > .aa-label:focus-within .aa-select {
  border-color: color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 65%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 22%, transparent);
}
.aa-att-suggest { position: relative; }
.aa-att-suggest-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% - 0.05rem);
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 0.2rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 163, 163, 0.45);
  background: var(--bg-lift, #0c1416);
  color: var(--text, #f7f4ec);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.aa-att-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0.4rem 0.55rem;
  font-family: "Open Sans", Helvetica Neue, Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.aa-att-suggest-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.05rem;
}
.aa-att-suggest-text strong {
  font-weight: 700;
  line-height: 1.25;
}
.aa-att-suggest-item small {
  display: block;
  margin-top: 0;
  font-family: "Open Sans", Helvetica Neue, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.75;
}
.aa-att-list-photo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(0, 163, 163, 0.45);
  background: #0f1719;
}
.aa-att-list-photo--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}
.aa-att-row-name {
  min-width: 0;
  line-height: 1.25;
}
html[data-theme='light'] .aa-att-list-photo {
  background: #e2e8f0;
  border-color: rgba(15, 118, 110, 0.4);
}
html[data-theme='light'] .aa-att-list-photo--empty {
  color: #b8860b;
}
.aa-att-suggest-item:hover,
.aa-att-suggest-item.is-on {
  background: rgba(0, 163, 163, 0.18);
}
html[data-theme='light'] .aa-att-suggest-list {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}
html[data-theme='light'] .aa-att-suggest-item,
html[data-theme='light'] .aa-att-suggest-item small {
  color: #0f172a !important;
}
html[data-theme='light'] .aa-att-suggest-item:hover,
html[data-theme='light'] .aa-att-suggest-item.is-on {
  background: rgba(15, 118, 110, 0.12);
}
.aa-att-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.aa-att-hint { margin: 0 0 0.65rem; font-size: 0.85rem; }
.aa-att-roster { margin-bottom: 0.75rem; }
.aa-att-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem 0.75rem;
}
.aa-att-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}
.aa-att-row .aa-att-list-photo {
  width: 40px;
  height: 40px;
}
.aa-att-row:hover {
  box-shadow:
    0 0 0 1px var(--glow-ring),
    0 0 10px var(--glow-1);
}
.aa-att-row input { accent-color: var(--teal); width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.aa-att-row span { min-width: 0; word-break: break-word; }
.aa-att-row[hidden] { display: none !important; }
.aa-att-history { margin-top: 0.5rem; }
.aa-att-hist-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}
.aa-att-hist-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.aa-att-hist-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: flex-end;
}
.aa-att-hist-fields .aa-label {
  margin: 0;
  min-width: 140px;
  flex: 1 1 160px;
}
.aa-att-hist-fields #aaAttHistPeriodInputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: flex-end;
}
.aa-att-hist-fields #aaAttHistSearch {
  flex: 0 0 auto;
}
.aa-att-hist-batches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}
.aa-att-hist-batch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 163, 163, 0.35);
  background: var(--card-bg, #0c1416);
  color: var(--text, #f7f4ec);
  text-align: left;
  cursor: pointer;
  font-family: "Open Sans", Helvetica Neue, Arial, sans-serif;
}
.aa-att-hist-batch:hover {
  border-color: #00a3a3;
  box-shadow: 0 0 0 1px rgba(0, 163, 163, 0.35);
}
.aa-att-hist-batch-name {
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}
.aa-att-hist-batch-count {
  color: #00c8c8;
  font-size: 0.84rem;
  font-weight: 700;
}
.aa-att-hist-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.aa-att-hist-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}
.aa-att-hist-person,
.aa-att-hist-student-card {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--card-bg, #0c1416);
}
button.aa-att-hist-person {
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
button.aa-att-hist-person:hover {
  border-color: #00a3a3;
  box-shadow: 0 0 0 1px rgba(0, 163, 163, 0.35);
}
.aa-att-hist-person-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.aa-att-hist-person-meta strong,
.aa-att-hist-student-card strong {
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
}
.aa-att-hist-person-meta small,
.aa-att-hist-student-card .aa-muted {
  font-size: 0.78rem;
  opacity: 0.8;
}
.aa-att-hist-photo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(0, 163, 163, 0.45);
  background: #0f1719;
}
.aa-att-hist-photo--lg {
  width: 72px;
  height: 72px;
}
.aa-att-hist-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-weight: 700;
}
.aa-att-hist-student-card {
  margin-bottom: 0.85rem;
}
.aa-stu-att-summary {
  margin-top: 0.35rem;
}
.aa-stu-att-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.aa-stu-att-empty {
  margin: 0.85rem 0;
  padding: 0.85rem 1rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 163, 163, 0.35);
  background: rgba(0, 163, 163, 0.08);
}
.aa-account-panel .aa-att-cal-year,
.aa-account-panel .aa-att-cal-month {
  margin-top: 0.35rem;
}
.aa-att-cal-weekdays span {
  color: var(--muted, rgba(247, 244, 236, 0.72));
  font-weight: 700;
  opacity: 1;
}
.aa-att-cal-cell {
  color: var(--text, #f7f4ec);
  font-weight: 700;
}
html[data-theme='light'] .aa-att-cal-weekdays span {
  color: #334155 !important;
  opacity: 1;
}
html[data-theme='light'] .aa-att-cal-cell {
  background: #e2eef0;
  color: #0f172a !important;
}
html[data-theme='light'] .aa-att-cal-cell.is-present {
  background: #00a3a3 !important;
  color: #ffffff !important;
}
html[data-theme='light'] .aa-stu-att-empty {
  color: #0f172a;
  background: #ecfeff;
  border-color: rgba(15, 118, 110, 0.35);
}
.aa-att-cal-year {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.aa-att-cal-month {
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.65rem 0.7rem 0.8rem;
  background: var(--card-bg, #0c1416);
  color: var(--text, #f7f4ec);
}
.aa-att-cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}
.aa-att-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}
.aa-att-cal-nav .aa-att-cal-title {
  flex: 1 1 auto;
  text-align: center;
}
.aa-att-cal-nav-btn {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 215, 0, 0.45);
  background: rgba(0, 163, 163, 0.12);
  color: #ffd700;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
}
.aa-att-cal-nav-btn:hover {
  border-color: #00c8c8;
  background: rgba(0, 163, 163, 0.28);
  color: #f7f4ec;
}
.aa-att-cal-title {
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 0.95rem;
  color: #ffd700;
}
.aa-att-cal-total {
  margin: 0;
  font-family: "Open Sans", Helvetica Neue, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00c8c8;
}
.aa-att-cal-weekdays,
.aa-att-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}
.aa-att-cal-weekdays {
  margin-bottom: 0.25rem;
}
.aa-att-cal-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.7;
}
.aa-att-cal-cell {
  min-height: 2.25rem;
  border-radius: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: "Open Sans", Helvetica Neue, Arial, sans-serif;
  background: rgba(247, 244, 236, 0.06);
  color: var(--text, #f7f4ec);
  border: 1px solid transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.aa-att-cal-cell:disabled {
  cursor: default;
  opacity: 1;
}
.aa-att-cal-cell.is-empty { background: transparent; border-color: transparent; }
.aa-att-cal-cell.is-present {
  background: #00a3a3;
  border-color: #007a7a;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 163, 163, 0.35);
  cursor: pointer;
}
.aa-att-cal-cell.is-present:hover {
  filter: brightness(1.08);
}
.aa-att-cal-cell.is-selected {
  outline: 2px solid #ffd700;
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.45);
}
.aa-att-cal-month {
  position: relative;
}
.aa-att-cal-month.is-open {
  z-index: 3;
}
.aa-att-cal-pop {
  margin-top: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 163, 163, 0.45);
  background: rgba(0, 163, 163, 0.14);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.aa-att-cal-pop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
}
.aa-att-cal-pop-head strong {
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 0.92rem;
}
.aa-att-cal-pop-head span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-bright, #00c8c8);
}
.aa-att-cal-pop-x {
  margin-left: auto;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 13, 14, 0.12);
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.aa-att-cal-day-hint { margin: 0; }
html[data-theme='light'] .aa-att-cal-pop {
  background: #ecfeff;
  border-color: rgba(15, 118, 110, 0.4);
  color: #0f172a;
}
html[data-theme='light'] .aa-att-cal-pop-head span {
  color: #0f766e;
}
html[data-theme='light'] .aa-att-cal-pop-x {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
.aa-att-cal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: #ffd700;
  color: #080d0e;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
}
.aa-att-hist-day-block {
  margin-top: 0.75rem;
}
.aa-att-hist-day-block h4 {
  margin: 0 0 0.4rem;
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  font-size: 0.92rem;
}
.aa-att-hist-day-batches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.aa-att-hist-chip {
  display: inline-block;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #b8860b;
  background: #ffd700;
  color: #080d0e;
  font-size: 0.78rem;
  font-weight: 700;
}
html[data-theme='light'] .aa-att-hist-batch,
html[data-theme='light'] .aa-att-hist-person,
html[data-theme='light'] .aa-att-hist-student-card,
html[data-theme='light'] .aa-att-cal-month {
  background: #fff;
  color: #0f172a;
}
html[data-theme='light'] .aa-att-cal-title {
  color: #b8860b;
}
html[data-theme='light'] .aa-att-cal-nav-btn {
  color: #007a7a;
  border-color: rgba(0, 122, 122, 0.4);
  background: #fff;
}
html[data-theme='light'] .aa-att-cal-nav-btn:hover {
  color: #080d0e;
  border-color: #00a3a3;
  background: #e7fffb;
}
html[data-theme='light'] .aa-att-cal-total {
  color: #007a7a;
}
html[data-theme='light'] .aa-att-cal-cell {
  background: #eef5f5;
  color: #0f172a;
}
html[data-theme='light'] .aa-att-cal-cell.is-present {
  background: #00a3a3;
  border-color: #007a7a;
  color: #ffffff;
}
html[data-theme='light'] .aa-att-cal-mark {
  background: #ffd700;
  color: #080d0e;
}
html[data-theme='light'] .aa-att-hist-chip {
  background: #ffd700;
  border-color: #b8860b;
  color: #080d0e;
}
html[data-theme='dark'] .aa-att-cal-cell.is-present,
html[data-theme='brand'] .aa-att-cal-cell.is-present,
html[data-theme='gradient'] .aa-att-cal-cell.is-present {
  background: #00a3a3;
  border-color: #00c8c8;
  color: #ffffff;
}
html[data-theme='dark'] .aa-att-cal-mark,
html[data-theme='brand'] .aa-att-cal-mark,
html[data-theme='gradient'] .aa-att-cal-mark {
  background: #ffd700;
  color: #080d0e;
}
html[data-theme='gradient'] .aa-att-row,
html[data-theme='dark'] .aa-att-row,
html[data-theme='brand'] .aa-att-row {
  color: #f7f4ec !important;
}
html[data-theme='light'] .aa-att-row {
  color: #0f172a !important;
  background: #fff;
}

/* ===== Face scan attendance ===== */
.aa-att-face-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}
.aa-att-face-btn {
  min-width: 8.5rem;
  font-weight: 700;
}
.aa-att-face-note { font-size: 0.85rem; }
.aa-face-modal { max-width: 28rem; width: min(96vw, 28rem); }
.aa-face-stage {
  position: relative;
  margin: 0.75rem auto;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #0a0a0a;
  aspect-ratio: 1 / 1;
  width: min(100%, 22rem);
}
.aa-face-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.aa-face-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.aa-face-status { margin: 0.25rem 0 0; font-size: 0.88rem; }
.aa-face-match {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.aa-face-match-photo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 0.4rem;
  object-fit: cover;
  border: 1px solid var(--border);
}
.aa-face-match-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.aa-face-match-meta strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--text); }
.aa-face-class-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.aa-face-class-btn {
  width: 100%;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}
html[data-theme='light'] .aa-face-match-meta strong { color: #0f172a !important; }
html[data-theme='gradient'] .aa-face-match-meta strong,
html[data-theme='dark'] .aa-face-match-meta strong,
html[data-theme='brand'] .aa-face-match-meta strong {
  color: #f7f4ec !important;
}

.aa-face-success { text-align: center; padding: 0.35rem 0 0.25rem; }
.aa-face-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0.25rem auto 0.55rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--teal) 28%, transparent);
  border: 2px solid var(--teal-bright);
  color: var(--teal-bright);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
}
.aa-face-success-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--text);
}
.aa-face-success-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0 0.35rem;
  text-align: left;
}
.aa-face-success-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.aa-face-success-meta strong { color: var(--text); font-size: 0.95rem; }
.aa-face-success-note { margin: 0.55rem 0 0; font-size: 0.85rem; }
.aa-face-select-all {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.65rem 0 0.4rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}
.aa-face-class-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
  text-align: left;
}
.aa-face-class-check input { margin-top: 0.15rem; accent-color: var(--teal); }
.aa-att-prompt-modal { width: min(560px, 100%); }
.aa-att-float {
  position: fixed;
  z-index: 80;
  top: 4.6rem;
  right: 1.1rem;
  width: min(420px, calc(100vw - 1.4rem));
  max-height: min(78vh, 36rem);
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.85rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(0, 163, 163, 0.45);
  background: #0c1416;
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(0, 200, 200, 0.2),
    0 0 28px rgba(0, 163, 163, 0.28),
    0 24px 56px rgba(0, 0, 0, 0.55);
}
.aa-att-float.is-parked { display: none; }
.aa-att-float,
.aa-att-float h2,
.aa-att-float .aa-face-select-all { color: #f7f4ec; }
.aa-att-float .aa-muted { color: rgba(247, 244, 236, 0.78) !important; }
.aa-att-float-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.aa-att-float-head h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.aa-att-float.is-dragging .aa-att-float-head { cursor: grabbing; }
.aa-att-float-x {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #f7f4ec;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.aa-att-float-x:hover { background: rgba(255, 215, 0, 0.16); color: #ffd700; }
.aa-att-float .aa-att-prompt-list { max-height: min(42vh, 22rem); }
.aa-att-prompt-list {
  max-height: min(52vh, 28rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.aa-att-prompt-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
}
.aa-att-prompt-row input { accent-color: var(--teal); flex: 0 0 auto; }
.aa-att-prompt-photo {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.35rem;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.aa-att-prompt-row strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
}
.aa-att-prompt-row span { min-width: 0; }
html[data-theme='gradient'] .aa-face-success-title,
html[data-theme='dark'] .aa-face-success-title,
html[data-theme='brand'] .aa-face-success-title,
html[data-theme='gradient'] .aa-face-success-meta strong,
html[data-theme='dark'] .aa-face-success-meta strong,
html[data-theme='brand'] .aa-face-success-meta strong {
  color: #f7f4ec !important;
}
html[data-theme='light'] .aa-face-success-title,
html[data-theme='light'] .aa-face-success-meta strong {
  color: #0f172a !important;
}
.aa-face-back-cam { width: 100%; margin-top: 0.85rem; font-weight: 700; }

.aa-attcam-toggle {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.aa-attcam-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--teal); }

.aa-stu-badge--att {
  cursor: default;
}
.aa-stu-badge--att:hover {
  border-color: rgba(0, 200, 200, 0.55);
  color: #e8fffb;
  background: rgba(0, 163, 163, 0.42);
}

.aa-stu-class-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}
.aa-stu-class-head .aa-stu-badge--att {
  flex-shrink: 0;
}

/* White theme: dark text on every light surface. Solid chips keep light text. */
html[data-theme='light'] .aa-live-card,
html[data-theme='light'] .aa-batch-card,
html[data-theme='light'] .aa-sheet,
html[data-theme='light'] .aa-share-pop,
html[data-theme='light'] .aa-att-float,
html[data-theme='light'] .aa-pay-summary,
html[data-theme='light'] .aa-adm-fee-card,
html[data-theme='light'] .aa-adm-seg {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}
html[data-theme='light'] .aa-live-card--upcoming {
  background: #fff7ed;
  border-color: rgba(154, 52, 18, 0.45);
}
html[data-theme='light'] .aa-live-card--live {
  background: #f0fdfa;
  border-color: rgba(15, 118, 110, 0.45);
}
html[data-theme='light'] .aa-live-card--done {
  background: #f8fafc;
  opacity: 1;
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme='light'] .aa-live-title,
html[data-theme='light'] .aa-live-meta,
html[data-theme='light'] .aa-live-status,
html[data-theme='light'] .aa-batch-card strong,
html[data-theme='light'] .aa-batch-card span,
html[data-theme='light'] .aa-enroll-tag strong,
html[data-theme='light'] .aa-enroll-tag em,
html[data-theme='light'] .aa-enroll-tag span,
html[data-theme='light'] .aa-adm-go-banner,
html[data-theme='light'] .aa-adm-go-banner strong,
html[data-theme='light'] .aa-adm-seg-btn,
html[data-theme='light'] .aa-sheet h2,
html[data-theme='light'] .aa-sheet-btn,
html[data-theme='light'] .aa-share-pop button,
html[data-theme='light'] .aa-att-float,
html[data-theme='light'] .aa-att-float h2,
html[data-theme='light'] .aa-att-float .aa-face-select-all,
html[data-theme='light'] .aa-att-float .aa-muted,
html[data-theme='light'] .aa-att-float-x,
html[data-theme='light'] .aa-pay-summary-row span,
html[data-theme='light'] .aa-pay-summary-row strong,
html[data-theme='light'] .aa-paid-meta,
html[data-theme='light'] .aa-stu-badge,
html[data-theme='light'] .aa-stu-badge--day,
html[data-theme='light'] .aa-stu-badge--time,
html[data-theme='light'] .aa-stu-badge--att,
html[data-theme='light'] .aa-stu-badge--att:hover,
html[data-theme='light'] .aa-card-title,
html[data-theme='light'] .aa-adm-fee-card-head strong,
html[data-theme='light'] .aa-adm-fee-subtotal,
html[data-theme='light'] .aa-exp-badge,
html[data-theme='light'] .aa-exp-due,
html[data-theme='light'] .aa-stu-class strong,
html[data-theme='light'] .aa-stu-class em,
html[data-theme='light'] .aa-daily-list,
html[data-theme='light'] .aa-empty,
html[data-theme='light'] label,
html[data-theme='light'] .aa-label,
html[data-theme='light'] .aa-section-title,
html[data-theme='light'] .aa-panel h3,
html[data-theme='light'] .aa-more-btn,
html[data-theme='light'] .aa-card--student .aa-more-btn {
  color: #0f172a !important;
}
html[data-theme='light'] .aa-live-meta,
html[data-theme='light'] .aa-empty,
html[data-theme='light'] .aa-stu-class em,
html[data-theme='light'] .aa-batch-card span,
html[data-theme='light'] .aa-paid-meta {
  color: rgba(15, 23, 42, 0.72) !important;
}
html[data-theme='light'] .aa-live-card--upcoming .aa-live-status,
html[data-theme='light'] .aa-live-card--upcoming .aa-live-badge {
  color: #9a3412 !important;
}
html[data-theme='light'] .aa-live-card--live .aa-live-status,
html[data-theme='light'] .aa-live-card--live .aa-live-badge,
html[data-theme='light'] .aa-live-badge {
  color: #0f766e !important;
}
html[data-theme='light'] .aa-live-badge,
html[data-theme='light'] .aa-stu-badge,
html[data-theme='light'] .aa-stu-badge--day,
html[data-theme='light'] .aa-stu-badge--time,
html[data-theme='light'] .aa-enroll-tag {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.35);
}
html[data-theme='light'] .aa-live-card--upcoming .aa-live-badge,
html[data-theme='light'] .aa-stu-badge--day {
  background: rgba(180, 83, 9, 0.12);
  border-color: rgba(154, 52, 18, 0.4);
  color: #9a3412 !important;
}
html[data-theme='light'] .aa-adm-seg-btn.on,
html[data-theme='light'] .aa-btn:not(.aa-btn-ghost),
html[data-theme='light'] .aa-stu-due,
html[data-theme='light'] .aa-stu-due-copy b,
html[data-theme='light'] .aa-stu-due-copy strong,
html[data-theme='light'] .aa-stu-due-amt,
html[data-theme='light'] .aa-due-reg-note,
html[data-theme='light'] .aa-pay-summary-status.is-due {
  color: #fff !important;
}
html[data-theme='light'] .aa-stu-due--paid,
html[data-theme='light'] .aa-stu-due--paid .aa-stu-due-copy b,
html[data-theme='light'] .aa-stu-due--paid .aa-stu-due-copy strong {
  color: #fff !important;
}
html[data-theme='light'] .aa-class-fee-btn {
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.35);
  color: #0f172a;
}
html[data-theme='light'] .aa-class-fee-btn b {
  color: #b8860b;
}
html[data-theme='light'] .aa-class-fee-btn strong {
  color: #0f172a;
}
html[data-theme='light'] .aa-class-fee-btn.is-paid {
  background: rgba(15, 118, 110, 0.12);
}
html[data-theme='light'] .aa-class-fee-btn.is-due {
  background: rgba(180, 83, 9, 0.1);
  border-color: rgba(180, 83, 9, 0.4);
}
html[data-theme='light'] .aa-class-fee-row {
  background: rgba(15, 118, 110, 0.06);
  border-color: rgba(15, 118, 110, 0.22);
}
html[data-theme='light'] .aa-class-fee-month strong,
html[data-theme='light'] .aa-class-fee-line strong {
  color: #0f172a;
}
html[data-theme='light'] .aa-class-fee-month strong {
  color: #b8860b;
}
html[data-theme='light'] .aa-sheet-btn.danger {
  color: #9f1239 !important;
}
html[data-theme='light'] .aa-pay-summary-row--bal strong {
  color: #b91c1c !important;
}
html[data-theme='light'] .aa-pay-summary-row--recv strong {
  color: #0f766e !important;
}
html[data-theme='light'] .aa-table th,
html[data-theme='light'] .aa-table td,
html[data-theme='light'] .aa-card-row {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
html[data-theme='light'] .aa-input::placeholder,
html[data-theme='light'] .aa-textarea::placeholder {
  color: rgba(15, 23, 42, 0.48);
}
html[data-theme='light'] .aa-adm-go-banner {
  background: #fff7ed;
  border-color: rgba(154, 52, 18, 0.4);
}

/* Theme plates: text is the opposite of the plate.
   White theme → light plate, dark text. Dark / brand → dark plate, cream text.
   Teal and gold stay the accent. Icons follow the same contrast. */
/* Student subject locks / pause — readable on white theme */
html[data-theme='light'] .aa-enroll-lock-card {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
html[data-theme='light'] .aa-enroll-lock-card.is-locked {
  border-color: rgba(180, 83, 9, 0.45);
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.08);
}
html[data-theme='light'] .aa-enroll-lock-card.is-unlocked,
html[data-theme='light'] .aa-enroll-lock-card.is-paused,
html[data-theme='light'] .aa-enroll-lock-card--pause.is-paused {
  border-color: rgba(15, 118, 110, 0.4);
  background: #f0fdfa;
}
html[data-theme='light'] .aa-enroll-lock-name {
  color: #0f172a;
}
html[data-theme='light'] .aa-enroll-lock-unit,
html[data-theme='light'] .aa-enroll-lock-hint,
html[data-theme='light'] .aa-enroll-pause-summary {
  color: rgba(15, 23, 42, 0.68) !important;
}
html[data-theme='light'] .aa-enroll-lock-badge.is-off {
  color: #115e59;
  background: #ccfbf1;
  border-color: rgba(15, 118, 110, 0.35);
}
html[data-theme='light'] .aa-enroll-lock-badge.is-on {
  color: #080d0e;
  background: #fbbf24;
}
html[data-theme='light'] .aa-enroll-months-inp,
html[data-theme='light'] .aa-enroll-disc-inp {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
}
html[data-theme='light'] .aa-enroll-disc-seg.aa-adm-seg {
  background: #f1f5f9 !important;
  border-color: rgba(15, 118, 110, 0.35) !important;
}
html[data-theme='light'] .aa-enroll-disc-seg .aa-adm-seg-btn:not(.on) {
  color: #0f172a !important;
  background: transparent !important;
  opacity: 1;
}
html[data-theme='light'] .aa-enroll-disc-seg .aa-adm-seg-btn.on {
  background: linear-gradient(180deg, #00c8c8 0%, #00a3a3 100%) !important;
  color: #080d0e !important;
  border-color: #b8860b !important;
}
html[data-theme='light'] .aa-enroll-pause-btn {
  color: #0f172a !important;
  background: #ccfbf1 !important;
  border-color: rgba(15, 118, 110, 0.45) !important;
}
html[data-theme='light'] .aa-enroll-pause-btn.is-paused {
  color: #115e59 !important;
  background: #99f6e4 !important;
  border-color: #0f766e !important;
}
html[data-theme='light'] .aa-enroll-pause-chip {
  color: #0f172a;
  background: #f0fdfa;
  border-color: rgba(15, 118, 110, 0.35);
}
html[data-theme='light'] .aa-enroll-pause-chip strong {
  color: #0f766e;
}
html[data-theme='light'] .aa-adm-disc-lock {
  background: #ffffff;
  color: #92400e;
  border-color: rgba(180, 83, 9, 0.45);
}
html[data-theme='light'] .aa-adm-disc-lock.is-locked {
  color: #92400e;
  background: #fff7ed;
  border-color: #b45309;
  box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.25);
}
html[data-theme='light'] .aa-adm-disc-lock.is-unlocked {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.45);
}
html[data-theme='light'] .aa-settings-card,
html[data-theme='light'] .aa-fee-due-opt,
html[data-theme='light'] [data-fee-due-mode] {
  color: #0f172a;
}
html[data-theme='light'] [data-fee-due-mode] strong {
  color: #0f172a !important;
}
html[data-theme='light'] [data-fee-due-mode] span {
  color: rgba(15, 23, 42, 0.72) !important;
}
html[data-theme='light'] .aa-adm-invoice {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: none;
}
html[data-theme='light'] .aa-pay-table-head,
html[data-theme='light'] .aa-pay-line-title strong,
html[data-theme='light'] .aa-pay-date-label,
html[data-theme='light'] .aa-adm-inv-label,
html[data-theme='light'] .aa-adm-invoice .aa-adm-hint,
html[data-theme='light'] .aa-pay-reg-tip {
  color: #0f172a !important;
}
/* Admission Payment date strip uses its own light-surface rules above. */
html[data-theme='light'] .aa-pay-dates .aa-pay-date-label,
html[data-theme='light'] .aa-pay-dates .aa-pay-date-label span {
  color: #0f766e !important;
}
html[data-theme='light'] .aa-pay-dates .aa-pay-date-req {
  color: #b45309 !important;
}
html[data-theme='light'] .aa-pay-table-head {
  border-bottom-color: rgba(15, 118, 110, 0.28);
}
html[data-theme='light'] .aa-pay-simple .aa-adm-fee-card.aa-pay-line,
html[data-theme='light'] .aa-pay-reg,
html[data-theme='light'] .aa-adm-inv-line,
html[data-theme='light'] .aa-adm-invoice-row {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
html[data-theme='light'] .aa-adm-inv-amt,
html[data-theme='light'] .aa-adm-inv-text,
html[data-theme='light'] .aa-pay-amt,
html[data-theme='light'] .aa-pay-months,
html[data-theme='light'] .aa-pay-disc-amt,
html[data-theme='light'] .aa-pay-date {
  background: #fff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
}
html[data-theme='light'] .aa-adm-seg {
  background: #fff;
  border-color: rgba(15, 118, 110, 0.35);
}
html[data-theme='light'] .aa-adm-seg-btn:not(.on) {
  color: #0f172a !important;
}
html[data-theme='light'] .aa-adm-seg-btn.on,
html[data-theme='light'] .aa-pay-badge--due,
html[data-theme='light'] .aa-pay-badge--new {
  color: #042f2e !important;
}
html[data-theme='light'] .aa-pay-expand,
html[data-theme='light'] .aa-info-btn {
  color: #0f766e;
  background: #fff;
  border-color: rgba(15, 118, 110, 0.45);
}
html[data-theme='gradient'] .aa-adm-invoice,
html[data-theme='dark'] .aa-adm-invoice,
html[data-theme='brand'] .aa-adm-invoice {
  color: #f7f4ec;
}
html[data-theme='gradient'] .aa-pay-table-head,
html[data-theme='dark'] .aa-pay-table-head,
html[data-theme='brand'] .aa-pay-table-head,
html[data-theme='gradient'] .aa-pay-line-title strong,
html[data-theme='dark'] .aa-pay-line-title strong,
html[data-theme='brand'] .aa-pay-line-title strong,
html[data-theme='gradient'] .aa-pay-date-label,
html[data-theme='dark'] .aa-pay-date-label,
html[data-theme='brand'] .aa-pay-date-label,
html[data-theme='gradient'] .aa-adm-inv-label,
html[data-theme='dark'] .aa-adm-inv-label,
html[data-theme='brand'] .aa-adm-inv-label,
html[data-theme='gradient'] .aa-adm-invoice .aa-adm-hint,
html[data-theme='dark'] .aa-adm-invoice .aa-adm-hint,
html[data-theme='brand'] .aa-adm-invoice .aa-adm-hint {
  color: #f7f4ec !important;
}
html[data-theme='gradient'] .aa-adm-inv-amt,
html[data-theme='dark'] .aa-adm-inv-amt,
html[data-theme='brand'] .aa-adm-inv-amt,
html[data-theme='gradient'] .aa-pay-date,
html[data-theme='dark'] .aa-pay-date,
html[data-theme='brand'] .aa-pay-date,
html[data-theme='gradient'] .aa-pay-amt,
html[data-theme='dark'] .aa-pay-amt,
html[data-theme='brand'] .aa-pay-amt {
  background: rgba(0, 0, 0, 0.35) !important;
  color: #f7f4ec !important;
}
html[data-theme='gradient'] .aa-pay-expand,
html[data-theme='dark'] .aa-pay-expand,
html[data-theme='brand'] .aa-pay-expand,
html[data-theme='gradient'] .aa-info-btn,
html[data-theme='dark'] .aa-info-btn,
html[data-theme='brand'] .aa-info-btn {
  color: #00c8c8;
}

/* ===== Phone layout — no overlapping text or clipped cards ===== */
@media (max-width: 720px) {
  html,
  body {
    overflow-x: hidden;
  }
  .aa-app {
    overflow-x: hidden;
  }
  .aa-main {
    padding: 0.65rem 0.7rem 1.65rem;
    min-width: 0;
  }
  .aa-notify-btn {
    flex-shrink: 0;
  }
  .aa-topbar-actions .aa-btn {
    white-space: normal;
    line-height: 1.2;
  }
  .aa-app.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.48);
  }
  .aa-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .aa-stat {
    min-width: 0;
    padding: 0.7rem 0.65rem;
  }
  .aa-stat strong {
    font-size: 1.05rem;
    word-break: break-word;
  }
  .aa-live-grid {
    grid-template-columns: 1fr;
  }
  .aa-live-title {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .aa-toolbar,
  .aa-toolbar--students {
    flex-direction: column;
    align-items: stretch;
  }
  .aa-stu-search,
  .aa-stu-add {
    max-width: none;
    width: 100%;
  }
  .aa-period-row,
  .aa-period-fieldline,
  .aa-period-filter .aa-period-modes,
  .aa-period-filters .aa-period-modes,
  .aa-period-filter .aa-period-inputs,
  .aa-period-filters .aa-period-panels {
    flex-wrap: wrap;
  }
  .aa-period-filter .aa-period-inputs .aa-label,
  .aa-period-filters .aa-period-panel .aa-label {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
  .aa-card-grid--students {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 2px;
  }
  /* Compact phone cards: photo + details, then finance, then footer (fee strip) */
  .aa-card--student,
  .aa-card--student.has-wallet,
  .aa-card--student.has-per-class,
  .aa-card--class,
  .aa-card[data-class-id],
  .aa-card[data-teacher-id] {
    --stu-card-min: 4.75rem;
    --stu-finance-w: 100%;
    --stu-finance-w-qp: 100%;
    display: grid;
    grid-template-columns: var(--stu-card-min) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      'photo mid'
      'finance finance'
      'footer footer';
    align-items: start;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0.45rem 0.55rem 0.5rem 0.45rem;
    gap: 0.35rem 0.45rem;
    overflow: hidden;
    flex-direction: unset;
    flex-wrap: unset;
  }
  .aa-card--student > .aa-card-footer,
  .aa-card--class > .aa-card-footer,
  .aa-card[data-class-id] > .aa-card-footer,
  .aa-card-footer {
    grid-area: footer;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.15rem 0 0;
    flex: unset;
  }
  .aa-card--student > .aa-stu-photo,
  .aa-card--student .aa-stu-photo,
  .aa-card--student.has-wallet > .aa-stu-photo,
  .aa-card--student.has-per-class .aa-stu-photo {
    grid-area: photo;
    width: var(--stu-card-min) !important;
    min-width: var(--stu-card-min) !important;
    max-width: var(--stu-card-min) !important;
    height: var(--stu-card-min) !important;
    min-height: var(--stu-card-min) !important;
    max-height: var(--stu-card-min) !important;
    flex: 0 0 var(--stu-card-min) !important;
    aspect-ratio: 1 / 1;
    align-self: start;
    border-radius: 0.45rem;
    border-right: 0;
    border-bottom: 0;
    overflow: hidden;
  }
  .aa-card--student > .aa-stu-photo img {
    object-fit: cover;
    object-position: center top;
  }
  .aa-stu-photo-hint {
    font-size: 0.55rem;
    padding: 0.2rem 0.1rem;
  }
  .aa-card--student > .aa-stu-mid,
  .aa-stu-mid {
    grid-area: mid;
    overflow: hidden;
    padding: 0 1.65rem 0 0;
    gap: 0.18rem;
    justify-content: flex-start;
    min-width: 0;
  }
  .aa-stu-name-row {
    gap: 0.25rem 0.35rem;
  }
  .aa-stu-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 0.84rem;
    line-height: 1.2;
  }
  .aa-stu-badge {
    font-size: 0.62rem;
    padding: 0.12rem 0.38rem;
  }
  .aa-stu-classes {
    grid-template-columns: 1fr;
    overflow: hidden;
    gap: 0.2rem;
  }
  .aa-stu-class {
    gap: 0.05rem;
  }
  .aa-stu-class strong {
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aa-stu-class em,
  .aa-stu-class .aa-due-class-status {
    font-size: 0.62rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aa-stu-class--paydates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.65rem;
  }
  .aa-stu-class--paydates em {
    white-space: nowrap;
  }
  .aa-card--student > .aa-stu-finance,
  .aa-stu-finance {
    grid-area: finance;
    max-width: none;
    width: 100%;
    align-items: stretch;
    padding: 0;
    gap: 0.3rem;
    border-top: 0;
  }
  .aa-card--student .aa-stu-finance-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
  }
  .aa-stu-due-stack {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .aa-stu-due-stack:has(> :nth-child(2)) > .aa-stu-due,
  .aa-stu-due-stack:has(> :nth-child(2)) > .aa-stu-due--paid,
  .aa-stu-due,
  .aa-stu-due--paid,
  .aa-stu-due--meta,
  .aa-stu-due--earn {
    min-width: 0;
    max-width: none;
    width: 100%;
    flex: 1 1 100%;
    min-height: 2.15rem;
    height: 2.15rem;
    padding: 0.2rem 0.3rem 0.2rem 0.4rem;
  }
  .aa-card--student .aa-stu-due.has-reg-note {
    min-height: 2.35rem;
    max-height: 2.65rem;
    height: auto;
  }
  .aa-stu-due-copy b {
    font-size: 0.62rem;
  }
  .aa-stu-due-copy strong,
  .aa-stu-due-amt {
    font-size: 0.95rem;
  }
  .aa-stu-due-pay {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
  }
  .aa-stu-due-stack:has(> :nth-child(2)) .aa-stu-due-meta {
    display: none;
  }
  .aa-stu-icon-row,
  .aa-stu-icon-page {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.3rem;
  }
  .aa-stu-tile {
    width: 2.05rem;
    height: 2.05rem;
    min-width: 2.05rem;
    flex: 0 0 2.05rem;
  }
  .aa-stu-per-class {
    display: none;
  }
  .aa-card--student > .aa-more {
    position: absolute;
    grid-column: unset;
    grid-row: unset;
    top: 0.3rem;
    right: 0.25rem;
    z-index: 4;
  }
  .aa-card--student.has-quick-pay .aa-stu-finance {
    flex-basis: auto;
    width: 100%;
    max-width: none;
    padding-right: 0;
  }
  .aa-card[data-teacher-id] .aa-stu-finance,
  .aa-card[data-teacher-id] .aa-stu-due--meta,
  .aa-card[data-teacher-id] .aa-stu-due--meta-compact,
  .aa-card[data-teacher-id] .aa-stu-icon-row {
    max-width: none;
    width: 100%;
    min-width: 0;
  }
  .aa-card[data-teacher-id] .aa-stu-name {
    max-width: 100%;
  }
  .aa-card-footer {
    padding: 0.1rem 0.45rem 0;
  }
  .aa-class-fee-row {
    flex-wrap: nowrap;
  }
  .aa-modal-bg {
    padding: 0.65rem 0.55rem;
    align-items: flex-start;
  }
  .aa-modal,
  .aa-modal--admission,
  .aa-modal--invoice {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 0.8rem 1rem;
  }
  .aa-form-grid {
    grid-template-columns: 1fr;
  }
  .aa-adm-seg {
    width: 100%;
    min-width: 0;
  }
  .aa-pw-line {
    flex-wrap: wrap;
  }
  .aa-pw-line .aa-input {
    flex: 1 1 100%;
  }
  .aa-modal-actions {
    flex-wrap: wrap;
  }
  .aa-modal-actions .aa-btn {
    flex: 1 1 auto;
  }
  .aa-profile-name {
    font-size: 1.35rem;
    word-break: break-word;
  }
  .aa-profile-card {
    padding: 0.75rem;
    gap: 0.7rem;
  }
  .aa-profile-facts .aa-card-row {
    flex-wrap: wrap;
    gap: 0.2rem 0.75rem;
  }
  .aa-profile-facts .aa-card-row strong {
    text-align: left;
  }
  .aa-adm-pay-split-head,
  .aa-adm-pay-split-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .aa-adm-pay-split .aa-adm-inv-amt,
  .aa-adm-pay-due {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    text-align: left;
  }
  .aa-batch-grid {
    grid-template-columns: 1fr;
  }
  .aa-att-list {
    grid-template-columns: 1fr;
  }
  .aa-fee-mini-dash {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .aa-table {
    font-size: 0.8rem;
  }
  .aa-table th,
  .aa-table td {
    padding: 0.45rem 0.3rem;
    vertical-align: top;
  }
  .aa-att-float {
    left: 0.55rem;
    right: 0.55rem;
    width: auto;
    top: 4.2rem;
  }
  .aa-auth-card img {
    width: min(160px, 52%);
  }
  .aa-auth-card h1 {
    font-size: 1.15rem;
  }
}

@media (max-width: 420px) {
  .aa-stats {
    grid-template-columns: 1fr 1fr;
  }
  .aa-fee-mini-dash {
    grid-template-columns: 1fr;
  }
  .aa-brand strong {
    font-size: 0.8rem;
  }
  .aa-stu-home-photo {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }
  .aa-stu-home-id h2 {
    font-size: 1.1rem;
  }
}

/* Inquiry */
.aa-inq-invite {
  padding: 1rem 1.1rem;
}
.aa-inq-invite-grid {
  grid-template-columns: 1fr 1fr;
}
.aa-inq-tabs {
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(0, 163, 163, 0.22);
  gap: 1.4rem;
}
.aa-inq-tabs .aa-profile-tab {
  font-size: 1rem;
  padding: 0.35rem 0 0.55rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.aa-inq-tabs .aa-profile-tab.is-on {
  color: var(--teal-bright, #00a3a3);
  border-bottom-color: var(--gold-mid, #d4af37);
}
.aa-inq-tab-toolbar {
  margin: 0 0 0.65rem;
}
.aa-inq-tab-toolbar .aa-period-filters {
  margin: 0;
}
.aa-inq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.aa-inq-actions .aa-inq-action-btn,
.aa-inq-actions .aa-icon-btn--lg {
  min-width: 2.45rem !important;
  height: 2.45rem !important;
  font-size: 0.95rem !important;
  border-radius: 0.45rem;
  padding: 0 0.35rem;
}
.aa-inq-actions .aa-btn-sm {
  min-height: 2.45rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}
.aa-inq-table td {
  vertical-align: top;
}
.aa-inq-note {
  max-width: 12rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.84rem;
  color: var(--muted);
}
.aa-inq-fu-hist {
  max-height: 220px;
  overflow: auto;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}
.aa-inq-fu-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 163, 163, 0.12);
  font-size: 0.86rem;
}
.aa-inq-fu-row strong {
  color: var(--teal-bright, #00a3a3);
  margin-right: 0.4rem;
}
.aa-inq-fu-row p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}
@media (max-width: 720px) {
  .aa-inq-invite-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Zen system — calm chrome across Academy Admin ===== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  letter-spacing: 0.01em;
}
.aa-academy-bar {
  background: linear-gradient(180deg, rgba(15, 23, 25, 0.96) 0%, rgba(12, 20, 22, 0.96) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.aa-sidebar {
  background: linear-gradient(180deg, #0d1517, #0a1214);
}
.aa-nav a {
  border-radius: var(--zen-radius-sm, 0.55rem);
  border: 1px solid transparent;
  min-height: 2.35rem;
}
.aa-nav a.active {
  box-shadow: none;
}
.aa-input,
.aa-select,
.aa-textarea,
.aa-date {
  border-radius: var(--zen-radius-sm, 0.55rem);
  border-color: rgba(0, 163, 163, 0.22);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.aa-input:focus,
.aa-select:focus,
.aa-textarea:focus,
.aa-date:focus {
  outline: none;
  border-color: rgba(0, 200, 200, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 163, 163, 0.16);
}
.aa-modal {
  border-radius: var(--zen-radius, 0.85rem);
  box-shadow: var(--zen-shadow, 0 8px 24px rgba(0, 0, 0, 0.28));
  background: #0d1517;
}
.aa-modal-bg {
  background: rgba(4, 8, 9, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.aa-table th {
  font-weight: 700;
  letter-spacing: 0.05em;
}
.aa-table td {
  vertical-align: top;
}
.aa-toolbar {
  gap: 0.55rem;
}
.aa-chip-btn,
.aa-period-mode,
.aa-adm-seg-btn {
  border-radius: var(--zen-radius-sm, 0.55rem);
}
.aa-stu-name {
  border-radius: 999px;
}
.aa-stu-badge {
  border-radius: 999px;
}
.aa-live-card,
.aa-dash-card,
.aa-period-filter,
.aa-period-filters {
  border-radius: var(--zen-radius, 0.85rem);
}

/* ===== Zen phone — one calm column, no clipped chrome ===== */
@media (max-width: 860px) {
  .aa-sidebar {
    max-width: min(300px, 86vw);
    padding: 1rem 0.85rem 1.25rem;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
    border-right-color: rgba(0, 163, 163, 0.22);
  }
  .aa-nav a {
    min-height: 2.55rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.92rem;
  }
  .aa-app.nav-open::before {
    backdrop-filter: blur(2px);
  }
}

@media (max-width: 720px) {
  .aa-main {
    padding: 0.55rem 0.65rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  }
  .aa-academy-bar {
    position: sticky;
    top: 0;
  }
  #pageTitle {
    margin-bottom: 0;
  }
  #pageSub {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
  }
  .aa-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.75rem;
  }
  .aa-stat {
    padding: 0.65rem 0.6rem;
    min-width: 0;
  }
  .aa-stat span {
    font-size: 0.62rem;
    margin-bottom: 0.2rem;
  }
  .aa-stat strong {
    font-size: 1rem;
    line-height: 1.2;
  }
  .aa-panel {
    padding: 0.75rem;
    border-radius: var(--zen-radius, 0.85rem);
  }
  .aa-toolbar,
  .aa-toolbar--students,
  .aa-topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .aa-toolbar .aa-btn,
  .aa-toolbar .aa-btn-ghost,
  .aa-topbar-actions .aa-btn,
  .aa-topbar-actions .aa-btn-ghost {
    width: 100%;
    min-height: 2.55rem;
    justify-content: center;
  }
  .aa-stu-search,
  .aa-input,
  .aa-select,
  .aa-textarea,
  .aa-date {
    width: 100%;
    max-width: none;
    min-height: 2.55rem;
    font-size: 16px; /* avoid iOS zoom */
  }
  .aa-textarea {
    min-height: 6.5rem;
  }
  .aa-form-grid,
  .aa-adm-grid,
  .aa-settings-grid,
  .aa-live-grid,
  .aa-pay-grid,
  .aa-academy-sheet {
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
  }
  .aa-table-wrap {
    margin: 0 -0.15rem;
    padding: 0 0.15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--zen-radius-sm, 0.55rem);
  }
  .aa-table {
    font-size: 0.8rem;
    min-width: 520px;
  }
  .aa-table th,
  .aa-table td {
    padding: 0.55rem 0.4rem;
  }
  .aa-modal-bg {
    padding: 0.45rem 0.4rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }
  .aa-modal,
  .aa-modal--invoice,
  .aa-modal--quickpay,
  .aa-modal--confirm {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.8rem 0.75rem 0.95rem;
    border-radius: 0.95rem;
    max-height: calc(100vh - 1.1rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .aa-modal--admission {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.8rem 0.75rem 0.95rem;
    border-radius: 0.95rem;
    max-height: none;
    overflow: visible;
  }
  .aa-modal-actions,
  .aa-editor-bar,
  .aa-adm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .aa-modal-actions .aa-btn,
  .aa-modal-actions .aa-btn-ghost,
  .aa-editor-bar .aa-btn,
  .aa-adm-actions .aa-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-height: 2.55rem;
  }
  .aa-adm-invoice,
  .aa-pay-line,
  .aa-adm-fee-card,
  .aa-adm-enroll-row {
    min-width: 0;
  }
  .aa-adm-inv-line,
  .aa-adm-inv-line--toggle,
  .aa-adm-inv-line--months,
  .aa-adm-inv-line--disc,
  .aa-pay-line-main {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .aa-adm-seg {
    width: 100%;
    min-width: 0;
  }
  .aa-adm-seg-btn {
    flex: 1 1 0;
    min-height: 2.35rem;
  }
  .aa-adm-inv-amt,
  .aa-pay-amt,
  .aa-pay-months,
  .aa-pay-disc-amt {
    max-width: 100%;
  }
  .aa-pay-date-field,
  .aa-pay-months-field,
  .aa-pay-disc-cell {
    width: 100%;
    min-width: 0;
  }
  .aa-stu-split {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  .aa-stu-tree,
  .aa-stu-list-pane {
    width: 100%;
    max-width: none;
  }
  .aa-period-row,
  .aa-period-fieldline,
  .aa-period-modes,
  .aa-period-inputs,
  .aa-period-panels {
    width: 100%;
  }
  .aa-period-mode {
    min-height: 2.35rem;
  }
  .aa-settings-nav,
  .aa-settings-body {
    width: 100%;
  }
  .aa-card-grid--students {
    gap: 0.5rem;
  }
  .aa-card--student:hover,
  .aa-card--student.is-selected {
    transform: none;
  }
  .aa-inq-actions {
    width: 100%;
  }
  .aa-inq-actions .aa-btn-sm,
  .aa-inq-actions .aa-inq-action-btn {
    min-height: 2.45rem;
  }
  .aa-sub-open-inv {
    flex-direction: column;
    align-items: stretch;
  }
  .aa-sub-open-inv-actions {
    width: 100%;
  }
  .aa-sub-open-inv-actions .aa-btn {
    flex: 1 1 auto;
    min-height: 2.55rem;
  }
}

@media (max-width: 420px) {
  .aa-stats {
    grid-template-columns: 1fr 1fr;
  }
  .aa-main {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .aa-card--student,
  .aa-card--student.has-wallet,
  .aa-card--student.has-per-class {
    --stu-card-min: 4.35rem;
    padding: 0.4rem 0.45rem 0.45rem 0.4rem;
    gap: 0.3rem 0.4rem;
  }
  .aa-stu-name {
    font-size: 0.78rem;
  }
  .aa-stu-class strong {
    font-size: 0.64rem;
  }
  .aa-stu-tile {
    width: 1.95rem;
    height: 1.95rem;
    min-width: 1.95rem;
    flex-basis: 1.95rem;
  }
}

/* ===== Alignment repair — mobile (layout only) ===== */
@media (max-width: 720px) {
  /* Page title breathing room under sticky bar */
  .aa-main > h1 {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
  }
  #pageSub {
    margin-bottom: 0.65rem;
  }

  /* Class / directory cards: wrap pills, don’t crush fee strip */
  .aa-card[data-class-id] .aa-stu-name-row,
  .aa-card--class .aa-stu-name-row {
    flex-wrap: wrap !important;
    align-items: flex-start;
    padding-right: 1.5rem;
    gap: 0.3rem;
  }
  .aa-card[data-class-id] .aa-stu-name-pills,
  .aa-card--class .aa-stu-name-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    max-width: 100%;
    gap: 0.25rem;
  }
  .aa-card[data-class-id] .aa-stu-name-pills .aa-stu-name,
  .aa-card[data-class-id] .aa-class-pill,
  .aa-card--class .aa-class-pill {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 1.2rem;
    padding: 0.2rem 0.45rem !important;
    font-size: 0.62rem !important;
    line-height: 1.15;
    white-space: normal !important;
  }
  .aa-card[data-class-id] .aa-stu-badges,
  .aa-card--class .aa-stu-badges {
    flex: 0 0 auto;
  }
  .aa-card[data-class-id] .aa-stu-mid,
  .aa-card[data-class-id] .aa-stu-finance,
  .aa-card--class .aa-stu-mid,
  .aa-card--class .aa-stu-finance {
    min-height: 0 !important;
  }
  .aa-card[data-class-id] .aa-stu-finance,
  .aa-card--class .aa-stu-finance {
    max-width: none !important;
    width: 100% !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
  }
  .aa-card[data-class-id] .aa-stu-due--meta,
  .aa-card--class .aa-stu-due--meta {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 2.1rem;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.55rem;
  }
  .aa-card[data-class-id] .aa-stu-due--meta .aa-stu-due-copy,
  .aa-card--class .aa-stu-due--meta .aa-stu-due-copy {
    flex-direction: row;
    align-items: baseline;
    gap: 0.45rem;
    text-align: left;
  }
  .aa-card[data-class-id] .aa-stu-due--meta .aa-stu-due-copy b,
  .aa-card--class .aa-stu-due--meta .aa-stu-due-copy b {
    font-size: 0.68rem;
  }
  .aa-card[data-class-id] .aa-stu-due--meta .aa-stu-due-copy strong,
  .aa-card--class .aa-stu-due--meta .aa-stu-due-copy strong {
    font-size: 1.05rem;
  }
  .aa-class-fee-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }
  .aa-class-fee-btn {
    align-items: stretch;
    padding: 0.35rem 0.4rem;
    min-width: 0;
  }
  .aa-class-fee-btn b {
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aa-class-fee-btn strong {
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .aa-stu-photo-hint {
    font-size: 0.5rem !important;
    padding: 0.15rem 0.1rem !important;
    letter-spacing: 0.02em;
  }

  /* Filters / chips scroll in one row instead of wrapping mess */
  .aa-chip-row,
  .aa-status-filters,
  .aa-toolbar .aa-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    max-width: 100%;
  }
  .aa-chip-btn,
  .aa-period-mode {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Period filter: full-width controls + equal Search/Clear */
  .aa-period-filter,
  .aa-period-filters {
    padding: 0.7rem;
  }
  .aa-period-filter .aa-period-modes,
  .aa-period-filters .aa-period-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
  }
  .aa-period-filter .aa-period-inputs,
  .aa-period-filters .aa-period-panels,
  .aa-period-fieldline,
  .aa-period-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
  }
  .aa-period-filter .aa-label,
  .aa-period-filters .aa-label,
  .aa-toolbar .aa-label {
    margin-bottom: 0.15rem;
  }
  .aa-period-filter .aa-btn,
  .aa-period-filters .aa-btn,
  .aa-period-filter .aa-btn-ghost,
  .aa-period-filters .aa-btn-ghost {
    flex: 1 1 calc(50% - 0.25rem);
    min-height: 2.4rem;
  }
  .aa-period-filter .aa-period-inputs > div,
  .aa-period-filters .aa-period-panel {
    width: 100%;
  }

  /* Toolbars: every control full width, primary actions equal */
  .aa-toolbar,
  .aa-toolbar--students,
  .aa-topbar-actions,
  .aa-sal-toolbar,
  .aa-fee-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
  }
  .aa-toolbar .aa-input,
  .aa-toolbar .aa-select,
  .aa-toolbar select,
  .aa-toolbar input,
  .aa-stu-search,
  .aa-sal-person-pick,
  .aa-toolbar .aa-sal-person-pick {
    width: 100% !important;
    max-width: none !important;
    min-height: 2.4rem;
    flex: 1 1 auto;
  }
  .aa-toolbar .aa-btn,
  .aa-toolbar .aa-btn-ghost,
  .aa-topbar-actions .aa-btn,
  .aa-topbar-actions .aa-btn-ghost {
    width: 100%;
    min-height: 2.45rem;
  }

  /* Tables: keep inside screen; action cells stack */
  .aa-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .aa-table {
    min-width: 560px;
  }
  .aa-admin-req-actions,
  .aa-table td.aa-admin-req-actions,
  .aa-table td:last-child:has(.aa-btn) {
    min-width: 9.5rem;
  }
  .aa-admin-req-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
  }
  .aa-admin-req-actions .aa-btn,
  .aa-admin-req-actions .aa-btn-ghost {
    width: 100%;
    margin: 0 !important;
    white-space: nowrap;
    min-height: 2.2rem;
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }

  /* Dashboard admin request head */
  .aa-dash-section .aa-period-filter,
  .aa-dash-section .aa-toolbar {
    width: 100%;
  }

  /* Attendance action row */
  .aa-att-actions,
  .aa-att-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
  }
  .aa-att-actions .aa-btn,
  .aa-att-toolbar .aa-btn {
    width: 100%;
    min-height: 2.45rem;
  }

  /* Quick payment modal: denser list + pager in one row */
  .aa-modal--quickpay .aa-qp-list,
  .aa-qp-pick-list,
  .aa-modal .aa-pick-list {
    max-height: 38vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0.45rem;
    border-radius: 0.55rem;
  }
  .aa-qp-pager,
  .aa-pick-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.4rem;
    align-items: center;
    width: 100%;
  }
  .aa-qp-pager .aa-btn,
  .aa-pick-pager .aa-btn {
    width: 100%;
    min-height: 2.35rem;
  }
  .aa-qp-page-label,
  .aa-pick-page {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
  }

  /* Stats: equal card heights */
  .aa-stats .aa-stat,
  .aa-stats .aa-btn {
    min-height: 4.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .aa-stats .aa-btn {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .aa-status-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 0.1rem;
    margin-bottom: 0.55rem;
  }
  .aa-status-filter .aa-chip-btn {
    flex: 0 0 auto;
  }

  /* Quick pay pager is a plain toolbar with Prev / Page / Next */
  .aa-modal--quickpay .aa-toolbar:has(#aaQpStuPrev),
  .aa-modal--quickpay .aa-toolbar:has(#aaQpStuNext),
  .aa-modal--quickpay .aa-toolbar:has(#aaQpBatchPrev) {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.4rem;
    flex-direction: unset;
  }
  .aa-modal--quickpay .aa-toolbar:has(#aaQpStuPrev) .aa-muted,
  .aa-modal--quickpay .aa-toolbar:has(#aaQpStuNext) .aa-muted {
    text-align: center;
    white-space: nowrap;
  }
  .aa-modal--quickpay .aa-pick-row,
  .aa-qp-pick-list .aa-pick-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.4rem 0.15rem;
    border-bottom: 1px solid rgba(0, 163, 163, 0.12);
  }
  .aa-modal--quickpay .aa-pick-row span,
  .aa-qp-pick-list .aa-pick-row span {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .aa-att-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
  }
  .aa-att-actions .aa-btn {
    width: 100%;
    min-height: 2.45rem;
  }
  .aa-att-field-stack .aa-input,
  .aa-att-field-stack .aa-select,
  .aa-att-controls .aa-input,
  .aa-att-controls .aa-select {
    width: 100%;
    min-height: 2.4rem;
  }

  /* Don’t force huge inputs from earlier zen pass */
  .aa-input,
  .aa-select,
  .aa-stu-search,
  .aa-date {
    min-height: 2.4rem;
    font-size: 16px;
  }
}

/* Dashboard section jump buttons — phone only (mockup 2-col gold tiles) */
.aa-dash-features {
  display: none;
}
@media (max-width: 860px) {
  .aa-dash-features {
    display: block;
    margin: 0 0 0.95rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .aa-dash-features-head {
    display: none;
  }
  .aa-dash-features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.7rem;
  }
  .aa-dash-feat {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.35rem;
    padding: 0.7rem 0.65rem;
    border: 0;
    border-radius: 0.55rem;
    background: linear-gradient(
      180deg,
      var(--aa-logo-tile, #d0a000) 0%,
      var(--aa-logo-tile-deep, #a07800) 100%
    );
    color: var(--aa-logo-on-tile, #fff);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--aa-logo-tile, #d0a000) 32%, transparent);
  }
  .aa-dash-feat[data-dash-jump='aaDashJoins'] {
    font-size: 0.82rem;
  }
  .aa-dash-feat:hover,
  .aa-dash-feat:focus-visible {
    filter: brightness(1.06);
    outline: none;
  }
  .aa-dash-feat.is-on {
    filter: brightness(1.08);
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--aa-logo-menu, #207060) 70%, transparent),
      0 6px 16px color-mix(in srgb, var(--aa-logo-tile, #d0a000) 40%, transparent);
  }
  .aa-dash-detail-host > .aa-dash-panel {
    display: none !important;
  }
  .aa-dash-detail-host > .aa-dash-panel.is-open {
    display: block !important;
    scroll-margin-top: 4.5rem;
  }
  .aa-dash-detail-host > .aa-stats.aa-dash-panel.is-open {
    display: grid !important;
  }
}

/* ===== Mobile header — Menu | Title | ∨ | logo (academy teal/gold) ===== */
@media (max-width: 860px) {
  .aa-academy-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    padding:
      max(0.55rem, env(safe-area-inset-top, 0px))
      0.75rem
      0.55rem;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #0f1719 0%, #0c1416 100%);
    border-bottom: 1px solid rgba(0, 163, 163, 0.28);
  }
  html[data-theme='light'] .aa-academy-bar {
    background: #ffffff;
    border-bottom-color: rgba(15, 23, 42, 0.12);
  }
  .aa-academy-bar .aa-menu-btn,
  .aa-menu-btn {
    display: inline-flex !important;
    order: 1;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 2.2rem;
    padding: 0.42rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      var(--aa-logo-menu, #207060) 0%,
      var(--aa-logo-menu-deep, #165048) 100%
    );
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--aa-logo-menu, #207060) 35%, transparent);
    z-index: 2;
  }
  .aa-academy-bar > .aa-route-label,
  .aa-academy-bar > #pageTitle {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: center;
    text-transform: none;
    letter-spacing: 0.01em;
    font-family: var(--font-head);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
  }
  html[data-theme='light'] .aa-academy-bar > .aa-route-label,
  html[data-theme='light'] .aa-academy-bar > #pageTitle {
    color: #0f172a;
  }
  .aa-academy-bar > .aa-notify-btn {
    order: 3;
    flex: 0 0 auto;
  }
  .aa-academy-bar-main {
    order: 4;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
  }
  .aa-academy-bar > .aa-topbar-actions {
    order: 5;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .aa-brand {
    width: auto;
    max-width: none;
    gap: 0.4rem;
    padding: 0;
  }
  .aa-brand strong {
    display: none;
  }
  .aa-brand img {
    width: 34px;
    height: 34px;
    order: 2;
    background: transparent;
    padding: 0;
    border-radius: 0.35rem;
  }
  .aa-brand-arrow {
    order: 1;
    width: 1.55rem;
    height: 1.55rem;
    margin: 0;
    border-radius: 0.28rem;
    border: 1px solid rgba(0, 163, 163, 0.45);
    color: var(--teal-bright);
    font-size: 0.78rem;
    background: transparent;
  }
  html[data-theme='light'] .aa-brand-arrow {
    border-color: rgba(15, 23, 42, 0.22);
    color: #0f172a;
  }
  .aa-brand-pop {
    right: 0;
    left: auto;
  }
  body.aa-student .aa-menu-btn {
    display: none !important;
  }
}

/* ===== Students page — mobile format (mockup layout, CSS only) ===== */
@media (max-width: 860px) {
  /* Toolbar: filter pills → search | Add / Quick pay stack */
  .aa-toolbar--students {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'filters filters'
      'search add'
      'search quick';
    align-items: stretch;
    gap: 0.45rem 0.5rem;
    width: 100%;
  }
  .aa-toolbar--students .aa-status-filter {
    grid-area: filters;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    width: 100%;
  }
  .aa-toolbar--students .aa-chip-btn {
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    min-height: 2rem;
    font-size: 0.78rem;
    border-color: color-mix(in srgb, var(--aa-logo-menu, #207060) 35%, transparent);
    background: color-mix(in srgb, var(--aa-logo-menu, #207060) 10%, transparent);
    color: var(--text);
  }
  .aa-toolbar--students .aa-chip-btn.is-on {
    background: color-mix(in srgb, var(--aa-logo-menu, #207060) 22%, #ffffff);
    border-color: color-mix(in srgb, var(--aa-logo-menu, #207060) 55%, transparent);
    color: var(--aa-logo-menu-deep, #165048);
    box-shadow: none;
  }
  html[data-theme='light'] .aa-toolbar--students .aa-chip-btn.is-on {
    background: color-mix(in srgb, var(--aa-logo-menu, #207060) 18%, #ffffff);
    color: #0f172a;
  }
  .aa-toolbar--students .aa-stu-search {
    grid-area: search;
    width: 100% !important;
    max-width: none !important;
    min-height: 2.55rem;
    align-self: stretch;
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--surface, #fff) 88%, #94a3b8);
    border-color: rgba(15, 23, 42, 0.12);
  }
  html:not([data-theme='light']) .aa-toolbar--students .aa-stu-search {
    background: rgba(8, 13, 14, 0.88);
    border-color: color-mix(in srgb, var(--aa-logo-menu, #207060) 35%, transparent);
  }
  .aa-toolbar--students .aa-stu-add,
  .aa-toolbar--students .aa-stu-quickpay {
    width: auto !important;
    min-width: 7.6rem;
    min-height: 2.55rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.45rem;
    border: 0;
    white-space: nowrap;
    font-size: 0.8rem;
    background: linear-gradient(
      180deg,
      var(--aa-logo-menu, #207060) 0%,
      var(--aa-logo-menu-deep, #165048) 100%
    ) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--aa-logo-menu, #207060) 30%, transparent);
  }
  .aa-toolbar--students .aa-stu-add {
    grid-area: add;
  }
  .aa-toolbar--students .aa-stu-quickpay {
    grid-area: quick;
  }

  /* Batch tree: hidden until Batch chip is on */
  .aa-stu-tree-pane {
    display: none;
  }
  .aa-stu-tree-pane.is-batch-open,
  .aa-stu-split.is-batch-open .aa-stu-tree-pane {
    display: block;
    position: relative;
    top: 0;
    max-height: min(42vh, 18rem);
    overflow: auto;
    margin: 0 0 0.55rem;
    padding: 0.45rem 0.5rem 0.55rem;
    border: 1px solid color-mix(in srgb, var(--aa-logo-menu, #207060) 28%, transparent);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--surface, #0c1416) 92%, transparent);
  }
  html[data-theme='light'] .aa-stu-tree-pane.is-batch-open,
  html[data-theme='light'] .aa-stu-split.is-batch-open .aa-stu-tree-pane {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
  }
  .aa-stu-split {
    display: block;
  }

  /* Card plate — compact stacked layout */
  .aa-card-grid--students {
    gap: 0.7rem;
  }
  .aa-card-grid--students > .aa-card--student,
  .aa-card--student.has-wallet,
  .aa-card--student.has-per-class {
    --stu-card-min: 4.6rem;
    display: grid !important;
    grid-template-columns: var(--stu-card-min) minmax(0, 1fr);
    grid-template-areas:
      'photo mid'
      'finance finance'
      'footer footer';
    gap: 0.4rem 0.55rem;
    padding: 0.65rem 0.65rem 0.55rem;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--aa-logo-menu, #207060) 22%, transparent);
    background: var(--surface, #0c1416);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }
  html[data-theme='light'] .aa-card-grid--students > .aa-card--student,
  html[data-theme='light'] .aa-card--student.has-wallet,
  html[data-theme='light'] .aa-card--student.has-per-class {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }
  .aa-card-grid--students > .aa-card--student > .aa-stu-photo,
  .aa-card-grid--students > .aa-card--student .aa-stu-photo {
    grid-area: photo;
    width: var(--stu-card-min) !important;
    height: var(--stu-card-min) !important;
    min-width: var(--stu-card-min) !important;
    max-width: var(--stu-card-min) !important;
    min-height: var(--stu-card-min) !important;
    max-height: var(--stu-card-min) !important;
    border-radius: 0.5rem !important;
    border: 0 !important;
    overflow: hidden;
  }
  .aa-card-grid--students > .aa-card--student > .aa-stu-mid {
    grid-area: mid;
    padding: 0 1.5rem 0 0;
    gap: 0.2rem;
    justify-content: flex-start;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-name {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    color: var(--text);
  }
  html[data-theme='light'] .aa-card-grid--students > .aa-card--student .aa-stu-name {
    color: #0f172a !important;
    background: transparent !important;
    border: 0 !important;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-badge {
    border-radius: 999px;
    background: color-mix(in srgb, var(--aa-logo-menu, #207060) 16%, transparent);
    border-color: color-mix(in srgb, var(--aa-logo-menu, #207060) 28%, transparent);
    color: var(--aa-logo-menu, #207060);
    font-size: 0.62rem;
    padding: 0.14rem 0.42rem;
  }
  html[data-theme='light'] .aa-card-grid--students > .aa-card--student .aa-stu-badge {
    background: color-mix(in srgb, var(--aa-logo-menu, #207060) 14%, #ffffff);
    color: #0f4c4c;
  }
  .aa-card-grid--students > .aa-card--student > .aa-stu-finance {
    grid-area: finance;
    width: 100%;
    max-width: none;
    padding: 0;
    gap: 0.4rem;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-finance-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-due-stack,
  .aa-card-grid--students > .aa-card--student .aa-stu-due,
  .aa-card-grid--students > .aa-card--student .aa-stu-due--paid,
  .aa-card-grid--students > .aa-card--student .aa-stu-due--quickpay {
    width: 100%;
    max-width: none;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-due,
  .aa-card-grid--students > .aa-card--student .aa-stu-due--quickpay {
    border-radius: 0.4rem;
    min-height: 2.35rem;
    height: auto;
    padding: 0.4rem 0.45rem 0.4rem 0.55rem;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-icon-row {
    width: 100%;
    max-width: none;
    justify-content: space-between;
    gap: 0.35rem;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-tile {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 2.35rem;
    border-radius: 0.4rem;
    border: 1.5px solid color-mix(in srgb, var(--aa-logo-menu, #207060) 40%, transparent);
    background: transparent;
    color: var(--aa-logo-menu, #207060);
  }
  html[data-theme='light'] .aa-card-grid--students > .aa-card--student .aa-stu-tile {
    border-color: color-mix(in srgb, var(--aa-logo-menu, #207060) 45%, transparent);
    color: #0f4c4c;
    background: #fff;
  }
  .aa-card-grid--students > .aa-card--student .aa-stu-tile--bday:not(.is-off) {
    border-color: color-mix(in srgb, var(--aa-logo-tile, #d0a000) 55%, transparent);
    background: color-mix(in srgb, var(--aa-logo-tile, #d0a000) 28%, #ffffff);
    color: var(--aa-logo-tile-deep, #a07800);
  }
  .aa-card-grid--students > .aa-card--student > .aa-more {
    top: 0.45rem;
    right: 0.4rem;
  }
  .aa-card-grid--students > .aa-card--student > .aa-card-footer {
    grid-area: footer;
  }
}

/* ===== Mobile compact + shared focus-grow pairs (CSS only) ===== */
@media (max-width: 860px) {
  /* Quieter, tighter chrome */
  .aa-main {
    padding: 0.5rem 0.6rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  }
  .aa-panel,
  .aa-period-filter,
  .aa-period-filters,
  .aa-att-mark,
  .aa-att-history {
    padding: 0.7rem 0.7rem 0.75rem;
    border-radius: 0.7rem;
  }
  .aa-att-mark {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  .aa-att-face-bar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
  }
  .aa-att-face-btn {
    width: 100%;
    min-height: 2.55rem;
  }
  .aa-att-face-note {
    font-size: 0.75rem;
    line-height: 1.35;
  }
  .aa-dash-heading,
  .aa-adm-section-title {
    font-size: 0.9rem;
    margin: 0.65rem 0 0.4rem;
  }
  .aa-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    gap: 0.22rem;
  }
  .aa-chip-btn {
    min-height: 2rem;
    padding: 0.32rem 0.65rem;
    font-size: 0.74rem;
  }
  .aa-btn,
  .aa-btn-ghost {
    transition:
      flex 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.18s ease;
  }
  .aa-input,
  .aa-select,
  .aa-date,
  .aa-textarea {
    transition:
      box-shadow 0.22s ease,
      border-color 0.22s ease,
      flex 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Shared grow-pair: focused field lengthens, sibling yields — row width fixed */
  .aa-att-hist-fields,
  .aa-period-filter .aa-period-inputs,
  .aa-period-filters .aa-period-inputs,
  .aa-att-hist-fields #aaAttHistPeriodInputs {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
  }
  .aa-att-hist-fields > .aa-label,
  .aa-att-hist-fields > #aaAttHistPeriodInputs,
  .aa-att-hist-fields #aaAttHistPeriodInputs > .aa-label,
  .aa-period-filter .aa-period-inputs > .aa-label,
  .aa-period-filters .aa-period-inputs > .aa-label {
    margin: 0;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    transition: flex 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .aa-att-hist-fields:focus-within > .aa-label:focus-within,
  .aa-att-hist-fields #aaAttHistPeriodInputs:focus-within > .aa-label:focus-within,
  .aa-period-filter .aa-period-inputs:focus-within > .aa-label:focus-within,
  .aa-period-filters .aa-period-inputs:focus-within > .aa-label:focus-within {
    flex: 1.55 1 calc(50% - 0.25rem);
  }
  .aa-att-hist-fields:focus-within > .aa-label:not(:focus-within),
  .aa-att-hist-fields #aaAttHistPeriodInputs:focus-within > .aa-label:not(:focus-within),
  .aa-period-filter .aa-period-inputs:focus-within > .aa-label:not(:focus-within),
  .aa-period-filters .aa-period-inputs:focus-within > .aa-label:not(:focus-within) {
    flex: 0.7 1 calc(50% - 0.25rem);
  }
  .aa-att-hist-fields:focus-within > #aaAttHistPeriodInputs:not(:focus-within) {
    flex: 0.7 1 calc(50% - 0.25rem);
  }
  .aa-att-hist-fields:focus-within > #aaAttHistPeriodInputs:focus-within {
    flex: 1.55 1 calc(50% - 0.25rem);
  }
  .aa-att-hist-fields > #aaAttHistSearch {
    flex: 1 1 100%;
    width: 100%;
    min-height: 2.45rem;
  }
  .aa-att-hist-fields .aa-input,
  .aa-att-hist-fields .aa-select,
  .aa-period-filter .aa-period-inputs .aa-input,
  .aa-period-filter .aa-period-inputs .aa-select,
  .aa-period-filters .aa-period-inputs .aa-input,
  .aa-period-filters .aa-period-inputs .aa-select {
    width: 100%;
    min-width: 0;
  }
  .aa-att-hist-fields .aa-label:focus-within .aa-input,
  .aa-att-hist-fields .aa-label:focus-within .aa-select,
  .aa-period-filter .aa-period-inputs .aa-label:focus-within .aa-input,
  .aa-period-filter .aa-period-inputs .aa-label:focus-within .aa-select,
  .aa-period-filters .aa-period-inputs .aa-label:focus-within .aa-input,
  .aa-period-filters .aa-period-inputs .aa-label:focus-within .aa-select,
  .aa-form-grid > .aa-label:focus-within .aa-input,
  .aa-form-grid > .aa-label:focus-within .aa-select,
  .aa-adm-grid > .aa-label:focus-within .aa-input,
  .aa-adm-grid > .aa-label:focus-within .aa-select,
  .aa-settings-grid > .aa-label:focus-within .aa-input,
  .aa-settings-grid > .aa-label:focus-within .aa-select {
    border-color: color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 65%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 22%, transparent);
  }

  /* Form grids: 2-up with attendance-style grow (equal flex, no wrap crush) */
  .aa-form-grid,
  .aa-adm-grid,
  .aa-settings-grid {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.45rem;
    grid-template-columns: unset !important;
  }
  .aa-form-grid > .aa-label,
  .aa-adm-grid > .aa-label,
  .aa-settings-grid > .aa-label {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    transition: flex 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .aa-form-grid:focus-within > .aa-label:focus-within,
  .aa-adm-grid:focus-within > .aa-label:focus-within,
  .aa-settings-grid:focus-within > .aa-label:focus-within {
    flex: 1.55 1 0;
  }
  .aa-form-grid:focus-within > .aa-label:not(:focus-within),
  .aa-adm-grid:focus-within > .aa-label:not(:focus-within),
  .aa-settings-grid:focus-within > .aa-label:not(:focus-within) {
    flex: 0.7 1 0;
  }
  .aa-form-grid > .aa-label:has(textarea),
  .aa-form-grid > .aa-label:has(.aa-textarea),
  .aa-form-grid > .aa-label:has(.aa-pw-line),
  .aa-form-grid > .aa-address-block,
  .aa-adm-grid > .aa-label:has(textarea),
  .aa-adm-grid > .aa-label:has(.aa-textarea),
  .aa-settings-grid > .aa-label:has(textarea),
  .aa-settings-grid > .aa-label:has(.aa-textarea) {
    flex: 1 1 100% !important;
  }
  .aa-form-grid > .aa-label .aa-input,
  .aa-form-grid > .aa-label .aa-select,
  .aa-form-grid > .aa-label .aa-date,
  .aa-adm-grid > .aa-label .aa-input,
  .aa-adm-grid > .aa-label .aa-select,
  .aa-settings-grid > .aa-label .aa-input,
  .aa-settings-grid > .aa-label .aa-select {
    width: 100%;
    min-width: 0;
  }

  /* Keep live grids single column (cards) */
  .aa-live-grid {
    grid-template-columns: 1fr !important;
  }

  /* Compact action rows */
  .aa-att-actions {
    gap: 0.4rem;
  }
  .aa-att-actions .aa-chip-btn {
    flex: 1 1 calc(50% - 0.25rem);
  }
  .aa-att-actions .aa-btn {
    flex: 1 1 100%;
  }
  .aa-att-hint {
    font-size: 0.78rem;
    margin: 0 0 0.5rem;
  }
  .aa-att-list {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .aa-att-row {
    min-height: 2.45rem;
    padding: 0.4rem 0.55rem;
  }

  /* Settings — attendance-style pair grow (equal flex, no 50% wrap crush) */
  #aaSettingsBody .aa-form-grid,
  #basicSettingsForm .aa-form-grid,
  #aaSettingsBody .aa-address-block > .aa-form-grid,
  #basicSettingsForm .aa-address-block > .aa-form-grid {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.45rem;
    width: 100%;
    min-width: 0;
    grid-template-columns: unset !important;
  }
  #aaSettingsBody .aa-form-grid > .aa-label,
  #basicSettingsForm .aa-form-grid > .aa-label,
  #aaSettingsBody .aa-address-block > .aa-form-grid > .aa-label,
  #basicSettingsForm .aa-address-block > .aa-form-grid > .aa-label {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    transition: flex 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
  #aaSettingsBody .aa-form-grid:focus-within > .aa-label:focus-within,
  #basicSettingsForm .aa-form-grid:focus-within > .aa-label:focus-within,
  #aaSettingsBody .aa-address-block > .aa-form-grid:focus-within > .aa-label:focus-within,
  #basicSettingsForm .aa-address-block > .aa-form-grid:focus-within > .aa-label:focus-within {
    flex: 1.55 1 0;
  }
  #aaSettingsBody .aa-form-grid:focus-within > .aa-label:not(:focus-within),
  #basicSettingsForm .aa-form-grid:focus-within > .aa-label:not(:focus-within),
  #aaSettingsBody .aa-address-block > .aa-form-grid:focus-within > .aa-label:not(:focus-within),
  #basicSettingsForm .aa-address-block > .aa-form-grid:focus-within > .aa-label:not(:focus-within) {
    flex: 0.7 1 0;
  }
  /* Full-width: address lines, country, social URLs, logo, theme, contacts */
  #aaSettingsBody .aa-form-grid > .aa-label.aa-address-span,
  #basicSettingsForm .aa-form-grid > .aa-label.aa-address-span,
  #aaSettingsBody .aa-address-block > .aa-form-grid > .aa-label.aa-address-span,
  #aaSettingsBody .aa-address-block > .aa-form-grid > .aa-label:has([name='country']),
  #basicSettingsForm .aa-address-block > .aa-form-grid > .aa-label:has([name='country']),
  #aaSettingsBody .aa-form-grid > .aa-label:has([name='website']),
  #aaSettingsBody .aa-form-grid > .aa-label:has([name='facebook']),
  #aaSettingsBody .aa-form-grid > .aa-label:has([name='instagram']),
  #aaSettingsBody .aa-form-grid > .aa-label:has([name='youtube']),
  #basicSettingsForm .aa-form-grid > .aa-label:has([name='website']),
  #basicSettingsForm .aa-form-grid > .aa-label:has([name='facebook']),
  #basicSettingsForm .aa-form-grid > .aa-label:has([name='instagram']),
  #basicSettingsForm .aa-form-grid > .aa-label:has([name='youtube']),
  #aaSettingsBody .aa-form-grid > .aa-label:has(textarea),
  #aaSettingsBody .aa-form-grid > .aa-label:has(.aa-textarea),
  #aaSettingsBody .aa-form-grid > .aa-label:has(.aa-logo-box),
  #aaSettingsBody .aa-form-grid > .aa-label:has(#aaLogoBox),
  #aaSettingsBody .aa-form-grid > .aa-contact-list,
  #aaSettingsBody .aa-form-grid > .aa-contact-pair,
  #aaSettingsBody .aa-form-grid > .aa-address-block,
  #aaSettingsBody .aa-form-grid > div.aa-label,
  #basicSettingsForm .aa-form-grid > div.aa-label {
    flex: 1 1 100% !important;
    max-width: 100%;
  }
  #aaSettingsBody .aa-form-grid > .aa-label .aa-input,
  #aaSettingsBody .aa-form-grid > .aa-label .aa-select,
  #basicSettingsForm .aa-form-grid > .aa-label .aa-input,
  #basicSettingsForm .aa-form-grid > .aa-label .aa-select,
  #aaSettingsBody .aa-address-block .aa-label .aa-input,
  #basicSettingsForm .aa-address-block .aa-label .aa-input,
  #aaSettingsBody .aa-address-block .aa-label #aaAreaHost,
  #basicSettingsForm .aa-address-block .aa-label #aaAreaHost {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }
  #aaSettingsBody .aa-form-grid > .aa-label:focus-within .aa-input,
  #aaSettingsBody .aa-form-grid > .aa-label:focus-within .aa-select,
  #basicSettingsForm .aa-form-grid > .aa-label:focus-within .aa-input,
  #basicSettingsForm .aa-form-grid > .aa-label:focus-within .aa-select,
  #aaSettingsBody .aa-address-block .aa-label:focus-within .aa-input,
  #basicSettingsForm .aa-address-block .aa-label:focus-within .aa-input {
    border-color: color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 65%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 22%, transparent);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
  }

  /* Mobile / email: stack lists; fix dial + number + Edit crush */
  #aaSettingsBody .aa-contact-pair,
  #basicSettingsForm .aa-contact-pair {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  #aaSettingsBody .aa-contact-pair > .aa-contact-list,
  #basicSettingsForm .aa-contact-pair > .aa-contact-list {
    width: 100% !important;
    max-width: 100%;
    flex: 1 1 auto;
  }
  #aaSettingsBody .aa-contact-row,
  #basicSettingsForm .aa-contact-row {
    display: grid;
    grid-template-columns: minmax(5.75rem, 7rem) minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
  }
  #aaSettingsBody .aa-contact-row:not(:has(.aa-dial)),
  #basicSettingsForm .aa-contact-row:not(:has(.aa-dial)) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #aaSettingsBody .aa-contact-row .aa-dial,
  #basicSettingsForm .aa-contact-row .aa-dial {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    max-width: none;
  }
  #aaSettingsBody .aa-contact-row .aa-input[data-contact='mobile'],
  #aaSettingsBody .aa-contact-row .aa-input[data-contact='email'],
  #basicSettingsForm .aa-contact-row .aa-input[data-contact='mobile'],
  #basicSettingsForm .aa-contact-row .aa-input[data-contact='email'] {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    max-width: none;
  }
  #aaSettingsBody .aa-contact-row .aa-btn,
  #basicSettingsForm .aa-contact-row .aa-btn {
    min-height: 2.4rem;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
  }
  #aaSettingsBody .aa-contact-row .aa-input:focus,
  #basicSettingsForm .aa-contact-row .aa-input:focus,
  #aaSettingsBody .aa-contact-row .aa-dial:focus,
  #basicSettingsForm .aa-contact-row .aa-dial:focus {
    border-color: color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 65%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--aa-logo-menu, #00a3a3) 22%, transparent);
  }

  #aaSettingsBody .aa-theme-opt,
  #basicSettingsForm .aa-theme-opt {
    transition:
      transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 0.22s ease,
      border-color 0.22s ease;
  }
  #aaSettingsBody .aa-theme-opt:hover,
  #aaSettingsBody .aa-theme-opt.is-on,
  #basicSettingsForm .aa-theme-opt:hover,
  #basicSettingsForm .aa-theme-opt.is-on {
    transform: translateY(-1px) scale(1.02);
  }
}

.aa-enroll-due-lock {
  margin: 4px 0 0;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  background: rgba(99, 102, 241, 0.12);
  color: inherit;
  overflow-wrap: anywhere;
}

/* ===== Phone navigation — bottom bar + "+" quick actions + More sheet (mobile phase 1) =====
   Built by mobile-nav.js. Desktop (> 860px) never shows it; the sidebar stays as is. */
.aa-bnav,
.aa-bnav-fab { display: none; }
@media (max-width: 860px) {
  body.aa-bnav-on {
    --aa-bnav-h: 3.7rem;
    --aa-bnav-safe: env(safe-area-inset-bottom, 0px);
  }
  body.aa-bnav-on .aa-bnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45; /* above page, below sidebar backdrop (35/40 only when open), modals (50+), sheets, gates */
    display: grid;
    grid-template-columns: repeat(var(--aa-bnav-cols, 5), minmax(0, 1fr));
    align-items: stretch;
    height: calc(var(--aa-bnav-h) + var(--aa-bnav-safe));
    padding: 0 max(0.25rem, env(safe-area-inset-right, 0px)) var(--aa-bnav-safe) max(0.25rem, env(safe-area-inset-left, 0px));
    background: rgba(12, 20, 22, 0.96);
    border-top: 1px solid rgba(0, 163, 163, 0.28);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  html[data-theme='light'] body.aa-bnav-on .aa-bnav {
    background: rgba(255, 255, 255, 0.97);
    border-top-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
  }
  .aa-bnav-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: 0;
    min-height: 44px;
    padding: 0.35rem 0.1rem 0.3rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: 600 0.68rem/1.1 var(--font-body, 'Open Sans', sans-serif);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html[data-theme='light'] .aa-bnav-tab { color: #475569; }
  .aa-bnav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .aa-bnav-ico {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  /* Active: pill behind the icon (Material 3 style) + accent label. */
  .aa-bnav-tab .aa-bnav-ico {
    box-sizing: content-box;
    padding: 0.18rem 0.85rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, color 0.18s ease;
  }
  .aa-bnav-tab.is-active { color: var(--teal-bright, #00c8c8); font-weight: 800; }
  .aa-bnav-tab.is-active .aa-bnav-ico { background: rgba(0, 163, 163, 0.22); }
  html[data-theme='light'] .aa-bnav-tab.is-active { color: #007a7a; }
  html[data-theme='light'] .aa-bnav-tab.is-active .aa-bnav-ico { background: rgba(0, 163, 163, 0.16); }
  .aa-bnav-tab:focus-visible { outline: 2px solid var(--teal-bright, #00c8c8); outline-offset: -4px; border-radius: 0.6rem; }

  /* "+" floats above the bar, bottom-right (Material 3 FAB placement). */
  body.aa-bnav-on .aa-bnav-fab {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: calc(var(--aa-bnav-h) + var(--aa-bnav-safe) + 0.85rem);
    z-index: 46;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 0;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, var(--teal, #00a3a3) 0%, var(--teal-deep, #007a7a) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 163, 163, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
  }
  body.aa-bnav-on .aa-bnav-fab:active { transform: scale(0.94); }
  body.aa-bnav-on .aa-bnav-fab[aria-expanded='true'] svg { transform: rotate(45deg); }
  body.aa-bnav-on .aa-bnav-fab[hidden] { display: none; }
  .aa-bnav-fab svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    transition: transform 0.18s ease;
  }

  /* Drawer replaced by "More": hide the header Menu button only once the bar is live. */
  body.aa-bnav-on .aa-academy-bar .aa-menu-btn,
  body.aa-bnav-on .aa-menu-btn { display: none !important; }
  /* Keep page content clear of the bar and the "+" so the last row can scroll above both. */
  body.aa-bnav-on .aa-main {
    padding-bottom: calc(var(--aa-bnav-h) + var(--aa-bnav-safe) + 5rem) !important;
  }
  /* Out of the way: typing (keyboard up), student portal, account gate, drawer open. */
  body.aa-bnav-typing .aa-bnav,
  body.aa-bnav-typing .aa-bnav-fab,
  body.aa-bnav-student .aa-bnav,
  body.aa-bnav-student .aa-bnav-fab,
  body.aa-student .aa-bnav,
  body.aa-student .aa-bnav-fab,
  body.aa-gate-locked .aa-bnav-fab { display: none !important; }
  body.aa-bnav-typing .aa-main,
  body.aa-student .aa-main { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important; }

  /* Sheets */
  .aa-msheet-bg {
    position: fixed;
    inset: 0;
    z-index: 70; /* over bar/"+"; below confirm dialogs (80), busy (9000), gates (99980+) */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    animation: aa-msheet-fade 0.16s ease;
  }
  .aa-msheet {
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    max-height: min(82vh, 640px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.4rem 0.9rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
    border-radius: 1.1rem 1.1rem 0 0;
    border: 1px solid rgba(0, 163, 163, 0.3);
    border-bottom: 0;
    background: #0f1719;
    color: var(--text);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    animation: aa-msheet-up 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  html[data-theme='light'] .aa-msheet { background: #ffffff; color: #0f172a; border-color: rgba(15, 23, 42, 0.12); }
  .aa-msheet-grip {
    display: block;
    width: 2.4rem;
    height: 0.28rem;
    margin: 0.2rem auto 0.55rem;
    border-radius: 999px;
    background: rgba(247, 244, 236, 0.28);
  }
  html[data-theme='light'] .aa-msheet-grip { background: rgba(15, 23, 42, 0.2); }
  .aa-msheet-title { margin: 0 0 0.55rem; font-size: 1.02rem; font-weight: 800; }
  .aa-msheet-sub {
    margin: 0.85rem 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  html[data-theme='light'] .aa-msheet-sub { color: #64748b; }
  .aa-msheet-list { display: flex; flex-direction: column; gap: 0.1rem; }
  .aa-msheet-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0.45rem 0.6rem;
    border-radius: 0.7rem;
    color: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
  }
  .aa-msheet-row:active,
  .aa-msheet-row:focus-visible { background: rgba(0, 163, 163, 0.14); outline: none; }
  .aa-msheet-row.is-active { background: rgba(0, 163, 163, 0.2); color: var(--teal-bright, #00c8c8); }
  html[data-theme='light'] .aa-msheet-row.is-active { color: #007a7a; }
  .aa-msheet-row .aa-bnav-ico { flex: 0 0 auto; color: var(--teal-bright, #00c8c8); }
  html[data-theme='light'] .aa-msheet-row .aa-bnav-ico { color: #007a7a; }
  .aa-msheet-dot { display: inline-block; position: relative; }
  .aa-msheet-dot::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.4rem;
    height: 0.4rem;
    margin: -0.2rem 0 0 -0.2rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
  }
  .aa-msheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .aa-msheet-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 5.2rem;
    padding: 0.6rem 0.35rem;
    border: 1px solid rgba(0, 163, 163, 0.3);
    border-radius: 0.9rem;
    background: rgba(0, 163, 163, 0.08);
    color: inherit;
    font: 700 0.78rem/1.2 var(--font-body, 'Open Sans', sans-serif);
    text-align: center;
    cursor: pointer;
  }
  .aa-msheet-action .aa-bnav-ico { width: 1.6rem; height: 1.6rem; color: var(--teal-bright, #00c8c8); }
  html[data-theme='light'] .aa-msheet-action .aa-bnav-ico { color: #007a7a; }
  .aa-msheet-action:active,
  .aa-msheet-action:focus-visible { background: rgba(0, 163, 163, 0.2); outline: none; }
  .aa-msheet-close {
    display: block;
    width: 100%;
    min-height: 46px;
    margin-top: 0.85rem;
    border: 1px solid rgba(247, 244, 236, 0.18);
    border-radius: 0.8rem;
    background: transparent;
    color: inherit;
    font: 700 0.92rem var(--font-body, 'Open Sans', sans-serif);
    cursor: pointer;
  }
  html[data-theme='light'] .aa-msheet-close { border-color: rgba(15, 23, 42, 0.16); }
  body.aa-msheet-open { overflow: hidden; }
}
@keyframes aa-msheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes aa-msheet-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .aa-msheet, .aa-msheet-bg { animation: none; }
}
