/* 09-admin.css — part 09/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. */

/* ── Admin shell (rp-adm*, wave 8 Task 3 — AdminPageHeader + hub-page CSS-каркас for T4–T8,
   Админ-обзор.dc.html) ──────────────────────────────────────────────────────────────────── */

.rp-adm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.rp-adm-head h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.rp-adm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--warning-muted);
  color: var(--warning-muted-foreground);
  white-space: nowrap;
}
.rp-adm-head__spacer { flex: 1; }

/* KPI card grid (/admin Обзор — the 4 top-level stat tiles). */
.rp-adm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

/* Stat tile — the whole card is a link (Админ-обзор.dc.html §stats). */
.rp-adm-tile {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--foreground);
  transition: border-color 0.15s ease;
}
.rp-adm-tile:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.rp-adm-tile__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.rp-adm-tile__row { display: flex; align-items: baseline; gap: 8px; }
.rp-adm-tile__value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rp-adm-tile__sub { font-size: 12.5px; font-weight: 600; }
.rp-adm-tile__sub--success { color: var(--success-muted-foreground); }
.rp-adm-tile__sub--muted   { color: var(--muted-foreground); }
.rp-adm-tile__sub--danger  { color: var(--destructive-muted-foreground); }

/* Email-failures banner-link (visible only when EmailFailures > 0). */
.rp-adm-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border));
  background: var(--warning-muted);
  color: var(--warning-muted-foreground);
  border-radius: var(--radius-lg);
  padding: 11px 16px;
  margin-bottom: 22px;
  text-decoration: none;
}
.rp-adm-alert__text { flex: 1; font-size: 13px; }
.rp-adm-alert__cta { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* "Новые тенанты" / "Последние ошибки" — two bordered list-cards, side by side on desktop. */
.rp-adm-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rp-adm-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}
.rp-adm-list__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.rp-adm-list__title { font-size: 14px; font-weight: 700; flex: 1; }
.rp-adm-list__link { font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
.rp-adm-list-empty { padding: 16px 18px; font-size: 13px; color: var(--muted-foreground); }

/* One row skin for both list kinds: tenant rows use -avatar/-plan, error rows use -dot; both share
   -body/-title/-sub/-meta. Both are `<a>` (clickable to their own detail page — T8 made the
   «Новые площадки» rows link into /admin/tenants/{id}, matching the error rows' existing anchor). */
.rp-adm-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--foreground);
}
.rp-adm-list-row:last-child { border-bottom: 0; }
a.rp-adm-list-row:hover { background: var(--secondary); }
.rp-adm-list-row__avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.rp-adm-list-row__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--border);
}
.rp-adm-list-row__dot--active { background: var(--destructive); }
.rp-adm-list-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rp-adm-list-row__title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-adm-list-row__title--mono { font-family: var(--font-mono); font-size: 13px; }
.rp-adm-list-row__sub {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-adm-list-row__plan {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--muted);
  color: var(--muted-foreground);
  white-space: nowrap;
  /* Long plan names («Профессиональный») exceed the grid column: without max-width+ellipsis the
     pill gets hard-clipped mid-letter by the cell (wave-8 live smoke finding). */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.rp-adm-list-row__meta {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Generic grid-таблица shell for hub pages (T5 «Пользователи», T6 «Подписки», T7 «Ошибки») —
   each page sets its own column widths via a `--adm-cols` custom property on a modifier class
   (e.g. `.rp-adm-table--tenants { --adm-cols: 100px 1fr 120px 90px; }`) instead of a bespoke
   grid-template-columns per hub, mirroring rp-fin-table/-thead/-row. */
.rp-adm-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}
.rp-adm-table__head,
.rp-adm-table__row {
  display: grid;
  grid-template-columns: var(--adm-cols, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.rp-adm-table__head {
  padding: 10px 18px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.rp-adm-table__row { text-decoration: none; color: var(--foreground); }
.rp-adm-table__row:last-child { border-bottom: 0; }
.rp-adm-table__row:hover { background: var(--secondary); }

/* Mobile card fallback for rp-adm-table (same per-hub-modifier pattern, mirrors rp-fin-cards). */
.rp-adm-cards { display: none; flex-direction: column; gap: 9px; }
.rp-adm-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 13px 15px;
}

/* ── /admin/tenants hub (T5) ──────────────────────────────────────────────────────────────── */

.rp-adm-panel { padding-top: 4px; }

.rp-adm-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.rp-adm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 340px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted-foreground);
}
.rp-adm-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 13.5px;
}
.rp-adm-toolbar-spacer { flex: 1; }
.rp-adm-count { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }

