/* 01-core.css — part 01/10 of the ordered bp bundle (the former single bp.css,
   split by surface; the content is UNREORDERED). ORDER IS LOAD-BEARING: cascade ties
   resolve by document order, so hosts must link 01→10 in exactly this sequence —
   CssHygieneTests pins both the list and the order in both hosts. */

/* Foundation pattern components + the page-specific blocks that predate the per-surface split.
   Source of visual values: docs/design (the claude.ai/design handoff bundles) — on conflicts the
   handoff is authoritative. All colours/radii/shadows via var(--…) from tokens.css — no inline
   colour literals. Where a surface's classes live is decided by the bundle part, not by a list
   here: each part's own header names its surface; grep the class name across bp/ to find it.
   No Blazor scoped CSS anywhere in the cabinet — most blocks cross component boundaries. */

/* ── 1. Page header (паттерн №1) ─────────────────────────────────────────── */
.rp-ph {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.rp-ph-text {
  flex: 1;
  min-width: 0;
}

.rp-ph-eyebrow {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}

.rp-ph-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}

.rp-ph-subtitle {
  font-size: 13.5px;
  color: var(--muted-foreground);
  margin: 0;
}

.rp-ph-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Mobile: actions wrap below the title and go full-width */
@media (max-width: 390px) {
  .rp-ph {
    flex-wrap: wrap;
  }
  .rp-ph-text {
    width: 100%;
  }
  .rp-ph-title {
    font-size: 19px;
  }
  .rp-ph-actions {
    width: 100%;
    flex-shrink: 1;
  }
  .rp-ph-actions > * {
    flex: 1;
  }
}

/* ── 3. Section card (паттерн №3) ────────────────────────────────────────── */
.rp-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}

.rp-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.rp-card-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.rp-card-header-action {
  display: flex;
  align-items: center;
}

.rp-card-body {
  padding: 20px;
}

/* ── 12. Status chips (паттерн №12) ──────────────────────────────────────── */
/* A chip is a pill of fixed height on ONE line: `white-space: nowrap` + `flex-shrink: 0` are part of the
   primitive, not a per-call-site fix. Without them a long label («Отличная связь · TCP») wrapped to three
   lines inside the 48px room top bar and overflowed it, and a shrinking chip clipped its own text.
   Fall-through tone: the base carries --secondary, so a bare `.rp-chip` (no --info/--success/… modifier)
   is a legible neutral pill rather than transparent text — the room's stage overlays are bare chips and
   read over a light slide sheet. */
.rp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.rp-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.rp-chip--info    { background: var(--info-muted);        color: var(--info-muted-foreground); }
.rp-chip--success { background: var(--success-muted);     color: var(--success-muted-foreground); }
.rp-chip--warning { background: var(--warning-muted);     color: var(--warning-muted-foreground); }
.rp-chip--danger  { background: var(--destructive-muted); color: var(--destructive-muted-foreground); }
.rp-chip--neutral { background: var(--secondary);         color: var(--muted-foreground); }

/* ── 9. Context badge (паттерн №9) ───────────────────────────────────────── */
.rp-ctx {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
}

.rp-ctx--info    { background: var(--accent);        color: var(--accent-foreground); }
.rp-ctx--warning { background: var(--warning-muted); color: var(--warning-muted-foreground); }

/* ── 8. Empty state (паттерн №8) ─────────────────────────────────────────── */
.rp-empty2 {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 40px 24px;
  text-align: center;
}

.rp-empty2-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--muted);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-empty2-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.rp-empty2-desc {
  font-size: 14px;
  color: var(--muted-foreground);
  margin: 0 0 18px;
}

.rp-empty2-action {
  display: flex;
  justify-content: center;
}

