/* ====== AutoRadar WebApp · unique design ====== */
* { box-sizing: border-box; }
:root {
  --bg: #0a0e13;
  --bg-2: #0e141b;
  --surface: #141a22;
  --surface-2: #1b232d;
  --border: #243240;
  --border-soft: #1c2733;
  --text: #e6edf3;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #22c55e;
  --accent-2: #16a34a;
  --accent-glow: rgba(34, 197, 94, 0.18);
  --gold: #f59e0b;
  --gold-2: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.18);
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(0,0,0,0.4);
  --tabbar-h: 64px;
  --header-h: 64px;
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  /* Subtle background pattern */
  background-image:
    radial-gradient(at 20% 0%, rgba(34, 197, 94, 0.08) 0%, transparent 40%),
    radial-gradient(at 80% 0%, rgba(245, 158, 11, 0.05) 0%, transparent 35%);
}

/* ====== HEADER ====== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(10, 14, 19, 0.95), rgba(10, 14, 19, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-orb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.4));
}
.logo-orb .radar-arm {
  transform-origin: 20px 20px;
  animation: radarSweep 3s linear infinite;
}
@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.6); opacity: 0; }
}

.logo-text { min-width: 0; }
.logo-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-sub {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* ====== STATUS CARD (header right) ====== */
.app-header { height: auto; min-height: var(--header-h); padding: 10px 16px; }
.status-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 7px 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: right;
  min-width: 130px;
  line-height: 1.25;
  transition: all 0.2s;
}
.status-card .sc-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-2);
}
.status-card .sc-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.status-card .sc-expires {
  font-size: 9px;
  color: var(--text-3);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.status-card.active {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, var(--accent-glow), var(--surface-2));
}
.status-card.active .sc-label { color: var(--accent); }
.status-card.active .sc-time { color: var(--accent); }

/* === Tariff tiers === */
/* Urgent: <7 днів — amber/orange */
.status-card.tier-urgent {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.20), var(--surface-2));
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}
.status-card.tier-urgent .sc-label,
.status-card.tier-urgent .sc-time { color: #fbbf24; }

/* 7-13 днів — green (basic) */
.status-card.tier-7 {
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, var(--accent-glow), var(--surface-2));
}
.status-card.tier-7 .sc-label,
.status-card.tier-7 .sc-time { color: var(--accent); }

/* 14-29 днів — silver/cyan */
.status-card.tier-14 {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), var(--surface-2));
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.15);
}
.status-card.tier-14 .sc-label,
.status-card.tier-14 .sc-time { color: #60a5fa; }

/* 30+ днів — gold (VIP) */
.status-card.tier-30 {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(245, 158, 11, 0.10), var(--surface-2));
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}
.status-card.tier-30 .sc-label,
.status-card.tier-30 .sc-time { color: #fbbf24; }
.status-card.tier-30 .sc-label {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-card.trial {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, var(--gold-glow), var(--surface-2));
}
.status-card.trial .sc-label { color: var(--gold); }
.status-card.trial .sc-time { color: var(--gold); }

.status-card.expired {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.10);
}
.status-card.expired .sc-label { color: var(--danger); }
.status-card.expired .sc-time { color: var(--danger); }

