:root {
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --panel: #101010;
  --panel-2: #131313;
  --line: #2c2c2c;
  --line-soft: #222222;
  --text: #f3f3f3;
  --muted: #9f9f9f;
  --accent: #ffffff;
  --ok: #44d26a;
  --warn: #f0c750;
  --err: #ef5a5a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font-family: "Chakra Petch", "IBM Plex Mono", monospace;
}

body {
  position: relative;
  overflow-x: hidden;
}

body.app-booting .app-shell {
  opacity: 0;
  pointer-events: none;
}

body.app-ready .app-shell {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 140ms ease;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.28;
}

.ambient-noise {
  opacity: 0.08;
  background-image: radial-gradient(circle at 20% 10%, #fff 0.35px, transparent 0.6px);
  background-size: 3px 3px;
  animation: noise-shift 0.45s steps(2, end) infinite;
}

.ambient-vignette {
  background:
    radial-gradient(800px 500px at -8% -10%, rgba(255, 255, 255, 0.08), transparent 65%),
    radial-gradient(700px 420px at 110% 0%, rgba(255, 255, 255, 0.06), transparent 62%),
    radial-gradient(120% 120% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.65) 100%);
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0) 3px,
    rgba(255, 255, 255, 0.045) 4px,
    rgba(255, 255, 255, 0) 5px
  );
  mix-blend-mode: screen;
  opacity: 0.2;
  animation: scan 7.4s linear infinite;
}

.side-loop {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 140px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.46;
}

.side-loop-left {
  left: 0;
}

.side-loop-right {
  right: 0;
}

.loop-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  filter: blur(0.2px);
}

.loop-ring::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.loop-ring-a {
  width: 110px;
  height: 270px;
  left: 14px;
  top: 9%;
  animation: side-loop-float-a 13.5s ease-in-out infinite;
}

.loop-ring-b {
  width: 86px;
  height: 226px;
  left: 34px;
  top: 48%;
  animation: side-loop-float-b 11.2s ease-in-out infinite;
}

.loop-ring-c {
  width: 102px;
  height: 252px;
  right: 18px;
  top: 14%;
  animation: side-loop-float-c 12.4s ease-in-out infinite;
}