/* ── 2. Hub tabs (паттерн №2) ────────────────────────────────────────────── */
/* Desktop: underlined nav strip */
.rp-tabs-underline {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.rp-tab {
  padding: 14px 6px;
  margin-right: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; /* sit on top of container border */
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.rp-tab--active {
  font-weight: 600;
  color: var(--foreground);
  border-bottom-color: var(--primary);
}

/* Mobile chip row (hidden by default; shown ≤640 px) */
.rp-tabs-chips {
  display: none;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.rp-tabs-chips::-webkit-scrollbar { display: none; }

.rp-tab-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--secondary);
  color: var(--secondary-foreground);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.rp-tab-chip--active {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Mobile segment control — «icon + short label», full width (hidden by default; shown ≤640 px).
   Used when RpHubTab carries Icon/Short (Финансы.dc.html); grid-template-columns set inline to
   repeat(N,1fr) by the component. */
.rp-tabs-seg {
  display: none;
  gap: 2px;
  margin: 10px 12px 4px;
  padding: 3px;
  background: var(--muted);
  border-radius: var(--radius-lg);
}

.rp-tabs-seg-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px 6px;
  border: 0;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}

.rp-tabs-seg-tab--active {
  font-weight: 700;
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

.rp-tabs-seg-ico {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rp-tabs-seg-lbl { white-space: nowrap; }

@media (max-width: 640px) {
  .rp-tabs-underline { display: none; }
  .rp-tabs-chips     { display: flex; }
  .rp-tabs-seg       { display: grid; }
}

/* ── 5. Submit button with spinner (паттерн №5) ──────────────────────────── */
.rp-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-width: 130px;
  /* Also applied to <a> (the accept-invite sign-in CTA), which would otherwise underline. */
  text-decoration: none;
}

.rp-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.rp-btn-submit--full { width: 100%; }

/* Canonical small secondary button (4th canon class besides submit/danger/textlink): a standalone
   action that must READ as a button — banner CTAs, row actions, empty-state secondaries. Sized to
   sit inside a rp-banner-card (10px vertical padding) without inflating it. For an action woven
   into running text or a dense label→value row, use rp-btn-textlink instead — an outline button
   there overloads the line (см. гибридную схему кнопок, аудит 2026-08-21). */
.rp-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  /* Also applied to <a> (e.g. the empty-state «Пригласить ученика» link). */
  text-decoration: none;
}
.rp-btn-outline:hover:not(:disabled) { background: var(--secondary); }
.rp-btn-outline:disabled { opacity: 0.6; cursor: default; }

/* ── 10. Balance widget (паттерн №10) ────────────────────────────────────── */
/* Compact inline pill */
.rp-bal-compact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}

.rp-bal-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.rp-bal-num {
  font-size: 14px;
  font-weight: 600;
}

.rp-bal-label {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Full card */
.rp-bal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 20px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
}

.rp-bal-card-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.rp-bal-card-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.rp-bal-card-num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rp-bal-card-meta {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* Low-balance warning strip (Home widget only — /pay's own RpBalanceCard has no such state). */
.rp-bal-warning {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--warning-muted-foreground);
  background: var(--warning-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

/* margin-top: auto pins the button to the card's bottom edge (.rp-bal-card is a flex column) so it
   still lines up with a sibling grid card of different height (e.g. RpNextLessonCard). */
.rp-bal-topup {
  width: 100%;
  height: 38px;
  margin-top: auto;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Full balance card (RpBalanceCard) — /pay only, distinct from the compact rp-bal-* pill/card above. */
.rp-balcard {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 20px;
}

.rp-balcard-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.rp-balcard-body { flex: 1; min-width: 180px; }
.rp-balcard-name { font-size: 14.5px; font-weight: 600; }

.rp-balcard-policy {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.rp-balcard-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.rp-balcard-num-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-content: flex-end;
}

.rp-balcard-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rp-balcard-word {
  font-size: 13.5px;
  color: var(--muted-foreground);
}

.rp-balcard-toggle {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.rp-balcard-history {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 6px 20px;
  margin-top: 12px;
}

/* Balance-history rows (RpBalanceHistory) — no outer chrome, composes into rp-balcard-history above. */
.rp-balhist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 13.5px;
}

.rp-balhist-row + .rp-balhist-row {
  border-top: 1px solid var(--border);
}

.rp-balhist-date { color: var(--muted-foreground); width: 86px; flex-shrink: 0; }
.rp-balhist-desc { flex: 1; }
.rp-balhist-delta { font-weight: 700; color: var(--foreground); }
.rp-balhist-delta--plus { color: var(--success); }

@media (max-width: 640px) {
  .rp-balcard { padding: 16px; gap: 10px 12px; }
  .rp-balcard-avatar { display: none; }
  .rp-balcard-body { order: 2; flex-basis: 100%; }
  .rp-balcard-count {
    order: 1;
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .rp-balcard-num-row { justify-content: flex-start; }
  .rp-balcard-toggle { margin-left: auto; }
}

/* ── 4. Table → cards — payments list (паттерн №4 / Оплата.dc.html) ─────── */
.rp-payrow-desktop {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.rp-payrow-head {
  display: grid;
  grid-template-columns: 110px 1fr 110px 110px 90px;
  gap: 12px;
  padding: 10px 20px;
  background: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.rp-payrow {
  display: grid;
  grid-template-columns: 110px 1fr 110px 110px 90px;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  align-items: center;
}

.rp-payrow-date   { color: var(--muted-foreground); }
.rp-payrow-title  { font-weight: 500; }
.rp-payrow-amount { font-weight: 600; }

.rp-payrow-receipt {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  font-size: 13px;
}

.rp-payrow-receipt--none {
  color: var(--muted-foreground);
}

/* Mobile card-per-row — hidden by default, shown ≤640px (same switch as rp-tabs-underline/chips) */
.rp-payrow-cards {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.rp-payrow-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 13px 14px;
}

.rp-payrow-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rp-payrow-card-title {
  font-size: 13.5px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-payrow-card-amount {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.rp-payrow-card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.rp-payrow-card-date { font-size: 12px; color: var(--muted-foreground); }
.rp-payrow-card-spacer { flex: 1; }

.rp-payrow-card-receipt {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

@media (max-width: 640px) {
  .rp-payrow-desktop { display: none; }
  .rp-payrow-cards   { display: flex; }
}

/* ── 11. Product card (паттерн №11) ──────────────────────────────────────── */
.rp-prod-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Featured variant (FeaturedTag set) — border tints toward --primary, matching the "Выгодно" card. */
.rp-prod-card--featured {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

/* Ribbon — absolute top-left, overhangs the card's top border. */
.rp-prod-tag {
  position: absolute;
  top: -9px;
  left: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 999px;
  padding: 2px 9px;
}

.rp-prod-cover {
  height: 120px;
  overflow: hidden;
  background: var(--muted);
  flex-shrink: 0;
}

.rp-prod-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rp-prod-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rp-prod-kind {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-foreground);
  margin-bottom: 14px;
}

/* Explicit KindTone overrides the accent default above (e.g. warning for «Курс»). */
.rp-prod-kind--info    { background: var(--info-muted);        color: var(--info-muted-foreground); }
.rp-prod-kind--success { background: var(--success-muted);     color: var(--success-muted-foreground); }
.rp-prod-kind--warning { background: var(--warning-muted);     color: var(--warning-muted-foreground); }
.rp-prod-kind--danger  { background: var(--destructive-muted); color: var(--destructive-muted-foreground); }
.rp-prod-kind--neutral { background: var(--secondary);         color: var(--muted-foreground); }

.rp-prod-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

.rp-prod-desc {
  font-size: 13.5px;
  color: var(--muted-foreground);
  margin: 0 0 16px;
}

.rp-prod-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 16px;
}

.rp-prod-price {
  font-size: 24px;
  font-weight: 700;
}

.rp-prod-subprice {
  font-size: 12px;
  color: var(--muted-foreground);
}

.rp-prod-buy {
  margin-top: auto;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
/* Выключенная кнопка должна ЧИТАТЬСЯ выключенной: «Вы уже записаны» оставалась той же синей CTA
   с cursor:pointer, и клик по ней молча ничего не делал. */
.rp-prod-buy:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: default;
}

/* ── 12. Top-bar widgets (паттерн №12) ───────────────────────────────────── */
/* Shared primitives */
.rp-tbw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  /* Чат.dc.html: primary, not destructive — an unread count isn't an error state. */
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  top: -5px;
  right: -5px;
  border: 2px solid var(--card);
}

.rp-tbw-empty {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Schedule dropdown (compact rework): fixed 260px so long student names truncate instead of
   stretching the menu; single-line rows — tabular HH:mm, 14px muted format icon, ellipsis name.
   Day captions «Сегодня»/«Завтра» are lowercase in markup and uppercased here. */
.rp-tbw-sched-menu { width: 260px; }

.rp-tbw-sched-cap {
  padding: 6px 10px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.rp-tbw-sched-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.rp-tbw-sched-row__time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.rp-tbw-sched-row svg {
  flex-shrink: 0;
  color: var(--muted-foreground);
}

/* Spec 11.5: the column now carries two lines — the label (as before) and an optional context row
   («Курс „X" · Поток „Y"», LessonContext.Short). Each line keeps its own single-line ellipsis. */
.rp-tbw-sched-row__name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rp-tbw-sched-row__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-tbw-sched-row__ctx {
  font-size: 11px;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Live section — a lesson in progress right now, one click from entering its room. */
.rp-tbw-sched-cap--live { color: var(--success-muted-foreground); }
.rp-tbw-sched-row__time { display: inline-flex; align-items: center; gap: 6px; }
.rp-tbw-sched-item--live .rp-tbw-sched-row__label { font-weight: 600; }
.rp-tbw-sched-enter {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--success-muted-foreground);
}

.rp-tbw-overflow {
  padding: 4px 14px 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.rp-tbw-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rp-tbw-row__head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rp-tbw-row__title {
  font-size: 13.5px;
  font-weight: 600;
}

.rp-tbw-row__meta {
  font-size: 12px;
  color: var(--muted-foreground);
}

.rp-tbw-row__meta--clamp {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-tbw-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  /* Чат.dc.html: primary, not destructive — matches .rp-tbw-badge above. */
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* Чат.dc.html's dropdown footer ("Открыть все чаты") is a primary-coloured 13.5px/600 call to
   action, not a regular muted menu row. Verified against the rendered menu-item markup: its own
   Tailwind classes (blazorblueprint.css, loaded before bp.css per App.razor) never set `color`
   directly on the item — it only inherits `text-popover-foreground` from the dropdown-content
   ancestor — so this rule is the sole `color` source for the element and needs no !important;
   `font-size` does collide with the item's own `.text-sm` utility class, but same-specificity +
   later-in-cascade (bp.css after blazorblueprint.css) settles it the same way. */
.rp-tbw-footer-link {
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 600;
}

/* Schedule widget — handoff: 38px framed box, clock icon in --primary,
   two lines: muted 10.5px eyebrow + 12.5px semibold value. */
.rp-tbw-schedule {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
  position: relative;
}

.rp-tbw-schedule > svg {
  color: var(--primary);
  flex-shrink: 0;
}

.rp-tbw-schedule__lines {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
}

.rp-tbw-schedule__label {
  font-size: 10.5px;
  color: var(--muted-foreground);
}

.rp-tbw-schedule__value {
  font-size: 12.5px;
  font-weight: 600;
}

/* Chat button — handoff: 38×38 framed square on --card, badge overhangs the corner. */
.rp-tbw-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  position: relative;
}

/* AI credits — a 38px framed dropdown trigger that blends in with the other top-bar buttons
   (mirrors .rp-tbw-chat). Shows the Available count always but quietly (neutral, no fill) —
   an earlier accent-filled chip was rolled back by owner feedback as too loud. The count gains
   colour via --low (amber) and --empty (red) below; on mobile the count is hidden entirely
   unless one of those states is active (media query at the end of this block). */
.rp-tbw-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 38px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted-foreground);
  text-decoration: none;
  cursor: pointer;
}
.rp-tbw-ai:hover { color: var(--foreground); }

.rp-tbw-ai__count {
  font-size: 12.5px;
  font-weight: 700;
}

/* Running low — amber nudge (tokens fall back to a fixed amber if the theme lacks them). */
.rp-tbw-ai--low {
  border-color: color-mix(in srgb, var(--warning, #b45309) 45%, var(--border));
  background: var(--warning-muted, color-mix(in srgb, var(--warning, #b45309) 12%, var(--card)));
  color: var(--warning-foreground, #b45309);
}

/* Exhausted — destructive, the one state that genuinely blocks AI features. */
.rp-tbw-ai--empty {
  border-color: color-mix(in srgb, var(--destructive) 45%, var(--border));
  background: color-mix(in srgb, var(--destructive) 12%, var(--card));
  color: var(--destructive);
}

/* The dropdown itself: a narrow two-column label number table plus a muted refresh-date row.
   Widths/paddings echo rp-menu items so the menu reads as one system with the chat menu. */
.rp-tbw-ai-menu { width: 220px; }

.rp-tbw-ai-menu__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--foreground);
}

.rp-tbw-ai-menu__num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rp-tbw-ai-menu__note {
  padding: 2px 10px 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.rp-tbw-ai-menu__zero {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--destructive);
}

/* Mobile: icon-only trigger in the normal state — the number lives in the menu. Low/empty keep
   the count visible: that is exactly when the tutor must notice it without opening anything. */
@media (max-width: 640px) {
  .rp-tbw-ai:not(.rp-tbw-ai--low):not(.rp-tbw-ai--empty) .rp-tbw-ai__count { display: none; }
}

/* Role switcher — handoff: 38px framed box on --card, 7px primary dot + 13px/500 label. */
.rp-tbw-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.rp-tbw-role__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.rp-tbw-role__label {
  font-size: 13px;
}

/* User profile — handoff: borderless 38px button, 30px primary-filled avatar + chevron. */
.rp-tbw-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.rp-tbw-profile__avatar {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary);
  color: var(--primary-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
}

.rp-tbw-profile__header {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rp-tbw-profile__name {
  font-size: 13.5px;
  font-weight: 600;
}

.rp-tbw-profile__email {
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Sign-in link (unauthenticated) */
.rp-tbw-signin {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* Radius reconciliation after bb-compat.css's removal (П-20). landing-utilities.css (Tailwind v3,
   un-layered, linked before Blueprint) fixes .rounded-md/.rounded-lg at 6px/8px, which now beats
   Blueprint's @layer v4 values (8px/10px via --radius) on every Bb internal that carries these
   utilities — dropdown/autocomplete popovers, dropzones. Restore the token values for the cabinet
   chrome; the :not() keeps the SITE PREVIEW on the v3 values, because that is exactly what the
   public site renders (bb-compat used to force v4 radii onto the preview too — a fidelity quirk,
   not a feature). Spacing/border utilities need no such pair: their v3 and v4 values are equal. */
.rounded-md:not(.rp-site-surface *) { border-radius: calc(var(--radius) * 0.8); }
.rounded-lg:not(.rp-site-surface *) { border-radius: var(--radius); }

/* Bb dropdown-menu skin (rp-menu) — blueprint-pitfalls.md П-20 follow-up.
   BbDropdownMenuItem ships flex+items-center but NO icon↔text gap, and its item padding
   (Tailwind px-2 py-1.5 = 8px/6px) undershoots the handoff row padding (Чат.dc.html unread-
   messages dropdown: rows padding 9px 10px) — dropdowns still read as cramped even after
   bb-compat.css restored the Mud-zeroed Tailwind utilities. rp-menu is the ONE shared skin
   applied to every BbDropdownMenuContent in the shell (TopBarUserMenu, TopBarScheduleWidget,
   TopBarChatButton, TopBarRoleSwitcher, ChatConversation's kebab).
   DOM shape (BlazorBlueprint.Components 3.13.0, confirmed via ilspycmd decompile — Class=
   on BbDropdownMenuContent lands on the outer <div role="menu">, not on the inner wrapper):
   the item list actually sits one level deeper, inside an unconditional Tailwind `.p-1` div
   the component renders around ChildContent. `.rp-menu > div` zeroes THAT wrapper's own
   padding so the 6px below (Чат.dc.html container recipe) is the only inset — otherwise the
   two would stack into a 10px gutter. */
.rp-menu {
  padding: 6px;
  min-width: 200px;
  /* Above the fixed BottomNav (z-100), below the more-sheet (200): Bb's own z-50 left every in-page
     dropdown UNDER the mobile bottom bar — a module/lesson kebab opened downward near the bottom of a
     short screen lost its «Удалить» behind the bar (владелец, 2026-08-03, прод-скриншот). */
  z-index: 120;
}

/* The z-index above is NOT enough on its own: Bb wraps the content in its own POSITIONED wrapper div
   (absolute + z-50, the [data-positioned] element the primitives JS moves around), which creates a
   stacking context — .rp-menu's 120 competes only INSIDE it, while against the bottom nav it is the
   wrapper's 50 that loses to 100. The wrapper carries no class, so it is addressed through :has()
   (same trick as the icon-picker portal rule below); !important because Bb stamps z-index inline on
   some wrappers (П-15). This is an in-page wrapper, not the portal — portal z-handles stay unreliable. */
div:has(> .rp-menu) {
  z-index: 120 !important;
}

.rp-menu > div {
  padding: 0;
}

/* BbDropdownMenuItem renders role="menuitem" on both its <div> and Href <a> variants. */
.rp-menu [role=menuitem] {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.rp-menu [role=menuitem]:hover {
  /* Чат.dc.html uses --secondary for row hover, not Tailwind's default hover:bg-accent. */
  background: var(--secondary);
}

/* BbDropdownMenuLabel renders role="presentation" — the handoff's uppercase muted section
   header idiom ("Сообщения" atop the unread-messages dropdown). */
.rp-menu [role=presentation] {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* BbDropdownMenuSeparator renders role="separator" with its own Tailwind -mx-1 (sized to the
   now-zeroed .p-1 wrapper's old 4px padding) — replace with a margin sized to OUR 6px inset so
   the rule still spans edge-to-edge. */
.rp-menu [role=separator],
.rp-menu hr {
  margin: 6px -6px;
}

/* Messages dropdown only (Чат.dc.html container recipe: width 320px) — combine with rp-menu,
   never baked into the shared skin (every other consumer keeps rp-menu's own min-width). */
.rp-tbw-chat-menu {
  width: 320px;
}

/* ─── SidebarNav ───────────────────────────────────────────────────────────── */

.rp-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
}

/* Each nav link — base state */
.rp-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  color: var(--foreground);
  background: transparent;
  transition: background 0.12s;
}

.rp-nav__item:hover {
  background: var(--accent);
}

/* Active item: accent background + foreground colour */
.rp-nav__item--active {
  background: var(--accent);
  color: var(--accent-foreground);
  font-weight: 500;
}

.rp-nav__item__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

.rp-nav__item--active .rp-nav__item__icon {
  color: var(--accent-foreground);
}

.rp-nav__item__label {
  flex: 1;
}

/* Task 12 — sidebar nav pill (grading-queue count / chat unread). Declarations are a verbatim
   copy of .rp-tbw-unread-badge (Чат.dc.html's pill token) minus its own positioning context —
   comma-joined so the two never drift; MoreSheet's pill shares the same rule. */
.rp-nav__badge,
.rp-more-sheet__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* Admin section divider + section heading */
.rp-nav__divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.rp-nav__section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  margin-bottom: 4px;
}

/* UX wave 5: muted caption row over each tutor sidebar group (NavItem.Group). Smaller and
   lighter than the admin section heading - a hint, not a divider. */
.rp-nav__group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px 2px;
  margin-top: 10px;
}

/* ─── BottomNav ────────────────────────────────────────────────────────────── */

.rp-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  padding: 8px 6px 10px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

/* Each item — all rendered as <button> for uniform hit targets */
.rp-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px;
  min-height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted-foreground);
  font: inherit;
  text-decoration: none;
}

.rp-bottom-nav__item--active {
  color: var(--primary);
}

/* Icon wrapper — positions the unread dot */
.rp-bottom-nav__icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Unread chat dot */
.rp-bottom-nav__dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--destructive);
  border: 1.5px solid var(--card);
}

.rp-bottom-nav__label {
  font-size: 10.5px;
  font-weight: 400;
}

.rp-bottom-nav__item--active .rp-bottom-nav__label {
  font-weight: 600;
}

/* ─── MoreSheet ────────────────────────────────────────────────────────────── */

/* Full-screen semi-transparent backdrop */
.rp-more-sheet__overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--foreground) 40%, transparent);
  z-index: 200;
}

/* Slide-up panel */
.rp-more-sheet__panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: var(--popover);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 10px 16px 26px;
  box-shadow: var(--shadow-lg);
}

/* Drag handle */
.rp-more-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 6px auto 14px;
}

.rp-more-sheet__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* 2-column grid of sheet items */
.rp-more-sheet__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rp-more-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--secondary);
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.rp-more-sheet__item__icon {
  width: 19px;
  height: 19px;
  display: inline-flex;
  flex-shrink: 0;
  color: var(--muted-foreground);
}

/* Task 12 — label wrapper takes the remaining row width so a badge pill lands flush right,
   mirroring .rp-nav__item__label. */
.rp-more-sheet__item__label {
  flex: 1;
}

/* Admin section divider + heading inside the «Ещё» sheet */
.rp-more-sheet__divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0 8px;
}

/* ─── App shell (MainLayout / FocusLayout) ─────────────────────────────────
   Source: App-shell.dc.html. Mobile-first: compressed top-bar + bottom nav;
   ≥768px flips to sidebar 246px + right column (top-bar 64px + content).
   Responsive switching is PURE CSS — the layout renders one markup tree. */

.rp-shell {
  display: flex;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
}

/* Sidebar — hidden on mobile, sticky column on desktop */
.rp-shell__sidebar {
  display: none;
}

.rp-shell__sidebar-head {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  flex-shrink: 0;
}

.rp-shell__sidebar-spacer {
  flex: 1;
}

.rp-shell__sidebar-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.rp-shell__sidebar-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  text-decoration: none;
}

/* Right column */
.rp-shell__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top bar — 56px compressed on mobile, 64px on desktop */
.rp-shell__topbar {
  position: sticky;
  top: 0;
  z-index: 90; /* below the bottom nav (100) and the more-sheet (200) */
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.rp-shell__topbar-spacer {
  flex: 1;
}

/* Wide-only widget group (schedule, AI credits, role switcher) */
.rp-shell__topbar-wide {
  display: none;
}

/* Mobile-only mode section inside the avatar menu (see TopBarUserMenu) — display:contents so the
   items sit in the menu's own flow; hidden on desktop in the ≥768px block below. */
.rp-tbw-profile__modes {
  display: contents;
}

/* Brand mark + word (sidebar head on desktop, top-bar on mobile/anonymous) */
.rp-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.rp-shell__brand img {
  display: block;
}

.rp-shell__brand-word {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.rp-shell__brand--sidebar .rp-shell__brand-word {
  font-size: 15.5px;
}

/* Content — bottom padding clears the fixed BottomNav on mobile */
.rp-shell__content {
  flex: 1;
  padding: 18px 16px 90px;
  background: var(--background);
}

.rp-shell__content-inner {
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .rp-shell__sidebar {
    display: flex;
    flex-direction: column;
    width: 246px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--card);
    border-right: 1px solid var(--border);
  }

  .rp-shell__topbar {
    height: 64px;
    padding: 0 24px;
    gap: 14px;
  }

  /* display:contents — the widgets join the top-bar flex row with its own gap */
  .rp-shell__topbar-wide {
    display: contents;
  }

  /* Desktop has the dedicated TopBarRoleSwitcher widget — the avatar menu's mode section is the
     mobile substitute only, so it drops out here rather than duplicating the switcher. */
  .rp-tbw-profile__modes {
    display: none;
  }

  /* Authorized brand lives in the sidebar on desktop */
  .rp-shell__brand--mobile {
    display: none;
  }

  .rp-shell__content {
    padding: 28px;
  }

  /* Mobile-only chrome */
  .rp-bottom-nav {
    display: none;
  }

  .rp-more-sheet__overlay,
  .rp-more-sheet__panel {
    display: none;
  }
}

/* Focus mode (FocusLayout) — bare canvas, no chrome */
.rp-focus-layout {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
}

/* ── Auth pages (Экраны.dc.html · Экран A) ───────────────────────────────
   Centred brand + card on --background, reused by all 7 anonymous auth
   pages (sign-in, sign-up, registered, password reset, invite, self-signup).
   Below 640px the card chrome drops away (fields sit directly on the page,
   matching the prototype's mobile column). Colours via tokens only. */
.rp-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 32px 20px;
}

.rp-auth__inner {
  width: 100%;
  max-width: 400px;
}

.rp-auth__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-decoration: none;
}

.rp-auth__brand img {
  width: 44px;
  height: 44px;
}

.rp-auth__brand-word {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.rp-auth__card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.rp-auth__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 4px;
}

.rp-auth__subtitle {
  font-size: 13.5px;
  color: var(--muted-foreground);
  text-align: center;
  margin: 0 0 22px;
}

/* Server-error / notice blocks above the submit button */
.rp-auth__error {
  background: var(--destructive-muted);
  color: var(--destructive-muted-foreground);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  margin: 4px 0 14px;
}

/* Sign-in offer under a duplicate-account rejection (e.g. SelfSignupPage) — separates the
   clickable way out from the server's own rejection text above it. */
.rp-auth__error-action {
  margin-top: 6px;
}

.rp-auth__notice {
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13.5px;
  margin: 0 0 14px;
}

/* Footer link row under the card */
.rp-auth__foot {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted-foreground);
  margin: 20px 0 0;
}

.rp-auth__foot a,
.rp-auth__link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.rp-auth__foot a:hover,
.rp-auth__link:hover {
  text-decoration: underline;
}

/* Spacing helpers for stacked auth form fields */
.rp-auth__field + .rp-auth__field {
  margin-top: 14px;
}

/* Hand-built field (the slug input-group) — label/hint metrics match BbFormFieldInput's own
   (text-sm font-medium label, muted 13px description) so the form reads as one family. */
.rp-auth__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 8px;
}

