/* ─────────────────────────────────────────────────────────────────────────
 * CupponStore Telegram Mini App Design System
 * Inspired by OpenDesign (Linear App + Raycast + Revolut)
 * ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Surface & Canvas (Void / Dark Architecture) */
  --bg-root: #08090a;
  --bg-subtle: #0d0f12;
  --bg-surface: rgba(18, 21, 28, 0.75);
  --bg-surface-elevated: rgba(26, 31, 42, 0.85);
  --bg-surface-glass: rgba(255, 255, 255, 0.03);
  --bg-surface-active: rgba(255, 255, 255, 0.06);

  /* Typography Colors */
  --fg-primary: #f7f8f8;
  --fg-secondary: #d0d6e0;
  --fg-muted: #8a8f98;
  --fg-meta: #62666d;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-active: rgba(255, 255, 255, 0.18);
  --border-accent: rgba(99, 102, 241, 0.45);

  /* Brand Accents */
  --accent-primary: #6366f1;
  --accent-primary-hover: #7170ff;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-gold: #f59e0b;
  --accent-rose: #f43f5e;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(56, 189, 248, 0.08) 50%, rgba(16, 185, 129, 0.05) 100%);
  --grad-card: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  --grad-fintech: linear-gradient(135deg, #181c24 0%, #0f1218 50%, #1e2433 100%);

  /* Radius System */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);
  --shadow-emerald-glow: 0 0 24px rgba(16, 185, 129, 0.35);

  /* Motion & Easing */
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast: 160ms;
  --duration-base: 260ms;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-root);
  color: var(--fg-secondary);
  font-family: var(--font-family);
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Root App Shell */
.app-root {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 540px;
  margin: 0 auto;
  background-color: var(--bg-root);
  overflow: hidden;
}

/* Ambient Radial Glows */
.ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
}

.glow-top-left {
  top: -60px;
  left: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
}

.glow-top-right {
  top: -40px;
  right: -50px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
}

.glow-bottom {
  bottom: 40px;
  left: 30%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
}

/* Navbar Header */
.navbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8, 9, 10, 0.82);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.navbar-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 42px;
  margin-left: 12px;
  padding: 3px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}

.navbar-right:focus-within {
  border-color: rgba(99, 102, 241, 0.42);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.09), rgba(255, 255, 255, 0.025));
}

.brand-badge {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback-logo {
  font-size: 22px;
}

.brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--fg-primary);
  letter-spacing: -0.4px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--accent-cyan);
  color: #08090a;
  border-radius: 50%;
}

.brand-tagline {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* Balance Header Chip */
.balance-chip {
  display: flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 4px 6px 4px 5px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}

.balance-chip:hover, .balance-chip:active {
  background: rgba(99, 102, 241, 0.12);
}

.balance-icon-wrap {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.34), rgba(56, 189, 248, 0.16));
  border: 1px solid rgba(129, 140, 248, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.balance-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.balance-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
  font-weight: 700;
  line-height: 1;
}

.balance-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-emerald);
  line-height: 1.2;
  font-family: var(--font-mono);
}

.balance-add-btn {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.32);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

/* Scroll Container */
.scroll-container {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 100px;
  -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* Tabs System */
.tab-view {
  display: none;
  animation: fadeInView 0.25s var(--ease-spring) forwards;
}

.tab-view.active {
  display: block;
}

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

/* Hero Card (Linear / Apple Style) */
.hero-card {
  position: relative;
  background: var(--grad-hero);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--fg-primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.45;
  margin-bottom: 14px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--fg-primary);
}

.stat-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

/* Search Bar (Raycast Palette Style) */
.search-box-wrap {
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 46px;
  transition: all var(--duration-fast) var(--ease-standard);
  backdrop-filter: blur(12px);
}

.search-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25), var(--shadow-sm);
  background: var(--bg-surface-elevated);
}

.search-svg {
  color: var(--fg-muted);
  flex-shrink: 0;
  margin-right: 10px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-primary);
}

