/* ClearIMEI — спокойная пастельная тема, общая для всех страниц.
   Контраст (WCAG AA, 4.5:1 для обычного текста), посчитан на самом тёмном месте фона #DCE7F2:
   - --text: 11.7 на фоне, 14.2 на карточке.
   - --muted #5B6472: 4.8 на фоне, 5.8 на карточке (#6B7280 на фоне давал 3.9 — не проходит).
   - --primary #047857 (изумрудный, как Sign up): 5.3 на карточке, 5.0 в шапке, белый текст на нём 5.5; на --primary-soft 5.2.
     Прямо на фоне primary даёт 4.4 — поэтому ссылки, статусы и акцентный текст только в карточках и шапке.
   - Статусы на карточке: success 4.8, warning 4.8, danger 6.3. */
/* Inter — свой файл (/fonts, SIL OFL — LICENSE-Inter.txt), без Google Fonts:
   IP и User-Agent клиента не уходят третьей стороне. Переменный шрифт, начертания 400–700 из одного файла. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --bg-grad: linear-gradient(180deg, #DCE7F2 0%, #E8E4F2 50%, #F6F0E8 100%);
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #FFFFFF;
  --header-bg: rgba(255, 255, 255, 0.6);

  --text: #1F2937;
  --text-soft: #374151;
  --muted: #5B6472;
  --line: rgba(15, 23, 42, 0.08);
  --subtle: rgba(15, 23, 42, 0.035);

  --primary: #047857;
  --primary-hover: #065F46;
  --primary-soft: #ECFDF5;   /* primary-текст на нём — 5.2, primary-hover — 7.3 */
  --primary-ring: rgba(4, 120, 87, 0.18);
  --brand-dot: #10B981;      /* фирменная точка логотипа и favicon */
  --brand-strong: #047857;   /* кнопка Sign up: тот же изумрудный, темнее — белый текст 5.48:1 (на --brand-dot было бы 2.54) */
  --brand-strong-hover: #065F46; /* белый текст 7.68:1 */

  --success: #15803D;
  --warning: #B45309;
  --danger: #B91C1C;
  --warning-soft: #FFFBEB;   /* --warning на нём — 4.9 */

  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.05);
  --ease: 180ms ease;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* Переход к разделу по якорю (#раздел, scrollIntoView): заголовок не уходит под закреплённую шапку. --header-h — её
   высота, меряет app.js (разная на 320 / 375 / 1280, у гостя и вошедшего); 60px — до замера. */
html { scroll-padding-top: calc(var(--header-h, 60px) + var(--subbar-h, 0px) + 12px); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #E8E4F2;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}
/* Фиксированный фон через псевдоэлемент: background-attachment: fixed не работает в iOS Safari */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-grad);
}

a { color: var(--primary); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--primary-hover); text-decoration: underline; }

button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- Шапка кабинета: тонкая полупрозрачная полоса ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Логотип и точка — всегда одной строкой: точка — отдельный inline-block, без nowrap браузер переносил её под название,
   когда справа становилось теснее (подгрузился шрифт Inter, появились баланс и email). В шапке логотип не сжимается. */
