.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-softer);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn {
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: var(--fs-sm);
  font-weight: 600;
  border: 1px solid transparent;
  transition: opacity 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.btn--primary {
  background: var(--gold-muted);
  color: var(--plum-dark);
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--plum-secondary);
}

.btn--block {
  width: 100%;
  text-align: center;
}

.badge {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
}

.badge--pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge--confirmed,
.badge--completed {
  background: var(--success-bg);
  color: var(--success);
}

.badge--cancelled,
.badge--declined {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- States: loading / empty / error ---------- */

.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  color: var(--text-muted);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-softer);
}

.state-block__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0.7;
}

.skeleton {
  background: linear-gradient(90deg, var(--border-subtle) 25%, var(--surface-card-alt) 50%, var(--border-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.error-banner {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
}

.success-banner {
  background: var(--success-bg);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
}

.text-input,
.reply-input,
.student-select {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-card-alt);
  color: var(--text-dark);
  font-size: var(--fs-sm);
}

.reply-input {
  resize: vertical;
}

/* ---------- Bottom navigation ---------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--warm-white);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  z-index: 30;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}

.bottom-nav__item,
.bottom-nav__item:link,
.bottom-nav__item:visited,
.bottom-nav__item:hover,
.bottom-nav__item:focus,
.bottom-nav__item:active {
  text-decoration: none;
}

.bottom-nav__item.is-active {
  color: var(--gold-muted);
  font-weight: 600;
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* ---------- Language switcher (minimal text, matches main site) ---------- */

.lang-switch {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.lang-switch__sep {
  color: rgba(255, 253, 249, 0.35);
  font-size: var(--fs-sm);
}

.lang-switch__btn {
  border: none;
  background: none;
  padding: 2px;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 253, 249, 0.45);
}

.lang-switch__btn.is-active {
  color: var(--gold-muted);
  font-weight: 700;
}

/* ---------- Logo + wordmark ---------- */

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-lockup__mark {
  height: 46px;
  width: auto;
  display: block;
  /* No background, border, shadow, or frame — sits directly on the app
     background as-is, at its original aspect ratio. */
}

.logo-lockup__wordmark {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--warm-white);
  white-space: nowrap;
}

.logo-lockup__eg {
  color: var(--gold-muted);
}

/* ---------- Header right side: EN/RU, then gymnast mark further right ---------- */

.app-header__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-gymnast-mark {
  height: 26px;
  width: auto;
  display: block;
}

/* ---------- Request-a-session button (bottom of Schedule) ---------- */

.btn--outline-gold {
  background: transparent;
  border: 1px solid var(--gold-muted);
  color: var(--warm-white);
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
}

.btn--outline-gold:hover {
  background: rgba(201, 161, 92, 0.1);
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(53, 24, 39, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--surface-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-5);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }
  .modal {
    border-radius: var(--radius-lg);
  }
}

.field-row {
  margin-bottom: var(--space-3);
}

.field-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.mock-banner-block {
  background: var(--gold-light);
  color: var(--text-dark);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}

/* ---------- Home-specific ---------- */

.child-select {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: 2px;
}

.child-chip {
  border: 1px solid var(--border-subtle);
  background: var(--warm-white);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.child-chip.is-active {
  background: var(--gold-muted);
  color: var(--plum-dark);
  border-color: var(--gold-muted);
  font-weight: 700;
}

.next-session-card {
  background: var(--plum-secondary);
  border: 1px solid rgba(201, 161, 92, 0.35);
  color: var(--warm-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}

.next-session-card .muted {
  color: rgba(255, 253, 249, 0.7);
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.quick-action {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
  text-align: left;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text-dark);
  text-decoration: none;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--gold-light);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold-muted);
  border-radius: 999px;
}

/* ---------- Medals (progress ratings) ---------- */

.medal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.medal-row:last-child {
  border-bottom: none;
}

.medal-row__label {
  font-size: var(--fs-sm);
  color: var(--text-dark);
}

.medal-set {
  display: flex;
  align-items: center;
  gap: 3px;
}

.medal-set__value {
  margin-left: 6px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 600;
  min-width: 26px;
  text-align: right;
}

.medal-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Achievements ---------- */

