/* =========================================================
   GESTOR GASTOS AVERNO - ESTILOS OSCUROS MOBILE-FIRST
   ========================================================= */

:root {
  --bg-main: #0a0e17;
  --bg-card: #131c2e;
  --bg-card-hover: #1b273f;
  --bg-input: #0f172a;
  
  --border-color: #243452;
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --color-green: #10b981;
  --color-green-hover: #059669;
  --color-green-glow: rgba(16, 185, 129, 0.35);

  --color-red: #ef4444;
  --color-red-hover: #dc2626;

  --color-blue: #3b82f6;
  --color-amber: #f59e0b;
  --color-purple: #8b5cf6;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset y caja base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, button {
  font-family: inherit;
}

input, textarea {
  user-select: auto;
  -webkit-user-select: auto;
}

/* Quitar flechas por defecto en inputs number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* =========================================================
   BARRA SUPERIOR (HEADER)
   ========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background-color: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.5));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
  background: linear-gradient(90deg, #fff, #fdba74);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-green);
}

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

.admin-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-nav:active {
  transform: scale(0.96);
}

.btn-accent {
  background-color: #064e3b;
  border-color: var(--color-green);
  color: #6ee7b7;
}

.btn-secondary {
  background-color: #1e293b;
  color: var(--text-muted);
}

.btn-danger-soft {
  background-color: #450a0a;
  border-color: #991b1b;
  color: #fca5a5;
  padding: 8px 10px;
}

/* =========================================================
   CONTENEDOR DE VISTAS (SPA)
   ========================================================= */
.app-view {
  display: none;
  min-height: calc(100vh - 65px);
  padding: 16px 16px calc(30px + var(--safe-bottom));
}