/* Per-hub column widths for the three /admin/tenants tabs (last column = kebab, omitted for the
   read-only «Ученики» tab). */
.rp-adm-table--tenants  { --adm-cols: 1.5fr 1.1fr 90px 90px 90px 140px 40px; }
.rp-adm-table--users    { --adm-cols: 1.3fr 1.4fr 1.3fr 1fr 100px 40px; }
.rp-adm-table--students { --adm-cols: 1.3fr 1fr 110px 130px 110px; }

/* Generic cell content, reused across the three tables. */
.rp-adm-cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-adm-cell-main {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-adm-cell-sub {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-adm-cell-mono { font-family: var(--font-mono); }
.rp-adm-cell-right { text-align: right; font-variant-numeric: tabular-nums; }
.rp-adm-cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rp-adm-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--muted);
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.rp-adm-rolechips { display: flex; gap: 4px; flex-wrap: wrap; }

/* Row action cell — a BbDropdownMenu trigger, mirrors rp-tm-kebab (TestsPage). */
.rp-adm-rowact { display: flex; justify-content: center; }
.rp-adm-kebab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}
.rp-adm-kebab:hover { background: var(--secondary); color: var(--foreground); }

/* "Показать ещё" — RpShowMore, the one pagination affordance (grows the caller's local `take`
   and re-fires ComputeState). Was six per-page copies of this exact recipe (rp-adm-more,
   rp-pay-more, rp-ann-more, rp-tm-more, rp-course-enr-more, rp-fin-more) plus three
   rp-btn-textlink variants; all render this class now. */
.rp-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.rp-more:hover { background: var(--secondary); color: var(--foreground); }

/* Mobile card body (rp-adm-card's own content — T4 only sets the outer card shell above). */
.rp-adm-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-adm-card-title {
  font-size: 13.5px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-adm-card-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 3px; }

/* Tenant-name links into /admin/tenants/{id} — inherit cell colour, underline on hover only. */
.rp-adm-tenant-link { color: inherit; text-decoration: none; }
.rp-adm-tenant-link:hover { text-decoration: underline; }

/* Balance-of-lessons figure — bold weight (unlike the plain rp-adm-cell-right student-count column);
   zero tints destructive-muted (mockup's balColor rule). */
.rp-adm-balance { font-weight: 600; }
.rp-adm-balance--zero { color: var(--destructive-muted-foreground); }

/* «Приглашения» collapsed section on the «Ученики» tab — native <details>, no JS. */
.rp-adm-accordion {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}
.rp-adm-accordion-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}
.rp-adm-accordion-summary::-webkit-details-marker { display: none; }
.rp-adm-accordion-count { font-weight: 500; color: var(--muted-foreground); }
.rp-adm-accordion-body { border-top: 1px solid var(--border); padding: 4px 0; }

.rp-adm-invtable { display: flex; flex-direction: column; }
.rp-adm-invtable__head,
.rp-adm-invtable__row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 100px 100px 100px;
  gap: 12px;
  align-items: center;
  padding: 9px 18px;
}
.rp-adm-invtable__head {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.rp-adm-invtable__row { border-top: 1px solid var(--border); font-size: 12.5px; }

@media (max-width: 640px) {
  .rp-adm-stats { grid-template-columns: repeat(2, 1fr); }
  .rp-adm-table { display: none; }
  .rp-adm-cards { display: flex; }
  .rp-adm-lists { grid-template-columns: 1fr; }

  .rp-adm-search { max-width: none; }
  .rp-adm-count { display: none; }

  .rp-adm-invtable__head { display: none; }
  .rp-adm-invtable__row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 16px;
  }
}

/* ── /admin/finance hub (T6) ──────────────────────────────────────────────────────────────── */

/* «Подписки» tab: 4 KPI tiles reuse rp-adm-stats/-tile as plain divs (no href — no per-tile drill
   target here, unlike /admin Обзор's tiles). A tile with a single figure and no delta gets its tone
   on the VALUE itself rather than on a -sub caption (there's nothing to caption). */