.status-card.admin {
  border-color: rgba(167, 139, 250, 0.4);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), var(--surface-2));
}
.status-card.admin .sc-label,
.status-card.admin .sc-time { color: #a78bfa; }

/* ====== MAIN ====== */
.app-main {
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.tab { display: none; animation: fadeUp 0.22s ease-out; }
.tab-active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== PULSE CARD ====== */
.pulse-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.pulse-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}

.pulse-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.pulse-title { font-weight: 700; }
.pulse-sub { font-size: 12px; color: var(--text-2); }

.pulse-stats {
  display: flex;
  gap: 24px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
  position: relative;
  z-index: 1;
}
.pulse-stats > div { display: flex; flex-direction: column; gap: 2px; }
.pulse-stats b { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.pulse-stats span { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.pulse-stats-single { justify-content: center; text-align: center; }
.pulse-stats-single > div { align-items: center; }
.pulse-stats-single b { font-size: 32px; color: var(--accent); }

.pulse-stats-sources {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
}
.pulse-stats-sources .ps-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
}
.pulse-stats-sources b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
#stat-ria { color: #ef4444; }   /* 🔴 AutoRia */
#stat-olx { color: #22c55e; }   /* 🟢 OLX */
#stat-rst { color: #e2e8f0; }   /* ⚪ RST */
.pulse-stats-sources span {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.3px;
  text-transform: none;
}
.pulse-stats-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

/* ====== SECTION CARDS ====== */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.section-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.section-title .req { color: var(--danger); margin-left: 2px; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}

/* ====== CHIPS ====== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.chip:active { transform: scale(0.96); }
.chip.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}
.src-chip.active { color: var(--text); }

/* ====== INPUTS ====== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input[type="number"], input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s;
}
input[type="number"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ====== RANGE SLIDER ====== */
.slider-wrap { margin-top: 12px; }
.slider-value {
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--accent-glow);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* ====== SWITCH ====== */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider-sw {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  transition: 0.2s;
  border-radius: 999px;
}
.slider-sw::before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.2s;
  border-radius: 50%;
}
.switch input:checked + .slider-sw { background: var(--accent); }
.switch input:checked + .slider-sw::before { transform: translateX(20px); }

/* ====== BUTTONS ====== */
.save-bar {
  margin: 20px 0 12px;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.15s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #04130a;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #1a0e00;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}
.btn-primary.success {
  background: var(--accent);
  animation: flash 0.4s;
}
@keyframes flash {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3); }
}
.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:active { transform: scale(0.97); }

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  font-weight: 600;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  max-width: 90%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.error { border-color: var(--danger); }

/* ====== HERO (ПІДПИСКА) ====== */
.hero-card {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(46, 204, 113, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
    linear-gradient(160deg, #131c25 0%, #0c131a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 34px 22px 30px;
  text-align: center;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 48px -24px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
/* Тонка градієнтна лінія зверху */
.hero-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(46, 204, 113, 0.5) 30%,
    rgba(99, 102, 241, 0.5) 70%,
    transparent 100%);
  pointer-events: none;
}
/* Діагональний відблиск, що проходить раз на ~7s */
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 200%;
  background: linear-gradient(110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.04) 48%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.04) 52%,
    transparent 65%);
  transform: translateX(-100%);
  animation: heroShine 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes heroShine {
  0%, 65% { transform: translateX(-100%); }
  85%, 100% { transform: translateX(50%); }
}
.hero-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 180%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(46, 204, 113, 0.10) 0%, transparent 38%);
  pointer-events: none;
  animation: heroGlowPulse 5s ease-in-out infinite;
}
@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #2ecc71 0%, #16a34a 100%);
  color: #fff;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 2.2px;
  margin-bottom: 18px;
  box-shadow:
    0 6px 18px rgba(46, 204, 113, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  overflow: hidden;
}
/* Shimmer на бейджі */
.hero-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%);
  transform: translateX(-100%);
  animation: badgeShimmer 3.5s ease-in-out infinite;
  animation-delay: 0.5s;
  pointer-events: none;
}
@keyframes badgeShimmer {
  0%, 55% { transform: translateX(-100%); }
  80%, 100% { transform: translateX(100%); }
}
.hero-badge.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #ff7a6a;
  border: 1px solid rgba(239, 68, 68, 0.45);
  padding: 5px 12px;
  font-size: 16px;
  letter-spacing: 0;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.25);
}
.hero-title {
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -0.8px;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 24px rgba(46, 204, 113, 0.12);
}
.hero-sub {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* === Big section titles === */
.section-title-big {
  font-size: 16px;
  font-weight: 800;
  margin: 8px 4px 12px;
  letter-spacing: -0.2px;
}

/* === Feature grid (2 cols) === */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.feat-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: border-color 0.15s, transform 0.1s;
}
.feat-card:hover { border-color: var(--accent); }
.feat-ico {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--accent-glow);
  border-radius: 10px;
}
.feat-body { min-width: 0; }
.feat-title { font-size: 13px; font-weight: 700; line-height: 1.2; }
.feat-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.2; }

