/*
 * Вход, личный кабинет и рейтинг. Основа — app.css; здесь только своё:
 * кнопки провайдеров, строки способов входа, выбор имени и строки рейтинга.
 *
 * Цвета — только токены макета. Строки рейтинга повторяют .lb-* рабочего
 * стола (desk.css), но медали здесь на токенах, а не на отдельных градиентах.
 */

  /* ============== ОБЩЕЕ ============== */
  .btn-dark:hover { background: var(--accent); }
  .btn-line {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--ink-2);
  }
  .btn-line:hover { border-color: var(--accent-200); color: var(--accent-700); }
  .btn .mi { font-size: 17px; }

  /* Буква провайдера на его цвете: VK синий, Яндекс красный — из токенов. */
  .prov-m {
    flex: none;
    width: 34px; height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .m-vk { background: var(--blue); }
  .m-ya { background: var(--red); font-size: 17px; }

  /* ============== ВХОД ============== */
  .auth {
    max-width: 480px;
    margin: 4vh auto 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .auth-card { padding: 30px 28px 26px; overflow: visible; }
  .auth-head h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 10px;
  }
  .auth-head h1 em {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
  }
  .auth-head p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
  .auth-card > .soon { margin-top: 22px; }

  .auth-providers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }
  .prov {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 15px;
    font-weight: 600;
    transition: border-color 0.18s, box-shadow 0.18s;
  }
  a.prov:hover { border-color: var(--accent-200); box-shadow: 0 0 0 3px var(--accent-50); }
  .prov > span:nth-child(2) { flex: 1 1 auto; }
  .prov-go { color: var(--muted-2); font-size: 18px; }
  a.prov:hover .prov-go { color: var(--accent-700); }

  .auth-carry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: var(--green-tint);
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
  }
  .auth-carry svg { color: var(--green); flex: none; margin-top: 2px; }

  .auth-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
  }
  .auth-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

  .auth-guest {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
  }
  .auth-guest:hover { color: var(--accent-700); }

  /* ============== КАБИНЕТ ============== */
  .acct {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .acct-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: var(--radius);
    background: var(--green-tint);
    border: 1px solid var(--green-soft);
    color: var(--ink-2);
    font-size: 13.5px;
  }
  .acct-flash svg { color: var(--green); flex: none; }
  .acct-flash.bad { background: var(--red-tint); border-color: var(--red-soft); }
  .acct-flash.bad svg { color: var(--red); }

  .acct-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
  }
  .acct-ava {
    flex: none;
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 600;
  }
  .acct-who { min-width: 0; flex: 1 1 auto; }
  .acct-who h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .acct-sub { margin-top: 3px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
  .acct-out { flex: none; }
  .acct-out .btn { padding: 9px 16px; font-size: 13px; }

  .acct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  .acct-list { padding: 0 12px 12px; }
  .acct-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-top: 1px solid var(--border);
  }
  .acct-row:first-child { border-top: 0; }
  .acct-row-tx { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
  .acct-row-tx b { display: block; font-size: 14px; font-weight: 600; }
  .acct-row-tx span { font-size: 12px; color: var(--muted); }
  .acct-act {
    flex: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.18s;
  }
  .acct-act:hover { color: var(--red); border-color: var(--red-soft); }
  .acct-act.on { color: var(--accent-700); border-color: var(--accent-100); background: var(--accent-50); }
  .acct-act.on:hover { color: var(--accent-700); border-color: var(--accent-200); }

  .acct-facts { padding: 4px 22px 20px; }

  .acct-modes { padding: 0 12px 16px; }
  .acct-mode {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .acct-mode:hover { background: var(--surface-2); }
  .acct-mode input { margin-top: 3px; accent-color: var(--accent); flex: none; }
  .acct-mode-tx b { display: block; font-size: 14px; font-weight: 600; }
  .acct-mode-tx span { font-size: 13px; color: var(--muted); }
  .acct-modes-foot { padding: 8px 10px 0; }
  .acct-modes-foot .btn { padding: 10px 18px; font-size: 13.5px; }

  /* ============== РЕЙТИНГ ============== */
  .rating { max-width: 860px; margin: 0 auto; }
  .rating .section-h { align-items: center; flex-wrap: wrap; gap: 12px; }
  .rating-sub {
    margin: -6px 0 18px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 70ch;
  }
  .rating-foot {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
  }
  .rating-foot svg { flex: none; margin-top: 2px; }
  .rating-foot a { color: var(--accent-700); font-weight: 600; }

  .lb-switch {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--surface-2);
    border-radius: 99px;
    font-size: 13px;
  }
  .lb-switch a {
    padding: 6px 14px;
    border-radius: 99px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
  }
  .lb-switch a:hover { color: var(--ink); }
  .lb-switch a.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }

  .lb-list { padding: 8px 10px 10px; }
  .lb-row {
    display: grid;
    grid-template-columns: 32px 36px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 9px 12px;
    border-radius: var(--radius);
    border: 1px solid transparent;
  }
  .lb-row:hover { background: var(--surface-2); }
  .lb-row.me { background: var(--accent-50); border-color: var(--accent-100); }
  .lb-rank {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--muted);
  }
  .lb-row.me .lb-rank { color: var(--accent); }
  .lb-rank.medal {
    width: 26px; height: 26px;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 12px;
  }
  .lb-rank.gold { background: var(--yellow); }
  .lb-rank.silver { background: var(--muted-2); }
  .lb-rank.bronze { background: var(--orange); }
  .lb-ava {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
  }
  .lb-info { min-width: 0; line-height: 1.25; }
  .lb-info .nm {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lb-info .sub { font-size: 11.5px; color: var(--accent-700); font-weight: 500; }
  .lb-tag { font-size: 11px; font-weight: 400; color: var(--muted-2); }
  .lb-pts { text-align: right; line-height: 1.2; }
  .lb-pts .v { font-weight: 600; font-size: 15px; }
  .lb-unit { font-size: 11px; color: var(--muted-2); }
  .lb-gap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    color: var(--muted-2);
    font-size: 11px;
    font-family: "Geist Mono", ui-monospace, monospace;
  }
  .lb-gap::before, .lb-gap::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  @media (max-width: 760px) {
    .acct-grid { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 620px) {
    .auth { margin-top: 0; }
    .auth-card { padding: 22px 18px 20px; }
    .auth-head h1 { font-size: 24px; }
    .acct-head { flex-wrap: wrap; padding: 18px; gap: 14px; }
    .acct-who h1 { font-size: 20px; }
    .acct-out { width: 100%; }
    .lb-list { padding: 6px 4px 8px; }
    .lb-row { grid-template-columns: 26px 30px minmax(0, 1fr) auto; gap: 9px; padding: 8px; }
    .lb-ava { width: 30px; height: 30px; font-size: 12px; }
  }