.rp-adm-tile__value--warning { color: var(--warning-muted-foreground); }
.rp-adm-tile__value--danger  { color: var(--destructive-muted-foreground); }

.rp-adm-filterbar {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--muted);
  border-radius: var(--radius-md);
}
.rp-adm-filter {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}
.rp-adm-filter--active {
  font-weight: 600;
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

/* «План» column is minmax so long plan names («Профессиональный») get room before the pill
   falls back to its own ellipsis (wave-8 live smoke finding). */
.rp-adm-table--subs { --adm-cols: 1.4fr minmax(100px, max-content) 130px 130px 110px 40px; }

/* «Оплачено до» cell tone — mirrors the row's status tone (rp-adm-cell-sub is the neutral default). */
.rp-adm-cell-tone--warning { color: var(--warning-muted-foreground); }
.rp-adm-cell-tone--danger  { color: var(--destructive-muted-foreground); }

/* ── «Планы и монетизация» tab ────────────────────────────────────────────────────────────── */

.rp-adm-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 920px;
  margin-bottom: 10px;
}
.rp-adm-plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-adm-plan-head { display: flex; align-items: center; gap: 8px; }
.rp-adm-plan-name { font-size: 14.5px; font-weight: 700; flex: 1; }
.rp-adm-plan-count { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }

.rp-adm-plan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rp-adm-plan-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--muted);
  color: var(--muted-foreground);
}

.rp-adm-plans-savebar { margin: 12px 0 4px; }
.rp-adm-plans-savebtn {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.rp-adm-plans-savebtn:disabled { opacity: 0.6; cursor: default; }
.rp-adm-plans-caption { font-size: 12px; color: var(--muted-foreground); margin-top: 8px; }

/* Generic labelled-input field pair — plan cards + the bottom AI-billing trio. */
.rp-adm-field { display: block; min-width: 0; }
.rp-adm-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--muted-foreground);
}
.rp-adm-field-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.rp-adm-field-hint { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }

