:root {
  --bg: #081a46;
  --bg-strong: #0d245d;
  --surface: rgba(8, 26, 70, 0.72);
  --surface-strong: #10285f;
  --ink: #f8d548;
  --text: #f4f7ff;
  --muted: #b9c7f1;
  --line: rgba(248, 213, 72, 0.16);
  --accent: #ffd84a;
  --accent-dark: #ffbf00;
  --danger: #ff8d72;
  --success: #7bf7c7;
  --shadow: 0 24px 60px rgba(2, 10, 28, 0.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

:root[data-theme="midnight"] {
  --bg: #040d25;
  --bg-strong: #091537;
  --surface: rgba(6, 14, 34, 0.78);
  --surface-strong: #0a1739;
  --ink: #ffe25e;
  --text: #eef4ff;
  --muted: #94a8d9;
  --line: rgba(255, 226, 94, 0.14);
  --accent: #ffe25e;
  --accent-dark: #ffc400;
  --danger: #ff9077;
  --success: #82f0cc;
  --shadow: 0 26px 72px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 74, 0.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(24, 57, 145, 0.34), transparent 28%),
    var(--bg);
  /* iOS Safari: фон сплошной до самого top, без светлой полосы у status-bar.
     viewport-fit=cover + theme-color + safe-area-inset обеспечивают слияние. */
  background-color: var(--bg);
}
html { background-color: var(--bg); }   /* подложка под body, чтобы между body-bg и краем экрана не было прозрачности */
body {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(21, 21, 21, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 21, 21, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 90%);
}

.page-shell {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.utility-bar,
.site-footer,
.history-row,
.settings-row,
.inline-actions,
.dashboard-hero {
  display: flex;
  gap: 16px;
}

.utility-bar,
.site-footer,
.history-row,
.settings-row,
.dashboard-hero {
  justify-content: space-between;
}

.utility-bar,
.dashboard-hero {
  align-items: flex-start;
}

.utility-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.utility-side {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.utility-side-right {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.brand-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.utility-actions,
.theme-switcher,
.quick-actions,
.plan-list,
.history-list,
.settings-list,
.check-list,
.support-list,
.auth-points,
.auth-alt,
.auth-actions {
  display: grid;
  gap: 12px;
}

.history-list-spacious {
  gap: 18px;
}

.utility-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
}

.flash-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: grid;
  gap: 10px;
}

.flash {
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.flash.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.flash-message {
  flex: 1;
}

.flash-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.flash:hover .flash-close,
.flash:focus-within .flash-close {
  opacity: 1;
  pointer-events: auto;
}

.flash-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.flash-success {
  border-color: rgba(13, 122, 88, 0.25);
}

.flash-error {
  border-color: rgba(166, 70, 45, 0.3);
}

.brand-chip,
.eyebrow,
.meta-label,
.stat-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 216, 74, 0.12);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 16px;
  height: 22px;
  display: inline-block;
  background: linear-gradient(180deg, #ffe56f, #ffb700);
  clip-path: polygon(46% 0%, 100% 0%, 68% 44%, 100% 44%, 26% 100%, 47% 58%, 14% 58%);
  filter: drop-shadow(0 0 10px rgba(255, 221, 87, 0.4));
}

.theme-icon-button,
.mini-link,
.mini-badge {
  border-radius: 999px;
}

.theme-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 216, 74, 0.08);
  color: var(--text);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-icon-button:hover {
  transform: translateY(-1px);
}

.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  opacity: 0;
  transform: scale(0.7);
}

.theme-icon-moon {
  fill: none;
  stroke: #eef4ff;
  stroke-width: 1.8;
  opacity: 1;
  transform: scale(1);
}

.theme-icon-button.is-active .theme-icon-sun {
  opacity: 1;
  transform: scale(1);
}

.theme-icon-button.is-active .theme-icon-moon {
  opacity: 0;
  transform: scale(0.7);
}

.theme-icon-button.is-active {
  background: rgba(255, 226, 94, 0.12);
  border-color: rgba(255, 226, 94, 0.22);
}

.mini-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(255, 216, 74, 0.08);
  border: 1px solid var(--line);
}

.badge-danger {
  color: var(--danger);
}

.auth-layout,
.dashboard,
.stat-grid,
.panel-grid,
.search-form {
  display: grid;
  gap: 34px;
}

.cabinet {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 34px;
}

.cabinet-wide,
.dashboard-wide {
  width: min(1240px, 100%);
}

.cabinet-medium,
.compact-stack {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.dashboard {
  width: min(1220px, 100%);
  margin: 0 auto;
}

.cabinet-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.cabinet-topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.balance-card,
.device-summary-card,
.mini-card,
.plan-sheet {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  backdrop-filter: blur(14px);
}

.balance-card {
  padding: 42px 34px 32px;
  text-align: center;
  display: grid;
  gap: 18px;
}

.balance-label {
  font-size: 1.15rem;
  font-weight: 700;
}

.balance-value {
  font-size: clamp(2.8rem, 10vw, 4.4rem);
  line-height: 0.95;
  color: var(--accent);
}

.balance-note {
  margin: 0;
  color: var(--muted);
}

.button-balance-main {
  min-height: 62px;
  font-size: 1.15rem;
  width: 100%;
}

.button-white-list-hero {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  gap: 0;
  padding-inline: 20px;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
}

.balance-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.topup-chip {
  border: 1px solid rgba(255, 216, 74, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mini-card {
  padding: 20px;
  display: grid;
  gap: 8px;
}

.mini-card-link {
  text-decoration: none;
  color: var(--text);
}

.mini-card-icon {
  color: #3b8cff;
  font-size: 1.35rem;
  line-height: 1;
}

.mini-card small {
  color: var(--muted);
}

.mini-card,
.device-summary-card,
.plan-sheet {
  background:
    linear-gradient(180deg, rgba(255, 216, 74, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.device-summary-card {
  padding: 24px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.device-summary-card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.device-summary-card p {
  margin: 0;
  color: var(--muted);
}

.cabinet-subline {
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
}

.plan-stack {
  display: grid;
  gap: 18px;
}

.plan-sheet {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.plan-sheet-copy {
    display: grid;
    gap: 4px;
    flex: 0 0 180px;
    min-width: 180px;
    overflow-wrap: normal;
    word-break: normal;
}

.plan-sheet-copy span {
    color: var(--muted);
}

.plan-sheet-copy strong,
.plan-sheet-copy span {
    overflow-wrap: normal;
    word-break: normal;
}

.plan-sheet-price {
  font-weight: 800;
}

.plan-sheet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-soft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-list-compact {
  gap: 14px;
}

.history-list,
.settings-list,
.check-list {
  display: grid;
  gap: 14px;
}

.history-row-clean {
  align-items: center;
}

.auth-layout {
  width: min(980px, 100%);
  margin: 20px auto 0;
}

.auth-card-centered {
  max-width: 980px;
  margin-inline: auto;
}

.auth-card-head-centered {
  text-align: center;
  justify-items: center;
}

.auth-form-narrow {
  max-width: 720px;
  margin-inline: auto;
}

.auth-card,
.auth-note-card,
.auth-info-panel,
.panel,
.stat-card,
.site-footer,
.support-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-card,
.auth-note-card,
.auth-info-panel,
.panel,
.stat-card,
.support-footer {
  padding: 36px;
}

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

.auth-card-head {
  display: grid;
  gap: 12px;
}

.auth-card-head h1,
.auth-card-head h2,
.panel-head h2,
.support-card h3 {
  margin: 0;
}

.auth-card-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
}

.auth-subtitle,
.dashboard-hero p,
.panel-copy,
.stat-card p,
.form-foot,
.history-row p,
.empty-state p,
.return-copy,
.footer-copy p,
.panel-note,
.verify-copy,
.auth-helper,
.auth-note-copy p {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-form-inline {
  margin-top: 12px;
}

.auth-form label {
  display: grid;
  gap: 10px;
}

.auth-actions {
  margin-top: 22px;
  gap: 14px;
  justify-items: stretch;
}

.auth-actions .mini-link {
  justify-self: center;
  text-align: center;
}

.form-foot {
  margin: 18px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
}

.form-foot span {
  color: rgba(255, 255, 255, 0.82);
}

.form-foot a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 800;
}

.auth-note-card {
  display: grid;
  gap: 18px;
  background: rgba(8, 26, 70, 0.56);
}

.auth-note-copy {
  display: grid;
  gap: 12px;
}

.auth-note-copy h2 {
  margin: 0;
  font-size: 1.45rem;
}

.auth-note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.auth-note-links a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.auth-info-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

.auth-info-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 216, 74, 0.32), transparent 68%);
}

.auth-info-copy,
.support-card {
  position: relative;
  z-index: 1;
}

.support-card {
  align-self: end;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 216, 74, 0.08);
  border: 1px solid rgba(255, 216, 74, 0.16);
}

.auth-info-copy h1,
.dashboard-hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.95;
}

.auth-point,
.check-item {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 216, 74, 0.09);
  border: 1px solid rgba(255, 216, 74, 0.12);
}

input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
}

