/*
  Live Partners — партнёрская панель.
  Дизайн-система из дизайн-бандла design_handoff_partner_panel.
  Значения (цвета, размеры, радиусы, тени) — финальные, менять только вместе с дизайном.
*/

:root {
  /* Поверхности */
  --lp-app: #101210;
  --lp-side: #14170f;
  --lp-side-border: #232820;
  --lp-surface: #191d16;
  --lp-border: #262c21;
  --lp-divider: rgba(255, 255, 255, 0.05);
  --lp-thead-top: #20251b;
  --lp-elevated: #1b1f17;

  /* Поля ввода */
  --lp-field: #12150e;
  --lp-field-alt: #171b13;
  --lp-field-border: #2a3025;
  --lp-field-focus: #55804a;

  /* Вторичная кнопка */
  --lp-ghost: #20251c;
  --lp-ghost-border: #2c332a;
  --lp-ghost-border-hover: #3a4436;

  /* Текст */
  --lp-text: #e9ede6;
  --lp-text-2: #8f9a88;
  --lp-text-3: #75816c;
  --lp-text-4: #66715e;
  --lp-cell: #cfd8c8;
  --lp-cell-2: #aab3a3;

  /* Акцент */
  --lp-accent: #7ee06a;
  --lp-accent-text: #9be888;
  --lp-accent-bright: #a5eb93;
  --lp-accent-hover: #c2f2b4;
  --lp-accent-on: #0d1607;
  --lp-accent-soft: rgba(126, 224, 106, 0.1);
  --lp-accent-soft-2: rgba(126, 224, 106, 0.12);

  /* Роли и статусы */
  --lp-adm-bg: #33301f;
  --lp-adm-border: #4a4227;
  --lp-adm-text: #e8d08f;
  --lp-warn: #e0c454;
  --lp-danger: #e08a80;
  --lp-info: #9bb8e8;

  --lp-shadow-card: 0 10px 28px rgba(0, 0, 0, 0.28);
  --lp-shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.5);
  --lp-shadow-pop: 0 20px 48px rgba(0, 0, 0, 0.5);

  --lp-mono: ui-monospace, Menlo, Monaco, Consolas, monospace;
}

/* ------------------------------------------------------------------ база */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--lp-app);
  color: var(--lp-text);
  font-family: "Golos Text", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--lp-accent-text);
  text-decoration: none;
}

a:hover {
  color: var(--lp-accent-hover);
}

input,
select,
button,
textarea {
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--lp-field-focus);
}

::placeholder {
  color: #6f7a68;
}

select option {
  background: var(--lp-elevated);
  color: var(--lp-text);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.num {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--lp-mono);
}

.ta-r {
  text-align: right;
}

.ta-c {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes lpToastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes lpModalIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --------------------------------------------------------------- каркас */

.lp-shell {
  display: flex;
  min-height: 100vh;
  background: var(--lp-app);
}

.lp-sidebar {
  width: 238px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  background: var(--lp-side);
  border-right: 1px solid var(--lp-side-border);
  position: sticky;
  top: 0;
  height: 100vh;
}

.lp-main {
  flex: 1;
  min-width: 0;
}

.lp-content {
  max-width: 1060px;
  margin: 0 auto;
  padding: 34px 40px 64px;
}

/* -------------------------------------------------------------- сайдбар */

.lp-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 10px 18px;
  color: inherit;
}

.lp-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--lp-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(126, 224, 106, 0.25);
}

.lp-logo--lg {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.lp-brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.lp-role-cap {
  font-size: 10.5px;
  margin-top: 3px;
  letter-spacing: 0.04em;
  color: var(--lp-text-3);
}

.lp-role-cap--admin {
  color: var(--lp-accent-text);
  font-weight: 700;
}

.lp-role-cap--as {
  color: var(--lp-adm-text);
  font-weight: 700;
}

.lp-menu-cap {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--lp-text-4);
  padding: 6px 12px;
}

.lp-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #9aa294;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.lp-nav-item:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #9aa294;
}

.lp-nav-item.is-active,
.lp-nav-item.is-active:hover {
  background: rgba(126, 224, 106, 0.12);
  color: #e6f6df;
}

.lp-nav-item svg {
  flex-shrink: 0;
}

.lp-spacer {
  flex: 1;
}

.lp-exit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--lp-text-3);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.lp-exit:hover {
  color: var(--lp-cell-2);
  background: rgba(255, 255, 255, 0.04);
}

