/* ═══════════════════════════════════════════════════════════
   SMM PRO — 2026 Design System (Telegram Native)
   Zero emojis. Pure SVG. Clean geometry.
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Variables (Light Theme) ─────────────────────────── */
:root {
  --bg: #efeff4;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --surface-3: #ebebf0;
  --border: rgba(60, 60, 67, 0.12);
  --border-strong: rgba(60, 60, 67, 0.22);

  --primary: #2481cc;
  --primary-rgb: 36, 129, 204;
  --primary-hover: #1a6fb5;
  --primary-light: rgba(36, 129, 204, 0.12);

  --text: #000000;
  --text-secondary: #3c3c43;
  --text-muted: #8e8e93;
  --text-dim: #aeaeb2;

  --success: #34c759;
  --success-light: rgba(52, 199, 89, 0.1);
  --danger: #ff3b30;
  --danger-light: rgba(255, 59, 48, 0.1);
  --warning: #ff9500;
  --warning-light: rgba(255, 149, 0, 0.1);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  --nav-height: 54px;
  --header-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ─── Dark Theme ───────────────────────────────────────────── */
[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-secondary: #ebebf5cc;
  --text-muted: #8e8e93;
  --text-dim: #636366;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

  --shimmer-bg: #1c1c1e;
  --shimmer-color: #2c2c2e;
}

[data-theme="light"],
:root:not([data-theme="dark"]) {
  --shimmer-bg: #efeff4;
  --shimmer-color: #ffffff;
}

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

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ─── Page Transitions ─────────────────────────────────────── */
.page-enter {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ─── Shimmer Loading ───────────────────────────────────────── */
.shimmer {
  background: var(--shimmer-bg);
  background-image: linear-gradient(90deg,
      var(--shimmer-bg) 0%,
      var(--shimmer-color) 50%,
      var(--shimmer-bg) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
  overflow: hidden;
  color: transparent !important;
  pointer-events: none;
}

.shimmer * {
  visibility: hidden;
}

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

  100% {
    background-position: 100% 0;
  }
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Utilities ────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

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

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

/* ─── Loading Screen ───────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg);
  z-index: 9999;
}

.loading-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.4);
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Header ───────────────────────────────────────────────── */
.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

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

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.user-handle {
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.header-btn:active {
  background: var(--surface-3);
}

.header-btn svg {
  display: block;
}

.vip-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-block;
  margin-left: 6px;
}

.vip-gold {
  background: rgba(255, 196, 0, 0.15);
  color: #b88600;
}

.vip-silver {
  background: rgba(173, 173, 173, 0.15);
  color: #6e6e73;
}

.vip-bronze {
  background: rgba(205, 127, 50, 0.15);
  color: #b05c00;
}

[data-theme="dark"] .vip-gold {
  color: #ffd60a;
}

[data-theme="dark"] .vip-silver {
  color: #aeaeb2;
}

[data-theme="dark"] .vip-bronze {
  color: #e4954e;
}

/* ─── Content Area ─────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  overscroll-behavior-y: contain;
}

/* ─── Tab Panels ───────────────────────────────────────────── */
.tab-panel {
  display: none;
  animation: fadeUp 0.2s ease;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Section Headers ──────────────────────────────────────── */
.section-header {
  padding: 20px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ─── List Group (Telegram-style) ─────────────────────────── */
.list-group {
  background: var(--surface);
  border-radius: var(--radius-md);
  margin: 0 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  min-height: 52px;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:active {
  background: var(--surface-2);
}

.list-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.list-item-body {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.list-item-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

.list-chevron {
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ─── Balance Card ─────────────────────────────────────────── */
.balance-card {
  background: var(--primary);
  margin: 16px 16px 0;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.25);
  display: flex;
  flex-direction: column;
}

.history-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
  cursor: pointer;
  padding: 4px;
}

.history-trigger:active {
  opacity: 0.7;
  transform: scale(0.95);
}

.history-icon-wrap {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.history-trigger span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 20px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.balance-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.8;
  display: block;
  margin-bottom: 6px;
}

.balance-amount {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.balance-footer {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.balance-action-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  transition: background 0.15s;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.balance-action-btn:active {
  background: rgba(255, 255, 255, 0.28);
}

/* ─── Stats Row ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 0;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.stat-card:active {
  transform: scale(0.97);
}

.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.stat-text label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
}

.stat-text span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
  display: block;
  line-height: 1.2;
}

/* ─── Quick Action Card ────────────────────────────────────── */
.quick-action-card {
  background: var(--surface);
  margin: 12px 16px 0;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s;
  border: 1px solid var(--border);
}

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

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.quick-action-body {
  flex: 1;
}

.quick-action-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.quick-action-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Daily Bonus Card ─────────────────────────────────────── */
.daily-bonus-card {
  background: var(--surface);
  margin: 12px 16px 0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.bonus-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bonus-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bonus-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.bonus-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.btn-bonus {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.btn-bonus:active {
  opacity: 0.8;
}

.btn-bonus:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Promo Carousel ───────────────────────────────────────── */
.promo-carousel {
  margin: 12px 16px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  min-width: 100%;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  aspect-ratio: 16/6;
  overflow: hidden;
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.carousel-caption h3 {
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 8px 0 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all 0.2s;
}

.dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--primary);
}

/* ─── Services / Platform Grid ─────────────────────────────── */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px;
}

.platform-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
}

.platform-card:active {
  transform: scale(0.95);
}

.platform-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.platform-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.platform-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

/* ─── Services Filters ─────────────────────────────────────── */
.filters-container {
  padding: 16px 16px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
  padding-bottom: 12px;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.1s;
  flex-shrink: 0;
}

.btn-icon:active {
  background: var(--surface-3);
}

.btn-icon.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.sort-menu {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-top: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.sort-option:last-child {
  border-bottom: none;
}

.sort-option:active {
  background: var(--surface-2);
}

/* ─── Services List ────────────────────────────────────────── */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 16px 0;
}

.service-item {
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding-top: 16px;
}

.service-item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding-bottom: 16px;
}

.service-item:only-child {
  border-radius: var(--radius-md);
}

/* Wrapped in a container for proper background */
.services-container-inner {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.services-container-inner .service-item {
  border-radius: 0;
  padding-left: 16px;
  padding-right: 16px;
}

.service-item:active {
  background: var(--surface-2);
}

.service-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.service-item-body {
  flex: 1;
  min-width: 0;
}

.service-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.service-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-item-right {
  flex-shrink: 0;
  text-align: right;
}

.service-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.service-price-unit {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-popular {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--warning-light);
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.badge-refill {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--success-light);
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

/* ─── Order Tab ────────────────────────────────────────────── */
.order-tab-header {
  padding: 20px 16px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-service-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  flex: 1;
}

.order-service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 16px;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.meta-pill.accent {
  background: var(--primary-light);
  color: var(--primary);
  border-color: transparent;
}

/* ─── Form Elements ────────────────────────────────────────── */
.form-group {
  padding: 0 16px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.qty-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  text-transform: none;
  letter-spacing: 0;
}

.form-input {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--text);
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.range-input {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  margin: 12px 0 10px;
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
  cursor: pointer;
}

/* ─── Order Summary ────────────────────────────────────────── */
.order-summary {
  margin: 0 16px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.summary-row span {
  color: var(--text-muted);
}

.summary-row strong {
  font-weight: 700;
  color: var(--text);
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 3px 12px rgba(var(--primary-rgb), 0.35);
}

.btn-primary:active {
  opacity: 0.85;
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.btn-secondary:active {
  background: var(--surface-3);
}

/* ─── Error / Info Messages ────────────────────────────────── */
.error-msg {
  margin: 12px 16px 0;
  padding: 12px 14px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

/* ─── Orders List ──────────────────────────────────────────── */
.orders-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 12px;
}

.tab-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.order-card {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.1s;
}

.order-card:active {
  background: var(--surface-2);
}

.order-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.order-status-dot.pending {
  background: var(--warning);
}

.order-status-dot.inprogress,
.order-status-dot.processing {
  background: var(--primary);
}

.order-status-dot.completed,
.order-status-dot.partial {
  background: var(--success);
}

.order-status-dot.canceled,
.order-status-dot.error {
  background: var(--danger);
}

.status-pending {
  color: var(--warning);
  font-weight: 700;
  font-size: 11px;
}

.status-inprogress,
.status-processing {
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
}

.status-completed,
.status-partial {
  color: var(--success);
  font-weight: 700;
  font-size: 11px;
}

.status-canceled,
.status-error {
  color: var(--danger);
  font-weight: 700;
  font-size: 11px;
}

/* ─── Referral Tab ─────────────────────────────────────────── */
.ref-hero {
  padding: 32px 24px 0;
  text-align: center;
}

.ref-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.ref-hero h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.ref-hero p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
}

.ref-link-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 16px 8px;
}

.ref-link-wrap {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--border);
  align-items: center;
  margin: 0 16px 20px;
}

.ref-link-box {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  background: none;
  outline: none;
}

.copy-btn {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.copy-btn:active {
  opacity: 0.8;
}

/* ─── Loyalty / VIP Cards ──────────────────────────────────── */
.loyalty-section {
  margin: 12px 16px 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.loyalty-section-header {
  padding: 14px 16px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
}

.loyalty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.loyalty-row:last-child {
  border-bottom: none;
}

.coupon-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  align-items: center;
}

/* ─── Payment History Items ─────────────────────────────── */
.payment-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.payment-item:last-child {
  border-bottom: none;
}

.payment-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.payment-info {
  flex: 1;
}

.payment-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.payment-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.payment-amount {
  text-align: right;
}

.payment-amount-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.payment-status {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-block;
}

.status-paid {
  color: #34c759;
  background: rgba(52, 199, 89, 0.1);
}

.status-pending {
  color: #ff9500;
  background: rgba(255, 149, 0, 0.1);
}

.status-expired {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
}

.status-cancelled {
  color: var(--text-muted);
  background: var(--surface-2);
}

/* ─── Bottom Navigation ────────────────────────────────────── */
.bottom-nav {
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 200;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--text-muted);
  transition: color 0.15s;
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* Active indicator */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* ─── Bottom Sheet / Modals ────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: none;
}

.sheet-backdrop.visible {
  display: block;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  z-index: 1000;
  padding: 0 0 calc(20px + var(--safe-bottom)) 0;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100%);
  }

  to {
    transform: translateX(-50%) translateY(0);
  }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 12px auto 0;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.sheet-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Legacy compatibility */
.order-modal,
.refill-modal {
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 0 calc(20px + var(--safe-bottom));
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 2000;
  -webkit-overflow-scrolling: touch;
}

.sheet-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1;
  z-index: 10;
}

.order-header {
  padding: 20px 20px 12px;
}

.order-header h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.order-header p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Payment Methods ──────────────────────────────────────── */
.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}

.payment-card {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.payment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-light);
}

.payment-card:active {
  background: var(--surface-3);
}

.payment-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.payment-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  color: var(--text-muted);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1999;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.3s;
}

.modal-backdrop.hidden-abs {
  opacity: 0;
  pointer-events: none;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

/* ─── Skeleton Loading Shimmers ────────────────────────────── */
.skeleton {
  background: #e2e5e7;
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.4) 20%,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0) 100%);
  background-repeat: no-repeat;
  background-size: 200vw 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

body.dark-theme .skeleton {
  background-color: var(--surface-2);
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.05) 20%,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0) 100%);
}

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

  100% {
    background-position: 100vw 0;
  }
}

.skeleton-platform {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 8px;
}

.skeleton-text {
  height: 12px;
  border-radius: 6px;
}

.skeleton-category {
  height: 38px;
  width: 100px;
  border-radius: 12px;
  display: inline-block;
  margin-right: 8px;
  flex-shrink: 0;
}

.skeleton-service-card {
  height: 84px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  width: 100%;
}

.empty-state p {
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

/* ─── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Maintenance ──────────────────────────────────────────── */
.maintenance-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maintenance-content {
  text-align: center;
  padding: 40px;
}

.maintenance-icon {
  width: 80px;
  height: 80px;
  background: var(--warning-light);
  color: var(--warning);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

/* ─── Animate In ───────────────────────────────────────────── */
.animate-in {
  animation: fadeUp 0.3s ease both;
}

/* ─── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ─── Selection ────────────────────────────────────────────── */
::selection {
  background: rgba(var(--primary-rgb), 0.2);
}