/* Section headers shared by packs / promos / AI-billing. */
.rp-adm-section { margin-bottom: 28px; }
.rp-adm-section-head { display: flex; align-items: center; margin-bottom: 12px; gap: 12px; }
.rp-adm-section-title { font-size: 15px; font-weight: 700; }
.rp-adm-section-sub { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
.rp-adm-addbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rp-adm-addbtn:hover { opacity: 0.92; }

.rp-adm-table--packs  { --adm-cols: 1fr 110px 110px 70px 40px; }
.rp-adm-table--promos { --adm-cols: 130px 1fr 120px 100px 70px 40px; }

.rp-adm-billing-fields { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; max-width: 720px; }
.rp-adm-billing-fields .rp-adm-field { flex: 1; min-width: 160px; }

/* Hand-rolled 36×21 switch (RpAdminSwitch.razor) — see П-9 note on the component. */
/* .rp-adm-switch geometry is in the canonical toggle block (global controls section); only the
   disabled state is component-specific. */
.rp-adm-switch:disabled { cursor: not-allowed; opacity: 0.6; }

/* A dialog's own "Активен" field: label + switch as a flex row inside one rp-scard-dlg-field cell. */
.rp-adm-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-adm-switchrow .rp-sched-dlg-label { margin-bottom: 0; }

@media (max-width: 640px) {
  .rp-adm-plans-grid { grid-template-columns: 1fr; }
  .rp-adm-section-head { flex-wrap: wrap; }
}

/* ── /admin/errors hub (T7) ───────────────────────────────────────────────────────────────── */

/* «Ошибки» tab (Ошибки и Email-сбои.dc.html): reuses rp-adm-filterbar/-filter(--active) verbatim
   for the Новые/Все/Решённые segment (T6 precedent) plus a compact native select (rp-adm-select)
   for the ErrorSource filter — the old MudToggleGroup's "Все/API/WASM/MAUI" labels, kept as a
   select per the task brief rather than a second segment row (no room for two segment bars on
   mobile); rp-adm-toolbar--wrap lets that combined toolbar row wrap under rp-adm-toolbar without
   touching the class every other hub's toolbar shares. rp-adm-table gains --adm-cols modifier
   rp-adm-table--errors (7 cols: when / exception+message / route / tenant / count / status /
   chevron); the trailing chevron cell (rp-adm-chevron, a centered muted glyph) is purely
   decorative — the row itself is the click target, an anchor wrapping rp-adm-table__row exactly
   like AdminIndex's rp-adm-list-row. Mobile cards reuse rp-adm-card verbatim, also wrapped in an
   anchor — a.rp-adm-card resets link styling (text-decoration/color) the same way a.rp-adm-list-row
   already does. rp-adm-note is the small "показаны первые N из M" honest-truncation caption (no
   "Показать ещё" here per the brief — take is a fixed 100).
   Деталь (ErrorDetail.razor): rp-adm-back is the "← Ошибки" pill button; rp-adm-detail-head/
   -title-wrap/-title/-msg lay out the ExceptionType(mono)+Message header next to the "Отметить
   решённой" button (reuses rp-adm-addbtn — same primary-filled recipe as the packs/promos "+"
   button, T6). rp-adm-metachips/-metachip(-k/-v) is the bordered pill row for non-empty meta
   fields (Маршрут/Тенант/Пользователь/Источник/Браузер/CorrelationId/Когда) — a chip only renders
   when its field is non-null (ErrorDetail.razor's own filter), never shown empty. rp-adm-panel-card
   (-head/-title/-body) is the generic bordered-card shell reused by both the Stack trace block
   (rp-adm-stacktrace + rp-adm-copybtn) and the "Повторы этой группы" block (rp-adm-repeats-row +
   rp-adm-repeats-more "Показать все N →" link, which expands the already-fetched list client-side —
   no second read).
   «Email-сбои» tab: rp-adm-table--email is its --adm-cols modifier (6 cols); rp-adm-rowbtn is the
   per-row "Повторить" button (also reused, full-width, on the ≤640px card); rp-adm-retryall is the
   toolbar's "Повторить все неотправленные" button (same bordered recipe as rp-adm-rowbtn plus an
   icon gap + disabled-while-busy dimming). rp-adm-empty-success(-icon/-title) is a dedicated
   success-toned empty state ("Все письма доставлены") — NOT the dashed rp-empty2/RpEmpty look;
   mirrors rp-asg-empty's success-circle recipe (Задания.dc.html) but kept in this file's rp-adm-*
   namespace since it's a different feature. */

.rp-adm-toolbar--wrap { flex-wrap: wrap; row-gap: 8px; }

.rp-adm-select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.rp-adm-table--errors { --adm-cols: 110px 1.8fr 1fr 1fr 70px 110px 24px; }
.rp-adm-table--email  { --adm-cols: 110px 1.3fr 1.1fr 1.5fr 80px 110px; }

.rp-adm-chevron { display: flex; justify-content: center; color: var(--muted-foreground); }

a.rp-adm-card { text-decoration: none; color: inherit; cursor: pointer; display: block; }

.rp-adm-note { font-size: 12px; color: var(--muted-foreground); margin: 12px 2px 0; }

/* Second-echelon pagination (Task 7): the honest cap note that replaces "Показать ещё" once a
   growing admin list page hits the mirrored client-side AdminPageCap (500, matching the server's
   Math.Clamp(take, 1, 500)) — see AdminUsersPanel/AdminTenantsPanel/AdminStudentsPanel/
   AdminSubscriptionsPanel. Deliberately its own class (not rp-adm-note) per the task brief, even
   though the look is the same recipe. */
.rp-admin-cap-note { color: var(--muted-foreground); font-size: .85rem; padding: 8px 0; }

.rp-adm-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted-foreground);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 12px;
}
.rp-adm-back:hover { color: var(--foreground); background: var(--secondary); }

.rp-adm-detail-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rp-adm-detail-title-wrap { flex: 1; min-width: 260px; }
.rp-adm-detail-title { font-size: 17px; font-weight: 700; font-family: var(--font-mono); letter-spacing: -0.01em; }
.rp-adm-detail-msg { font-size: 13.5px; color: var(--muted-foreground); margin-top: 3px; }

.rp-adm-metachips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rp-adm-metachip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12px;
}
.rp-adm-metachip-k { color: var(--muted-foreground); }
.rp-adm-metachip-v { font-weight: 600; font-family: var(--font-mono); font-size: 11.5px; }

.rp-adm-panel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 14px;
}
.rp-adm-panel-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}
.rp-adm-panel-card-title { font-size: 13px; font-weight: 700; flex: 1; }
.rp-adm-panel-card-body { padding: 14px 18px; }