.search-box input::placeholder {
  color: var(--fg-muted);
}

.clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--fg-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--duration-fast);
}

.clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--fg-primary);
}

/* Category Carousel */
.category-carousel-wrap {
  margin-bottom: 18px;
  margin-inline: -16px;
  padding-inline: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-carousel-wrap::-webkit-scrollbar {
  display: none;
}

.category-carousel {
  display: flex;
  gap: 8px;
  width: max-content;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--fg-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-standard);
  backdrop-filter: blur(10px);
}

.cat-chip:hover {
  background: var(--bg-surface-active);
  color: var(--fg-primary);
  border-color: var(--border-active);
}

.cat-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.cat-chip .cat-icon {
  font-size: 14px;
}

/* Section Header */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg-primary);
  letter-spacing: -0.3px;
}

.section-count {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 600;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.catalog-request-card {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 14px;
  color: var(--fg-primary);
  font-family: inherit;
  text-align: left;
  background:
    radial-gradient(circle at 0 50%, rgba(56, 189, 248, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 17px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}

.catalog-request-card:active {
  transform: scale(0.99);
  border-color: rgba(99, 102, 241, 0.48);
  background-color: rgba(99, 102, 241, 0.07);
}

.catalog-request-icon,
.catalog-request-heading-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.24), rgba(56, 189, 248, 0.12));
  border: 1px solid rgba(165, 180, 252, 0.2);
}

.catalog-request-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 19px;
}

.catalog-request-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.catalog-request-copy strong { font-size: 13px; font-weight: 800; }
.catalog-request-copy > span { color: var(--fg-muted); font-size: 10.5px; line-height: 1.35; }

.catalog-request-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.catalog-request-action > span:last-child { font-size: 20px; line-height: 1; }

@media (max-width: 390px) {
  .catalog-request-card { grid-template-columns: 38px minmax(0, 1fr); padding: 12px; }
  .catalog-request-icon { width: 38px; height: 38px; }
  .catalog-request-action { grid-column: 2; justify-self: start; }
}

/* Product Card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 188px;
  background:
    radial-gradient(circle at 12% 12%, rgba(99, 102, 241, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(22, 26, 36, 0.96), rgba(12, 14, 19, 0.98));
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 15px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.product-card:hover, .product-card:active {
  transform: translateY(-1px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), 0 0 24px rgba(99, 102, 241, 0.13);
}

.product-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.card-duration-pill,
.stock-pill {
  min-width: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-duration-pill {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.stock-pill.in-stock {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stock-pill.out-stock {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.18);
}

.product-card-content {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  margin-bottom: 14px;
}

.product-logo-wrap {
  position: relative;
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.28), rgba(56, 189, 248, 0.12));
  border: 1px solid rgba(165, 180, 252, 0.25);
  border-radius: 17px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.product-logo-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #11141b;
}

.product-logo-fallback {
  color: #dbeafe;
  font-size: 23px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card-copy { min-width: 0; flex: 1; }

.product-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--fg-primary);
  letter-spacing: -0.3px;
  line-height: 1.28;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.product-card-desc {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.card-price-block {
  display: flex;
  flex-direction: column;
}

.card-price-val {
  font-size: 17px;
  font-weight: 900;
  color: var(--fg-primary);
  font-family: var(--font-mono);
}

.card-price-label {
  color: var(--fg-meta);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: 1px solid rgba(165, 180, 252, 0.25);
  border-radius: 11px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.24);
}

.product-card:hover .btn-card-action {
  background: linear-gradient(135deg, #7375ff, #5b51f2);
  box-shadow: 0 7px 18px rgba(99, 102, 241, 0.34);
}

/* Tab Header (Common) */
.tab-header {
  margin-bottom: 18px;
}

.tab-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--fg-primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.tab-subtitle {
  font-size: 13px;
  color: var(--fg-muted);
}

/* Fintech Holographic Wallet Card */
.fintech-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 22px;
  background: var(--grad-fintech);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  margin-bottom: 16px;
}

