:root {
  --bg: #050505;
  --bg-2: #0b0b0c;
  --panel: rgba(13, 13, 14, 0.9);
  --panel-2: rgba(18, 18, 19, 0.96);
  --panel-3: #161617;
  --border: rgba(214, 176, 90, 0.16);
  --border-strong: rgba(214, 176, 90, 0.26);

  --text: #f5efe2;
  --muted: #bca98b;

  --accent: #ba8b35;
  --accent-2: #f1d48b;
  --accent-3: #fff1c8;

  --success: #d9be74;
  --danger: #ff8f8f;
  --danger-bg: rgba(255, 109, 136, 0.1);

  --shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 40px 110px rgba(0, 0, 0, 0.58);
  --shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.28);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(241, 212, 139, 0.08), transparent 28%),
    radial-gradient(circle at top left, rgba(186, 139, 53, 0.14), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(97, 68, 20, 0.1), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

body {
  padding: 16px;
}

img {
  max-width: 100%;
  display: block;
}

button,
textarea,
input {
  font: inherit;
}

input,
textarea {
  outline: none;
}

textarea {
  resize: none;
}

.app-shell {
  max-width: 820px;
  margin: 0 auto;
}

.content {
  display: grid;
  gap: 18px;
  padding-bottom: 96px;
}

/* =========================
   PAGES / LAYOUT
========================= */

.page {
  display: none;
}

.page.active {
  display: block;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 6px;
}

.page-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.page-topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 700;
  cursor: pointer;
}

/* =========================
   HERO HEADER
========================= */

.hero-header {
  position: relative;
  height: 196px;
  border-radius: 30px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(214, 176, 90, 0.22);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateZ(0);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(241, 212, 139, 0.22), transparent 35%),
    radial-gradient(circle at 82% 18%, rgba(186, 139, 53, 0.16), transparent 34%),
    radial-gradient(circle at 52% 85%, rgba(102, 72, 24, 0.14), transparent 30%),
    linear-gradient(135deg, #050505 0%, #121212 46%, #070707 100%);
  transform: translate3d(0, 0, 0);
  transition: transform 0.18s ease-out;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.12) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 75%, rgba(255,255,255,0.10) 0 1px, transparent 1px);
  background-size: 120px 120px, 160px 160px, 140px 140px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.logo-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 245, 210, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)),
    linear-gradient(180deg, rgba(20,20,21,0.96), rgba(8,8,9,0.98));
  border: 1px solid rgba(214, 176, 90, 0.22);
  padding: 10px;
  position: relative;
  z-index: 3;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(
    circle,
    rgba(241, 212, 139, 0.46),
    rgba(186, 139, 53, 0.24) 45%,
    transparent 72%
  );
  filter: blur(22px);
  z-index: 1;
  animation: pulseGlow 2.8s ease-in-out infinite;
}

.logo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 28px;
  border: 1px solid rgba(214, 176, 90, 0.18);
  z-index: 2;
}

.hero-texts {
  position: relative;
  z-index: 3;
}