.lp-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 11px 12px;
  background: #1a1e15;
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
}

.lp-account:hover {
  border-color: #333b2c;
  color: inherit;
}

/* Пункта «Профиль» в меню нет — активное состояние показывает карточка аккаунта. */
.lp-account.is-active {
  background: rgba(126, 224, 106, 0.12);
  border-color: #3a4f31;
}

.lp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #2a3323;
  color: #b9e8ab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
}

.lp-avatar--admin {
  background: var(--lp-adm-bg);
  color: var(--lp-adm-text);
}

.lp-account-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-account-meta {
  font-size: 12px;
  margin-top: 2px;
  font-weight: 600;
  color: var(--lp-accent-text);
  font-variant-numeric: tabular-nums;
}

.lp-account-meta--admin {
  color: var(--lp-text-2);
}

.lp-account-meta--as {
  color: var(--lp-adm-text);
}

/* ------------------------------------------------------ баннер impersonation */

.lp-imp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  margin-bottom: 22px;
  background: rgba(232, 208, 143, 0.07);
  border: 1px solid var(--lp-adm-border);
  border-radius: 13px;
}

.lp-imp-badge {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--lp-adm-bg);
  color: var(--lp-adm-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.lp-imp-title {
  font-size: 13.5px;
  font-weight: 600;
}

.lp-imp-sub {
  font-size: 12px;
  color: #a99b6f;
  margin-top: 3px;
}

.lp-imp-actions {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------- шапка экрана */

.lp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.lp-h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lp-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--lp-text-2);
}

.lp-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* ------------------------------------------------------------- карточки */

.lp-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 16px;
  box-shadow: var(--lp-shadow-card);
  overflow: hidden;
}

.lp-card--pad {
  padding: 20px 22px;
}

.lp-card--pad-lg {
  padding: 24px;
}

.lp-card + .lp-card {
  margin-top: 14px;
}

.lp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

.lp-card-title {
  font-size: 15px;
  font-weight: 600;
}

.lp-card-note {
  font-size: 12px;
  color: var(--lp-text-3);
}

.lp-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--lp-divider);
}

.lp-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lp-grow {
  flex: 1;
  min-width: 0;
}

/* ------------------------------------------------------------------ KPI */

.lp-kpi-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.lp-kpi-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.lp-kpi-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.lp-kpi {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--lp-shadow-card);
}

.lp-kpi--sm {
  padding: 18px 20px;
}

.lp-kpi-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lp-text-2);
}

.lp-kpi-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 9px;
  font-variant-numeric: tabular-nums;
}

.lp-kpi-value--sm {
  font-size: 26px;
  letter-spacing: 0;
}

.lp-kpi-value--accent {
  color: var(--lp-accent-bright);
}

.lp-kpi-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--lp-text-3);
  line-height: 1.5;
}

.lp-kpi-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-accent-text);
  cursor: pointer;
  border-bottom: 1px dashed rgba(155, 232, 136, 0.4);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 0;
}

.lp-kpi-link:hover {
  color: var(--lp-accent-hover);
}

.lp-delta {
  display: inline-flex;
  margin-top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-text);
  font-size: 12px;
  font-weight: 600;
}

.lp-delta--down {
  background: rgba(224, 106, 94, 0.12);
  color: var(--lp-danger);
}

.lp-delta--flat {
  background: #20241d;
  color: var(--lp-text-2);
}

/* --------------------------------------------------------------- таблицы */

.lp-scroll {
  overflow-x: auto;
}

.lp-table {
  width: 100%;
  border-collapse: collapse;
}

.lp-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-text-2);
  border-bottom: 1px solid var(--lp-border);
  border-top: 1px solid var(--lp-thead-top);
  white-space: nowrap;
}

/*
  Утилиты выравнивания должны перебивать базовое text-align:left у th.
  У селектора `.lp-table th` вес выше, чем у одиночного `.ta-r`, поэтому
  без этих правил заголовки числовых колонок уезжали влево от своих цифр.
*/
.lp-table th.ta-r,
.lp-table td.ta-r {
  text-align: right;
}

.lp-table th.ta-c,
.lp-table td.ta-c {
  text-align: center;
}

.lp-table th:first-child,
.lp-table td:first-child {
  padding-left: 20px;
}

.lp-table th:last-child,
.lp-table td:last-child {
  padding-right: 20px;
}

.lp-table td {
  padding: 13px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--lp-divider);
}

.lp-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lp-table td.lp-cell-2 {
  color: var(--lp-cell-2);
}