.fintech-card-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.fintech-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.fintech-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-brand {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #a5b4fc;
}

.fintech-logo {
  font-size: 24px;
}

.fintech-balance-block {
  margin-bottom: 24px;
}

.fintech-balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  font-weight: 600;
}

.fintech-balance-val {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
  margin-top: 4px;
}

.fintech-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.holder-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 2px;
}

.holder-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-primary);
}

.holder-num {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--fg-secondary);
}

.wallet-quick-actions {
  margin-bottom: 20px;
}

/* History Card */
.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.history-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--fg-primary);
}

.history-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tx-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.tx-title-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-primary);
}

.tx-date-text {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.tx-amount-text {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.tx-positive {
  color: var(--accent-emerald);
}

.tx-negative {
  color: var(--fg-primary);
}

/* Orders List */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.order-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-num-tag {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}

.status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-fulfilled {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-awaiting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pending {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-cancelled, .status-refunded {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.order-product-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg-primary);
  margin-bottom: 8px;
}

.order-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.key-delivery-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.key-code-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  word-break: break-all;
}

.copy-btn {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--duration-fast);
}

.copy-btn:hover {
  background: var(--accent-primary-hover);
}

/* Support Tab */
.ticket-form-card, .my-tickets-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
}

.form-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--fg-primary);
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input, .form-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--fg-primary);
  outline: none;
  transition: all var(--duration-fast);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

/* Customer activity cards */
.history-card,
.my-tickets-card {
  padding: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(99, 102, 241, 0.08), transparent 42%),
    var(--bg-surface);
}

.transactions-list,
.tickets-list,
.orders-list {
  display: grid;
  gap: 10px;
}

.tx-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.tx-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
}

