/* ==========================================================================
   Design System
   ========================================================================== */
:root {
  --primary: #d81b60;
  --primary-2: #ec407a;
  --primary-3: #880e4f;
  --primary-foreground: #ffffff;
  --gradient-primary: linear-gradient(135deg, #d81b60 0%, #880e4f 100%);
  --gradient-soft: linear-gradient(135deg, rgba(216,27,96,.12), rgba(136,14,79,.12));
  --gradient-card: linear-gradient(135deg, #d81b60 0%, #ec407a 60%, #880e4f 100%);

  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #d81b60;
  --info: #880e4f;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 4px 14px rgba(15,23,42,.06);
  --shadow-lg: 0 18px 40px -12px rgba(15,23,42,.15);
  --shadow-glow: 0 10px 30px -8px rgba(216,27,96,.45);

  --sidebar-w: 264px;
  --header-h: 64px;

  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #18243d;
  --border: #1f2c47;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 14px rgba(0,0,0,.3);
  --shadow-lg: 0 18px 40px -12px rgba(0,0,0,.5);
  --gradient-soft: linear-gradient(135deg, rgba(216,27,96,.18), rgba(136,14,79,.18));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; color: var(--muted); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ==========================================================================
   Layout
   ========================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform .25s ease;
}
.sidebar-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient-primary);
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-glow);
}
.sidebar-nav {
  flex: 1; overflow-y: auto;
  padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
}
.nav-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-2); padding: 14px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: 14.5px;
  transition: all .15s ease;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active {
  background: var(--gradient-soft);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active .icon { color: var(--primary); }
.nav-item .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.menu-btn {
  width: 40px; height: 40px; display: none;
  align-items: center; justify-content: center;
  border-radius: 10px; background: var(--surface-2);
}
.page-title { font-size: 18px; font-weight: 700; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.wallet-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--gradient-primary);
  color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-glow);
}
.wallet-chip .icon { width: 16px; height: 16px; }
.wallet-chip .add { margin-left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.25); display: grid; place-items: center; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text);
  transition: background .15s;
}
.icon-btn:hover { background: var(--border); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff; display: grid; place-items: center; font-weight: 700;
}

.content { padding: 28px; flex: 1; }
@media (max-width: 768px) {
  .content { padding: 18px; }
  .menu-btn { display: grid; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 10px; }
  .topbar-right { gap: 6px; }
  .wallet-chip { padding: 5px 10px; gap: 6px; font-size: 12px; }
  .wallet-chip .icon { width: 14px; height: 14px; }
  .wallet-chip .add { display: none; }
  .icon-btn { width: 36px; height: 36px; }
  .avatar { width: 34px; height: 34px; font-size: 13px; }
}


.scrim {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 45;
}
.scrim.show { display: block; }

/* ==========================================================================
   Components
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Social Media Icon Grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 720px;
  margin-bottom: 22px;
}
.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: default;
}
.social-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--brand-color);
}
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--brand-color);
}
.social-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 640px) {
  .social-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .social-item { padding: 10px 4px; gap: 4px; }
  .social-icon { width: 36px; height: 36px; font-size: 18px; }
  .social-name { font-size: 10px; }
}
@media (max-width: 400px) {
  .social-grid { grid-template-columns: repeat(5, 1fr); }
  .social-icon { width: 32px; height: 32px; font-size: 16px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 18px; border-radius: 12px;
  font-weight: 600; font-size: 14px;
  transition: transform .12s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary {
  background: var(--surface-2); color: var(--text);
}
.btn-secondary:hover { background: var(--border); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface-2); }
.btn-danger {
  background: rgba(239,68,68,.1); color: var(--danger);
}
.btn-danger:hover { background: rgba(239,68,68,.18); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12px; color: var(--muted); }

.input, .textarea, .select-trigger {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  transition: border .15s, box-shadow .15s;
  outline: none;
}
.input:focus, .textarea:focus, .select-trigger.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16,185,129,.15);
}
.textarea { min-height: 96px; resize: vertical; }

/* Custom select */
.select { position: relative; }
.select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; cursor: pointer;
  min-height: 48px;
}
.select-trigger .placeholder { color: var(--muted); }
.select-trigger .value-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.select-trigger .value-wrap .flag,
.select-trigger .value-wrap .ico { font-size: 18px; }
.select-trigger .value-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.select-trigger.open .chev { transform: rotate(180deg); }

