* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: #eef2f7;
  display: flex; justify-content: center; padding: 24px 10px;
}
.contenedor { width: 600px; max-width: 100%; }
.recuadro {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  margin-bottom: 16px; padding: 16px;
}
.cabecera { background: linear-gradient(135deg, #1e3c72, #2a5298); color: #fff; text-align: center; }
.app-nombre { font-size: 24px; font-weight: 700; }
.version { font-size: 12px; background: #ffc107; color: #333; border-radius: 12px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }
.app-ai { font-size: 13px; color: #d4e0ff; margin-top: 5px; }
.iconos-linea { margin-top: 10px; font-size: 20px; letter-spacing: 12px; }
.nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: #1e3c72; font-weight: 600; padding: 9px 14px; border: 1px solid #cbd5e1; border-radius: 8px; }
.nav a:hover { background: #1e3c72; color: #fff; }
.titulo-rec { font-size: 14px; font-weight: 700; color: #1e3c72; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.vacio { color: #64748b; font-size: 14px; text-align: center; padding: 10px; }
.btn-icono { text-decoration: none; font-size: 18px; padding: 2px 4px; }
.btn-icono:hover { opacity: .7; }
.btn { display: inline-block; background: #1e3c72; color: #fff; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; text-decoration: none; font-family: inherit; margin-right: 6px; }
.budget-card { display: flex; justify-content: space-between; align-items: center; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; margin-bottom: 10px; text-decoration: none; color: inherit; transition: .2s; }
.budget-card:hover { border-color: #1e3c72; background: #f5f8ff; }
.bc-nombre { font-weight: 600; font-size: 15px; }
.bc-fecha { font-size: 12px; color: #64748b; }
.bc-total { text-align: right; font-weight: 700; color: #15803d; }
.bc-total small { color: #64748b; font-weight: 400; }
.titulo-detail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.titulo-detail .titulo-rec { margin: 0; flex: 1; }
.totales { background: #f1f5f9; border-radius: 8px; padding: 10px; margin-bottom: 12px; font-size: 14px; }
.totales div { padding: 2px 0; }

/* ---- Definiciones de columnas (FECHA / DESCRIPCION / PRESUPUESTO / PAGADO / ICONO) ---- */
.cab-tab {
  display: flex; align-items: center; font-weight: 700; font-size: 11px;
  color: #475569; border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px; margin-bottom: 6px; gap: 6px;
}
.c-fecha { width: 88px; }
.c-desc  { flex: 1; }
.c-monto { width: 82px; text-align: right; }
.c-icono { width: 30px; }

/* Cada gasto en UNA sola linea (sin wrap) */
.gasto-fila {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9;
  font-size: 13px; white-space: nowrap;
}
.gf-fecha { width: 88px; }
.gf-desc  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-monto { width: 82px; text-align: right; }
.gf-icono { width: 30px; text-align: center; }

.volver { margin-top: 12px; font-size: 13px; }
.volver a { color: #1e3c72; text-decoration: none; }
.form label { display: block; margin-bottom: 10px; font-size: 13px; color: #334155; font-weight: 600; }
.form input { width: 100%; padding: 9px; border: 1px solid #cbd5e1; border-radius: 6px; margin-top: 4px; font-size: 14px; }
.fila-crud { display: flex; justify-content: space-between; align-items: center; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; margin-bottom: 8px; font-size: 14px; }
.msg { background: #dcfce7; color: #166534; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid #bbf7d0; }
