/*! finanzas-personales.app — extracted from base.html */
/*  DT-6: CSS moved from inline <style> to external file */

:root {
  --bg-base: #0a0b0f;
  --bg-layer: #111318;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-soft: rgba(255, 255, 255, 0.04);
  --text-primary: #f0f0f5;
  --text-secondary: #8b8d9a;
  --text-muted: #555769;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --violet: #8b5cf6;
    --violet-soft: rgba(139, 92, 246, 0.12);
    --blue: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.12);
    --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --bg-base: #f4f5f9;
  --bg-layer: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(99, 102, 241, 0.3);
  --border-soft: rgba(0, 0, 0, 0.04);
  --text-primary: #0f0f14;
  --text-secondary: #5a5c6e;
  --text-muted: #9b9daa;
  --glass: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: hidden
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4
}

@media(max-width:768px) {
  body::before {
    display: none !important;
    opacity: 0 !important
  }
}

.brand-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  gap: 6rem;
  padding: 2rem;
  animation: brandFloat 60s ease-in-out infinite
}

.brand-bg span {
  font-family: 'DM Mono', monospace;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  font-weight: 700;
  color: rgba(99, 102, 241, 0.06);
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
  filter: blur(2px);
  opacity: .4;
  white-space: nowrap;
  transform: rotate(-5deg);
  user-select: none
}

@keyframes brandFloat {
  0% {
    transform: translate(0, 0) scale(1)
  }

  50% {
    transform: translate(30px, -20px) scale(1.03)
  }

  100% {
    transform: translate(0, 0) scale(1)
  }
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem
}

[data-theme="light"] nav {
  background: rgba(244, 245, 249, 0.88)
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap
}

.nav-brand i {
  color: var(--accent);
  font-size: 1.1rem
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .1rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none
}

.nav-links::-webkit-scrollbar {
  display: none
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease, transform .15s ease;
  cursor: pointer;
  border: none;
  background: none;
  position: relative
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-input)
}

.nav-link:active {
  transform: scale(0.97)
}

.nav-link.active,
.nav-link.active:hover {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  transform: scale(1.02);
  box-shadow: 0 4px 14px var(--accent-glow)
}

.nav-right {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  font-size: .85rem
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow)
}

main {
  margin-top: 60px;
  padding: 2rem 1.5rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1
}

.section {
  display: none;
  animation: fadeIn .3s ease
}

.section.active {
  display: block
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem
}

.page-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .6rem
}

.page-header h2 i {
  color: var(--accent)
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: all .2s;
  overflow: visible
}

.card:hover {
  border-color: var(--border-hover)
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: .9rem
}

.card-body {
  padding: 1.25rem;
  overflow: visible
}

.card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem
}

/* Variante fija de 3 cols en desktop que colapsa a 2/1 en mobile/tablet
   (usado por el dashboard HERO donde el orden de los cards importa). */
.stats-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem
}

@media(max-width: 900px) {
  .stats-grid-3col {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width: 560px) {
  .stats-grid-3col {
    grid-template-columns: 1fr
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all .2s
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: .08;
  transition: .3s
}

.stat-card.income::before {
  background: var(--success)
}

.stat-card.expense::before {
  background: var(--danger)
}

.stat-card.balance::before {
  background: var(--accent)
}

.stat-card.total::before {
  background: var(--warning)
}

.stat-label {
  font-size: .78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .4rem
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  line-height: 1
}

.stat-value.income {
  color: var(--success)
}

.stat-value.expense {
  color: var(--danger)
}

.stat-value.balance {
  color: var(--accent-light)
}

.stat-trend {
  font-size: .75rem;
  margin-top: .4rem;
  color: var(--text-muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif
}

.btn-primary {
  background: var(--accent);
  color: #fff
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow)
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary)
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-primary)
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, .2)
}

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .2)
}

.btn-sm {
  padding: .35rem .7rem;
  font-size: .78rem
}

.form-group {
  margin-bottom: 1rem
}

.form-label {
  display: block;
  font-size: .8rem;
  color: var(--text-secondary);
  margin-bottom: .4rem;
  font-weight: 500
}

.form-control,
.form-select {
  width: 100%;
  padding: .6rem .9rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: .88rem;
  font-family: 'DM Sans', sans-serif;
  transition: all .2s;
  outline: none
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow)
}

.form-control::placeholder {
  color: var(--text-muted)
}

.form-control option,
.form-select option {
  background: var(--bg-layer);
  color: var(--text-primary)
}

.proy-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: .3rem 1.8rem .3rem .6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: .78rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .5rem center;
  transition: all .2s
}

.proy-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow)
}

.proy-select option {
  background: var(--bg-layer);
  color: var(--text-primary)
}

.input-group {
  display: flex;
  gap: .5rem;
  align-items: stretch
}

.input-group .input-prefix {
  display: flex;
  align-items: center;
  padding: 0 .75rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px 0 0 8px;
  border-right: none;
  color: var(--text-secondary);
  font-size: .85rem
}

.input-group .form-control {
  border-radius: 0 8px 8px 0
}

.row {
  display: grid;
  gap: 1rem
}

.row-2 {
  grid-template-columns: 1fr 1fr
}

.row-3 {
  grid-template-columns: 1fr 1fr 1fr
}

.row-4 {
  grid-template-columns: repeat(4, 1fr)
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .6rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em
}

.badge-success {
  background: var(--success-bg);
  color: var(--success)
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger)
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning)
}

.badge-neutral {
  background: rgba(255, 255, 255, .07);
  color: var(--text-secondary)
}

.badge-accent {
  background: rgba(99, 102, 241, .15);
  color: var(--accent-light)
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius)
}

table {
  width: 100%;
  border-collapse: collapse
}

th {
  padding: .7rem 1rem;
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600
}

td {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-size: .87rem;
  vertical-align: middle
}

tr:last-child td {
  border-bottom: none
}

tr:hover td {
  background: var(--bg-card-hover)
}

.td-mono {
  font-family: 'DM Mono', monospace;
  font-size: .84rem
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .2s ease
}

.modal {
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg)
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.modal-title {
  font-size: 1rem;
  font-weight: 700
}

.modal-body {
  padding: 2rem
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: .5rem
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px
}

.btn-close:hover {
  background: var(--bg-card);
  color: var(--text-primary)
}

.progress {
  height: 6px;
  background: rgba(255, 255, 255, .06);
  border-radius: 3px;
  overflow: hidden
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease
}

.recurrence-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  background: rgba(99, 102, 241, .12);
  color: var(--accent-light);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600
}

.credit-card-visual {
  background: linear-gradient(135deg, #1e1f2e 0%, #2d1e4e 100%);
  border-radius: 18px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  color: #fff;
  min-height: 180px
}

.credit-card-visual::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, .05);
  border-radius: 50%
}

.credit-card-visual::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -20px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, .03);
  border-radius: 50%
}

@media(max-width:768px) {

  .credit-card-visual::before,
  .credit-card-visual::after {
    display: none !important
  }
}

/* Brand indicator — arriba a la derecha, no tapa el límite */
.card-brand {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  z-index: 3;
  pointer-events: none
}

/* Visa — alusión: azul marino + círculo dorado con V */
.credit-card-visual.card-visa {
  background: linear-gradient(145deg, #080c2a 0%, #111b5e 35%, #152780 70%, #0f1a5e 100%)
}

.card-visa .card-brand span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #c8960c, #f0c050);
  border-radius: 50%;
  font-weight: 900;
  font-size: .85rem;
  color: #1a1f71;
  font-family: 'DM Sans', sans-serif
}

/* Mastercard — alusión: M en círculo cobrizo + fondo vino oscuro */
.credit-card-visual.card-mastercard {
  background: linear-gradient(145deg, #12080e 0%, #1f0914 35%, #2e0a1a 65%, #16080e 100%)
}

.card-mastercard .card-brand span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #b87333, #d4a04a);
  border-radius: 50%;
  font-weight: 900;
  font-size: .85rem;
  color: #1a0808;
  font-family: 'DM Sans', sans-serif
}

/* Amex/AXP — alusión: cuadrado azul con AXP (sin logos reales) */
.credit-card-visual.card-amex {
  background: linear-gradient(145deg, #060810 0%, #0b1220 45%, #0e1a30 100%)
}

.credit-card-visual.card-amex .card-chip {
  background: linear-gradient(135deg, #8a8fa0, #c0c4d0)
}

.card-amex .axp-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #4a90d9;
  border-radius: 4px;
  font-size: .55rem;
  font-weight: 800;
  color: #4a90d9;
  letter-spacing: .06em;
  font-family: 'DM Sans', sans-serif
}

.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #d4a843, #f0c050);
  border-radius: 6px;
  margin-bottom: 1.2rem;
  position: relative;
  z-index: 1
}

.card-number {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: .18em;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  opacity: .9
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1
}

.card-holder {
  font-size: .8rem;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .08em
}

