/* =========================
   VirtualSIM Dark UI v2
   Simple • Modern • Clean
   ========================= */

:root {
  --bg0: #0b0f19;
  --bg1: #0f172a;
  --card: rgba(15, 23, 42, 0.72);
  --card2: rgba(15, 23, 42, 0.9);
  --border: rgba(148, 163, 184, 0.14);
  --border2: rgba(96, 165, 250, 0.22);

  --text: #e5e7eb;
  --muted: rgba(226, 232, 240, 0.62);

  --primary: #60a5fa;
  --primary2: #3b82f6;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow2: 0 8px 30px rgba(59, 130, 246, 0.12);

  --radius: 16px;
  --radius2: 12px;

  --ring: 0 0 0 4px rgba(96, 165, 250, 0.18);

  --container: 1220px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(1000px 500px at 90% 10%, rgba(34, 197, 94, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
  min-height: 100vh;
}

/* Subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
  opacity: 0.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.muted {
  color: var(--muted);
}

.error {
  color: #fca5a5;
}

.status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.35);
}

.status.error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

/* =========================
   Topbar / Tabs
   ========================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 14px;
  color: #bfdbfe;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.tabs {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.tab {
  color: rgba(226, 232, 240, 0.7);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: 0.18s ease;
}

.tab:hover {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.14);
}

.tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.32), rgba(59, 130, 246, 0.18));
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow: var(--shadow2);
}

.balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #bfdbfe;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: rgba(59, 130, 246, 0.12);
  white-space: nowrap;
}

/* =========================
   Layout / Cards
   ========================= */

.container {
  max-width: var(--container);
  margin: 22px auto 60px;
  padding: 0 20px;
  display: grid;
  gap: 16px;
}

.container.compact {
  max-width: 1320px;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card.hero {
  padding: 22px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.3px;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 10px 0 0;
}

.receive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-header h1,
.compact-header h2 {
  font-size: 16px;
}

/* =========================
   Buttons
   ========================= */

.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: 0.18s ease;
  background: rgba(148, 163, 184, 0.1);
  color: #e5e7eb;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(148, 163, 184, 0.14);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

#topupSubmitBtn:disabled {
  opacity: 1;
  background: rgba(2, 6, 23, 0.25);
  border-color: rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.5);
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(96, 165, 250, 1), rgba(59, 130, 246, 1));
  color: #06101f;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

.btn.primary:hover {
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.33);
}

.btn.ghost {
  background: rgba(2, 6, 23, 0.25);
  border-color: rgba(148, 163, 184, 0.14);
}

.btn.is-active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(59, 130, 246, 0.4));
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
}

.btn.is-active:hover {
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.25);
}

.btn.full {
  width: 100%;
}

/* =========================
   Footer
   ========================= */

footer {
  background: var(--bg0);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: auto;
}

.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(226, 232, 240, 0.7);
  text-decoration: none;
  font-size: 13px;
  transition: 0.18s ease;
  min-height: auto;
  padding: 6px 0;
  border-radius: 0;
}

.footer-links a:hover {
  color: #60a5fa;
  background: none;
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.5);
  width: 100%;
}

/* =========================
   Topup page styles
   ========================= */

.topup-content {
  margin-top: 20px;
}

.payment-methods-block {
  margin-bottom: 28px;
}

.payment-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.78);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-method {
  position: relative;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1.5px solid rgba(148, 163, 184, 0.16);
  transition: 0.2s ease;
}

.payment-method:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(15, 23, 42, 0.58);
  transform: translateY(-2px);
}

.payment-method.is-active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), rgba(59, 130, 246, 0.28));
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.15);
}

.topup-form {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 24px;
  margin-top: 0;
}

.topup-amount-block {
  display: grid;
  gap: 12px;
}

.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.45);
  border: 1.5px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  padding: 0 14px;
  transition: 0.18s ease;
  height: 48px;
}

.amount-input-wrapper:focus-within {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(2, 6, 23, 0.6);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.amount-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: none !important;
  border-radius: 0;
}

.amount-input-wrapper input::placeholder {
  color: rgba(226, 232, 240, 0.35);
}

.amount-currency {
  color: rgba(226, 232, 240, 0.62);
  font-weight: 700;
  font-size: 13px;
  margin-left: 8px;
  padding-left: 8px;
}

