/* ═══════════════════════════════════════════════════════════
   assets/css/app.css — ConsolaVault
   Dark mode · Minimalista · Profesional
═══════════════════════════════════════════════════════════ */

/* ─── Variables de diseño ─────────────────────────────── */
:root {
  /* Paleta oscura */
  --bg:          #0b1120;
  --bg-2:        #101828;
  --bg-card:     #141e2e;
  --bg-input:    #1a2540;
  --bg-hover:    #1e2d4a;
  --border:      #1e2d45;
  --border-2:    #263650;

  /* Texto */
  --text:        #e2e8f0;
  --text-dim:    #94a3b8;
  --text-muted:  #4e6280;

  /* Acento */
  --accent:      #3b82f6;
  --accent-h:    #2563eb;
  --accent-soft: rgba(59,130,246,.14);
  --accent-glow: rgba(59,130,246,.3);

  /* Semáforo */
  --green:       #22c55e;
  --green-s:     rgba(34,197,94,.13);
  --yellow:      #f59e0b;
  --yellow-s:    rgba(245,158,11,.13);
  --red:         #ef4444;
  --red-s:       rgba(239,68,68,.13);
  --purple:      #a78bfa;
  --purple-s:    rgba(167,139,250,.13);

  /* Forma */
  --r:           12px;
  --r-sm:        8px;
  --r-lg:        18px;

  /* Sombras */
  --shadow:      0 4px 28px rgba(0,0,0,.4);
  --shadow-sm:   0 2px 10px rgba(0,0,0,.25);
  --shadow-card: 0 1px 3px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.2);

  /* Transiciones */
  --t:           .18s ease;

  /* Tipografía */
  --font:        'DM Sans', system-ui, sans-serif;
  --font-mono:   'DM Mono', 'Fira Code', monospace;

  /* Layout */
  --sidebar-w:   248px;
  --topbar-h:    58px;
}

/* ─── Reset base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-h); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: var(--font); }

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════
   LAYOUT PRINCIPAL
══════════════════════════════════════════════════════════ */

/* Overlay para móvil */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ─── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: transform var(--t);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
}
.logo-text em { color: var(--accent); font-style: normal; }

/* Nav grupos */
.sidebar-nav { flex: 1; padding: 10px 10px 0; }
.nav-group { margin-bottom: 18px; }
.nav-group-label {
  display: block;
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 10px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: background var(--t), color var(--t);
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 1px;
}
.nav-link:hover  { background: var(--bg-hover); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }

/* Footer del sidebar */
.sidebar-footer {
  padding: 14px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.sf-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-2);
  flex-shrink: 0;
}
.sf-avatar--fallback {
  background: var(--accent);
  display: grid; place-items: center;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
}
.sf-info { flex: 1; min-width: 0; }
.sf-name {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-email {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-logout {
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: 4px 5px;
  border-radius: 6px;
  transition: color var(--t), background var(--t);
  flex-shrink: 0;
}
.sf-logout:hover { color: var(--red); background: var(--red-s); }

/* ─── APP BODY ───────────────────────────────────────── */
.app-body {
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── TOPBAR ─────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left  { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.page-heading {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-dim);
  border-radius: 99px;
  transition: var(--t);
}

/* ─── PAGE CONTENT ───────────────────────────────────── */
.page-content {
  padding: 26px 28px;
  flex: 1;
  max-width: 1360px;
  animation: fadeUp .28s ease;
}

/* ═══════════════════════════════════════════════════════
   COMPONENTES REUTILIZABLES
══════════════════════════════════════════════════════════ */

/* ─── Botones ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); color: #fff; }
.btn-secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger    { background: transparent; color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: var(--red-s); }
.btn-ghost     { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-xs { padding: 4px 8px;  font-size: .74rem; }
.btn-icon { padding: 7px 9px; }

/* ─── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: .92rem; font-weight: 600; }
.card-body  { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Stats grid ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color var(--t);
}
.stat-card:hover { border-color: var(--border-2); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ic-blue   { background: var(--accent-soft); }
.ic-green  { background: var(--green-s); }
.ic-yellow { background: var(--yellow-s); }
.ic-purple { background: var(--purple-s); }
.ic-red    { background: var(--red-s); }
.stat-val  { font-size: 1.75rem; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.stat-lbl  { font-size: .75rem; color: var(--text-muted); margin-top: 3px; }

/* ─── Tarjeta VALOR TOTAL (Hero) ─────────────────────── */
.valor-hero {
  background: linear-gradient(135deg, #0f2744 0%, #0b1b38 60%, #091428 100%);
  border: 1px solid #1e3a5f;
  border-radius: var(--r-lg);
  padding: 30px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: 0 8px 40px rgba(59,130,246,.12), var(--shadow-card);
}
.valor-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.18) 0%, transparent 70%);
  pointer-events: none;
}
.valor-hero-icon {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(59,130,246,.5));
  animation: floatIcon 3s ease-in-out infinite;
}
.valor-hero-info { flex: 1; }
.valor-hero-label {
  font-size: .82rem;
  font-weight: 500;
  color: #7aa8d8;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.valor-hero-amount {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #fff;
  font-family: var(--font-mono);
  text-shadow: 0 0 30px rgba(59,130,246,.4);
  animation: pulseGlow 4s ease-in-out infinite;
}
.valor-hero-sub {
  font-size: .8rem;
  color: #5a7fa8;
  margin-top: 5px;
}

