.gasto-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin:0 0 20px}.gasto-top h2{margin:0;font-size:20px;color:#142642}.gasto-top p{margin:5px 0 0;font-size:14px;color:#657b95}.gasto-empty{padding:28px 20px;background:#fff;border:1px solid #d8e4f1;border-radius:10px;color:#657b95}.gasto-table-wrap{overflow:auto;border:1px solid #d8e4f1;border-radius:10px;background:#fff}.gasto-table-wrap .admin-table{min-width:700px}.gasto-status{display:inline-block;padding:4px 8px;border-radius:5px;background:#eef3f8;color:#526781;font-size:12px;font-weight:700;white-space:nowrap}.gasto-pendiente{background:#fff4db;color:#875b00}.gasto-devuelta{background:#fff0ed;color:#9b3b2b}.gasto-aprobada{background:#e7f2fb;color:#175d9d}.gasto-abonada{background:#e9f6ed;color:#1d7440}.gasto-filters{display:flex;gap:4px;overflow:auto;margin:0 0 16px;border-bottom:1px solid #d8e4f1}.gasto-filters button{border:0;border-bottom:3px solid transparent;background:none;padding:10px 14px;color:#61738a;white-space:nowrap;font:inherit;font-weight:700;cursor:pointer}.gasto-filters button[aria-pressed=true]{color:#1a5fa8;border-bottom-color:#1a5fa8}.gasto-filters span{color:#657b95;font-weight:400}.gasto-dialog{width:min(1050px,calc(100vw - 40px))}.gasto-heading{align-items:flex-start;padding-bottom:18px;border-bottom:1px solid #d8e4f1;margin-bottom:18px}.gasto-heading h2{margin:4px 0 8px}.gasto-label{display:grid;gap:5px;font-size:13px;font-weight:700;color:#435872}.gasto-label input,.gasto-line input{font:inherit;font-weight:400;border:1px solid #cddbec;border-radius:6px;padding:9px 10px;width:100%;min-width:0;color:#17243b;background:#fff}.gasto-section-title{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:22px 0 10px}.gasto-section-title h3{font-size:16px;margin:0}.gasto-link,.gasto-remove{border:0;background:none;color:#1a5fa8;font:inherit;font-weight:700;cursor:pointer}.gasto-line{display:grid;grid-template-columns:145px minmax(180px,1.3fr) 120px minmax(140px,1fr) 30px;gap:10px;align-items:end;padding:10px 0;border-top:1px solid #e7edf4}.gasto-line label{display:grid;gap:5px;font-size:12px;color:#64748a}.gasto-remove{font-size:23px;line-height:1;padding:8px}.gasto-total{display:flex;justify-content:flex-end;align-items:baseline;gap:16px;padding:16px 0;color:#5a708a}.gasto-total strong{font-size:21px;color:#125eac}.gasto-receipt{border-top:1px solid #e7edf4;padding:15px 0;display:flex;align-items:end;gap:20px;flex-wrap:wrap}.gasto-receipt small{display:block;color:#657b95;margin-top:5px}.gasto-actions{display:flex;justify-content:flex-end;align-items:end;gap:10px;flex-wrap:wrap;margin-top:16px}.gasto-message{color:#a33525;font-size:14px}.gasto-message:empty{display:none}.gasto-return{padding:12px 14px;border-left:3px solid #d77331;background:#fff7ef;border-radius:4px;margin-bottom:16px}.gasto-return p{margin:3px 0 0}.gasto-history{margin-top:20px;border-top:1px solid #e7edf4;padding-top:14px;color:#61748a;font-size:13px}.gasto-history summary{cursor:pointer;font-weight:700}.gasto-history p{margin:6px 0}.gasto-detail small,.gasto-detail strong{display:block}.gasto-detail small,.gasto-muted{color:#657b95}.gasto-detail strong{margin-top:4px}@media(max-width:800px){.gasto-line{grid-template-columns:1fr 1fr}.gasto-line label:nth-child(2),.gasto-line label:nth-child(4){grid-column:1/-1}.gasto-remove{justify-self:end}.gasto-dialog{width:calc(100vw - 24px)}.gasto-top{flex-wrap:wrap}}
#detail.gastos-view>.hero{display:none}
.gasto-period-inputs{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}.gasto-period-inputs .gasto-label{min-width:150px}.gasto-label select,.gasto-line select{font:inherit;font-weight:400;border:1px solid #cddbec;border-radius:6px;padding:9px 10px;width:100%;min-width:0;color:#17243b;background:#fff}.gasto-period-fixed{margin-bottom:16px}.gasto-period-fixed small,.gasto-period-fixed strong{display:block}.gasto-period-fixed small{color:#657b95}.gasto-period-fixed strong{margin-top:4px}.gasto-line{grid-template-columns:140px 155px minmax(155px,1.2fr) 105px minmax(130px,1fr) 30px}@media(max-width:800px){.gasto-line{grid-template-columns:1fr 1fr}.gasto-line label:nth-child(2),.gasto-line label:nth-child(4){grid-column:auto}.gasto-line label:nth-child(3),.gasto-line label:nth-child(5){grid-column:1/-1}}

/* La cabecera y los controles de la nota permanecen visibles al recorrer los gastos. */
.gasto-dialog.gasto-edit-mode[open]{display:flex;flex-direction:column;height:min(760px,calc(100dvh - 48px));overflow:hidden}
.gasto-edit-mode .gasto-heading{position:static;flex:none;margin-bottom:14px}
.gasto-meta{display:grid;grid-template-columns:minmax(130px,160px) minmax(100px,120px) minmax(0,1fr);gap:12px;align-items:end;flex:none}
.gasto-meta .gasto-period-inputs{display:contents}
.gasto-meta .gasto-period-inputs .gasto-label{min-width:0}
.gasto-meta .gasto-period-fixed{grid-column:span 2;margin:0;align-self:center}
.gasto-edit-mode .gasto-section-title{flex:none;margin:16px 0 8px}
.gasto-edit-mode .gasto-section-title h3{margin:0}
.gasto-scroll{flex:1 1 auto;min-height:80px;overflow:auto;overscroll-behavior:contain;padding-right:4px}
.gasto-footer{flex:none;border-top:1px solid #d8e4f1;padding-top:8px}
.gasto-footer .gasto-total{padding:5px 0}
.gasto-footer .gasto-receipt{padding:8px 0}
.gasto-footer .gasto-actions{margin-top:8px}
.gasto-footer .gasto-message{margin:4px 0}
@media(max-width:650px){.gasto-meta{grid-template-columns:1fr 1fr}.gasto-meta>.gasto-label{grid-column:1/-1}.gasto-meta .gasto-period-fixed{grid-column:1/-1}.gasto-dialog.gasto-edit-mode[open]{height:calc(100dvh - 24px)}}
@media(max-height:600px){.gasto-dialog.gasto-edit-mode[open]{height:auto;overflow:auto}.gasto-scroll{flex:none;max-height:220px}}
/* En pantallas pequeñas el formulario fluye completo y evita un área de edición estrecha. */
@media(max-width:650px){
 .gasto-dialog.gasto-edit-mode[open]{height:auto;max-height:calc(100dvh - 24px);overflow:auto}
 .gasto-edit-mode .gasto-heading{margin-bottom:12px}
 .gasto-scroll{flex:none;min-height:0;overflow:visible;padding-right:0}
 .gasto-footer{margin-top:12px}
 .gasto-line{grid-template-columns:1fr 1fr;gap:10px}
 .gasto-receipt{align-items:start}
}
.gasto-dialog [aria-invalid="true"]{border-color:#b32f28;outline:2px solid rgba(179,47,40,.15)}
.gasto-dialog :focus-visible,.vac-shell :focus-visible{outline:2px solid #1a5fa8;outline-offset:2px}