@media (max-width: 768px) {
  .payment-methods {
    grid-template-columns: 1fr 1fr !important;
  }

  .topup-form {
    padding: 18px;
  }

  .amount-input-wrapper {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .payment-methods {
    grid-template-columns: 1fr !important;
  }

  .topup-form {
    padding: 16px;
  }

  .btn.primary {
    font-size: 14px;
  }
}

/* Crypto providers */
#cryptoProviders {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

#cryptoProviders[style*="display: none"] {
  display: none !important;
}

.crypto-provider-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: 0.2s ease;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.crypto-provider-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.crypto-provider-btn:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(15, 23, 42, 0.68);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.crypto-provider-btn:hover::before {
  opacity: 1;
}

.crypto-provider-btn.is-active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.4), rgba(59, 130, 246, 0.3));
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.22), inset 0 0 20px rgba(96, 165, 250, 0.08);
  color: #ffffff;
  font-weight: 900;
}

.crypto-provider-btn img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}

.crypto-provider-btn:hover img {
  transform: scale(1.08);
}

.crypto-provider-btn:active {
  transform: translateY(-1px);
}

.rub-provider-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: 0.2s ease;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.rub-provider-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.rub-provider-btn:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(15, 23, 42, 0.68);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.rub-provider-btn:hover::before {
  opacity: 1;
}

.rub-provider-btn.is-active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.4), rgba(59, 130, 246, 0.3));
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.22), inset 0 0 20px rgba(96, 165, 250, 0.08);
  color: #ffffff;
  font-weight: 900;
}

.rub-provider-btn span {
  display: block;
}

.rub-provider-btn:active {
  transform: translateY(-1px);
}

.rub-provider-btn img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}

.rub-provider-btn:hover img {
  transform: scale(1.08);
}

/* =========================
   Empty illustrations
   ========================= */

.empty-illustration {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 180px;
  padding: 24px;
  text-align: center;
  color: rgba(226, 232, 240, 0.62);
}

.empty-ill-icon {
  font-size: 48px;
  line-height: 1;
}

.empty-ill-title {
  font-size: 16px;
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.empty-illustration .muted {
  max-width: 300px;
  line-height: 1.45;
  font-size: 14px;
}

/* =========================
   Inputs
   ========================= */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.75);
}

input,
select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.35);
  color: var(--text);
  transition: 0.18s ease;
  outline: none;
}

input::placeholder {
  color: rgba(226, 232, 240, 0.35);
}

input:focus,
select:focus {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: var(--ring);
  background: rgba(2, 6, 23, 0.55);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 12px;
}

/* =========================
   Receive page layout
   ========================= */

.receive-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  align-items: stretch;
}

.receive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.selection-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.25);
}

.selection-row .label {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.5);
}

.selection-row .value {
  font-weight: 800;
  color: rgba(226, 232, 240, 0.92);
  margin-top: 2px;
}

/* =========================
   Panels (lists)
   ========================= */

.panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.25);
  overflow: hidden;
  height: 600px;
  display: flex;
  flex-direction: column;
}

.panel-search,
.panel-controls {
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.2);
}

.panel-search input {
  width: 100%;
  height: 40px;
}

.list {
  flex: 1;
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
  grid-auto-rows: max-content;
  align-content: flex-start;
}

.list-loading {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  color: rgba(226, 232, 240, 0.6);
}

.loading-block {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 160px;
  color: rgba(226, 232, 240, 0.6);
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.18);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.list::-webkit-scrollbar {
  width: 10px;
}
.list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  border: 3px solid rgba(2, 6, 23, 0.2);
}
.list::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.2);
}

/* =========================
   Tiles (services/countries)
   ========================= */

.list .tile {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.38);
  cursor: pointer;
  transition: 0.16s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  height: 44px;
}

.list .tile:hover {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(15, 23, 42, 0.55);
  transform: translateY(-1px);
}

.list .tile.active {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(59, 130, 246, 0.14));
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.14);
}

.list .tile .price {
  font-weight: 900;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.95);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.28);
}

/* =========================
   Operations / cards
   ========================= */

