/* ============================================================
   CONTROL FINANCIERO · B233 PRESUPUESTO
   ============================================================ */

.b233-shell{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.b233-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.b233-kicker{
  display:block;
  font-size:10px;
  letter-spacing:.12em;
  font-weight:800;
  color:#64748b;
  margin-bottom:4px;
}

.b233-hero h2{
  margin:0 0 4px;
}

.b233-period{
  display:flex;
  align-items:end;
  gap:8px;
}

.b233-period label{
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:11px;
  color:#64748b;
  font-weight:700;
}

.b233-period input{
  min-height:40px;
}

.b233-status-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.b233-status-card strong{
  display:block;
  font-size:20px;
  margin-bottom:3px;
}

.b233-status-card small{
  color:#64748b;
}

.b233-msg{
  padding:11px 13px;
  border-radius:11px;
  font-weight:700;
  font-size:13px;
}

.b233-msg.hidden{
  display:none;
}

.b233-msg.ok{
  display:block;
  background:#ecfdf5;
  border:1px solid #a7f3d0;
}

.b233-msg.error{
  display:block;
  background:#fef2f2;
  border:1px solid #fecaca;
}

.b233-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.b233-kpis .metric{
  min-width:0;
}

.b233-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.b233-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.b233-form .full{
  grid-column:1/-1;
}

.b233-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  align-items:center;
}

.b233-hidden{
  display:none!important;
}

.b233-reading{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.b233-reading-row{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:11px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#f8fafc;
}

.b233-reading-row span{
  color:#475569;
  font-size:13px;
  line-height:1.4;
}

.b233-table-wrap{
  width:100%;
  overflow-x:auto;
}

.b233-table{
  width:100%;
  border-collapse:collapse;
  min-width:850px;
}

.b233-table th,
.b233-table td{
  text-align:left;
  padding:10px 8px;
  border-bottom:1px solid #e5e7eb;
  vertical-align:middle;
  font-size:12px;
}

.b233-table th{
  color:#64748b;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.b233-table td small{
  display:block;
  color:#64748b;
  margin-top:3px;
}

.b233-badge{
  display:inline-block;
  border-radius:999px;
  padding:4px 7px;
  font-size:9px;
  font-weight:800;
}

.b233-badge.ingreso{
  background:#ecfdf5;
  border:1px solid #a7f3d0;
}

.b233-badge.egreso{
  background:#fff7ed;
  border:1px solid #fed7aa;
}

.b233-detail-total{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid #e5e7eb;
}

.b233-detail-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #e5e7eb;
}

.b233-detail-row div{
  min-width:0;
}

.b233-detail-row b{
  display:block;
}

.b233-detail-row small{
  display:block;
  color:#64748b;
  margin-top:3px;
}

.b233-integrity{
  font-size:12px;
}

.b233-integrity p{
  margin:4px 0 0;
  color:#475569;
  line-height:1.5;
}

@media(max-width:900px){
  .b233-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  .b233-hero,
  .b233-status-card{
    align-items:stretch;
    flex-direction:column;
  }

  .b233-period{
    justify-content:space-between;
  }

  .b233-grid{
    grid-template-columns:1fr;
  }

  .b233-form{
    grid-template-columns:1fr;
  }

  .b233-form .full{
    grid-column:auto;
  }

  .b233-kpis{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:420px){
  .b233-kpis{
    grid-template-columns:1fr;
  }
}