.lp-table .lp-td-sm {
  font-size: 13px;
}

.lp-table .lp-td-xs {
  font-size: 12.5px;
}

.lp-table .lp-td-strong {
  font-weight: 600;
}

.lp-total-row td {
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: none;
}

.lp-total-row {
  background: rgba(126, 224, 106, 0.04);
}

.lp-total-row:hover {
  background: rgba(126, 224, 106, 0.04);
}

.lp-total-row .lp-total-earn {
  color: var(--lp-accent-bright);
}

.lp-total-row .lp-total-cpm {
  color: var(--lp-cell-2);
  font-weight: 400;
}

.lp-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--lp-text-2);
  border-top: 1px solid var(--lp-divider);
}

.lp-empty--tall {
  padding: 44px 20px;
}

.lp-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--lp-text);
}

.lp-empty-sub {
  font-size: 12.5px;
  color: var(--lp-text-2);
  margin-top: 7px;
}

.lp-empty-block {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
}

.lp-empty-block .lp-empty-title {
  font-size: 15px;
}

.lp-empty-block .lp-empty-sub {
  font-size: 13px;
  margin-top: 8px;
}

.lp-foot-note {
  margin: 12px 4px 0;
  font-size: 12px;
  color: var(--lp-text-4);
}

/* -------------------------------------------------------------- сегменты */

.lp-seg {
  display: flex;
  gap: 2px;
  background: var(--lp-field);
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  padding: 3px;
}

.lp-seg--wide {
  width: 100%;
}

.lp-seg-item {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--lp-text-2);
  text-align: center;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  border: none;
  background: none;
}

.lp-seg--wide .lp-seg-item {
  flex: 1;
  padding: 9px 14px;
}

.lp-seg-item.is-active {
  background: #262d21;
  color: var(--lp-text);
  font-weight: 600;
}

/* --------------------------------------------------------------- кнопки */

.lp-btn {
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s, border-color 0.15s, color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.lp-btn--ghost {
  background: var(--lp-ghost);
  border-color: var(--lp-ghost-border);
  color: var(--lp-cell);
}

.lp-btn--ghost:hover {
  border-color: var(--lp-ghost-border-hover);
  color: var(--lp-text);
}

.lp-btn--ghost.is-copied {
  border-color: #3f6034;
  color: var(--lp-accent-bright);
}

.lp-btn--primary {
  background: var(--lp-accent);
  border-color: var(--lp-accent);
  color: var(--lp-accent-on);
  font-weight: 700;
}

.lp-btn--primary:hover {
  filter: brightness(1.08);
}

.lp-btn--soft {
  border-color: #35502d;
  background: rgba(126, 224, 106, 0.09);
  color: var(--lp-accent-bright);
  font-weight: 600;
  padding: 9px 15px;
}

.lp-btn--soft:hover {
  filter: brightness(1.12);
}

.lp-btn--soft.is-copied {
  background: var(--lp-accent);
  border-color: var(--lp-accent);
  color: var(--lp-accent-on);
}

.lp-btn--admin {
  background: var(--lp-adm-bg);
  border-color: var(--lp-adm-border);
  color: var(--lp-adm-text);
  font-weight: 600;
}

.lp-btn--admin:hover {
  filter: brightness(1.15);
}

.lp-btn--ban {
  background: rgba(224, 106, 94, 0.12);
  color: var(--lp-danger);
  font-weight: 600;
  padding: 8px 14px;
}

.lp-btn--unban {
  background: rgba(126, 224, 106, 0.12);
  color: var(--lp-accent-text);
  font-weight: 600;
  padding: 8px 14px;
}

.lp-btn--ban:hover,
.lp-btn--unban:hover {
  filter: brightness(1.12);
}

.lp-btn--sm {
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 8px;
}

.lp-btn--lg {
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 11px;
}

.lp-btn--block {
  width: 100%;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px;
  border-radius: 11px;
}

.lp-btn--md {
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
}

.lp-btn:disabled,
.lp-btn.is-disabled {
  background: #272c23;
  border-color: transparent;
  color: var(--lp-text-3);
  cursor: default;
  filter: none;
}

.lp-btn-row {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lp-link-danger {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lp-danger);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.lp-link-danger:hover {
  color: #f0a9a0;
}

.lp-link-dashed {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lp-accent-text);
  cursor: pointer;
  border-bottom: 1px dashed rgba(155, 232, 136, 0.4);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 0;
  display: inline-block;
}

.lp-link-dashed:hover {
  color: var(--lp-accent-hover);
}

.lp-link-dashed--num {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- поля */

.lp-input,
.lp-select,
.lp-textarea {
  background: var(--lp-field);
  border: 1px solid var(--lp-field-border);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--lp-text);
  font-size: 13.5px;
  transition: border-color 0.15s;
}

.lp-select {
  padding: 10px 11px;
  cursor: pointer;
}

.lp-textarea {
  resize: vertical;
  font-family: inherit;
}

.lp-input--alt,
.lp-select--alt {
  background: var(--lp-field-alt);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
}

.lp-select--alt {
  padding: 9px 11px;
}

.lp-input--search {
  background: var(--lp-field);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12.5px;
}

.lp-head .lp-input--search {
  width: 240px;
}

.lp-card-head .lp-input--search {
  width: 220px;
}

.lp-input--wide {
  width: 100%;
}

.lp-field-label {
  font-size: 12px;
  color: var(--lp-text-2);
  margin-bottom: 6px;
}

.lp-field-label--strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lp-cell-2);
}