/* === Tier list (vertical cards) === */
.tier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tier-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
}
.tier-card:hover { border-color: var(--accent); }
.tier-card:active { transform: scale(0.98); }
.tier-left .tier-name { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.tier-left .tier-perday { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tier-left .tier-save { font-size: 11px; color: var(--accent); font-weight: 700; margin-top: 4px; }
.tier-right .tier-price {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  white-space: nowrap;
}
.tier-right .tier-price span { font-size: 16px; color: var(--text-2); margin-left: 2px; }
.tier-right .tier-arrow {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.7;
}
.tier-hot .tier-arrow { color: var(--gold); opacity: 1; }

.tier-hot {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), var(--surface));
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.18);
}
.tier-hot:hover {
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.30);
}
.tier-hot .tier-name { color: var(--gold); }
.tier-hot .tier-price {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tier-hot .tier-price span { -webkit-text-fill-color: var(--gold); }
.tier-flag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #1a0e00;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

/* === CTA hint === */
.cta-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-top: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-2);
}
.cta-emoji { font-size: 18px; flex-shrink: 0; }

/* === Referral CTA === */
.ref-cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent-glow), var(--surface));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
}
.ref-cta-ico {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 197, 94, 0.18);
  border-radius: 12px;
}
.ref-cta-body { flex: 1; min-width: 0; }
.ref-cta-title { font-size: 14px; font-weight: 700; }
.ref-cta-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; line-height: 1.3; }
.ref-cta-btn {
  width: auto !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Gap threshold input ===== */
.gap-input-wrap {
  position: relative;
  margin-top: 4px;
}
.gap-input-wrap input {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding-right: 40px;
}
.gap-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
  pointer-events: none;
}
.price-tier { font-size: 11px; color: var(--text-3); text-transform: uppercase; }
.price-amount { font-size: 22px; font-weight: 800; margin: 4px 0; letter-spacing: -0.5px; }
.price-hint { font-size: 11px; color: var(--text-2); }
.price-flag {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #04130a;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ====== REF ====== */
.ref-card {
  background: linear-gradient(135deg, var(--accent-glow), var(--surface));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.ref-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; }
.ref-code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 8px 0 16px;
  color: var(--accent);
  word-break: break-all;
}
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ref-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
  margin-top: 8px;
}
.ref-stats.ref-stats-2col { grid-template-columns: 1fr 1fr; }
.ref-stats > div { padding: 8px 0; }
.ref-stats b { display: block; font-size: 22px; font-weight: 800; }
.ref-stats span { font-size: 11px; color: var(--text-3); }

.howto-list { padding-left: 20px; margin: 8px 0 0; color: var(--text-2); }
.howto-list li { padding: 4px 0; }

.ref-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
}
.ref-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ref-name { font-weight: 700; color: var(--text-1); text-decoration: none; font-size: 14px; }
.ref-id { font-family: monospace; font-size: 11px; color: var(--text-3); text-decoration: none; }
.ref-state-ok {
  font-size: 11px; font-weight: 700;
  color: #4ade80; background: rgba(34, 197, 94, 0.10);
  padding: 4px 8px; border-radius: 8px; white-space: nowrap;
}
.ref-state-off {
  font-size: 11px; font-weight: 700;
  color: var(--text-3); background: rgba(148, 163, 184, 0.10);
  padding: 4px 8px; border-radius: 8px; white-space: nowrap;
}

/* ====== FAQ ====== */
.faq {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '⌄'; font-size: 18px; color: var(--text-3); transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(180deg); }
.faq-body { padding: 0 16px 16px; color: var(--text-2); font-size: 14px; }
.faq-body ul, .faq-body ol { padding-left: 20px; margin: 6px 0; }
.faq-body li { padding: 3px 0; }

/* ====== CHANNEL CARD ====== */
.channel-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(245, 158, 11, 0.10) 100%);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.channel-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 80% 50%, rgba(34, 197, 94, 0.15), transparent 60%);
  pointer-events: none;
}
.channel-emoji { font-size: 28px; position: relative; z-index: 1; }
.channel-info { position: relative; z-index: 1; min-width: 0; }
.channel-title { font-weight: 700; font-size: 14px; }
.channel-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.channel-btn { width: auto !important; padding: 10px 16px !important; font-size: 13px !important; position: relative; z-index: 1; text-decoration: none; }

/* ====== CONTACT ====== */
.center-text { text-align: center; }
.big-emoji { font-size: 48px; margin-bottom: 8px; }
.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.link-row:last-child { border-bottom: none; }
.link-row a { color: var(--accent); text-decoration: none; font-weight: 600; }
.muted { color: var(--text-3); font-size: 13px; }
.version { text-align: center; font-size: 11px; color: var(--text-3); margin-top: 16px; font-family: monospace; }

