* { 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;
}
/* ---- RECUADRO 1 (cabecera) ---- */
.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; }
/* ---- RECUADRO 2 (navegacion) ---- */
.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; }
/* ---- marcas comunes ---- */
.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 6px; }
.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;
}
/* ---- RECUADRO 3 (tarjetas presupuesto) ---- */
.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; }
/* ---- RECUADRO 4 (detalle de gastos) ---- */
.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; }
.cab-tab {
  display: flex; font-weight: 700; font-size: 12px; color: #475569;
  border-bottom: 2px solid #e2e8f0; padding-bottom: 6px; margin-bottom: 6px;
}
.gasto-fila { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.gf-fecha { width: 90px; }
.gf-desc { flex: 1; }
.gf-monto { width: 85px; text-align: right; }
.volver { margin-top: 12px; font-size: 13px; }
.volver a { color: #1e3c72; text-decoration: none; }
/* ---- formularios ---- */
.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; }
