/* Светлая тема личного кабинета */
:root {
  --bg: #f8f9fb;
  --bg-elevated: #ffffff;
  --bg-hover: #f3f4f6;
  --surface: #f3f4f6;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #4b5563;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --accent-active: #2563eb;
  --radius: 14px;
  --radius-sm: 12px;
  --radius-pill: 22px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --app-max: 560px;
}

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

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.05), transparent);
}

.app {
  width: 100%;
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 20px 12px calc(128px + var(--bottom-safe));
  display: flex;
  flex-direction: column;
}

/* Вход / регистрация: шапка только с брендом по центру (лого из /api/cabinet/logo.png) */
.app--login .header {
  display: block;
  margin-bottom: 20px;
  text-align: center;
}

.app--login .header__brand-row {
  justify-content: center;
  margin-bottom: 0;
}

.app--login .header__brand {
  justify-content: center;
  flex-wrap: wrap;
}

.app--login .header__title,
.app--login .header__user {
  display: none !important;
}

.app--login .header__logout {
  display: none !important;
}

.app--login {
  padding-top: max(48px, env(safe-area-inset-top, 0px));
}

.app--login .main {
  flex: 1;
  justify-content: center;
}

.app--login .bottom-nav {
  display: none;
}

.auth-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.auth-switch {
  margin: 16px 0 0;
  text-align: center;
}

.auth-switch__btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-active);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-switch__btn:hover {
  color: var(--text);
}

.cabinet-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cabinet-grid > .card {
  padding: 22px 16px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cabinet-grid .card__heading {
  font-size: 16px;
  margin-bottom: 14px;
}

/* Header */
.header {
  margin-bottom: 22px;
}

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

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--accent);
}