input::placeholder {
  color: var(--muted);
}

input:focus,
button:focus,
a:focus {
  outline: 2px solid rgba(255, 216, 74, 0.32);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.button-block {
  width: 100%;
}

.button-primary {
  background: var(--accent);
  color: #081a46;
}

.button-secondary {
  background: rgba(255, 216, 74, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.button-success {
  background: rgba(61, 188, 132, 0.16);
  color: #dffff3;
  border: 1px solid rgba(97, 235, 170, 0.28);
}

.button-compact {
  padding: 12px 16px;
  font-size: 0.98rem;
}

.button-google {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button-app {
  background: linear-gradient(135deg, rgba(255, 216, 74, 0.94), rgba(255, 191, 0, 0.9));
  color: #081a46;
}

.button-app.is-disabled {
  opacity: 0.55;
  pointer-events: auto;
}

.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.stat-card-balance {
  background:
    linear-gradient(135deg, rgba(255, 216, 74, 0.22), rgba(14, 38, 103, 0.66)),
    var(--surface);
}

.stat-value {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(1.5rem, 2vw, 2.6rem);
}

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
}

.panel-grid-large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-card-group {
  display: grid;
  gap: 10px;
}

.plan-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 216, 74, 0.07);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.plan-title {
  font-weight: 800;
}

.key-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.key-block {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

code {
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: rgba(5, 12, 29, 0.9);
  color: #ffe892;
  font-family: "Cascadia Code", "Consolas", monospace;
  word-break: break-all;
  border: 1px solid rgba(255, 216, 74, 0.12);
}

.inline-actions {
  flex-wrap: wrap;
  margin-top: 20px;
}

.app-launch-note {
  margin-top: 12px;
  color: var(--muted);
}

.history-row,
.settings-row {
  padding: 18px 20px;
  border: 1px solid rgba(255, 216, 74, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(5, 16, 47, 0.38);
}

.history-row:last-child,
.settings-row:last-child {
  border-bottom: 1px solid rgba(255, 216, 74, 0.12);
}

.history-row strong {
  display: block;
  margin-bottom: 6px;
}

.history-amount {
  white-space: nowrap;
  font-weight: 800;
}

.history-amount.positive {
  color: var(--success);
}

.history-amount.negative {
  color: var(--danger);
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    rgba(255, 216, 74, 0.04);
  border: 1px solid rgba(255, 216, 74, 0.12);
}

.footer-links {
  display: grid;
  gap: 8px;
  text-align: right;
}

.footer-links a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.search-form {
  grid-template-columns: 1fr auto;
}

.support-footer {
  margin-top: 42px;
  display: grid;
  gap: 28px;
}

.support-footer-copy {
  display: grid;
  gap: 10px;
}

.support-footer-copy h2 {
  margin: 0;
}

.support-footer-copy p {
  margin: 0;
  color: var(--text);
  opacity: 0.92;
}

.support-footer-nav {
  min-width: 0;
}

.support-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.support-footer-grid li {
  min-width: 0;
}

.support-footer-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 112px;
  padding: 20px;
  border-radius: 22px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.support-footer-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 216, 74, 0.28);
  background: rgba(255, 216, 74, 0.06);
  text-decoration: none;
}

:root[data-theme="midnight"] .support-footer-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0)),
    rgba(4, 13, 37, 0.55);
  border-color: rgba(255, 226, 94, 0.08);
  box-shadow: none;
}

:root[data-theme="midnight"] .support-footer-card:hover {
  background: rgba(255, 226, 94, 0.05);
  border-color: rgba(255, 226, 94, 0.22);
}

.support-footer-card small {
  color: var(--text);
  opacity: 0.92;
}

.support-footer-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.support-footer-label {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 1500px) {
  .page-shell {
    width: min(1440px, calc(100% - 60px));
    padding-top: 42px;
  }

  html,
  body {
    font-size: 18px;
  }
}

@media (max-width: 980px) {
  .stat-grid,
  .panel-grid,
  .panel-grid-large,
  .auth-info-panel,
  .search-form,
  .support-footer-grid,
  .split-fields,
  .topup-modal-presets {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .site-footer,
  .history-row,
  .settings-row {
    flex-direction: column;
  }

  .utility-bar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .utility-side,
  .utility-side-right {
    justify-content: center;
  }

  .key-meta,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .footer-links {
    text-align: left;
  }

  .auth-note-links {
    flex-direction: column;
  }

  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .plan-sheet {
    flex-direction: column;
    align-items: stretch;
  }

  .plan-sheet-actions {
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 18px;
  }

  .auth-card,
  .auth-note-card,
  .auth-info-panel,
  .panel,
  .stat-card,
  .site-footer,
  .support-footer {
    padding: 20px;
  }

  .auth-card-head h1,
  .auth-info-copy h1,
  .dashboard-hero h1 {
    line-height: 1;
  }

  .auth-layout {
    gap: 18px;
  }

  .cabinet-topbar,
  .device-summary-card,
  .device-entry {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 40px);
    padding: 22px;
  }
}

.section-head,
.panel-head {
  display: grid;
  gap: 6px;
}

.section-head h2,
.panel-head h2,
.panel-head h1 {
  margin: 0;
}

.payment-method-panel,
.summary-card,
.help-card,
.action-row,
.key-copy-box {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 24, 64, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.payment-method-panel {
  padding: 30px;
}

.payment-method-grid,
.summary-grid,
.help-grid,
.key-copy-grid,
.action-list,
.stack-buttons,
.referral-stats {
  display: grid;
  gap: 18px;
}

.payment-method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.payment-method-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014)),
    rgba(8, 20, 53, 0.62);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.payment-method-card input {
  display: none;
}

.payment-method-card.is-selected {
  border-color: rgba(255, 216, 74, 0.34);
  background: rgba(255, 216, 74, 0.1);
  transform: translateY(-1px);
}

.payment-method-card small,
.plan-sheet-meta,
.summary-card p,
.help-card small,
.referral-copy p,
.referral-stats span {
  color: var(--muted);
}

.payment-method-card strong,
.summary-card strong,
.help-card strong,
.plan-sheet strong,
.action-row span,
.key-copy-box .meta-label,
.history-row strong,
.empty-state strong {
  color: var(--text);
}

.cabinet > *,
.mini-card,
.plan-sheet,
.plan-sheet-copy,
.plan-sheet-actions,
.payment-method-card,
.summary-card,
.help-card,
.support-footer-card,
.action-row,
.key-copy-box,
.device-summary-card,
.key-hero-copy {
  min-width: 0;
}

.mini-card,
.payment-method-card,
.summary-card,
.help-card,
.support-footer-card,
.action-row,
.device-summary-card,
.auth-card-head,
.auth-subtitle,
.form-foot {
  overflow-wrap: anywhere;
}

.payment-method-emoji {
  font-size: 1.3rem;
  line-height: 1;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card {
  padding: 28px;
  display: grid;
  gap: 12px;
}

.summary-card strong {
  font-size: 1.45rem;
}

.action-panel {
  display: grid;
  gap: 18px;
}

.key-card-stack {
  display: grid;
  gap: 22px;
}

.key-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px 26px;
  border-radius: 22px;
  background: rgba(255, 216, 74, 0.08);
  border: 1px solid rgba(255, 216, 74, 0.12);
}

.key-hero-copy {
  display: grid;
  gap: 4px;
}

.key-hero-copy strong {
  font-size: 1.2rem;
}

.key-hero-copy span {
  color: var(--muted);
}

.action-list {
  gap: 20px;
}

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 22px;
  color: var(--text);
  text-decoration: none;
}

