/* kart.sy — global styles */
:root {
  --bg: #0a0f1d;
  --bg-2: #0f1730;
  --panel: #131c38;
  --panel-2: #182351;
  --line: #233063;
  --text: #e9efff;
  --muted: #8d9bc7;
  --primary: #3b82f6;
  --primary-2: #6366f1;
  --accent: #22d3ee;
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-2: 0 20px 60px rgba(20, 30, 80, .45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 600px at 90% -10%, rgba(99,102,241,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34,211,238,.10), transparent 60%),
    linear-gradient(180deg, #060a18, #0a0f1d 30%, #070b18);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img, svg { display: inline-block; vertical-align: middle; }
img, video, iframe, canvas { max-width: 100%; height: auto; }
.main, main, section, article, aside, .container, .admin-shell, .admin-main,
.panel, .panel-head, .form, form, fieldset, details, pre, .table-wrap {
  min-width: 0;
  max-width: 100%;
}
p, span, strong, small, label, a, button, summary, code, pre, td, th {
  overflow-wrap: anywhere;
}
pre, code {
  white-space: pre-wrap;
  word-break: break-word;
}
input, select, textarea, button {
  min-width: 0;
  max-width: 100%;
}
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 18px; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(10,15,29,.75);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: conic-gradient(from 200deg, #6366f1, #22d3ee, #3b82f6, #6366f1);
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-1);
}
.brand-mark img { width: 31px; height: 31px; object-fit: contain; border-radius: 8px; }
.brand-mark svg { width: 20px; height: 20px; }
.brand.small .brand-mark { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text-only { padding: 4px 0; }
.brand-text-only .brand-name { font-size: 16px; }
.brand-name { font-weight: 800; letter-spacing: .3px; }
.brand-name span { color: var(--accent); }
.brand-tag { color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-links a.active { color: #fff; background: rgba(99,102,241,.18); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 700; cursor: pointer; transition: transform .05s ease, background .2s ease, border-color .2s ease, color .2s;
  font-family: inherit; font-size: 14.5px; color: #fff; background: transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn.lg { padding: 13px 20px; font-size: 15px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 8px 24px rgba(59,130,246,.35); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline { border-color: rgba(255,255,255,.18); color: var(--text); }
.btn-outline:hover { background: rgba(255,255,255,.06); }
.btn-outline.danger { color: #fda4a4; border-color: rgba(239,68,68,.35); }
.btn-outline.danger:hover { background: rgba(239,68,68,.08); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.05); }
.btn-ghost.danger { color: #fda4a4; }

.flash { margin: 12px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid; font-weight: 600; }
.flash-ok { background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.45); color: #a7f3d0; }
.flash-bad { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.45); color: #fecaca; }

/* Layout */
.main { padding: 22px 18px 60px; flex: 1 0 auto; }

/* HOME / Hero */
.home .hero { padding: 30px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.hero-text h1 { font-size: clamp(34px, 5vw, 56px); margin: 12px 0 8px; line-height: 1.1; }
.hero-text h2 { font-weight: 600; color: #c9d3f5; font-size: clamp(16px, 1.7vw, 20px); margin: 0 0 14px; }
.hero-pitch { color: var(--muted); max-width: 60ch; }
.hero-cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.35); color: #c7d0ff;
  font-weight: 600; font-size: 13px;
}
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; max-width: 520px; }
.hero-stats div {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  padding: 12px 14px; border-radius: 12px;
}
.hero-stats strong { display: block; font-size: 20px; color: #fff; }
.hero-stats span { color: var(--muted); font-size: 12.5px; }
.hero-visual { display: grid; place-items: center; }

/* Visa Card */
.visa-card {
  position: relative; width: 380px; max-width: 100%;
  aspect-ratio: 1.586 / 1;
  border-radius: 20px; padding: 22px 22px 18px;
  color: #fff; isolation: isolate;
  background:
    radial-gradient(160% 120% at 100% 0%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(135deg, #0b3a8f 0%, #133bbf 35%, #4f46e5 65%, #7c3aed 100%);
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(255,255,255,.12);
  font-family: 'Inter', 'Cairo', sans-serif;
  overflow: hidden;
}
.visa-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(0,0,0,.30), transparent 70%);
  pointer-events: none;
}
.visa-card .vc-row { display: flex; align-items: center; justify-content: space-between; }
.vc-bank { font-weight: 800; letter-spacing: .8px; font-size: 14px; opacity: .95; }
.vc-brand { font-weight: 900; font-size: 22px; letter-spacing: 4px; font-style: italic; }
.vc-chip {
  width: 44px; height: 32px; margin-top: 16px;
  background: linear-gradient(135deg, #d8b14a, #f7e7a3 50%, #b88b21);
  border-radius: 7px; display: grid; place-items: center; color: #5b3e07;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 1px 0 rgba(0,0,0,.2);
}
.vc-chip svg { width: 18px; height: 18px; }
.vc-number {
  margin-top: 18px; font-size: 22px; letter-spacing: 2px; font-weight: 700;
  text-shadow: 0 1px 0 rgba(0,0,0,.25); direction: ltr;
}
.vc-bottom { margin-top: 18px; gap: 14px; }
.vc-holder, .vc-exp, .vc-cvv { display: flex; flex-direction: column; gap: 2px; direction: ltr; }
.lbl { font-size: 9.5px; letter-spacing: 1px; opacity: .7; text-transform: uppercase; }
.val { font-size: 14px; font-weight: 700; }
.vc-glow {
  position: absolute; inset: -1px; border-radius: 20px; pointer-events: none;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,.12) 75%, transparent 90%);
  mix-blend-mode: screen;
}
.visa-card.frozen { filter: saturate(.6) hue-rotate(190deg); }
.vc-frozen-tag {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.12); padding: 5px 9px; border-radius: 999px;
  font-size: 11px; display: inline-flex; gap: 6px; align-items: center; backdrop-filter: blur(4px);
}

/* Sections */
.section-title { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; font-size: 22px; }
.section-title svg { width: 22px; height: 22px; color: var(--accent); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 18px;
  transition: transform .15s ease, border-color .2s;
}
.feature:hover { transform: translateY(-2px); border-color: rgba(99,102,241,.45); }
.feature .ic { width: 28px; height: 28px; color: var(--accent); margin-bottom: 8px; }
.feature h4 { margin: 6px 0 4px; }
.feature p { color: var(--muted); margin: 0; }

/* How */
.how .steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.how .steps li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px;
}
.step-n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 800;
}
.how .steps .ic { color: var(--accent); }

/* CTA */
.cta { margin: 36px 0 8px; }
.cta-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.10));
  border: 1px solid rgba(99,102,241,.35); border-radius: 20px; padding: 22px;
  flex-wrap: wrap;
}