.tx-icon.credit { color: #34d399; background: rgba(16, 185, 129, 0.12); }
.tx-icon.debit { color: #a5b4fc; background: rgba(99, 102, 241, 0.13); }
.tx-main { min-width: 0; }
.tx-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fg-primary);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tx-date,
.tx-balance {
  display: block;
  margin-top: 3px;
  color: var(--fg-muted);
  font-size: 10.5px;
  line-height: 1.25;
}
.tx-balance { color: var(--fg-meta); }
.tx-amount-wrap { align-self: start; padding-top: 2px; }
.tx-amt {
  display: block;
  font: 800 13px/1.2 var(--font-mono);
  white-space: nowrap;
}
.tx-plus { color: #34d399; }
.tx-minus { color: #f5f7fa; }

.order-item-card {
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--border-card);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.08), transparent 42%),
    linear-gradient(145deg, rgba(24, 28, 38, 0.96), rgba(12, 14, 19, 0.94));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.order-item-header,
.ticket-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.order-number {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-muted);
  font: 700 10px/1.2 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-status-badge,
.ticket-status-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  font-size: 9.5px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.1);
  color: var(--fg-secondary);
}
.order-status-badge.status-fulfilled,
.ticket-status-pill.status-resolved,
.ticket-status-pill.status-closed { color: #34d399; border-color: rgba(16, 185, 129, 0.28); background: rgba(16, 185, 129, 0.1); }
.order-status-badge.status-awaiting_payment,
.order-status-badge.status-awaiting_fulfillment,
.ticket-status-pill.status-open,
.ticket-status-pill.status-in_progress { color: #fbbf24; border-color: rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.1); }
.order-status-badge.status-refunded,
.order-status-badge.status-cancelled,
.order-status-badge.status-failed { color: #fb7185; border-color: rgba(244, 63, 94, 0.28); background: rgba(244, 63, 94, 0.1); }
.order-product-title {
  display: block;
  margin-top: 13px;
  color: var(--fg-primary);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.order-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 14px;
}
.order-fact {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}
.order-fact span,
.delivery-box-label {
  display: block;
  color: var(--fg-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.order-fact strong {
  display: block;
  margin-top: 4px;
  color: var(--fg-secondary);
  font-size: 11.5px;
  line-height: 1.25;
}
.order-fact-price { min-width: 92px; text-align: right; }
.order-fact-price strong { color: #34d399; font: 800 14px/1.2 var(--font-mono); }
.order-fact-wide { grid-column: 1 / -1; }
.order-delivery-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(99, 102, 241, 0.26);
  border-radius: 13px;
  background: rgba(99, 102, 241, 0.07);
}
.key-code-text {
  overflow-x: auto;
  padding: 10px 11px;
  color: #e0e7ff;
  font: 700 12px/1.4 var(--font-mono);
  overflow-wrap: anywhere;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
}
.account-delivery-box {
  gap: 9px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.045));
}
.account-credential-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}
.account-credential-value {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.account-credential-value span {
  color: var(--fg-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.account-credential-value code {
  overflow: hidden;
  color: #e0e7ff;
  font: 700 11.5px/1.35 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-password-actions {
  display: flex;
  gap: 5px;
}
.btn-copy-account-part,
.btn-toggle-account-password,
.btn-copy-account-all {
  min-height: 34px;
  padding: 7px 9px;
  color: #c7d2fe;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.12);
}
.btn-copy-account-all {
  width: 100%;
  min-height: 40px;
  color: #fff;
  font-size: 11px;
  background: var(--grad-brand);
}
.btn-copy-key,
.btn-copy-link,
.btn-confirm-link,
.order-primary-action {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 11px;
  background: var(--grad-brand);
}
.invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.btn-copy-link {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.3);
}
.btn-confirm-link {
  min-height: 36px;
  color: var(--fg-secondary);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-card);
}
.invite-state {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: var(--fg-muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.invite-state-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  background: #64748b;
}
.invite-state.opened { color: #7dd3fc; }
.invite-state.opened .invite-state-dot { background: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12); }
.invite-state.confirmed { color: #6ee7b7; }
.invite-state.confirmed .invite-state-dot { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12); }

@media (max-width: 370px) {
  .invite-actions { grid-template-columns: 1fr; }
  .account-credential-row { grid-template-columns: 1fr; }
  .account-password-actions { width: 100%; }
  .account-password-actions > button,
  .btn-copy-account-part { flex: 1; }
}

.ticket-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 12px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.ticket-item:active { background: rgba(255, 255, 255, 0.055); }
.ticket-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: rgba(99, 102, 241, 0.13);
}
.ticket-item-main { min-width: 0; }
.ticket-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--fg-primary);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-number,
.ticket-preview,
.ticket-message-count { display: block; }
.ticket-number { margin-top: 3px; color: var(--fg-muted); font: 600 9.5px/1.25 var(--font-mono); }
.ticket-preview {
  margin-top: 7px;
  overflow: hidden;
  color: var(--fg-secondary);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-message-count { margin-top: 3px; color: var(--fg-meta); font-size: 9.5px; }
.ticket-chevron { color: var(--fg-muted); font-size: 22px; }

@media (max-width: 390px) {
  .history-card,
  .my-tickets-card,
  .ticket-form-card { padding: 13px; }
  .tx-item { grid-template-columns: 34px minmax(0, 1fr); padding: 11px; }
  .tx-icon { width: 34px; height: 34px; }
  .tx-amount-wrap { grid-column: 2; padding-top: 0; }
  .order-item-card { padding: 14px; }
  .order-facts { grid-template-columns: 1fr; }
  .order-fact-price { min-width: 0; text-align: left; }
  .order-fact-wide { grid-column: auto; }
}

/* Floating Bottom Dock Navigation (Raycast Style) */
.bottom-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 10px 16px 16px;
  pointer-events: none;
}

.dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(18, 22, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: auto;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
}

.dock-icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-item.active {
  color: #ffffff;
  background: var(--accent-primary);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  text-decoration: none;
}

.btn-large {
  padding: 15px 22px;
  font-size: 15px;
}

.btn-primary {
  background: var(--grad-brand);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover, .btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-glow {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
}

.btn-balance-pay {
  background: var(--grad-emerald);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-balance-pay:hover, .btn-balance-pay:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-card);
  color: var(--fg-primary);
}

.btn-secondary:hover, .btn-secondary:active {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-active);
}

.full-width {
  width: 100%;
}

/* Modal Bottom Sheets (Linear / iOS Style) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity var(--duration-base) var(--ease-spring);
}

.modal-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  background: #0f1218;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.32s var(--ease-spring) forwards;
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
}

.drag-pill {
  width: 38px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.2);
}

.sheet-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--duration-fast);
}

.sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--fg-primary);
}

.modal-sheet-scroll {
  padding: 10px 20px 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.catalog-request-sheet { max-width: 500px; }

.catalog-request-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 2px 34px 20px 0;
}

.catalog-request-heading .modal-product-title { margin-bottom: 5px; }

.catalog-request-heading-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 21px;
}

.modal-top-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-badge-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.modal-duration-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg-secondary);
}

.modal-product-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--fg-primary);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.modal-product-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.modal-product-identity .modal-product-title { margin-bottom: 0; }

.modal-product-logo {
  position: relative;
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  color: #dbeafe;
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.34), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(165, 180, 252, 0.28);
  border-radius: 16px;
}

.modal-product-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #11141b;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-price-val {
  font-size: 26px;
  font-weight: 900;
  color: var(--fg-primary);
  font-family: var(--font-mono);
}

.modal-guarantee-seal {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.modal-block {
  margin-bottom: 16px;
}

.modal-block-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.modal-desc-p, .modal-restrictions-p {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.modal-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.feature-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.feature-icon {
  font-size: 18px;
}

.feature-meta {
  display: flex;
  flex-direction: column;
}

.feature-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.feature-meta strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-primary);
}

.modal-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* Top-up Presets */
.topup-methods {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.topup-methods:empty {
  display: none;
}

.topup-method {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  color: var(--fg-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  text-align: left;
}

.topup-method.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
}

.topup-method-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.14);
  font-weight: 900;
}

.topup-method-copy {
  min-width: 0;
}

.topup-method-copy strong,
.topup-method-copy small {
  display: block;
}

.topup-method-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--fg-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topup-method-check {
  color: var(--accent-primary);
  font-weight: 900;
}

.manual-option-area {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.manual-option-area.hidden { display: none; }

.manual-delay-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.08);
}