.action-row-button {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 24, 64, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.action-row strong {
  color: var(--accent);
}

.key-copy-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.key-copy-box {
  padding: 22px 24px;
  display: grid;
  gap: 10px;
}

.key-copy-box code {
  overflow-wrap: anywhere;
  font-family: "Consolas", "SFMono-Regular", monospace;
  color: var(--text);
}

.payment-qr-image {
  width: min(100%, 260px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  display: block;
}

.stack-buttons {
  margin-top: 16px;
}

.stack-buttons-spacious {
  gap: 14px;
}

.referral-copy {
  display: grid;
  gap: 10px;
}

.referral-copy p {
  margin: 0;
}

.referral-copy-wide {
  max-width: 920px;
}

.referral-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.referral-stats div {
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 8px;
}

.referral-stats strong {
  font-size: 1.1rem;
}

.referral-stats-roomy {
  margin-top: 10px;
}

.help-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-card {
  padding: 22px;
  color: var(--text);
  text-decoration: none;
  display: grid;
  gap: 10px;
}

.help-card-static {
  cursor: default;
}

.help-card-link {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.help-card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 216, 74, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 216, 74, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(9, 24, 64, 0.72);
}

.help-emoji {
  font-size: 1.2rem;
}

.help-grid-compact {
  gap: 14px;
}

.faq-stack {
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 24, 64, 0.6);
  overflow: hidden;
}

.faq-summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--text);
}

.faq-body {
  display: grid;
  gap: 12px;
  padding: 0 22px 22px;
  color: var(--muted);
}

.faq-body p {
  margin: 0;
}

.knowledge-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.inline-actions {
  flex-wrap: wrap;
}

.inline-actions-spacious {
  gap: 14px;
}

.inline-actions-tight {
  gap: 10px;
}

.panel-spacious {
  display: grid;
  gap: 22px;
}

.device-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 216, 74, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(5, 16, 47, 0.38);
}

.device-entry-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.device-entry-body strong {
  font-size: 1.2rem;
}

.device-entry-body p {
  margin: 0;
  color: var(--muted);
}

.device-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill-success {
  color: #dffff3;
  background: rgba(61, 188, 132, 0.16);
  border-color: rgba(97, 235, 170, 0.28);
}

.status-pill-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-open {
  overflow: hidden;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 24px 12px 32px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 5, 16, 0.6);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 30px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    var(--surface-strong);
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-copy p {
  margin: 0;
  color: var(--muted);
}

.topup-modal-body {
  display: grid;
  gap: 18px;
}

.topup-input-wrap {
  display: grid;
  gap: 10px;
}

.topup-modal-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.topup-chip {
  border: 1px solid rgba(255, 216, 74, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  min-height: 52px;
  padding: 12px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.topup-chip:hover,
.topup-chip.is-selected {
  border-color: rgba(255, 216, 74, 0.32);
  background: rgba(255, 216, 74, 0.12);
  transform: translateY(-1px);
}

.modal-estimate {
  min-height: 56px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 216, 74, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: flex;
  align-items: center;
}

@media (max-width: 920px) {
  .payment-method-grid,
  .summary-grid,
  .panel-grid,
  .panel-grid-large,
  .help-grid,
  .referral-stats {
    grid-template-columns: 1fr;
  }

  .key-hero {
    flex-direction: column;
    align-items: stretch;
  }
}

.panel-grid-align-top {
  align-items: start;
}

.overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.overview-card-main,
.overview-card-side {
  display: grid;
  gap: 16px;
}

.overview-days {
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.overview-note,
.overview-balance {
  margin: 0;
}

.overview-note {
  color: var(--text);
  font-size: 1.04rem;
}

.overview-balance {
  color: var(--muted);
  font-size: 0.96rem;
}

.overview-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.overview-chip-grid-single {
  grid-template-columns: minmax(220px, 320px);
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  align-self: start;
}

.overview-chip-grid-single .overview-chip {
  width: min(320px, 100%);
}

.overview-chip,
.quick-link-card,
.admin-metric-card,
.admin-user-card,
.addon-inline-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 22px;
}

.overview-chip {
  padding: 18px 20px;
  display: grid;
  gap: 8px;
}

.overview-status-chip strong {
  font-size: 1.12rem;
  color: var(--text);
}

.guide-open .guide-target-context {
  position: relative;
  z-index: 61;
  isolation: isolate;
  pointer-events: none;
}

.guide-open .guide-target-active {
  position: relative;
  z-index: 62;
  isolation: isolate;
  border-color: rgba(255, 216, 74, 0.58);
  background: rgba(255, 216, 74, 0.03);
  box-shadow:
    0 0 0 3px rgba(255, 216, 74, 0.32),
    0 18px 40px rgba(2, 10, 28, 0.22);
  scroll-margin-top: 28px;
}

.modal-shell-guide {
  z-index: 70;
}

.guide-backdrop {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.guide-modal-card {
  position: fixed;
  top: 24px;
  right: 24px;
  width: min(300px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  z-index: 72;
  display: grid;
  gap: 10px;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 216, 74, 0.22);
  background: #10224f;
  box-shadow:
    0 24px 70px rgba(2, 8, 24, 0.48),
    0 0 0 1px rgba(255, 216, 74, 0.14);
}

.guide-modal-card h2,
.guide-modal-card p {
  margin: 0;
}

.guide-modal-card p {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.98rem;
}

.guide-modal-card h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.guide-modal-card .eyebrow {
  font-size: 0.72rem;
}

.guide-modal-card .button {
  padding: 12px 16px;
  min-height: 48px;
}

@media (max-width: 640px) {
  .guide-modal-card {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 16px;
    transform: none;
    width: auto;
    padding: 18px 18px 16px;
    max-height: calc(100vh - 28px);
  }
}

.overview-chip span,
.addon-inline-stat span,
.admin-user-meta {
  color: var(--muted);
}

.overview-chip strong {
  font-size: 1.2rem;
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

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

.quick-link-card {
  padding: 24px;
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.quick-link-card-button {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.quick-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 216, 74, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.quick-link-card strong {
  font-size: 1.8rem;
}

.quick-link-card p {
  margin: 0;
  color: var(--muted);
}

.addon-stack {
  display: grid;
  gap: 22px;
}

.addon-panel {
  min-height: 100%;
}

.addon-inline-stat {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.addon-inline-stat strong {
  font-size: 1.05rem;
}

.modal-card-wide {
  max-width: min(1080px, 100%);
}

.plan-stack-modal {
  gap: 18px;
}

.payment-method-grid-compact {
  gap: 14px;
}

.dashboard-hero-compact {
  margin-bottom: 28px;
}

.stat-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.device-entry-static {
  align-items: start;
}

.device-entry-static .device-entry-body {
  gap: 10px;
}

.status-pill-success {
  color: #d9ffe2;
  background: rgba(34, 164, 97, 0.18);
  border-color: rgba(34, 164, 97, 0.28);
}

.button-success {
  background: rgba(34, 164, 97, 0.18);
  border-color: rgba(34, 164, 97, 0.28);
  color: #e7fff0;
}

.button-success:hover {
  background: rgba(34, 164, 97, 0.28);
}

.referral-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.badge-success {
  background: rgba(34, 164, 97, 0.14);
  border-color: rgba(34, 164, 97, 0.28);
  color: #dfffe9;
}

.admin-cabinet {
  gap: 28px;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.admin-metric-card {
  padding: 22px 24px;
  display: grid;
  gap: 8px;
}

.admin-metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.admin-metric-card p {
  margin: 0;
  color: var(--muted);
}

.admin-user-card {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  gap: 18px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.admin-user-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 216, 74, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.admin-user-card-main,
.admin-user-card-stats {
  display: grid;
  gap: 8px;
}

.admin-user-card-main p,
.admin-user-card-stats span {
  margin: 0;
  color: var(--muted);
}

.admin-user-card-stats strong {
  color: var(--text);
}

.admin-audit-list {
  margin-top: 18px;
}

.addon-page-panel {
  gap: 22px;
}

@media (max-width: 1100px) {
  .overview-card,
  .admin-user-card {
    grid-template-columns: 1fr;
  }

  .admin-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .overview-card,
  .quick-link-grid,
  .admin-overview-grid,
  .stat-grid-wide,
  .overview-chip-grid {
    grid-template-columns: 1fr;
  }

  .referral-user-meta {
    justify-content: flex-start;
  }
}

.telegram-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text);
}

.telegram-card-empty {
  background: linear-gradient(135deg, rgba(36, 161, 222, 0.18), rgba(36, 161, 222, 0.04));
  border-color: rgba(36, 161, 222, 0.35);
}

.telegram-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telegram-card-header strong {
  font-weight: 600;
}

.telegram-icon {
  font-size: 1.25rem;
}

.telegram-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.telegram-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.telegram-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(123, 247, 199, 0.18);
}

.telegram-help-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.telegram-unlink-hint {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.button-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  align-self: flex-start;
}

/* ===== Animations & micro-interactions ===== */

@keyframes anim-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes anim-slide-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes anim-bounce-in {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.96); }
  60%  { opacity: 1; transform: translateY(2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes anim-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123, 247, 199, 0.55); }
  70%      { box-shadow: 0 0 0 8px rgba(123, 247, 199, 0); }
}

@keyframes anim-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes anim-tick {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes anim-glow {
  0%, 100% { text-shadow: 0 0 12px rgba(255, 216, 74, 0.32); }
  50%      { text-shadow: 0 0 24px rgba(255, 216, 74, 0.62); }
}

@keyframes anim-check-pop {
  0%   { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.anim-enter {
  animation: anim-slide-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .anim-enter,
  .telegram-status-dot,
  .overview-days,
  .modal-card,
  .flash {
    animation: none !important;
  }
}

/* Smooth transitions across the board */
.button,
.quick-link-card,
.panel,
.action-row,
.overview-card,
.modal-card,
.payment-method-card,
.telegram-card,
.telegram-status-dot,
code,
input,
textarea,
select,
a {
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.2s ease;
}

/* Hover lift for buttons & cards (desktop) */
@media (hover: hover) {
  .button:hover:not(.is-disabled):not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(2, 10, 28, 0.32);
  }
  .quick-link-card:hover,
  .telegram-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(2, 10, 28, 0.32);
    border-color: rgba(255, 226, 94, 0.32);
  }
  .action-row:hover {
    background: rgba(255, 226, 94, 0.06);
  }
  /* Статичный hover-underline — ТОЛЬКО для ссылок без своей анимированной полоски.
     .mini-link (::after) и a.animated-underline (background) исключены → у них ровно
     ОДНА анимированная линия, без второй статичной (фикс двойного подчёркивания). */
  a:not(.button):not(.support-footer-card):not(.quick-link-card):not(.action-row):not(.admin-user-card):not(.admin-user-telegram-link):not(.mini-link):not(.animated-underline):not(.brand-chip-link):not(.platform-card):not(.quick-link-card-button):hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* Tap feedback for touch (mobile/tablet) */
@media (hover: none) {
  .button:active:not(.is-disabled):not(:disabled),
  .quick-link-card:active,
  .telegram-card:active,
  .action-row:active {
    transform: scale(0.98);
  }
}

/* Pulse on the "linked" status dot */
.telegram-status-dot {
  animation: anim-pulse 2.4s ease-out infinite;
}

/* Hero days glow */
.overview-days {
  animation: anim-glow 3.6s ease-in-out infinite;
}

/* Modal entry */
.modal-shell:not([hidden]) .modal-backdrop {
  animation: anim-fade-in 0.25s ease-out both;
}
.modal-shell:not([hidden]) .modal-card {
  animation: anim-slide-up 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Flash / banner */
.flash {
  animation: anim-bounce-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Skeleton shimmer hook (apply class .skeleton on loading nodes) */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: anim-shimmer 1.4s linear infinite;
  border-radius: var(--radius-sm);
}

/* Telegram sticker */
.telegram-sticker {
  width: 120px;
  height: 120px;
  margin: 0 auto 0.5rem;
  display: block;
}
.modal-card-telegram {
  text-align: center;
}
.panel-head-center {
  text-align: center;
}
.modal-card-telegram .modal-copy {
  text-align: left;
}

/* Telegram link timer colors */
#telegramTimerValue {
  display: inline-block;
  transition: color 0.3s ease, transform 0.18s ease;
  color: var(--success);
}
#telegramTimerValue.timer-warn {
  color: var(--accent);
}
#telegramTimerValue.timer-danger {
  color: var(--danger);
}
#telegramTimerValue.timer-tick {
  animation: anim-tick 0.22s ease-out;
}

/* Success "check" animation hook for unlinking flow */
.telegram-card-success::after {
  content: "✓";
  display: inline-block;
  color: var(--success);
  font-size: 1.4rem;
  font-weight: 700;
  animation: anim-check-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Animated link underline */
a.animated-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-size: 0 1px;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
}
a.animated-underline:hover {
  background-size: 100% 1px;
}

/* ===== Welcome overlay ===== */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 24, 0.72);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 90;
  animation: anim-fade-in 0.25s ease-out both;
}
.welcome-overlay.welcome-dismiss {
  animation: anim-fade-out 0.25s ease-in forwards;
}
@keyframes anim-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.welcome-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  animation: anim-slide-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.welcome-sticker {
  width: 120px;
  height: 120px;
}
.welcome-card .eyebrow {
  color: var(--accent);
}
.welcome-card h2 {
  margin: 0;
  font-size: 1.5rem;
}
.welcome-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.welcome-actions {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.4rem;
}
.welcome-actions .button {
  flex: 1;
}

/* ===== Auth widgets ===== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.5rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-telegram-widget {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 0.5rem;
}

/* ===== Admin telegram badge ===== */
.admin-user-telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(36, 161, 222, 0.16);
  color: #6cc1ec;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.35rem;
}
.admin-user-telegram-link {
  color: #6cc1ec;
  text-decoration: none;
}
.admin-user-telegram-link:hover {
  text-decoration: underline;
}

