/* ═══════════════════════════════════════════════════════════════════════════
   RVR Exchange — Obsidian Glass Design System
   iOS-native premium dark UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:            #0C0E11;
  --bg-elevated:   #141618;
  --bg-card:       rgba(255, 255, 255, 0.065);
  --bg-card-hi:    rgba(255, 255, 255, 0.095);
  --bg-input:      rgba(255, 255, 255, 0.07);
  --bg-nav:        rgba(10, 12, 15, 0.90);

  /* Accent — ONE color */
  --accent:        #0A84FF;
  --accent-dim:    rgba(10, 132, 255, 0.14);
  --accent-glow:   rgba(10, 132, 255, 0.30);
  --accent-border: rgba(10, 132, 255, 0.38);

  /* Text */
  --text:          #FFFFFF;
  --text-2:        rgba(255, 255, 255, 0.58);
  --text-3:        rgba(255, 255, 255, 0.28);
  --text-4:        rgba(255, 255, 255, 0.14);

  /* Semantic */
  --success:       #30D158;
  --success-dim:   rgba(48, 209, 88, 0.15);
  --warning:       #FF9F0A;
  --warning-dim:   rgba(255, 159, 10, 0.15);
  --danger:        #FF453A;
  --danger-dim:    rgba(255, 69, 58, 0.15);

  /* Borders */
  --border:        rgba(255, 255, 255, 0.09);
  --border-2:      rgba(255, 255, 255, 0.13);
  --inner-hi:      rgba(255, 255, 255, 0.09);

  /* Separators */
  --sep:           rgba(255, 255, 255, 0.07);

  /* Radius */
  --r-xs:   8px;
  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   22px;
  --r-xl:   26px;
  --r-pill: 9999px;

  /* Nav */
  --nav-h: 72px;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: 'Inter', -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  background: #0C0E11;
}

input, button, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="tel"] { -webkit-appearance: none; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── App shell ─────────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ─── Pages ─────────────────────────────────────────────────────────────── */
.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.page::-webkit-scrollbar { display: none; }

.page.active {
  display: block;
  animation: pageIn 0.26s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

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

.page-content {
  padding: 0 16px calc(var(--nav-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── App header (home) ─────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  padding: 0;
  overflow: visible;
  margin-bottom: -24px;
}
.app-logo-img {
  display: block;
  width: 110px !important;
  height: auto !important;
  max-height: 32px;
  flex-shrink: 0;
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(255, 255, 255, 0.18));
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  flex-shrink: 0;
  border-radius: 11px;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.28);
}
.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}
.logo-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
}
.header-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(48, 209, 88, 0.10);
  border: 1px solid rgba(48, 209, 88, 0.22);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 5px 11px;
  border-radius: var(--r-pill);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.85); }
}

/* ─── Hero rate block ───────────────────────────────────────────────────── */
.hero-rate-card {
  background: #1A2332;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 0 rgba(10,132,255,0.12) inset,
    0 10px 40px rgba(0, 0, 0, 0.35);
}
.hero-rate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}
.hero-rate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hero-cur-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.2px;
}
.hero-rate-time {
  font-size: 11px;
  color: var(--text-4);
  font-weight: 400;
}
.hero-rate-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}
.hero-rate-value span { color: var(--text-2); font-size: 22px; font-weight: 400; margin-left: 2px; }
.hero-rate-base {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

/* ─── Coin icon ─────────────────────────────────────────────────────────── */
.coin-svg { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.coin-svg-lg { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }

/* ─── Page header ───────────────────────────────────────────────────────── */
.page-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 4px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 0.18s, transform 0.1s;
  backdrop-filter: blur(8px);
}
.icon-btn:active {
  background: var(--bg-card-hi);
  transform: scale(0.93);
  color: var(--accent);
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: #1C2028;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 0 0 rgba(255,255,255,0.07) inset,
    0 4px 20px rgba(0, 0, 0, 0.30);
}

.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.1px;
}
.cur-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Calculator ────────────────────────────────────────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  align-items: center;
  gap: 6px;
}
.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.calc-inp {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  padding: 11px 13px;
  width: 100%;
  outline: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
}
.calc-inp:focus {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3.5px rgba(10, 132, 255, 0.14);
}
.calc-inp::placeholder { color: var(--text-4); }

.calc-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 19px;
}
.calc-swap-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: background 0.18s, transform 0.2s;
}
.calc-swap-btn:active {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(180deg) scale(0.92);
}

.calc-info {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  padding-top: 4px;
  font-weight: 400;
  letter-spacing: 0.1px;
}

