:root {
  --navy: #0b192c;
  --blue: #0a84ff;
  --cyan: #00d2ff;
  --page: #f4f7fb;
  --muted: #64748b;
  --slate: #475569;
  --line: #e2e8f0;
  --white: #ffffff;
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #ef4444;
  --grad: linear-gradient(110deg, var(--blue), var(--cyan));
  --shadow-sm: 0 2px 10px rgba(11, 25, 44, 0.06);
  --shadow-md: 0 12px 30px rgba(11, 25, 44, 0.1);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--page);
  color: var(--navy);
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.35;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:active {
  transform: translateY(1px);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(10, 132, 255, 0.35);
  border-color: var(--blue);
}

/* ---------- layout ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem max(1.25rem, env(safe-area-inset-left)) calc(4rem + env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-right));
}

.dark-page {
  min-height: 100vh;
  background: radial-gradient(
      1000px 600px at 85% -10%,
      rgba(0, 210, 255, 0.28),
      transparent
    ),
    linear-gradient(160deg, #061223, #0b192c 55%, #0f2744);
  color: var(--white);
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack-lg {
  display: grid;
  gap: 1.75rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.grid > *,
.hero > *,
.two-col > *,
.auth-layout > * {
  min-width: 0;
}

.space-between {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

/* ---------- typography ---------- */

.eyebrow {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
}

.title-xl {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
}

.title-lg {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
}

.title-md {
  font-size: 1.25rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.on-dark-muted {
  color: #cbd5e1;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.btn-primary {
  background: var(--grad);
  color: var(--white);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(10, 132, 255, 0.36);
}

.btn-solid {
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

.btn-quiet:hover {
  color: var(--blue);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* ---------- cards ---------- */

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.card-glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}

.card-link {
  text-align: start;
  width: 100%;
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: grid;
  gap: 0.35rem;
}

.card-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-gradient {
  background: var(--grad);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.stat {
  font-size: 1.9rem;
  font-weight: 800;
}

/* ---------- badges & pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.badge-light {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.badge-cyan {
  background: rgba(0, 210, 255, 0.18);
  border: 1px solid rgba(0, 210, 255, 0.5);
  color: #cff8ff;
}

.badge-blue {
  background: #eaf5ff;
  color: #0a5fbf;
}

.badge-ok {
  background: #e8f8ee;
  color: #15803d;
}

.badge-warn {
  background: #fff4e5;
  color: #b45309;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: max(0.85rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 0.85rem max(1.25rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mobile-menu {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: #eaf1fb;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 700;
}

.nav-toggle-dark {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  white-space: nowrap;
  background: transparent;
  padding: 0;
  color: inherit;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.1rem;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.panel-chrome {
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-chrome .topbar {
  position: static;
}

.brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-nav {
  display: none;
}

.panel-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.45rem max(1.25rem, env(safe-area-inset-right)) 0.55rem max(1.25rem, env(safe-area-inset-left));
}

.panel-nav-inner::-webkit-scrollbar {
  display: none;
}

.panel-nav button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--slate);
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

.panel-nav button:hover {
  background: #eaf1fb;
}

.panel-nav button[aria-current="page"] {
  background: var(--navy);
  color: var(--white);
}

.nav button,
.nav-group-btn {
  background: transparent;
  color: var(--slate);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}

.nav button:hover,
.nav-group-btn:hover {
  background: #eaf1fb;
}

.nav button[aria-current="page"] {
  background: var(--navy);
  color: var(--white);
}

.nav-group {
  position: relative;
}

.nav-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-group.is-current > .nav-group-btn {
  background: #eaf1fb;
  color: var(--navy);
}

.nav-caret {
  font-size: 0.75rem;
  line-height: 1;
}

.nav-group.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 220px;
  padding: 0.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  z-index: 25;
}

.nav-group-account .nav-submenu {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

.nav-group.is-open > .nav-submenu {
  display: grid;
  gap: 0.15rem;
}

.nav-submenu button {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
  white-space: nowrap;
}

/* ---------- attendance ---------- */

.roster {
  display: grid;
  gap: 0.6rem;
}

.roster-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.roster-item[data-status="present"] {
  border-color: rgba(22, 163, 74, 0.45);
  background: #f4fcf7;
}

.roster-item[data-status="late"] {
  border-color: rgba(245, 158, 11, 0.55);
  background: #fff8ee;
}

.roster-item[data-status="absent"] {
  border-color: rgba(239, 68, 68, 0.45);
  background: #fef6f6;
}

.roster-name {
  flex: 1;
  font-weight: 600;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--white);
  background: var(--grad);
  flex-shrink: 0;
}

.toggle-group {
  display: flex;
  gap: 0.35rem;
}

.toggle-group button {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--slate);
  scroll-margin-top: 5.5rem;
  scroll-margin-bottom: 6.5rem;
}

.toggle-group button:active {
  transform: none;
}

.toggle-group button[aria-pressed="true"][data-value="present"],
html[data-theme="dark"] .toggle-group button[aria-pressed="true"][data-value="present"] {
  background: var(--ok);
  color: #fff;
}

.toggle-group button[aria-pressed="true"][data-value="late"],
html[data-theme="dark"] .toggle-group button[aria-pressed="true"][data-value="late"] {
  background: var(--warn);
  color: #1c1404;
}

.toggle-group button[aria-pressed="true"][data-value="absent"],
html[data-theme="dark"] .toggle-group button[aria-pressed="true"][data-value="absent"] {
  background: var(--danger);
  color: #fff;
}

.dropzone {
  border: 2px dashed rgba(10, 132, 255, 0.45);
  border-radius: var(--radius);
  background: #f7fbff;
  padding: 1.75rem;
  text-align: center;
  display: grid;
  gap: 0.75rem;
  place-items: center;
}

.dropzone[data-dragging="true"] {
  background: #eaf5ff;
  border-color: var(--blue);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e5eaf2;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--grad);
  transition: width 0.25s ease;
}