.lp-num-input {
  width: 52px;
  background: var(--lp-field);
  border: 1px solid var(--lp-field-border);
  border-radius: 8px;
  padding: 7px 6px;
  color: var(--lp-text);
  font-size: 13px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lp-num-input--lg {
  width: 58px;
  border-radius: 9px;
  padding: 8px;
  font-size: 13.5px;
  font-weight: 600;
}

.lp-num-input--rate {
  width: 74px;
  padding: 6px 8px;
}

.lp-inline-label {
  font-size: 12.5px;
  color: var(--lp-text-2);
  white-space: nowrap;
}

/* --------------------------------------------------- дата, чип, календарь */

.lp-chip {
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: filter 0.15s;
  background: var(--lp-field-alt);
  color: var(--lp-text-2);
  border: 1px solid var(--lp-field-border);
}

.lp-chip:hover {
  filter: brightness(1.15);
}

.lp-chip.is-active {
  background: var(--lp-accent-soft);
  color: var(--lp-accent-text);
  border-color: transparent;
}

.lp-date-field {
  width: 96px;
  text-align: center;
  background: var(--lp-field-alt);
  border: 1px solid var(--lp-field-border);
  border-radius: 9px;
  padding: 8px 6px;
  color: var(--lp-cell);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s;
}

.lp-date-field--wide {
  width: 100px;
}

.lp-date-field.is-active {
  border-color: var(--lp-field-focus);
  color: var(--lp-text);
  background: #1c2118;
}

.lp-date-dash {
  color: var(--lp-text-4);
  font-size: 13px;
}

.lp-cal-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.lp-cal {
  position: absolute;
  z-index: 41;
  top: 46px;
  right: 0;
  background: var(--lp-elevated);
  border: 1px solid var(--lp-ghost-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--lp-shadow-pop);
  animation: lpModalIn 0.14s ease;
}

.lp-cal--from {
  right: 112px;
}

.lp-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lp-cal-title {
  font-size: 13.5px;
  font-weight: 600;
}

.lp-cal-nav {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #1d221a;
  color: #9aa294;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  border: none;
}

.lp-cal-nav:hover {
  background: #262d21;
  color: var(--lp-text);
}

.lp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 32px);
  gap: 2px;
}

.lp-cal-week {
  margin-bottom: 4px;
}

.lp-cal-wd {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--lp-text-4);
  padding: 4px 0;
}

.lp-cal-day {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--lp-cell);
  font-variant-numeric: tabular-nums;
  user-select: none;
  transition: background 0.12s;
  border: none;
  background: none;
  padding: 0;
}

.lp-cal-day.is-other {
  color: #4a5343;
}

.lp-cal-day.is-today {
  box-shadow: inset 0 0 0 1px #3c5834;
}

.lp-cal-day.is-inrange {
  background: rgba(126, 224, 106, 0.1);
  color: #d3ecc7;
  border-radius: 0;
}

.lp-cal-day.is-inrange.is-other {
  color: #6d7d63;
}

.lp-cal-day.is-edge {
  background: #2f5127;
  color: #e6f6df;
  font-weight: 700;
}

.lp-cal-day.is-selected {
  background: var(--lp-accent);
  color: var(--lp-accent-on);
  font-weight: 700;
  border-radius: 8px;
  box-shadow: none;
}

.lp-cal-day:disabled {
  cursor: default;
  opacity: 0.35;
}