.rp-adm-copybtn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.rp-adm-copybtn:hover { background: var(--secondary); color: var(--foreground); }

.rp-adm-stacktrace {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-foreground);
  overflow-x: auto;
  background: var(--background);
  white-space: pre;
}

.rp-adm-repeats-row {
  font-size: 12.5px;
  color: var(--muted-foreground);
  padding: 3px 0;
}
.rp-adm-repeats-more {
  display: block;
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 3px 0;
  font-family: inherit;
  text-align: left;
}

.rp-adm-retryall {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  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;
  white-space: nowrap;
}
.rp-adm-retryall:hover { background: var(--secondary); }
.rp-adm-retryall:disabled { opacity: 0.6; cursor: default; }

.rp-adm-rowbtn {
  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: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rp-adm-rowbtn:hover { border-color: var(--primary); color: var(--primary); }
.rp-adm-rowbtn:disabled { opacity: 0.6; cursor: default; }

.rp-adm-empty-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.rp-adm-empty-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success-muted);
  color: var(--success-muted-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.rp-adm-empty-success-title { font-size: 15px; font-weight: 700; }

@media (max-width: 640px) {
  .rp-adm-detail-head { flex-wrap: wrap; }
  .rp-adm-back { margin-bottom: 10px; }
}

/* ── PlatformBannerCard (rp-banner-card*, wave 8 Task 8 — Баннеры.dc.html) ───────────────────
   Shared banner look, deliberately its own prefix rather than rp-adm* — PlatformBannerCard.razor
   is reused OUTSIDE /admin too (PlatformBanner.razor in MainLayout, every cabinet page). Tone
   modifiers rp-banner-card--info/--warning (background/foreground/border from the --info-muted
   and --warning-muted token pairs + a color-mix border tint, matching the mockup's preview alert box); -icon
   (leading Lucide triangle-alert/info), -body (title+text stack), -title/-text with a --placeholder
   modifier for the admin publish page's live-preview empty state (muted italic "Заголовок баннера"/
   "Текст баннера" so the preview never looks broken while the form is empty — the real MainLayout
   consumer never hits this branch), -close (the dismiss crestik, rendered only when the caller wires
   OnDismiss). PlatformBanner.razor wraps its list in rp-banner-list (flex column, gap — per-card
   spacing the shared component itself doesn't assume, since the admin preview renders a single card
   with no list wrapper at all). */
.rp-banner-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.rp-banner-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.rp-banner-card--warning {
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border));
  background: var(--warning-muted);
  color: var(--warning-muted-foreground);
}
.rp-banner-card--info {
  border: 1px solid color-mix(in srgb, var(--info) 40%, var(--border));
  background: var(--info-muted);
  color: var(--info-muted-foreground);
}
/* Whole-card click target (SubscriptionBanner → /subscription): the outlined button stays the
   visible affordance, the cursor is the only extra hint — no hover repaint on a tinted card. */
.rp-banner-card--clickable { cursor: pointer; }
.rp-banner-card__icon { flex-shrink: 0; display: inline-flex; margin-top: 1px; }
.rp-banner-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-banner-card__title { font-size: 13px; font-weight: 700; line-height: 1.4; }
.rp-banner-card__text { font-size: 13px; line-height: 1.5; }
.rp-banner-card__text p { margin: 0; }
.rp-banner-card__title--placeholder,
.rp-banner-card__text--placeholder { opacity: 0.65; font-style: italic; }
.rp-banner-card__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
}
.rp-banner-card__close:hover { opacity: 1; }
/* Outline-CTA под текстом баннера (__body — flex column): не растягивать на всю ширину и дать
   небольшой отступ от текста. */
.rp-banner-card__body .rp-btn-outline { align-self: flex-start; margin-top: 4px; }