.select-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  z-index: 30; max-height: 280px; overflow: hidden;
  display: none; flex-direction: column;
}
.select.open .select-panel { display: flex; }
.select-search {
  padding: 10px; border-bottom: 1px solid var(--border);
}
.select-search input {
  width: 100%; padding: 9px 12px; background: var(--surface-2);
  border: 1px solid transparent; border-radius: 10px; outline: none;
  color: var(--text); font-size: 14px;
}
.select-options { overflow-y: auto; padding: 6px; }
.select-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-size: 14px;
}
.select-option:hover, .select-option.active {
  background: var(--gradient-soft); color: var(--primary);
}
.select-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* Spinner / loader */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--surface-2);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loader-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: 12px;
  background: var(--gradient-soft);
  color: var(--primary); font-weight: 600; font-size: 14px;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.12); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,.12); color: var(--danger); }
.badge-info { background: rgba(6,182,212,.12); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* Price block */
.price-block {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 18px; border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid rgba(16,185,129,.25);
}
.price-block .price { font-size: 24px; font-weight: 800; color: var(--primary); }
.price-block .price small { color: var(--muted); font-weight: 500; font-size: 12px; display: block; margin-bottom: 2px; }

/* Number box */
.number-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s, box-shadow .15s;
}
.number-box:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.number-box .number-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.number-box .num { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.number-box .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.number-box .otp-box {
  background: var(--surface-2); padding: 10px 14px; border-radius: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 18px; font-weight: 700; letter-spacing: 0.18em;
  text-align: center; color: var(--text);
}
.number-box .otp-box.empty { color: var(--muted); font-weight: 500; font-size: 13px; letter-spacing: 0; font-family: inherit; }
.number-box .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Stat card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gradient-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.stat-card .stat-icon .icon { width: 22px; height: 22px; }
.stat-card .stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.stat-card .stat-trend { font-size: 12px; margin-top: 8px; }
.stat-card.featured {
  background: var(--gradient-card); color: #fff; border: none;
  box-shadow: var(--shadow-glow);
}
.stat-card.featured .stat-icon { background: rgba(255,255,255,.2); color: #fff; }
.stat-card.featured .stat-label { color: rgba(255,255,255,.85); }

/* Tables */
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  min-width: 600px;
}
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }

/* Transaction / Number card list (same on mobile and desktop) */
.tx-list { display: flex; flex-direction: column; gap: 12px; }
.tx-desktop { display: none !important; }
.tx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tx-card .tx-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tx-card .tx-date { font-size: 12px; color: var(--muted); }
.tx-card .tx-amount { font-size: 15px; font-weight: 700; }
.tx-card .tx-amount.positive { color: var(--success); }
.tx-card .tx-amount.negative { color: var(--text); }

/* Number history card */
.num-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  align-items: center;
}
.num-card .num-otp {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  letter-spacing: .04em;
}
.num-card .num-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  margin-top: 4px;
}
.num-card .num-service { font-size: 13px; color: var(--muted); margin-top: 2px; }
.num-card .num-date { font-size: 12px; color: var(--muted); text-align: right; }
.num-card .num-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Log history card */
.log-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.log-card .log-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.log-card .log-name { font-weight: 700; font-size: 15px; }
.log-card .log-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.log-card .log-desc { font-size: 13px; color: var(--muted); }
.log-card .log-data {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 8px 10px 8px 12px;
}
.log-card .log-data code {
  flex: 1; min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.log-card .copy-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.log-card .copy-btn:hover { background: var(--surface-hover, var(--surface-2)); }
.log-card .copy-btn .icon { width: 14px; height: 14px; }

/* Allow flex/grid children to shrink so internal scroll works */
html, body { overflow-x: hidden; max-width: 100%; }
.main, .content, .card { min-width: 0; }
/* .card { overflow: hidden; } */
.card > .table-wrap { margin: 0 -22px -22px; padding: 0 22px 22px; width: calc(100% + 44px); }
@media (max-width: 768px) {
  .table { min-width: 520px; font-size: 13px; }
  .table th, .table td { padding: 10px 12px; }
  .card > .table-wrap { margin: 0 -16px -16px; padding: 0 16px 16px; width: calc(100% + 32px); }
}

/* Marketplace */
.market-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.market-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.market-img {
  aspect-ratio: 4/3;
  background: var(--gradient-card);
  display: grid; place-items: center;
  font-size: 64px;
  color: #fff;
  position: relative;
}
.market-img .tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 600;
  backdrop-filter: blur(6px);
}
.market-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.market-title { font-weight: 700; font-size: 15px; }
.market-desc { font-size: 13px; color: var(--muted); flex: 1; }
.market-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.market-price { font-weight: 800; color: var(--primary); font-size: 17px; }