/* ===== Admin traffic grid ===== */
.admin-traffic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.admin-traffic-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.admin-traffic-stat .eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-traffic-stat strong {
  font-size: 1.4rem;
  color: var(--text);
}
.admin-traffic-stat p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 720px) {
  .admin-traffic-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Manual confirm form ===== */
.manual-confirm-form {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}
.manual-confirm-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.85rem;
}

/* ==========================================================================
   UI refresh — Этап 1 (живость + освежённый визуал). Аддитивно, палитра та же.
   ========================================================================== */

/* — Scroll-reveal: секции выезжают при попадании в вьюпорт — */
.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal-pending.is-revealed { opacity: 1; transform: none; }

/* — Карточки: живой hover-lift + мягкая акцентная подсветка — */
.overview-card,
.quick-link-card,
.telegram-card,
.panel,
.plan-sheet,
.payment-method-card,
.support-footer-card {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s ease,
              border-color 0.28s ease;
}
.quick-link-card:hover,
.plan-sheet:hover,
.payment-method-card:hover,
.support-footer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(2, 10, 28, 0.42), 0 0 0 1px rgba(255, 216, 74, 0.28);
  border-color: rgba(255, 216, 74, 0.4);
}
.overview-card:hover,
.panel:hover {
  box-shadow: 0 28px 64px rgba(2, 10, 28, 0.4), 0 0 0 1px rgba(255, 216, 74, 0.18);
}
/* тонкая акцентная линия сверху карточек-кнопок при наведении */
.quick-link-card,
.support-footer-card { position: relative; overflow: hidden; }
.quick-link-card::after,
.support-footer-card::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.35s ease;
}
.quick-link-card:hover::after,
.support-footer-card:hover::after { transform: scaleX(1); }