.app-view.active-view {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

/* =========================================================
   VISTA 1: MODO CARGA RÁPIDA (Adultos Mayores Friendly)
   ========================================================= */
.carga-container {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Tarjeta del Monto */
.monto-card {
  background: linear-gradient(180deg, #162238 0%, #101827 100%);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease;
}

.monto-card:focus-within {
  border-color: var(--color-green);
  box-shadow: 0 0 16px var(--color-green-glow);
}

.label-gigante {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #38bdf8;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.monto-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.simbolo-pesos {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--color-green);
  line-height: 1;
}

.input-monto-gigante {
  width: 100%;
  max-width: 320px;
  font-size: 3.2rem;
  font-weight: 900;
  color: #ffffff;
  background: transparent;
  border: none;
  outline: none;
  text-align: left;
  line-height: 1;
  padding: 4px 0;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.input-monto-gigante::placeholder {
  color: #334155;
}

/* Chips rápidos */
.quick-amounts {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn-chip {
  padding: 8px 14px;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-full);
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chip:active {
  background-color: #334155;
  transform: scale(0.95);
}

.btn-chip-clear {
  background-color: #3b0707;
  border-color: #7f1d1d;
  color: #fca5a5;
}

/* Botonera Táctil de Categorías */
.categorias-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.categorias-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cat-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 86px;
  padding: 12px 10px;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.cat-btn:active {
  transform: scale(0.96);
}

.cat-emoji {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.cat-label {
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.cat-check {
  display: none;
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  background-color: var(--color-green);
  color: #000;
  font-size: 0.8rem;
  font-weight: 900;
  border-radius: var(--radius-full);
  line-height: 22px;
  text-align: center;
}

/* Estilos de categoría seleccionada */
.cat-btn.selected {
  background: linear-gradient(180deg, #19334d 0%, #0f2238 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.cat-btn.selected .cat-check {
  display: block;
}

/* Campo Detalle */
.detalle-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label-detalle {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.fecha-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: var(--bg-card);
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.input-fecha-gasto {
  padding: 6px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.input-detalle {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-detalle:focus {
  border-color: #38bdf8;
}

.input-detalle::placeholder {
  color: var(--text-dim);
}

/* Botón Gigante Táctil Guardar Gasto */
.guardar-section {
  margin-top: 6px;
}

.btn-guardar-gigante {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--color-green-glow);
  transition: all 0.15s ease;
}

.btn-guardar-gigante:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px var(--color-green-glow);
}

.guardar-icon {
  font-size: 1.6rem;
}

.sound-helper {
  text-align: center;
  margin-top: 4px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* =========================================================
   VISTA 2: MODO PANEL ADMINISTRADOR
   ========================================================= */
.admin-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--bg-card);
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.filtro-tipo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tipo-filtro-tabs {
  display: flex;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.btn-tab-filtro {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tab-filtro:hover {
  color: #fff;
}

.btn-tab-filtro.active {
  background-color: #1e293b;
  color: #38bdf8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.selector-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-arrow {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-arrow:active {
  background-color: var(--bg-card-hover);
}

.input-mes, .input-dia {
  padding: 7px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.btn-chip-hoy {
  padding: 6px 12px;
  background-color: #1e3a8a;
  border: 1px solid #3b82f6;
  border-radius: var(--radius-sm);
  color: #93c5fd;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-chip-hoy:active {
  transform: scale(0.95);
}

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

.btn-toolbar {
  padding: 8px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toolbar:hover {
  background-color: var(--bg-card-hover);
}

.btn-csv {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0;
}

/* Tarjetas de Métricas */
.metricas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

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

.metric-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.metric-icon {
  font-size: 1.25rem;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 900;
  color: #ffffff;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.metric-footer {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.metric-principal .metric-value { color: var(--color-green); }
.metric-semana .metric-value { color: #fbbf24; }
.metric-secundaria .metric-value { color: #38bdf8; }
.metric-hoy .metric-value { color: #38bdf8; }
.metric-mes .metric-value { color: var(--color-green); }

/* Gráficos */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.chart-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-header {
  display: flex;
  flex-direction: column;
}

.chart-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
}

/* Historial de transacciones */
.historial-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.historial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.historial-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.historial-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.input-buscar {
  padding: 8px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  min-width: 220px;
}

.transacciones-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-transaccion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  gap: 12px;
  transition: border-color 0.15s ease;
}

.item-transaccion:hover {
  border-color: #3b82f6;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.item-emoji {
  font-size: 1.7rem;
  flex-shrink: 0;
}

.item-textos {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-categoria {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-nota {
  font-size: 0.85rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-fecha {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.item-valores {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-monto {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--color-green);
  white-space: nowrap;
}

.btn-eliminar-item {
  background-color: transparent;
  border: 1px solid #7f1d1d;
  color: #f87171;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.btn-eliminar-item:hover {
  background-color: #7f1d1d;
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* =========================================================
   MODALES
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

.modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 1.3rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: #fff;
}

/* Modal PIN */
.modal-pin-card {
  max-width: 380px;
  text-align: center;
}

.pin-display {
  padding: 20px 20px 10px;
}

.pin-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.pin-dots .dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 2px solid #475569;
  background-color: transparent;
  transition: all 0.15s ease;
}

.pin-dots .dot.filled {
  background-color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transform: scale(1.1);
}

.pin-dots.error-shake {
  animation: shake 0.35s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.pin-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 20px 20px;
}

.key-btn {
  height: 56px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.1s ease;
}

.key-btn:active {
  background-color: #334155;
  transform: scale(0.95);
}

.key-action {
  font-size: 1rem;
  color: #f87171;
}

.key-submit {
  font-size: 1rem;
  background-color: #065f46;
  border-color: var(--color-green);
  color: #6ee7b7;
}

.pin-default-info {
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-bottom: 16px;
}

/* Modal Configuración */
.modal-config-card {
  max-width: 520px;
}

.config-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.config-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.config-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background-color: #334155;
  color: #94a3b8;
}

.config-tag.active {
  background-color: #065f46;
  color: #6ee7b7;
}

.config-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
}

.input-text {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.input-text:focus {
  border-color: #38bdf8;
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-toggle-eye {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.form-actions-inline {
  display: flex;
  justify-content: flex-end;
}

.config-divider {
  border: none;
  height: 1px;
  background-color: var(--border-color);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.5);
}

.btn-primary-full {
  width: 100%;
  padding: 12px;
  background-color: var(--color-green);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary-full:active {
  background-color: var(--color-green-hover);
  transform: scale(0.98);
}

/* Modal Confirmar Eliminar */
.modal-confirm-card {
  max-width: 400px;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gasto-eliminar-preview {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.95rem;
}

.modal-warning {
  font-size: 0.8rem;
  color: #f87171;
}

.modal-actions-dual {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
}

.modal-actions-dual button {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.btn-danger {
  background-color: var(--color-red);
  border: none;
  color: #fff;
}

/* =========================================================
   TOAST FLOTANTE DE NOTIFICACIÓN
   ========================================================= */
.toast-notification {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background-color: #064e3b;
  border: 1px solid #10b981;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: toastPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.toast-error {
  background-color: #7f1d1d;
  border-color: #ef4444;
}

.toast-notification.toast-info {
  background-color: #1e3a8a;
  border-color: #3b82f6;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-size: 0.95rem;
}

@keyframes toastPop {
  from {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* =========================================================
   RESPONSIVE QUERIES
   ========================================================= */
@media (max-width: 480px) {
  .categorias-grid {
    grid-template-columns: 1fr;
  }
  
  .cat-btn {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 18px;
    min-height: 64px;
    gap: 14px;
  }

  .cat-label {
    text-align: left;
    font-size: 1.05rem;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .selector-controls {
    justify-content: space-between;
    width: 100%;
  }

  .input-mes {
    flex: 1;
    text-align: center;
  }

  .toolbar-actions {
    justify-content: space-between;
  }

  .btn-toolbar {
    flex: 1;
    text-align: center;
  }
}
