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

:root {
  --bg:          #060e1c;
  --surface:     #0d1b30;
  --surface-2:   #132540;
  --border:      #1e3554;
  --text:        #e8f1ff;
  --text-2:      #7a9abf;
  --text-3:      #3a5878;
  --green:       #4f8ef0;
  --green-dim:   rgba(79, 142, 240, 0.14);
  --blue:        #6ab0f5;
  --orange:      #e09030;
  --red:         #e04848;
  --icon-green:  #0d2245;
  --icon-blue:   #0a1e3d;
  --icon-red:    #3d1a1a;
  --icon-orange: #3d2a10;
  --grad-btn:    linear-gradient(135deg, #4f8ef0 0%, #1d56c7 100%);
  --glow-btn:    0 4px 16px rgba(79, 142, 240, 0.35);
  --glow-input:  0 0 0 3px rgba(79, 142, 240, 0.18);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  overflow-x: hidden;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, rgba(79,142,240,0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--icon-blue);
  border: 1px solid rgba(79,142,240,0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}

.profile-info { flex: 1; min-width: 0; }

.profile-name {
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.profile-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── Stats strip ───────────────────────────────────────────────────────────── */
.stats-strip {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.stat-block { flex: 1; text-align: center; padding: 13px 8px; }

.stat-num {
  font-size: 15px; font-weight: 700;
  color: var(--green);
  letter-spacing: -0.3px;
}

.stat-lbl {
  font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-top: 3px;
}

.stat-sep { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }

/* ── Divider (legacy) ──────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }

/* ── Card list (home) ──────────────────────────────────────────────────────── */
.card-list {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 14px 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.14s, box-shadow 0.14s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  user-select: none;
}

.card-item:active { background: var(--surface-2); box-shadow: none; }

.card-stripe {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}

.stripe-blue   { background: #4f8ef0; }
.stripe-green  { background: #3bc45c; }
.stripe-red    { background: #e04848; }
.stripe-orange { background: #e09030; }
.stripe-purple { background: #a78bfa; }

.card-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-body { flex: 1; min-width: 0; }
.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.card-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Legacy menu (kept for compatibility) ──────────────────────────────────── */
.menu-list { padding: 4px 0 0; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  user-select: none;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:active     { background: var(--surface); }

.menu-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-green  { background: var(--icon-green); }
.icon-blue   { background: var(--icon-blue); }
.icon-red    { background: var(--icon-red); }
.icon-orange { background: var(--icon-orange); }

.menu-content { flex: 1; min-width: 0; }
.menu-title { font-size: 15px; font-weight: 500; }
.menu-subtitle { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.menu-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.arrow-icon { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-available { background: var(--green-dim); color: var(--green); border: 1px solid rgba(79,142,240,0.35); }
.badge-pending   { background: #b06800; color: #fff; }
.badge-free      { background: #1e6b3a; color: #fff; }
.badge-accepted  { background: #1e6b3a; color: #fff; }
.badge-rejected  { background: #9b2525; color: #fff; }
.badge-used      { background: #9b2525; color: #fff; }
.badge-frozen    { background: #9b2525; color: #fff; }
.badge-revoked   { background: #9b2525; color: #fff; }
.badge-spam      { background: #9b2525; color: #fff; }
.badge-timer     { background: #b06800; color: #fff; font-family: monospace; letter-spacing: 0; }
.badge-checking     { background: #444; color: #fff; }
.badge-transferred  { background: #1a4a7a; color: #a8d4ff; border: 1px solid #2a6ab0; }

/* ── Version ───────────────────────────────────────────────────────────────── */
.version {
  text-align: center; color: var(--text-3);
  font-size: 12px; padding: 20px 16px 28px;
  margin-top: auto;
}

/* ── Search + filter ───────────────────────────────────────────────────────── */
.search-row {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--text); font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus        { border-color: var(--green); box-shadow: var(--glow-input); }
.search-input::placeholder { color: var(--text-3); }

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.filter-btn:active { border-color: var(--green); }

/* ── Tabs — pill style ─────────────────────────────────────────────────────── */
.tabs-wrap {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}

.tabs {
  display: flex;
  background: var(--surface);
  border-radius: 10px;
  padding: 3px; gap: 2px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
  position: relative;
}

.tab.active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.tab.active::after { display: none; }

/* ── Account list ──────────────────────────────────────────────────────────── */
.account-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-item {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s;
}

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

.account-info { flex: 1; min-width: 0; }
.account-phone { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.account-amount { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.account-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.btn-recheck-sm {
  margin-top: 8px;
  padding: 6px 12px;
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-recheck-sm:active   { opacity: 0.75; }
.btn-recheck-sm:disabled { opacity: 0.5; cursor: not-allowed; }

.account-meta {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
  flex-shrink: 0; margin-left: 12px;
}

.account-date { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.account-arrow { width: 16px; height: 16px; color: var(--text-3); }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2); font-size: 15px;
}

.empty-state-icon { font-size: 42px; margin-bottom: 12px; }

/* ── Fixed bottom button ───────────────────────────────────────────────────── */
.bottom-btn-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 10px 16px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--grad-btn);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  font-family: inherit;
  box-shadow: var(--glow-btn);
}

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

.btn-secondary {
  width: 100%;
  padding: 13px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
  margin-top: 10px;
}

.btn-secondary:active { opacity: 0.75; }

/* ── Step dots ─────────────────────────────────────────────────────────────── */
.step-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 8px;
  gap: 6px;
}

.step-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-dot.active { width: 22px; border-radius: 3.5px; background: var(--green); }
.step-dot.done   { background: rgba(79, 142, 240, 0.35); }

/* ── Sell flow ─────────────────────────────────────────────────────────────── */
.sell-container { padding: 16px 16px 24px; flex: 1; }

.sell-step        { display: none; }
.sell-step.active { display: block; }

.step-title {
  font-size: 20px; font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.step-desc {
  font-size: 14px; color: var(--text-2);
  margin-bottom: 26px; line-height: 1.6;
}

.step-desc strong { color: var(--text); }

/* ── Form elements ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px; color: var(--text-2);
  margin-bottom: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text); font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus        { border-color: var(--green); box-shadow: var(--glow-input); }
.form-input::placeholder { color: var(--text-3); }

.form-input[type=number]::-webkit-inner-spin-button,
.form-input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.form-input[type=number] { -moz-appearance: textfield; }

.error-msg {
  color: var(--red); font-size: 13px;
  margin-top: 8px; margin-bottom: 12px;
  display: none; line-height: 1.5;
}

.error-msg.show { display: block; }

.info-text { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }

/* ── Result card ───────────────────────────────────────────────────────────── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.result-icon  { font-size: 52px; margin-bottom: 14px; }

.result-title {
  font-size: 20px; font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.result-detail { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.result-detail strong { color: var(--text); }

/* ── Checks grid ───────────────────────────────────────────────────────────── */
.checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 16px; text-align: left;
}

.check-item {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px; font-size: 12px;
}

.check-item .ci-label { color: var(--text-2); margin-bottom: 2px; }
.check-item .ci-val   { font-weight: 600; }
.ci-ok   { color: var(--green); }
.ci-fail { color: var(--red); }

/* ── Note bottom sheet ─────────────────────────────────────────────────────── */
.note-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
}
.note-backdrop.open { display: block; }

.note-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 32px;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.note-sheet.open { transform: translateY(0); }

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

.note-sheet-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}

.note-sheet-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 48px;
}

/* ── Recheck box ───────────────────────────────────────────────────────────── */
.recheck-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.recheck-msg {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
}

.recheck-msg strong { color: var(--text); }

.recheck-timer {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.btn-recheck {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.btn-recheck:active   { opacity: 0.75; }
.btn-recheck:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Withdraw ──────────────────────────────────────────────────────────────── */
.withdraw-container { padding: 16px; flex: 1; }

.balance-card {
  background: linear-gradient(135deg, #091628 0%, #0f2244 100%);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid rgba(79, 142, 240, 0.3);
  box-shadow: 0 0 24px rgba(79, 142, 240, 0.08);
  position: relative;
}

.history-icon-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(79, 142, 240, 0.15);
  border: 1px solid rgba(79, 142, 240, 0.3);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #4f8ef0;
  cursor: pointer;
  transition: background .2s;
}
.history-icon-btn:active { background: rgba(79, 142, 240, 0.3); }

/* ── History bottom sheet ───────────────────────────────────────────────────── */
.history-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 900;
}
.history-overlay.open { display: block; }

.history-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #0d1b2e;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(79,142,240,.25);
  z-index: 901;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  max-height: 78vh;
  display: flex; flex-direction: column;
}
.history-sheet.open { transform: translateY(0); }

.history-sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,.18);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.history-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.history-sheet-title { font-size: 15px; font-weight: 700; color: var(--text); }
.history-sheet-close {
  background: none; border: none;
  color: var(--text-2); font-size: 18px; cursor: pointer; padding: 2px 6px;
}

.history-list {
  overflow-y: auto;
  flex: 1;
  padding: 10px 14px 24px;
}

.history-loading, .history-empty {
  text-align: center; color: var(--text-2);
  padding: 32px 0; font-size: 14px;
}

.history-item {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.history-item-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.history-item-icon.sent     { background: rgba(34,197,94,.15); }
.history-item-icon.pending  { background: rgba(234,179,8,.12); }
.history-item-icon.rejected { background: rgba(239,68,68,.12); }

.history-item-body { flex: 1; min-width: 0; }
.history-item-row1 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 3px;
}
.history-item-amount { font-size: 15px; font-weight: 700; color: #e2e8f0; }
.history-item-status {
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  padding: 2px 8px; border-radius: 20px;
}
.history-item-status.sent     { background: rgba(34,197,94,.18); color: #4ade80; }
.history-item-status.pending  { background: rgba(234,179,8,.18); color: #facc15; }
.history-item-status.rejected { background: rgba(239,68,68,.18); color: #f87171; }

.history-item-method { font-size: 12px; color: var(--text-2); }
.history-item-date   { font-size: 11px; color: var(--text-3, #4a6080); margin-top: 2px; }

.balance-label {
  font-size: 12px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.balance-amount {
  font-size: 38px; font-weight: 700;
  color: var(--green);
  letter-spacing: -1.5px;
}

.balance-unit {
  font-size: 13px; color: var(--text-2);
  margin-top: 4px; font-weight: 500;
}

.section-label {
  font-size: 12px; color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.method-buttons { display: flex; gap: 10px; margin-bottom: 22px; }

.method-btn {
  flex: 1;
  padding: 12px 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-2); font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  text-align: center; line-height: 1.4;
}

.method-btn.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

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

/* ── Leader Card name check row ─────────────────────────────────────────────── */
.lc-name-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.lc-name-row .form-input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-card-check {
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--green-dim);
  border: 1px solid var(--green);
  border-radius: 12px;
  color: var(--green);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.18s;
}

.btn-card-check:active   { opacity: 0.75; }
.btn-card-check:disabled { opacity: 0.4; cursor: not-allowed; }

.lc-check-result {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 18px;
}

.lc-valid   { color: #4ade80; }
.lc-invalid { color: var(--red); }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px; z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  backdrop-filter: blur(8px);
}

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

/* ── Loading overlay ───────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(6, 14, 28, 0.80);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9998;
}

.loading-overlay.show { display: flex; }

.spinner {
  width: 42px; height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* ── Loading placeholder ───────────────────────────────────────────────────── */
.loading-placeholder {
  text-align: center; padding: 50px 20px;
  color: var(--text-2); font-size: 14px;
}

/* ── Page entrance animation ───────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

#app { animation: fadeInUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ── Shimmer skeleton animation ────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--surface) 25%,
    var(--surface-2) 50%,
    var(--surface) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
  display: inline-block;
}

.skeleton-text    { height: 14px; width: 120px; }
.skeleton-num     { height: 20px; width: 70px; margin: 0 auto 4px; }
.skeleton-avatar  { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.skeleton-lbl     { height: 10px; width: 40px; margin: 0 auto; }

/* ── Card stagger animation ────────────────────────────────────────────────── */
.card-list .card-item {
  animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card-list .card-item:nth-child(1) { animation-delay: 0.05s; }
.card-list .card-item:nth-child(2) { animation-delay: 0.10s; }
.card-list .card-item:nth-child(3) { animation-delay: 0.15s; }
.card-list .card-item:nth-child(4) { animation-delay: 0.20s; }
.card-list .card-item:nth-child(5) { animation-delay: 0.25s; }

/* ── Spinner improvement ───────────────────────────────────────────────────── */
.spinner {
  width: 42px; height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.65s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 16px rgba(79, 142, 240, 0.18);
}

/* ── Avatar with photo ─────────────────────────────────────────────────────── */
.avatar img {
  width: 100%; height: 100%;
  border-radius: 11px;
  object-fit: cover;
}

/* ── Profile badge row ─────────────────────────────────────────────────────── */
.profile-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.profile-badge {
  font-size: 10px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  letter-spacing: 0;
}

/* ── Countries accordion (sell page) ──────────────────────────────────────── */
.countries-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
}

.countries-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  user-select: none;
  transition: color 0.15s;
}

.countries-toggle:active { color: var(--text); }

.countries-chevron {
  flex-shrink: 0;
  color: var(--text-3);
  transition: transform 0.22s ease;
}

.countries-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.countries-loading,
.countries-empty {
  padding: 10px 14px 14px;
  font-size: 13px;
  color: var(--text-3);
}

.countries-list { padding: 0 10px 10px; }

.country-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.country-row:last-child { border-bottom: none; }
.country-row.country-full { opacity: 0.55; }

.country-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.country-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-prefix {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

.country-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.country-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.country-slots {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.slots-ok   { background: rgba(59,196,92,0.15); color: #3bc45c; }
.slots-full { background: rgba(224,72,72,0.15);  color: var(--red); }