.header__logout {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.header__logout:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.header__logout:active {
  transform: scale(0.98);
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  color: var(--text-muted);
}

.header__logo-img {
  display: none;
  max-height: 128px;
  width: auto;
  max-width: 640px;
  object-fit: contain;
  border-radius: 24px;
}

.header__logo-img.header__logo-img--visible {
  display: block;
}

.header__name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.header__title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.header__user {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.header__user-plain {
  color: var(--text-muted);
}

.header__user code {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Cards */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.view.view--active {
  display: flex;
}

.btn-pay {
  margin-top: 8px;
  padding: 16px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-pay:hover {
  opacity: 0.95;
}

.btn-pay:active {
  transform: scale(0.99);
}

.btn-pay:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.topup-hint {
  margin: 0;
  font-size: 13px;
  color: #dc2626;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.card__subheading {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.bypass-terms-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.bypass-terms-hint a {
  color: var(--accent-active);
}

.card__heading {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Actions (главная — Действия) */
.action-btn--purchase-banner {
  width: 100%;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  margin-bottom: 12px;
  padding: 14px 18px;
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--accent-soft);
  color: var(--text);
}

.action-btn--purchase-banner:hover {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.5);
}

.action-btn--purchase-banner .action-btn__icon {
  color: var(--accent-active);
  flex-shrink: 0;
}

.action-btn--purchase-banner .action-btn__text {
  font-weight: 600;
  font-size: 15px;
}

.grid--actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 118px;
  padding: 16px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn__icon {
  display: flex;
  color: var(--accent);
}

.action-btn__icon svg {
  width: 26px;
  height: 26px;
}

.action-btn__text {
  line-height: 1.25;
  max-width: 100%;
}

/* Нижняя панель навигации */
.bottom-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--app-max);
  z-index: 10;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.bottom-nav {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 4px;
  padding: 12px 8px calc(10px + var(--bottom-safe));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  box-sizing: border-box;
}

a.nav-item.nav-item--external {
  text-decoration: none;
  color: var(--text-muted);
}

a.nav-item.nav-item--external:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.nav-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item__label {
  line-height: 1.2;
  text-align: center;
  hyphens: auto;
}

.nav-item__icon svg {
  width: 22px;
  height: 22px;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.nav-item--active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.22);
}

.nav-item__icon {
  display: flex;
  opacity: 0.95;
}

.nav-item--active .nav-item__icon {
  color: var(--accent-active);
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(138px + var(--bottom-safe));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 520px) {
  .app {
    padding-top: 28px;
  }
}

/* Десктоп: чуть шире колонка по центру, без бокового меню */
@media (min-width: 768px) {
  :root {
    --app-max: 720px;
    --radius-pill: 24px;
  }

  .app {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: calc(132px + var(--bottom-safe));
  }

  .app--login {
    padding: 48px 24px 40px;
  }

  .cabinet-grid {
    gap: 20px;
  }

  .cabinet-grid > .card {
    padding: 26px 22px 30px;
  }

  .cabinet-grid .card__heading {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .grid--actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .card__heading {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .action-btn {
    min-height: 128px;
    padding: 18px 12px;
    font-size: 14px;
    gap: 10px;
    border-radius: 18px;
  }

  .action-btn__icon svg {
    width: 28px;
    height: 28px;
  }

  .bottom-nav {
    padding: 14px 12px 12px;
    gap: 8px;
  }

  .nav-item {
    font-size: 12px;
    min-height: 58px;
    padding: 12px 8px;
    gap: 6px;
    border-radius: 16px;
  }

  .nav-item__icon svg {
    width: 28px;
    height: 28px;
  }

  .invite-lead {
    font-size: 15px;
  }

  .invite-stat {
    padding: 16px;
  }

  .invite-stat__label {
    font-size: 12px;
  }

  .invite-stat__value {
    font-size: 26px;
  }

  .invite-ref-row .invite-ref-input {
    font-size: 15px;
    padding: 16px 18px;
  }

  .header__logout {
    font-size: 14px;
    padding: 10px 16px;
  }

  .toast {
    bottom: calc(142px + var(--bottom-safe));
    left: auto;
    right: max(16px, calc(50% - 360px));
    transform: translateY(12px);
  }

  .toast.is-visible {
    transform: translateY(0);
  }
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-input {
  width: 100%;
  padding: 16px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  box-sizing: border-box;
}

.field-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-input--file {
  padding: 10px 12px;
  font-size: 14px;
}

.logo-upload-hint code {
  font-size: 12px;
  padding: 2px 5px;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.login-card,
.settings-card {
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.tariffs-loading,
.tariffs-empty {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.tariff-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

@media (min-width: 560px) {
  .tariff-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.tariff-card__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tariff-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.tariff-card__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-tariff-pay {
  flex-shrink: 0;
  padding: 14px 22px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-tariff-pay:hover:not(:disabled) {
  opacity: 0.95;
}

.btn-tariff-pay:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tariffs-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
}

.tariffs-result__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.tariffs-result__link-wrap {
  margin-bottom: 12px;
  word-break: break-all;
}

.tariffs-result__link {
  font-size: 14px;
  color: #059669;
  text-decoration: underline;
}

.btn-secondary {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.vpn-loading,
.vpn-empty {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.vpn-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vpn-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.vpn-card--inactive {
  opacity: 0.85;
  border-color: rgba(239, 68, 68, 0.25);
}

.vpn-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.vpn-card__head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 1;
}

.btn-copy-key--inline {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  flex-shrink: 0;
}

.vpn-card__id {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.vpn-card__id code {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--accent-active);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.vpn-card__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.vpn-card--inactive .vpn-card__badge {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.vpn-card__tag {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  color: #4338ca;
}

.vpn-card__tag--bypass {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.vpn-card__meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.vpn-card__nometa {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.vpn-card__link {
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.vpn-card__link:hover {
  text-decoration: underline;
}

/* Пригласить друзей */
.invite-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.invite-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.invite-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.invite-stat {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.invite-stat__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.invite-stat__value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.invite-ref-row .invite-ref-input {
  font-size: 13px;
  word-break: break-all;
}

.invite-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-actions .btn-pay {
  margin-top: 0;
}

.tariffs-result__hint {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.vpn-intro {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.home-keys-card {
  margin-bottom: 0;
}

.home-keys-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.home-key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 14px;
}

.home-key-row__id {
  font-weight: 600;
  color: var(--text);
}

.home-key-row__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-home-keys-all {
  width: 100%;
}

.guide-card .guide-block-title {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.guide-card .guide-block-title:first-of-type {
  margin-top: 0;
}

.guide-device-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-device-list a {
  color: #2563eb;
  text-decoration: none;
}

.guide-device-list a:hover {
  text-decoration: underline;
}

.guide-steps {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-card #btnGuidePickKey {
  margin-top: 4px;
}

.guide-keys-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  padding-bottom: calc(12px + var(--bottom-safe));
}

.guide-keys-overlay[hidden] {
  display: none !important;
}

.guide-keys-panel {
  width: 100%;
  max-width: var(--app-max);
  max-height: 70vh;
  overflow: auto;
  padding: 18px 16px 16px;
  border-radius: 18px 18px 12px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: var(--shadow);
}

.guide-keys-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.guide-keys-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.guide-keys-title {
  margin: 0 28px 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.guide-keys-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-keys-loading,
.guide-keys-empty {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.guide-keys-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.guide-keys-item:hover:not(:disabled) {
  border-color: rgba(147, 197, 253, 0.35);
}

.guide-keys-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.guide-keys-item__id {
  font-weight: 600;
}

.guide-keys-item__meta {
  font-size: 13px;
  color: var(--text-muted);
}


/* AUTH-REDESIGN-2026 */
/* ===== Экран авторизации: тёмный дизайн по референсу (scoped .app--login) ===== */
body:has(.app--login){ background:#03071a; }

.app--login{
  max-width:760px;
  color:#f5f7fb;
  padding-top:max(64px, env(safe-area-inset-top,0px));
}
.app--login::before{                 /* базовый фон + мягкие синие свечения */
  content:"";position:fixed;inset:0;z-index:-2;
  background:
    radial-gradient(52% 42% at 90% 46%, rgba(40,120,255,.10), transparent 70%),
    radial-gradient(46% 40% at 6% 2%, rgba(50,130,255,.20), transparent 62%),
    #03071a;
}
.app--login::after{                  /* декор: концентрические окружности + силуэт молнии */
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background-image:
    repeating-radial-gradient(circle at -40px -30px, rgba(115,160,255,.05) 0 1.5px, transparent 1.5px 82px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='340' viewBox='0 0 24 34'%3E%3Cpath d='M13 0L2 20h8l-1 14 12-20h-8z' fill='%23ff7a18'/%3E%3C/svg%3E");
  background-repeat:no-repeat, no-repeat;
  background-position:-30px -30px, 92% 74%;
  background-size:auto, 210px auto;
  opacity:.5;
}

/* Шапка/логотип/бренд */
.app--login .header{ margin-bottom:0; }
.app--login .header__logo{ min-height:0; }
.app--login .header__logo-img{ max-height:78px; border-radius:16px; }
.app--login .header__name{ margin-top:14px; font-size:23px; font-weight:700; color:#fff; letter-spacing:0; }

/* Hero */
.auth-hero{ display:none; }
.app--login .auth-hero{ display:block; text-align:center; margin-top:44px; }
.auth-hero__title{ margin:0; font-size:41px; line-height:1.14; font-weight:800; color:#f5f7fb; letter-spacing:-.01em; }
.auth-hero__accent{ background:linear-gradient(90deg,#1e6bff,#5296ff); -webkit-background-clip:text; background-clip:text; color:transparent; }
.auth-hero__sub{ max-width:500px; margin:18px auto 0; font-size:16px; line-height:1.5; color:#9299a8; }

/* Форма (login + register) */
.app--login .main{ flex:0 0 auto; justify-content:flex-start; margin-top:42px; }
.app--login .login-card{
  max-width:465px; margin:0 auto; width:100%;
  background:#080f28; border:1px solid rgba(120,165,255,.14);
  border-radius:20px; padding:30px 34px 32px;
  box-shadow:0 24px 60px rgba(0,0,0,.45); backdrop-filter:blur(12px);
}
.app--login .login-card .card__heading{ margin:0 0 24px; font-size:22px; font-weight:700; color:#f3f5f8; letter-spacing:-.01em; }
.app--login .auth-lead{ color:#9299a8; }
.app--login .field-label{ font-size:11px; font-weight:600; color:#8c94a3; letter-spacing:.06em; margin-bottom:9px; text-transform:uppercase; }
.app--login .field-wrap{ position:relative; margin-bottom:20px; }
.app--login .field-icon{ position:absolute; left:15px; top:50%; transform:translateY(-50%); width:20px; height:20px; color:#2a7bff; display:flex; pointer-events:none; }
.app--login .field-icon svg{ width:100%; height:100%; }
.app--login .field-wrap .field-input{ padding-left:44px; }
.app--login .field-wrap:has(.field-eye) .field-input{ padding-right:46px; }
.app--login .field-input{
  height:50px; padding:0 16px; border-radius:12px;
  background:rgba(16,11,6,.55); border:1px solid rgba(120,160,255,.15);
  color:#f3f5f8; font-size:16px;
}
.app--login .field-input::placeholder{ color:#858d9d; }
.app--login .field-input:focus{ border-color:rgba(45,125,255,.6); box-shadow:0 0 0 3px rgba(40,120,255,45,.18); }
.app--login .field-eye{ position:absolute; right:12px; top:50%; transform:translateY(-50%); width:34px; height:34px; display:flex; align-items:center; justify-content:center; border:none; background:none; color:#858d9d; cursor:pointer; padding:0; }
.app--login .field-eye svg{ width:20px; height:20px; }
.app--login .field-eye.is-on{ color:#2a7bff; }

/* Кнопка входа */
.app--login .btn-pay{
  position:relative; margin-top:26px; width:100%; height:54px; padding:0 22px;
  border-radius:12px; background:linear-gradient(90deg,#ef5a10 0%,#1e6bff 55%,#4a92ff 100%);
  font-size:16px; font-weight:600; color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 24px rgba(239,90,16,.34);
  transition:filter .18s ease, transform .18s ease;
}
.app--login .btn-pay:hover{ filter:brightness(1.06); transform:translateY(-1px); opacity:1; }
.app--login .btn-pay__arrow{ position:absolute; right:20px; top:50%; transform:translateY(-50%); width:20px; height:20px; }

/* Ссылки под кнопкой */
.app--login .auth-switch{ margin:26px 0 0; text-align:center; }
.app--login .auth-switch--register{ margin-top:15px; }
.app--login .auth-switch__btn{ font-size:13px; font-weight:500; color:#2a7bff; text-decoration:none; }
.app--login .auth-switch__btn:hover{ color:#5c9dff; text-decoration:underline; }
.app--login .auth-switch__muted{ font-size:13px; color:#a0a6b1; }
.app--login .auth-switch__link{ color:#2a7bff; }

@media (max-width:560px){
  .app--login{ padding-left:18px; padding-right:18px; }
  .app--login .auth-hero{ margin-top:34px; }
  .auth-hero__title{ font-size:31px; }
  .app--login .main{ margin-top:34px; }
  .app--login .login-card{ padding:24px 22px 24px; }
}


/* FORGOT-MODAL-DARK-2026 */
.forgot-overlay{ align-items:center; }
.forgot-panel{
  max-width:390px; padding:24px 22px 22px; border-radius:18px;
  background:#080f28; border:1px solid rgba(120,165,255,.16);
  box-shadow:0 24px 60px rgba(0,0,0,.5); color:#f5f7fb;
}
.forgot-panel .guide-keys-close{ color:#8c94a3; }
.forgot-panel .guide-keys-close:hover{ color:#f5f7fb; }
.forgot-title{ margin:0 0 8px; font-size:18px; font-weight:700; color:#f3f5f8; }
.forgot-text{ margin:0 0 18px; font-size:14px; line-height:1.45; color:#9299a8; }
.forgot-btn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  height:50px; margin-top:10px; border-radius:12px;
  font-size:15px; font-weight:600; color:#fff; text-decoration:none;
  transition:filter .15s ease, transform .15s ease;
}
.forgot-btn:first-of-type{ margin-top:0; }
.forgot-btn:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.forgot-btn--tg{ background:linear-gradient(90deg,#0f52d6,#3c8aff); }
.forgot-btn--vk{ background:#d9560c; }


/* CABINET-DARK-2026 : тёмный премиальный кабинет (в тон странице входа) */
:root{
  --bg:#04091c; --bg-elevated:#0a1330; --bg-hover:#101a3d; --surface:#0c1636;
  --border:rgba(125,170,255,.14); --border-strong:rgba(125,170,255,.30);
  --text:#e6ecfb; --text-muted:#93a6cc; --accent:#93a6cc;
  --accent-soft:rgba(30,107,255,.14); --accent-active:#4a9bff;
  --shadow:0 16px 40px rgba(0,0,0,.45);
}
body{ background:#04091c; background-image:
  radial-gradient(900px 440px at 50% -12%, rgba(30,107,255,.14), transparent 60%),
  radial-gradient(620px 360px at 100% 18%, rgba(40,120,255,.07), transparent 70%); }
.cabinet-grid > .card{ box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.05); border-color:var(--border); }
.nav-item:hover, a.nav-item.nav-item--external:hover, .btn-secondary:hover, .guide-keys-close:hover{ background:rgba(255,255,255,.06); }
.header__logout{ background:rgba(255,255,255,.04); }
.action-btn__icon{ color:#4a9bff; }
.action-btn--purchase-banner{ background:linear-gradient(135deg,#1e6bff,#4a9bff 55%,#72b7ff); border-color:transparent; color:#fff; box-shadow:0 14px 30px -10px rgba(30,107,255,.5); }
.action-btn--purchase-banner:hover{ filter:brightness(1.05); background:linear-gradient(135deg,#1e6bff,#4a9bff 55%,#72b7ff); border-color:transparent; }
.action-btn--purchase-banner .action-btn__icon{ color:#fff; }
.btn-tariff-pay{ background:linear-gradient(135deg,#1e6bff,#4a9bff 55%,#72b7ff); box-shadow:none; }
.btn-pay{ background:linear-gradient(135deg,#1e6bff,#4a9bff 55%,#72b7ff); }
.nav-item--active{ background:var(--accent-soft); box-shadow:inset 0 0 0 1px rgba(30,107,255,.30); }
.nav-item--active .nav-item__icon{ color:#4a9bff; }
.vpn-card__link, .guide-device-list a, .tariffs-result__link, .bypass-terms-hint a, .vpn-card__id code{ color:#4a9bff; }
.btn-extend-key--inline, .btn-home-extend{ color:#4ade80; border-color:rgba(74,222,128,.4); background:rgba(34,197,94,.12); }
.btn-extend-key--inline:hover, .btn-home-extend:hover{ color:#86efac; background:rgba(34,197,94,.18); }
.vpn-card__badge{ background:rgba(34,197,94,.16); color:#4ade80; }
.vpn-card--inactive .vpn-card__badge{ background:rgba(239,68,68,.16); color:#fca5a5; }
.topup-hint{ color:#f87171; }
.header__user code, .tariffs-extend-banner__code, .guide-keys-item{ background:var(--surface); }

/* Карточка статуса подписки */
.sub-status{ display:flex; align-items:center; gap:18px; }
.sub-ring{ position:relative; width:92px; height:92px; flex-shrink:0; }
.sub-ring svg{ display:block; }
.sub-ring__num{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.sub-ring__num b{ font-size:25px; font-weight:800; color:var(--text); line-height:1; font-variant-numeric:tabular-nums; }
.sub-ring__num small{ font-size:11px; color:var(--text-muted); margin-top:2px; }
.sub-status__info{ flex:1; min-width:0; }
.sub-pill{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; padding:5px 10px; border-radius:999px; background:rgba(34,197,94,.16); color:#4ade80; }
.sub-pill::before{ content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.sub-pill--off{ background:rgba(239,68,68,.16); color:#fca5a5; }
.sub-status__date{ margin:10px 0 14px; color:var(--text-muted); font-size:13.5px; }
.sub-status__date b{ color:var(--text); font-weight:700; }
.btn-sub-extend{ appearance:none; border:0; cursor:pointer; font-family:inherit; font-weight:700; font-size:14px; color:#fff; border-radius:12px; padding:11px 18px; background:linear-gradient(135deg,#1e6bff,#4a9bff 55%,#72b7ff); box-shadow:0 10px 24px -8px rgba(30,107,255,.5); }
.btn-sub-extend:hover{ filter:brightness(1.06); }

/* Тарифы: лучший + цена за месяц */
.tariff-card{ position:relative; }
.tariff-card--best{ border-color:#4a9bff; box-shadow:inset 0 0 0 1px #4a9bff, 0 12px 30px -14px rgba(30,107,255,.5); background:linear-gradient(180deg,rgba(30,107,255,.14),transparent), var(--bg-elevated); }
.tariff-badge{ position:absolute; top:-9px; left:16px; font-size:10.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:#fff; background:linear-gradient(135deg,#1e6bff,#4a9bff 55%,#72b7ff); padding:3px 9px; border-radius:999px; box-shadow:0 6px 14px -4px rgba(30,107,255,.5); }
.tariff-card__permonth{ font-size:12px; color:var(--text-muted); margin-top:2px; }

/* Скелетоны загрузки */
.sk-block{ background:var(--surface); border-radius:12px; position:relative; overflow:hidden; }
.sk-block::after{ content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.06),transparent); transform:translateX(-100%); animation:sk-sh 1.4s infinite; }
@keyframes sk-sh{ 100%{ transform:translateX(100%); } }
@media (prefers-reduced-motion:reduce){ .sk-block::after{ animation:none; } }


/* CABINET-QR-2026 : QR-модалка, кнопка QR, trust-строка оплаты */
.btn-qr-key--inline{ padding:6px 12px; font-size:13px; font-weight:600; border-radius:10px; flex-shrink:0; }
.pay-trust{ margin:14px 0 0; font-size:11.5px; color:var(--text-muted); display:flex; align-items:center; gap:6px; justify-content:center; }
.qr-overlay{ position:fixed; inset:0; z-index:300; background:rgba(0,0,0,.62); display:flex; align-items:center; justify-content:center; padding:16px; padding-bottom:calc(16px + var(--bottom-safe)); }
.qr-overlay[hidden]{ display:none !important; }
.qr-panel{ position:relative; width:100%; max-width:340px; background:var(--bg-elevated); border:1px solid var(--border); border-radius:18px; padding:22px 20px 18px; box-shadow:0 24px 60px rgba(0,0,0,.5); text-align:center; }
.qr-close{ position:absolute; top:8px; right:10px; width:36px; height:36px; border:none; background:transparent; color:var(--text-muted); font-size:24px; line-height:1; cursor:pointer; }
.qr-close:hover{ color:var(--text); }
.qr-title{ margin:0 0 14px; font-size:16px; font-weight:700; color:var(--text); }
.qr-canvas-box{ display:flex; justify-content:center; }
.qr-canvas-box canvas{ width:220px; height:220px; image-rendering:pixelated; background:#fff; border-radius:12px; padding:8px; box-sizing:border-box; }
.qr-hint{ margin:12px 0 16px; font-size:12.5px; color:var(--text-muted); line-height:1.5; }
.qr-actions{ display:flex; gap:10px; }
.qr-actions .btn-secondary{ flex:1; }

/* CABINET-QR-2026 home-row actions layout */
.home-key-row__actions{ width:100%; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:6px; }