/* Compact footer */
.footer { margin-top: 28px; border-top: 1px solid rgba(255,255,255,.06); padding: 14px 0 10px; background: rgba(0,0,0,.2); }
.footer-compact { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-brand { color: #fff; font-size: 16px; font-weight: 800; white-space: nowrap; }
.footer-brand span { color: var(--accent); }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.footer-links a:hover { color: #fff; background: rgba(255,255,255,.05); }
.footer-links svg { width: 15px; height: 15px; }
.footer-links .footer-support { color: #c7d0ff; }
.footer-links .footer-recharge { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 5px 16px rgba(59,130,246,.25); }
.footer-copy { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* Auth */
.auth-wrap { min-height: calc(100dvh - 220px); display: grid; place-items: center; padding: 40px 0; }
.auth-card {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10); border-radius: 18px; padding: 26px;
  box-shadow: var(--shadow-2);
}
.auth-head { text-align: center; margin-bottom: 14px; }
.auth-head .ic-lg { width: 32px; height: 32px; color: var(--accent); }
.auth-foot { text-align: center; margin-top: 12px; color: var(--muted); }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,.12); }
.google-btn { width: 100%; justify-content: center; background: #fff; color: #25304d; border-color: rgba(255,255,255,.5); }
.google-btn:hover { background: #f2f5ff; }
.google-g { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: conic-gradient(#4285f4 0 25%,#34a853 0 50%,#fbbc05 0 75%,#ea4335 0); color: #fff; font: 800 13px/1 Arial; }
.clerk-auth-note { margin: 9px 0 0; text-align: center; font-size: 12px; }

/* Forms */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; }
.form label > span { display: inline-flex; gap: 8px; align-items: center; color: #cdd5f5; font-weight: 600; font-size: 13.5px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04); color: var(--text); font-family: inherit; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.form textarea { min-height: 80px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: rgba(99,102,241,.55); background: rgba(255,255,255,.06); }
.form input[disabled] { opacity: .7; }
.form .check { flex-direction: row; gap: 8px; align-items: center; }
.form-section { padding: 14px; border: 1px dashed rgba(255,255,255,.08); border-radius: 12px; }
.form-section h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.pm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.pm-item { display: flex; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; cursor: pointer; }
.pm-item input { margin-top: 5px; }
.pm-item:hover { border-color: rgba(99,102,241,.5); }
.pm-item input:checked + div { color: #fff; }
.pm-item:has(input:checked) { border-color: rgba(99,102,241,.55); background: rgba(99,102,241,.08); }
.pm-item strong { display: flex; gap: 6px; align-items: center; }
.pm-details { white-space: pre-wrap; color: var(--muted); margin: 6px 0 0; font-family: inherit; font-size: 12.5px; }
.copy-payment { margin-top: 8px; }
.wallet-deposit-form { min-width: 0; }
.wallet-deposit-form .pm-item { align-items: flex-start; }
.wallet-deposit-form .pm-item > div { min-width: 0; }

/* Panels & tables */
.panel { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; margin-top: 14px; }
.two-col > * { min-width: 0; max-width: 100%; }
.empty { color: var(--muted); padding: 12px; text-align: center; }

.table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: start; overflow-wrap: anywhere; word-break: break-word; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.08); }
.badge.ok { background: rgba(16,185,129,.18); color: #6ee7b7; }
.badge.bad { background: rgba(239,68,68,.18); color: #fca5a5; }
.badge.warn { background: rgba(245,158,11,.18); color: #fcd34d; }
.badge.pending { background: rgba(99,102,241,.18); color: #c7d0ff; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.stat { display: flex; gap: 12px; align-items: center; padding: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; }
.stat .ic { width: 28px; height: 28px; color: var(--accent); }
.stat span { font-size: 18px; font-weight: 800; }
.stat small { color: var(--muted); display: block; margin-top: 2px; }

/* Dashboard */
.dash-head, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 6px; flex-wrap: wrap; }
.dash-head h1, .page-head h1 { margin: 0; display: flex; align-items: center; gap: 8px; }

/* Cards page */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; margin-top: 14px; }
.card-block { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.card-block .visa-card { width: 100%; max-width: 440px; margin: 0 auto; }
.card-meta { display: grid; gap: 8px; }
.card-meta-row { display: flex; align-items: center; justify-content: space-between; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.card-notifs { border-top: 1px dashed rgba(255,255,255,.10); padding-top: 10px; }
.card-notifs h4 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.notif-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.notif { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.notif strong { display: block; }
.notif p { margin: 4px 0 4px; color: #d6deff; white-space: pre-wrap; }
.notif .ic { width: 22px; height: 22px; }
.notif-3ds { background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.35); }
.notif-3ds .ic { color: var(--accent); }
.mobile-bottom-nav { display: none; }
.empty-card { text-align: center; padding: 40px 16px; background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.10); border-radius: 18px; }
.ic-xl { width: 44px; height: 44px; color: var(--accent); }

/* Filters / chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); color: var(--muted); font-weight: 600; font-size: 13px; }
.chip.on { background: rgba(99,102,241,.18); border-color: rgba(99,102,241,.45); color: #fff; }

/* Admin layout */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.admin-side { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 14px; position: sticky; top: 78px; }
.admin-side h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav a { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-nav a.active { background: rgba(99,102,241,.18); color: #fff; }
.admin-main { min-width: 0; }
.admin-main h1 { margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }

/* Inline forms */
.inline { display: inline-flex; gap: 6px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin-inline-end: 6px; }
.inline-form input { width: 110px; }
.row-actions summary { list-style: none; }
.row-actions summary::-webkit-details-marker { display: none; }
.row-actions[open] .row-actions-pop { display: grid; }
.row-actions-pop { display: none; gap: 8px; padding: 10px; margin-top: 6px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.10); border-radius: 12px; min-width: 280px; }

.app-row { margin-bottom: 12px; }
.small-info div { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 8px 10px; }
.small-info span { display: block; }
.approve-form, .reject-form, .edit-card { margin-top: 8px; }
.approve-form summary, .reject-form summary, .edit-card summary { list-style: none; cursor: pointer; }
.approve-form summary::-webkit-details-marker, .reject-form summary::-webkit-details-marker, .edit-card summary::-webkit-details-marker { display: none; }

.pm-edit { display: grid; gap: 10px; margin-top: 12px; }
.telegram-prefs { display: grid; gap: 10px; margin-top: 12px; }
.telegram-pref-card { padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.025); }
.telegram-pref-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 12px; margin-top: 10px; }
.support-footer { border-top: 1px solid rgba(255,255,255,.06); padding-top: 14px; color: var(--muted); }
.support-footer a { color: var(--accent); font-weight: 700; }
.chat-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 14px; }
.chat-list { display: grid; gap: 7px; align-content: start; }
.chat-item { padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.025); }
.chat-item.active, .chat-item:hover { background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.4); }
.chat-item strong, .chat-item span { display: block; }
.chat-window { min-height: 440px; display: flex; flex-direction: column; }
.chat-messages { flex: 1; display: grid; gap: 10px; align-content: start; max-height: 500px; overflow: auto; padding: 4px; }
.chat-bubble { max-width: 80%; padding: 10px 13px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.chat-bubble.mine { justify-self: start; background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.3); }
.chat-bubble.theirs { justify-self: end; }
.chat-bubble p { margin: 0 0 4px; white-space: pre-wrap; word-break: break-word; }
.chat-bubble img { max-width: 260px; max-height: 220px; border-radius: 10px; margin-top: 7px; }
.chat-compose { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; margin-top: 12px; }
.typing { padding: 5px 8px; font-style: italic; }
.role-pill { text-transform: capitalize; }

/* ===== Animations ===== */
@keyframes floatIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes pulseCta {
  0%, 100% { box-shadow: 0 8px 24px rgba(59,130,246,.35), 0 0 0 0 rgba(99,102,241,.45); }
  50%      { box-shadow: 0 12px 30px rgba(99,102,241,.55), 0 0 0 10px rgba(99,102,241,0); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-8px) rotate(-4deg); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spinLogo {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.float-in { animation: floatIn .7s cubic-bezier(.2,.8,.2,1) both; }
.float-in.delay-1 { animation-delay: .08s; }
.float-in.delay-2 { animation-delay: .16s; }
.float-in.delay-3 { animation-delay: .24s; }
.float-in.delay-4 { animation-delay: .32s; }
.float-in.delay-5 { animation-delay: .40s; }

.reveal { animation: fadeIn .6s ease both; }
.reveal-up { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal-up.in { opacity: 1; transform: translateY(0); }

.pulse-cta { animation: pulseCta 2.4s ease-in-out infinite; }
.floaty { animation: floatSlow 6s ease-in-out infinite; }

.brand-mark { animation: floatIn .6s ease both; }
.brand:hover .brand-mark { animation: spinLogo 1.4s ease; }

.feature { transition: transform .25s ease, border-color .25s, box-shadow .25s; }
.feature:hover { box-shadow: 0 14px 40px rgba(99,102,241,.18); }
.stat { transition: transform .2s ease, border-color .2s; }
.stat:hover { transform: translateY(-2px); border-color: rgba(99,102,241,.45); }
.btn { transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }

/* Card stack on hero */
.card-stack { position: relative; width: 420px; max-width: 100%; height: 280px; }
.card-stack .visa-card { position: absolute; top: 0; left: 0; right: 0; margin: 0 auto; transition: transform .35s ease; }
.card-stack .tilt-1 { transform: translate(8%, 12px) rotate(-6deg); z-index: 1; }
.card-stack .tilt-2 { transform: translate(-8%, -10px) rotate(4deg); z-index: 2; }
.card-stack:hover .tilt-1 { transform: translate(12%, 8px) rotate(-9deg); }
.card-stack:hover .tilt-2 { transform: translate(-12%, -16px) rotate(7deg); }

/* Mastercard visual */
.visa-card.brand-mc {
  background:
    radial-gradient(160% 120% at 100% 0%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(135deg, #0a0a0a 0%, #2a1010 35%, #6e0d0d 65%, #f59e0b 110%);
}
.visa-card.brand-visa {
  background:
    radial-gradient(160% 120% at 100% 0%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(135deg, #0b3a8f 0%, #133bbf 35%, #4f46e5 65%, #7c3aed 100%);
}
.vc-mc { display: inline-flex; align-items: center; }
.vc-mc .mc-c {
  width: 28px; height: 28px; border-radius: 50%; display: inline-block;
  margin-left: -10px; mix-blend-mode: screen;
}
.vc-mc .c-r { background: #eb001b; }
.vc-mc .c-y { background: #f79e1b; }

/* Brand picker on apply */
.brand-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-opt { cursor: pointer; }
.brand-opt input { display: none; }
.brand-card {
  position: relative; padding: 18px; border-radius: 14px; color: #fff;
  display: flex; flex-direction: column; gap: 6px; min-height: 110px;
  border: 2px solid transparent; transition: transform .15s, border-color .15s, box-shadow .2s;
}
.brand-card.brand-visa { background: linear-gradient(135deg, #0b3a8f 0%, #4f46e5 70%, #7c3aed 100%); }
.brand-card.brand-mc { background: linear-gradient(135deg, #0a0a0a 0%, #6e0d0d 60%, #f59e0b 110%); }
.brand-card .vc-bank { font-weight: 800; }
.brand-card .vc-brand { font-style: italic; font-weight: 900; letter-spacing: 4px; }
.brand-card small { color: rgba(255,255,255,.85); font-weight: 600; }
.brand-opt input:checked + .brand-card { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.25); }

/* Cost summary */
.cost-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px;
  padding: 12px; border: 1px dashed rgba(255,255,255,.10); border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.cost-summary > div { display: flex; align-items: center; justify-content: space-between; }
.cost-summary .cost-total { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 4px; }
.cost-summary .cost-total strong { color: #c7d0ff; font-size: 16px; }

/* Wallet card */
.wallet-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px 24px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(34,211,238,.10)),
              linear-gradient(120deg, rgba(255,255,255,.02), rgba(255,255,255,.04));
  border: 1px solid rgba(99,102,241,.35);
  margin: 14px 0;
  position: relative; overflow: hidden;
}
.wallet-card::before {
  content: ""; position: absolute; inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05) 30%, rgba(99,102,241,.15) 50%, rgba(255,255,255,.05) 70%, transparent);
  background-size: 200% 100%;
  animation: shimmer 6s linear infinite;
  pointer-events: none;
}
.wallet-card .balance { font-size: 30px; display: block; margin-top: 4px; }
.wallet-card .ic-xl { width: 56px; height: 56px; color: var(--accent); }
.recharge-cta {
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin:16px 0; padding:16px 18px; border-radius:14px;
  background:linear-gradient(135deg,rgba(34,211,238,.11),rgba(99,102,241,.16));
  border:1px solid rgba(34,211,238,.32);
}
.recharge-cta strong { display:flex; align-items:center; gap:8px; font-size:16px; }
.recharge-cta strong svg { color:var(--accent); }
.recharge-cta p { color:var(--muted); margin:3px 0 0; font-size:13px; }

/* Wallet badge in nav */
.wallet-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: rgba(34,211,238,.10); border: 1px solid rgba(34,211,238,.35); color: #c7faff;
  font-weight: 700; font-size: 13px;
}
.wallet-badge svg { width: 16px; height: 16px; }
.wallet-badge.lg { font-size: 14px; padding: 8px 12px; }

.sub-title { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 15px; }

.pos { color: #6ee7b7; }
.neg { color: #fca5a5; }

.apply-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.raw-json {
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  padding: 12px; max-height: 420px; overflow: auto; direction: ltr; text-align: left;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px;
  white-space: pre-wrap; word-break: break-word;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-up { opacity: 1; transform: none; }
  .pulse-cta, .floaty { animation: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; }
}
@media (max-width: 640px) {
  .topbar { position: relative; }
  .nav {
    position: relative;
    height: auto; padding-top: 10px; padding-bottom: 10px;
    flex-direction: column; align-items: stretch; gap: 10px;
  }
  .brand { align-self: center; }
  .brand-name { font-size: 15px; }
  .nav-links {
    width: 100%; max-width: none; overflow: visible; padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  }
  .nav-links > a, .nav-links > .wallet-badge {
    min-width: 0; width: 100%; min-height: 39px; padding: 7px 5px;
    justify-content: center; text-align: center; white-space: normal;
    font-size: 11.5px; line-height: 1.25; border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.035);
  }
  .nav-links > a.active { border-color: rgba(99,102,241,.45); }
  .nav-links .btn { padding: 7px 5px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-compact { justify-content: center; gap: 8px; }
  .footer-links { width: 100%; }
  .footer-copy { width: 100%; text-align: center; }
  .table { display: block; overflow-x: auto; white-space: nowrap; font-size: 12.5px; }
  .table th, .table td { padding: 9px 7px; }
  .visa-card { padding: 18px; border-radius: 18px; }
  .vc-number { font-size: clamp(15px, 5vw, 19px); letter-spacing: 1px; }
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-pick { grid-template-columns: 1fr; }
  .wallet-card { padding: 18px; }
  .wallet-card .balance { font-size: 25px; }
  .wallet-card { flex-wrap:wrap; }
  .wallet-card .btn, .recharge-cta .btn { width:100%; justify-content:center; }
  .panel, .auth-card { padding: 14px; }
  .btn.lg { width: 100%; justify-content: center; }
  .hero-text h1 { font-size: 38px; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { display: flex; overflow-x: auto; }
  .chat-item { min-width: 190px; }
  .chat-bubble { max-width: 92%; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats > div:last-child { grid-column: 1 / -1; }
  .card-stack { height: 235px; }
  .cost-summary { grid-template-columns: 1fr; }
  .cost-summary .cost-total { grid-column: 1; }
  .panel-head, .card-meta-row { align-items: flex-start; flex-wrap: wrap; }
  .inline, .inline-form, .row-gap { width: 100%; flex-wrap: wrap; }
  .inline-form input, .inline-form select { width: 100%; min-width: 0; }
  .row-actions-pop { min-width: 0; width: min(100%, calc(100vw - 56px)); }
  .form input, .form select, .form textarea, input, select, textarea { min-width: 0; max-width: 100%; }
  .chat-window { min-height: 360px; }
  .chat-messages { max-height: 55vh; }
  .chat-compose input[type="file"] { width: 100%; }
  .telegram-pref-options { grid-template-columns: 1fr; }
  .main { padding: 16px 12px 44px; }
  .container { padding-inline: 12px; }
  .auth-wrap { padding: 20px 0; }
  .page-head h1, .dash-head h1 { font-size: 24px; }
  .cta-box { padding: 16px; }
}
@media (max-width: 640px) {
  .float-in, .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .container { padding-inline: 14px; }
  .main { padding: 14px 14px 104px; }
  .topbar { position: relative; background: rgba(8,13,28,.96); }
  .nav {
    height: 58px;
    min-height: 58px;
    padding-block: 0;
    flex-direction: row;
    align-items: center;
  }
  .nav > .brand { align-self: auto; display: flex; color: #fff; flex: 0 0 auto; min-width: 72px; }
  .nav > .brand .brand-name { color: #fff; opacity: 1; }
  .brand-text-only .brand-name { font-size: 19px; }
  .user-authenticated .nav-links { display: none; }
  body:not(.user-authenticated) .nav-links {
    width: auto;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  body:not(.user-authenticated) .nav-links > a {
    width: auto;
    min-height: 36px;
    padding: 7px 9px;
    border: 0;
    font-size: 11.5px;
    white-space: nowrap;
  }
  .home .nav-links > a[href="/"] { display: none; }
  .mobile-bottom-nav {
    position: fixed;
    right: 10px;
    left: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 7px 6px;
    background: rgba(12,18,38,.96);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 19px;
    box-shadow: 0 18px 50px rgba(0,0,0,.55);
    backdrop-filter: blur(16px);
  }
  .mobile-bottom-nav a {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px 6px;
    color: var(--muted);
    border-radius: 13px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
  }
  .mobile-bottom-nav a svg { width: 21px; height: 21px; }
  .mobile-bottom-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(59,130,246,.35), rgba(99,102,241,.3));
  }
  .footer { margin-bottom: 82px; }
  .home .hero { padding: 15px 0 4px; }
  .hero-grid { gap: 13px; }
  .hero-text { text-align: center; }
  .hero-text .pill { width: 100%; justify-content: center; padding: 7px 9px; font-size: 11px; line-height: 1.45; }
  .hero-text h1 { margin-top: 13px; font-size: clamp(31px, 10vw, 40px); }
  .hero-text h2 { font-size: 15px; line-height: 1.7; }
  .hero-pitch { margin-inline: auto; font-size: 14px; }
  .hero-cta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-cta .btn.lg { width: 100%; padding: 11px 7px; font-size: 12.5px; }
  .hero-stats { display: none; }
  .hero-visual { min-width: 0; overflow: hidden; padding: 4px 0 0; }
  .card-stack { width: min(100%, 310px); height: 205px; }
  .card-stack .tilt-1 { transform: translateY(9px) scale(.94); }
  .card-stack .tilt-2 { transform: translateY(-4px) scale(.94); }
  .card-stack:hover .tilt-1 { transform: translateY(9px) scale(.94); }
  .card-stack:hover .tilt-2 { transform: translateY(-4px) scale(.94); }
  .section-title { margin-top: 25px; font-size: 20px; }
  .grid-cards, .how .steps { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 16px; }
  .feature p, .how .steps p { font-size: 13.5px; }
  .how .steps li { grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; }
  .cta { margin-top: 24px; }
  .cta-box { text-align: center; justify-content: center; }
  .two-col { gap: 12px; }
  .pm-list { grid-template-columns: minmax(0, 1fr); }
  .pm-item { padding: 12px; }
  .pm-item input { flex: 0 0 auto; }
  .pm-details { overflow-wrap: anywhere; word-break: break-word; }
  .wallet-deposit-form img { max-height: 210px !important; }
  .wallet-deposit-form .btn[type="submit"] { margin-top: 3px; }
}
@media (max-width: 380px) {
  .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats > div:last-child { grid-column: auto; }
  .hero-text h1 { font-size: 32px; }
  .visa-card { padding: 14px; }
  .vc-number { font-size: 14px; }
}

/* ====== Added for Wallet UI Refinements ====== */
.deposit-panel {
  padding: 28px 22px;
}
.step-flow {
  position: relative;
  overflow: hidden;
  min-height: 250px;
}
.step {
  display: none;
  animation: slideIn .4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.step.step-active {
  display: block;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}
.step-header h4 {
  font-size: 18px;
  margin: 0 0 6px;
  font-weight: 700;
}
.step-icon {
  width: 56px;
  height: 56px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}
.step-icon svg {
  width: 28px;
  height: 28px;
}
.back-btn {
  position: absolute;
  right: 0;
  top: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.back-btn svg {
  width: 22px;
  height: 22px;
}

.amount-input-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.amount-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.amount-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  padding: 16px;
  outline: none;
  width: 100%;
  text-align: left;
  direction: ltr;
}
.amount-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.15);
}
.amount-input-group select, .amount-currency {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s;
}
.amount-input-group select:hover {
  background: rgba(255, 255, 255, 0.1);
}
.amount-input-group select option {
  background: var(--panel);
  color: #fff;
}
.amount-currency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  margin-right: 8px;
}

.w-full {
  width: 100%;
  justify-content: center;
}

.sham-details-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}
.qr-container {
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.qr-container img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}
.qr-container canvas,
.qr-container > img {
  display: block;
  width: 220px !important;
  height: 220px !important;
}
.qr-error {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  color: #991b1b;
  font-size: 13px;
}

.wallet-address-box {
  text-align: right;
}
.copy-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 8px;
}
.copy-group code {
  font-size: 15px;
  color: var(--accent);
  word-break: break-all;
  font-weight: 600;
}
.btn-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-right: 14px;
}
.btn-copy:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-copy svg {
  width: 18px;
  height: 18px;
}

.text-accent {
  color: var(--accent);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  overscroll-behavior-inline: contain;
}
.table-wrap .table {
  min-width: 600px;
}
.text-break {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 120px;
  max-width: 280px;
  white-space: normal;
}
.panel,
.wallet-card,
.deposit-panel,
.wallet-deposit-form,
.sham-details-card,
.copy-group {
  min-width: 0;
  max-width: 100%;
}
.copy-group code {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.qr-download-btn {
  width: min(100%, 260px);
  justify-content: center;
  margin: 0 auto 20px;
}

@media (max-width: 900px) {
  .table-wrap:has(.wallet-history-table) {
    overflow: visible;
  }
  .wallet-history-table,
  .wallet-history-table tbody,
  .wallet-history-table tr,
  .wallet-history-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .wallet-history-table {
    min-width: 0 !important;
    white-space: normal;
  }
  .wallet-history-table thead {
    display: none;
  }
  .wallet-history-table tbody {
    display: grid;
    gap: 10px;
  }
  .wallet-history-table tr {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
  }
  .wallet-history-table td {
    display: grid;
    grid-template-columns: minmax(82px, .7fr) minmax(0, 1.3fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.055);
    text-align: start;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .wallet-history-table td:last-child {
    border-bottom: 0;
  }
  .wallet-history-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }
  .wallet-history-table .text-break {
    min-width: 0;
    max-width: 100%;
    direction: ltr;
    text-align: left;
  }
  .deposit-panel {
    padding: 18px 14px;
  }
  .sham-details-card {
    padding: 16px 12px;
  }
  .copy-group {
    padding: 10px;
  }
  .table-wrap:has(.responsive-records) {
    overflow: visible;
  }
  .responsive-records,
  .responsive-records tbody,
  .responsive-records tr,
  .responsive-records td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .responsive-records {
    min-width: 0 !important;
    white-space: normal;
  }
  .responsive-records thead {
    display: none;
  }
  .responsive-records tbody {
    display: grid;
    gap: 10px;
  }
  .responsive-records tr {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
  }
  .responsive-records td {
    display: grid;
    grid-template-columns: minmax(84px, .7fr) minmax(0, 1.3fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.055);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .responsive-records td:last-child {
    border-bottom: 0;
  }
  .responsive-records td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }
  .responsive-records td > *,
  .responsive-records details,
  .responsive-records form {
    min-width: 0;
    max-width: 100%;
  }
}
@media (max-width: 420px) {
  .qr-container img,
  .qr-container canvas,
  .qr-container > img {
    width: min(210px, 68vw) !important;
    height: min(210px, 68vw) !important;
  }
}

.record-date-cell {
  min-width: 94px;
}
.record-date {
  display: inline-grid;
  gap: 0;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
  line-height: 1.35;
}
.record-date strong {
  font-size: 12px;
  font-weight: 700;
}
.record-date small {
  color: var(--muted);
  font-size: 10.5px;
}
@media (max-width: 900px) {
  .wallet-history-table .record-date-cell,
  .responsive-records .record-date-cell {
    min-width: 0;
  }
  .record-date {
    min-width: 0;
    max-width: 100%;
  }
}