/* — Кнопки: lift + press + «блик» у основной — */
.button { transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.25s ease, filter 0.2s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.985); }
.button-primary { position: relative; overflow: hidden; }
.button-primary::after {
  content: "";
  position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.button-primary:hover { box-shadow: 0 14px 30px rgba(255, 191, 0, 0.34); }
.button-primary:hover::after { left: 140%; }

/* — Акцент на главном числе дней (мягкое свечение) — */
.overview-days {
  text-shadow: 0 0 30px rgba(255, 216, 74, 0.28);
}

/* — Action-row: лёгкий сдвиг + подсветка при наведении — */
.action-row { transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.action-row:hover {
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* — Mini-links в шапке: анимированное подчёркивание — */
.mini-link { position: relative; }
.mini-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.mini-link:hover::after { transform: scaleX(1); }

/* — Telegram status-dot: пульс-кольцо — */
.telegram-status-dot.status-active { position: relative; }
.telegram-status-dot.status-active::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--success);
  animation: ui-pulse-ring 2s ease-out infinite;
}
@keyframes ui-pulse-ring {
  0% { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* — Скелетон-загрузка (для состояний загрузки) — */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.14) 37%, rgba(255,255,255,0.06) 63%);
  background-size: 400% 100%;
  border-radius: var(--radius-sm);
  animation: ui-skeleton 1.4s ease infinite;
}
@keyframes ui-skeleton { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* — Фокус доступности: аккуратное кольцо — */
.button:focus-visible,
.mini-link:focus-visible,
.quick-link-card:focus-visible,
.action-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* — Уважение к prefers-reduced-motion: гасим всё новое — */
@media (prefers-reduced-motion: reduce) {
  .reveal-pending { opacity: 1 !important; transform: none !important; transition: none !important; }
  .button, .button:hover, .button:active,
  .quick-link-card:hover, .plan-sheet:hover, .payment-method-card:hover,
  .support-footer-card:hover, .action-row:hover {
    transform: none !important;
  }
  .button-primary::after,
  .telegram-status-dot.status-active::before,
  .skeleton { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   UI refresh — Этап 1, статичный полиш (заметно свежее В ПОКОЕ). Палитра та же.
   ========================================================================== */

/* Hero-карточка доступа: богатый градиент + акцентная рамка + глубокая тень */
.overview-card {
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 216, 74, 0.12), transparent 44%),
    linear-gradient(180deg, var(--surface-strong), var(--bg-strong)) !important;
  border: 1px solid rgba(255, 216, 74, 0.20) !important;
  box-shadow: 0 30px 72px rgba(2, 10, 28, 0.44) !important;
}

/* Главное число дней — градиентом + мягкое свечение */
.overview-days {
  background: linear-gradient(118deg, #ffffff 0%, var(--accent) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 26px rgba(255, 216, 74, 0.34));
  letter-spacing: -0.01em;
}

/* Eyebrow-подписи — акцентные, разрядка, аккуратный апперкейс */
.eyebrow {
  color: var(--accent) !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}

/* Карточки — всегда видимая тонкая акцентная линия сверху + чуть глубже тень */
.quick-link-card,
.telegram-card {
  position: relative;
  box-shadow: 0 18px 44px rgba(2, 10, 28, 0.34);
}
.quick-link-card::before,
.telegram-card::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 74, 0.55), transparent);
  opacity: 0.6;
}

/* Крупные значения в карточках — чуть выразительнее */
.quick-link-card strong { letter-spacing: -0.01em; }

/* Панели — мягкая верхняя подсветка-кромка (стекло) */
.panel.action-panel,
.panel.panel-spacious {
  box-shadow: 0 26px 60px rgba(2, 10, 28, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Заголовки — плотнее и контрастнее */
.cabinet-topbar h1 { letter-spacing: -0.02em; }
.panel-head h2 { letter-spacing: -0.01em; }

/* Строки ключа/копирования — мягкая рамка для читаемости */
.key-copy-box code {
  border: 1px solid rgba(255, 216, 74, 0.12);
}

/* ==========================================================================
   ТЁМНАЯ ТЕМА (midnight): единый «цвет» блоков/кнопок — как карточки
   Устройства/Бонусы (.quick-link-card: стекло rgba(255,255,255,.04)+ --line).
   Системно, на ВСЕХ страницах. Палитра та же.
   ========================================================================== */

/* Основные блоки → светлое стекло + рамка (как quick-link-card) */
:root[data-theme="midnight"] .panel,
:root[data-theme="midnight"] .stat-card,
:root[data-theme="midnight"] .telegram-card,
:root[data-theme="midnight"] .telegram-card-empty,
:root[data-theme="midnight"] .auth-card,
:root[data-theme="midnight"] .auth-note-card,
:root[data-theme="midnight"] .auth-info-panel,
:root[data-theme="midnight"] .modal-card,
:root[data-theme="midnight"] .plan-sheet,
:root[data-theme="midnight"] .payment-method-card,
:root[data-theme="midnight"] .help-card,
:root[data-theme="midnight"] .help-article-card,
:root[data-theme="midnight"] .summary-card,
:root[data-theme="midnight"] .device-summary-card,
:root[data-theme="midnight"] .device-entry,
:root[data-theme="midnight"] .mini-card,
:root[data-theme="midnight"] .admin-metric-card,
:root[data-theme="midnight"] .admin-user-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    transparent !important;
  border: 1px solid var(--line) !important;
}

/* Hero-карточка «Доступ» — то же светлое стекло, но сохраняем жёлтый акцент-оверлей */
:root[data-theme="midnight"] .overview-card {
  background:
    radial-gradient(120% 150% at 0% 0%, rgba(255, 216, 74, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    transparent !important;
  border: 1px solid var(--line) !important;
}

/* Вложенные строки/иннер-блоки — чуть светлее для иерархии */
:root[data-theme="midnight"] .action-row,
:root[data-theme="midnight"] .key-hero,
:root[data-theme="midnight"] .key-copy-box,
:root[data-theme="midnight"] .history-row-clean,
:root[data-theme="midnight"] .overview-chip,
:root[data-theme="midnight"] .overview-status-chip {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid var(--line) !important;
}

/* Вторичные/мягкие кнопки — тот же тон стекла (не тёмные плашки) */
:root[data-theme="midnight"] .button-secondary,
:root[data-theme="midnight"] .button-soft {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
}
:root[data-theme="midnight"] .button-secondary:hover,
:root[data-theme="midnight"] .button-soft:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 226, 94, 0.3) !important;
}

/* code-боксы ключа — в тон */
:root[data-theme="midnight"] code,
:root[data-theme="midnight"] .key-copy-box code {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--line) !important;
}

/* ==========================================================================
   UI refresh — Этап 2. Раскатка стиля на все страницы + ПОЧИНКА НАЛОЖЕНИЙ.
   Аддитивно, палитра та же, обе темы. Главный приоритет — overflow/наложения.
   ========================================================================== */

/* ── 0. Никакого горизонтального скролла нигде ─────────────────────────── */
html, body { overflow-x: hidden; }
.page-shell { max-width: 100%; }
img, svg, video, canvas, table { max-width: 100%; }

/* ── 1. НАЛОЖЕНИЯ ТЕКСТА: history-row (платежи/аудит/возврат/крипто) ─────
   Строка — флекс с двумя детьми: слева текст, справа бейдж. Без min-width:0
   у текстового блока длинная строка не сжимается и налезает на бейдж.       */
.history-row {
  align-items: center;
}
.history-row > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}
.history-row p,
.history-row strong,
.history-row code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.history-row .mini-badge,
.history-row .history-amount,
.history-row > .mini-badge,
.history-row > div:last-child:not(:first-child) {
  flex-shrink: 0;
}
.mini-badge {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

/* ── 2. Hero / topbar админки и кабинета: текст и кнопки не сталкиваются ── */
.dashboard-hero,
.cabinet-topbar {
  flex-wrap: wrap;
}
.hero-copy,
.cabinet-topbar > div:first-child {
  min-width: 0;
}
.hero-copy h1,
.cabinet-topbar h1,
.dashboard-hero p,
.hero-copy p {
  overflow-wrap: anywhere;
}
.dashboard-hero .inline-actions,
.cabinet-topbar .inline-actions {
  flex-shrink: 0;
}

/* ── 3. Карточка клиента в админке: длинные email/username переносятся ──── */
.admin-user-card-main,
.admin-user-card-stats {
  min-width: 0;
}
.admin-user-card-main strong,
.admin-user-card-main p,
.admin-user-meta,
.admin-user-telegram,
.admin-user-telegram-link,
.admin-user-card-stats span {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.admin-user-card-stats {
  align-content: start;
}
/* На планшете (980–1100px) карточка клиента стекается в один столбец,
   чтобы main+stats не зажимались до наложения внутри половины .panel-grid. */
@media (max-width: 1180px) {
  .admin-user-card {
    grid-template-columns: 1fr;
  }
}

/* ── 4. Метрики админки: крупные числа не выпирают, подписи переносятся ── */
.admin-metric-card {
  min-width: 0;
}
.admin-metric-card strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.admin-metric-card p,
.admin-metric-card .eyebrow {
  overflow-wrap: anywhere;
}
.admin-traffic-stat { min-width: 0; }
.admin-traffic-stat strong,
.admin-traffic-stat p { overflow-wrap: anywhere; }

/* ── 5. Поиск в админке: инпут сжимается, кнопка не выдавливается ──────── */
.search-form input { min-width: 0; }

/* ── 6. Ручная выдача / формы внутри узких панелей ──────────────────────── */
.manual-confirm-form { margin-top: 10px; display: grid; gap: 8px; }
.manual-confirm-form input { min-width: 0; width: 100%; }

/* ── 7. AUTH (вход/регистрация): живость, hover, фокус, состояния ───────── */
.auth-card { position: relative; overflow: hidden; }
.auth-card::before {
  content: "";
  position: absolute; top: 0; left: 36px; right: 36px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 74, 0.6), transparent);
  opacity: 0.7;
}
.auth-form input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-form input:hover {
  border-color: rgba(255, 216, 74, 0.35);
}
.auth-form input:focus,
.auth-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 216, 74, 0.18);
}
/* Состояние ошибки валидации */
.auth-form input:not(:placeholder-shown):invalid {
  border-color: rgba(255, 141, 114, 0.55);
}
.auth-form label > span { color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.button-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}

