/* ============================================================
   ACTIVA2 — Estilos globales (vanilla)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.3.0/tabler-icons.min.css');

:root {
  --bg:       #0A0A0F;
  --surface:  #131318;
  --surface2: #1C1C24;
  --surface3: #232330;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.13);
  --accent:   #C8F135;
  --accent2:  #8B5CF6;
  --accent3:  #F97316;
  --cyan:     #06B6D4;
  --red:      #EF4444;
  --text:     #FAFAF8;
  --muted:    #7C7C8A;
  --muted2:   #3A3A48;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

#app {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; outline: none; background: none; }
input, textarea, select {
  font-family: var(--font-body);
  outline: none;
  border: none;
  background: none;
  color: var(--text);
}

/* ── Botones ── */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: var(--accent); color: #0A0A0F;
  font-weight: 700; font-size: 15px;
  border-radius: var(--radius-lg);
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: var(--surface2); color: var(--muted);
  font-weight: 500; font-size: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
}

.btn-ghost {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-md);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
}

/* ── Inputs ── */
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.input-wrap i { color: var(--muted); font-size: 18px; flex-shrink: 0; }
.input-wrap input {
  flex: 1; font-size: 15px; color: var(--text);
  background: none;
}
.input-wrap input::placeholder { color: var(--muted2); }
.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(200,241,53,0.1);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--muted); text-transform: uppercase;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
}

/* ── Error box ── */
.error-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  color: var(--red); border-radius: var(--radius-md);
  padding: 12px 14px; font-size: 14px;
}

/* ── Spinner ── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(10,10,15,0.3);
  border-top-color: #0A0A0F;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: rgba(19,19,24,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  height: 64px; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; color: var(--muted);
  font-size: 10px; font-weight: 500;
  text-decoration: none; transition: color 0.2s;
  position: relative;
}
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
  content: '';
  position: absolute; top: 8px;
  width: 32px; height: 32px;
  background: rgba(200,241,53,0.1);
  border-radius: 50%;
}

/* ── Page header ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  position: sticky; top: 0;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.topbar-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.topbar-sub   { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── Tabs ── */
.tabs {
  display: flex; border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.tab {
  flex: 1; padding: 12px 0;
  font-size: 14px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Body scrollable ── */
.page-body {
  padding: 16px 20px;
  padding-bottom: 80px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
}

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  padding: 60px 20px; text-align: center;
}
.empty-icon { font-size: 48px; }
.empty-title { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.empty-text  { font-size: 14px; color: var(--muted); max-width: 240px; }

/* ── Loader ── */
.loader {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}
.loader-dot {
  width: 32px; height: 32px;
  border: 3px solid var(--muted2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Pill badge ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.badge-accent { background: rgba(200,241,53,0.15); color: var(--accent); }
.badge-muted  { background: var(--surface2); color: var(--muted); }
.badge-red    { background: rgba(239,68,68,0.12); color: var(--red); }