/* Account categories — rectangular cluster (flex-wrap, not grid) */
.cat-cluster {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 22px;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600; font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.cat-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--brand-color, var(--primary));
}
.cat-chip .cat-emoji {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-size: 16px;
  box-shadow: inset 0 0 0 2px var(--brand-color, var(--primary));
}
.cat-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.cat-header .cat-header-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 28px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--brand-color, var(--primary));
}
.cat-header h1 { margin: 0; font-size: 22px; }
.account-stock { font-size: 12px; color: var(--muted); font-weight: 600; }
.account-stock.low { color: var(--danger); }

/* Modal */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  z-index: 100; display: none; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal-scrim.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 18px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 22px 24px 6px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body { padding: 12px 24px 22px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.modal-actions { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.modal-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; margin: 22px auto 6px;
  background: rgba(239,68,68,.12); color: var(--danger);
}

/* Toast */
.toast-host { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); padding: 14px 18px;
  border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 260px;
  display: flex; align-items: center; gap: 10px;
  animation: slidein .25s ease;
  font-size: 14px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }
@keyframes slidein { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Auth */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
.auth-side {
  background: var(--gradient-card);
  color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-side::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(255,255,255,.15), transparent 45%);
  pointer-events: none;
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side h1 { font-size: 38px; line-height: 1.1; }
.auth-side p { color: rgba(255,255,255,.85); margin-top: 14px; font-size: 16px; max-width: 360px; }
.auth-side .brand { color: #fff; font-size: 20px; }
.auth-side .brand-mark { background: rgba(255,255,255,.2); box-shadow: none; }
.auth-feat { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.auth-feat-item { display: flex; gap: 12px; align-items: flex-start; }
.auth-feat-item .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.2); display: grid; place-items: center; flex-shrink: 0;
}
.auth-feat-item h4 { font-size: 15px; }
.auth-feat-item p { color: rgba(255,255,255,.75); font-size: 13px; margin-top: 2px; }

.auth-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.auth-form {
  width: 100%; max-width: 420px;
}
.auth-form h2 { font-size: 28px; margin-bottom: 6px; }
.auth-form .sub { color: var(--muted); margin-bottom: 28px; }
.auth-footer-text { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.auth-footer-text a { color: var(--primary); font-weight: 600; }
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--muted); font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-google {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text);
}
.btn-google:hover { background: var(--surface-2); }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* Profile */
.profile-header {
  display: flex; gap: 22px; align-items: center;
  padding: 28px; border-radius: var(--radius); margin-bottom: 22px;
  background: var(--gradient-card); color: #fff;
  box-shadow: var(--shadow-glow);
  flex-wrap: wrap;
}
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,.25); color: #fff;
  display: grid; place-items: center; font-size: 32px; font-weight: 700;
  border: 3px solid rgba(255,255,255,.35);
}
.profile-info h2 { font-size: 22px; }
.profile-info p { color: rgba(255,255,255,.85); margin-top: 4px; font-size: 14px; }

/* Wallet */
.wallet-hero {
  background: var(--gradient-card);
  color: #fff; border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden;
  margin-bottom: 22px;
}
.wallet-hero::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.wallet-hero::before {
  content: ''; position: absolute; right: 40px; bottom: -80px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.wallet-hero > * { position: relative; z-index: 1; }
.wallet-hero .label { font-size: 14px; color: rgba(255,255,255,.85); }
.wallet-hero .balance { font-size: 44px; font-weight: 800; margin-top: 6px; letter-spacing: -0.03em; }
.wallet-hero .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.wallet-hero .btn-glass {
  background: rgba(255,255,255,.18); color: #fff;
  backdrop-filter: blur(8px);
}
.wallet-hero .btn-glass:hover { background: rgba(255,255,255,.28); }

.amount-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.amount-chip {
  padding: 10px 16px; border: 1.5px solid var(--border);
  border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: all .15s;
}
.amount-chip:hover, .amount-chip.active {
  border-color: var(--primary); background: var(--gradient-soft); color: var(--primary);
}

.method-card {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all .15s;
}
.method-card:hover, .method-card.active {
  border-color: var(--primary); background: var(--gradient-soft);
}
.method-card .ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2); display: grid; place-items: center; color: var(--primary);
}
.method-card .name { font-weight: 600; }
.method-card .desc { font-size: 12px; color: var(--muted); }

