/* Kometa — макеты личного кабинета.
 * Один файл стилей на обе страницы (вход/регистрация и кабинет).
 * Токены и приёмы взяты с живой главной страницы: тёмный космос, пастельные
 * плитки-«бенто» со скруглением 26px, лайм как единственный громкий акцент,
 * Unbounded в заголовках, Manrope в кнопках и подписях.
 */

/* ------------------------------------------------------------ шрифты --- */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'PT Root UI';
  src: url('fonts/pt-root-ui-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------- токены --- */

:root {
  --plum: #161020;
  --plum-2: #211933;
  --plum-3: #2c2245;
  --light: #f5f1ff;
  --white: #ffffff;
  --lime: #d9ff3f;
  --coral: #ff6a55;
  --peri: #a9a7ff;
  --mint: #7cf0c4;
  --muted: #d3cbe6;
  --muted-ink: #5b5178;
  --line: rgba(245, 241, 255, 0.16);
  --line-ink: rgba(22, 16, 32, 0.14);
  --radius: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header: 76px;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-ui: 'Manrope', system-ui, sans-serif;
  --font-text: 'PT Root UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

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

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

html {
  background: var(--plum);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.45;
  color: var(--light);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(43, 31, 74, 0.55), transparent 62%),
    linear-gradient(180deg, rgba(22, 16, 32, 0.72), rgba(18, 14, 27, 0.94) 55%, #120e1b 100%),
    url('img/comet-limb.webp') center / cover no-repeat fixed,
    var(--plum);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; }

::selection { background: var(--lime); color: var(--plum); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------- шапка --- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: rgba(22, 16, 32, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.06);
  backdrop-filter: blur(14px) saturate(1.06);
  border-bottom: 1px solid rgba(245, 241, 255, 0.08);
}

.top__in {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
  color: var(--light);
  flex: none;
}

.brand__mark { width: 44px; height: 25px; }

.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand__tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--plum);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 26px);
  margin-left: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: rgba(245, 241, 255, 0.68);
  transition: color 0.2s;
}

.nav a:hover { color: var(--light); }

.nav a.is-active {
  color: var(--light);
  position: relative;
}

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  transform: translateX(-50%);
}

.top__cta { flex: none; margin-left: 4px; }

@media (max-width: 760px) {
  :root { --header: 64px; }
  .nav { display: none; }
  .top__cta { margin-left: auto; }
  .brand__mark { width: 36px; height: 21px; }
  .brand__word { font-size: 16px; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s var(--spring), background-color 0.25s, color 0.25s, box-shadow 0.3s, border-color 0.2s;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn--lime {
  background: var(--lime);
  color: var(--plum);
  box-shadow: 0 10px 24px -14px rgba(217, 255, 63, 0.9);
}

.btn--plum { background: var(--plum); color: var(--light); }

.btn--ghost {
  background: transparent;
  color: var(--plum);
  border: 2px solid rgba(22, 16, 32, 0.18);
}

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

.btn--light-ghost {
  background: transparent;
  color: var(--light);
  border: 2px solid rgba(245, 241, 255, 0.28);
}

.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.btn--big { min-height: 58px; padding: 16px 30px; font-size: 17px; }
.btn--block { width: 100%; }

.btn__arrow { width: 20px; height: 20px; flex: none; }
.btn__icon { width: 20px; height: 20px; flex: none; }

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

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

.auth {
  padding: clamp(14px, 1.8vw, 22px) 0 clamp(20px, 2.4vw, 32px);
}

.auth__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(12px, 1.3vw, 18px);
  min-height: min(788px, calc(100svh - var(--header) - 46px));
}

.panel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.panel--form {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.4vw, 56px);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(217, 255, 63, 0.4), transparent 46%),
    radial-gradient(90% 70% at 0% 100%, rgba(169, 167, 255, 0.28), transparent 52%),
    var(--light);
  color: var(--plum);
}

.panel--comet {
  background:
    radial-gradient(80% 60% at 50% 46%, rgba(255, 255, 255, 0.34), transparent 66%),
    radial-gradient(110% 95% at 88% 100%, rgba(124, 240, 196, 0.32), transparent 52%),
    linear-gradient(160deg, #b3b1ff 0%, var(--peri) 44%, #9895f6 100%);
  min-height: 560px;
}

.auth__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(22, 16, 32, 0.56);
}