.lp-cal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--lp-border);
}

.lp-cal-hint {
  font-size: 11.5px;
  color: var(--lp-text-3);
}

.lp-cal-today {
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-accent-text);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.lp-cal-today:hover {
  color: var(--lp-accent-hover);
}

/* -------------------------------------------------------------- пилюли */

.lp-status {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.lp-status--completed {
  background: var(--lp-accent-soft-2);
  color: var(--lp-accent-text);
}

.lp-status--pending {
  background: rgba(224, 196, 84, 0.13);
  color: var(--lp-warn);
}

.lp-status--cancelled {
  background: rgba(224, 106, 94, 0.13);
  color: var(--lp-danger);
}

.lp-state {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-text);
}

.lp-state--ban {
  background: rgba(224, 106, 94, 0.13);
  color: var(--lp-danger);
}

.lp-usage {
  width: 78px;
  text-align: center;
  flex-shrink: 0;
  padding: 5px 0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: #20241d;
  color: var(--lp-text-2);
}

.lp-usage--ent {
  background: rgba(106, 150, 224, 0.13);
  color: var(--lp-info);
}

.lp-method {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-text);
  font-size: 12.5px;
  font-weight: 600;
}

.lp-tag {
  /* Фиксированная, а не min-width: иначе «UFC» и «ЖЕРЕБЬЁВКА» разной ширины.
     104px = самый длинный тег (97px) плюс запас. */
  width: 104px;
  white-space: nowrap;
  text-align: center;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  background: rgba(224, 106, 94, 0.13);
  color: #e8a3a3;
}

.lp-tag--blue {
  background: rgba(106, 150, 224, 0.13);
  color: var(--lp-info);
}

.lp-tag--yellow {
  background: rgba(224, 180, 84, 0.13);
  color: #e8c98f;
}

.lp-tag--green {
  background: rgba(106, 224, 168, 0.13);
  color: #a6e2c4;
}

/* -------------------------------------------------------------- тумблер */

.lp-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.lp-toggle {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  padding: 2px;
  background: var(--lp-field-border);
  transition: background 0.15s;
  flex-shrink: 0;
}

.lp-toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lp-text-3);
  transition: transform 0.15s, background 0.15s;
}

.lp-toggle-wrap.is-on .lp-toggle {
  background: var(--lp-accent);
}

.lp-toggle-wrap.is-on .lp-toggle-knob {
  background: #12250c;
  transform: translateX(16px);
}

/* -------------------------------------------------------------- соцсети */