.card-expiry {
  font-size: .75rem;
  opacity: .7
}

.card-limit {
  font-size: .9rem;
  font-weight: 700
}

@media(max-width:768px) {
  .credit-card-visual {
    min-height: 160px;
    padding: 1.25rem;
  }

  .card-number {
    font-size: .9rem;
    letter-spacing: .12em;
  }

  .card-brand {
    top: .8rem;
    right: .8rem;
  }
}

.cuotas-grid {
  display: grid;
  gap: .5rem;
  margin-top: .75rem
}

.cuota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .9rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: .83rem
}

.cuota-mes {
  color: var(--text-secondary);
  font-weight: 500
}

.cuota-amount {
  font-family: 'DM Mono', monospace;
  font-weight: 600
}

.cuota-amount.pagado {
  color: var(--success)
}

.cuota-amount.pendiente {
  color: var(--warning)
}

.cuota-amount.futuro {
  color: var(--text-muted)
}

.recurrente-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: .5rem;
  gap: .75rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s
}

.recurrente-row:last-child {
  border-bottom: none
}

.recurrente-row:hover {
  background: var(--bg-card-hover)
}

/* Mobile: stack action buttons under amount */
@media (max-width: 640px) {
  .recurrente-row {
    padding: .75rem;
    gap: .5rem;
  }

  .recurrente-row>form,
  .recurrente-row>button.btn-outline {
    margin-left: 0 !important;
  }

  .recurrente-row .rec-amount {
    flex: 1;
    text-align: left;
    min-width: 0;
  }

  .recurrente-row .rec-info {
    flex: 1 1 calc(100% - 56px);
    min-width: 0;
  }

  /* Botones de acción en línea propia */
  .recurrente-row>form[action*="pagar"],
  .recurrente-row>form[action*="delete"],
  .recurrente-row>button[data-action^="open-modal"] {
    margin-left: 0;
  }
}

.rec-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  margin-right: .75rem
}

.rec-info {
  flex: 1
}

.rec-name {
  font-weight: 600;
  font-size: .87rem
}

.rec-detail {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: .1rem
}

.rec-amount {
  text-align: right
}

.rec-amount .amount {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: .95rem
}

.rec-amount .freq {
  font-size: .72rem;
  color: var(--text-muted)
}

.invite-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, .15), rgba(139, 92, 246, .1));
  border: 1px solid rgba(99, 102, 241, .2);
  border-radius: var(--radius);
  padding: 1.5rem
}

.user-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: .5rem;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
  position: relative
}

.user-row:last-child {
  border-bottom: none
}

.user-row:hover {
  background: var(--bg-card-hover)
}

/* Mobile: stack user info full width, smaller avatar */
@media (max-width: 640px) {
  .user-row {
    padding: .65rem .75rem;
    gap: .6rem;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: .78rem;
  }

  .user-info {
    flex: 1;
    min-width: 0;
  }
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0
}

.user-info {
  flex: 1
}

.user-name {
  font-weight: 600;
  font-size: .87rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap
}

.user-email {
  font-size: .75rem;
  color: var(--text-secondary)
}

.dropdown {
  position: relative
}

.dropdown-toggle i {
  pointer-events: none
}

.dropdown-menu {
  position: absolute;
  right: 0;
  z-index: 9999
}

.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  padding: .5rem .75rem;
  text-align: left;
  font-size: .82rem;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: 'DM Sans', sans-serif
}

.dropdown-item:hover {
  background: var(--bg-card-hover)
}

.dropdown-item i {
  width: 16px
}

.security-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: 8px;
  font-size: .78rem;
  color: var(--success)
}

.encrypted-indicator {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  color: var(--success);
  opacity: .8
}

.encrypted-indicator i {
  font-size: .7rem
}

.tabs {
  display: flex;
  gap: .25rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: .25rem;
  margin-bottom: 1.5rem;
  width: fit-content
}

.tab {
  padding: .4rem .9rem;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: var(--text-secondary);
  border: none;
  background: none;
  font-family: 'DM Sans', sans-serif
}

.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow)
}

.month-scroll {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent
}

.month-scroll::-webkit-scrollbar {
  height: 4px
}

.month-scroll::-webkit-scrollbar-track {
  background: transparent
}

.month-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px
}

.month-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover)
}

.month-btn {
  flex-shrink: 0;
  padding: .4rem .9rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif
}

.month-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent)
}

.month-btn.has-data {
  border-color: rgba(99, 102, 241, .3)
}

.month-btn:hover:not(.active) {
  background: var(--bg-input);
  border-color: var(--accent)
}

.proyection-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(16, 185, 129, .05));
  border: 1px solid rgba(99, 102, 241, .15);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem
}

.chart-container {
  position: relative;
  height: 240px
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(15, 17, 26, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  transition: all .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: .9rem;
  font-weight: 500
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1
}

.toast.success {
  border-left: 4px solid var(--success)
}

.toast.error {
  border-left: 4px solid var(--danger)
}

/* =====================================================
   SISTEMA RESPONSIVE GLOBAL (mobile-first utilities)
   - Patrón tabla → cards en mobile (table-wrap--cards)
   - Reset de grid-column: span N en stats-grid (stat-card--wide)
   - Apilado de filtros (.filter-row) y modales (.modal-grid)
   ===================================================== */

/* Helpers de visibilidad (utility classes) */
.hide-on-mobile {
  display: initial;
}

.show-on-mobile {
  display: none;
}

/* Filtros apilables (genérico, reusado en transactions/cuentas/etc) */
.filter-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Tabs scrolleables horizontalmente en mobile */
.tabs--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.tabs--scroll::-webkit-scrollbar {
  display: none;
}

/* Modal grid: 2 columnas en desktop, 1 en mobile */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Modal grid: 3 columnas en desktop, 1 en mobile */
.modal-grid--3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
}

/* Stat card ancho completo (sustituye grid-column: span N) */
.stat-card--wide {
  /* En desktop, ocupa fila completa dentro del grid */
  grid-column: 1 / -1;
}

@media(max-width:768px) {

  .row-2,
  .row-3,
  .row-4 {
    grid-template-columns: 1fr !important
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr
  }

  main {
    padding: 1rem 1rem 5rem 1rem
  }

  /* Extra padding bottom for nav */
  .page-header {
    flex-direction: column;
    align-items: flex-start
  }

  .page-header .btn {
    width: 100%
  }

  nav .nav-links {
    display: none;
  }

  /* Hide top links on mobile */
  .bottom-nav {
    display: flex;
  }

  /* Show bottom nav */
  .nav-right .encrypted-indicator {
    display: none;
  }

  .card {
    backdrop-filter: none;
    overflow: visible;
    min-height: auto
  }

  .card-body {
    padding: 1rem;
    overflow: visible;
    display: block
  }

  .tarjeta-item .row {
    display: flex;
    flex-direction: column;
    gap: 1rem
  }

  .tarjeta-item .row>div {
    width: 100%;
    max-width: 100%
  }

  .credit-card-visual {
    margin: 0;
    max-width: 100%;
    box-sizing: border-box
  }

  .flash,
  .toast {
    bottom: 5.5rem !important;
    left: 1.25rem !important;
    right: 1.25rem !important;
    width: auto !important;
    justify-content: center;
    text-align: center;
  }

  /* ── Visibility helpers ── */
  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: initial !important;
  }

  /* ── Filtros: apilados y full-width ── */
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }

  .filter-row>.form-control,
  .filter-row>.form-select,
  .filter-row>.tabs {
    width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
  }

  .filter-row--year {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }

  .filter-row--year .month-scroll {
    flex: 1;
    min-width: 0;
  }

  /* ── Modal grids: 1 columna en mobile ── */
  .modal-grid,
  .modal-grid--3 {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
  }

  /* ── Stat card wide: reset span N en mobile ── */
  .stat-card--wide {
    grid-column: auto !important;
  }

  /* ── TABLAS → CARDS en mobile (patrón responsive) ── */
  /*
    * Cualquier tabla dentro de .table-wrap--cards se transforma en
    * una pila de cards. Las celdas con data-label muestran su etiqueta
    * en mobile. Las columnas con data-col="select"/"actions" se ocultan
    * salvo en pantallas grandes (configurable por tabla).
    */
  .table-wrap--cards table,
  .table-wrap--cards thead,
  .table-wrap--cards tbody,
  .table-wrap--cards tr,
  .table-wrap--cards td,
  .table-wrap--cards th {
    display: block;
  }

  .table-wrap--cards thead {
    position: absolute;
    left: -9999px;
    top: -9999px;
  }

  .table-wrap--cards tr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem;
    margin-bottom: .65rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  }

  .table-wrap--cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    text-align: right;
    gap: .75rem;
    min-height: 1.6rem;
  }

  .table-wrap--cards td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .table-wrap--cards td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
    flex-shrink: 0;
    max-width: 45%;
  }

  /* data-label=" " (espacio) → ocultar el pseudo-label (selector y acciones) */
  .table-wrap--cards td[data-label=" "]:before {
    display: none;
  }

  /* En mobile, las celdas select/actions se vuelven una fila horizontal al final */
  .table-wrap--cards td[data-col="select"] {
    position: absolute;
    top: .65rem;
    right: .65rem;
    padding: 0;
    border: none;
    min-height: 0;
  }

  .table-wrap--cards td[data-col="actions"] {
    margin-top: .5rem;
    padding-top: .65rem;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    gap: .35rem;
  }

  .table-wrap--cards td[data-col="actions"]:before {
    display: none;
  }

  .table-wrap--cards td[data-col="actions"] .btn {
    padding: .55rem .75rem;
    min-height: 44px;
    min-width: 44px;
  }

  /* La celda de descripción se hace bloque completo y la primera */
  .table-wrap--cards tr td[data-col="desc"] {
    display: block;
    padding: 0 0 .5rem 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
    margin-bottom: .25rem;
  }

  .table-wrap--cards tr td[data-col="desc"]:before {
    display: none;
  }

  /* Monto más prominente */
  .table-wrap--cards td[data-col="amount"] {
    font-size: 1.05rem;
  }

  /* Asegurar que el botón de estado no rompa la card */
  .table-wrap--cards td[data-col="status"] form {
    margin: 0;
  }
}