.auth__kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plum);
}

.auth__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 0.99;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.auth__title em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--lime) 62%);
}

.auth__lead {
  margin-top: 14px;
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(22, 16, 32, 0.66);
}

.seg {
  display: inline-flex;
  gap: 4px;
  margin-top: clamp(20px, 2.4vw, 30px);
  padding: 4px;
  border-radius: 999px;
  background: rgba(22, 16, 32, 0.06);
  align-self: flex-start;
}

.seg__btn {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(22, 16, 32, 0.58);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.seg__btn:hover { color: var(--plum); }

.seg__btn[aria-selected='true'] {
  background: var(--plum);
  color: var(--light);
  box-shadow: 0 8px 18px -12px rgba(22, 16, 32, 0.8);
}

.auth__form {
  display: grid;
  gap: 16px;
  margin-top: clamp(18px, 2vw, 26px);
}

.auth__form[hidden] { display: none; }

.field { display: grid; gap: 8px; }

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  color: rgba(22, 16, 32, 0.72);
}

.field__link {
  font-weight: 600;
  font-size: 12.5px;
  color: rgba(22, 16, 32, 0.56);
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 16, 32, 0.24);
  padding-bottom: 1px;
}

.field__link:hover { color: var(--plum); border-color: var(--plum); }

.input {
  width: 100%;
  min-height: 56px;
  padding: 0 48px 0 18px;
  border: 2px solid rgba(22, 16, 32, 0.14);
  border-radius: 16px;
  background: var(--white);
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--plum);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder { color: rgba(22, 16, 32, 0.36); }

.input:hover { border-color: rgba(22, 16, 32, 0.28); }

.input:focus {
  outline: 0;
  border-color: var(--plum);
  box-shadow: 0 0 0 4px rgba(217, 255, 63, 0.55);
}

.input-wrap { position: relative; display: flex; align-items: center; }

.input-wrap .input { padding-right: 54px; }

.input-btn {
  position: absolute;
  right: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 16, 32, 0.05);
  color: rgba(22, 16, 32, 0.52);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.input-btn:hover { background: rgba(22, 16, 32, 0.1); color: var(--plum); }
.input-btn svg { width: 20px; height: 20px; }

.field__help {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(22, 16, 32, 0.5);
}

.strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.strength__bars { display: flex; gap: 4px; flex: 1; }

.strength__bar {
  height: 5px;
  flex: 1;
  border-radius: 99px;
  background: rgba(22, 16, 32, 0.12);
  transition: background-color 0.25s;
}

.strength__bar.is-on { background: #2fbf8f; }
.strength__label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11.5px;
  color: rgba(22, 16, 32, 0.5);
  min-width: 64px;
  text-align: right;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(22, 16, 32, 0.68);
}

.check input { position: absolute; opacity: 0; pointer-events: none; }

.check__box {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 2px solid rgba(22, 16, 32, 0.24);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}

.check__box svg { width: 13px; height: 13px; opacity: 0; transition: opacity 0.15s; }
.check input:checked + .check__box { background: var(--plum); border-color: var(--plum); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box { outline: 3px solid var(--lime); outline-offset: 3px; }

.check a { color: var(--plum); text-decoration: underline; text-underline-offset: 2px; }

.auth__submit { margin-top: 4px; }

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(22, 16, 32, 0.4);
}

.or::before,
.or::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(22, 16, 32, 0.14);
}

.auth__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: clamp(18px, 2vw, 28px);
  font-size: 12.5px;
  color: rgba(22, 16, 32, 0.5);
}

.auth__foot a { color: rgba(22, 16, 32, 0.5); text-decoration: underline; text-underline-offset: 2px; }
.auth__foot a:hover { color: var(--plum); }

.auth__secure { display: inline-flex; align-items: center; gap: 6px; }
.auth__secure svg { width: 14px; height: 14px; opacity: 0.7; }

/* правая панель с кометой */

.comet {
  position: absolute;
  inset: 0;
}

.comet__glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 74%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 252, 240, 0.5), rgba(255, 150, 120, 0.3) 44%, rgba(255, 106, 85, 0.12) 66%, transparent 78%);
  filter: blur(14px);
  pointer-events: none;
}

.comet__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: comet-float 9s ease-in-out infinite alternate;
}