.manual-delay-warning p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.manual-option-title { color: var(--fg-secondary); font-size: 12px; }
.manual-option-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.manual-option {
  position: relative;
  min-width: 0;
  padding: 11px 28px 11px 12px;
  color: var(--fg-secondary);
  text-align: left;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.manual-option.active {
  color: var(--fg-primary);
  border-color: rgba(99, 102, 241, 0.75);
  background: rgba(99, 102, 241, 0.13);
}

.manual-option strong,
.manual-option small { display: block; overflow: hidden; text-overflow: ellipsis; }
.manual-option strong { font-size: 12px; white-space: nowrap; }
.manual-option small { margin-top: 3px; color: var(--fg-muted); font-size: 10px; white-space: nowrap; }
.manual-option > span { position: absolute; top: 50%; right: 10px; color: var(--accent-primary); transform: translateY(-50%); }

.manual-quote-preview {
  min-height: 42px;
  padding: 11px 12px;
  color: var(--color-success);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
}

.manual-payment-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.38);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(8, 9, 10, 0.65));
}

.manual-payment-panel.hidden {
  display: none;
}

.manual-payment-heading {
  display: flex;
  gap: 10px;
  align-items: center;
}

.manual-payment-heading > span {
  font-size: 22px;
}

.manual-payment-heading strong,
.manual-payment-heading small {
  display: block;
}

.manual-payment-heading small {
  margin-top: 2px;
  color: var(--fg-muted);
  font: 11px/1.3 var(--font-mono);
}

.manual-payment-total {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  align-items: baseline;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.26);
}

.manual-payment-total span,
.manual-payment-total small {
  color: var(--fg-muted);
  font-size: 12px;
}