.lp-soc {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-soc-img {
  width: 17px;
  height: 17px;
  display: block;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.lp-soc--sm {
  width: 24px;
  height: 24px;
}

.lp-soc--sm .lp-soc-img {
  width: 16px;
  height: 16px;
}

.lp-soc--lg {
  width: 30px;
  height: 30px;
}

.lp-soc--lg .lp-soc-img {
  width: 19px;
  height: 19px;
}

.lp-soc-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lp-soc-nick {
  font-size: 13.5px;
  color: var(--lp-cell);
}

/* ---------------------------------------------------------- строка матча */

.lp-match {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid var(--lp-divider);
}

.lp-match:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lp-time {
  width: 52px;
  text-align: center;
  padding: 6px 0;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-text);
}

.lp-time--ft {
  background: #20241d;
  color: var(--lp-text-3);
}

.lp-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.lp-team-badge {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Заглушка вместо логотипа: инициалы клуба в круге. */
.lp-team-badge--initials {
  border-radius: 50%;
  background: #2a3323;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
}

/* Настоящий логотип из API — без плашки и обводки, они его только портят. */
.lp-team-badge--logo {
  object-fit: contain;
}

.lp-vs {
  color: var(--lp-text-4);
  font-weight: 400;
}

.lp-league {
  font-size: 12px;
  color: var(--lp-text-2);
  margin-top: 4px;
}

.lp-match-stat {
  text-align: right;
  flex-shrink: 0;
}

.lp-match-stat div {
  font-size: 12.5px;
  color: var(--lp-text-2);
}

.lp-match-stat div + div {
  margin-top: 3px;
}

.lp-match-stat b {
  color: var(--lp-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lp-match-stat b.lp-earn {
  color: var(--lp-accent-text);
}

.lp-event-title {
  font-size: 14px;
  font-weight: 600;
}

.lp-event-meta {
  font-size: 12px;
  color: var(--lp-text-2);
  margin-top: 4px;
}

/* ------------------------------------------------------------- структура */

.lp-tree-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

.lp-tree-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #2a3323;
  color: #b9e8ab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.lp-tree-name {
  font-size: 15px;
  font-weight: 600;
}

.lp-tree-meta {
  font-size: 12px;
  color: var(--lp-text-2);
  margin-top: 3px;
}

.lp-tree-pct {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lp-tree-got {
  text-align: right;
  width: 120px;
  flex-shrink: 0;
}

.lp-tree-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 12px 34px;
  border-top: 1px solid var(--lp-divider);
}

.lp-tree-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lp-tree-cell {
  width: 110px;
  flex-shrink: 0;
  text-align: right;
}

.lp-tree-cell--wide {
  width: 120px;
}

.lp-tree-elbow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-left: 1px solid #333b2c;
  border-bottom: 1px solid #333b2c;
  border-radius: 0 0 0 5px;
  margin-top: -8px;
}

.lp-mini-label {
  font-size: 11.5px;
  color: var(--lp-text-3);
}

.lp-mini-value {
  font-size: 13px;
  font-weight: 600;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.lp-mini-value--accent {
  color: var(--lp-accent-bright);
}

.lp-mini-value--lg {
  font-size: 14px;
  font-weight: 700;
}

.lp-sub-line {
  font-size: 11.5px;
  color: var(--lp-text-3);
  margin-top: 3px;
}

/* --------------------------------------------------------------- модалки */

.lp-modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 7, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.lp-modal-scrim[hidden] {
  display: none;
}

.lp-modal {
  width: 420px;
  max-width: 100%;
  background: var(--lp-elevated);
  border: 1px solid var(--lp-ghost-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--lp-shadow-modal);
  animation: lpModalIn 0.18s ease;
}

.lp-modal--sm {
  width: 380px;
  padding: 26px;
}

.lp-modal--lg {
  width: 460px;
  max-height: 88vh;
  overflow-y: auto;
}

.lp-modal--list {
  padding: 0;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.lp-modal-title {
  font-size: 17px;
  font-weight: 700;
}

.lp-modal-sub {
  font-size: 12.5px;
  color: var(--lp-text-2);
  margin-top: 5px;
}

.lp-modal-text {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--lp-cell-2);
  line-height: 1.6;
}

.lp-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lp-modal--list .lp-modal-head {
  padding: 22px 24px 16px;
}

.lp-modal-close {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--lp-ghost);
  color: #9aa294;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.lp-modal-close:hover {
  color: var(--lp-text);
}

.lp-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.lp-modal-foot--split {
  justify-content: space-between;
  align-items: center;
}

.lp-modal-body-scroll {
  overflow-y: auto;
  border-top: 1px solid var(--lp-border);
}

.lp-rates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 24px;
  background: var(--lp-field-alt);
}

.lp-rates-head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--lp-text-3);
}

.lp-rates-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  border-top: 1px solid var(--lp-divider);
}

.lp-rates-country {
  font-size: 13.5px;
  color: var(--lp-cell);
}

.lp-rates-value {
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lp-rates-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--lp-border);
  font-size: 12.5px;
  color: var(--lp-text-2);
}

.lp-rates-foot b {
  color: var(--lp-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lp-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--lp-border);
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 18px;
}

.lp-fact {
  background: var(--lp-field-alt);
  padding: 11px 14px;
}

.lp-fact-k {
  font-size: 11.5px;
  color: var(--lp-text-3);
}

.lp-fact-v {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.lp-fact-v--accent {
  color: var(--lp-accent-bright);
}

.lp-fact-v--mono {
  font-size: 12px;
  font-family: var(--lp-mono);
  color: var(--lp-cell);
  font-weight: 400;
  margin-top: 5px;
  word-break: break-all;
}

.lp-delta-box {
  font-size: 12.5px;
  color: var(--lp-text-2);
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--lp-field-alt);
  border: 1px solid var(--lp-border);
  border-radius: 10px;
}

/* ----------------------------------------------------------------- тост */

.lp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 0);
  background: #22291d;
  border: 1px solid #3a4632;
  color: #d8f0cf;
  font-size: 13.5px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 60;
  animation: lpToastIn 0.2s ease;
}