/* Bottom Nav Styles */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(15, 17, 26, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: none;
  /* Hidden by default (desktop) */
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  flex: 1;
  transition: all 0.2s;
}

.bottom-link i {
  font-size: 1.2rem;
}

.bottom-link.active {
  color: var(--accent-light);
}

/* Mobile Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
}

.drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: var(--bg-layer);
  z-index: 2001;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.drawer.open {
  left: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.drawer-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.drawer-link i {
  width: 20px;
  color: var(--accent-light);
}

.sort-btns {
  display: inline-flex;
  gap: 2px;
  margin-left: 8px;
  vertical-align: middle
}

.sort-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  transition: all .15s;
  padding: 0;
  line-height: 1
}

.sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow)
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary)
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: .3
}

.empty-state p {
  font-size: .9rem;
  max-width: 400px;
  margin: 0 auto
}

.pagination {
  display: flex;
  justify-content: center;
  gap: .3rem;
  margin-top: 1.5rem;
  flex-wrap: wrap
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none
}

.page-item:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.page-item.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff
}

.page-item.disabled {
  opacity: .3;
  pointer-events: none
}

.bell-btn {
  position: relative
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-base);
  line-height: 1;
  pointer-events: none
}

.section-tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
  overflow-x: auto;
  scrollbar-width: none
}

.section-tab {
  padding: .45rem 1rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: none;
  transition: all .15s
}

.section-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card)
}

.section-tab.active {
  color: var(--accent);
  background: var(--accent-glow)
}

.theme-dropdown {
  position: relative;
  display: inline-block
}

.theme-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  display: none;
  z-index: 300;
  padding: 4px;
  overflow: hidden
}

.theme-menu.open {
  display: block;
  animation: fadeIn .15s ease
}

.theme-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: 6px;
  font-size: .82rem;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all .1s
}

.theme-option:hover {
  background: var(--bg-card);
  color: var(--text-primary)
}

.theme-option.active {
  color: var(--accent);
  background: var(--accent-glow)
}

@media(max-width:480px) {

  .stats-grid,
  .stats-grid-3col {
    grid-template-columns: 1fr
  }

  /* En mobile pequeño, el font-size 1.4rem de stat-card--wide queda mejor a 1.2rem */
  .stat-card--wide .stat-value {
    font-size: 1.2rem !important;
  }

  /* Card de tabla: un poco más compacta */
  .table-wrap--cards tr {
    padding: .65rem;
  }

  /* Botones de paginación más compactos */
  .pagination-row .btn {
    padding: .3rem .55rem;
    font-size: .8rem;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
  border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .2)
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, .1);
  border-radius: 24px;
  transition: .3s
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s
}

input:checked+.slider {
  background: var(--accent)
}

input:checked+.slider:before {
  transform: translateX(18px)
}

.flash {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2001;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: .75rem;
  animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s
}

.flash.success {
  background: rgba(16, 185, 129, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1)
}

.flash.error {
  background: rgba(244, 63, 94, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1)
}

@keyframes slideInUp {
  from {
    transform: translateY(100px) scale(0.9);
    opacity: 0
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1
  }
}

.btn-back-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .3s;
  font-size: .8rem
}

.btn-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.btn-back-top:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text-primary);
  border-color: var(--border-hover)
}

.d-mobile {
  display: none;
}

.d-desktop {
  display: flex;
}

@media(max-width:768px) {
  .d-mobile {
    display: flex;
  }

  .d-desktop {
    display: none;
  }
}

/* Privacy Mode */
.privacy-active .privacy-blur {
  filter: blur(8px) !important;
  user-select: none !important;
  pointer-events: none !important;
  transition: filter 0.3s ease !important;
}

/* User Profile Dropdown */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
}

.user-avatar:hover {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.user-dropdown-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .2rem;
}

.user-dropdown-email {
  font-size: .75rem;
  color: var(--text-muted);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .85rem;
  transition: all .2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.user-dropdown-item i {
  width: 18px;
  text-align: center;
  font-size: .9rem;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: .25rem 0;
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */

.notification-wrapper {
  position: relative;
}

.notification-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  font-size: 1.1rem;
}

.notification-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.notification-btn.has-notifications {
  color: var(--warning);
}

.notification-btn.has-notifications:hover {
  background: var(--warning-bg);
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warning);
  color: #000;
  animation: pulse-badge 2s infinite;
}

.notif-badge.urgent {
  background: var(--danger);
  color: #fff;
  animation: pulse-badge-urgent 1s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes pulse-badge-urgent {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--danger); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 4px transparent; }
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.notif-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-mark-read {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s ease;
  font-size: .8rem;
}

.notif-mark-read:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
}

.notif-body {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  gap: .75rem;
}

.notif-empty i {
  font-size: 2rem;
  opacity: .4;
}

.notif-empty span {
  font-size: .85rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all .15s ease;
  position: relative;
  cursor: pointer;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-card-hover);
}

.notif-item.notif-warning {
  border-left: 3px solid var(--warning);
}

.notif-item.notif-urgent {
  border-left: 3px solid var(--danger);
  background: var(--danger-bg);
}

.notif-item.notif-info {
  border-left: 3px solid var(--accent);
}

.notif-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  font-size: .9rem;
}

.notif-warning .notif-icon {
  background: var(--warning-bg);
  color: var(--warning);
}

.notif-urgent .notif-icon {
  background: rgba(239, 68, 68, .15);
  color: var(--danger);
}

.notif-info .notif-icon {
  background: rgba(99, 102, 241, .15);
  color: var(--accent);
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-desc {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-bottom: .1rem;
}

.notif-item-detail {
  font-size: .7rem;
  color: var(--text-muted);
}

.notif-item-amount {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: .25rem;
}

.notif-urgent-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  animation: blink 1s infinite;
  margin-top: .35rem;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.notif-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
}

.notif-footer a {
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
}

.notif-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .notification-dropdown {
    width: calc(100vw - 2rem);
    right: -60px;
  }
}

/* Social footer links */
.social-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
}

.social-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: all .25s ease;
}

.social-footer-link:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ========================================
   Entrance animations (global, reusa fadeIn)
   ======================================== */

/* Page header — todas las páginas */
.page-header {
  animation: fadeIn .45s ease both;
}

/* Stats grid — dashboard + inversiones */
.stats-grid .stat-card {
  animation: fadeIn .4s ease both;
}

.stats-grid .stat-card:nth-child(1) {
  animation-delay: .04s;
}

.stats-grid .stat-card:nth-child(2) {
  animation-delay: .08s;
}

.stats-grid .stat-card:nth-child(3) {
  animation-delay: .12s;
}

.stats-grid .stat-card:nth-child(4) {
  animation-delay: .16s;
}

.stats-grid .stat-card:nth-child(5) {
  animation-delay: .2s;
}

.stats-grid .stat-card:nth-child(6) {
  animation-delay: .24s;
}

/* Grids de cards — cuentas, presupuestos, admin, seguridad */
.row-2>*,
.row-3>* {
  animation: fadeIn .4s ease both;
}

.row-2>*:nth-child(1),
.row-3>*:nth-child(1) {
  animation-delay: .04s;
}

.row-2>*:nth-child(2),
.row-3>*:nth-child(2) {
  animation-delay: .08s;
}

.row-3>*:nth-child(3) {
  animation-delay: .12s;
}

/* Proyección hero card — presupuestos, recurrentes, seguridad */
.proyection-card {
  animation: fadeIn .45s ease both;
  animation-delay: .1s;
}