/* ====== TOOL RESULT ====== */
.tool-result {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  animation: fadeUp 0.22s ease-out;
}
.tool-result.error { border-color: var(--danger); color: var(--danger); }
.tool-result h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.2px;
}
.tool-result .tr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.tool-result .tr-row:last-child { border-bottom: none; }
.tool-result .tr-key {
  color: var(--text-2);
  font-size: 12px;
  flex-shrink: 0;
}
.tool-result .tr-val {
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}
.tool-result .tr-val.muted { font-weight: 500; color: var(--text-3); }
.tool-result .tr-flag {
  display: inline-block;
  padding: 3px 9px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin: 3px 4px 3px 0;
}
.tool-result .tr-flag.warn { background: rgba(245,158,11,0.15); color: var(--gold); }
.tool-result .tr-flag.ok { background: var(--accent-glow); color: var(--accent); }
.tool-result .ext-links {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.tool-result .ext-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 8px;
  border-radius: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #60a5fa;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}
.tool-result .ext-links a:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.30), rgba(96, 165, 250, 0.15));
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.25);
}
.tool-result .ext-links a:active { transform: scale(0.96); }
/* Carma — український градієнт */
.tool-result .ext-links a[href*="carma"] {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(251, 191, 36, 0.18));
  border-color: rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}
.tool-result .ext-links a[href*="carma"]:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.30), rgba(251, 191, 36, 0.30));
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}
.tool-result .open-ria-btn {
  display: block;
  margin-top: 10px;
  padding: 10px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}
.tool-result .price-big {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}

/* === Avg price block === */
.avg-card {
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent-glow), var(--surface));
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius);
  text-align: center;
}
.avg-card .avg-label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.avg-card .avg-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
}
.avg-card .avg-meta {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 6px;
}
.similar-title {
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.plate-item-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}
.plate-item-link:hover { border-color: var(--accent); }
.plate-item-link:active { transform: scale(0.98); }

/* === Plate result cards === */
.plate-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-top: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.plate-photo {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.plate-body { flex: 1; min-width: 0; }
.plate-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plate-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 4px;
}
.plate-price {
  font-weight: 800;
  color: var(--accent);
  font-size: 14px;
}
.plate-loc {
  font-size: 11px;
  color: var(--text-3);
}