.lp-toast[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- профиль */

.lp-facts-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lp-fact-strip-k {
  font-size: 12px;
  color: var(--lp-text-2);
}

.lp-fact-strip-v {
  font-size: 15px;
  font-weight: 600;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.lp-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lp-profile-grid--single {
  grid-template-columns: 1fr;
}

.lp-profile-grid .lp-card + .lp-card {
  margin-top: 0;
}

.lp-edit-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-edit-actions {
  display: flex;
  gap: 8px;
}

/* -------------------------------------------------------- вход/регистрация */

.lp-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: radial-gradient(640px 420px at 50% -60px, rgba(126, 224, 106, 0.09), transparent), var(--lp-app);
}

.lp-auth-card {
  width: 400px;
  max-width: 100%;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lp-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 26px;
}

.lp-auth-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.lp-auth-seg {
  margin-bottom: 22px;
}

.lp-auth-field {
  margin-bottom: 14px;
}

.lp-auth-field .lp-input,
.lp-auth-field .lp-select {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
}

.lp-auth-field .lp-select {
  width: auto;
  padding: 11px 10px;
  font-size: 13.5px;
}

.lp-auth-row {
  display: flex;
  gap: 8px;
}

.lp-auth-row .lp-input {
  flex: 1;
  min-width: 0;
}

.lp-auth-note {
  font-size: 12px;
  color: var(--lp-text-3);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.lp-auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--lp-text-2);
  cursor: pointer;
  user-select: none;
  margin-bottom: 14px;
}

.lp-auth-remember input {
  accent-color: var(--lp-accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ------------------------------------------------------------------- 404 */

.lp-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(640px 420px at 50% -60px, rgba(126, 224, 106, 0.09), transparent), var(--lp-app);
}

.lp-404-code {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--lp-accent);
}

/* --------------------------------------------------------------- утилиты */

.lp-mb-14 {
  margin-bottom: 14px;
}

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

.lp-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.lp-controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lp-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.lp-balance-cols {
  display: flex;
  gap: 56px;
}

.lp-balance-label {
  font-size: 12.5px;
  color: var(--lp-text-2);
}

.lp-balance-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.lp-balance-value--accent {
  color: var(--lp-accent-bright);
}

.lp-balance-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.lp-balance-note {
  font-size: 12px;
  color: var(--lp-text-3);
}

.lp-invite-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.lp-invite-form > div {
  min-width: 0;
}

.lp-invite-form .lp-grow {
  flex: 1;
  min-width: 200px;
}