@keyframes comet-float {
  from { transform: translate3d(0, 5px, 0); }
  to { transform: translate3d(0, -7px, 0); }
}

.comet__tag {
  position: absolute;
  top: clamp(16px, 2vw, 24px);
  left: clamp(16px, 2vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--plum);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.comet__tag b { color: var(--light); font-weight: 400; }

.comet__hint {
  position: absolute;
  right: clamp(16px, 2vw, 24px);
  bottom: clamp(16px, 2vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(22, 16, 32, 0.82);
  color: var(--light);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12.5px;
  pointer-events: none;
}

.comet__hint svg { width: 16px; height: 16px; color: var(--lime); }

.comet__note {
  position: absolute;
  left: clamp(16px, 2vw, 24px);
  bottom: clamp(16px, 2vw, 24px);
  max-width: 240px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--white);
  color: var(--plum);
  transform: rotate(-1.2deg);
  box-shadow: 0 20px 40px -28px rgba(22, 16, 32, 0.6);
}

.comet__note b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.comet__note span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  color: rgba(22, 16, 32, 0.56);
}

.comet__note::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(22, 16, 32, 0.16);
}

.panel--comet .star {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.panel--comet .star--1 { left: 12%; top: 16%; }
.panel--comet .star--2 { right: 16%; top: 12%; width: 5px; height: 5px; }
.panel--comet .star--3 { left: 22%; bottom: 30%; width: 5px; height: 5px; opacity: 0.7; }
.panel--comet .star--4 { right: 11%; bottom: 38%; width: 4px; height: 4px; opacity: 0.6; }

@media (min-width: 1081px) and (max-height: 940px) {
  .panel--form { padding: clamp(30px, 3vw, 42px) clamp(34px, 3vw, 46px); }
  .auth__title { font-size: clamp(30px, 3vw, 42px); }
  .auth__lead { font-size: 15px; }
  .seg { margin-top: 18px; }
  .auth__form { margin-top: 18px; gap: 12px; }
  .input { min-height: 52px; }
  .btn--big { min-height: 54px; }
  .auth__foot { padding-top: 16px; }
}

@media (max-width: 1080px) {
  .auth__grid { grid-template-columns: 1fr; min-height: 0; }
  .panel--comet { order: -1; min-height: 0; height: clamp(250px, 42vw, 340px); }
  .panel--form { padding: clamp(24px, 4vw, 40px); }
  .comet__note { display: none; }
  .comet__hint { display: none; }
  .comet__glow { width: 52%; top: 48%; }
}

@media (max-width: 560px) {
  .status__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .referral__copy { flex-direction: column; align-items: stretch; }
  .referral__input { min-width: 0; }
  .panel--form { padding: 24px 20px 26px; border-radius: 22px; }
  .panel--comet { border-radius: 22px; height: 280px; }
  .auth__title { font-size: 30px; }
  .auth__lead { font-size: 14.5px; }
  .seg { width: 100%; }
  .seg__btn { flex: 1; padding: 0 12px; }
  .auth__foot { flex-direction: column; align-items: flex-start; }
  .comet__tag { top: 12px; left: 12px; min-height: 30px; padding: 0 12px; }
}

/* ------------------------------------------------------------ кабинет --- */

.cab { padding: clamp(14px, 1.8vw, 22px) 0 clamp(22px, 2.4vw, 34px); }

.cab__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 clamp(14px, 1.4vw, 20px);
}

.cab__hello {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 255, 0.5);
}

.cab__title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 2.6vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.cab__title em { font-style: normal; color: var(--peri); }

.cab__user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 7px 5px 5px;
  border-radius: 999px;
  background: rgba(245, 241, 255, 0.08);
  border: 1px solid rgba(245, 241, 255, 0.1);
}

.cab__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--plum);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
}

.cab__user-meta { display: grid; gap: 1px; padding-right: 8px; }
.cab__user-name { font-family: var(--font-ui); font-weight: 700; font-size: 13.5px; line-height: 1.15; }
.cab__user-mail { font-size: 11.5px; line-height: 1.15; color: rgba(245, 241, 255, 0.5); }

.cab__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 18px);
}

.tile {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(20px, 2vw, 28px);
  color: var(--plum);
  overflow: hidden;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.5s var(--spring);
  min-width: 0;
}