.rp-auth__hint {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-top: 6px;
}

.rp-auth__fielderror {
  display: block;
  font-size: 13px;
  color: var(--destructive);
  line-height: 1.5;
  margin-top: 6px;
}

.rp-auth__text {
  font-size: 14px;
  color: var(--foreground);
  margin: 0 0 14px;
}

/* Anchor styled as the primary submit button (button-less confirmation pages) */
a.rp-btn-submit {
  text-decoration: none;
}

.rp-auth__check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--foreground);
  cursor: pointer;
}

.rp-auth__actions {
  margin-top: 18px;
}

.rp-auth__divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* External sign-in (ExternalAuthButtons: Яндекс ID today). Column of full-width buttons below
   the .rp-auth__divider above. */
.rp-extauth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Metrics match .rp-btn-submit (height, radius, weight, full width) so the block reads as one
   family with the form above it; colours are per-provider (see the --yandex modifier) rather
   than the design-token palette, since a provider's own button is not ours to retheme.
   Also applied to a real <button> (the native-launcher branch, ExternalAuthButtons.razor): border/
   font/cursor reset it to the <a>'s look, the same trio .rp-btn-submit already carries for the same
   reason. */
.rp-extauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.rp-extauth-btn img {
  flex-shrink: 0;
}

/* Яндекс ID brand button: black background, white text, the vendored orange/white mark —
   fixed by the provider's own design guide (yandex.ru/dev/id/doc/ru/codes/buttons-design),
   not to be re-themed for dark mode. */
.rp-extauth-btn--yandex {
  background: #000000;
  color: #ffffff;
}

.rp-extauth-btn--yandex:hover {
  background: #1a1a1a;
}

@media (max-width: 640px) {
  .rp-auth__card {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }
}