.loop-ring-d {
  width: 94px;
  height: 240px;
  right: 28px;
  top: 54%;
  animation: side-loop-float-d 10.8s ease-in-out infinite;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 12px 34px;
  display: grid;
  gap: 12px;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 12px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(760px, 100%);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.auth-chooser-grid {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.auth-option {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.auth-option h2 {
  margin: 0;
  font-size: 16px;
}

.email-auth-grid {
  display: grid;
  gap: 8px;
}

.email-login-block {
  display: grid;
  gap: 8px;
}

.email-login-block,
.email-send-code-wrap {
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 260ms cubic-bezier(.2,.75,.2,1),
    opacity 200ms ease,
    transform 260ms cubic-bezier(.2,.75,.2,1),
    margin-top 200ms ease;
}

.email-login-block {
  max-height: 220px;
}

.email-send-code-wrap {
  max-height: 56px;
}

.email-send-code-wrap .btn {
  width: 100%;
}

.email-login-block.mode-collapsed,
.email-send-code-wrap.mode-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

.auth-mode-slider {
  margin-top: 2px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #303030;
  border-radius: 11px;
  padding: 3px;
  background: #101010;
}

.auth-mode-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 8px;
  border: 1px solid #4d4d4d;
  background: #1f1f1f;
  transition: transform 220ms cubic-bezier(.2,.75,.2,1);
}

.auth-mode-slider[data-index="1"] .auth-mode-thumb {
  transform: translateX(100%);
}

.auth-mode-btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: #adadad;
  padding: 9px 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
}

.auth-mode-btn.active {
  color: #ffffff;
}

.email-code-block {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    max-height 260ms cubic-bezier(.2,.75,.2,1),
    opacity 190ms ease,
    transform 260ms cubic-bezier(.2,.75,.2,1),
    margin-top 200ms ease;
}

.email-code-block.is-visible {
  max-height: 196px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 2px;
}

.auth-mini-note {
  margin: 0;
  font-size: 11px;
}

.tg-auth-btn {
  min-height: 34px;
  background: #00b0f2;
  border-color: #00b0f2;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}

.tg-auth-btn:hover {
  background: #00b0f2;
  border-color: #00b0f2;
  filter: brightness(1.06);
}

.tg-auth-btn:disabled {
  opacity: 0.7;
}

.tg-auth-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 36px;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px 12px;
  background: rgba(3, 3, 3, 0.82);
  backdrop-filter: blur(2px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(760px, 100%);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.auth-card-mobile {
  display: none;
}

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

.panel,
.panel-soft {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.panel-soft {
  border-color: var(--line-soft);
  border-radius: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 16px;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 220%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.075) 48%, transparent 100%);
  transform: rotate(2deg);
  animation: hero-sweep 6.8s linear infinite;
  opacity: 0.45;
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-mode-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.mode-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-key-logo {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #3c3c3c;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.glitch-eyebrow {
  position: relative;
  display: inline-block;
}

.glitch-eyebrow::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  color: #efefef;
  text-shadow: 1px 0 0 #cacaca;
  animation: text-glitch-sm 3.5s steps(1, end) infinite;
}

.mode-pill {
  border: 1px solid #5a5a5a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.04);
}

h1 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.glitch-title {
  position: relative;
  display: inline-block;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch-title::before {
  color: #dcdcdc;
  text-shadow: 2px 0 0 #bdbdbd;
  opacity: 0;
  animation: text-glitch-a 2.8s steps(1, end) infinite;
}

.glitch-title::after {
  color: #8f8f8f;
  text-shadow: -2px 0 0 #a7a7a7;
  opacity: 0;
  animation: text-glitch-b 2.1s steps(1, end) infinite;
}

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

.note {
  margin-top: 8px;
  color: #c8c8c8;
  font-size: 12px;
  min-height: 18px;
}

.status-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #343434;
  display: grid;
  gap: 4px;
}

.status-label {
  color: var(--muted);
  letter-spacing: 0.14em;
  font-size: 10px;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.status-line {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d8d8d8;
}

.status-line[data-tone="ok"] {
  color: #9df0b2;
}

.status-line[data-tone="maintenance"] {
  color: #ffe083;
}

.status-line[data-tone="work"] {
  color: #b8b8b8;
}

.status-line[data-tone="error"] {
  color: #ff9e9e;
}

.status-line::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bdbdbd;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
  animation: none;
}

.status-line[data-tone="ok"]::before {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(68, 210, 106, 0.55);
  animation: blink 1.05s steps(2, end) infinite;
}

.status-line[data-tone="maintenance"]::before {
  background: var(--warn);
  box-shadow: 0 0 12px rgba(240, 199, 80, 0.55);
  animation: blink 1.15s steps(2, end) infinite;
}

.status-line[data-tone="work"]::before {
  background: #a1a1a1;
  animation: blink 1.8s steps(2, end) infinite;
}

.status-line[data-tone="error"]::before {
  background: var(--err);
  box-shadow: 0 0 12px rgba(239, 90, 90, 0.55);
  animation: blink 1s steps(2, end) infinite;
}

.op-line {
  margin: 0;
  min-height: 16px;
  font-size: 12px;
  color: #b5b5b5;
}

.op-line[data-tone="ok"] {
  color: #a5a5a5;
}

.op-line[data-tone="error"] {
  color: #d7a6a6;
}

.sticky-notice {
  margin-top: 10px;
  border: 1px solid #c69f3b;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(198, 159, 59, 0.14), rgba(198, 159, 59, 0.06));
  padding: 10px;
}

.sticky-notice-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffdb80;
}

.sticky-notice-text {
  margin: 7px 0 0;
  white-space: pre-wrap;
  color: #f2e0b0;
  font-size: 13px;
}

.tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  overflow: visible;
  scrollbar-width: thin;
}

.tabs::-webkit-scrollbar {
  height: 7px;
}

.tabs::-webkit-scrollbar-thumb {
  background: #2d2d2d;
  border-radius: 999px;
}

.tab {
  appearance: none;
  border: 1px solid #2b2b2b;
  border-radius: 10px;
  background: #121212;
  color: #c7c7c7;
  padding: 9px 12px;
  min-width: 118px;
  font-size: 13px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.admin-analytics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-analytics-head h2 {
  margin: 0;
}

.admin-analytics-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.analytics-range-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  gap: 8px;
  align-items: center;
}