.tile:hover { transform: rotate(var(--rot, 0deg)) translateY(-2px); }

.tile--light { background: var(--light); }
.tile--white { background: var(--white); }
.tile--peri { background: var(--peri); }
.tile--lime { background: var(--lime); }
.tile--coral { background: var(--coral); }
.tile--mint { background: var(--mint); }

.tile__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22, 16, 32, 0.52);
}

.tile__label .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  margin-right: 7px;
  vertical-align: middle;
}

/* статус подписки */

.tile--status {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 344px;
}

.status__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}

.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.badge--ok { background: rgba(47, 191, 143, 0.14); color: #0d7a55; }
.badge--warn { background: rgba(22, 16, 32, 0.1); color: var(--plum); }
.badge--bad { background: rgba(22, 16, 32, 0.86); color: var(--light); }

.status__tariff {
  margin-left: auto;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  color: rgba(22, 16, 32, 0.5);
  white-space: nowrap;
}

.status__main {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.status__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(64px, 7.4vw, 104px);
  line-height: 0.84;
  letter-spacing: -0.06em;
}

.status__unit {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.05;
  padding-bottom: 8px;
}

.status__unit span {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: rgba(22, 16, 32, 0.5);
  margin-top: 3px;
}

.status__date {
  font-size: 15px;
  color: rgba(22, 16, 32, 0.66);
  margin-top: -2px;
}

.status__date b { color: var(--plum); }

.status__bar {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: rgba(22, 16, 32, 0.1);
  overflow: hidden;
  margin-top: 2px;
}

.status__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 78%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b6dc1f, var(--lime));
  box-shadow: 0 0 20px rgba(217, 255, 63, 0.7);
}

.status__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11px;
  color: rgba(22, 16, 32, 0.42);
}

.status__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-top: 4px;
}

.status__fact { display: grid; gap: 1px; }
.status__fact b {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
}
.status__fact span { font-size: 12px; color: rgba(22, 16, 32, 0.5); }

.status__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.status__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12.5px;
  color: rgba(22, 16, 32, 0.6);
}

.status__hint svg { width: 15px; height: 15px; flex: none; }

/* состояния статуса */

[data-state='expiring'] .tile--status { background: var(--peri); }
[data-state='expiring'] .badge--ok { background: rgba(22, 16, 32, 0.14); color: var(--plum); }
[data-state='expiring'] .status__fill { background: linear-gradient(90deg, #c9c6ff, var(--plum)); box-shadow: none; }
[data-state='expiring'] .status__bar { background: rgba(22, 16, 32, 0.16); }

[data-state='expired'] .tile--status { background: var(--coral); }
[data-state='expired'] .badge--ok { background: rgba(22, 16, 32, 0.86); color: var(--light); }
[data-state='expired'] .status__num { color: var(--plum); }
[data-state='expired'] .status__bar { background: rgba(22, 16, 32, 0.18); }
[data-state='expired'] .status__fill { width: 0; box-shadow: none; background: var(--plum); }
[data-state='expired'] .status__date b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
[data-state='expired'] .btn--lime { background: var(--plum); color: var(--light); box-shadow: none; }
[data-state='expired'] .btn--ghost { border-color: rgba(22, 16, 32, 0.36); }

.state-active,
.state-expiring,
.state-expired { display: contents; }

[data-state='active'] .state-expiring,
[data-state='active'] .state-expired,
[data-state='expiring'] .state-active,
[data-state='expiring'] .state-expired,
[data-state='expired'] .state-active,
[data-state='expired'] .state-expiring { display: none; }

/* ссылка подписки */

.tile--link {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  --rot: 0.4deg;
}

.tile--link .tile__label { color: rgba(22, 16, 32, 0.56); }

.link__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-top: 2px;
}

.link__lead { font-size: 13.5px; line-height: 1.45; color: rgba(22, 16, 32, 0.66); max-width: 36ch; }

.copybar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 6px 6px 16px;
  border-radius: 16px;
  background: rgba(22, 16, 32, 0.9);
  color: var(--light);
}

.copybar__url {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(245, 241, 255, 0.82);
}

.copybar__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--lime);
  color: var(--plum);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.25s var(--spring), background-color 0.2s;
}

.copybar__btn:hover { transform: scale(1.02); }
.copybar__btn svg { width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(22, 16, 32, 0.1);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11.5px;
  color: rgba(22, 16, 32, 0.74);
}