.manual-payment-total strong {
  margin-left: auto;
  color: var(--color-success);
  font-size: 18px;
}

.manual-payment-total small {
  flex-basis: 100%;
  text-align: right;
}

.manual-requisite {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.manual-requisite.hidden {
  display: none;
}

.manual-requisite-label,
.manual-requisite strong {
  display: block;
}

.manual-requisite-label {
  margin-bottom: 3px;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.manual-requisite strong {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.btn-copy-requisite {
  flex: 0 0 auto;
  padding: 8px 9px;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.manual-payment-image {
  display: block;
  width: min(100%, 320px);
  max-height: 320px;
  margin: 2px auto;
  padding: 8px;
  object-fit: contain;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: #fff;
}

.manual-payment-instructions {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
}

.manual-delay-text {
  margin: 0;
  padding-top: 9px;
  color: #fcd34d;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 370px) {
  .manual-option-selector { grid-template-columns: 1fr; }
}

.topup-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.topup-chip {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  text-align: center;
}

.topup-chip:hover {
  background: var(--bg-surface-active);
  border-color: var(--border-active);
}

.topup-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.chip-amt {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg-primary);
  font-family: var(--font-mono);
}

.chip-popular {
  position: absolute;
  top: -6px;
  right: 10px;
  background: var(--accent-gold);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.input-currency-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-currency-wrap input {
  width: 100%;
  padding-right: 32px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

.currency-symbol {
  position: absolute;
  right: 14px;
  color: var(--fg-muted);
  font-weight: 700;
}

.topup-action-wrap {
  margin-top: 20px;
}

/* Toast Floating Alert */
.toast-alert {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 22, 30, 0.95);
  border: 1px solid var(--border-card);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: toastFade 0.25s var(--ease-spring);
  white-space: nowrap;
  max-width: 90%;
  text-overflow: ellipsis;
  overflow: hidden;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Placeholders & Spinners */
.state-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--fg-muted);
  font-size: 13px;
  grid-column: 1 / -1;
}

.modern-spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinAnim 0.75s linear infinite;
}

@keyframes spinAnim {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.empty-state-text {
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
  padding: 16px;
}

/* Ticket Conversation Thread Modal */
.ticket-thread-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(8, 10, 14, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.ticket-msg-bubble {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.ticket-msg-user {
  align-self: flex-end;
  background: var(--accent-primary);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.ticket-msg-admin {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg-primary);
  border: 1px solid var(--border-card);
  border-bottom-left-radius: 2px;
}

.ticket-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  opacity: 0.75;
  margin-top: 4px;
}

.ticket-reply-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ticket-reply-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--fg-primary);
  font-size: 14px;
  outline: none;
}

.ticket-reply-bar input:focus {
  border-color: var(--accent-primary);
}

/* Language Selector */
.lang-control {
  align-self: stretch;
  width: 66px;
  min-width: 66px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px 0 0 11px;
  padding-left: 8px;
  color: var(--fg-muted);
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}

.lang-control:hover,
.lang-control:focus-within {
  background: rgba(255, 255, 255, 0.045);
  color: var(--fg-primary);
}

.lang-control-icon {
  flex: 0 0 14px;
}

.lang-select-btn {
  align-self: stretch;
  width: 42px;
  min-width: 42px;
  min-height: 36px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--fg-primary);
  padding: 0 3px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color-scheme: dark;
  cursor: pointer;
  outline: none;
  transition: background var(--duration-fast) var(--ease-standard);
}

/* Trust Banners (Reviews & Channel) */
.trust-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.trust-card {
  width: 100%;
  min-width: 0;
  appearance: none;
  font: inherit;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.trust-card:hover, .trust-card:active {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.trust-icon {
  font-size: 20px;
}

.trust-info h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-primary);
}

.trust-info p {
  font-size: 10px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trust-info {
  min-width: 0;
}

.trust-arrow {
  margin-left: auto;
  color: var(--fg-muted);
  font-size: 16px;
}

.catalog-intro {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 14px;
  padding: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 20%, rgba(56, 189, 248, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.catalog-intro-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.11);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 11px;
}

.catalog-intro-copy h2 {
  color: var(--fg-primary);
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.2px;
}

.catalog-intro-copy p {
  margin-top: 3px;
  color: var(--fg-muted);
  font-size: 11px;
  line-height: 1.25;
}

.catalog-intro-copy { min-width: 0; flex: 1; }

.catalog-intro-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #34d399;
  font-size: 9px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
}

.market-legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  padding: 20px 12px 8px;
  color: var(--fg-muted);
  font-size: 11px;
  text-align: center;
}