.logo { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.logo a { color: inherit; }
.logo a:hover { text-decoration: none; }
.logo-dot {
  /* Фирменная точка: кружок на базовой линии (декоративный, в тексте названия точки нет) */
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-left: 0.06em;
  vertical-align: baseline;
  background: var(--brand-dot);
  border-radius: 50%;
}

.app-nav { display: flex; gap: 4px; margin-left: 16px; }
.app-nav a {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: background var(--ease), color var(--ease);
}
.app-nav a:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.app-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

.header-right { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
.header-right > * { flex-shrink: 0; }
/* Логин пользователя: приглушённо, длинный — с многоточием (полный — в title); сжимается первым */
.user-email {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 200px;
  overflow: hidden;
  font-size: 13px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-right > .user-email { flex-shrink: 1; }
.app-nav a { white-space: nowrap; }

/* Пилюля баланса: белая, текст primary, «+» ведёт на пополнение */
.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 14px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  background: var(--surface-solid);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  transition: box-shadow var(--ease);
}
.balance-pill:hover { color: var(--primary); text-decoration: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.balance-pill .plus {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 17px;
  line-height: 1;
  color: #FFFFFF;
  background: var(--primary);
  border-radius: 50%;
}

.btn-link {
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text-soft);
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color var(--ease), background var(--ease);
}
.btn-link:hover { color: var(--primary); background: var(--primary-soft); }

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  font-size: 18px;
  color: var(--text);
  background: var(--surface-solid);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.app-nav .logout-mobile { display: none; text-align: left; }
.app-nav .account-mobile { display: none; }
a.btn-link:hover { text-decoration: none; }
.btn-link.account-link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.app-nav .nav-email { display: none; max-width: none; padding: 10px 12px 4px; }

/* Мобильная шапка: навигация сворачивается в ☰, пилюля баланса остаётся */
@media (max-width: 640px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .app-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 16px 12px;
    flex-direction: column;
    gap: 2px;
    /* Сплошной фон: полупрозрачный пропускал страницу сквозь пункты */
    background: var(--surface-solid);
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  }
  .app-nav.open { display: flex; }
  /* Затемнение страницы под открытым меню (шапка с меню — выше, z-index 10) */
  .nav-backdrop { position: fixed; inset: 0; z-index: 9; background: rgba(15, 23, 42, 0.32); }
  .app-nav a { padding: 10px 12px; }
  .header-right .btn-link.logout { display: none; }
  .header-right .user-email { display: none; }
  .header-right .account-link { display: none; }
  .app-nav .account-mobile { display: block; }
  .app-nav .logout-mobile { display: block; }
  .app-nav .nav-email { display: block; }
}

@media (min-width: 641px) { .nav-backdrop { display: none; } }
.nav-backdrop[hidden] { display: none; }

/* iOS-детекторы (email, телефон): если всё же сработали — не ссылка, выглядит как обычный текст */
a[x-apple-data-detectors] {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
}

/* Простая шапка для входа/регистрации/главной */
.site-header { width: 100%; padding: 32px 16px 8px; text-align: center; }
/* Заголовок страницы входа / регистрации / писем — под общей шапкой (логотип теперь в шапке) */
h1.tagline { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.site-header .logo { font-size: 26px; }
.tagline { margin: 6px 0 0; color: var(--muted); }
.site-nav { margin-top: 12px; }
.site-nav a { font-size: 14px; font-weight: 600; color: var(--primary); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.header-right.guest { gap: 4px; }
/* Гость: разделы — как меню вошедшего (.app-nav a): активный — светло-зелёная «таблетка» */
.guest-link {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: background var(--ease), color var(--ease);
}
.guest-link:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.guest-link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
/* Sign up — заполненная кнопка фирменного зелёного, белый текст; на странице регистрации — такая же */
.btn-signup {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #FFFFFF;
  background: var(--brand-strong);
  border-radius: var(--radius-pill);
  transition: background var(--ease);
}
.btn-signup:hover, .btn-signup:focus-visible { color: #FFFFFF; background: var(--brand-strong-hover); text-decoration: none; }
/* Гостевая шапка на узком экране: логотип + Services + Log in + Sign up в одну строку (до 320px) */
@media (max-width: 400px) {
  .app-header-inner { gap: 8px; }
  .header-right.guest { gap: 2px; }
  .guest-link { padding: 6px 7px; font-size: 13px; }
  .btn-signup { padding: 5px 10px; font-size: 13px; }
}
@media (max-width: 340px) {
  .app-header-inner { padding-left: 12px; padding-right: 12px; }
  .logo { font-size: 16px; }
  .guest-link { padding: 6px 5px; }
  .btn-signup { padding: 5px 8px; }
}

/* ---- Раскладка ---- */
.page { width: 100%; max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
.page.narrow { max-width: 560px; }
.page-title { margin: 8px 0 20px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }

.card {
  width: 100%;
  margin-top: 16px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.auth { max-width: 400px; margin: 24px auto 0; }
/* Узкий экран: карточка входа/регистрации — с боковыми отступами, как на остальных страницах */
@media (max-width: 432px) { .card.auth { width: auto; margin: 24px 16px 0; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }

/* ---- Формы ---- */
label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--text); }
label:not(:first-child):not(.coin-option) { margin-top: 18px; }

input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px; /* 16px — без автозума на iOS */
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
}
input::placeholder { color: var(--muted); }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
input:disabled { background: var(--subtle); color: var(--muted); cursor: not-allowed; }
/* Регистрация закрыта: поля обычного (белого) вида, неактивна только кнопка */
.signup-closed input:disabled { background: var(--surface-solid); color: var(--text); cursor: default; }

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--ease), box-shadow var(--ease);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 6px 16px var(--primary-ring); }
.btn-primary:disabled { background: #D6DAE0; color: var(--text-soft); box-shadow: none; cursor: not-allowed; }

/* ---- Капсула проверки IMEI ---- */
.check-hero { padding: 40px 0 8px; text-align: center; }
/* Большой логотип на Check */
.check-logo { margin: 0 0 14px; font-size: 38px; }
@media (max-width: 420px) { .check-logo { font-size: 30px; } }
/* Логотип-индикатор (public/dot-loader.js): буквы — отдельными span; неподвижная точка держит место,
   во время ожидания вместо неё летает копия (position: absolute + transform) */
.dot-logo { position: relative; display: inline-block; }
.dot-logo-word span { display: inline-block; }
.dot-logo-dot { position: absolute; left: 0; top: 0; margin: 0; visibility: hidden; will-change: transform; }
.dot-logo.is-moving .dot-logo-dot { visibility: visible; }
.dot-logo.is-moving .logo-dot:not(.dot-logo-dot) { visibility: hidden; }
/* Кнопка во время запроса: одна точка цвета текста (на зелёной кнопке — белая), прыгает на месте */
.btn-dot { display: inline-block; width: 0.45em; height: 0.45em; margin-left: 0.5em; vertical-align: middle; border-radius: 50%; background: currentColor; will-change: transform; }
[aria-busy="true"] { cursor: progress; }
.check-hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.check-hero p { margin: 0; color: var(--muted); }

.capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  margin: 28px auto 0;
  padding: 6px 6px 6px 22px;
  background: var(--surface-solid);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  transition: box-shadow var(--ease);
}
.capsule:focus-within { box-shadow: var(--shadow), 0 0 0 4px var(--primary-ring); }
.capsule input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  font-size: 17px;
  letter-spacing: 0.02em;
  background: transparent;
  border: none;
  border-radius: 0;
}
.capsule input:focus { box-shadow: none; }
.capsule button {
  flex-shrink: 0;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--ease);
}
.capsule button:hover { background: var(--primary-hover); }
.capsule button:disabled { background: #D6DAE0; color: var(--text-soft); cursor: not-allowed; }

/* Выбор услуги — выпадающий список (public/service-picker.js) */
.svc-picker { position: relative; max-width: 560px; margin: 12px auto 0; }
.svc-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px 11px 20px;
  font: inherit;
  font-size: 15px;
  text-align: left;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease);
}
@media (hover: hover) {
  .svc-trigger:hover { border-color: var(--primary); }
}
.svc-trigger:focus-visible { outline: none; box-shadow: var(--shadow-soft), 0 0 0 4px var(--primary-ring); }
.svc-trigger[aria-expanded="true"] { border-color: var(--primary); }
.svc-trigger-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-price { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--primary); white-space: nowrap; }
.svc-caret { font-size: 12px; color: var(--muted); }