/* ═══════════════════════════════════════════════════════════════
   CARDS V2 — Command Center Design
   ═══════════════════════════════════════════════════════════════ */

/* Proyección banner */
.proy-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(16, 185, 129, .05));
  border: 1px solid rgba(99, 102, 241, .15);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.4rem;
  animation: fadeIn .45s ease both;
}

.proy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.proy-top-label {
  font-size: .7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.proy-link {
  font-size: .75rem;
  color: var(--accent-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: color .2s;
}

.proy-link:hover {
  color: var(--accent);
}

.proy-months {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .1rem;
}

.proy-months::-webkit-scrollbar {
  display: none;
}

.proy-month {
  flex-shrink: 0;
  text-align: center;
  padding: .35rem .65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: default;
  min-width: 70px;
}

.proy-month.current {
  border-color: var(--accent);
  background: rgba(99, 102, 241, .12);
  box-shadow: 0 0 0 1px var(--accent);
}

.proy-month-name {
  font-size: .62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.proy-month.current .proy-month-name {
  color: var(--accent);
  font-weight: 700;
}

.proy-month-val {
  font-family: 'DM Mono', monospace;
  font-size: .9rem;
  font-weight: 700;
  color: var(--warning);
  margin-top: .1rem;
}

.proy-month.current .proy-month-val {
  color: var(--accent-light);
  font-size: 1rem;
}

.proy-month-rollover {
  font-size: .58rem;
  color: var(--danger);
  margin-top: .08rem;
  font-weight: 600;
}

/* Total bolsillo card */
.total-bolsillo-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(16, 185, 129, .08));
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  animation: fadeIn .45s ease both;
  animation-delay: .1s;
}

.total-bolsillo-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.total-bolsillo-header i {
  color: var(--accent);
  font-size: 1.1rem;
}

.total-bolsillo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.total-bolsillo-stat {
  border-radius: 10px;
  padding: .8rem;
}

.stat-bruto {
  background: rgba(245, 158, 11, .1);
}

.stat-rollover {
  background: rgba(239, 68, 68, .1);
}

.stat-real {
  background: rgba(16, 185, 129, .15);
  border: 1px solid rgba(16, 185, 129, .3);
}

.stat-label {
  font-size: .68rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
}

.stat-val {
  font-family: 'DM Mono', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.stat-bruto .stat-val {
  color: var(--warning);
}

.stat-rollover .stat-val {
  color: var(--danger);
}

.stat-real .stat-val {
  color: var(--success);
  font-size: 1.5rem;
}

.stat-sub {
  font-size: .65rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.stat-real .stat-sub {
  color: var(--success);
  font-weight: 600;
}

.stat-real .stat-sub i {
  margin-right: .2rem;
}

.total-bolsillo-info {
  padding: .75rem;
  background: rgba(99, 102, 241, .08);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  font-size: .72rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.total-bolsillo-info i {
  margin-right: .3rem;
}

/* Info banner */
.info-banner {
  margin-bottom: 1.5rem;
  padding: .8rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(16, 185, 129, .06));
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  animation: fadeIn .45s ease both;
  animation-delay: .15s;
}

.info-banner i:first-child {
  color: var(--warning);
  font-size: .9rem;
  margin-top: .1rem;
  flex-shrink: 0;
}

.info-banner strong {
  color: var(--text-primary);
}

/* Jump nav */
.jump-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-base);
  padding: .45rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  animation: fadeIn .4s ease both;
  animation-delay: .2s;
}

.jump-inner {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.jump-inner::-webkit-scrollbar {
  display: none;
}

.jump-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}

.jump-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-glow);
}