/* ── /admin/platform-announcements «Баннеры» (rp-ban*, wave 8 Task 8) ────────────────────────
   Two-column publish layout (SiteAppearancePanel's controls/preview split, reused for a banner
   instead of a whole landing page): rp-ban-grid (420px/1fr, collapses to one column <760px per the
   task brief — the dedicated breakpoint below, distinct from the shell's 768px / the rp-adm-table
   640px table-to-cards cutoff). rp-ban-form wraps the form in the generic rp-adm-panel-card shell;
   rp-ban-form-row is the Тип/Аудитория two-up sub-grid. rp-adm-field-input gains a --textarea
   modifier (auto height, resize:vertical, line-height) reused by the "Текст" field. rp-ban-preview
   (-eyebrow/-frame/-note) hosts the live PlatformBannerCard plus the mockup's dimmed page-skeleton
   (rp-ban-preview-skeleton/-skel-thumb/-skel-lines/-skel-line, opacity .45 + per-line width
   modifiers --60/--85/--70, exactly the mockup's "rest of the page" placeholder under the banner).
   History reuses rp-adm-table with a new --adm-cols modifier rp-adm-table--banners (Текст/Тип/
   Аудитория/Период/Статус/kebab) — mobile cards are read-only (no action), matching both the
   mockup and the T5/T6 no-kebab-on-mobile-card precedent (AdminTenantsPanel/AdminPlansPanel). */
.rp-ban-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 20px;
  margin-bottom: 26px;
  align-items: start;
}

.rp-ban-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.rp-adm-field-input--textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }

.rp-ban-preview-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}
.rp-ban-preview-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  padding: 14px;
}
.rp-ban-preview-skeleton { display: flex; gap: 10px; opacity: 0.45; margin-top: 10px; }
.rp-ban-preview-skel-thumb {
  width: 130px;
  height: 88px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}
.rp-ban-preview-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.rp-ban-preview-skel-line { height: 10px; background: var(--muted); border-radius: 4px; }
.rp-ban-preview-skel-line--60 { height: 14px; width: 60%; }
.rp-ban-preview-skel-line--85 { width: 85%; }
.rp-ban-preview-skel-line--70 { width: 70%; }
.rp-ban-preview-note { font-size: 12px; color: var(--muted-foreground); line-height: 1.6; margin: 10px 2px 0; }

.rp-adm-table--banners { --adm-cols: 1.8fr 130px 130px 150px 90px 40px; }

@media (max-width: 760px) {
  .rp-ban-grid { grid-template-columns: 1fr; }
}

/* ── rp-banner-card--success/--danger (wave 9 Task 1) ─────────────────────────────────────────
   The --warning/--info tone modifiers above predate wave 9; --success/--danger complete the set
   so PlatformBannerCard (and any wave-9 replacement of a MudBlazor success/error Alert) can reuse
   the same card shape for a positive or destructive tone, matching the --success/--destructive
   muted token pairs used elsewhere (rp-chip--success/--danger, rp-prod-kind--success/--danger). */
.rp-banner-card--success {
  border: 1px solid color-mix(in srgb, var(--success) 40%, var(--border));
  background: var(--success-muted);
  color: var(--success-muted-foreground);
}
.rp-banner-card--danger {
  border: 1px solid color-mix(in srgb, var(--destructive) 40%, var(--border));
  background: var(--destructive-muted);
  color: var(--destructive-muted-foreground);
}


/* ── «Сменить адрес сайта» dialog (AdminRenameSlugDialog) ─────────────────────────────────────
   Input + static «.repetitum.ru» suffix, mirroring the sign-up slug group: the visible suffix is
   what keeps an admin from pasting the full domain into the slug field (the incident this feature
   exists for). The input reuses the shared rp-sched-dlg-input surface. */
.rp-adm-slugrow { display: flex; align-items: stretch; }
.rp-adm-slugrow .rp-sched-dlg-input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.rp-adm-slugsuffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 14px;
  white-space: nowrap;
}
.rp-adm-slughint {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-top: 8px;
}

/* ── «Управление подпиской» dialog (AdminSubscriptionDialog) ──────────────────────────────────
   Four action labels («Продлить пробный период», «Оплата вне системы», …) don't fit the base
   inline-flex/nowrap .rp-seg in one row inside the 420px rp-sched-dlg — the control overflowed
   and the [role="dialog"] overflow:auto cap turned that into a horizontal scrollbar. Lay the
   segments out as a 2×2 grid with wrapping labels instead. */
.rp-adm-subdlg .rp-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  margin-bottom: 14px;
}
.rp-adm-subdlg .rp-seg-tab {
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  padding: 7px 10px;
  min-width: 0;
}

/* Support conversations (/admin/support) — the left list column of the shared .rp-chat-shell grid.
   The right pane reuses .rp-convo-pane (RoomChatPanel brings its own inner chrome). */
.rp-sup-listcol {
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 12px;
  min-height: 0;
}
