/* ===== RESET SIMPLE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Roboto", sans-serif;
}

/* ===== COLORES ===== */
:root {
  --bg-main: #050708;
  --bg-card: #0c1012;
  --bg-card-soft: #11161a;
  --accent: #00d46a; /* tipo Cash App */
  --accent-soft: rgba(0, 212, 106, 0.15);
  --text-main: #f7f8fa;
  --text-muted: #a7b1c1;
  --border-soft: #20262f;
  --danger: #ff4c6a;
}

/* ===== LAYOUT GENERAL ===== */
.app-body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #0c151c 0, #050708 55%);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

/* ===== NAV SUPERIOR ===== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,7,8,0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent);
  color: #020304;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

/* ===== BOTONES ===== */
button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #020304;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 212, 106, 0.3);
}

.btn-secondary {
  background: #14191d;
  color: var(--text-main);
  border-radius: 999px;
  padding: 9px 16px;
  border: 1px solid rgba(255,255,255,0.06);
  font-weight: 500;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  padding: 9px 16px;
  border: 1px solid var(--accent-soft);
}

.btn-primary.big {
  padding: 13px 22px;
  font-size: 16px;
}

.full {
  width: 100%;
  margin-top: 10px;
}

.mini-btn {
  padding: 7px 10px;
  border-radius: 999px;
  background: #151a1f;
  color: var(--text-main);
  font-size: 12px;
}

/* ===== HOME ===== */
.home-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: 30px;
  padding: 40px 20px;
}

.home-hero {
  max-width: 520px;
  align-self: center;
}

.home-hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 14px;
}

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

.home-subtitle {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-ghost {
  background: rgba(0,0,0,0.2);
}

.home-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
}

.badge-green {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-outline {
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
}

/* Preview teléfono */
.home-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  width: 280px;
  height: 520px;
  border-radius: 32px;
  padding: 18px 14px;
  background: radial-gradient(circle at top, #182226, #050708);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 50px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.phone-status {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.phone-card {
  margin-top: 24px;
  background: linear-gradient(145deg, #07140f, #04130c);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(0,212,106,0.3);
}

.phone-balance-label {
  color: var(--text-muted);
  font-size: 12px;
}

.phone-balance-value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
}

.phone-balance-id {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.phone-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.pill-btn {
  flex: 1;
  border-radius: 999px;
  padding: 9px 0;
  font-size: 13px;
  background: var(--accent);
  color: #020304;
  font-weight: 600;
}

.pill-btn.outline {
  background: transparent;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
}

.pill-btn.big {
  padding: 11px 0;
}

/* ===== AUTH PAGES ===== */
.center-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.card {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 22px 20px 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

.card-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Inputs */
.field-label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: #11161a;
  color: var(--text-main);
  font-size: 14px;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,212,106,0.3);
}

/* Status mensajes */
.status-msg {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== DASHBOARD ===== */
.dashboard-main {
  flex: 1;
  padding: 22px 16px 30px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Balance card */
.balance-card {
  margin-bottom: 20px;
  background: linear-gradient(145deg, #060f0a, #050708);
  border: 1px solid rgba(0,212,106,0.35);
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.balance-label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.balance-id {
  font-size: 12px;
  color: var(--text-muted);
}

.balance-value {
  font-size: 32px;
  font-weight: 700;
  margin-top: 8px;
}

.balance-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

/* Grid dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 18px;
}

/* Historial */
.history-card {
  max-height: 380px;
  display: flex;
  flex-direction: column;
}

.history-list {
  margin-top: 12px;
  overflow-y: auto;
  max-height: 320px;
  padding-right: 4px;
}

.history-row {
  padding: 10px 8px;
  border-radius: 12px;
  background: #101419;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) auto;
  column-gap: 10px;
  row-gap: 2px;
}

.tx-type {
  font-size: 13px;
}

.tx-type.sent {
  color: var(--danger);
}

.tx-type.received {
  color: var(--accent);
}

.tx-amount {
  justify-self: end;
  font-weight: 600;
  font-size: 13px;
}

.tx-date {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--text-muted);
}

.empty-msg {
  font-size: 13px;
  color: var(--text-muted);
}

/* Acción cards */
.action-card {
  background: var(--bg-card-soft);
}

/* Admin */
.admin-card {
  background: #0b0f14;
}

/* Copiar row */
.copy-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ===== QR POPUP ===== */
.qr-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.qr-box {
  background: #0d1216;
  border-radius: 20px;
  padding: 20px 18px;
  max-width: 320px;
  width: 100%;
  border: 1px solid var(--border-soft);
  text-align: center;
}

.qr-box h3 {
  margin-bottom: 4px;
}

.qr-box p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.qr-box canvas {
  margin: 8px auto 6px;
  background: #fff;
  border-radius: 12px;
}

.qr-id {
  margin-bottom: 10px !important;
}

/* ===== FOOTER ===== */
.footer {
  padding: 12px 18px 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .home-main {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
  }

  .home-preview {
    margin-top: 24px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .top-nav {
    flex-direction: row;
    gap: 10px;
  }

  .nav-actions {
    gap: 6px;
  }

  .home-main {
    padding: 22px 14px 28px;
  }

  .center-main {
    padding: 24px 14px 28px;
  }

  .dashboard-main {
    padding: 18px 12px 26px;
  }

  .card {
    border-radius: 18px;
  }
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #0b0f14;
  border: 1px solid rgba(0,255,150,0.3);
  padding: 14px 20px;
  border-radius: 14px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
}

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

.toast-icon {
  font-size: 20px;
  color: #00ff9d;
  font-weight: bold;
}