/* ─── Rate rows ─────────────────────────────────────────────────────────── */
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
}
.rate-row-left { display: flex; flex-direction: column; gap: 3px; }
.rate-row-label { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: -0.1px; }
.rate-row-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.rate-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.4px;
  font-family: 'JetBrains Mono', monospace;
}
.rate-row-right { display: flex; align-items: center; gap: 8px; }
.rate-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--danger-dim);
  color: var(--danger);
  padding: 3px 8px;
  border-radius: 6px;
}
.row-divider {
  height: 1px;
  background: var(--sep);
  margin: 2px -18px;
}
.update-hint {
  font-size: 12px;
  color: var(--text-4);
  text-align: center;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  width: 100%;
  padding: 0 20px;
  height: 52px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.09s ease, box-shadow 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.977); }
.btn-ico { flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:active {
  background: #0975E6;
  box-shadow: 0 2px 14px rgba(10, 132, 255, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 15px;
  height: 46px;
}
.btn-secondary:active {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.978);
}

.btn-sm {
  width: 100%;
  height: 42px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 13px;
}

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

/* ─── Min row ───────────────────────────────────────────────────────────── */
.min-row {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-dim);
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 10px;
  padding: 8px 13px;
}
.min-label { font-size: 12px; color: var(--text-3); font-weight: 400; }
.min-val { font-size: 13px; font-weight: 600; color: var(--accent); font-family: 'JetBrains Mono', monospace; }

/* ─── Toggle row ────────────────────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-label { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: -0.1px; }
.toggle-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.req-user-tag { color: var(--text-3); font-weight: 400; font-size: 13px; }

/* ─── Toggle switch (iOS exact) ─────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-track {
  display: block;
  width: 51px;
  height: 31px;
  background: rgba(120, 120, 128, 0.28);
  border-radius: 15.5px;
  position: relative;
  transition: background 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.22),
    0 1px 3px rgba(0, 0, 0, 0.10);
  transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.toggle input:checked ~ .toggle-track {
  background: var(--success);
}
.toggle input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

/* ─── Form inputs ───────────────────────────────────────────────────────── */
.form-grid { display: flex; flex-direction: column; gap: 11px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.1px;
}
.form-inp {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  padding: 0 14px;
  height: 48px;
  outline: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  -webkit-appearance: none;
}
.form-inp:focus {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3.5px rgba(10, 132, 255, 0.14);
}
.form-inp::placeholder { color: var(--text-4); }
.form-opt { color: var(--text-4); font-weight: 400; font-size: 11px; }

/* ─── Terms / accordion ─────────────────────────────────────────────────── */
.terms-block {
  background: #1C2028;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.terms-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  user-select: none;
  transition: background 0.14s;
}
.terms-hd:active { background: rgba(255, 255, 255, 0.04); }
.chevron-ico {
  color: var(--text-3);
  transition: transform 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0;
}
.terms-block.open .chevron-ico { transform: rotate(180deg); }
.terms-body {
  display: none;
  padding: 0 15px 15px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.65;
  border-top: 1px solid var(--sep);
  padding-top: 12px;
}
.terms-block.open .terms-body { display: block; }

/* ─── Checkbox ──────────────────────────────────────────────────────────── */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
  padding: 3px 0;
  -webkit-tap-highlight-color: transparent;
}
.checkbox-row input[type="checkbox"] { display: none; }
.checkmark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.checkmark svg { display: none; }
.checkbox-row input:checked ~ .checkmark {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(10, 132, 255, 0.30);
}
.checkbox-row input:checked ~ .checkmark svg { display: block; }
.checkbox-text { font-size: 14px; color: var(--text-2); font-weight: 400; line-height: 1.4; }

/* ─── Radio options ─────────────────────────────────────────────────────── */
.radio-group { display: flex; flex-direction: column; gap: 9px; }
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.09s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.radio-option:active { transform: scale(0.985); }
.radio-option input[type="radio"] { display: none; }
.radio-option.selected {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: border-color 0.18s;
}
.radio-option.selected .radio-dot { border-color: var(--accent); }
.radio-option.selected .radio-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.radio-cnt { display: flex; flex-direction: column; gap: 3px; }
.radio-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.1px;
}
.radio-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ─── History ───────────────────────────────────────────────────────────── */
.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  transition: opacity 0.12s;
}
.order-item:active { opacity: 0.72; }
.order-item + .order-item {
  border-top: 0.5px solid var(--sep);
}
.order-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.order-icon-completed  { background: var(--success-dim); }
.order-icon-cancelled  { background: rgba(255, 255, 255, 0.06); }
.order-icon-processing { background: var(--warning-dim); }
.order-icon-disputed   { background: var(--danger-dim); }
.order-icon-searching  { background: var(--accent-dim); }