.stack {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.operation-card {
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.operation-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.operation-service {
  font-weight: 900;
  font-size: 14px;
}

.operation-number {
  font-size: 16px;
  font-weight: 900;
  color: #bfdbfe;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  background: rgba(59, 130, 246, 0.10);
  color: #bfdbfe;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.16s ease;
}

.icon-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
  font-size: 18px;
  cursor: pointer;
  transition: 0.16s ease;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.14);
  transform: translateY(-1px);
}

.operation-timer {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}

.timer-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 16px;
  font-weight: 900;
  color: #fca5a5;
  letter-spacing: 0.8px;
}

/* SMS list */
.sms-block {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 12px;
}

.sms-list {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 8px;
}

.sms-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.copy-sms {
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: #bfdbfe;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  transition: 0.16s ease;
}

.copy-sms:hover {
  background: rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

/* Empty state */
.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.22);
}

.empty-icon {
  font-size: 30px;
  opacity: 0.9;
}

.empty-title {
  font-weight: 900;
  margin-top: 8px;
}

/* =========================
   Auth page
   ========================= */

.auth-page {
  background:
    radial-gradient(900px 480px at 50% 0%, rgba(59, 130, 246, 0.26), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.auth-container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-card {
  width: min(430px, 92vw);
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-header {
  display: grid;
  gap: 10px;
}

.auth-logo {
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #bfdbfe;
  text-transform: uppercase;
  font-size: 14px;
  display: inline-flex;
  width: fit-content;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.link-button {
  background: transparent;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  font-weight: 900;
  padding: 0;
}

.link-button:hover {
  color: #bfdbfe;
}

/* =========================
   Home hero
   ========================= */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
}

.hero-card {
  background: rgba(2, 6, 23, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

/* Notifications container already created in JS; make them prettier */
#notificationContainer > div {
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  box-shadow: var(--shadow) !important;
}

/* Animations for notifications (JS uses slideIn/out) */
@keyframes slideIn {
  from {
    transform: translateX(420px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(420px);
    opacity: 0;
  }
}

/* Utility */
.is-hidden {
  display: none;
}

/* Responsive */
@media (max-width: 900px) {
  .receive-layout {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .balance {
    align-self: flex-start;
  }

  .receive-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Profile / History UI blocks
   ========================= */

.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.14);
  margin: 14px 0;
}

.divider.soft {
  background: rgba(148, 163, 184, 0.10);
}

.profile-card {
  padding: 20px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.85);
  font-weight: 800;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-success {
  background: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.profile-block {
  background: rgba(2, 6, 23, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 14px;
}

.block-title {
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.kv-grid {
  display: grid;
  gap: 10px;
}

.kv {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.38);
}

.kv-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
}

.kv-value {
  margin-top: 6px;
  font-weight: 900;
  color: rgba(226, 232, 240, 0.95);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.22);
}

.pill-success {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.10);
  color: rgba(187, 247, 208, 0.95);
}

.profile-actions {
  display: flex;
  justify-content: flex-start;
}

.stat-grid {
  display: grid;
  gap: 10px;
}

.stat-tile {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.38);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.stat-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
  font-weight: 700;
}

.stat-value {
  margin-top: 4px;
  font-weight: 950;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.hint-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.18);
}

.hint-title {
  font-weight: 900;
  margin-bottom: 6px;
}

/* History */
.loading-block {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
}

.sms-history {
  display: grid;
  gap: 10px;
}

.sms-item {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.22);
  padding: 12px;
}

.sms-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.sms-meta {
  display: grid;
  gap: 4px;
}

.sms-title {
  font-weight: 950;
  letter-spacing: -0.2px;
}

.sms-sub {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
}

.sms-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-weight: 950;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: rgba(59, 130, 246, 0.10);
  color: #bfdbfe;
  max-width: 50%;
  word-break: break-word;
}

.sms-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.4;
  word-break: break-word;
}

.empty-illustration {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.18);
  min-height: 220px;
}

.empty-ill-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.empty-ill-title {
  font-weight: 950;
  font-size: 16px;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================
   PROFILE – clean layout
   ========================= */

.profile-card {
  padding: 20px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.profile-col {
  display: grid;
  gap: 14px;
}

.profile-block {
  background: rgba(2, 6, 23, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 16px;
}

.block-title {
  font-weight: 950;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.85);
  font-weight: 800;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-success {
  background: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.kv-grid {
  display: grid;
  gap: 10px;
}

.kv {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.38);
}

.kv-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
}

.kv-value {
  margin-top: 6px;
  font-weight: 950;
  color: rgba(226, 232, 240, 0.95);
  line-height: 1.2;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.22);
}

.pill-success {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.10);
  color: rgba(187, 247, 208, 0.95);
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
}