.tile__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(22, 16, 32, 0.52);
}

.tile__note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* устройства */

.tile--devices {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  --rot: -0.3deg;
}

.devices__list { display: grid; gap: 8px; margin-top: 2px; }

.device {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px 8px 8px;
  border-radius: 16px;
  background: rgba(22, 16, 32, 0.035);
  border: 1px solid rgba(22, 16, 32, 0.06);
}

.device__icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid rgba(22, 16, 32, 0.08);
  color: var(--plum);
}

.device__icon svg { width: 20px; height: 20px; }

.device__meta { display: grid; gap: 1px; min-width: 0; }
.device__name { font-family: var(--font-ui); font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.device__sub { font-size: 11.5px; color: rgba(22, 16, 32, 0.5); }

.device__state {
  margin-left: auto;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  color: #0d7a55;
}

.device__state--you { color: rgba(22, 16, 32, 0.46); }

.device--free {
  border-style: dashed;
  border-color: rgba(22, 16, 32, 0.16);
  background: transparent;
}

.device--free .device__icon { background: transparent; border-style: dashed; color: rgba(22, 16, 32, 0.5); }

.device--free .device__name { color: rgba(22, 16, 32, 0.6); }

.devices__action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--plum);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}

.devices__action svg { width: 15px; height: 15px; }

/* платежи */

.tile--payments {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  --rot: 0.25deg;
}

.pays { display: grid; gap: 2px; margin-top: 2px; }

.pay {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(22, 16, 32, 0.09);
}

.pay:last-child { border-bottom: 0; }

.pay__what { font-family: var(--font-ui); font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.pay__meta { font-size: 11.5px; color: rgba(22, 16, 32, 0.5); }
.pay__sum { font-family: var(--font-ui); font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap; }
.pay__method { font-size: 11px; text-align: right; color: rgba(22, 16, 32, 0.46); }

.pay__flag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  margin-left: 7px;
  border-radius: 6px;
  background: rgba(47, 191, 143, 0.16);
  color: #0d7a55;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 10px;
  vertical-align: 1px;
}

.tile__link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
}

.tile__link-row a { color: var(--plum); text-decoration: none; border-bottom: 1px solid rgba(22, 16, 32, 0.24); }
.tile__link-row a:hover { border-color: var(--plum); }
.tile__link-row span { color: rgba(22, 16, 32, 0.46); font-weight: 600; }

/* карты */

.tile--cards {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  --rot: -0.45deg;
}

.bankcard {
  position: relative;
  margin-top: 2px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(150deg, #211933, #161020 58%, #2c2245);
  color: var(--light);
  box-shadow: 0 18px 30px -22px rgba(22, 16, 32, 0.9);
  overflow: hidden;
}

.bankcard::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 255, 63, 0.28), transparent);
}

.bankcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bankcard__brand { font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; }
.bankcard__chip {
  width: 26px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f3e9b8, #d9c98a);
  opacity: 0.9;
}
.bankcard__num { margin-top: 16px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: rgba(245, 241, 255, 0.84); }
.bankcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 10.5px; color: rgba(245, 241, 255, 0.5); }

.cards__state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11.5px;
  color: rgba(22, 16, 32, 0.56);
}

.toggle {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(22, 16, 32, 0.22);
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.25s var(--spring);
}

.toggle[aria-pressed='true'] { background: var(--plum); }
.toggle[aria-pressed='true']::after { transform: translateX(16px); }

.cards__btn { margin-top: auto; }

/* рефералка */

.tile--referral {
  grid-column: span 7;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
  align-items: start;
  --rot: 0.35deg;
}

.referral__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 1.9vw, 30px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.referral__lead { margin-top: 8px; font-size: 13px; line-height: 1.45; color: rgba(22, 16, 32, 0.62); max-width: 34ch; }

.referral__copy {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(22, 16, 32, 0.14);
}

.referral__input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 2px solid rgba(22, 16, 32, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--plum);
}

.referral__btn {
  flex: none;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--plum);
  color: var(--light);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

.referral__stats { display: grid; gap: 10px; }

.ref-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(22, 16, 32, 0.12);
}

.ref-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.ref-stat span { font-family: var(--font-ui); font-weight: 600; font-size: 12px; color: rgba(22, 16, 32, 0.58); }
.ref-stat b { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; line-height: 1; }