/* Загрузка формы: блик-спиннер на основной кнопке, без блокировки сабмита. */
.is-submitting .button-primary,
.button.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.is-submitting .button-primary::before,
.button.is-loading::before {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(8, 26, 70, 0.35);
  border-top-color: #0a1739;
  border-radius: 50%;
  animation: ui-btn-spin 0.7s linear infinite;
}
@keyframes ui-btn-spin { to { transform: rotate(360deg); } }

/* ── 8. ОПЛАТА / ТАРИФЫ: выделение выбранного тарифа + способа ───────────── */
.plan-sheet {
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.plan-sheet.is-selected {
  border-color: rgba(255, 216, 74, 0.5) !important;
  background: rgba(255, 216, 74, 0.08) !important;
  box-shadow: 0 0 0 1px rgba(255, 216, 74, 0.3), 0 18px 40px rgba(2, 10, 28, 0.4);
}
.plan-sheet.is-selected::after {
  content: "Выбран";
  position: absolute; top: 12px; right: 14px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bg-strong); background: var(--accent);
  padding: 3px 9px; border-radius: 999px;
}
/* Выбранный способ оплаты — заметная галочка-маркер */
.payment-method-card { position: relative; }
.payment-method-card.is-selected::after {
  content: "✓";
  position: absolute; top: 12px; right: 14px;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-weight: 800; color: var(--bg-strong);
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 216, 74, 0.18);
}
.payment-method-card small { overflow-wrap: anywhere; }
.payment-qr-image {
  display: block; width: 220px; max-width: 100%; height: auto;
  margin: 8px auto 0; border-radius: var(--radius-md);
  background: #fff; padding: 10px;
}

/* ── 9. Анимированная МОЛНИЯ Cool VPN в модалке привязки Telegram ────────── */
.modal-card-telegram .telegram-sticker {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 2px auto 0.6rem;
  display: block;
  z-index: 0;
}
/* мягкое жёлтое свечение-пульс под молнией (бренд-акцент) */
.modal-card-telegram .telegram-sticker::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 216, 74, 0.45), transparent 68%);
  filter: blur(6px);
  z-index: -1;
  animation: ui-bolt-pulse 2.4s ease-in-out infinite;
}
.modal-card-telegram .telegram-sticker svg {
  filter: drop-shadow(0 0 14px rgba(255, 216, 74, 0.55));
  animation: ui-bolt-flicker 3.6s ease-in-out infinite;
}
@keyframes ui-bolt-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.55; }
  50% { transform: scale(1.12); opacity: 0.95; }
}
@keyframes ui-bolt-flicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; }
  50% { opacity: 0.82; }
  53% { opacity: 1; }
}
@keyframes ui-cosmo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.telegram-onboarding {
  margin: 0 auto 0.25rem;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.5;
}
.modal-card-telegram .modal-copy ol {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
}
.modal-card-telegram .modal-copy ol li { overflow-wrap: anywhere; }
.modal-card-telegram code { display: inline; padding: 2px 6px; word-break: break-all; }

/* Карточки тарифов/способов в reveal — мягкое появление в модалке оплаты */
.plan-stack-modal .plan-sheet,
.payment-method-grid .payment-method-card { will-change: transform; }

/* ── 9b. Telegram-карточка: длинный @username переносится, не выпирает ──── */
.telegram-card-body,
.telegram-status-row { min-width: 0; }
.telegram-status-row { flex-wrap: wrap; }
.telegram-status-row > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── 9c. Трафик в админке: ячейки не зажимаются, eyebrow не клипается ───── */
.admin-traffic-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.admin-traffic-stat .eyebrow {
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

/* ── 10. reduced-motion: гасим новые анимации Этапа 2 ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .modal-card-telegram .telegram-sticker::before,
  .modal-card-telegram .telegram-sticker svg { animation: none !important; }
  .is-submitting .button-primary::before,
  .button.is-loading::before { animation: none !important; }
  .plan-sheet, .payment-method-card { transition: none !important; }
}

/* ==========================================================================
   Страница «Инструкция» — анимированная, по платформам. Палитра та же, обе темы.
   ========================================================================== */
.instructions-page { gap: 26px; }

.instr-hero { display: grid; gap: 12px; }
.instr-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.02em; }

/* 3 шага — вертикальная лента с крупным номером */
.instr-steps { display: grid; gap: 22px; }
.instr-step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.instr-step-body { min-width: 0; display: grid; gap: 10px; }
.instr-step-body h2 { margin: 0; letter-spacing: -0.01em; }
.instr-step-num {
  width: 64px; height: 64px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.9rem; font-weight: 800; color: var(--bg-strong);
  background: linear-gradient(135deg, #ffe25e, #ffbf00);
  box-shadow: 0 14px 30px rgba(255, 191, 0, 0.32);
  position: relative;
}
.instr-step-num::after {
  content: ""; position: absolute; inset: -5px; border-radius: 24px;
  border: 2px solid rgba(255, 216, 74, 0.45);
  animation: ui-pulse-ring 2.6s ease-out infinite;
}

/* Платформы */
.platform-grid {
  display: grid; gap: 14px; margin-top: 4px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.platform-card {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 18px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line); color: var(--text); text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)), rgba(8,20,53,0.55);
  min-width: 0; overflow-wrap: anywhere;
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.platform-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 216, 74, 0.4);
  box-shadow: 0 18px 40px rgba(2,10,28,0.42), 0 0 0 1px rgba(255,216,74,0.25);
}
.platform-ico { font-size: 2rem; line-height: 1; }
.platform-card small { color: var(--muted); }

/* Способы импорта */
.instr-ways { display: grid; gap: 12px; margin-top: 4px; }
.instr-way {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 14px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
}
.instr-way-ico { font-size: 1.5rem; line-height: 1; }
.instr-way strong { display: block; margin-bottom: 2px; }
.instr-way p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }

/* Полезно знать */
.instr-facts { margin-top: 0; }
.instr-facts .quick-link-card strong { font-size: 1.15rem; }

@media (max-width: 640px) {
  .instr-step { grid-template-columns: 1fr; gap: 14px; }
  .instr-step-num { width: 52px; height: 52px; font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .instr-step-num::after { animation: none !important; }
  .platform-card:hover { transform: none !important; }
}

/* ==========================================================================
   Intro-анимация гостя на /login (молнии→COOL VPN→рассыпание→форма). ~3с.
   Создаётся ТОЛЬКО из JS при первом визите гостя → если JS не отработал,
   оверлея нет и форма видна сразу (fallback). prefers-reduced-motion: JS пропускает.
   ========================================================================== */
.cv-intro {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,216,74,0.10), transparent 42%),
    radial-gradient(circle at 50% 45%, #0d245d, #040d25 68%, #03081a);
  transition: opacity 0.5s ease;
  will-change: opacity;
}
.cv-intro.is-out { opacity: 0; pointer-events: none; }
.cv-intro-stage { position: relative; width: 300px; height: 300px; }

.cv-bigbolt {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0;
  animation: cvBoltIn 0.85s cubic-bezier(.22,1,.36,1) 0.8s forwards,
             cvBoltOut 0.75s ease 2.25s forwards;
}
.cv-bigbolt svg { width: 140px; height: 140px; filter: drop-shadow(0 0 26px rgba(255,216,74,.6)); }
@keyframes cvBoltIn { from { opacity:0; transform: scale(.4) rotate(-8deg); } to { opacity:1; transform: scale(1) rotate(0); } }
@keyframes cvBoltOut { from { opacity:1; filter: blur(0); } to { opacity:0; transform: scale(1.35); filter: blur(9px); } }