.jump-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.brand-dot {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .58rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.brand-visa {
  background: linear-gradient(135deg, #1a1f71, #1434cb);
}

.brand-mastercard {
  background: linear-gradient(135deg, #eb001b, #f79e1b);
}

.brand-amex {
  background: linear-gradient(135deg, #2e77bc, #1c4a7a);
}

.brand-generic {
  background: linear-gradient(135deg, #555, #888);
}

.jump-name {
  font-size: .76rem;
}

/* Tarjeta Card (tc) */
.tc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
  overflow: hidden;
  transition: border-color .2s;
  animation: fadeIn .4s ease both;
}

.tc:hover {
  border-color: var(--border-hover);
}

.tc:nth-child(1) {
  animation-delay: .25s;
}

.tc:nth-child(2) {
  animation-delay: .3s;
}

.tc:nth-child(3) {
  animation-delay: .35s;
}

/* TC Header */
.tc-header {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

@media(max-width:768px) {
  .tc-header {
    grid-template-columns: 1fr;
  }

  .tc-status {
    text-align: left !important;
  }
}

/* Mini plastic card */
.tc-plastic {
  width: 110px;
  height: 68px;
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.tc-plastic::before {
  content: '';
  position: absolute;
  top: -15px;
  right: -15px;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.plastic-visa {
  background: linear-gradient(145deg, #080c2a 0%, #152780 100%);
}

.plastic-mastercard {
  background: linear-gradient(145deg, #12080e 0%, #2e0a1a 65%, #16080e 100%);
}

.plastic-amex {
  background: linear-gradient(145deg, #060810 0%, #0e1a30 100%);
}

.plastic-generic {
  background: linear-gradient(145deg, #1a1a1a 0%, #2a2a2a 100%);
}

.tc-plastic-chip {
  position: absolute;
  top: 9px;
  left: 11px;
  width: 20px;
  height: 14px;
  background: linear-gradient(135deg, #d4a843, #f0c050);
  border-radius: 3px;
}

.tc-plastic-brand {
  position: absolute;
  top: 8px;
  right: 9px;
  font-size: .58rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
}

.tc-plastic-num {
  position: absolute;
  bottom: 9px;
  left: 11px;
  font-family: 'DM Mono', monospace;
  font-size: .58rem;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .1em;
}

/* TC Info */
.tc-info {
  min-width: 0;
}

.tc-name {
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.tc-meta {
  font-size: .68rem;
  color: var(--text-secondary);
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .45rem;
}

.tc-meta span {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.tc-bar-wrap {
  max-width: 250px;
}

.tc-bar-track {
  height: 3px;
  background: rgba(255, 255, 255, .06);
  border-radius: 2px;
  overflow: hidden;
}

.tc-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .5s;
}

.tc-bar-label {
  font-size: .62rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

/* TC Status */
.tc-status {
  text-align: right;
  flex-shrink: 0;
  min-width: 130px;
}

.tc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}

.s-vencido {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, .2);
}

.s-pendiente {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, .2);
}

.s-pagado {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .2);
}

.tc-amount {
  font-family: 'DM Mono', monospace;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.tc-amount.vencido {
  color: var(--danger);
}

.tc-amount.pendiente {
  color: var(--warning);
}

.tc-amount.pagado {
  color: var(--success);
}

.tc-date {
  font-size: .65rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

/* TC CTA */
.tc-cta {
  padding: .7rem 1.35rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(99, 102, 241, .04), transparent);
}

.btn-load {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.15rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .2s;
  flex-shrink: 0;
}

.btn-load:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.cta-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-tool:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.btn-tool.t-warn:hover {
  border-color: rgba(245, 158, 11, .35);
  color: var(--warning);
  background: var(--warning-bg);
}

.btn-tool.t-danger:hover {
  border-color: rgba(244, 63, 94, .35);
  color: var(--danger);
  background: var(--danger-bg);
}

/* TC Tabs */
.tc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tc-tabs::-webkit-scrollbar {
  display: none;
}

.tc-tab {
  display: flex;
  align-items: center;
  gap: .38rem;
  padding: .65rem 1.1rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  background: none;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.tc-tab:hover {
  color: var(--text-secondary);
}

.tc-tab.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.tab-chip {
  font-size: .6rem;
  padding: .08rem .38rem;
  border-radius: 10px;
  font-weight: 700;
}

.tc-OK {
  background: var(--success-bg);
  color: var(--success);
}

.tc-BAD {
  background: var(--danger-bg);
  color: var(--danger);
}

.tc-WRN {
  background: var(--warning-bg);
  color: var(--warning);
}

.tc-ACC {
  background: rgba(99, 102, 241, .15);
  color: var(--accent-light);
}

/* TC Panel */
.tc-panel {
  display: none;
  padding: 1.1rem 1.35rem;
}

.tc-panel.active {
  display: block;
  animation: panelIn .18s ease;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(3px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2rem;
  margin-bottom: .5rem;
  opacity: .5;
}

/* Collapse animation */
.collapse-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.collapse-body.open {
  max-height: 2000px;
}

/* Pay options */
.pay-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-bottom: 1rem;
}

@media(max-width:600px) {
  .pay-options {
    grid-template-columns: 1fr;
  }
}

.pay-opt {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: .85rem 1rem;
  cursor: pointer;
  background: var(--glass);
  position: relative;
  transition: all .15s;
}

.pay-opt:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.pay-opt.sel {
  border-color: var(--accent);
  background: rgba(99, 102, 241, .07);
  box-shadow: 0 0 0 1px var(--accent);
}

.pay-opt-label {
  font-size: .68rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .35rem;
}

.pay-opt-amount {
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: .2rem;
}

.pay-opt-sub {
  font-size: .65rem;
  color: var(--text-muted);
}

.pay-radio {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-opt.sel .pay-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.pay-opt.sel .pay-radio::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

/* Rollover info */
.rollover-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .7rem .9rem;
  margin-bottom: .85rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, .1), rgba(239, 68, 68, .07));
  border: 1px solid rgba(245, 158, 11, .25);
  border-radius: 9px;
}

.rollover-info-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.rollover-info-body {
  flex: 1;
  min-width: 0;
}

.rollover-info-label {
  font-size: .68rem;
  color: var(--warning);
  font-weight: 700;
  margin-bottom: .1rem;
}

.rollover-info-val {
  font-family: 'DM Mono', monospace;
  font-size: .9rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.rollover-info-sub {
  font-size: .62rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: 'DM Sans', sans-serif;
}

/* Payment breakdown (new) */
.payment-breakdown {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-bottom: 1.2rem;
}

.breakdown-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .8rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: all .2s;
}

.breakdown-item:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
}

.breakdown-item.rollover {
  background: linear-gradient(135deg, rgba(245, 158, 11, .08), rgba(239, 68, 68, .05));
  border-color: rgba(245, 158, 11, .25);
}

.breakdown-item.cuotas {
  background: linear-gradient(135deg, rgba(59, 130, 246, .08), rgba(99, 102, 241, .05));
  border-color: rgba(59, 130, 246, .25);
}

.breakdown-item.recurrentes {
  background: linear-gradient(135deg, rgba(168, 85, 247, .08), rgba(236, 72, 153, .05));
  border-color: rgba(168, 85, 247, .25);
}

.breakdown-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.breakdown-content {
  flex: 1;
  min-width: 0;
}

.breakdown-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: .25rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.breakdown-amount {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .15rem;
}

.breakdown-sub {
  font-size: .64rem;
  color: var(--text-muted);
  font-weight: 400;
}

.breakdown-total {
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, .12), rgba(5, 150, 105, .08));
  border: 2px solid rgba(16, 185, 129, .3);
  border-radius: 10px;
  margin-top: .4rem;
}

.breakdown-total-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.breakdown-total-amount {
  font-family: 'DM Mono', monospace;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: .25rem;
}

.breakdown-total-sub {
  font-size: .68rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Unified payment block (nuevo - sin repetición) */
.unified-payment-block {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.unified-total {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
}

.unified-total-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .4rem;
}

.unified-total-amount {
  font-family: 'DM Mono', monospace;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: .3rem;
}

.unified-total-date {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.unified-breakdown {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.2rem;
  padding: .8rem;
  background: var(--hover-bg);
  border-radius: 8px;
}

.unified-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}

.unified-breakdown-row.rollover {
  color: var(--danger);
  font-weight: 600;
}

.unified-breakdown-label {
  color: var(--text-secondary);
}

.unified-breakdown-amount {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  color: var(--text-primary);
}

.unified-breakdown-row.rollover .unified-breakdown-amount {
  color: var(--danger);
}

/* Confirm zone */
.confirm-zone {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .8rem 1rem;
  background: rgba(16, 185, 129, .05);
  border: 1px solid rgba(16, 185, 129, .18);
  border-radius: 9px;
  transition: all .2s;
  position: relative;
  z-index: 2002;
}

.confirm-zone.rev {
  background: var(--danger-bg);
  border-color: rgba(244, 63, 94, .22);
  position: relative;
  z-index: 2002;
}

.confirm-zone-label {
  font-size: .75rem;
  color: var(--text-secondary);
  flex: 1;
  min-width: 120px;
}

.confirm-zone-label strong {
  color: var(--text-primary);
}

.confirm-wrap {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.confirm-input {
  width: 94px;
  height: 34px;
  background: var(--bg-base);
  border: 1px solid rgba(16, 185, 129, .3);
  border-radius: 7px;
  color: var(--success);
  font-family: 'DM Mono', monospace;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  padding: 0 .45rem;
  outline: none;
  transition: all .15s;
}

.confirm-input:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .15);
}

.confirm-input.rev {
  border-color: rgba(244, 63, 94, .3);
  color: var(--danger);
}

.confirm-input.rev:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, .15);
}

.btn-confirm {
  height: 34px;
  padding: 0 1rem;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 700;
  cursor: not-allowed;
  opacity: .35;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.btn-confirm.go {
  opacity: 1;
  cursor: pointer;
}

.btn-confirm.go:hover {
  transform: translateY(-1px);
}

.btn-confirm.go.c-green:hover {
  background: #059669;
}

.btn-confirm.rev {
  background: var(--danger);
}

.btn-confirm.go.rev:hover {
  background: #e11d48;
}

/* Parcial inline */
.parcial-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.parcial-label {
  font-size: .76rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ip-group {
  display: flex;
}

.ip-prefix {
  padding: 0 .65rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: 7px 0 0 7px;
  color: var(--text-muted);
  font-size: .82rem;
  display: flex;
  align-items: center;
}

.ip-input {
  height: 34px;
  padding: 0 .65rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: none;
  border-radius: 0 7px 7px 0;
  color: var(--text-primary);
  font-family: 'DM Mono', monospace;
  font-size: .85rem;
  font-weight: 700;
  outline: none;
  transition: border-color .15s;
}

.ip-input:focus {
  border-color: var(--accent);
}

.btn-parcial {
  height: 34px;
  padding: 0 .9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: all .15s;
}

.btn-parcial:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(99, 102, 241, .08);
}

.rollover-preview {
  font-size: .72rem;
  color: var(--warning);
  font-family: 'DM Mono', monospace;
  font-weight: 700;
}

/* Paid block */
.paid-block {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, .22);
  border-radius: 11px;
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}

.paid-block-left {
  flex: 1;
}

.paid-block-label {
  font-size: .7rem;
  color: var(--success);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .25rem;
}

.paid-block-amount {
  font-family: 'DM Mono', monospace;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--success);
}

.paid-block-date {
  font-size: .64rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

.paid-block-right {
  font-size: .7rem;
  color: var(--text-muted);
  max-width: 180px;
  line-height: 1.5;
}

/* Sub label */
.sub-label {
  font-size: .67rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .7rem 0 .4rem;
}

.sub-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Gasto row */
.gasto-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .7rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  margin-bottom: .35rem;
  transition: background .12s;
}

.gasto-row:hover {
  background: var(--bg-card-hover);
}

.gasto-main {
  flex: 1;
  min-width: 0;
}

.gasto-desc {
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 270px;
}

.gasto-meta {
  font-size: .63rem;
  color: var(--text-muted);
  margin-top: .1rem;
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
}

.cprog {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.cprog-bar {
  width: 44px;
  height: 2.5px;
  background: rgba(255, 255, 255, .07);
  border-radius: 2px;
  overflow: hidden;
}

.cprog-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.gasto-amount {
  font-family: 'DM Mono', monospace;
  font-size: .88rem;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
  min-width: 70px;
}

.ga-ars {
  color: var(--warning);
}

.ga-usd {
  color: var(--accent-light);
}

.gasto-actions {
  display: flex;
  gap: .2rem;
  flex-shrink: 0;
}

.btn-xs {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: .6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
}

.btn-xs:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, .1);
}

.btn-xs.del:hover {
  border-color: rgba(244, 63, 94, .4);
  color: var(--danger);
  background: var(--danger-bg);
}

/* USD block */
.usd-block {
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: 10px;
  overflow: hidden;
  margin-top: .75rem;
}

.usd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .85rem;
  background: rgba(99, 102, 241, .07);
  border-bottom: 1px solid rgba(99, 102, 241, .12);
}

.usd-head-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.usd-head-total {
  font-family: 'DM Mono', monospace;
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent-light);
}

.usd-body {
  padding: .55rem .85rem;
}

.usd-pay-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .45rem .6rem;
  background: rgba(99, 102, 241, .06);
  border: 1px solid rgba(99, 102, 241, .14);
  border-radius: 7px;
  margin-top: .5rem;
}

.usd-pay-label {
  font-size: .68rem;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.usd-pay-input {
  width: 78px;
  height: 26px;
  background: var(--bg-base);
  border: 1px solid rgba(99, 102, 241, .3);
  border-radius: 6px;
  color: var(--accent-light);
  font-family: 'DM Mono', monospace;
  font-size: .76rem;
  font-weight: 700;
  text-align: center;
  padding: 0 .35rem;
  outline: none;
}

.usd-pay-result {
  font-family: 'DM Mono', monospace;
  font-size: .8rem;
  font-weight: 700;
  color: var(--success);
}

.btn-usd {
  height: 26px;
  padding: 0 .65rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}

.btn-usd:hover {
  background: var(--accent-light);
}

/* USD paid badge */
.usd-paid-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .5rem .65rem;
  margin-top: .5rem;
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .25);
  border-radius: 7px;
}