.lp-code-url {
  flex: 1;
  min-width: 0;
  font-family: var(--lp-mono);
  font-size: 12.5px;
  color: var(--lp-cell);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-code-nick {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 190px;
  flex-shrink: 0;
}

.lp-code-nick span:last-child {
  font-size: 13px;
  color: var(--lp-cell);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------- ссылки в роли компонентов

  Часть навигации — это <a>, поэтому глобальное `a:hover` перекрасило бы
  их в акцент. Ниже возвращаем каждому компоненту его собственный цвет. */

a.lp-brand:hover,
a.lp-brand:hover .lp-brand-name {
  color: var(--lp-text);
}

a.lp-seg-item:hover {
  color: var(--lp-text-2);
}

a.lp-seg-item.is-active:hover {
  color: var(--lp-text);
}

a.lp-chip:hover {
  color: var(--lp-text-2);
}

a.lp-chip.is-active:hover {
  color: var(--lp-accent-text);
}

a.lp-btn--admin:hover {
  color: var(--lp-adm-text);
}

a.lp-btn--primary:hover {
  color: var(--lp-accent-on);
}

/* ==================================================================
   Адаптив: десктоп → планшет (≤1240) → телефон (≤920) → узкий (≤600)
   Значения из дизайн-бандла (@media-блок прототипа).
   ================================================================== */

@keyframes lpDrawerIn {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Мобильная шапка вместо сайдбара — на десктопе скрыта. */
.lp-mtop {
  display: none;
  position: sticky;
  top: 0;
  z-index: 35;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(18, 21, 15, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lp-side-border);
}

.lp-burger {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  background: #1a1e15;
  border: 1px solid var(--lp-border);
  color: var(--lp-cell);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lp-burger:hover {
  border-color: #333b2c;
}

.lp-mtop-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
}

.lp-mtop-name {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-mtop-avatar {
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
}

/* Выдвижное меню — тот же сайдбар, смонтированный вторым экземпляром. */
.lp-sidebar--drawer,
.lp-drawer-scrim {
  display: none;
}

.lp-drawer-close {
  /* Абсолютно, чтобы не перестраивать строку логотипа ради одной кнопки. */
  position: absolute;
  top: 18px;
  right: 14px;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--lp-ghost);
  color: #9aa294;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border: none;
}

.lp-sidebar--drawer .lp-brand {
  padding-right: 44px;
}

.lp-drawer-close:hover {
  color: var(--lp-text);
}

@media (max-width: 1240px) {
  .lp-content {
    padding: 28px 24px 56px;
  }
}

@media (max-width: 920px) {
  .lp-sidebar:not(.lp-sidebar--drawer) {
    display: none;
  }

  .lp-mtop {
    display: flex;
  }

  .lp-content {
    padding: 18px 14px 56px;
  }

  /* Открытая шторка */
  body.lp-drawer-open .lp-drawer-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 7, 0.62);
    backdrop-filter: blur(3px);
    z-index: 70;
  }

  body.lp-drawer-open .lp-sidebar--drawer {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 282px;
    max-width: 85vw;
    height: auto;
    z-index: 71;
    overflow-y: auto;
    animation: lpDrawerIn 0.18s ease;
  }

  body.lp-drawer-open {
    overflow: hidden;
  }

  .lp-sidebar--drawer .lp-drawer-close {
    display: flex;
  }

  /* Шапки экранов и карточка баланса — в столбец */
  .lp-head,
  .lp-balance-card {
    flex-direction: column;
    align-items: stretch;
  }

  .lp-balance-side {
    align-items: flex-start;
  }

  .lp-balance-cols {
    gap: 32px;
  }

  /* Группы контролов переносятся */
  .lp-head-right,
  .lp-controls,
  .lp-controls-right,
  .lp-imp-actions,
  .lp-btn-row,
  .lp-invite-form,
  .lp-edit-actions,
  .lp-imp {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 10px;
  }

  /* Сетки */
  .lp-kpi-grid--3,
  .lp-kpi-grid--4,
  .lp-facts-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-profile-grid {
    grid-template-columns: 1fr;
  }

  /* Таблицы прокручиваются по горизонтали */
  .lp-scroll table {
    min-width: 640px;
  }

  /* Период: чип слева, даты прижаты вправо и не разрываются */
  .lp-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .lp-date-field {
    width: 88px;
    padding: 8px 4px;
  }

  .lp-date-field--wide {
    width: 92px;
  }

  /* Календарь прижимается к левому краю контрола */
  .lp-cal,
  .lp-cal--from {
    left: 0;
    right: auto;
  }

  /* Строки-карточки переносятся */
  .lp-match,
  .lp-row,
  .lp-tree-head,
  .lp-tree-row {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .lp-row {
    row-gap: 8px;
  }

  .lp-teams {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  /* Кнопка копирования и посещаемость матча — на всю ширину */
  .lp-match .lp-btn--soft,
  .lp-row .lp-btn--soft,
  .lp-code-url {
    flex: 1 1 100%;
  }

  .lp-match-stat {
    flex: 1 1 100%;
    text-align: left;
  }

  /* Поиск и поля на всю ширину */
  .lp-input--search,
  .lp-head .lp-input--search,
  .lp-card-head .lp-input--search {
    width: 100%;
  }

  /* Шапка ветки: имя с аватаром в первой строке, процент и «Начислено» — своими.
     Без min-width имя схлопывается в столбик из отдельных букв. */
  .lp-tree-head {
    row-gap: 12px;
  }

  .lp-tree-head .lp-grow {
    /* Базис явный: с auto строка меты считается по контенту и уезжает под аватар. */
    flex: 1 1 150px;
    min-width: 150px;
  }

  .lp-tree-pct,
  .lp-tree-got {
    flex: 1 1 100%;
    width: auto;
    text-align: left;
  }

  /* Ветка: уголок, иконка и ник — одной строкой, ячейки парой под ними.
     Базисы явные: с flex-basis 0 ячейки остались бы в первой строке и сплющились. */
  .lp-tree-row .lp-grow {
    flex: 1 1 150px;
    min-width: 150px;
  }

  .lp-tree-cell,
  .lp-tree-cell--wide {
    flex: 1 1 130px;
    width: auto;
    text-align: left;
  }

  /* Модалки не упираются в края экрана */
  .lp-modal,
  .lp-modal--sm,
  .lp-modal--lg {
    max-width: 100%;
  }

  .lp-auth {
    padding: 20px 14px;
  }

  .lp-auth-card {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .lp-kpi-grid--3,
  .lp-kpi-grid--4 {
    grid-template-columns: 1fr;
  }
}