.cv-wordmark {
  position: absolute; left: 50%; bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  font-family: "Manrope","Segoe UI",sans-serif; font-weight: 800;
  letter-spacing: 0.24em; font-size: clamp(1.5rem, 6vw, 2.1rem);
  color: var(--accent); text-shadow: 0 0 26px rgba(255,216,74,.55);
  opacity: 0; white-space: nowrap;
  animation: cvWordIn 0.7s ease 1.4s forwards, cvWordOut 0.6s ease 2.35s forwards;
}
@keyframes cvWordIn { to { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes cvWordOut { to { opacity:0; transform: translateX(-50%) translateY(-10px) scale(1.06); filter: blur(7px); } }

.cv-spark {
  position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -7px 0 0 -7px;
  background: linear-gradient(135deg, #ffe25e, #ffbf00); border-radius: 3px;
  box-shadow: 0 0 12px rgba(255,216,74,.7);
  opacity: 0; transform: translate(var(--sx,0), var(--sy,0)) scale(.4);
  animation: cvSparkIn 0.95s cubic-bezier(.22,1,.36,1) forwards,
             cvSparkOut 0.85s ease forwards;
}
@keyframes cvSparkIn {
  0% { opacity:0; transform: translate(var(--sx,0), var(--sy,0)) scale(.4) rotate(0); }
  55% { opacity:1; }
  100% { opacity:.95; transform: translate(0,0) scale(.7) rotate(45deg); }
}
@keyframes cvSparkOut {
  from { opacity:.95; transform: translate(0,0) scale(.7) rotate(45deg); }
  to { opacity:0; transform: translate(var(--ex,0), var(--ey,0)) scale(.15) rotate(200deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cv-intro { display: none !important; }
}

/* ==========================================================================
   Привязка Telegram — заметный hero-баннер сверху
   ========================================================================== */
.tg-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.tg-banner-cta {
  background: linear-gradient(120deg, rgba(255,216,74,0.16), rgba(255,191,0,0.05) 60%), var(--surface);
  border-color: rgba(255,216,74,0.42);
  box-shadow: 0 20px 46px rgba(2,10,28,0.36);
}
.tg-banner-linked {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)), var(--surface);
}
.tg-banner-cta::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7;
}
.tg-banner-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tg-banner-ico {
  font-size: 2rem; line-height: 1; filter: drop-shadow(0 0 12px rgba(255,216,74,.55));
  animation: ui-bolt-flicker 3.6s ease-in-out infinite;
}
.tg-banner-cta .tg-banner-ico { animation: tgPulse 2.4s ease-in-out infinite; }
@keyframes tgPulse { 0%,100%{transform:scale(1);filter:drop-shadow(0 0 10px rgba(255,216,74,.5))} 50%{transform:scale(1.12);filter:drop-shadow(0 0 18px rgba(255,216,74,.85))} }
.tg-banner-title { display: block; font-size: 1.15rem; letter-spacing: -0.01em; }
.tg-banner-main p { margin: 3px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.tg-banner-main > div { min-width: 0; }
.tg-banner .button { flex-shrink: 0; }
.quick-link-grid-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .tg-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .tg-banner .button { width: 100%; }
  .quick-link-grid-pair { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Guided-tour по ЛК: spotlight (подсветка элемента) + стильный тултип
   ========================================================================== */
.tour-ring {
  position: fixed; z-index: 10000; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(3, 8, 26, 0.76),
              0 0 0 2px var(--accent), 0 0 26px rgba(255, 216, 74, 0.55);
  transition: top .22s cubic-bezier(.22,1,.36,1), left .22s cubic-bezier(.22,1,.36,1),
              width .22s cubic-bezier(.22,1,.36,1), height .22s cubic-bezier(.22,1,.36,1);
}
.tour-catch { position: fixed; inset: 0; z-index: 9999; background: transparent; }
.tour-tip {
  position: fixed; z-index: 10001; width: min(340px, calc(100vw - 28px));
  background: linear-gradient(180deg, var(--surface-strong), var(--bg-strong));
  border: 1px solid rgba(255, 216, 74, 0.34); border-radius: var(--radius-md);
  padding: 18px 20px 16px; box-shadow: 0 28px 64px rgba(2,10,28,0.5);
  transition: top .2s ease, left .2s ease, opacity .18s ease;
}
.tour-tip .eyebrow { color: var(--accent) !important; }
.tour-tip h3 { margin: 6px 0 8px; font-size: 1.15rem; letter-spacing: -0.01em; }
.tour-tip p { margin: 0; color: var(--muted); line-height: 1.5; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.tour-dots { display: inline-flex; gap: 6px; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.22); transition: background .2s, transform .2s; }
.tour-dot.is-on { background: var(--accent); transform: scale(1.25); }
.tour-btns { display: inline-flex; gap: 8px; }
.tour-btns .button { padding: 8px 14px; font-size: 0.9rem; }
.tour-skip {
  position: fixed; z-index: 10001; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 700; font-size: 0.85rem;
}
.tour-skip:hover { background: rgba(255,255,255,0.16); }
@media (prefers-reduced-motion: reduce) {
  .tour-ring, .tour-tip { transition: none !important; }
  .tg-banner-ico { animation: none !important; }
}

/* Онбординг-выбор после инструкции */
.onboard-choice { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.onboard-choice .button { padding: 14px 24px; font-size: 1.02rem; }
.onboard-choice-tour { box-shadow: 0 14px 32px rgba(255,191,0,0.32); }
@media (max-width: 560px) { .onboard-choice { flex-direction: column; } .onboard-choice .button { width: 100%; } }

/* Привязка Telegram ВНУТРИ hero-блока (overview-card-side) */
.button-tg { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button-tg .hero-tg-ico { font-size: 1.1rem; filter: drop-shadow(0 0 8px rgba(255, 216, 74, 0.55)); }
.hero-tg-linked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); min-width: 0;
}
.hero-tg-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.hero-tg-linked .button { flex-shrink: 0; }
:root[data-theme="midnight"] .hero-tg-linked { background: rgba(255, 255, 255, 0.06); }

/* Привязка Telegram — компактно под никнеймом (topbar) */
.topbar-id { display: grid; gap: 8px; align-content: start; min-width: 0; }
.hero-tg-compact {
  display: inline-flex; align-items: center; gap: 10px; width: auto;
  margin-top: 2px; padding: 6px 12px; align-self: start;
}
.hero-tg-compact .hero-tg-status { font-size: 0.9rem; }
.button-tg.button-small { align-self: start; }
@media (max-width: 720px) {
  .hero-tg-compact { width: 100%; justify-content: space-between; }
  .button-tg.button-small { width: auto; }
}

/* Никнейм + привязка Telegram в одну строку (привязка справа, РОВНО по центру имени) */
.topbar-name-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.topbar-name-row h1 { margin: 0; line-height: 1.1; }
.topbar-name-row .hero-tg-compact,
.topbar-name-row .button-tg { margin-top: 0 !important; align-self: center !important; }

/* Светлая (aurora) тема: главный блок «Доступ» — как остальные панели (не выделять) */
:root:not([data-theme="midnight"]) .overview-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--surface) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
}

/* Telegram-эмодзи (Lottie): 👋 у имени, 🎉 на успешной оплате */
.emoji-lottie { display: inline-block; line-height: 0; pointer-events: none; }
.emoji-wave { width: 36px; height: 36px; vertical-align: middle; flex-shrink: 0; margin-left: 2px; }
.emoji-party { width: 124px; height: 124px; margin: 0 auto 6px; display: block; }
@media (max-width: 560px) { .emoji-party { width: 96px; height: 96px; } .emoji-wave { width: 30px; height: 30px; } }

/* СИСТЕМНО: <a>-обёртки карточек/блоков (class содержит card/sheet/tile) НИКОГДА не
   подчёркивают текст внутри — ни в покое, ни на hover/focus. Перебивает глобальное
   hover-правило (!important). Карточка реагирует своим эффектом (lift/рамка/тень).
   Обычные текстовые ссылки и mini-link не затронуты (нет card/sheet/tile в классе). */
a[class*="card"],
a[class*="sheet"],
a[class*="tile"],
a.help-card,
a.help-card-link {
  text-decoration: none !important;
}

/* help-карточки: живой hover-эффект (lift + жёлтая рамка + тень) как у остальных карточек.
   Подчёркивание уже убрано системным правилом выше — тут только эффект наведения. */
.help-card, .help-card-link {
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, border-color .28s ease;
}
.help-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 216, 74, 0.4);
  box-shadow: 0 22px 48px rgba(2, 10, 28, 0.42), 0 0 0 1px rgba(255, 216, 74, 0.28);
}
@media (prefers-reduced-motion: reduce) {
  .help-card:hover { transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ЭТАП 1 — Визуал и анимации (2026-06-01)
   Все эффекты уважают prefers-reduced-motion (мгновенно/без анимации).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 3D-глобус через globe.gl (lazy-load, ~250KB gz, инициируется из login.html) ── */
.cv-globe-wrap {
  position: relative; width: clamp(240px, 38vw, 360px); aspect-ratio: 1;
  margin: 0 auto; pointer-events: auto;
}
.cv-globe-3d {
  width: 100%; height: 100%; display: block; position: relative;
  filter: drop-shadow(0 14px 40px rgba(255, 216, 74, 0.2));
  border-radius: 50%;
  /* Сфера-форма: тёмная подложка с лёгкой светлой стороной (3D-shading-имитация).
     Видна через прозрачный canvas globe.gl (alpha:true). Решает «чёрная дыра». */
  background:
    radial-gradient(circle at 38% 35%, rgba(40, 70, 130, 0.55) 0%, rgba(12, 22, 50, 0.85) 45%, rgba(4, 10, 28, 0.92) 75%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
}
.cv-globe-3d canvas { display: block; max-width: 100%; border-radius: 50%; }
/* Стартовый плейсхолдер пока globe.gl не подгрузился (через ::before на пустом контейнере) */
.cv-globe-3d:empty::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 1px dashed rgba(255, 216, 74, 0.28);
  animation: cv-globe-spin 36s linear infinite;
}
@keyframes cv-globe-spin { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }

/* ── 2. Параллакс — УБРАН по решению Айрата (визуальная помеха). Старые правила удалены. ── */

/* ── 3. Кастомный курсор — УБРАН по решению Айрата. Дефолтный курсор браузера. ── */

/* ── 4. Магнитные кнопки (transform управляется JS, CSS даёт easing) ── */
.cv-magnetic { transition: transform 0.18s cubic-bezier(0.2, 1, 0.3, 1); will-change: transform; }

/* ── 5. Confetti canvas — поверх всего на странице оплаты ── */
.cv-confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
}

/* ── 6. Spinner-молния (заменяет круг-лоадер) ── */
.cv-spinner-bolt {
  display: inline-block; width: 1em; height: 1em; vertical-align: middle;
  position: relative;
}
.cv-spinner-bolt::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, #ffe25e, #ffbf00);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 2 L4 14 H10 L8 22 L20 9 H13 Z' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M13 2 L4 14 H10 L8 22 L20 9 H13 Z' fill='black'/></svg>") center/contain no-repeat;
  animation: cv-bolt-pulse 0.9s ease-in-out infinite;
  filter: drop-shadow(0 0 4px #ffd84a);
}
@keyframes cv-bolt-pulse { 0%,100% {transform: scale(0.85); opacity: 0.7;} 50% {transform: scale(1.1); opacity: 1;} }

/* ── 9. Жёлтый glow за активной/выбранной карточкой ── */
.cv-glow, [data-glow="true"], .tariff-card.selected, .payment-method-card.selected,
.plan-card.active, .payment-option.is-selected {
  box-shadow: 0 0 0 1px rgba(255, 216, 74, 0.55),
              0 0 24px rgba(255, 216, 74, 0.35),
              0 18px 36px rgba(2, 10, 28, 0.32);
  border-color: rgba(255, 216, 74, 0.7) !important;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* ── 10. Typewriter cursor (мигающий курсор в конце текста) ── */
.cv-typewriter { display: inline-block; }
.cv-typewriter::after {
  content: "▍"; color: #ffd84a; margin-left: 2px;
  animation: cv-blink 1s steps(2, start) infinite;
}
@keyframes cv-blink { 50% { opacity: 0; } }

/* ── Hero-блок на /login (лендинговая часть) ── */
.cv-landing-hero {
  position: relative; padding: 36px 24px 28px; text-align: center;
  margin: -8px 0 22px;
}
.cv-landing-hero h1 {
  font-size: clamp(28px, 4.6vw, 44px); font-weight: 800; line-height: 1.12;
  margin: 16px 0 10px; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-strong, #f5f5f5) 0%, #ffe25e 60%, #ffbf00 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cv-landing-hero .cv-hero-sub {
  font-size: clamp(14px, 1.5vw, 16px); color: var(--muted, #9aa);
  max-width: 520px; margin: 0 auto 22px; line-height: 1.5;
}
.cv-landing-hero .cv-server-chips {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px;
}
/* v4: ВСЕ чипы (4 страны + Белые списки) в одном премиум-стиле.
   Без пульсации (статичный glow приятнее, не отвлекает). Лёгкий hover-lift. */
.cv-landing-hero .cv-server-chips span {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 216, 74, 0.32), rgba(255, 191, 0, 0.16));
  border: 1.5px solid rgba(255, 216, 74, 0.78);
  color: #fff;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow:
    0 0 0 2px rgba(255, 216, 74, 0.14),
    0 0 18px rgba(255, 216, 74, 0.32),
    inset 0 0 12px rgba(255, 216, 74, 0.10);
  transition: box-shadow 0.3s ease, transform 0.18s ease;
}
.cv-landing-hero .cv-server-chips span::first-letter {
  font-size: 1.22em;       /* флаги/щит крупнее */
}
.cv-landing-hero .cv-server-chips span:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px rgba(255, 216, 74, 0.28),
    0 0 26px rgba(255, 216, 74, 0.55),
    inset 0 0 14px rgba(255, 216, 74, 0.18);
}