/* поддержка */

.tile--support {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  --rot: -0.25deg;
}

.support__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.support__lead { font-size: 13px; line-height: 1.45; color: rgba(22, 16, 32, 0.68); max-width: 34ch; }

.support__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

.support__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
}

.support__links a { color: rgba(22, 16, 32, 0.66); text-decoration: none; border-bottom: 1px solid rgba(22, 16, 32, 0.22); }
.support__links a:hover { color: var(--plum); border-color: var(--plum); }

/* подвал макета */

.foot {
  padding: clamp(22px, 3vw, 34px) 0 28px;
  color: rgba(245, 241, 255, 0.46);
  font-size: 12.5px;
}

.foot__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(245, 241, 255, 0.1);
  padding-top: 18px;
}

.foot__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: rgba(245, 241, 255, 0.56); text-decoration: none; }
.foot p a { text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--light); }

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

.dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(9, 7, 14, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog[open],
.dialog.is-open { display: flex; }

.dialog__card {
  position: relative;
  width: min(480px, 100%);
  max-height: min(86svh, 760px);
  overflow: auto;
  padding: clamp(22px, 3vw, 30px);
  border-radius: 26px;
  background: var(--light);
  color: var(--plum);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

.dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 16, 32, 0.06);
  color: rgba(22, 16, 32, 0.62);
  cursor: pointer;
}

.dialog__close:hover { background: rgba(22, 16, 32, 0.12); color: var(--plum); }
.dialog__close svg { width: 18px; height: 18px; }

.dialog__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  padding-right: 34px;
}

.dialog__sub { margin-top: 8px; font-size: 13px; color: rgba(22, 16, 32, 0.62); }

.plans { display: grid; gap: 8px; margin-top: 16px; }

.plan {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 2px solid rgba(22, 16, 32, 0.12);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.plan:hover { border-color: rgba(22, 16, 32, 0.3); }

.plan:has(input:checked) {
  border-color: var(--plum);
  background: rgba(217, 255, 63, 0.24);
}

.plan input { position: absolute; opacity: 0; pointer-events: none; }

.plan__radio {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(22, 16, 32, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.plan input:checked + .plan__radio { border-color: var(--plum); }
.plan input:checked + .plan__radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--plum);
}

.plan__name { font-family: var(--font-ui); font-weight: 700; font-size: 14px; }
.plan__per { display: block; font-family: var(--font-ui); font-weight: 600; font-size: 11px; color: rgba(22, 16, 32, 0.5); }
.plan__price { margin-left: auto; font-family: var(--font-ui); font-weight: 700; font-size: 15px; white-space: nowrap; }

.methods { display: flex; gap: 8px; margin-top: 14px; }

.method {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 2px solid rgba(22, 16, 32, 0.12);
  background: var(--white);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

.method:has(input:checked) { border-color: var(--plum); background: rgba(217, 255, 63, 0.24); }
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method__icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(22, 16, 32, 0.06); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.method__icon svg { width: 17px; height: 17px; }
.method small { display: block; font-weight: 600; font-size: 10.5px; color: rgba(22, 16, 32, 0.5); }

.dialog__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(22, 16, 32, 0.12);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
}

.dialog__total strong { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; }
.dialog__cta { margin-top: 12px; }
.dialog__note { margin-top: 10px; font-size: 11.5px; line-height: 1.4; color: rgba(22, 16, 32, 0.5); text-align: center; }

@media (max-width: 760px) {
  .methods { flex-direction: column; }
}

/* адаптив кабинета */

@media (max-width: 1180px) {
  .tile--status { grid-column: span 12; }
  .tile--link { grid-column: span 12; }
  .tile--devices { grid-column: span 5; }
  .tile--payments { grid-column: span 7; }
  .tile--cards { grid-column: span 5; }
  .tile--referral { grid-column: span 7; }
  .tile--support { grid-column: span 5; }
}

@media (max-width: 900px) {
  .tile--devices,
  .tile--payments,
  .tile--cards,
  .tile--referral,
  .tile--support { grid-column: span 12; }
  .tile--referral { grid-template-columns: 1fr; gap: 12px; }
  .cab__head { align-items: flex-start; }
}

@media (max-width: 560px) {
  .tile { padding: 20px; border-radius: 22px; }
  .tile--status { min-height: 0; }
  .status__num { font-size: 68px; }
  .status__actions .btn { flex: 1; }
  .cab__user { display: none; }
  .cab__title { font-size: 26px; }
  .foot__in { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------ галерея --- */

.gallery { padding: clamp(20px, 3vw, 40px) 0 60px; }

.gallery__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.gallery__lead { margin-top: 12px; max-width: 62ch; color: rgba(245, 241, 255, 0.64); font-size: 15px; }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.gcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(245, 241, 255, 0.06);
  border: 1px solid rgba(245, 241, 255, 0.1);
  text-decoration: none;
  color: var(--light);
  transition: background-color 0.25s, transform 0.3s var(--spring);
}

.gcard:hover { background: rgba(245, 241, 255, 0.1); transform: translateY(-3px); }

.gcard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-radius: 14px; background: var(--plum-2); }
.gcard b { font-family: var(--font-ui); font-weight: 700; font-size: 15px; }
.gcard span { font-size: 12.5px; color: rgba(245, 241, 255, 0.56); }

/* ---------------------------------------------- дополнения к страницам --- */

.auth__switch {
  text-align: center;
  font-size: 12.5px;
  color: rgba(22, 16, 32, 0.52);
}

.auth__switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--plum);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  border-bottom: 1px solid rgba(22, 16, 32, 0.3);
}