.usd-paid-text {
  font-size: .7rem;
  color: var(--success);
}

.btn-revert {
  height: 24px;
  padding: 0 .55rem;
  background: transparent;
  border: 1px solid rgba(244, 63, 94, .3);
  border-radius: 5px;
  color: var(--danger);
  font-size: .65rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
  white-space: nowrap;
}

.btn-revert:hover {
  background: var(--danger-bg);
}

/* Mes pills */
.mes-pills {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  margin-bottom: .8rem;
}

.mes-pill {
  padding: .28rem .6rem;
  border-radius: 7px;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid;
  cursor: pointer;
  transition: all .15s;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.2;
}

.mp-past {
  color: var(--text-muted);
  border-color: rgba(107, 114, 128, .18);
}

.mp-cur {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.mp-fut {
  background: rgba(16, 185, 129, .1);
  color: var(--success);
  border-color: rgba(16, 185, 129, .28);
}

.mp-sel {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.mp-amount {
  font-size: .6rem;
  display: block;
  margin-top: .06rem;
  font-family: 'DM Mono', monospace;
  opacity: .85;
}

/* Mes detail */
.mes-detail {
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
  animation: panelIn .15s ease;
}

.mes-detail-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .65rem;
}

.mes-detail-title {
  font-weight: 700;
  font-size: .88rem;
}

.mes-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  padding: .22rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  color: var(--text-secondary);
}

.mes-row:last-child {
  border-bottom: none;
}

.mes-row.total {
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  margin-top: .3rem;
  padding-top: .4rem;
}

.mes-row span:last-child {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
}

/* Resumen grid */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  margin-bottom: .9rem;
}

@media(max-width:600px) {
  .res-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.res-stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  padding: .65rem .8rem;
}

.res-stat-label {
  font-size: .62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .22rem;
}

.res-stat-val {
  font-family: 'DM Mono', monospace;
  font-size: .95rem;
  font-weight: 700;
}

/* Progress bar */
.progress {
  height: 5px;
  background: rgba(255, 255, 255, .06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .5s;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .18rem .52rem;
  border-radius: 5px;
  font-size: .67rem;
  font-weight: 600;
}

.b-ok {
  background: var(--success-bg);
  color: var(--success);
}

.b-bad {
  background: var(--danger-bg);
  color: var(--danger);
}

.b-wrn {
  background: var(--warning-bg);
  color: var(--warning);
}

.b-acc {
  background: rgba(99, 102, 241, .14);
  color: var(--accent-light);
}

.b-neu {
  background: rgba(255, 255, 255, .07);
  color: var(--text-secondary);
}
/* ── Σ Selection Footer (spike style) ── */
.sel-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(90vw, 650px);
  min-height: 48px;
  background: rgba(99, 102, 241, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.6);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -8px 32px rgba(99, 102, 241, 0.25);
  z-index: 200;
  padding: 0.6rem 1rem;
  visibility: hidden;
}
.sel-footer.visible,
.sel-footer[style*="flex"] {
  visibility: visible;
}
.sel-footer-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.sel-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
}
.sel-divider {
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
}
.sel-total {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: #fff;
}
.sel-type-badge {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
}
#clearSelectionBtn,
#bulkDeleteBtn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
}
#clearSelectionBtn:hover,
#bulkDeleteBtn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
}
#bulkDeleteBtn {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}
#bulkDeleteBtn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: rgba(239, 68, 68, 0.8);
}

/* ── Σ Selection Summary (inline header bar) ── */
.selection-summary {
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}

.selection-summary.hidden {
  display: none !important;
}

.selection-summary:not(.hidden) {
  display: flex;
}
.selection-summary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(165, 180, 252, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}
.selection-summary-header i {
  color: rgba(165, 180, 252, 1);
}
.selection-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.ss-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.ss-card:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(99, 102, 241, 0.5);
}
.ss-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(165, 180, 252, 0.85);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.ss-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.1;
  transition: color 0.3s ease;
}
.ss-sub {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.8);
  margin-top: 0.25rem;
}

/* Stats-grid originales con transición suave de opacidad */
.stats-grid {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-grid.stats-dimmed {
  opacity: 0.45;
  filter: grayscale(0.3);
}

/* Pulso sutil en los cards cuando hay selección activa */
.ss-card {
  animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.ss-card:nth-child(1) { animation-delay: 0.08s; }
.ss-card:nth-child(2) { animation-delay: 0.15s; }
.ss-card:nth-child(3) { animation-delay: 0.22s; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ═══════════════════════════════════════
   DASHBOARD REDESIGN — HERO BALANCE
   ═══════════════════════════════════════ */
.hero-balance {
  background: linear-gradient(135deg, var(--bg-layer) 0%, #1a1d26 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.hero-balance::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  opacity: .4;
  pointer-events: none;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.hero-eyebrow-left {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}

.hero-eyebrow-left i { color: var(--accent); }

.hero-date-badge {
  font-size: .7rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: .25rem .65rem;
  border-radius: 20px;
}

.hero-balance-amount {
  font-family: 'DM Mono', monospace;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: .4rem;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #fff 0%, #c4c4d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-balance-label {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.hero-metric {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  transition: all .25s;
}

.hero-metric:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.hero-metric-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 500;
  margin-bottom: .5rem;
}

.hero-metric-label i { font-size: .65rem; }
.hero-metric-label .fa-arrow-up { color: var(--success); }
.hero-metric-label .fa-arrow-down { color: var(--danger); }
.hero-metric-label .fa-piggy-bank { color: var(--accent); }

.hero-metric-value {
  font-family: 'DM Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.hero-metric-value.income { color: var(--success); }
.hero-metric-value.expense { color: var(--danger); }
.hero-metric-value.net { color: var(--accent-light); }

.hero-metric-sub {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* ═══════════════════════════════════════
   QUICK STATS ROW (no repetition)
   ═══════════════════════════════════════ */
.quick-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.quick-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity .3s;
}

.quick-stat-card:hover::before { opacity: 1; }
.quick-stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.quick-stat-card.accent-violet::before { background: var(--violet); }
.quick-stat-card.accent-blue::before { background: var(--blue); }
.quick-stat-card.accent-success::before { background: var(--success); }
.quick-stat-card.accent-danger::before { background: var(--danger); }

.quick-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.quick-stat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

.quick-stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.quick-stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.quick-stat-icon.success { background: var(--success-soft); color: var(--success); }
.quick-stat-icon.danger { background: var(--danger-soft); color: var(--danger); }

.quick-stat-trend {
  font-size: .65rem;
  padding: .15rem .45rem;
  border-radius: 20px;
  font-weight: 600;
}

.quick-stat-trend.up { background: var(--success-soft); color: var(--success); }
.quick-stat-trend.down { background: var(--danger-soft); color: var(--danger); }
.quick-stat-trend.neutral { background: var(--warning-soft); color: var(--warning); }

.quick-stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.quick-stat-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}

.quick-stat-breakdown {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.quick-stat-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .75rem;
  line-height: 1.4;
}

.quick-stat-breakdown-row span:first-child {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-secondary);
}


.quick-stat-breakdown-row span:last-child {
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  font-size: .65rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   METRIC CARD BREAKDOWN (spike design)
   ═══════════════════════════════════════ */
.metric-card-breakdown {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.metric-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .72rem;
}

.metric-breakdown-row span:first-child {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-muted);
  font-size: .68rem;
}

.metric-breakdown-row span:last-child {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  font-size: .68rem;
  color: var(--text-secondary);
}

.metric-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: .25rem 0;
}

.metric-card-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}

.metric-card-trend {
  font-size: .65rem;
  font-weight: 600;
  padding: .15rem .4rem;
  border-radius: 20px;
}

.metric-card-trend.trend-up    { background: var(--success-soft); color: var(--success); }
.metric-card-trend.trend-down  { background: var(--danger-soft);  color: var(--danger);  }
.metric-card-trend.trend-neutral { background: var(--warning-soft); color: var(--warning); }

/* ═══════════════════════════════════════
   CARDS SECTION — MINI CARDS GRID
   ═══════════════════════════════════════ */
.cards-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .75rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-title i { color: var(--accent); }

.mini-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

/* ═══════════════════════════════════════
   PROYECCIÓN BANNER (8 months horizontal scroll)
   ═══════════════════════════════════════ */
.proy-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.proy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
  gap: .5rem;
}

.proy-top-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.proy-top-label i {
  color: var(--accent);
  font-size: .9rem;
}

.proy-top-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  border-radius: 8px;
  padding: .3rem .65rem;
  font-size: .72rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
}

.proy-top-cta:hover {
  background: rgba(99, 102, 241, 0.16);
}

.proy-months {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: thin;
}