/* ====== ADMIN ====== */
/* Global pause card */
.admin-pause-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent-glow), var(--surface-2));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius);
  transition: all 0.3s;
}
.admin-pause-card.paused {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), var(--surface-2));
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.12);
}
.apc-info { flex: 1; min-width: 0; }
.apc-title { font-size: 14px; font-weight: 800; }
.apc-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* Tiles grid 3x2 */
.admin-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.atile {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}
.atile b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.atile span { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.tile-total b { color: var(--accent); }

.rst-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-3);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.rst-pill.rst-ok { color: #4ade80; background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.35); }
.rst-pill.rst-warn { color: #fbbf24; background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.35); }
.rst-pill.rst-bad { color: #ef4444; background: rgba(239, 68, 68, 0.10); border-color: rgba(239, 68, 68, 0.35); }
.rst-pill.rst-prog { color: #60a5fa; background: rgba(96, 165, 250, 0.10); border-color: rgba(96, 165, 250, 0.35); }
.tile-active b { color: var(--accent); }
.tile-trial b { color: #fbbf24; }
.tile-paid b { color: #60a5fa; }
.tile-expired b { color: var(--danger); }
.tile-pending b { color: #c084fc; }
.tile-admins b { color: #a78bfa; }

.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 8px;
  background: #c084fc; color: #1a0033;
  border-radius: 999px; font-size: 12px; font-weight: 800;
}

/* Pending list */
.pending-card { border-color: rgba(192, 132, 252, 0.35); background: linear-gradient(180deg, rgba(192, 132, 252, 0.08), var(--surface)); }
.pending-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pending-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.pending-row .pr-id { font-family: monospace; font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.pending-row .pr-name { font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-row .pr-actions { display: flex; gap: 4px; flex-shrink: 0; }
.pending-row button {
  font-size: 11px; padding: 6px 10px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  cursor: pointer; font-family: inherit;
}
.pending-row button.approve { background: var(--accent-glow); color: var(--accent); border-color: var(--accent); }
.pending-row button.ignore { color: var(--text-3); }

/* User filter chips */
.user-filter { font-size: 11px; }

/* Enhanced user row */
.user-row { flex-wrap: wrap; }
.user-row .u-id { color: var(--text-3); }
.user-row .u-line2 {
  flex-basis: 100%;
  font-size: 10px;
  color: var(--text-3);
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.kind-pill {
  font-size: 9px; font-weight: 800;
  padding: 3px 7px; border-radius: 999px;
  letter-spacing: 0.5px; text-transform: uppercase;
  flex-shrink: 0;
}
.kind-pill.trial { background: rgba(251, 191, 36, 0.18); color: #fbbf24; }
.kind-pill.paid { background: rgba(96, 165, 250, 0.18); color: #60a5fa; }
.kind-pill.unlimited { background: rgba(167, 139, 250, 0.18); color: #a78bfa; }
.kind-pill.expired { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.kind-pill.admin { background: linear-gradient(90deg, rgba(251,191,36,0.18), rgba(245,158,11,0.18)); color: #fbbf24; }
.tier-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.tier-vip { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.tier-gold { background: #60a5fa; }
.tier-silver { background: var(--accent); }
.tier-bronze { background: #fb923c; }
.tier-none { background: var(--text-3); }

.danger-btn { color: var(--danger) !important; border-color: rgba(239,68,68,0.35) !important; }

/* System status */
.sys-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sys-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
}
.sys-key { color: var(--text-2); font-size: 12px; }
.sys-val { font-family: monospace; font-size: 12px; color: var(--text); }
.sys-val.ok { color: var(--accent); }
.sys-val.warn { color: #fbbf24; }
.sys-val.error { color: var(--danger); }

.sparkline-wrap { margin-top: 12px; }
.sparkline-label { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.sparkline {
  display: flex; align-items: flex-end; gap: 4px;
  height: 60px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.spk-bar {
  flex: 1; background: var(--accent);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 4px;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.spk-bar:hover { opacity: 1; }
.spk-bar::after {
  content: attr(data-val);
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--text-3);
  white-space: nowrap;
}
.spk-bar::before {
  content: attr(data-date);
  position: absolute;
  bottom: -16px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--text-3);
  white-space: nowrap;
}

.users-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.user-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.user-row:active { transform: scale(0.99); }
.user-row:hover { border-color: var(--accent); }
.user-row .ur-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-row .u-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
}
.user-row .ur-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-row .ur-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.user-row .ur-region {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.user-row .ur-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  color: var(--text);
}
.ur-chat {
  flex-shrink: 0;
  background: var(--accent-glow);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--accent);
  width: 32px; height: 32px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s, background 0.15s;
}
.ur-chat:active { transform: scale(0.92); }
.ur-chat:hover { background: rgba(34, 197, 94, 0.25); }

.admins-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.admin-row .ar-id { font-family: monospace; font-size: 12px; color: var(--text-2); }
.admin-row .ar-name { font-size: 13px; flex: 1; }
.admin-row .ar-role {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(167,139,250,0.15); color: #a78bfa; font-weight: 700;
}
.admin-row .ar-remove {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 16px; padding: 4px;
}

/* ====== TABBAR ====== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.85) 0%, rgba(10, 14, 19, 0.98) 100%);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  z-index: 50;
}
/* Дзеркальний відблиск зверху бар-у */
.tabbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(46, 204, 113, 0.4) 50%, transparent 100%);
  pointer-events: none;
}
.tabbtn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 0 4px;
  position: relative;
  transition: color 0.25s ease, transform 0.12s ease;
}
.tabbtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 0 0 4px 4px;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tabbtn.active::before { transform: translateX(-50%) scaleX(1); }
.tabbtn .ico {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 12px;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.25s ease;
}
.tabbtn.active {
  color: var(--accent);
  font-weight: 700;
}
.tabbtn.active .ico {
  transform: scale(1.15) translateY(-2px);
  background: radial-gradient(ellipse at center, rgba(46, 204, 113, 0.22) 0%, rgba(46, 204, 113, 0.04) 60%, transparent 100%);
  filter: drop-shadow(0 2px 6px rgba(46, 204, 113, 0.35));
}
.tabbtn:hover:not(.active) { color: var(--text); }
.tabbtn:active { transform: scale(0.93); }

/* ============ Tab content transition ============ */
.tab { opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; }
.tab.tab-active {
  opacity: 1;
  animation: tabFadeIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger entrance для region cards */
.region-card {
  animation: regionEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.region-card:nth-child(1) { animation-delay: 0.02s; }
.region-card:nth-child(2) { animation-delay: 0.05s; }
.region-card:nth-child(3) { animation-delay: 0.08s; }
.region-card:nth-child(4) { animation-delay: 0.11s; }
.region-card:nth-child(5) { animation-delay: 0.14s; }
.region-card:nth-child(6) { animation-delay: 0.17s; }
.region-card:nth-child(n+7) { animation-delay: 0.2s; }
@keyframes regionEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stats numbers — м'який вхід */
.ps-col b, .pe-val, .pe-brand-cnt {
  display: inline-block;
  animation: statPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes statPop {
  from { opacity: 0; transform: scale(0.6) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Brand entry stagger */
.pe-brand {
  animation: brandEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.pe-brand:nth-child(1) { animation-delay: 0.05s; }
.pe-brand:nth-child(2) { animation-delay: 0.12s; }
.pe-brand:nth-child(3) { animation-delay: 0.19s; }
@keyframes brandEnter {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ Pulse scope toggle ============ */
.pulse-scope {
  display: inline-flex;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 2px;
  gap: 0;
}
.ps-tog {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.ps-tog.active {
  background: rgba(46,204,113,0.22);
  color: #2ecc71;
}
.ps-tog:not(.active):hover { color: var(--text); }

/* ============ Pulse extra stats ============ */
.pulse-extra {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pe-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 14px;
}
.pe-deals {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(231,76,60,0.16) 0%, rgba(231,76,60,0.04) 100%);
  border-color: rgba(231,76,60,0.35);
}
.pe-deals .pe-ico { font-size: 18px; }
.pe-deals .pe-lbl {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.pe-deals .pe-val {
  font-size: 18px;
  font-weight: 700;
  color: #ff6b6b;
  font-variant-numeric: tabular-nums;
}
.pe-top .pe-top-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.pe-top-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pe-brand {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.pe-medal { font-size: 18px; text-align: center; }
.pe-brand-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.pe-brand-cnt {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ============ Regions (slot model) ============ */
.regions-mine {
  background: linear-gradient(135deg, rgba(46,204,113,0.18), rgba(46,204,113,0.05));
  border: 1px solid rgba(46,204,113,0.4);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
}
.regions-mine .rm-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.regions-mine .rm-name { font-size: 18px; font-weight: 700; color: var(--text); margin-top: 4px; }
.regions-mine .rm-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.regions-mine .rm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(46,204,113,0.2);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,0.35);
  border-radius: 999px;
  padding: 5px 6px 5px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.regions-mine .rm-pill-cnt {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.regions-mine .rm-pill-cnt.has-free {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.regions-mine .rm-pill-cnt.full {
  background: rgba(231,76,60,0.22);
  color: #ff7a6a;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.region-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.12s, box-shadow 0.2s;
}
.region-card:hover { border-color: rgba(255,255,255,0.18); }
.region-card.is-mine {
  border-color: rgba(46,204,113,0.55);
  background: linear-gradient(180deg, rgba(46,204,113,0.12) 0%, rgba(46,204,113,0.03) 100%);
  box-shadow: 0 0 0 1px rgba(46,204,113,0.15) inset;
}
.region-card.in-waitlist {
  border-color: rgba(241,196,15,0.5);
  background: linear-gradient(180deg, rgba(241,196,15,0.1) 0%, rgba(241,196,15,0.02) 100%);
}
.region-card .rc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.region-card .rc-name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--text);
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.region-card .rc-count {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.08);
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  line-height: 1;
}
.region-card.is-mine .rc-count {
  background: rgba(46,204,113,0.22);
  color: #2ecc71;
}
.region-card .rc-sub {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.region-card .rc-free {
  color: #2ecc71;
  font-weight: 500;
  font-size: 11px;
}
.region-card .rc-free::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2ecc71;
  margin-right: 5px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(46,204,113,0.5);
}
.region-card .rc-full {
  color: #e74c3c;
  font-weight: 500;
  font-size: 11px;
}
.region-card .rc-full::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e74c3c;
  margin-right: 5px;
  vertical-align: middle;
}
.region-card .rc-wl {
  color: #f1c40f;
  font-size: 11px;
}
.region-card .rc-btn {
  margin-top: 2px;
  background: rgba(46,204,113,0.16);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.1px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.region-card .rc-btn:hover {
  background: rgba(46,204,113,0.24);
  border-color: rgba(46,204,113,0.5);
}
.region-card .rc-btn:active { transform: scale(0.97); }
.region-card .rc-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}
.region-card .rc-btn.leave {
  background: rgba(231,76,60,0.12);
  color: #e74c3c;
  border-color: rgba(231,76,60,0.3);
}
.region-card .rc-btn.leave:hover {
  background: rgba(231,76,60,0.2);
  border-color: rgba(231,76,60,0.5);
}
.region-card .rc-btn.mine {
  background: rgba(46,204,113,0.18);
  color: #2ecc71;
  border-color: rgba(46,204,113,0.4);
}
.region-card .rc-btn.hot {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: #fff;
  border: 1px solid rgba(46,204,113,0.7);
  box-shadow: 0 2px 12px rgba(46,204,113,0.25), 0 0 0 1px rgba(46,204,113,0.15) inset;
  font-weight: 700;
}
.region-card .rc-btn.hot:hover {
  background: linear-gradient(135deg, #38d883 0%, #2ecc71 100%);
  box-shadow: 0 2px 16px rgba(46,204,113,0.4), 0 0 0 1px rgba(46,204,113,0.2) inset;
}

/* ============ Admin Regions ============ */
.adm-regions-list { display: flex; flex-direction: column; gap: 6px; }
.adm-region {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.adm-region.overflow { border-color: #e74c3c; }
.adm-region .ar-head {
  display: grid;
  grid-template-columns: 1fr auto auto 20px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}
.adm-region .ar-head:hover { background: rgba(255,255,255,0.03); }
.adm-region .ar-name { font-weight: 600; }
.adm-region .ar-cnt { color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-region.overflow .ar-cnt { color: #e74c3c; font-weight: 600; }
.adm-region .ar-wl { color: #f1c40f; font-size: 11px; }
.adm-region .ar-tog { color: var(--muted); }
.adm-region .ar-body {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.ar-cap-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.ar-cap-input {
  width: 70px;
  background: var(--bg-dark, #0f0f0f);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
}
.ar-cap-save {
  background: var(--accent);
  color: #fff; border: 0; border-radius: 6px;
  padding: 6px 10px; cursor: pointer; font-family: inherit;
}
.ar-section { display: flex; flex-direction: column; gap: 4px; }
.ar-sec-title { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.4px; }
.ar-list { display: flex; flex-direction: column; gap: 4px; }
.ar-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}
.ar-item .ar-dleft, .ar-item .ar-ts { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11px; }
.ar-item .ar-unassign {
  background: #e74c3c; color: #fff; border: 0; border-radius: 5px;
  padding: 4px 8px; font-size: 11px; cursor: pointer; font-family: inherit;
}
.ar-item .ar-assign-from-wl {
  background: var(--accent); color: #fff; border: 0; border-radius: 5px;
  padding: 4px 8px; font-size: 11px; cursor: pointer; font-family: inherit;
}
.ar-empty { color: var(--muted); font-size: 11px; padding: 4px 8px; }
.ar-assign-form { display: flex; gap: 6px; }
.ar-assign-uid {
  flex: 1;
  background: var(--bg-dark, #0f0f0f);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
.ar-assign-btn {
  background: #2ecc71;
  color: #fff; border: 0; border-radius: 6px;
  padding: 6px 12px; cursor: pointer; font-family: inherit; font-size: 12px;
}

/* Pending row + approve form */
.pending-row { display: flex; flex-direction: column; }
.pending-row .pr-info { display: flex; gap: 10px; align-items: center; flex: 1; }
.pr-form {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prf-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.prf-row label { min-width: 60px; color: var(--muted); font-size: 12px; }
.prf-days, .prf-region {
  flex: 1;
  background: var(--bg-dark, #0f0f0f);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
}
.prf-buttons { gap: 8px; margin-top: 4px; }
.prf-confirm {
  flex: 1;
  background: #2ecc71;
  color: #fff; border: 0; border-radius: 6px;
  padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600;
}
.prf-cancel {
  background: transparent;
  color: var(--muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 14px; cursor: pointer; font-family: inherit; font-size: 12px;
}