/* ─── Consola cards grid ─────────────────────────────── */
.consolas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}
.consola-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.consola-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.cc-img-wrap {
  height: 162px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.cc-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cc-img-placeholder { font-size: 3rem; opacity: .35; }
.cc-badge-hack {
  position: absolute;
  top: 10px; right: 10px;
}
.cc-body { padding: 14px 16px; }
.cc-title { font-size: .97rem; font-weight: 600; margin-bottom: 2px; }
.cc-brand { font-size: .77rem; color: var(--text-muted); margin-bottom: 10px; }
.cc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.meta-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .74rem;
  color: var(--text-dim);
}

/* Progress bar */
.prog-wrap { margin-bottom: 12px; }
.prog-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.prog-lbl { font-size: .73rem; color: var(--text-muted); }
.prog-val { font-size: .73rem; font-weight: 600; font-family: var(--font-mono); }
.prog-bar {
  height: 5px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.prog-fill.green  { background: var(--green); }
.prog-fill.yellow { background: var(--yellow); }
.prog-fill.red    { background: var(--red); }

/* Precio en tarjeta */
.cc-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.cc-price-final {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
}
.cc-price-base {
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.cc-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ─── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 500;
}
.badge-green  { background: var(--green-s);  color: var(--green); }
.badge-yellow { background: var(--yellow-s); color: var(--yellow); }
.badge-red    { background: var(--red-s);    color: var(--red); }
.badge-blue   { background: var(--accent-soft); color: var(--accent); }
.badge-purple { background: var(--purple-s); color: var(--purple); }

/* ─── Formularios ────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: .02em;
}
.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 9px 13px;
  font-size: .9rem;
  width: 100%;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 88px; }

/* Checkbox */
.form-check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  border-radius: 5px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Range */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 5px;
  background: var(--bg-input);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--r);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  text-align: center;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone input { display: none; }
.upload-zone .uz-icon { font-size: 2.2rem; opacity: .5; }
.upload-zone .uz-text { font-size: .82rem; color: var(--text-muted); }
.upload-preview {
  max-height: 120px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  margin-bottom: 4px;
}

/* Cálculo en tiempo real */
.price-live-box {
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plb-label { font-size: .8rem; color: var(--text-muted); }
.plb-value {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  transition: color var(--t);
}

/* ─── Mantenimiento cards ─────────────────────────────── */
.mant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 18px; }
.mant-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--t);
}
.mant-card:hover { border-color: var(--border-2); }
.mc-header {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--border);
}
.mc-thumb {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg-input);
  display: grid; place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-info { flex: 1; min-width: 0; }
