/* juan: colores por sección y piezas propias, sobre la base visual de Presupuesto (style.css) */
body[data-sec="index"]     { --accent: #1d4ed8; --accent-dark: #1e3a8a; --accent-suave: #e4eafd; }
body[data-sec="mes"]       { --accent: #6d28d9; --accent-dark: #4c1d95; --accent-suave: #ece4fd; }
body[data-sec="herederos"] { --accent: #be185d; --accent-dark: #9d174d; --accent-suave: #fce4ee; }
body[data-sec="inmuebles"] { --accent: #0f766e; --accent-dark: #115e59; --accent-suave: #d9f5f0; }
body[data-sec="ajustes"]   { --accent: #475569; --accent-dark: #334155; --accent-suave: #e8ecf2; }
body[data-sec="usuarios"]  { --accent: #c2410c; --accent-dark: #9a3412; --accent-suave: #fdeadf; }
.menu a[data-sec="mes"]       { --tile: #7c3aed; }
.menu a[data-sec="herederos"] { --tile: #db2777; }
.menu a[data-sec="inmuebles"] { --tile: #0d9488; }
.menu a[data-sec="usuarios"]  { --tile: #ea580c; }
.marca-ico { background: linear-gradient(135deg, #6d28d9, #1d4ed8); }

.top-sucesion { font-weight: 600; color: var(--muted); margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salir { border: 0; background: none; cursor: pointer; }
form.inline { display: inline; margin: 0; }
.inline-flex { display: inline-flex; align-items: center; gap: 6px; margin: 0; flex-wrap: wrap; }
label.en-linea { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 14px; }
label.en-linea input, label.en-linea select { width: auto; margin: 0; }
label.check { display: flex; align-items: flex-start; gap: 6px; color: var(--text); font-size: 14px; }
label.check input { margin-top: 3px; }
input.corto { width: 80px; display: inline-block; }
input.medio { width: 160px; display: inline-block; margin: 0; padding: 4px 8px; font-size: 13px; }
.espacio { flex: 1; }
.acciones-fila { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; white-space: nowrap; }
.sin-margen { margin: 0; }
.abrir-mes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-left: auto; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }

.subnav { position: sticky; top: 55px; z-index: 15; display: flex; gap: 4px; overflow-x: auto; padding: 6px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 12px rgba(16, 28, 51, .06); }
.subnav a { padding: 6px 12px; border-radius: 8px; color: var(--accent-dark); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.subnav a:hover { background: var(--accent-suave); }
.seccion { scroll-margin-top: 120px; }
.card h3 { margin-top: 0; }
.tile-mini { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 6px; border-radius: 8px; color: #fff; font-size: 13px; vertical-align: -6px; }
.t-ing { background: #2a78d6; } .t-egr { background: #eb6834; } .t-con { background: #be185d; } .t-caja { background: #6d28d9; } .t-pag { background: #0f766e; }
.form-agregar { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pie-tabla { margin: 12px 0 0; }
.tabla-editable input { margin: 0; padding: 5px 8px; font-size: 14px; min-width: 110px; }
.tabla-editable td.n input { text-align: right; }
fieldset.participantes { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
fieldset.participantes legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
tr.inactivo td { opacity: .6; }
.vacio-card { border-left: 5px solid var(--accent); }
.zona-peligro { border-color: #f3c2c2; }
.zona-peligro summary { cursor: pointer; color: var(--err); font-weight: 600; }
.zona-peligro form { margin: 12px 0 0; }
.login-ico { width: 52px; height: 52px; font-size: 22px; color: #fff; margin-bottom: 8px; display: grid; place-items: center; border-radius: 14px; }
.login form label { margin-bottom: 12px; }

@media (max-width: 900px) {
  .subnav { top: 50px; }
  .abrir-mes { margin-left: 0; width: 100%; }
  .top-sucesion { font-size: 13px; }
}
@media print {
  .subnav, .abrir-mes, .form-agregar, .zona-peligro, .barra-mes, .pie-tabla { display: none !important; }
}