/* ── prefers-reduced-motion: всё мгновенно/выключено ── */
@media (prefers-reduced-motion: reduce) {
  .cv-globe-3d:empty::before, .cv-magnetic, .cv-typewriter::after,
  .cv-spinner-bolt::before { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ЭТАП 2 (2026-06-02) — Функциональные улучшения:
   #21 chart трафика  ·  #61 ⌘K палитра  ·  #69 fullscreen QR  ·  #75 mobile bottom-sheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── #69 Fullscreen QR ── */
.cv-qr-fs-shell {
  position: fixed; inset: 0; z-index: 9985;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 8, 24, 0.85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
  padding: 24px;
}
.cv-qr-fs-shell.is-open { opacity: 1; pointer-events: auto; }
.cv-qr-fs-card {
  position: relative;
  background: #fff; border-radius: 22px;
  padding: 22px 22px 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,216,74,0.25);
  transform: scale(0.94); transition: transform 0.22s cubic-bezier(0.2, 1, 0.3, 1);
  max-width: min(96vw, 540px); width: 100%;
}
.cv-qr-fs-shell.is-open .cv-qr-fs-card { transform: scale(1); }
.cv-qr-fs-img {
  display: block; width: 100%; height: auto; max-height: 70vh;
  object-fit: contain; border-radius: 12px;
}
.cv-qr-fs-caption {
  margin-top: 12px; text-align: center; font-size: 14px;
  color: #1c1f2c; font-weight: 600;
}
.cv-qr-fs-close {
  position: absolute; top: 10px; right: 12px;
  background: rgba(0,0,0,0.05); border: 0; border-radius: 999px;
  width: 32px; height: 32px; line-height: 1;
  font-size: 20px; color: #1c1f2c; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cv-qr-fs-close:hover { background: rgba(0,0,0,0.10); transform: scale(1.06); }

/* ── #75 Bottom-sheet модалки на mobile ── */
@media (max-width: 720px) {
  .modal-shell:not(.cv-qr-fs-shell) {
    align-items: flex-end !important;
  }
  .modal-shell:not(.cv-qr-fs-shell) .modal-card {
    margin: 0; width: 100% !important; max-width: 100% !important;
    border-radius: 22px 22px 0 0 !important;
    max-height: 88vh; overflow-y: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
    transform: translateY(100%);
    animation: cv-sheet-slide-up 0.28s cubic-bezier(0.2, 1, 0.3, 1) forwards;
  }
  .modal-shell:not(.cv-qr-fs-shell)[hidden] .modal-card {
    animation: none;
  }
  .modal-shell:not(.cv-qr-fs-shell) .modal-card::before {
    content: "";
    display: block; width: 42px; height: 4px; border-radius: 999px;
    background: rgba(255,255,255,0.25);
    margin: 8px auto 14px;
    cursor: grab; touch-action: pan-y;
  }
}
@keyframes cv-sheet-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── reduced-motion для Этапа 2 ── */
@media (prefers-reduced-motion: reduce) {
  .cv-qr-fs-shell, .cv-qr-fs-card,
  .modal-shell .modal-card { transition: none !important; animation: none !important; transform: none !important; }
}