.hero-texts h1 {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #f7f0e2;
  text-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.hero-texts p {
  margin: 8px 0 0;
  color: rgba(219, 198, 164, 0.82);
  font-size: 16px;
  max-width: 340px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(214, 176, 90, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.status-active {
  background: linear-gradient(135deg, rgba(186, 139, 53, 0.18), rgba(241, 212, 139, 0.08));
  color: #f3d995;
  border-color: rgba(214, 176, 90, 0.24);
  box-shadow: 0 8px 20px rgba(186, 139, 53, 0.16);
}

.status-inactive {
  background: rgba(255, 95, 122, 0.14);
  color: #ff7f95;
  border-color: rgba(255, 95, 122, 0.22);
  box-shadow: 0 8px 20px rgba(255, 95, 122, 0.1);
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.75;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* =========================
   PROFILE CARD
========================= */

.profile-card {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-title-wrap {
  display: grid;
  gap: 4px;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-title-row h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.profile-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.subscription-progress {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 8px;
}

.subscription-progress-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.battery-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.028);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  flex-shrink: 0;
}

.battery-bar {
  width: 10px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.battery-bar.is-filled {
  background: linear-gradient(180deg, #f6dd9b, #b98931);
  box-shadow: 0 0 12px rgba(214, 176, 90, 0.24);
}

.battery-bar.is-empty {
  background: rgba(255, 109, 136, 0.16);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-pill.status-active {
  background: linear-gradient(135deg, rgba(186, 139, 53, 0.18), rgba(241, 212, 139, 0.08));
  color: #f3d995;
  border: 1px solid rgba(214, 176, 90, 0.24);
}

.status-pill.status-inactive {
  background: rgba(255, 95, 122, 0.14);
  color: #ff7f95;
  border: 1px solid rgba(255, 95, 122, 0.22);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.user-id-badge,
.plan-badge-card {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  min-height: 82px;
}

.user-id-label {
  font-size: 12px;
  color: var(--muted);
}

.user-id-value {
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
  line-height: 1.35;
}

.bonus-telegram-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 15px 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(186, 139, 53, 0.16), rgba(241, 212, 139, 0.06)),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(214, 176, 90, 0.24);
}

.bonus-telegram-card.hidden {
  display: none !important;
}

.bonus-telegram-card strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.bonus-telegram-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.bonus-label {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.bonus-telegram-card-config {
  margin-top: 16px;
}

.vpn-link-card {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.vpn-link-card:hover {
  border-color: rgba(214, 176, 90, 0.32);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(214, 176, 90, 0.1);
}

.vpn-link-card:active {
  transform: scale(0.995);
}

.vpn-link-card #vpn-config-link {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.bonus-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.connect-app-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(12,12,13,0.72);
  border: 1px solid var(--border);
}

.connect-app-head h3 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.connect-app-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.connect-steps {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.connect-steps span {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(214, 176, 90, 0.12);
}

/* =========================
   QUICK ACTIONS
========================= */

.quick-actions-card {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.section-head-compact h3 {
  margin: 0;
  font-size: 20px;
}

.section-head-compact p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.quick-action-btn {
  border: none;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012));
  color: var(--text);
  display: grid;
  justify-items: start;
  gap: 8px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  border: 1px solid rgba(214, 176, 90, 0.12);
  box-shadow: var(--shadow-soft);
}

.quick-action-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

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

.quick-action-btn.primary {
  background: linear-gradient(135deg, rgba(186, 139, 53, 0.24), rgba(241, 212, 139, 0.14));
  border: 1px solid rgba(214, 176, 90, 0.2);
}

.quick-action-icon {
  font-size: 24px;
  line-height: 1;
}

.quick-action-text {
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

/* =========================
   PAYWALL
========================= */

.paywall-card {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid rgba(214, 176, 90, 0.18);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.paywall-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(186, 139, 53, 0.18), rgba(241, 212, 139, 0.08));
  color: #f3d995;
  border: 1px solid rgba(214, 176, 90, 0.18);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.paywall-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.paywall-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.paywall-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.paywall-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}

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

/* =========================
   CONFIG PAGE
========================= */

.config-page-card {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.config-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.config-page-head h3 {
  margin: 0;
  font-size: 22px;
}

.config-page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.config-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.config-meta-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.config-meta-label {
  font-size: 12px;
  color: var(--muted);
}

.config-meta-value {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.battery-indicator-compact {
  width: fit-content;
  padding: 5px 7px;
  margin-top: 2px;
}

#vpn-config-link,
#config-link {
  width: 100%;
  min-height: 62px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  padding: 2px 0;
}

/* =========================
   BUTTONS
========================= */

.btn {
  border: none;
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    opacity 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn:hover {
  opacity: 0.96;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #120d05;
  box-shadow: 0 14px 30px rgba(186, 139, 53, 0.26);
}

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(214, 176, 90, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 95, 122, 0.2);
}

/* =========================
   SECTION HEADER
========================= */

.section-header h2 {
  margin: 0;
  font-size: 20px;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   GENERIC CARDS / ADMIN
========================= */

.devices-grid {
  display: grid;
  gap: 12px;
}

.device-card {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.device-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.device-name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.device-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.platform-badge {
  padding: 8px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(186, 139, 53, 0.18), rgba(241, 212, 139, 0.1));
  color: var(--accent-2);
  border: 1px solid rgba(214, 176, 90, 0.2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.device-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

/* =========================
   EMPTY STATE
========================= */

.empty-state {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
  padding: 28px 18px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.empty-state.hidden {
  display: none !important;
}

.empty-icon {
  font-size: 28px;
  color: var(--muted);
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 8px;
}

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

/* =========================
   TARIFFS
========================= */

.tariff-grid {
  display: grid;
  gap: 12px;
}

.tariff-card {
  position: relative;
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.tariff-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(241, 212, 139, 0.09), transparent 35%),
    radial-gradient(circle at bottom left, rgba(186, 139, 53, 0.08), transparent 35%);
  pointer-events: none;
}

.tariff-card-featured {
  border-color: rgba(214, 176, 90, 0.32);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(214, 176, 90, 0.14);
}

.tariff-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(186, 139, 53, 0.22), rgba(241, 212, 139, 0.12));
  color: #f3d995;
  border: 1px solid rgba(214, 176, 90, 0.22);
  font-size: 12px;
  font-weight: 800;
  z-index: 2;
}

.tariff-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
  font-size: 20px;
}

.tariff-price {
  position: relative;
  z-index: 2;
  font-size: 32px;
  font-weight: 900;
  margin: 8px 0;
}

.tariff-desc {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.tariff-card .btn {
  position: relative;
  z-index: 2;
}

/* =========================
   PAYMENT
========================= */

.payment-box {
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
}

.payment-row strong {
  color: var(--text);
}

.payment-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(186, 139, 53, 0.08);
  border: 1px solid rgba(214, 176, 90, 0.14);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* =========================
   MODAL
========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 5, 0.8);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hidden {
  display: none !important;
}

.modal-panel {
  width: 100%;
  max-width: 620px;
  background: linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    ),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0 0 6px;
}

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

.icon-btn {
  border: none;
  background: var(--panel-2);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.12s ease;
}

.icon-btn:active {
  transform: scale(0.96);
}

.config-box {
  background: linear-gradient(180deg, rgba(8,8,9,0.98), rgba(14,14,15,0.94));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.config-box-copyable {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.config-box-copyable:hover {
  border-color: rgba(214, 176, 90, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.config-box-copyable:active {
  transform: scale(0.995);
}

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

/* =========================
   TOAST
========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(18,18,19,0.98), rgba(10,10,11,0.98));
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 120;
  min-width: 180px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* =========================
   BOTTOM NAV
========================= */

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  background: rgba(8, 8, 9, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 20;
}

.bottom-nav-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 8px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.bottom-nav.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.bottom-nav.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.bottom-nav-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #120d05;
  box-shadow: 0 10px 24px rgba(186, 139, 53, 0.24);
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-label {
  font-size: 11px;
  line-height: 1;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px) {
  body {
    padding: 14px;
  }

  .hero-header {
    height: 186px;
    border-radius: 26px;
  }

  .hero-content {
    padding: 18px;
    gap: 14px;
  }

  .logo-wrap {
    width: 74px;
    height: 74px;
  }

  .hero-texts h1 {
    font-size: 28px;
  }

  .hero-texts p {
    font-size: 14px;
  }

  .profile-title-row h2 {
    font-size: 22px;
  }

  .subscription-progress {
    align-items: center;
    flex-direction: row;
  }

  .profile-info-grid,
  .quick-actions-grid,
  .config-meta-grid,
  .modal-actions,
  .paywall-actions {
    grid-template-columns: 1fr;
  }

  .bonus-telegram-card,
  .bonus-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .device-top {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .platform-badge {
    margin-top: 8px;
  }

  .bottom-nav {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 6px;
    padding: 8px;
  }

  .bottom-nav-btn {
    padding: 10px 6px;
  }

  .nav-icon {
    font-size: 16px;
  }

  .nav-label {
    font-size: 10px;
  }

  .toast {
    bottom: 88px;
    min-width: 160px;
  }
}

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

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid transparent;
  letter-spacing: 0.2px;
}

.role-pill.hidden {
  display: none !important;
}

.role-basic {
  background: rgba(255,255,255,0.06);
  color: #d3c4a6;
  border-color: rgba(214, 176, 90, 0.1);
}

.role-vip {
  background: linear-gradient(135deg, #d1a03f, #f3d58f 58%, #8f6520);
  color: #120d05;
  box-shadow: 0 0 12px rgba(214, 176, 90, 0.34);
}

.role-admin {
  background: linear-gradient(135deg, #3c2f1d, #8a662f 58%, #e7c77f);
  color: #f8f0df;
  box-shadow: 0 0 12px rgba(186, 139, 53, 0.26);
}

.role-off {
  background: rgba(255, 109, 136, 0.12);
  color: #ff91a4;
  border-color: rgba(255, 109, 136, 0.16);
}

.admin-toolbar {
  display: grid;
  gap: 12px;
}

.admin-search-input {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  min-height: 52px;
}

.admin-empty-search {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,0.018);
}