.achievement-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.achievement-card__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.achievement-card__title {
  font-weight: 600;
  color: var(--text-dark);
  font-size: var(--fs-sm);
}

/* ---------- Calendar ---------- */

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.calendar-header__title {
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--warm-white);
  text-transform: capitalize;
}

.calendar-nav-btn {
  border: none;
  background: rgba(255, 253, 249, 0.08);
  color: var(--warm-white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: var(--fs-md);
  line-height: 1;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 10px;
  color: rgba(255, 253, 249, 0.5);
  text-transform: uppercase;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: rgba(255, 253, 249, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: var(--fs-sm);
  position: relative;
}

.calendar-day--outside {
  color: rgba(255, 253, 249, 0.18);
}

.calendar-day--today {
  border: 1px solid var(--gold-muted);
}

.calendar-day--has-session {
  background: rgba(201, 161, 92, 0.16);
  color: var(--warm-white);
  font-weight: 600;
}

.calendar-day--selected {
  background: var(--gold-muted);
  color: var(--plum-dark);
}

.calendar-day__mark {
  width: 10px;
  height: 10px;
  opacity: 0.9;
}

.calendar-day--selected .calendar-day__mark {
  mix-blend-mode: multiply;
  opacity: 0.6;
}

.calendar-day__count {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 8px;
  color: var(--gold-muted);
  font-weight: 700;
}

.calendar-detail {
  margin-top: var(--space-4);
}

/* ---------- Timezone picker ---------- */

.tz-picker {
  position: relative;
}

.tz-picker__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--fs-sm);
  color: var(--text-dark);
  text-align: left;
}

.tz-picker__chevron {
  font-size: 10px;
  color: var(--text-muted);
}

.tz-picker__panel {
  margin-top: 6px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}

.tz-picker__list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 6px;
}

.tz-picker__option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 6px;
  font-size: var(--fs-sm);
  color: var(--text-dark);
  border-radius: 6px;
}

.tz-picker__option.is-selected {
  color: var(--plum-secondary);
  font-weight: 700;
  background: var(--surface-card-alt);
}

/* ---------- Collapsible training entries ---------- */

.training-row {
  cursor: pointer;
}

.training-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.training-row__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.training-row__chevron {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.training-row__chevron.is-open {
  transform: rotate(90deg);
}

.training-row__detail {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.training-group-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 253, 249, 0.5);
  margin: var(--space-4) 0 var(--space-2);
}

/* ================= Admin shell (sidebar/topbar) + shared form/list bits ================= */

.view-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: var(--space-4);
}

.task-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.request-card,
.reply-form {
  display: flex;
  flex-direction: column;
}

.reply-block {
  background: var(--surface-card-alt);
  border-left: 3px solid var(--gold-muted);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: var(--fs-sm);
  color: var(--plum-secondary);
}

.composer-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-4);
}

.compact-card {
  padding: 12px;
}

/* ---- Admin app shell ---- */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--plum-secondary);
  min-height: 100vh;
}

.sidebar__subtitle {
  color: rgba(255, 253, 249, 0.5);
  font-size: 11px;
  padding: 0 20px 12px;
  letter-spacing: 0.06em;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.nav-item {
  text-align: left;
  border: none;
  background: none;
  color: rgba(255, 253, 249, 0.75);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}
.nav-item.is-active {
  background: rgba(201, 161, 92, 0.16);
  color: var(--gold-muted);
}

.shell__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar__title {
  font-weight: 600;
  color: var(--text-dark);
}

.main {
  padding: 24px;
  flex: 1;
  background: var(--surface-bg);
  overflow-x: hidden;
}

.admin-stat-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  max-width: 720px;
}

@media (max-width: 900px) {
  .sidebar {
    width: 76px;
  }
  .sidebar .logo-lockup__wordmark,
  .sidebar__subtitle,
  .nav-item span,
  .nav-item {
    font-size: 10px;
  }
  .main {
    padding: 14px;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ---- Login screen ---- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: var(--surface-bg);
}

.login-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-soft);
}

.login-card__logo {
  display: block;
  height: 64px;
  margin: 0 auto 12px;
}

.login-demo-hint {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-subtle);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  display: flex;
  align-items: center;
  padding: 16px;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
}