.proy-month-card {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
  min-width: 135px;
  transition: all .2s;
}

.proy-month-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.proy-month-card.is-current {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent);
}

.proy-month-card.is-danger {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.4);
}

.proy-month-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .35rem;
}

.proy-month-value {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .4rem;
}

.proy-month-card.is-current .proy-month-value {
  color: var(--accent-light);
}

.proy-month-card.is-danger .proy-month-value {
  color: var(--danger);
}

.proy-month-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .35rem;
}

.proy-month-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .3s;
}

.proy-month-card.is-current .proy-month-bar-fill {
  background: var(--accent);
}

.proy-month-card.is-danger .proy-month-bar-fill {
  background: var(--danger);
}

.proy-month-sub {
  font-size: .68rem;
  color: var(--text-muted);
}

.proy-month-card.is-current .proy-month-sub {
  color: var(--accent-light);
  font-weight: 500;
}

.mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.mini-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  opacity: 0.7;
}

.mini-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.mini-card:hover::before {
  opacity: 1;
}

.mini-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
  gap: .5rem;
}

.mini-card-name {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mini-card-name i {
  color: var(--accent);
  font-size: 1rem;
}

.mini-card-body {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.mini-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-card-label {
  font-size: .78rem;
  color: var(--text-muted);
}

.mini-card-value {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: 'DM Mono', monospace;
}

.mini-card-bank {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.mini-card-bank-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
}

.mini-card-bank-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mini-card-bank-type {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mini-card-badge {
  font-size: .6rem;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.badge-open { background: var(--success-soft); color: var(--success); }
.badge-closed { background: var(--danger-soft); color: var(--danger); }
.badge-pending { background: var(--warning-soft); color: var(--warning); }

.mini-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.mini-card-stat {
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  padding: .6rem .75rem;
}

.mini-card-stat-label {
  font-size: .62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}

.mini-card-stat-value {
  font-family: 'DM Mono', monospace;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mini-card-stat-value.danger { color: var(--danger); }
.mini-card-stat-value.warning { color: var(--warning); }
.mini-card-stat-value.success { color: var(--success); }

.mini-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mini-card-last {
  font-size: .68rem;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  letter-spacing: .04em;
}

.mini-card-bar {
  height: 5px;
  background: var(--bg-base);
  border-radius: 3px;
  overflow: hidden;
  margin-top: .25rem;
}

.mini-card-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

.mini-card-footer {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-card-dates {
  display: flex;
  gap: 1rem;
}

.mini-card-date {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  color: var(--text-muted);
}

.mini-card-date i { font-size: .6rem; }

.mini-card-cta {
  font-size: .72rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .2rem;
  font-weight: 600;
  transition: color .2s;
}

.mini-card-cta:hover { color: var(--accent-light); }

/* ═══════════════════════════════════════
   PROYECCIÓN BANNER (horizontal scroll)
   ═══════════════════════════════════════ */
.proy-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.proy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.proy-top-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.proy-top-label i { color: var(--violet); }

.proy-months {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
}

.proy-months::-webkit-scrollbar { display: none; }

.proy-month-card {
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  min-width: 140px;
  transition: all .25s;
}

.proy-month-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}

.proy-month-label {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}

.proy-month-value {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.proy-month-value.highlight { color: var(--accent); }
.proy-month-value.danger { color: var(--danger); }

.proy-month-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  margin-top: .5rem;
  overflow: hidden;
}

.proy-month-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .5s cubic-bezier(0.4, 0, 0.2, 1);
}

.proy-month-bar-fill.accent { background: var(--accent); }
.proy-month-bar-fill.danger { background: var(--danger); }
.proy-month-bar-fill.violet { background: var(--violet); }
.proy-month-bar-fill.blue { background: var(--blue); }

.proy-month-sub {
  font-size: .6rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* ═══════════════════════════════════════
   TIPS / ALERTS GRID
   ═══════════════════════════════════════ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: all .25s;
  position: relative;
}

.tip-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.tip-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.tip-icon.warning { background: var(--warning-soft); color: var(--warning); }
.tip-icon.critical { background: var(--danger-soft); color: var(--danger); }
.tip-icon.success { background: var(--success-soft); color: var(--success); }
.tip-icon.info { background: var(--blue-soft); color: var(--blue); }
.tip-icon.violet { background: var(--violet-soft); color: var(--violet); }
.tip-icon.accent { background: var(--accent-glow); color: var(--accent-light); }

.tip-content { flex: 1; min-width: 0; }

.tip-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .2rem;
}

.tip-message {
  font-size: .75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.tip-action {
  font-size: .72rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-top: .4rem;
  font-weight: 500;
  transition: color .2s;
}

.tip-action:hover { color: var(--accent-light); }

.tip-dismiss {
  position: absolute;
  top: .5rem;
  right: .6rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  transition: all .2s;
  line-height: 1;
  z-index: 2;
}

.tip-dismiss:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: scale(1.1);
}

.tips-footer {
  text-align: center;
  margin-top: .5rem;
}

.tips-more-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .75rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
}

.tips-more-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.tips-more-btn i {
  transition: transform .2s;
}

/* ═══════════════════════════════════════
   QUICK ACTIONS ROW
   ═══════════════════════════════════════ */
.actions-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.action-btn:hover {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
  color: var(--accent-light);
}

.action-btn i {
  font-size: .85rem;
  width: 20px;
  text-align: center;
}

.action-btn.primary-action {
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.action-btn.primary-action:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   USD ROW (multi-currency summary)
   ═══════════════════════════════════════ */
.usd-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.usd-badge {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.usd-stat {
  font-size: .75rem;
  color: var(--text-secondary);
}

.usd-stat strong { font-weight: 600; }
.usd-stat strong.success { color: var(--success); }
.usd-stat strong.danger { color: var(--danger); }

.usd-tasa {
  margin-left: auto;
  font-size: .68rem;
  color: var(--accent);
  background: rgba(99,102,241,0.1);
  padding: .2rem .55rem;
  border-radius: 8px;
}

/* ═══════════════════════════════════════
   SELECTION SUMMARY (inline header bar)
   ═══════════════════════════════════════ */
.selection-summary {
  /* display controlled by .hidden class */
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}

.selection-summary.hidden {
  display: none !important;
}

.selection-summary:not(.hidden) {
  display: flex;
}

.selection-summary-card {
  background: var(--bg-layer);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  min-width: 200px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.ss-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .15rem;
}

.ss-value {
  font-family: 'DM Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
}

.ss-value.success { color: var(--success); }
.ss-value.danger { color: var(--danger); }
.ss-value.net { color: var(--accent-light); }

/* ═══════════════════════════════════════
   ANIMATIONS — DASHBOARD ENTRANCE
   ═══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.08s; opacity: 0; }
.delay-2 { animation-delay: 0.16s; opacity: 0; }
.delay-3 { animation-delay: 0.24s; opacity: 0; }
.delay-4 { animation-delay: 0.32s; opacity: 0; }
.delay-5 { animation-delay: 0.40s; opacity: 0; }

/* ═══════════════════════════════════════
   RESPONSIVE — DASHBOARD
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-metrics { grid-template-columns: 1fr; }
  .quick-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hero-balance { padding: 1.25rem 1.5rem; }
  .quick-stats-row { grid-template-columns: 1fr; }
  .mini-cards-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
}

/* ─── REPORTE: Premium visual styles ─────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .report-section { break-inside: avoid; page-break-inside: avoid; }
  nav, .toast-container, .brand-bg, .btn-back-top, .user-menu, [data-action] { display: none !important; }
  main { margin-top: 0 !important; padding-top: 0 !important; }
  .print-header { display: block !important; }
  .card { border: 1px solid #ddd !important; box-shadow: none !important; }
}

.print-header { display: none; text-align: center; padding: 1rem; border-bottom: 2px solid var(--accent); margin-bottom: 1.5rem; }
.print-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: .3rem; }
.print-header p { color: #666; font-size: .85rem; }

.report-score { background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.08) 100%); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }

.score-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-elevated); border: 4px solid var(--accent); }
.score-number { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.score-label { font-size: .7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.score-category { font-size: .85rem; font-weight: 600; margin-top: 2px; }

.insight-item { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem .75rem; border-radius: 8px; font-size: .82rem; line-height: 1.4; }
.insight-item.success { background: rgba(16, 185, 129, 0.08); border-left: 3px solid var(--success); }
.insight-item.warning { background: rgba(245, 158, 11, 0.08); border-left: 3px solid var(--warning); }
.insight-item.danger { background: rgba(244, 63, 94, 0.08); border-left: 3px solid var(--danger); }
.insight-item.info { background: rgba(99, 102, 241, 0.08); border-left: 3px solid var(--accent); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; text-align: center; position: relative; overflow: hidden; }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.kpi-card.income::before { background: var(--success); }
.kpi-card.expense::before { background: var(--danger); }
.kpi-card.balance::before { background: var(--accent); }
.kpi-card.net::before { background: var(--warning); }
.kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: .3rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; font-family: 'DM Mono', monospace; margin-bottom: .3rem; }
.kpi-delta { font-size: .78rem; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

.metricas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.metrica-item { display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; border-radius: 8px; background: var(--bg-elevated); border: 1px solid var(--border); }
.metrica-name { font-size: .78rem; color: var(--text-secondary); }
.metrica-value { font-size: .9rem; font-weight: 600; font-family: 'DM Mono', monospace; }
.metrica-value.success { color: var(--success); }
.metrica-value.warning { color: var(--warning); }
.metrica-value.danger { color: var(--danger); }

.report-section { margin-bottom: 1.5rem; }
.section-header { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }

.report-table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.report-table th { text-align: left; padding: .5rem .75rem; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.report-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border-soft); }
.report-table tr:last-child td { border-bottom: none; }
.report-table .num { text-align: right; font-family: 'DM Mono', monospace; }

.progress-mini { width: 60px; height: 6px; background: var(--border); border-radius: 3px; display: inline-block; vertical-align: middle; }
.progress-mini-fill { height: 100%; border-radius: 3px; }

/* ═══════════════════════════════════════
   SELECTION BAR v2 (header, always rendered)
   Two states: --empty (hint) and --active (stats + actions)
   ═══════════════════════════════════════ */
.selection-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  border-radius: 8px;
  padding: .45rem .85rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
  animation: ssFadeIn 0.2s ease-out;
}

@keyframes ssFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.selection-summary--empty {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.selection-summary--active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

.selection-summary__hint {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-style: italic;
}
.selection-summary__hint[hidden] { display: none !important; }

.selection-summary__hint i {
  opacity: .6;
}

.selection-summary__stats {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.selection-summary__stats[hidden] { display: none !important; }

.selection-summary__count {
  font-size: .8rem;
  font-weight: 700;
  color: rgba(165, 180, 252, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.selection-summary__divider {
  width: 1px;
  height: 24px;
  background: rgba(99, 102, 241, 0.25);
}

.selection-summary__item {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  text-align: center;
}

.selection-summary__label {
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(165, 180, 252, .55);
  font-weight: 600;
}

.selection-summary__value {
  font-size: .95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: 'DM Mono', monospace;
}

.selection-summary__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: .5rem;
  padding-left: .75rem;
  border-left: 1px solid rgba(99, 102, 241, 0.25);
}
.selection-summary__actions[hidden] { display: none !important; }

.ss-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ss-btn i { font-size: .75rem; }

.ss-btn--limpiar {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}

.ss-btn--limpiar:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.ss-btn--eliminar {
  background: rgba(244, 63, 94, 0.15);
  color: #fca5a5;
  border-color: rgba(244, 63, 94, 0.35);
}

.ss-btn--eliminar:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.6);
  color: #fff;
}

@media (max-width: 768px) {
  .selection-summary__divider { display: none; }
  .selection-summary__stats { gap: .5rem; }
  .selection-summary__actions { margin-left: 0; padding-left: 0; border-left: none; }
}



/* ═══════════════════════════════════════
   HELP PAGE — Collapsible details
   ═══════════════════════════════════════ */
.help-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.help-details > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1rem;
  cursor: pointer;
  font-weight: 500;
  font-size: .95rem;
  color: var(--text);
  list-style: none;
  user-select: none;
  transition: background .15s;
}

.help-details > summary::-webkit-details-marker {
  display: none;
}

.help-details > summary::before {
  content: '\f0da';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--text-muted);
  font-size: .7rem;
  transition: transform .2s;
  margin-right: .25rem;
}

.help-details[open] > summary::before {
  transform: rotate(90deg);
}

.help-details > summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.help-details > *:not(summary) {
  padding: 0 1rem 1rem 1rem;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.help-details > *:not(summary) > p:first-child {
  margin-top: 0;
}

.help-details > ul {
  margin: .5rem 0;
  padding-left: 1.5rem;
}

.help-details > ul li {
  margin: .25rem 0;
}

/* ── Help page (extracted from help.html inline <style>) ── */
.help-section { margin-bottom: 2rem; }
.help-section h3 { margin: 1.5rem 0 .75rem; font-size: 1.15rem; }
.help-section h4 { margin: 1.25rem 0 .5rem; font-size: 1rem; color: var(--accent); }
.help-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.help-card p { margin: 0 0 .5rem; line-height: 1.6; color: var(--text-secondary); }
.help-card p:last-child { margin-bottom: 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 700; color: var(--text-primary); margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.faq-a { color: var(--text-secondary); line-height: 1.6; padding-left: 1.5rem; }
.tip-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 1rem; display: flex; gap: .75rem; align-items: start; }
.tip-box i { color: #d97706; margin-top: 2px; }
.tip-box div { font-size: .9rem; color: #78350f; line-height: 1.6; }
.warning-box { background: var(--danger-bg); border: 1px solid var(--danger); border-radius: 8px; padding: 1rem; display: flex; gap: .75rem; align-items: start; }
.warning-box i { color: var(--danger); margin-top: 2px; }
.warning-box div { font-size: .9rem; line-height: 1.6; }
.flow-step { display: flex; align-items: start; gap: 1rem; margin-bottom: 1rem; }
.flow-number { min-width: 32px; height: 32px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.flow-content { flex: 1; }
.flow-content strong { display: block; margin-bottom: .25rem; color: var(--text-primary); }
.flow-content span { color: var(--text-secondary); font-size: .9rem; }

/* ── Help page — flow-based redesign (Jun 2026) ── */
.help-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  text-align: center;
}
.help-hero h2 { margin: 0 0 .5rem; font-size: 1.4rem; color: var(--text-primary); }
.help-hero > p { margin: 0 0 1.5rem; color: var(--text-secondary); font-size: .95rem; }

.flow-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 0 auto;
  max-width: 700px;
}
.flow-step { display: flex; flex-direction: column; align-items: center; gap: .5rem; flex: 1; min-width: 110px; }
.flow-step .step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: .9rem;
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.flow-step .step-label { font-size: .78rem; color: var(--text-secondary); font-weight: 600; text-align: center; }
.flow-arrow { color: var(--text-muted); font-size: .85rem; margin-top: -18px; padding: 0 .25rem; }

.help-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.help-step-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.help-step-num {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0; color: #fff;
}
.help-step-num.paso1 { background: var(--accent); }
.help-step-num.paso2 { background: var(--success); }
.help-step-num.paso3 { background: var(--violet); }
.help-step-num.paso4 { background: var(--blue); }
.help-step-header-text h3 { margin: 0 0 .25rem; font-size: 1.2rem; color: var(--text-primary); }
.help-step-header-text p { margin: 0 0 .5rem; color: var(--text-secondary); font-size: .88rem; }

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 600;
  margin: 2px 4px 2px 0;
}
.tag-accent { background: var(--accent-soft); color: var(--accent-light); }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-violet { background: var(--violet-soft); color: var(--violet); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }

.subcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.subcard { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; padding: 1rem; }
.subcard h4 {
  margin: 0 0 .5rem; font-size: .88rem; color: var(--text-primary);
  display: flex; align-items: center; gap: .5rem;
}
.subcard h4 i { color: var(--accent-light); font-size: .82rem; }
.subcard p { margin: 0 0 .5rem; font-size: .82rem; color: var(--text-secondary); line-height: 1.5; }
.subcard p:last-child { margin-bottom: 0; }
.subcard code {
  background: var(--bg-layer);
  padding: .1rem .4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: var(--accent-light);
}

.trouble-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .85rem; }
.trouble-table th, .trouble-table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); }
.trouble-table th { color: var(--text-muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.trouble-table td { color: var(--text-secondary); }
.trouble-table td:first-child { color: var(--text-primary); font-weight: 500; }

.changelog-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); text-align: center; }
.changelog-foot details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem 1rem;
  display: inline-block;
  font-size: .82rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.changelog-foot summary { list-style: none; }
.changelog-foot summary::-webkit-details-marker { display: none; }
.changelog-foot .v-line {
  display: block;
  margin-top: .4rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 720px) {
  .flow-stepper { flex-direction: column; gap: .5rem; }
  .flow-arrow { transform: rotate(90deg); margin-top: 0; }
  .help-step-header { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════
   REPORT GRIDS — mobile-responsive wrappers
   Replaces hardcoded inline `display:grid;grid-template-columns:1fr 1fr`
   patterns in /reporte so 2-col and 3-col layouts collapse to a single
   column on small viewports (≤768px). Custom gap/margin kept inline at
   the call site so each section can tune its own spacing.
   ═══════════════════════════════════════ */
.report-grid {
  display: grid;
}
.report-grid-2col {
  grid-template-columns: 1fr 1fr;
}
.report-grid-3col {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 768px) {
  .report-grid-2col,
  .report-grid-3col {
    grid-template-columns: 1fr;
  }
  .report-score {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}