/* ---------- ai output ---------- */

.ai-box {
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #f7fbff;
  border: 1px solid #d6e8fb;
  display: grid;
  gap: 0.6rem;
}

.bio-loading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.spinner {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border: 3px solid rgba(10, 132, 255, 0.25);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.bio-loading-text {
  animation: bio-pulse 1.4s ease-in-out infinite;
}

.ai-box-error {
  background: #fef6f6;
  border-color: rgba(239, 68, 68, 0.45);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bio-pulse {
  50% {
    opacity: 0.45;
  }
}

.ai-box ul,
.plan-list {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.workout-output {
  font-variant-numeric: tabular-nums;
  display: grid;
  gap: 0.5rem;
}

.workout-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

/* ---------- misc ---------- */

.module-art {
  height: 110px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  margin-bottom: 0.9rem;
}

.chart {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  aspect-ratio: 640 / 240;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > span {
  font-weight: 600;
}

.field-error {
  color: #fca5a5;
  font-size: 0.9rem;
}

.checkout-error {
  color: #b91c1c;
  font-size: 0.92rem;
  min-height: 1.2em;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.cart-total {
  align-items: center;
}

.checkbox-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.toast {
  position: fixed;
  inset-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  margin: 0 auto;
  width: max-content;
  max-width: min(90vw, 36rem);
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  text-align: center;
}

.divider {
  height: 1px;
  background: var(--line);
}

.plan-card-featured {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-md);
}

/* ---------- اجزای پلتفرم ---------- */

.hero {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

.hero-cta {
  width: 100%;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.plan-chip {
  gap: 0.2rem;
  min-width: min(240px, 100%);
  flex: 0 1 240px;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filters-bar input {
  flex: 1 1 180px;
  min-width: 0;
}

.filters-bar select {
  flex: 0 1 180px;
  min-width: 0;
  max-width: 100%;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  align-items: end;
  width: 100%;
}

.two-col {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.auth-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-inline: -0.25rem;
  padding: 0.35rem 0.25rem;
  background: linear-gradient(180deg, rgba(6, 18, 35, 0.94), rgba(6, 18, 35, 0.78) 72%, transparent);
}

.journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.journey-step,
.journey-list li {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.journey-step p,
.journey-list span {
  color: #b9c7d6;
  font-size: 0.92rem;
}

.journey-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.plan-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.plan-card-pro {
  border-color: rgba(103, 232, 249, 0.55);
  box-shadow: 0 16px 40px rgba(0, 180, 220, 0.12);
}

.price-figure {
  color: #67e8f9;
  font-size: 1.25rem;
  font-weight: 800;
}

.plan-list-dark {
  color: #e7eef6;
}

.plan-list-dark .is-locked {
  color: #8ea0b5;
}

.closing {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.demo-output {
  border-radius: 14px;
  background: rgba(2, 12, 26, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 1rem;
}

.demo-row {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) minmax(0, 1fr);
  gap: 0.4rem 1rem;
  font-size: 0.93rem;
  color: #e2e8f0;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.kpi {
  display: grid;
  gap: 0.2rem;
}

.kpi-link,
button.plan-chip {
  text-align: start;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 1.5rem;
  font-weight: inherit;
  font-size: inherit;
}

.kpi-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-warn {
  border-color: rgba(245, 158, 11, 0.5);
  background: #fffdf6;
}

.insight {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-radius: 14px;
  background: var(--white);
  border-inline-start: 5px solid var(--blue);
  box-shadow: var(--shadow-sm);
}

.insight-warn {
  border-inline-start-color: var(--warn);
}

.insight-danger {
  border-inline-start-color: var(--danger);
}

.insight-ok {
  border-inline-start-color: var(--ok);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: #e9eef7;
  padding: 0.35rem;
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}

.tabs button {
  background: transparent;
  color: var(--slate);
  font-weight: 700;
  padding: 0.55rem 1.2rem;
}

.tabs button[aria-current="page"] {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.record-head {
  align-items: flex-start;
}

.record-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  max-width: 100%;
}

.empty-record {
  display: grid;
  gap: 0.8rem;
  justify-items: start;
  padding: 1.2rem;
  border: 1px dashed var(--line, #d7e0ee);
  border-radius: 16px;
}

.record-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
}

.record-quick .field {
  min-width: 14rem;
  flex: 1;
}

.student-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  width: 100%;
  text-align: start;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
}

.student-row:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.student-identity {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.student-identity strong {
  overflow-wrap: anywhere;
}

.student-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.student-metric {
  display: grid;
  gap: 0.1rem;
  text-align: center;
  min-width: 0;
  font-size: 0.9rem;
}

.session-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  font-size: 0.9rem;
}

.session-card {
  cursor: pointer;
  text-align: start;
  width: 100%;
}

.session-card:hover {
  border-color: rgba(10, 132, 255, 0.45);
}

.session-card-today {
  border: 2px solid rgba(10, 132, 255, 0.35);
}

.session-workout {
  display: grid;
  gap: 0.6rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.ledger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.coach-row > span:first-child {
  flex: 1;
  min-width: 180px;
}

.manual-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
}

.manual-form {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  align-items: end;
}

.review-gate {
  border: 2px solid rgba(245, 158, 11, 0.55);
  background: #fffdf7;
}

.gate {
  display: grid;
  gap: 0.75rem;
  border: 2px dashed rgba(10, 132, 255, 0.4);
  background: #f7fbff;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  width: 2.6rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex-shrink: 0;
}

.switch-track::after {
  content: "";
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
  top: 0.17rem;
  inset-inline-start: 0.18rem;
  transition: inset-inline-start 0.15s ease;
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid rgba(10, 132, 255, 0.45);
  outline-offset: 2px;
}

.switch input:checked + .switch-track {
  background: var(--blue);
}

.switch input:checked + .switch-track::after {
  inset-inline-start: calc(100% - 1.33rem);
}

.note-timeline {
  display: grid;
  gap: 0.75rem;
}

.note-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--blue);
  border-radius: 14px;
  background: var(--white);
}

.event-advice {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.3rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.86rem;
  background: #f1f5f9;
  color: var(--slate);
}

.chip-present {
  background: #e8f8ee;
  color: #15803d;
}

.chip-late {
  background: #fff4e5;
  color: #b45309;
}

.chip-absent {
  background: #fdecec;
  color: #b91c1c;
}

.code-box {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: #0b192c;
  color: #a5f3fc;
  font-size: 0.82rem;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}

.ghost-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  background: #0b192c;
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.93rem;
}

.site-credit {
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-credit.is-dark {
  color: #94a3b8;
  padding-top: 0.25rem;
  padding-bottom: 0;
}

.ai-status {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.ai-status p,
.ai-status ol {
  margin: 0;
  font-size: 0.95rem;
}

.ai-status-steps {
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.3rem;
}

.ai-status-live {
  background: #edfdf3;
  border-color: #86efac;
}

.ai-status-mock {
  background: #fff7ed;
  border-color: #fdba74;
}

.topbar-admin {
  background: #0b192c;
  border-bottom: 0;
}

.topbar-admin .brand {
  color: #fff;
}

.nav-dark button {
  color: #cbd5e1;
}

.nav-dark button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-dark button[aria-current="page"] {
  background: #fff;
  color: #0b192c;
}

.parent-portal {
  min-height: 100vh;
  background: var(--page);
}

.parent-hero {
  background: linear-gradient(150deg, #061223, #0f2744);
  padding: 2rem 0 2.5rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 44, 0.55);
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  z-index: 60;
}

.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem;
  width: min(640px, 100%);
  max-height: min(85vh, calc(100dvh - 2rem));
  overflow: auto;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.toggle-group {
  flex-wrap: wrap;
}

/* ---------- واکنش‌گرا ---------- */

@media (max-width: 1024px) {
  .nav {
    gap: 0.1rem;
  }

  .nav button {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 800px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand actions toggle"
      "nav nav nav";
    align-items: center;
    gap: 0.5rem 0.75rem;
  }

  .brand {
    grid-area: brand;
    justify-self: start;
    min-width: 0;
  }

  .topbar-actions {
    grid-area: actions;
    margin: 0;
  }

  .nav-toggle {
    display: inline-flex;
    grid-area: toggle;
  }

  .account-label {
    max-width: 5.5rem;
  }

  .nav {
    display: none;
    grid-area: nav;
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.2rem 0 0.35rem;
  }

  .nav button {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
    padding: 0.75rem 1rem;
  }

  .topbar.nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav .nav-group,
  .nav .nav-group-btn {
    width: 100%;
  }

  .nav .nav-group-btn {
    justify-content: space-between;
    border-radius: 12px;
  }

  .topbar-panel .topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.35rem;
    column-gap: 0.5rem;
  }

  .topbar-panel .brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .topbar-panel .brand-name {
    flex: 1 1 auto;
  }

  .topbar-panel .topbar-actions {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    min-width: 0;
    justify-content: space-between;
  }

  .topbar-panel .account-label {
    max-width: 11rem;
  }

  .topbar-panel .nav-group-account .badge {
    display: none;
  }

  .topbar-panel .topbar-actions {
    position: relative;
  }

  .topbar-panel .nav-group-account {
    position: static;
  }

  .topbar-panel .nav-group-account .nav-submenu {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 0.35rem);
    width: auto;
    min-width: 0;
    z-index: 40;
  }

  .topbar-panel .nav-submenu button {
    white-space: normal;
    padding: 0.75rem 1rem;
  }

  .panel-app {
    padding-bottom: calc(6.4rem + env(safe-area-inset-bottom));
  }

  .desk-nav {
    display: none !important;
  }

  .mobile-menu {
    display: none;
    flex: 1 1 100%;
    gap: 0.2rem;
    padding-top: 0.35rem;
  }

  .topbar.nav-open .mobile-menu {
    display: grid;
  }

  .menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
    padding: 0.72rem 0.85rem;
    background: transparent;
    color: inherit;
    font-weight: 700;
    text-align: start;
  }

  .menu-link .dock-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
  }

  .menu-link > span:first-of-type {
    flex: 1;
  }

  .menu-lock .dock-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .menu-link[aria-current="page"] {
    background: var(--navy);
    color: #fff;
  }

  .panel-app .page {
    padding-bottom: 1.25rem;
  }

  .panel-nav {
    display: flex;
    justify-content: center;
    position: fixed;
    inset-inline: 0;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
    z-index: 30;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0.85rem;
    pointer-events: none;
  }

  .panel-nav-inner {
    pointer-events: auto;
    width: min(100%, 28rem);
    max-width: 100%;
    margin: 0;
    gap: 0.15rem;
    padding: 0.32rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 36px rgba(11, 25, 44, 0.18), 0 2px 8px rgba(11, 25, 44, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .panel-nav button {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    width: auto;
    height: auto;
    gap: 0.12rem;
    padding: 0.42rem 0.2rem;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
  }

  .dock-label {
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }

  .dock-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
  }

  .panel-nav button .dock-icon + .dock-icon {
    position: absolute;
    width: 0.72rem;
    height: 0.72rem;
    top: 0.28rem;
    inset-inline-end: 0.28rem;
    padding: 0.08rem;
    border-radius: 999px;
    background: inherit;
  }

  .panel-nav button[aria-current="page"] {
    background: linear-gradient(110deg, #0a84ff, #00d2ff);
    color: #fff;
    box-shadow: 0 6px 16px rgba(10, 132, 255, 0.38);
  }

  .nav .nav-submenu {
    position: static;
    inset: auto;
    min-width: 0;
    margin-top: 0.2rem;
    padding: 0.25rem 0.25rem 0.25rem 0.7rem;
    border: 0;
    box-shadow: none;
    background: #eef3f9;
  }
}

@media (max-width: 900px) {
  .hero,
  .two-col,
  .auth-layout,
  .journey,
  .plan-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .workout-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workout-row > span:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .page {
    padding: 1.15rem max(0.9rem, env(safe-area-inset-left)) calc(3.25rem + env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-right));
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .card,
  .card-glass,
  .card-gradient,
  .card-link {
    padding: 1.05rem;
  }

  .title-xl {
    font-size: clamp(1.4rem, 7.2vw, 2rem);
  }

  .title-lg {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
  }

  .stat {
    font-size: 1.55rem;
  }

  .site-header-actions,
  .hero-cta,
  .row.hero-cta {
    width: 100%;
  }

  .site-header-actions > button {
    flex: 1 1 auto;
  }

  .hero-cta > button {
    flex: 1 1 100%;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .hero-metrics .title-lg {
    font-size: 1.05rem;
  }

  .demo-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .demo-row > span:first-child {
    font-weight: 700;
    color: #67e8f9;
  }

  .tabs {
    width: 100%;
    border-radius: 16px;
  }

  .tabs button {
    flex: 1 1 auto;
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
  }

  .roster-item {
    flex-wrap: wrap;
  }

  .toggle-group {
    width: 100%;
  }

  .toggle-group button {
    flex: 1;
  }

  .student-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem 0.85rem;
  }

  .student-identity {
    grid-column: 2;
  }

  .student-metrics {
    grid-column: 1 / -1;
  }

  .student-row > .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .session-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-row > span:first-child {
    min-width: 0;
  }

  .insight {
    align-items: flex-start;
  }

  .plan-chip {
    flex: 1 1 100%;
  }

  .auth-layout {
    gap: 1.25rem;
  }

  button:not(.btn-quiet):not(.nav button):not(.panel-nav button):not(.tabs button):not(.brand):not(.nav-toggle):not(.toggle-group button):not(.student-row):not(.pref-btn) {
    min-height: 44px;
  }

}

@media (max-width: 420px) {
  .badge {
    font-size: 0.82rem;
    padding: 0.28rem 0.7rem;
  }

  .toast {
    border-radius: 16px;
    width: auto;
  }
}

@media (pointer: coarse) {
  .nav button,
  .tabs button,
  .toggle-group button {
    min-height: 44px;
  }
}

@media (min-width: 801px) {
  .nav-toggle {
    display: none !important;
  }

  .nav {
    flex: 1;
    justify-content: flex-end;
  }

  .nav button {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
  }

  .topbar.nav-open .nav {
    display: flex;
  }
}

.account-label {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.nav-group-account .nav-group-btn {
  width: auto;
  gap: 0.35rem;
}

.pref-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.pref-btn {
  min-height: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.pref-btn.is-on {
  background: #fff;
  color: #0b192c;
}

.pref-gap {
  width: 1px;
  align-self: stretch;
  margin: 0.25rem 0.15rem;
  background: rgba(255, 255, 255, 0.28);
}

.page-tools {
  display: flex;
  justify-content: flex-end;
}

html[data-theme="light"] .pref-switch {
  background: #fff;
  border-color: var(--line);
}

html[data-theme="light"] .pref-btn {
  color: var(--navy);
}

html[data-theme="light"] .pref-btn.is-on {
  background: var(--navy);
  color: #fff;
}

html[data-theme="light"] .pref-gap {
  background: var(--line);
}

html[data-theme="light"] .dark-page {
  background: var(--page);
  color: var(--navy);
}

html[data-theme="light"] .dark-page .card-glass,
html[data-theme="light"] .dark-page .demo-output,
html[data-theme="light"] .dark-page .closing {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
}

html[data-theme="light"] .dark-page .on-dark-muted,
html[data-theme="light"] .dark-page .plan-list-dark,
html[data-theme="light"] .dark-page .demo-row {
  color: var(--muted);
}

html[data-theme="light"] .dark-page .btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}

html[data-theme="light"] .dark-page .btn-white {
  border: 1px solid var(--line);
}

html[data-theme="light"] .dark-page .site-nav {
  background: linear-gradient(180deg, rgba(244, 247, 251, 0.96), rgba(244, 247, 251, 0.8) 70%, transparent);
}

html[data-theme="light"] .dark-page [style*="color:#fff"],
html[data-theme="light"] .dark-page [style*="color:#e2e8f0"],
html[data-theme="light"] .dark-page [style*="color:#baf4ff"],
html[data-theme="light"] .dark-page [style*="color:#94a3b8"] {
  color: #0b192c !important;
}

html[data-theme="light"] .dark-page .hero-metrics .title-lg,
html[data-theme="light"] .dark-page .price-figure {
  color: #0a84ff !important;
}

html[data-theme="light"] .site-credit.is-dark {
  color: var(--muted);
}

html[data-theme="dark"] body {
  background: #07111e;
  color: #e8eef6;
}

html[data-theme="dark"] .topbar {
  background: rgba(7, 17, 30, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .panel-nav {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .panel-nav-inner {
  background: rgba(10, 22, 40, 0.72);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .panel-nav button {
  color: #cbd5e1;
}

html[data-theme="dark"] .panel-nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html[data-theme="dark"] .panel-nav button[aria-current="page"] {
  background: linear-gradient(110deg, #0a84ff, #00d2ff);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 180, 220, 0.35);
}

html[data-theme="dark"] .menu-link[aria-current="page"] {
  background: #fff;
  color: #0b192c;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .card-link,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #122033;
  color: #e8eef6;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .muted,
html[data-theme="dark"] .nav button,
html[data-theme="dark"] .nav-group-btn {
  color: #cbd5e1;
}

html[data-theme="dark"] .nav button:hover,
html[data-theme="dark"] .nav-group-btn:hover,
html[data-theme="dark"] .nav-group.is-current > .nav-group-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html[data-theme="dark"] .nav button[aria-current="page"] {
  background: #fff;
  color: #0b192c;
}

html[data-theme="dark"] .topbar .pref-btn {
  color: #e8eef6;
}

html[data-theme="dark"] .topbar .pref-btn.is-on {
  background: #fff;
  color: #0b192c;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] .insight,
html[data-theme="dark"] .student-row,
html[data-theme="dark"] .session-workout,
html[data-theme="dark"] .ledger-row,
html[data-theme="dark"] .manual-row,
html[data-theme="dark"] .roster-item,
html[data-theme="dark"] .nav-submenu,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .dropzone,
html[data-theme="dark"] .note-item,
html[data-theme="dark"] .ai-box,
html[data-theme="dark"] .workout-row,
html[data-theme="dark"] .ai-status,
html[data-theme="dark"] .parent-portal {
  background: #122033;
  color: #e8eef6;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .ai-box-error {
  background: #2a1214;
  border-color: rgba(239, 68, 68, 0.45);
}

html[data-theme="dark"] .spinner {
  border-color: rgba(0, 210, 255, 0.25);
  border-top-color: #7dd3fc;
}

html[data-theme="dark"] .roster-item[data-status="present"] {
  background: #102418;
  border-color: rgba(22, 163, 74, 0.45);
}

html[data-theme="dark"] .roster-item[data-status="late"] {
  background: #2a2112;
  border-color: rgba(245, 158, 11, 0.5);
}

html[data-theme="dark"] .roster-item[data-status="absent"] {
  background: #2a1214;
  border-color: rgba(239, 68, 68, 0.45);
}

html[data-theme="dark"] .kpi-warn,
html[data-theme="dark"] .review-gate,
html[data-theme="dark"] .ai-status-mock {
  background: #2a2112;
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

html[data-theme="dark"] .gate {
  background: #102033;
  color: #e8eef6;
  border-color: rgba(10, 132, 255, 0.45);
}

html[data-theme="dark"] .ai-status-live {
  background: #102418;
  color: #bbf7d0;
  border-color: rgba(22, 163, 74, 0.45);
}

html[data-theme="dark"] .tabs {
  background: #0d1b2e;
}

html[data-theme="dark"] .tabs button {
  color: #cbd5e1;
}

html[data-theme="dark"] .tabs button[aria-current="page"] {
  background: #1c334d;
  color: #fff;
}

html[data-theme="dark"] .toggle-group button {
  background: #1c334d;
  color: #e8eef6;
}

html[data-theme="dark"] .nav-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #e8eef6;
}

html[data-theme="dark"] .checkout-error {
  color: #fca5a5;
}

html[data-theme="dark"] .btn-quiet {
  color: #cbd5e1;
}

html[data-theme="dark"] .site-credit {
  color: #94a3b8;
}

html[data-theme="dark"] .chart text {
  fill: #e8eef6;
}

html[data-theme="dark"] .chart line {
  stroke: rgba(232, 238, 246, 0.35);
}

.print-sheet {
  display: none;
}

.print-sheet h1,
.print-sheet h2 {
  margin: 0 0 0.6rem;
}

.print-sheet table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
}

.print-sheet th,
.print-sheet td {
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.6rem;
  text-align: start;
}

.print-sheet th {
  background: #f1f5f9;
}

@media print {
  .panel-chrome,
  .panel-nav,
  .site-credit,
  .toast,
  .modal-backdrop,
  .no-print {
    display: none !important;
  }

  body,
  html,
  .panel-app,
  main.page {
    background: #fff !important;
    color: #111 !important;
  }

  .print-sheet {
    display: block !important;
    color: #111;
    background: #fff;
  }
}


/* ---------- Task 4.5.0: بانک تمرین‌ها و تاریخچه تحلیل‌ها ---------- */

.bank-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.bank-filter-q {
  grid-column: 1 / -1;
}

.bank-filter-actions {
  grid-column: 1 / -1;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.bank-card .bank-date {
  font-size: 0.85rem;
}

.bank-snippet {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.bank-empty {
  text-align: center;
  align-items: center;
}

.bank-hint {
  font-size: 0.9rem;
}

.bank-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
}

.analysis-head {
  gap: 0.25rem;
}

.analysis-grid {
  align-items: start;
}

.analysis-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.9rem;
  padding: 0.6rem 0.8rem;
}

.analysis-item > summary {
  cursor: pointer;
  list-style-position: inside;
  gap: 0.5rem;
}

.analysis-body {
  margin-top: 0.6rem;
}

.analysis-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.9;
}

.analysis-parent {
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  padding-top: 0.6rem;
}

.portal-report {
  border-inline-start: 3px solid var(--blue);
  padding-inline-start: 0.8rem;
}

/* Task 4.5.2: parent view tables (attendance, swim times) */
.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.portal-table th,
.portal-table td {
  text-align: start;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-absent {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}