/* Empty state */
.empty {
  text-align: center; padding: 48px 24px;
  color: var(--muted);
}
.empty .empty-ico {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted);
  display: grid; place-items: center; margin: 0 auto 14px;
}
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 { font-size: 24px; letter-spacing: -0.02em; }
.page-head p { font-size: 14px; margin-top: 4px; }

/* ===== Announcement bar ===== */
.announcement-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.45);
  position: relative; overflow: hidden;
}
.announcement-bar::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}
.announcement-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); border-radius: 12px;
  backdrop-filter: blur(8px);
}
.announcement-icon .icon { width: 22px; height: 22px; }
.announcement-content { flex: 1; min-width: 0; }
.announcement-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.announcement-sub { font-size: 13px; opacity: .9; margin-top: 2px; }
.announcement-cta {
  background: #fff !important; color: #047857 !important;
  border: none !important; font-weight: 700;
  flex-shrink: 0;
}
.announcement-cta:hover { transform: translateY(-1px); }
.announcement-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.15); border: 0; color: #fff;
  cursor: pointer; display: grid; place-items: center;
  transition: background .2s; flex-shrink: 0;
}
.announcement-close:hover { background: rgba(255,255,255,.28); }
.announcement-close .icon { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .announcement-bar { flex-wrap: wrap; padding: 14px; }
  .announcement-cta { order: 3; width: 100%; justify-content: center; }
}

/* ===== Floating Telegram button ===== */
.tg-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: flex; align-items: center; gap: 0;
  height: 58px; padding: 0 18px;
  background: linear-gradient(135deg, #229ED9 0%, #2AABEE 100%);
  color: #fff; border-radius: 999px; text-decoration: none;
  box-shadow: 0 14px 32px -8px rgba(42, 171, 238, 0.55);
  transition: transform .25s ease, box-shadow .25s ease, gap .25s ease;
  overflow: hidden;
}
.tg-float:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 38px -8px rgba(42, 171, 238, 0.7);
  gap: 10px;
}
.tg-float-label {
  max-width: 0; opacity: 0; white-space: nowrap;
  font-weight: 600; font-size: 14px;
  transition: max-width .3s ease, opacity .25s ease;
}
.tg-float:hover .tg-float-label { max-width: 160px; opacity: 1; }
@media (max-width: 640px) {
  .tg-float { right: 16px; bottom: 16px; height: 54px; padding: 0 16px; }
}

/* ===== Welcome Modal ===== */
.tg-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 15, 25, 0.6); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.tg-modal-overlay.show { opacity: 1; pointer-events: auto; }
.tg-modal {
  position: relative; width: 100%; max-width: 440px;
  background: var(--surface, #fff); color: var(--text, #0f172a);
  border-radius: 22px; padding: 32px 28px 26px;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.45);
  transform: translateY(20px) scale(.96);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.tg-modal-overlay.show .tg-modal { transform: translateY(0) scale(1); }
[data-theme="dark"] .tg-modal { background: #111827; color: #f1f5f9; }
.tg-modal-illustration {
  width: 84px; height: 84px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, #229ED9 0%, #2AABEE 100%);
  box-shadow: 0 14px 30px -10px rgba(42, 171, 238, 0.6);
}
.tg-modal h2 {
  font-size: 22px; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.tg-modal p { font-size: 14.5px; line-height: 1.55; opacity: .8; margin: 0 0 22px; }
.tg-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tg-modal-actions .btn { min-width: 130px; justify-content: center; }
.tg-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 10px;
  background: transparent; border: 0; cursor: pointer;
  color: inherit; opacity: .6;
  display: grid; place-items: center;
  transition: opacity .2s, background .2s;
}
.tg-modal-close:hover { opacity: 1; background: rgba(128,128,128,.12); }
.tg-modal-close .icon { width: 18px; height: 18px; }
