*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --primary: #6c5ce7;
  --primary-glow: rgba(108, 92, 231, 0.4);
  --green: #00cec9;
  --green-glow: rgba(0, 206, 201, 0.4);
  --red: #ff6b6b;
  --text: #e4e6f0;
  --text-dim: #8b8fa8;
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }

/* ── Navbar ── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface2);
  flex-wrap: wrap;
  gap: 8px;
}
.navbar .brand { font-size: 1.2rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.navbar .brand span { color: var(--primary); }
.navbar nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.navbar nav a { font-size: 0.85rem; color: var(--text-dim); white-space: nowrap; }
.navbar nav a:hover { color: var(--text); }

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #5a4bd1; transform: translateY(-1px); }
.btn-green { background: var(--green); color: #000; }
.btn-outline { background: transparent; border: 1px solid var(--surface2); color: var(--text); }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }
.btn-danger { background: var(--red); color: #fff; }

/* ── Contenedor ── */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 24px; }

/* ── Auth ── */
.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 40px;
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }
.error-msg { color: var(--red); font-size: 0.8rem; margin-bottom: 12px; }

/* ── Pricing ── */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 24px; }
.plan-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card .price { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.plan-card .minutes { color: var(--text-dim); font-size: 0.85rem; margin: 6px 0 16px; }

/* ── Account ── */
.account-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.account-panel h2 { font-size: 1.1rem; margin-bottom: 16px; }
.balance-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  text-align: center;
  padding: 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* ── Dashboard ── */
.dash-wrap { display: flex; min-height: 100vh; }
.dash-side {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--surface2);
  padding: 20px;
  flex-shrink: 0;
}
.dash-side h3 { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.dash-side a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text-dim); margin-bottom: 4px; font-size: 0.9rem; }
.dash-side a:hover, .dash-side a.active { background: var(--surface2); color: var(--text); }
.dash-main { flex: 1; padding: 24px; }
.dash-main h1 { font-size: 1.4rem; margin-bottom: 20px; }

table.dash-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
table.dash-table th { background: var(--surface2); padding: 10px 12px; text-align: left; font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
table.dash-table td { padding: 10px 12px; border-top: 1px solid var(--surface2); font-size: 0.85rem; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; }
.badge-admin { background: rgba(108,92,231,0.2); color: var(--primary); }
.badge-user { background: rgba(0,206,201,0.2); color: var(--green); }
.badge-paid { background: rgba(0,206,201,0.2); color: var(--green); }
.badge-pending { background: rgba(255,193,7,0.2); color: #ffc107; }
.badge-failed { background: rgba(255,107,107,0.2); color: var(--red); }

/* ── Footer ── */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 16px;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--surface2);
}
.footer strong { color: var(--primary); }

/* ── Stats cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: var(--radius-sm); padding: 20px; }
.stat-card .num { font-size: 1.6rem; font-weight: 700; color: var(--green); }
.stat-card .label { font-size: 0.75rem; color: var(--text-dim); }