.svc-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: min(460px, 70vh);
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  overflow: hidden;
}
.svc-popup[hidden] { display: none; }
.svc-popup-head { display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.svc-search { flex: 1; min-width: 0; padding: 9px 14px; font-size: 15px; border-radius: var(--radius-pill); }
.svc-close { display: none; padding: 6px 10px; font-size: 16px; color: var(--muted); background: none; border: none; cursor: pointer; }
.svc-listbox { flex: 1; overflow-y: auto; padding: 4px 6px 8px; overscroll-behavior: contain; }
.svc-group-title {
  position: sticky;
  top: 0;
  padding: 10px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-solid);
}
.svc-option { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 14px; border-radius: 8px; cursor: pointer; }
.svc-option.is-active { background: var(--primary-soft); }
.svc-option[aria-selected="true"] .svc-option-name { font-weight: 600; color: var(--primary); }
.svc-check { flex: 0 0 12px; font-size: 12px; color: var(--primary); }
.svc-option-name { flex: 1; min-width: 0; }
.svc-option .svc-price { font-weight: 500; color: var(--text-soft); }
.svc-empty { margin: 0; padding: 16px 10px; font-size: 14px; color: var(--muted); }
.svc-browse { display: block; padding: 11px 16px; font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); }

/* ≤640px — лист на весь экран, поиск сверху */
@media (max-width: 640px) {
  .svc-popup { position: fixed; inset: 0; max-height: none; border-radius: 0; box-shadow: none; }
  .svc-popup-head { padding: 12px; }
  .svc-search { font-size: 16px; }
  .svc-close { display: block; }
  .svc-option { padding: 12px 10px; font-size: 15px; }
  .svc-browse { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  body.svc-sheet-open { overflow: hidden; }
}

/* Описание выбранной проверки на Check — одна-две строки */
.service-info {
  display: -webkit-box;
  max-width: 560px;
  margin: 8px auto 0;
  padding: 0 20px;
  font-size: 13px;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notice { max-width: 560px; margin: 16px auto 0; padding: 12px 16px; font-size: 14px; text-align: center; background: var(--surface); border-radius: var(--radius-sm); }
.notice[hidden] { display: none; }
.notice.error { color: var(--danger); }
/* Check: «You checked this number … ago» — выбор: старый результат бесплатно / новая проверка */
.recent-choice .recent-text { margin: 0 0 10px; }
.recent-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.result-stale { margin-bottom: 12px; padding: 8px 12px; font-size: 14px; font-weight: 600; color: var(--warning); background: var(--warning-soft); border-radius: var(--radius-sm); }

.result-card { max-width: 560px; margin: 20px auto 0; }
.result-card[hidden] { display: none; }

/* ---- Текст и сообщения ---- */
.muted { color: var(--muted); }
.hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; }
.msg { margin-top: 16px; font-size: 14px; text-align: center; }
.msg.success { color: var(--success); }
.form-intro { margin: 0; font-size: 14px; }
a.btn-primary { text-align: center; color: #FFFFFF; }
a.btn-primary:hover { color: #FFFFFF; text-decoration: none; } /* глобальное a:hover перекрашивает текст в цвет фона кнопки */
.btn-primary[hidden] { display: none; }
.verify-banner { width: 100%; background: #FEF3C7; border-bottom: 1px solid #FDE68A; }
.verify-banner-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  max-width: 960px; margin: 0 auto; padding: 10px 16px; font-size: 14px; color: #78350F;
}
.verify-text { min-width: 0; }
.verify-email { font-weight: 600; overflow-wrap: anywhere; }
.verify-banner .btn-link { color: #78350F; font-weight: 600; text-decoration: underline; }
.verify-banner .btn-link:disabled { opacity: 0.6; cursor: default; }
.verify-status { font-size: 13px; }
.review-banner { width: 100%; background: #FEE2E2; border-bottom: 1px solid #FECACA; }
.review-banner-inner { max-width: 960px; margin: 0 auto; padding: 10px 16px; font-size: 14px; color: #7F1D1D; overflow-wrap: anywhere; }
.review-banner a { color: #7F1D1D; font-weight: 600; text-decoration: underline; }
.pw-field { position: relative; }
.pw-field input { padding-right: 52px; }
.pw-toggle {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 40px; padding: 0; color: var(--muted);
  background: none; border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: color var(--ease);
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--primary); }
.pw-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.pw-toggle svg { display: block; }
.forgot-link { display: block; margin-top: 8px; font-size: 13px; text-align: right; }
.note { margin-top: 18px; font-size: 13px; text-align: center; color: var(--muted); }
form[hidden] { display: none; }
.code-input { font-size: 24px; font-weight: 600; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: 0.4em; opacity: 0.4; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-weight: 400; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--primary); }
.sent-step[hidden] { display: none; }
.sent-step .sent-resend { display: block; width: 100%; margin-top: 20px; padding: 12px 16px; font-size: 15px; }
.sent-step .btn-primary { margin-top: 12px; }
.code-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.code-actions .btn-link { padding: 6px 4px; color: var(--primary); }
.code-actions .btn-link:disabled { color: var(--muted); background: none; cursor: default; }
.empty { padding: 18px 0 6px; font-size: 14px; text-align: center; color: var(--muted); }
.center { text-align: center; }
.badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-pill);
}

/* ---- Таблицы ---- */
table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; }
th, td {
  padding: 10px 6px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere; /* длинные IMEI/даты не растягивают таблицу на мобильном */
}
th { font-size: 13px; font-weight: 500; color: var(--muted); }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tr:last-child td { border-bottom: none; }
.load-more { display: block; margin: 16px auto 0; }
.load-more[hidden] { display: none; }

/* ---- Таблица заказов (Last 5 checks, Orders) ---- */
/* IMEI, цена и дата — по содержимому и без переносов; Result забирает остальное */
.orders-table .col-imei,
.orders-table .col-price,
.orders-table .col-date {
  width: 1%;
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}
.orders-table .col-price { text-align: right; }
/* IMEI / серийный — моноширинный, чтобы цифры читались и сверялись */
.orders-table td.col-imei { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; }
.orders-table td.col-result { overflow-wrap: normal; }
.orders-table tr.expandable { cursor: pointer; }
@media (hover: hover) { .orders-table tr.expandable:hover td { background: rgba(4, 120, 87, 0.03); } }
.orders-table tr.open td { border-bottom: none; }
.orders-table tr.order-details td { padding: 0 0 14px; cursor: default; }
.orders-table tr.order-details:hover td { background: none; }

/* Узкий экран: строки → карточки. IMEI + цена, сервис, статус и модель, дата */
@media (max-width: 640px) {
  .orders-table thead { display: none; }
  .orders-table, .orders-table tbody { display: block; width: 100%; }
  /* Карточка — flex с переносом: IMEI + цена в первой строке, остальное — строками на всю ширину */
  .orders-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    row-gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .orders-table tr:last-child { border-bottom: none; }
  .orders-table td { display: block; width: auto; min-width: 0; padding: 0; border: none; }
  /* IMEI не ломается никогда; не влезает рядом с ценой (320px) — цена уходит на следующую строку.
     width: auto — перебить десктопное width: 1%, из-за которого колонка сжималась до одного символа */
  /* order: в DOM цена после Result — визуально ставим её в первую строку к IMEI */
  .orders-table td.col-imei { order: 0; flex: 1 1 auto; width: auto; min-width: 0; white-space: nowrap; overflow-wrap: normal; word-break: normal; font-weight: 600; }
  .orders-table td.col-price { order: 1; flex: none; width: auto; }
  .orders-table td.col-service,
  .orders-table td.col-result,
  .orders-table td.col-date { order: 2; flex: 0 0 100%; width: auto; }
  .orders-table td.col-service { font-size: 13px; color: var(--muted); }
  .orders-table td.col-date { font-size: 12px; color: var(--muted); }
  /* Раскрытый результат в карточке — без серой подложки (как у остальных строк) */
  .orders-table .result-card-body { padding: 4px 0 0; background: none; border-radius: 0; }
  /* Раскрытая карточка — на всю ширину */
  .orders-table tr.order-details { display: block; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
  .orders-table tr.order-details td { display: block; padding: 0; }
  .orders-table tr.open { border-bottom: none; }
  .orders-table tr[hidden] { display: none; }
  /* Поля результата в две строки: название над значением */
  .result .row { flex-direction: column; gap: 0; }
  .result .row span:first-child, .result .row span:last-child { flex: none; max-width: none; }
  .result .row span:last-child { text-align: left; }
}

/* ---- Статусы (приглушённые) ---- */
.st-finished, .st-success { color: var(--success); font-weight: 600; }
.st-pending, .st-processing, .st-needs_review { color: var(--warning); font-weight: 600; }
.st-expired, .st-cancelled, .st-error, .st-failed { color: var(--danger); font-weight: 600; }
.st-refunded { color: var(--muted); font-weight: 600; }

/* ---- Результат проверки ---- */
/* Статус: цветная точка (как в логотипе) — clean / attention / problem; подпись рядом, цвет не единственный признак */
.result-status { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; }
.status-dot { display: inline-block; flex-shrink: 0; width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--muted); }
.result-status.st-clean { color: var(--success); }
.result-status.st-clean .status-dot { background: var(--success); }
.result-status.st-attention { color: var(--warning); }
.result-status.st-attention .status-dot { background: var(--warning); }
.result-status.st-problem { color: var(--danger); }
.result-status.st-problem .status-dot { background: var(--danger); }
.result-status.st-unknown { color: var(--muted); }
/* Информационная услуга: без цветной точки, нейтральная иконка и модель */
.result-status.st-info { color: var(--text); }
/* По первой строке текста, даже если он переносится */
.info-icon { flex-shrink: 0; align-self: flex-start; width: 1.05em; height: 1.05em; margin-top: 0.2em; margin-top: calc((1lh - 1.05em) / 2); color: var(--muted); }
.result-title { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.result-status { max-width: 100%; }
.result-device { margin: -4px 0 8px; font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.result > .result-status { margin-bottom: 8px; font-size: 16px; }
.result-summary { min-width: 0; }
.result-label .nw, .nw { white-space: nowrap; }
.result-summary .result-model { margin-top: 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
/* Значение вердикта: словом, цветом и значком (✓ / ✕ / !) */
.row .tone { display: inline-flex; align-items: baseline; gap: 5px; font-weight: 600; }
.tone-good { color: var(--success); }
.tone-bad { color: var(--danger); }
.tone-warn { color: var(--warning); }
.tone-icon { font-size: 0.9em; }
.result-text { margin-top: 6px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-note { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.result-note .note-label { font-weight: 600; }
.result-note .note-text { min-width: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* Небольшие кнопки: «Details ▾ / Hide ▴», «Copy result» */
.btn-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.btn-small:hover { color: var(--primary-hover); background: #D1FAE5; }
/* display у кнопок перебивает атрибут hidden — скрытая кнопка оставалась видна («Cancel batch» у завершённого пакета) */
.btn-small[hidden], .btn-secondary[hidden] { display: none; }
.details-toggle { margin-top: 6px; }

/* Карточка результата: под строкой заказа и в блоке Result на Check */
.result-card-body { padding: 14px 16px; background: var(--subtle); border-radius: var(--radius-sm); }
.result-card .result-card-body { padding: 0; background: none; }
.result-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.copy-status { font-size: 13px; font-weight: 600; color: var(--success); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row span:first-child { color: var(--muted); overflow-wrap: anywhere; } /* метка до 60 символов без пробелов */
.row span:last-child { text-align: right; overflow-wrap: anywhere; }
/* Метка — своей ширины, но не больше 40 % строки; значение — остальное. Иначе длинное значение без пробелов
   (overflow-wrap: anywhere у обоих) сжимало метку до 1–2 букв в столбик (на 1280) */
.row span:first-child { flex: 0 0 auto; max-width: 40%; }
.row span:last-child { flex: 1 1 0; min-width: 0; }

/* ---- Пополнение ---- */
.amount-presets { display: flex; gap: 8px; margin-top: 12px; padding-top: 8px; }
.amount-presets button {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--ease);
}
.amount-presets button:hover { border-color: var(--primary); }
.badge-popular {
  position: absolute;
  top: -9px;
  right: 6px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-pill);
  pointer-events: none;
}


.coin-list-title { margin-top: 20px; font-size: 13px; font-weight: 500; color: var(--muted); }
.coin-list-title[hidden] { display: none; }
.coin-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.coin {
  display: flex;
  flex-direction: column; /* «min. $X» — всегда отдельной строкой под названием */
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  text-align: left;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: border-color var(--ease), opacity var(--ease);
}
.coin:hover { border-color: var(--primary); }
.coin > span:first-child { font-weight: 600; }
.coin-min { font-size: 13px; color: var(--text-soft); }
/* Затенённая (минимум выше суммы) — активна, клик подставляет минимум.
   Серый #374151 при opacity .75 на #F3F4F6 — контраст 4.7 (AA). */
.coin.dim { opacity: 0.75; color: var(--text-soft); background: #F3F4F6; border-style: dashed; cursor: pointer; }
.coin.dim > span:first-child { font-weight: 500; }
.coin.dim:hover { opacity: 1; }
/* Недоступная — отключена (WCAG не требует контраста для неактивных элементов) */
.coin.unavailable { opacity: 0.5; color: var(--muted); cursor: not-allowed; }
.coin.unavailable:hover { border-color: var(--line); }
.coin.unavailable .coin-min { color: var(--muted); }

/* Сумма на баланс под полем */
.credit-line { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--primary); }
.credit-line[hidden] { display: none; }

/* Выбор монеты: радио-список с суммой к отправке */
.coin-choice { margin: 0; padding: 0; border: none; min-width: 0; }
.coin-choice legend { padding: 0; }
.coin-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  font-weight: 400;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.coin-option:hover { border-color: var(--primary); }
.coin-option:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.coin-option input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--primary); }
.coin-body { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.coin-left { flex: 1; min-width: 0; }
.coin-right { flex-shrink: 0; max-width: 50%; text-align: right; }
.coin-name { font-weight: 600; }
.coin-pay { display: block; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.coin-net { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.coin-net > span { white-space: nowrap; }
.coin-option .coin-min { display: block; margin-top: 2px; font-weight: 500; }
.coin-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
#coinListMore .coin { margin-top: 0; }

#exactHint[hidden] { display: none; }
#topupError { margin-top: 12px; }

tr.has-details td { padding-bottom: 2px; border-bottom: none; }
tr.topup-details td { padding-top: 0; font-size: 12px; color: var(--muted); }
td a { font-weight: 600; }

/* ---- Каталог услуг (services.html) ---- */
/* Плашка групп — закреплена под шапкой (top = её высота), фон на всю ширину колонки: список под ней не просвечивает.
   Её высота (--subbar-h, меряет services.html) входит в отступ прокрутки к разделу. */
.group-bar {
  position: sticky;
  top: var(--header-h, 60px);
  z-index: 5;
  margin: 12px -16px 0;
  padding: 8px 16px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* Широкий экран — ровно по колонке карточек; узкий — во всю ширину экрана, строка групп листается от края до края */
@media (min-width: 641px) { .group-bar { margin: 12px 0 0; padding: 8px 0; } }
.catalog-tools { display: flex; flex-direction: column; gap: 12px; }
.catalog-tools input { border-radius: var(--radius-pill); }
/* Якоря групп: «Apple 14 · Blacklist 6 …» */
.group-anchors { display: flex; flex-wrap: wrap; gap: 8px; }
/* Узкий экран — одной строкой, листается вбок */
@media (max-width: 640px) {
  .group-anchors { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .group-anchors::-webkit-scrollbar { display: none; }
  .group-anchor { flex: 0 0 auto; white-space: nowrap; }
}
.group-anchor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: border-color var(--ease);
}
@media (hover: hover) {
  .group-anchor:hover { border-color: var(--primary); text-decoration: none; }
}
.group-anchor[aria-current="true"] { color: var(--primary); font-weight: 600; border-color: var(--primary); background: var(--primary-soft); }
.group-anchor[aria-current="true"] .group-count { color: var(--primary); }
.group-count {
  min-width: 20px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--subtle);
  border-radius: var(--radius-pill);
}
.catalog-count { margin: 10px 0 0; font-size: 13px; color: var(--text-soft); }
.catalog-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 18px; font-weight: 700; }
/* Строка: название + метки + цена, ниже — описание и действия */
.service-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.service-item:last-child { border-bottom: none; padding-bottom: 0; }
/* Название и метки слева (переносятся), цена — своя колонка справа: у всех услуг на одном месте, и на узком экране */
.service-item-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 12px; }
.service-item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.service-item-name { margin: 0; font-size: 15px; font-weight: 600; }
.service-item-price { font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.5; color: var(--primary); white-space: nowrap; text-align: right; }
.badge-instant,
.badge-input { padding: 1px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; border-radius: var(--radius-pill); }
.badge-instant { color: var(--primary); background: var(--primary-soft); }
/* Услуга временно недоступна */
.badge-unavailable { padding: 1px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--muted); background: rgba(15, 23, 42, 0.07); border-radius: var(--radius-pill); }
.link-btn.is-disabled { color: var(--muted); cursor: default; text-decoration: none; }
/* Узкий экран: в кнопке выбора метка съедала название («A…») — там её нет, недоступность видна в сообщении под кнопкой и в списке */
@media (max-width: 420px) { .svc-trigger .badge-unavailable { display: none; } }
.badge-input { color: var(--warning); background: #FDF3E6; }
.service-item-sub { display: flex; align-items: baseline; gap: 4px 16px; margin-top: 2px; }
.service-item-desc { flex: 1; margin: 0; font-size: 13px; color: var(--text-soft); }
.service-item-actions { display: flex; gap: 12px; white-space: nowrap; }
/* Действие-ссылка: «Example ▾», «Check →» */
.link-btn {
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.link-btn:hover { color: var(--primary-hover); text-decoration: underline; }
.example-box { margin-top: 10px; padding: 14px 16px; background: var(--subtle); border-radius: var(--radius-sm); }
.example-box[hidden] { display: none; }
/* «See example» под описанием выбранной проверки (Check, Bulk check) */
.service-example { max-width: 560px; margin: 6px auto 0; padding: 0 20px; text-align: center; }
.service-example[hidden] { display: none; }
.service-example .example-box { text-align: left; }
.example-note { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .service-item-sub { flex-direction: column; }
}

/* ---- Главная ---- */
.coming-soon { text-align: center; }
.coming-soon[hidden] { display: none; }
.coming-soon h2 { margin: 0 0 6px; font-size: 22px; }

@media (max-width: 400px) {
  .card { padding: 20px 16px; }
  .check-hero { padding-top: 24px; }
  .check-hero h1 { font-size: 22px; }
  .capsule { padding-left: 16px; }
  .capsule input { font-size: 16px; }
  .capsule button { padding: 11px 16px; }
}

/* ---- Лендинг (главная, «скоро запуск») ---- */
.landing { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px 64px; }
.landing-hero { text-align: center; padding: 24px 0 8px; }
.landing-hero h1 { margin: 0 0 10px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.landing-lead { margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.55; }
.landing-cta { margin: 20px 0 0; }
.landing-cta[hidden] { display: none; }
.landing-cta .btn-primary { display: inline-block; width: auto; margin-top: 0; padding: 13px 32px; }
.landing-checks h2 { margin: 0 0 12px; font-size: 17px; }
.landing-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.landing-checks li { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; position: relative; }
.landing-checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-dot); }
.landing-checks li span { color: var(--muted); font-size: 14px; }
@media (max-width: 400px) { .landing-hero h1 { font-size: 24px; } }

/* ---- Account ---- */
.account-list { margin: 12px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; font-size: 14px; }
.account-list dt { color: var(--muted); }
.account-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.status-ok { color: var(--success); font-weight: 600; }
.status-warn { color: var(--warning); font-weight: 600; }
.account-list .btn-link { margin-left: 6px; padding: 2px 8px; color: var(--primary); font-weight: 500; }
.account-list .btn-link:disabled { opacity: 0.6; cursor: default; }
.account-inline-status { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.status-bad { color: var(--danger); font-weight: 600; }
.status-muted { color: var(--muted); }

/* Remembered devices / Recent sign-ins / Sign out everywhere */
.btn-secondary, .btn-danger {
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}
.btn-secondary { color: var(--text); background: var(--surface-solid); border: 1px solid rgba(15, 23, 42, 0.16); }
.btn-secondary:hover { background: var(--subtle); }
.btn-danger { margin-top: 12px; color: #FFFFFF; background: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: #991B1B; }
.btn-secondary:disabled, .btn-danger:disabled { opacity: 0.6; cursor: default; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.device-list { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.device-row:last-child { border-bottom: none; }
.device-meta { min-width: 0; overflow-wrap: anywhere; color: var(--text-soft); }
.device-name { font-weight: 600; color: var(--text); }
.device-current { color: var(--success); font-weight: 600; }
.device-empty { margin: 12px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.logins-table .col-date { white-space: nowrap; }
.logins-table td.col-ip { overflow-wrap: anywhere; }
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  color: var(--text);
  background: var(--surface-solid);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.confirm-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.confirm-dialog p { margin: 10px 0 0; font-size: 14px; color: var(--text-soft); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions .btn-danger { margin-top: 0; }
@media (max-width: 560px) {
  .logins-table thead { display: none; }
  .logins-table, .logins-table tbody { display: block; }
  .logins-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .logins-table tr:last-child { border-bottom: none; }
  .logins-table td { padding: 0; border: none; }
  .logins-table td.col-date { grid-column: 1; grid-row: 1; font-weight: 600; }
  .logins-table td.col-result { grid-column: 2; grid-row: 1; text-align: right; }
  .logins-table td.col-device, .logins-table td.col-ip { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
}
@media (max-width: 400px) {
  .account-list { grid-template-columns: 1fr; gap: 2px; }
  .account-list dd { margin-bottom: 10px; }
}

/* ---- Пакетная проверка (bulk.html) ---- */
.bulk-hint { margin: 6px 0 14px; font-size: 14px; color: var(--muted); }
.bulk-label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.bulk-textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: var(--radius-sm);
  resize: vertical;
}
.bulk-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 12px; }
.bulk-actions .btn-primary { margin-left: auto; width: auto; margin-top: 0; }
.bulk-file { cursor: pointer; }
/* Плашка файла сжимается (имя — многоточием), «Preview» не переносится: basis 0 + min-width 0 */
.bulk-file-name { flex: 1 1 0; min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Плашка загруженного файла: «📄 имя · N lines ✕» */
.file-chip { display: inline-flex; vertical-align: middle; align-items: center; gap: 6px; max-width: 100%; padding: 10px 6px 10px 12px; font-size: 14px; line-height: 1.55; color: var(--text); background: var(--surface-solid); border: 1px solid rgba(15, 23, 42, 0.16); border-radius: var(--radius-sm); }
.file-chip-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-chip-meta { color: var(--muted); white-space: nowrap; }
.file-chip-remove { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -3px 0; padding: 0; font-size: 12px; color: var(--text-soft); background: none; border: none; border-radius: 50%; cursor: pointer; }
.file-chip-remove:hover { color: var(--danger); background: rgba(15, 23, 42, 0.08); }
.bulk-label[hidden], .bulk-textarea[hidden] { display: none; }
.bulk-expires { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bulk-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.bulk-stat { display: flex; flex-direction: column; min-width: 96px; padding: 10px 14px; background: var(--subtle); border-radius: var(--radius-sm); }
.bulk-stat-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bulk-stat-label { font-size: 12px; color: var(--muted); }
.bulk-stat.good .bulk-stat-value { color: var(--success); }
.bulk-stat.bad .bulk-stat-value { color: var(--danger); }
.bulk-stat.warn .bulk-stat-value { color: var(--warning); }
.bulk-note { margin: 8px 0; font-size: 14px; color: var(--muted); }
.bulk-note.warn { color: var(--warning); }
.bulk-note.bad { color: var(--danger); }
.bulk-total { margin: 16px 0 4px; font-size: 16px; }
.bulk-service { color: var(--muted); }
.bulk-confirm .btn-primary { margin-top: 8px; }
.bulk-rejected { margin: 12px 0; font-size: 14px; }
.bulk-rejected summary { cursor: pointer; font-weight: 600; color: var(--text-soft); }
.bulk-rejected .btn-small { margin-top: 10px; }
.bulk-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 14px; }
.bulk-table th { padding: 6px 8px 6px 0; font-size: 12px; font-weight: 600; text-align: left; color: var(--muted); white-space: nowrap; }
.bulk-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.bulk-list tr.expandable { cursor: pointer; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; }
.bulk-back { margin: 0 0 4px; font-size: 14px; }
.bulk-status { margin: 0 0 4px; font-size: 16px; }
.progress { height: 8px; margin: 12px 0; overflow: hidden; background: var(--subtle); border-radius: var(--radius-pill); }
.progress[hidden] { display: none; }
.progress-bar { width: 0; height: 100%; background: var(--primary); border-radius: inherit; transition: width var(--ease); }
.bulk-counters { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 4px; font-size: 14px; font-weight: 600; }
.bulk-count { display: inline-flex; align-items: baseline; gap: 2px; }
.bulk-count.st-problem { color: var(--danger); }
.bulk-count.st-problem .status-dot { background: var(--danger); }
.bulk-count.st-attention { color: var(--warning); }
.bulk-count.st-attention .status-dot { background: var(--warning); }
.bulk-count.st-clean { color: var(--success); }
.bulk-count.st-clean .status-dot { background: var(--success); }
.bulk-count.st-info { color: var(--text); }
.bulk-count.st-info .status-dot { background: var(--text-soft); }
.bulk-count.st-refunded, .bulk-count.st-pending { color: var(--muted); }
.bulk-cancel { margin-left: auto; color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  padding: 5px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.chip:hover { background: var(--primary-soft); }
.chip.active { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-ring); }
.bulk-items .col-pos { width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .bulk-actions .btn-primary { width: 100%; margin-left: 0; }
  .bulk-cancel { margin-left: 0; }
  .orders-table.bulk-items td.col-pos { order: 0; flex: none; width: auto; }
}

/* ---- Подвал всех страниц: правовые страницы, FAQ, поддержка. Ссылки — --text-soft: --primary на фоне страницы 4.4:1 ---- */
.site-footer { max-width: 960px; margin: 8px auto 0; padding: 24px 16px 32px; text-align: center; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-links a { color: var(--text-soft); }
.footer-links a:hover { color: var(--primary-hover); }
.footer-links a[aria-current="page"] { font-weight: 600; }
.footer-copy { margin: 10px 0 0; }

/* ---- Terms / Privacy / Refunds / FAQ: текст — в карточке (ссылки --primary на ней проходят AA) ---- */
.legal-draft { margin: 0 0 4px; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--warning); background: var(--warning-soft); border-radius: var(--radius-sm); }
.legal-body { padding: 8px 24px 24px; }
.legal-toc { padding: 16px 0 4px; border-bottom: 1px solid var(--line); }
.legal-toc ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.legal-section h2 { margin: 24px 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.legal-section h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.legal-section p, .legal-section li { color: var(--text-soft); overflow-wrap: anywhere; }
.legal-section p { margin: 0 0 10px; }
.legal-section .legal-placeholder { font-style: italic; color: var(--muted); }
.legal-updated { margin: 8px 0 4px; font-size: 14px; color: var(--muted); }
.legal-section ul { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 4px; }
.legal-section code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }
@media (max-width: 480px) { .legal-body { padding: 4px 16px 18px; } }