.analytics-range-btn {
  min-width: 88px;
}

.analytics-date-input {
  min-height: 40px;
  padding: 8px 10px;
}

.analytics-range-btn.active {
  border-color: #6b6b6b;
  background: #202020;
  color: #ffffff;
}

.tabs .tab[data-tab="dashboard"] {
  order: 1;
}

.tabs .tab[data-tab="subs"] {
  order: 2;
}

.tabs .tab[data-tab="guide"] {
  order: 3;
}

.tabs .tab[data-tab="payments"] {
  order: 4;
}

.tabs .tab[data-tab="admin"] {
  order: 5;
}

.tab.active {
  border-color: #666;
  background: #202020;
  color: #fff;
}

.tab:hover {
  border-color: #515151;
}

.admin-status-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-status-btn {
  min-height: 42px;
}

.admin-status-btn.active {
  border-color: #6b6b6b;
  background: #242424;
  color: #ffffff;
}

.admin-notice-wrap {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-notice-label {
  font-size: 12px;
  color: #d9c58f;
}

.admin-notice-input {
  width: 100%;
  resize: vertical;
  min-height: 84px;
  border: 1px solid #3f3f3f;
  border-radius: 10px;
  background: #0e0e0e;
  color: #f1f1f1;
  padding: 10px;
  font-size: 13px;
  font-family: "IBM Plex Mono", monospace;
}

.admin-notice-input:focus {
  outline: none;
  border-color: #c69f3b;
  box-shadow: 0 0 0 1px rgba(198, 159, 59, 0.35);
}

.view {
  display: none;
  gap: 12px;
}

.view.active {
  display: grid;
  animation: view-in 220ms ease both;
}

.card {
  padding: 12px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.quick-start {
  position: relative;
  overflow: hidden;
}

.quick-start::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: inherit;
}

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

.metric {
  padding: 10px;
  background: linear-gradient(180deg, #141414, #101010);
}

.metric-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.metric-value {
  margin: 7px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.guide-sections {
  display: grid;
  gap: 10px;
}

.guide-section {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0f0f0f;
  padding: 10px;
}

.guide-section h3 {
  margin: 0;
  font-size: 14px;
}

.guide-list {
  margin: 8px 0 0 18px;
  padding: 0;
  display: grid;
  gap: 7px;
  color: #d3d3d3;
  font-size: 13px;
}

.guide-download-row {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.guide-download {
  width: fit-content;
  min-width: 196px;
}

.guide-download-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stack {
  display: grid;
  gap: 9px;
}

.item {
  padding: 0;
  overflow: hidden;
}

.accordion-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
}

.accordion-summary::after {
  content: "▸";
  width: 18px;
  text-align: center;
  line-height: 1;
  color: #8c8c8c;
  font-size: 14px;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 220ms ease, color 220ms ease;
}

.accordion[open] .accordion-summary::after {
  transform: rotate(90deg);
  color: #f2f2f2;
}

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

.accordion-main {
  min-width: 0;
}

.item-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.summary-end {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  border: 1px solid #3e3e3e;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 11px;
  color: #cecece;
}

.accordion-body {
  padding: 0 10px;
  border-top: 1px solid #1f1f1f;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 260ms cubic-bezier(.2, .75, .2, 1),
    opacity 220ms ease,
    transform 260ms cubic-bezier(.2, .75, .2, 1),
    padding-top 220ms ease,
    padding-bottom 220ms ease,
    border-color 220ms ease;
}

.accordion[open] .accordion-body {
  max-height: 760px;
  opacity: 1;
  transform: translateY(0);
  padding-top: 8px;
  padding-bottom: 10px;
}

.accordion:not([open]) .accordion-body {
  pointer-events: none;
  border-top-color: transparent;
}

.item-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.item-meta.traffic {
  color: #dfdfdf;
}

.sub-progress {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.sub-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #bfbfbf;
  letter-spacing: 0.02em;
}

.sub-progress-rail {
  position: relative;
  height: 8px;
  border-radius: 999px;
  border: 1px solid #303030;
  background: #0b0b0b;
  overflow: hidden;
}

.sub-progress-bar {
  --progress-scale: 0;
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--progress-scale));
  border-radius: inherit;
  background: linear-gradient(90deg, #f0f0f0, #7fd5ff, #f0f0f0);
  animation: progress-glow 2.6s linear infinite;
  transition: transform 580ms cubic-bezier(.2,.8,.25,1);
}

.sub-progress-bar.is-warning {
  background: linear-gradient(90deg, #f0c750, #ffe59d, #f0c750);
}

.sub-progress-bar.is-danger {
  background: linear-gradient(90deg, #ef5a5a, #ff9d9d, #ef5a5a);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

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

.actions.one-col {
  grid-template-columns: 1fr;
}

.btn {
  position: relative;
  border: 1px solid #3c3c3c;
  background: #181818;
  color: #f2f2f2;
  border-radius: 9px;
  padding: 9px 8px;
  font-size: 13px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 140ms ease, border-color 140ms ease, transform 80ms ease;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translateX(-120%);
}

.btn:hover {
  border-color: #5a5a5a;
  background: #212121;
}

.btn:hover::after {
  animation: btn-sweep 450ms linear;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn.tg-auth-btn {
  min-height: 34px;
  padding: 0 10px;
  background: #00b0f2 !important;
  border-color: #00b0f2 !important;
  color: #ffffff;
  font-weight: 600;
  line-height: 1;
  font-size: 14px;
  box-shadow:
    0 0 0 1px rgba(0, 176, 242, 0.36),
    0 0 12px rgba(0, 176, 242, 0.34);
  animation: tg-btn-glow 2.2s ease-in-out infinite;
}

.btn.tg-auth-btn:hover {
  background: #00b0f2 !important;
  border-color: #00b0f2 !important;
  filter: brightness(1.04);
}

.btn.tg-auth-btn::after {
  display: none;
}

.duration-slider {
  margin-top: 10px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #303030;
  border-radius: 12px;
  padding: 4px;
  background: #111111;
}

.duration-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 8px;
  border: 1px solid #4d4d4d;
  background: #202020;
  transition: transform 230ms cubic-bezier(.2,.75,.2,1);
}

.duration-slider[data-index="1"] .duration-thumb {
  transform: translateX(100%);
}

.duration-option {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: #ababab;
  padding: 9px 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
}

.duration-option.active {
  color: #fff;
}

.shop-preview {
  margin-top: 10px;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  background: #0e0e0e;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.shop-preview h3 {
  margin: 0;
  font-size: 17px;
}

.shop-preview p {
  margin: 8px 0 0;
  font-size: 13px;
  color: #cecece;
}

.shop-preview.glitch-switch {
  animation: preview-glitch 260ms steps(2, end) infinite;
}

.shop-preview.glitch-switch::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 10%, rgba(255, 255, 255, 0.1) 50%, transparent 90%);
  animation: preview-scan 310ms linear infinite;
}

.links-wrap {
  margin-top: 8px;
}

.links-label {
  margin: 0;
  font-size: 12px;
  color: #cfcfcf;
}

.links {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: start;
}

.links pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  background: #080808;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 8px;
  color: #d8d8d8;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
}

.copy-link {
  min-width: 108px;
}

.payment-list {
  margin-top: 2px;
}

.payment-sheet {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.payment-item {
  padding: 10px;
}

.payment-title {
  margin: 0;
  font-size: 14px;
}

.payment-meta {
  margin: 7px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.payment-foot {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.payment-amount {
  margin: 0;
  font-size: 13px;
  color: #d4d4d4;
}

.payment-open {
  min-width: 132px;
}

.payment-pager {
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.pager-label {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.pager-btn {
  min-width: 82px;
  padding: 7px 8px;
}

.account-quick-btn {
  min-width: 0;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.account-btn-icon {
  width: 14px;
  height: 14px;
  object-fit: cover;
  border-radius: 4px;
}

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

.account-status-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-status-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.account-status-value {
  margin: 6px 0 0;
  font-size: 15px;
  color: #efefef;
}

.account-status-value.ok {
  color: #9df0b2;
}

.account-status-value.warn {
  color: #f0c750;
}

.account-actions-wrap {
  margin-top: 10px;
}

.account-email-modal-grid {
  display: grid;
  gap: 8px;
}

.account-email-code-row {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    max-height 260ms cubic-bezier(.2,.75,.2,1),
    opacity 190ms ease,
    transform 260ms cubic-bezier(.2,.75,.2,1),
    margin-top 200ms ease;
}

.account-email-code-row.is-visible {
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 2px;
}

.account-item {
  padding: 10px;
}

.account-value {
  margin: 7px 0 0;
  font-size: 16px;
  font-weight: 600;
  word-break: break-word;
}

body.modal-open {
  overflow: hidden;
}

.floating-tools {
  position: fixed;
  z-index: 45;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}

.fab-btn {
  min-width: 148px;
  border: 1px solid #3b3b3b;
  border-radius: 12px;
  background: rgba(14, 14, 14, 0.92);
  color: #f2f2f2;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  transition: border-color 140ms ease, background-color 140ms ease, transform 100ms ease;
}

.fab-btn:hover {
  border-color: #5d5d5d;
  background: rgba(22, 22, 22, 0.95);
}

.fab-btn:active {
  transform: translateY(1px);
}

.fab-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.fab-btn.is-admin-only {
  border-color: #424242;
}

.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 4, 4, 0.78);
  backdrop-filter: blur(3px);
}

.overlay-modal[hidden] {
  display: none;
}

.overlay-card {
  width: min(680px, 100%);
  max-height: min(88dvh, 880px);
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overlay-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.overlay-close {
  min-width: 94px;
}

.overlay-label {
  font-size: 12px;
  color: #cfcfcf;
}

.overlay-input,
.support-textarea {
  width: 100%;
  border: 1px solid #3f3f3f;
  border-radius: 10px;
  background: #0e0e0e;
  color: #f1f1f1;
  padding: 10px;
  font-size: 13px;
  font-family: "IBM Plex Mono", monospace;
}

.support-textarea {
  min-height: 118px;
  resize: vertical;
}

.overlay-input:focus,
.support-textarea:focus {
  outline: none;
  border-color: #5b5b5b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.overlay-status {
  min-height: 16px;
  font-size: 12px;
}

.support-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.support-topic-chip {
  border: 1px solid #3a3a3a;
  border-radius: 9px;
  background: #141414;
  color: #d8d8d8;
  padding: 8px 9px;
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.support-topic-chip:hover {
  border-color: #595959;
}

.support-topic-chip.active {
  border-color: #666666;
  background: #202020;
  color: #ffffff;
}

.support-hint {
  margin: -2px 0 0;
  color: #a9a9a9;
  font-size: 11px;
}

.overlay-actions {
  display: grid;
  grid-template-columns: 1fr;
}

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

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

.analytics-stat {
  padding: 10px;
}

.analytics-stat-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.analytics-stat-value {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 700;
}

.analytics-block {
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  padding: 10px;
  background: #0e0e0e;
}

.analytics-block h4 {
  margin: 0;
  font-size: 13px;
}

.analytics-chart-wrap {
  margin-top: 8px;
  padding: 8px;
  overflow: hidden;
  position: relative;
}

.analytics-chart {
  width: 100%;
  height: 260px;
  display: block;
}

.analytics-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-legend-item {
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  background: #121212;
  padding: 4px 8px;
  font-size: 11px;
  color: #d0d0d0;
}

.analytics-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.analytics-hover-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  min-width: 170px;
  max-width: 260px;
  border: 1px solid #3e3e3e;
  border-radius: 10px;
  background: rgba(10, 10, 10, 0.95);
  padding: 8px 9px;
  color: #e8e8e8;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 180ms ease;
}

.analytics-hover-tooltip.active {
  opacity: 1;
  transform: translateY(0);
}

.analytics-hover-title {
  margin: 0 0 5px;
  color: #f5f5f5;
  font-size: 11px;
}

.analytics-hover-line {
  margin: 2px 0;
  color: #cfcfcf;
}

.analytics-list {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.analytics-item {
  border: 1px solid #282828;
  border-radius: 8px;
  background: #111111;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.analytics-item-title {
  margin: 0;
  font-size: 12px;
  color: #e3e3e3;
}

.analytics-item-meta {
  margin: 0;
  font-size: 11px;
  color: #adadad;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes accordion-in {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes text-glitch-a {
  0%, 85%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  86% { opacity: .45; transform: translate(2px, -1px); clip-path: inset(8% 0 56% 0); }
  87% { opacity: .22; transform: translate(-2px, 1px); clip-path: inset(62% 0 12% 0); }
  88% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}

@keyframes text-glitch-b {
  0%, 79%, 100% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 0 0); }
  80% { opacity: .35; transform: translate(-2px, 0); clip-path: inset(15% 0 52% 0); }
  81% { opacity: .2; transform: translate(2px, 1px); clip-path: inset(58% 0 9% 0); }
  82% { opacity: 0; transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}

@keyframes text-glitch-sm {
  0%, 90%, 100% { opacity: 0; transform: translate(0, 0); }
  91% { opacity: .35; transform: translate(1px, 0); }
  92% { opacity: .2; transform: translate(-1px, 0); }
  93% { opacity: 0; transform: translate(0, 0); }
}

@keyframes preview-glitch {
  0% { transform: translateX(0); filter: none; }
  33% { transform: translateX(1px); filter: contrast(1.1); }
  66% { transform: translateX(-1px); filter: brightness(1.08); }
  100% { transform: translateX(0); filter: none; }
}

@keyframes preview-scan {
  0% { transform: translateY(-100%); opacity: 0; }
  30% { opacity: 0.45; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(40%); }
}

@keyframes side-loop-float-a {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.46; }
  50% { transform: translateY(-10px) rotate(2deg); opacity: 0.58; }
}

@keyframes side-loop-float-b {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.34; }
  50% { transform: translateY(9px) rotate(-2deg); opacity: 0.5; }
}

@keyframes side-loop-float-c {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  50% { transform: translateY(-8px) rotate(-2deg); opacity: 0.56; }
}

@keyframes side-loop-float-d {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(8px) rotate(2deg); opacity: 0.47; }
}

@keyframes progress-glow {
  0% { filter: brightness(0.95); background-position: 0% 0; }
  50% { filter: brightness(1.08); }
  100% { filter: brightness(0.95); background-position: 130% 0; }
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(0.3px, -0.4px); }
  50% { transform: translate(-0.2px, 0.2px); }
  75% { transform: translate(0.2px, 0.3px); }
  100% { transform: translate(0, 0); }
}

@keyframes hero-sweep {
  0% { transform: translateY(-45%) rotate(2deg); }
  100% { transform: translateY(45%) rotate(2deg); }
}

@keyframes blink {
  0%, 49% { opacity: 0.5; }
  50%, 100% { opacity: 1; }
}

@keyframes btn-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes tg-btn-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 176, 242, 0.36),
      0 0 10px rgba(0, 176, 242, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 176, 242, 0.44),
      0 0 16px rgba(0, 176, 242, 0.42);
  }
}