.mc-name  { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-brand { font-size: .73rem; color: var(--text-muted); }
.mc-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mc-dot.green  { background: var(--green);  box-shadow: 0 0 7px var(--green); }
.mc-dot.yellow { background: var(--yellow); box-shadow: 0 0 7px var(--yellow); }
.mc-dot.red    { background: var(--red);    box-shadow: 0 0 7px var(--red);   }

.mc-body { padding: 13px 16px; }
.mc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: .82rem;
}
.mc-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.mc-row-lbl { color: var(--text-muted); }
.mc-row-val { font-weight: 500; }
.mc-countdown {
  margin-top: 12px;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  font-size: .83rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
.mc-countdown.green  { background: var(--green-s);  color: var(--green); }
.mc-countdown.yellow { background: var(--yellow-s); color: var(--yellow); }
.mc-countdown.red    { background: var(--red-s);    color: var(--red);   }

/* ─── Tabla ───────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 9px 14px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
tbody td {
  padding: 12px 14px;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.02); }

/* ─── Alertas ────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  animation: slideDown .22s ease;
}
.alert-success { background: var(--green-s);  border: 1px solid rgba(34,197,94,.25);  color: var(--green); }
.alert-error   { background: var(--red-s);    border: 1px solid rgba(239,68,68,.25);  color: var(--red); }
.alert-info    { background: var(--accent-soft); border: 1px solid rgba(59,130,246,.25); color: var(--accent); }

/* ─── Toast stack ────────────────────────────────────── */
.toast-stack {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  font-size: .855rem;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow);
  pointer-events: all;
  min-width: 250px;
  max-width: 360px;
  animation: toastIn .22s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

/* ─── Section header ─────────────────────────────────── */
.sec-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.sec-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.025em; }
.sec-sub   { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Marcas bar ─────────────────────────────────────── */
.marca-rows { display: flex; flex-direction: column; gap: 9px; }
.marca-row  { display: flex; align-items: center; gap: 10px; }
.mr-name    { width: 128px; font-size: .8rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.mr-track   { flex: 1; height: 5px; background: var(--bg-input); border-radius: 99px; overflow: hidden; }
.mr-fill    { height: 100%; background: var(--accent); border-radius: 99px; transition: width .8s cubic-bezier(.4,0,.2,1); }
.mr-count   { font-size: .78rem; font-weight: 600; font-family: var(--font-mono); color: var(--text-muted); width: 22px; text-align: right; flex-shrink: 0; }

/* ─── Empty state ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; opacity: .4; margin-bottom: 12px; }
.empty-state h3 { font-size: .97rem; color: var(--text-dim); margin-bottom: 5px; }
.empty-state p  { font-size: .83rem; }

/* ─── Login ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 42px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}
.login-logo {
  width: 64px; height: 64px;
  background: var(--accent);
  border-radius: 18px;
  display: grid; place-items: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.login-title { font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: 6px; }
.login-sub   { font-size: .88rem; color: var(--text-muted); margin-bottom: 34px; line-height: 1.5; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 13px 24px;
  background: #fff;
  color: #1f2937;
  border: none;
  border-radius: var(--r-sm);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--t), box-shadow var(--t);
  text-decoration: none;
}
.btn-google:hover { opacity: .92; box-shadow: 0 4px 18px rgba(0,0,0,.28); color: #1f2937; }

/* ─── Perfil ─────────────────────────────────────────── */
.perfil-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 30px;
  margin-bottom: 28px;
}
.perfil-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-2);
  flex-shrink: 0;
}
.perfil-avatar--fb {
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.perfil-name  { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.perfil-email { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }
.perfil-stats { display: flex; gap: 24px; margin-top: 12px; }
.ps-item .ps-val { font-size: 1.1rem; font-weight: 700; font-family: var(--font-mono); color: var(--accent); }
.ps-item .ps-lbl { font-size: .73rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   ANIMACIONES
══════════════════════════════════════════════════════════ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideDown{ from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastIn  { from { opacity:0; transform:translateX(18px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateX(18px); } }
@keyframes floatIcon {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes pulseGlow {
  0%,100% { text-shadow: 0 0 20px rgba(59,130,246,.3); }
  50%      { text-shadow: 0 0 40px rgba(59,130,246,.6), 0 0 80px rgba(59,130,246,.2); }
}
.stagger > * {
  animation: fadeUp .3s ease both;
}
.stagger > *:nth-child(1)  { animation-delay: .04s; }
.stagger > *:nth-child(2)  { animation-delay: .08s; }
.stagger > *:nth-child(3)  { animation-delay: .12s; }
.stagger > *:nth-child(4)  { animation-delay: .16s; }
.stagger > *:nth-child(5)  { animation-delay: .20s; }
.stagger > *:nth-child(6)  { animation-delay: .24s; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .app-body { margin-left: 0; }
  .hamburger { display: flex; }
  .page-content { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .consolas-grid { grid-template-columns: 1fr; }
  .valor-hero { flex-direction: column; text-align: center; }
  .valor-hero-icon { font-size: 2.5rem; }
  .valor-hero-amount { font-size: 1.8rem; }
  .perfil-hero { flex-direction: column; text-align: center; }
  .perfil-stats { justify-content: center; }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
}