.stat-grid {
  display: grid;
  gap: 10px;
}

.stat-tile {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.38);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.stat-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.55);
  font-weight: 800;
}

.stat-value {
  margin-top: 4px;
  font-weight: 950;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.hint-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.18);
}

.hint-title {
  font-weight: 950;
  margin-bottom: 6px;
}

.profile-danger {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.danger-title {
  color: #fecaca;
}

.btn.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 1), rgba(220, 38, 38, 1));
  color: #1b0a0a;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.22);
}

.btn.danger:hover {
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.28);
}

@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    justify-content: stretch;
  }
  .profile-actions .btn {
    width: 100%;
  }
}


#authStatus {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.35;
}

#authStatus.is-error {
  color: #c62828;
}

#authStatus.is-ok {
  color: #2e7d32;
}

/* =========================
   MOBILE OPTIMIZATION
   ========================= */

/* =========================
   RESPONSIVE MOBILE - BEAUTIFULLY REDESIGNED
   Mobile-First: 768px and below
   Small phones: 480px and below
   ========================= */

@media (max-width: 768px) {
  :root {
    --radius: 14px;
    --container: 100%;
  }

  /* === BASE STYLES === */
  body {
    font-size: 15px;
  }

  .container {
    margin: 12px auto 50px;
    padding: 0 12px;
    gap: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .card.hero {
    padding: 16px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  h2 {
    font-size: 17px;
  }

  h3 {
    font-size: 15px;
  }

  /* === TOPBAR - STICKY & COMPACT === */
  .topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    flex-wrap: nowrap;
    min-height: 48px;
  }

  .brand {
    padding: 5px 7px;
    font-size: 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    font-weight: 800;
  }

  .tabs {
    display: flex;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
    margin: 0;
    list-style: none;
    flex-wrap: nowrap;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 5px 9px;
    font-size: 11px;
    white-space: nowrap;
    border: none;
    background: none;
    color: rgba(226, 232, 240, 0.7);
    border-radius: 6px;
    transition: 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
  }

  .tab:hover {
    background: rgba(148, 163, 184, 0.08);
  }

  .tab.is-active {
    background: rgba(96, 165, 250, 0.2);
    color: #ffffff;
  }

  .balance {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    transition: 0.18s ease;
    border-radius: 8px;
  }

  .balance:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.28);
    color: #ffffff;
  }

  /* === TYPOGRAPHY === */
  .muted {
    font-size: 13px;
  }

  .field {
    font-size: 13px;
    gap: 6px;
  }

  .field label {
    font-weight: 600;
  }

  /* === BUTTONS & INTERACTIVE === */
  .btn {
    padding: 11px 14px;
    min-height: 44px;
    font-size: 14px;
    border-radius: 10px;
    transition: 0.15s ease;
    touch-action: manipulation;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .btn.ghost {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.14);
  }

  .btn.ghost:hover {
    background: rgba(96, 165, 250, 0.12);
  }

  .btn.primary {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  }

  .btn.primary:active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  }

  /* === RECEIVE TAB BUTTONS === */
  .receive-tab-btn {
    flex: 1;
    padding: 10px;
    min-height: 44px;
    border: 2px solid rgba(96, 165, 250, 0.2);
    background: rgba(96, 165, 250, 0.08);
    color: rgba(226, 232, 240, 0.7);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    font-size: 13px;
  }

  .receive-tab-btn:active {
    transform: scale(0.98);
  }

  .receive-tab-btn.is-active {
    border-color: #60a5fa;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.24), rgba(59, 130, 246, 0.16));
    color: white;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
  }

  /* === FORMS === */
  input,
  select {
    padding: 11px 12px;
    min-height: 44px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text);
    transition: 0.2s ease;
  }

  input:focus,
  select:focus {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    outline: none;
  }

  input::placeholder {
    color: rgba(226, 232, 240, 0.4);
  }

  /* === PAYMENT METHODS SECTION === */
  .payment-methods {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .payment-method-btn {
    padding: 12px 8px !important;
    min-height: 80px !important;
    height: auto !important;
    flex: unset !important;
    min-width: unset !important;
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid rgba(96, 165, 250, 0.2);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(59, 130, 246, 0.04));
    transition: 0.2s ease;
  }

  .payment-method-btn:hover {
    border-color: rgba(96, 165, 250, 0.4);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(59, 130, 246, 0.08));
  }

  .payment-method-btn.is-active {
    border-color: #60a5fa;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.24), rgba(59, 130, 246, 0.16));
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
  }

  .payment-method-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(96, 165, 250, 0.1);
  }

  /* === CRYPTO PROVIDERS === */
  #cryptoProviders {
    margin: 12px 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(96, 165, 250, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.12);
  }

  .crypto-provider-btn {
    padding: 12px;
    min-height: 80px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition: 0.2s ease;
  }

  .crypto-provider-btn:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
  }

  .crypto-provider-btn img {
    height: 40px;
    width: auto;
    object-fit: contain;
  }

  .crypto-provider-btn span {
    font-size: 12px;
    font-weight: 600;
  }

  /* === TOPUP FORM === */
  .topup-form {
    display: grid;
    gap: 12px;
  }

  .topup-amount-block {
    display: grid;
    gap: 8px;
  }

  .amount-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.4);
    overflow: hidden;
    transition: 0.2s ease;
  }

  .amount-input-wrapper:focus-within {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(15, 23, 42, 0.6);
  }

  .amount-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 12px;
    min-height: 44px;
    font-size: 16px;
    color: var(--text);
  }

  .amount-input-wrapper input:focus {
    outline: none;
  }

  .amount-currency {
    padding: 0 12px;
    font-weight: 600;
    color: #60a5fa;
    font-size: 13px;
  }

  /* === PAYMENT HISTORY CARDS === */
  .payment-card {
    padding: 12px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(59, 130, 246, 0.04));
    border: 1px solid rgba(96, 165, 250, 0.15);
    margin-bottom: 8px;
    transition: 0.2s ease;
  }

  .payment-card:active {
    transform: scale(0.99);
  }

  .payment-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
  }

  .payment-card-amount {
    display: flex;
    flex-direction: column;
  }

  .payment-card-amount-value {
    font-size: 16px;
    font-weight: 700;
    color: #60a5fa;
  }

  .payment-card-amount-unit {
    font-size: 11px;
    color: var(--muted);
  }

  .payment-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
  }

  .payment-card-status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
  }

  .payment-card-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
  }

  .payment-card-status.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
  }

  .payment-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    padding-top: 8px;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
  }

  .payment-card-method {
    font-size: 12px;
    color: #60a5fa;
    font-weight: 600;
  }

  /* === PANELS & LISTS === */
  .panel {
    height: auto;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
  }

  .list {
    padding: 8px;
    gap: 8px;
  }

  .list .tile {
    min-height: 44px;
    height: auto;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
    transition: 0.15s ease;
  }

  .list .tile:active {
    transform: scale(0.98);
  }

  .list .tile .price {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* === OPERATION CARDS === */
  .operation-card {
    padding: 10px;
    gap: 8px;
    border-radius: 10px;
  }

  .operation-head {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  .operation-service {
    font-size: 12px;
  }

  .operation-number {
    font-size: 13px;
  }

  .operation-timer {
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 6px;
  }

  .timer-text {
    font-size: 13px;
  }

  .close-btn,
  .icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 15px;
    border-radius: 8px;
  }

  /* === AUTH FORMS === */
  .auth-container {
    padding: 12px;
  }

  .auth-card {
    width: 100%;
    padding: 18px;
    border-radius: 14px;
  }

  .auth-logo {
    padding: 6px 8px;
    font-size: 12px;
  }

  .auth-form {
    gap: 12px;
    margin-top: 12px;
  }

  .auth-footer {
    gap: 8px;
    margin-top: 12px;
  }

  .link-button {
    font-size: 13px;
    color: #60a5fa;
  }

  /* === PROFILE SECTION === */
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-block {
    padding: 12px;
    gap: 8px;
    border-radius: 10px;
  }

  .block-title {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
  }

  .kv {
    padding: 8px;
    border-radius: 8px;
  }

  .kv-label {
    font-size: 11px;
    color: var(--muted);
  }

  .kv-value {
    font-size: 13px;
    margin-top: 3px;
    font-weight: 600;
  }

  .stat-tile {
    padding: 12px;
    gap: 8px;
    border-radius: 10px;
    flex: 1;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .stat-label {
    font-size: 10px;
    color: var(--muted);
  }

  .stat-value {
    font-size: 14px;
    margin-top: 2px;
    font-weight: 700;
    color: #60a5fa;
  }

  .profile-badge {
    padding: 7px 10px;
    font-size: 11px;
    gap: 6px;
    border-radius: 8px;
  }

  /* === SMS SECTION === */
  .sms-item {
    padding: 11px;
    border-radius: 10px;
    gap: 8px;
  }

  .sms-head {
    flex-direction: column;
    gap: 6px;
  }

  .sms-meta {
    gap: 6px;
    flex-wrap: wrap;
  }

  .sms-title {
    font-size: 13px;
    font-weight: 600;
  }

  .sms-sub {
    font-size: 11px;
    color: var(--muted);
  }

  .sms-body {
    font-size: 13px;
    margin-top: 8px;
    padding: 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: #e5e7eb;
  }

  .copy-sms {
    width: 100%;
    padding: 8px 10px;
    min-height: 40px;
    font-size: 12px;
    border-radius: 8px;
  }

  /* === HERO SECTION === */
  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-card {
    padding: 12px;
    border-radius: 10px;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }

  /* === EMPTY STATES === */
  .empty-illustration {
    min-height: 160px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .empty-ill-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .empty-ill-title {
    font-size: 13px;
    margin-top: 8px;
    font-weight: 600;
  }

  .empty-ill-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
  }

  .pill {
    padding: 6px 10px;
    font-size: 11px;
    gap: 6px;
    border-radius: 8px;
  }

  .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }

  /* === UTILITIES === */
  .stack {
    gap: 8px;
    margin-top: 8px;
  }

  .selection-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
  }

  .selection-row .label {
    font-size: 11px;
    font-weight: 600;
  }

  .selection-row .value {
    font-size: 13px;
  }

  .form-row {
    gap: 8px;
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
  }

  .form-row input {
    flex: 1;
    min-width: 0;
  }

  .divider {
    margin: 10px 0;
    height: 1px;
    background: rgba(96, 165, 250, 0.1);
    border: none;
  }

  .section-head {
    gap: 8px;
    flex-direction: column;
  }

  p {
    margin: 6px 0 0;
    line-height: 1.5;
  }

  /* === ANIMATIONS === */
  @keyframes slideInUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes slideInDown {
    from {
      transform: translateY(-10px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .card {
    animation: slideInUp 0.3s ease-out;
  }

  /* === TOUCH-FRIENDLY SPACING === */
  button,
  a,
  [role="button"] {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* === PAGINATION === */
  .pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
  }

  .page-btn {
    padding: 6px 10px;
    min-height: 36px;
    font-size: 12px;
    border-radius: 6px;
  }

  /* === RECEIVE LAYOUT === */
  .receive-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .receive-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* === SMALL PHONES (≤ 480px) === */
@media (max-width: 480px) {
  :root {
    --radius: 12px;
    --container: 100%;
  }

  body {
    font-size: 13.5px;
  }

  .container {
    margin: 10px auto 45px;
    padding: 0 10px;
    gap: 10px;
  }

  .card {
    padding: 14px;
    border-radius: 12px;
  }

  h1 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  h2 {
    font-size: 15px;
  }

  h3 {
    font-size: 14px;
  }

  /* === TOPBAR FIX FOR SMALL SCREENS === */
  .topbar {
    padding: 8px 10px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .brand {
    display: none !important;
  }

  .tabs {
    gap: 4px;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: stretch;
    overflow: visible;
  }

  .tab {
    padding: 10px 8px;
    font-size: 12px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .tab[href="/topup"] {
    font-size: 0;
  }

  .tab[href="/topup"]::before {
    content: 'Пополнить';
    font-size: 12px;
  }

  .balance {
    padding: 10px 12px;
    font-size: 13px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: 0.18s ease;
    min-height: 44px;
    border-radius: 8px;
    width: 100%;
  }

  .balance:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.28);
    color: #ffffff;
  }

  /* === BUTTONS === */
  .btn {
    padding: 10px 12px;
    min-height: 42px;
    font-size: 13px;
    border-radius: 9px;
  }

  .receive-tab-btn {
    padding: 9px;
    min-height: 42px;
    font-size: 12px;
    border-radius: 8px;
  }

  input,
  select {
    padding: 10px 11px;
    min-height: 42px;
    font-size: 16px;
    border-radius: 9px;
  }

  .field {
    font-size: 12px;
    gap: 5px;
  }

  /* === PAYMENT METHODS === */
  .payment-methods {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .payment-method-btn {
    padding: 10px 6px !important;
    min-height: 72px !important;
    border-radius: 10px;
    font-size: 10px;
  }

  .payment-method-btn span:first-child {
    font-size: 22px;
  }

  #cryptoProviders {
    margin: 10px 0;
    padding: 10px;
  }

  .crypto-provider-btn {
    padding: 10px;
    min-height: 72px;
    font-size: 12px;
  }

  .crypto-provider-btn img {
    height: 35px;
  }

  /* === FORMS === */
  .amount-input-wrapper {
    display: flex;
    align-items: center;
  }

  .amount-input-wrapper input {
    padding: 10px 10px;
    min-height: 42px;
    font-size: 16px;
  }

  .amount-currency {
    padding: 0 8px;
    font-size: 12px;
  }

  /* === PAYMENT CARDS === */
  .payment-card {
    padding: 10px;
    border-radius: 9px;
    margin-bottom: 6px;
  }

  .payment-card-amount-value {
    font-size: 15px;
  }

  .payment-card-status {
    padding: 4px 8px;
    font-size: 10px;
  }

  .payment-card-meta {
    font-size: 11px;
    padding-top: 6px;
  }

  /* === PROFILE === */
  .profile-layout {
    gap: 8px;
  }

  .profile-block {
    padding: 10px;
    gap: 6px;
  }

  .block-title {
    font-size: 12px;
  }

  .stat-tile {
    padding: 10px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stat-value {
    font-size: 13px;
  }

  /* === SMS === */
  .sms-item {
    padding: 10px;
    border-radius: 9px;
    gap: 6px;
  }

  .sms-title {
    font-size: 12px;
  }

  .sms-sub {
    font-size: 10px;
  }

  .sms-body {
    font-size: 12px;
    padding: 6px;
  }

  .copy-sms {
    padding: 8px;
    min-height: 38px;
    font-size: 11px;
  }

  /* === PANELS === */
  .panel {
    max-height: 300px;
  }

  .list .tile {
    min-height: 42px;
    padding: 8px;
    font-size: 12px;
  }

  .list .tile .price {
    font-size: 10px;
    padding: 3px 6px;
  }

  /* === EMPTY STATES === */
  .empty-illustration {
    min-height: 140px;
    padding: 12px;
  }

  .empty-ill-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .empty-ill-title {
    font-size: 12px;
    margin-top: 6px;
  }

  .empty-ill-subtitle {
    font-size: 11px;
  }

  /* === UTILITIES === */
  .selection-row {
    gap: 6px;
    padding: 8px;
  }

  .divider {
    margin: 8px 0;
  }

  .section-head {
    gap: 6px;
  }

  .form-row {
    gap: 6px;
    margin-top: 6px;
  }

  p {
    margin: 4px 0 0;
  }

  /* === PAGINATION === */
  .pagination {
    gap: 4px;
    margin-top: 10px;
  }

  .page-btn {
    padding: 5px 8px;
    min-height: 32px;
    font-size: 11px;
    border-radius: 5px;
  }

  /* === CLOSE BUTTONS === */
  .close-btn,
  .icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
    border-radius: 6px;
  }

  /* === ENSURE ALL TOUCH TARGETS >= 44PX === */
  button,
  a,
  [role="button"] {
    min-height: 44px;
  }

  /* === MOBILE FOOTER === */
  footer {
    padding: 20px 12px;
    margin-top: auto;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-section h3 {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .footer-links a {
    font-size: 12px;
  }

  @keyframes slideIn {
    from {
      transform: translateX(100vw);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }

  @keyframes slideOut {
    from {
      transform: translateX(0);
      opacity: 1;
    }
    to {
      transform: translateX(100vw);
      opacity: 0;
    }
  }
}