.auth__switch button:hover { border-color: var(--plum); }

.cab__lead {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(245, 241, 255, 0.56);
  max-width: 46ch;
}

.top__exit {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(245, 241, 255, 0.24);
  color: rgba(245, 241, 255, 0.8);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}

.top__exit:hover { border-color: var(--lime); color: var(--light); }

.pay-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(22, 16, 32, 0.12);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  color: rgba(22, 16, 32, 0.5);
}

.pay-total b { font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: var(--plum); }

.devices__note {
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(22, 16, 32, 0.46);
}

.cards__note {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(22, 16, 32, 0.46);
}

.referral__rules {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12px;
  color: rgba(22, 16, 32, 0.62);
  cursor: pointer;
  border-bottom: 1px solid rgba(22, 16, 32, 0.24);
}

.referral__rules:hover { color: var(--plum); border-color: var(--plum); }

/* ----------------------------------------------- серверные дополнения --- */

/* Сообщение об ошибке в форме входа/кабинета. */
.auth__alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 106, 85, 0.14);
  border: 1px solid rgba(255, 106, 85, 0.5);
  color: #8d2c1c;
  font-size: 13px;
  line-height: 1.4;
}

.auth__alert b { font-family: var(--font-ui); font-weight: 700; }

.auth__alert--ok {
  background: rgba(47, 191, 143, 0.14);
  border-color: rgba(47, 191, 143, 0.5);
  color: #0d7a55;
}

/* Ссылки-вкладки вместо кнопок в сегменте (работают без JS). */
a.seg__btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* Служебные строки аккаунта. */
.account__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(22, 16, 32, 0.09);
  font-size: 12.5px;
  color: rgba(22, 16, 32, 0.55);
}

.account__row:last-of-type { border-bottom: 0; }
.account__row b {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  color: var(--plum);
  text-align: right;
  word-break: break-all;
}

.account__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.account__actions .btn { flex: 1; }
.account__actions form { display: contents; }

/* Кнопка-текст в кабинете. */
.text-btn {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12.5px;
  color: rgba(22, 16, 32, 0.62);
  cursor: pointer;
  border-bottom: 1px solid rgba(22, 16, 32, 0.24);
}
.text-btn:hover { color: var(--plum); border-color: var(--plum); }

/* Тёмная ссылка «Выйти» внутри аккаунт-плитки не нужна — используем обычную. */

/* Пустое состояние: подписки нет или она ещё не подключена. */
.empty-state { display: grid; gap: 10px; margin-top: 6px; }
.empty-state__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.empty-state__lead { font-size: 13.5px; line-height: 1.5; color: rgba(22, 16, 32, 0.62); max-width: 46ch; }
.empty-state__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* Прогресс-полоса: ширина приходит из шаблона. */
.status__fill[style] { min-width: 2px; }