.order-left { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.order-id {
  font-size: 11px;
  color: var(--text-4);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.2px;
}
.order-amount {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-date { font-size: 12px; color: var(--text-3); font-weight: 400; }

.status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 8px;
  border: none;
  flex-shrink: 0;
  letter-spacing: 0.1px;
}
.status-completed  { background: var(--success-dim); color: var(--success); }
.status-searching  { background: var(--accent-dim);  color: var(--accent); }
.status-processing { background: var(--warning-dim); color: var(--warning); }
.status-disputed   { background: var(--danger-dim);  color: var(--danger); }
.status-cancelled  { background: rgba(255,255,255,0.07); color: var(--text-3); }

/* ─── Profile ───────────────────────────────────────────────────────────── */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 18px;
}
.profile-avatar-wrap {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  box-shadow: 0 4px 20px rgba(10, 132, 255, 0.28);
}
.profile-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
}
.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.profile-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.profile-name-block { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.profile-fullname {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-username { font-size: 14px; color: var(--accent); font-weight: 500; }
.profile-id {
  font-size: 12px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}

.profile-stats-row {
  display: flex;
  align-items: stretch;
  padding: 4px 0 8px;
}
.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}
.profile-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.5px;
}
.profile-stat-lbl {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.2px;
}
.profile-stat-divider {
  width: 0.5px;
  background: var(--border-2);
  flex-shrink: 0;
  margin: 4px 0;
}

.profile-loyalty-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-loyalty-icon {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255, 200, 0, 0.30));
}
.profile-loyalty-name { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.profile-loyalty-bonus { font-size: 13px; color: var(--accent); font-weight: 500; }

.progress-wrap { display: flex; flex-direction: column; gap: 9px; }
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--r-pill);
  overflow: visible;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #34C9FF);
  border-radius: var(--r-pill);
  transition: width 1.1s cubic-bezier(0.34, 1.0, 0.64, 1.0);
  box-shadow: 0 0 10px rgba(10, 132, 255, 0.45);
  position: relative;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
}
.prog-cur { color: var(--accent); }
.prog-next { color: var(--text-3); }

/* ─── Loading / Skeleton / Empty ────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 52px 20px;
  color: var(--text-3);
  font-size: 14px;
}
.spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid rgba(255, 255, 255, 0.07);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: 8px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 20px 24px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 400;
}
.empty .emoji {
  font-size: 44px;
  line-height: 1;
  filter: grayscale(0.3);
  margin-bottom: 4px;
}
.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -0.2px;
}
.empty-sub {
  font-size: 14px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
  max-width: 220px;
}
.loading { padding: 44px 20px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ─── Bottom navigation ─────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.32);
  transition: color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.nav-item.active { color: var(--accent); }

.nav-ico {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
}
.nav-item:active .nav-ico { transform: scale(0.83); }
.nav-item.active .nav-ico { transform: scale(1.0); }

.nav-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Center deals button */
.nav-center-btn { position: relative; }
.nav-center-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(10, 132, 255, 0.44);
  margin-top: -16px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
}
.nav-center-btn:active .nav-center-disc {
  transform: scale(0.90);
  box-shadow: 0 3px 12px rgba(10, 132, 255, 0.30);
}
.nav-center-btn .nav-ico { display: none; }
.nav-center-btn .nav-lbl { margin-top: 4px; color: rgba(255,255,255,0.32); }
.nav-center-btn.active .nav-lbl { color: var(--accent); }
.nav-center-btn.active .nav-center-disc {
  box-shadow: 0 8px 28px rgba(10, 132, 255, 0.55);
}

/* ─── Misc ──────────────────────────────────────────────────────────────── */
.update-time { font-size: 11px; color: var(--text-4); text-align: right; }
.cur-toggle { display: none; }

/* ─── Requisite list ────────────────────────────────────────────────────── */
.req-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--separator);
}
.req-item:last-child { border-bottom: none; }
.req-item-active { background: none; }
.req-item-info { flex: 1; min-width: 0; }
.req-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.req-item-phone { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.req-badge-active {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
  background: rgba(48, 209, 88, 0.12);
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: 0.2px;
}
.req-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-req-action {
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-req-action:active { opacity: 0.7; }
.btn-req-select { background: rgba(10, 132, 255, 0.15); color: var(--accent); }
.btn-req-delete { background: rgba(255, 69, 58, 0.12); color: var(--danger); }

/* ─── Referral card ─────────────────────────────────────────────────────── */
.ref-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 4px 0 10px;
}
.ref-stat { flex: 1; text-align: center; }
.ref-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.5px;
}
.ref-stat-lbl { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ref-bonus-hint {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 12px;
}
.ref-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-inner, rgba(255,255,255,0.05));
  border-radius: 10px;
  padding: 9px 12px;
}
.ref-link-text {
  flex: 1;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
}
.ref-copy-btn { flex-shrink: 0; }