@media (min-width: 761px) {
  .tg-auth-btn {
    min-height: 32px;
    gap: 6px;
  }

  .tg-auth-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  .btn.tg-auth-btn {
    min-height: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
  }
}

@media (max-width: 760px) {
  .auth-card-desktop {
    display: none;
  }

  .auth-card-mobile {
    display: grid;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .auth-chooser-grid {
    grid-template-columns: 1fr;
  }

  .grid3 {
    grid-template-columns: 1fr;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .actions,
  .actions.topup-row {
    grid-template-columns: 1fr;
  }

  .admin-status-grid {
    grid-template-columns: 1fr;
  }

  .link-row {
    grid-template-columns: 1fr;
  }

  .copy-link,
  .payment-open,
  .pager-btn {
    min-width: 0;
  }

  .payment-foot {
    grid-template-columns: 1fr;
  }

  .payment-pager {
    grid-template-columns: auto 1fr auto;
  }

  .tab {
    min-width: 104px;
    flex: 0 0 auto;
  }

  .tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .hero-top {
    align-items: flex-start;
  }

  .hero-mode-stack {
    justify-items: start;
  }

  .floating-tools {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 6px;
  }

  .fab-btn {
    min-width: 124px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .overlay-modal {
    padding: 10px;
  }

  .overlay-card {
    max-height: min(92dvh, 980px);
  }

  .support-topics {
    grid-template-columns: 1fr;
  }

  .overlay-actions.support-actions {
    grid-template-columns: 1fr;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-range-row {
    grid-template-columns: 1fr;
  }

  .analytics-chart {
    height: 220px;
  }

  .side-loop {
    display: none;
  }
}

@media (max-width: 1100px) {
  .side-loop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