/* На узких экранах аккаунт-плитка не должна растягивать строку. */
@media (max-width: 1180px) {
  .tile--account { grid-column: span 5; }
}
@media (max-width: 900px) {
  .tile--account, .tile--payinfo { grid-column: span 12; }
}

/* Всплывающая подсказка «скопировано». */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 95;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--light);
  color: var(--plum);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .65);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .35s var(--spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Кнопка «показать пароль» уже есть в макете; здесь только выравнивание значка. */
.input-btn svg { width: 20px; height: 20px; }

/* Плитки этапа 1: аккаунт и «как оплачиваем» (в макете их не было). */
.tile--account { grid-column: span 3; display: flex; flex-direction: column; gap: 8px; }
.tile--payinfo { grid-column: span 7; display: flex; flex-direction: column; gap: 10px; }

/* Способы входа: Telegram, пароль и ссылка заказа в одной строке. */
.tile--methods { grid-column: span 12; display: flex; flex-direction: column; gap: 14px; }
.login-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.login-method {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(22, 16, 32, 0.04);
}
.login-method__name {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22, 16, 32, 0.52);
}
.login-method__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.login-method__note { font-size: 11.5px; line-height: 1.4; color: rgba(22, 16, 32, 0.56); }
.login-method--order { grid-column: auto; }
.login-method .copybar { width: 100%; }
.login-method .btn { margin-top: auto; }
@media (max-width: 900px) {
  .login-methods { grid-template-columns: 1fr; }
}

.tile--status.is-empty { background: var(--light); }
.tile--status.is-pending { background: var(--peri); }

.payinfo__methods { display: flex; flex-wrap: wrap; gap: 6px; }
.payinfo__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.payinfo__lead { font-size: 13px; line-height: 1.45; color: rgba(22, 16, 32, 0.62); max-width: 46ch; }

button.top__exit {
  background: transparent;
  cursor: pointer;
  font: inherit;
}

@media (max-width: 1180px) {
  .tile--account { grid-column: span 5; }
  .tile--payinfo { grid-column: span 7; }
}
@media (max-width: 900px) {
  .tile--account, .tile--payinfo { grid-column: span 12; }
}
@media (max-width: 640px) {
  .cab__head { flex-direction: column; align-items: flex-start; }
  .cab__user { display: none; }
}

/* Одна колонка: страницы «пароль» и «сообщение» — без кометы. */
.auth__grid--single { grid-template-columns: minmax(0, 640px); justify-content: center; min-height: 0; padding-top: clamp(10px, 2vw, 26px); }
.auth__switch a { color: var(--plum); font-family: var(--font-ui); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(22, 16, 32, .3); }
.auth__switch a:hover { border-color: var(--plum); }

/* Подсказка «покупали раньше» и список возможностей на странице входа. */
.auth__help {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(22, 16, 32, 0.22);
  background: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(22, 16, 32, 0.62);
}
.auth__help b { font-family: var(--font-ui); font-weight: 700; color: var(--plum); }
.auth__help a { color: var(--plum); }

/* Вход через Telegram: кнопка, QR и состояние ожидания подтверждения. */
.tg-login { display: grid; gap: 10px; margin-top: clamp(18px, 2vw, 26px); }
.tg-login__qr {
  display: flex;
  justify-content: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(22, 16, 32, 0.1);
  background: var(--white);
}
.tg-login__qr svg { display: block; width: min(220px, 58vw); height: auto; }
.tg-login__state {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(217, 255, 63, 0.35);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--plum);
}
.tg-login__state[hidden] { display: none; }
.hint { font-size: 12.5px; line-height: 1.45; color: rgba(22, 16, 32, 0.58); }

/* Разделитель между тремя дверями входа. */
.auth__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(20px, 2.4vw, 30px);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(22, 16, 32, 0.46);
}
.auth__or::before,
.auth__or::after { content: ""; flex: 1; height: 1px; background: rgba(22, 16, 32, 0.12); }
.auth__or span { white-space: nowrap; }

.auth__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.auth__features span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(22, 16, 32, 0.05);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11.5px;
  color: rgba(22, 16, 32, 0.62);
}

/* Код привязки Telegram: крупно, чтобы легко продиктовать/ввести. */
.auth__code {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 600;
  letter-spacing: .28em;
  text-align: center;
  color: var(--lime, #c8ff3d);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: 14px 10px 14px 20px;
  margin: 18px 0 6px;
  user-select: all;
}