.market-legal-link {
  color: var(--fg-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-consent-backdrop {
  z-index: 400;
}

.legal-consent-panel {
  max-height: min(620px, calc(100vh - 24px));
}

.legal-shield {
  font-size: 34px;
  margin-bottom: 12px;
}

.legal-document-links {
  display: grid;
  gap: 9px;
  margin: 18px 0;
}

.legal-document-links a {
  display: block;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #a5b4fc;
  text-decoration: none;
  background: var(--bg-card);
}

.legal-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--fg-secondary);
  font-size: 13px;
  line-height: 1.45;
  margin: 18px 0;
}

.legal-consent-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent-primary);
}

@media (max-width: 430px) {
  .navbar {
    padding: 12px 10px 10px;
  }

  .navbar-left {
    gap: 9px;
  }

  .brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-tagline {
    font-size: 10px;
    white-space: nowrap;
  }

  .verified-badge {
    width: 15px;
    height: 15px;
  }

  .navbar-right {
    min-height: 40px;
    margin-left: 8px;
    border-radius: 14px;
  }

  .lang-control {
    width: 62px;
    min-width: 62px;
    padding-left: 7px;
  }

  .lang-select-btn {
    width: 39px;
    min-width: 39px;
    min-height: 34px;
  }

  .balance-chip {
    min-height: 34px;
    gap: 6px;
    padding-right: 5px;
  }

  .balance-icon-wrap {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    border-radius: 8px;
  }

  .balance-val {
    font-size: 12px;
  }

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

  .trust-card {
    min-width: 0;
    min-height: 58px;
    gap: 7px;
    padding: 9px 8px;
  }

  .trust-icon {
    flex: 0 0 auto;
    font-size: 18px;
  }

  .trust-info h4,
  .trust-info p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .trust-info h4 {
    font-size: 10px;
  }

  .trust-info p {
    font-size: 8px;
  }

  .trust-arrow {
    display: none;
  }
}

@media (max-width: 370px) {
  .brand-tagline,
  .balance-label {
    display: none;
  }

  .brand-badge {
    width: 36px;
    height: 36px;
  }

  .navbar-right {
    min-height: 38px;
  }

  .lang-control,
  .lang-select-btn,
  .balance-chip {
    min-height: 32px;
  }

  .lang-control {
    width: 56px;
    min-width: 56px;
    padding-left: 6px;
  }

  .lang-select-btn {
    width: 36px;
    min-width: 36px;
  }
}

/* Referral Program Card */
.referral-card {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(18, 22, 30, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}

.ref-badge-top {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  background: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.ref-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg-primary);
  margin-bottom: 6px;
}

.ref-desc {
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
}

.ref-stats-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
}

.ref-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ref-stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 700;
}

.ref-stat-item strong {
  font-size: 16px;
  font-family: var(--font-mono);
  color: var(--fg-primary);
}

.ref-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-card);
}

.ref-balance-actions {
  display: grid;
  gap: 9px;
  margin-top: -2px;
}

.ref-balance-actions p {
  color: var(--fg-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.ref-balance-actions .btn:disabled,
#btn-request-withdrawal:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

/* Payment Method Chips in Checkout */
.pay-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.pay-method-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pay-method-chip.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent-primary);
  color: var(--fg-primary);
}

.pay-method-icon {
  font-size: 16px;
}
