:root{
  --pistachio:#dfeccf;--pistachio-2:#edf5e3;--green:#607d3b;--green-dark:#3f5d28;
  --green-soft:#b9cf9f;--ink:#26352b;--muted:#6c776e;--line:#cfdac8;--surface:#fff;
  --bg:#f5f8f1;--amber:#a16c16;--red:#a44343;--blue:#4f7080;--shadow:0 12px 28px rgba(63,93,40,.09)
}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;font-family:Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}h1,h2,h3,p{margin-top:0}.eyebrow{font-size:11px;letter-spacing:.13em;font-weight:800;color:#6e8654}.muted{color:var(--muted)}
.auth-overlay{position:fixed;inset:0;z-index:1000;background:linear-gradient(140deg,#ecf4e2,#c7dcae);display:flex;align-items:center;justify-content:center;padding:20px}.auth-overlay.hidden{display:none}.auth-card{width:min(420px,95vw);background:#fff;border:1px solid #bfd1ad;border-radius:18px;padding:30px;box-shadow:0 30px 90px rgba(50,80,25,.22);display:grid;gap:10px}.auth-card h1{margin:3px 0 0}.auth-card p{color:var(--muted);line-height:1.5}.auth-card label,.dialog-form>label,.form-grid label{display:grid;gap:6px;font-size:12px;font-weight:800;color:#4d5e4d}.auth-card input,.dialog-form input,.dialog-form select,.dialog-form textarea,.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;background:#fff;color:var(--ink)}.form-error{min-height:18px;color:var(--red);font-size:12px;font-weight:700}.brand-mark{width:58px;height:58px;border-radius:16px;background:var(--green);color:#fff;display:grid;place-items:center;font-weight:900;font-size:20px;letter-spacing:.05em}.brand-mark.small{width:44px;height:44px;border-radius:12px;font-size:16px}
.auth-password-wrap{position:relative;display:flex;align-items:center}.auth-password-wrap input{padding-right:66px}.auth-password-toggle{position:absolute;right:8px;border:0;background:#edf4e6;color:var(--green-dark);font-size:12px;font-weight:800;padding:6px 9px;border-radius:6px;cursor:pointer}.auth-password-toggle:hover{background:var(--pistachio)}.auth-remember{margin:2px 0 5px;font-size:12px!important;font-weight:650!important}
.topbar{height:84px;padding:14px 26px;background:var(--pistachio);border-bottom:1px solid #b7cca2;display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow);position:sticky;top:0;z-index:20}.brand-block{display:flex;gap:13px;align-items:center}.topbar h1{font-size:28px;margin:1px 0;color:var(--green-dark)}.top-actions{display:flex;gap:12px;align-items:center}.user-chip{border:1px solid #aebe9f;background:rgba(255,255,255,.55);border-radius:999px;padding:8px 13px;display:flex;gap:7px;align-items:baseline}.user-chip span{font-weight:800}.user-chip small{color:var(--muted);text-transform:capitalize}
.layout{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:calc(100vh - 84px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:24px 18px;position:sticky;top:84px;height:calc(100vh - 84px);overflow:auto}.sidebar>label{display:block;font-size:12px;font-weight:800;color:var(--muted);margin:0 8px 7px}.sidebar select{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;background:#fff}.sidebar nav{display:grid;gap:7px;margin-top:22px}.nav-button{border:0;background:transparent;text-align:left;padding:12px 13px;border-radius:9px;font-weight:750;color:#4d5f50;cursor:pointer;display:flex;gap:10px;align-items:center}.nav-button span{width:24px;height:24px;border-radius:8px;background:#edf4e5;display:grid;place-items:center;font-size:12px}.nav-button:hover,.nav-button.active{background:var(--pistachio-2);color:var(--green-dark)}.nav-button.active span{background:var(--green);color:#fff}.sidebar-note{margin-top:28px;padding:14px;border:1px solid #c7d9b7;background:#f2f8ec;border-radius:11px;font-size:12px;line-height:1.45}.sidebar-note p{margin:6px 0 0;color:var(--muted)}
.content{padding:27px;min-width:0}.view{display:none}.view.active{display:block}.panel,.table-panel{background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.hero{padding:25px;display:flex;justify-content:space-between;gap:25px;align-items:center;background:linear-gradient(110deg,#fff,#f1f7e9)}.hero h2{font-size:25px;margin:4px 0 8px}.hero p{margin:3px 0}.hero-total{text-align:right;min-width:270px}.hero-total span{font-size:12px;color:var(--muted);font-weight:750}.hero-total strong{display:block;font-size:29px;color:var(--green-dark);margin-top:7px}.hero-total small{display:block;color:var(--muted);margin-top:4px}
.dashboard-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}.dashboard-card{border:1px solid var(--line);background:#fff;border-radius:13px;padding:17px;text-align:left;box-shadow:var(--shadow);display:flex;gap:13px;cursor:pointer;color:var(--ink)}.dashboard-card:hover{border-color:#9fb989;transform:translateY(-1px)}.dashboard-card .icon{width:42px;height:42px;border-radius:12px;background:var(--pistachio);color:var(--green-dark);display:grid;place-items:center;font-weight:900;font-size:19px}.dashboard-card span{display:block;font-size:12px;color:var(--muted);font-weight:750}.dashboard-card strong{display:block;font-size:19px;margin-top:3px}.dashboard-card small{display:block;color:var(--muted);margin-top:3px}.home-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}.panel-title{padding:17px 18px 10px;display:flex;align-items:center;justify-content:space-between}.panel-title h3{margin:0}.summary-list{padding:0 18px 18px}.summary-row{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px dashed #dde5d8}.summary-row:last-child{border-bottom:0}.summary-row span{color:var(--muted)}.summary-row strong{font-variant-numeric:tabular-nums}.security-message{display:flex;gap:15px;padding:10px 18px 22px;line-height:1.5}.security-message p{margin:5px 0;color:var(--muted)}.lock-icon{font-size:30px}.link-button{border:0;background:transparent;color:var(--green);font-weight:800;cursor:pointer}
.section-header,.subsection-header{display:flex;align-items:end;justify-content:space-between;gap:15px;margin-bottom:15px}.section-header h2{font-size:26px;margin:3px 0 0}.subsection-header h3{margin:0 0 5px}.subsection-header p{margin:0;color:var(--muted)}.actions{display:flex;gap:8px;flex-wrap:wrap}.button{border-radius:9px;padding:9px 13px;font-weight:800;font-size:13px;cursor:pointer;text-decoration:none;border:1px solid transparent}.button.primary{background:var(--green);color:#fff;border-color:var(--green)}.button.secondary{background:#fff;color:var(--green-dark);border-color:var(--line)}.button.ghost{background:transparent;color:var(--green-dark);border-color:#aebe9f}.button.danger{background:#fff4f4;color:var(--red);border-color:#ddb0b0}.button.lock-button{background:#fff8e8;color:#8a5b07;border-color:#e2c98f}.button.wide{width:100%;margin-top:8px}.button:disabled{opacity:.45;cursor:not-allowed}
.toolbar{padding:12px;display:grid;grid-template-columns:1fr 210px 170px;gap:10px;margin-bottom:14px}.toolbar.four{grid-template-columns:1fr 200px 160px 180px}.toolbar input,.toolbar select{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 12px;background:#fff}.toolbar-note{display:flex;align-items:center;justify-content:center;border:1px dashed #aebe9f;border-radius:9px;color:var(--muted);font-size:12px}.legend{display:flex;gap:15px;align-items:center;font-size:12px;color:var(--muted);margin:0 0 9px}.legend-pu{background:#d9e9c8;color:var(--green-dark);padding:5px 9px;border-radius:7px;font-weight:800}
.table-panel{overflow:auto}table{border-collapse:collapse;width:100%;min-width:820px}th,td{padding:10px 12px;border-bottom:1px solid #e5ebe1;text-align:left;font-size:13px;vertical-align:top}th{background:#edf4e6;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#526350;position:sticky;top:0;z-index:1}.num{text-align:right;font-variant-numeric:tabular-nums}.row-title td{background:#e6efd9;font-weight:850;color:#48642f}.row-pu td{background:#f1f7e9}.row-pu td:first-child{font-size:14px;font-weight:900;color:var(--green-dark);border-left:5px solid var(--green)}tr.clickable{cursor:pointer}tr.clickable:hover td{background:#eaf2e2}.badge{display:inline-block;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:850;white-space:nowrap}.badge.material{background:#e8f0e0;color:#4b6b32}.badge.mano_obra{background:#e4eef3;color:#3f6576}.badge.variable{background:#f5ebd8;color:#87600d}.badge.indirecto{background:#f3e4e8;color:#8a4456}.badge.mando_intermedio{background:#eee5f4;color:#6b4781}.badge.titulo{background:#dbe7cf;color:#455d35}.badge.precio_unitario{background:#d6e9c5;color:#355b25}.badge.basico{background:#e5edf6;color:#42647c}.badge.equipo_analizado{background:#eee5f4;color:#654681}.badge.active{background:#e5f3df;color:#3d6d2a}.badge.inactive{background:#f7e3e3;color:#984141}.small-button{border:1px solid #b8c9ad;background:#fff;color:var(--green-dark);border-radius:7px;padding:6px 8px;font-weight:750;cursor:pointer;font-size:11px;margin:1px}.small-button:hover{background:#edf5e7}.small-button.danger{color:var(--red);border-color:#dfbcbc}.pager{display:flex;justify-content:space-between;align-items:center;padding:12px 2px;font-size:13px;color:var(--muted)}.pager button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:7px 11px;cursor:pointer}.pager button:disabled{opacity:.4}
.subnav{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:15px;border-bottom:1px solid var(--line);padding-bottom:9px}.subnav-button{border:1px solid var(--line);background:#fff;color:#536353;border-radius:9px;padding:9px 11px;font-weight:750;cursor:pointer}.subnav-button.active{background:var(--green);color:#fff;border-color:var(--green)}.subview{display:none}.subview.active{display:block}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.budget-cards{grid-template-columns:repeat(5,minmax(0,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:15px;box-shadow:var(--shadow)}.card .label{font-size:11px;color:var(--muted);font-weight:750}.card .value{font-size:20px;font-weight:850;margin-top:7px}.card .note{font-size:11px;color:var(--muted);margin-top:4px}.advance-layout{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:16px}.advance-card{padding:22px}.advance-card span{display:block;color:var(--muted);font-size:12px;font-weight:750}.advance-card strong{display:block;font-size:28px;color:var(--green-dark);margin:8px 0}.advance-card small{color:var(--muted)}
.security-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.flat{border:0;border-radius:0;box-shadow:none}.history-list{padding:0 18px 18px;max-height:620px;overflow:auto}.history-item{padding:11px 0;border-bottom:1px solid #e3e9df}.history-item strong{display:block;font-size:13px}.history-item span{font-size:11px;color:var(--muted)}
 dialog{width:min(900px,95vw);max-height:92vh;border:0;border-radius:15px;padding:0;box-shadow:0 35px 100px rgba(25,45,20,.3);color:var(--ink)}dialog::backdrop{background:rgba(34,52,32,.58)}dialog .dialog-header{display:flex;justify-content:space-between;align-items:flex-start;padding:21px 23px 12px;border-bottom:1px solid #e4eadf}dialog .dialog-header h2{margin:3px 0 0}.icon-button{font-size:27px;border:0;background:transparent;color:#5d6b5e;cursor:pointer}.dialog-form{padding-bottom:0}.dialog-form.narrow{max-width:560px;margin:auto;padding:0}.form-grid{padding:18px 23px;display:grid;grid-template-columns:1fr 1fr;gap:13px}.span2{grid-column:1/-1}.dialog-form>label{margin:13px 23px}.checkbox{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:9px!important}.checkbox input{width:auto!important}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding:15px 23px 21px;border-top:1px solid #e4eadf}.warning-box{margin:16px 23px 8px;padding:12px;border-radius:9px;background:#fff7e8;border:1px solid #e5cb93;color:#79520c;font-size:12px;line-height:1.5}.apu-detail-top{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;flex:1}.dialog-summary .card{box-shadow:none;background:#f7faf4}.apu-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.dialog-table{margin:0 18px 18px;max-height:52vh;box-shadow:none}.toast{position:fixed;right:23px;bottom:23px;z-index:1100;padding:12px 15px;background:#26352b;color:#fff;border-radius:9px;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none;max-width:420px}.toast.show{opacity:1;transform:none}
@media(max-width:1150px){.dashboard-cards,.cards{grid-template-columns:repeat(2,1fr)}.budget-cards{grid-template-columns:repeat(3,1fr)}.home-grid,.security-grid{grid-template-columns:1fr}}
@media(max-width:780px){.topbar{padding:12px 15px}.user-chip{display:none}.layout{grid-template-columns:1fr}.sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line)}.sidebar nav{grid-template-columns:repeat(3,1fr)}.nav-button{justify-content:center;font-size:12px}.sidebar-note{display:none}.content{padding:15px}.hero{flex-direction:column;align-items:flex-start}.hero-total{text-align:left}.dashboard-cards,.cards,.budget-cards,.advance-layout{grid-template-columns:1fr}.toolbar,.toolbar.four{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}.section-header,.subsection-header{align-items:flex-start;flex-direction:column}.apu-detail-top{flex-direction:column;align-items:stretch}.dialog-summary{grid-template-columns:1fr}.apu-actions{justify-content:flex-start}.sidebar nav{display:flex;overflow:auto}.nav-button{min-width:max-content}}
@media print{.topbar,.sidebar,.actions,.button,.subnav,.pager{display:none!important}.layout{display:block}.content{padding:0}.view{display:block}.table-panel{box-shadow:none;border:0}th{position:static}}

.project-create{width:100%;margin-top:8px}

/* v3.0.3 — Altas, bajas y porcentajes operables */
.selection-hint{margin:0 0 10px;padding:10px 13px;border:1px solid #c6d6b9;background:#f6faef;border-radius:9px;color:#526350;font-size:13px}.selected-row td{background:#fff7cf!important}.materials-table th:last-child,.materials-table td:last-child{position:sticky;right:0;background:#fff;box-shadow:-5px 0 8px rgba(52,77,42,.07);z-index:2}.materials-table th:last-child{background:#edf4e6;z-index:3}.materials-table .selected-row td:last-child{background:#fff7cf!important}.row-actions{min-width:205px;white-space:nowrap}.price-edit-button{display:inline-flex;flex-direction:column;align-items:flex-end;gap:1px;border:1px solid #a9bf97;background:#f7fbf2;color:#355b25;border-radius:8px;padding:5px 8px;font-weight:850;cursor:pointer;font-variant-numeric:tabular-nums}.price-edit-button:hover{background:#e6f1dc;border-color:#6f924f}.price-edit-button small{font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:#607d3b}.price-readonly{white-space:nowrap}.material-row{cursor:pointer}.material-row:hover td{background:#f4f8ef}

.app-version{font-size:12px;font-weight:800;color:#6e8654;vertical-align:middle}.dialog-form small.muted{font-weight:500;line-height:1.35}.warning-box strong{color:#5f410b}

/* v3.1.0 — revisión compacta de Juegos y Presupuestos */
#gamesView .section-header{margin-bottom:10px;align-items:center}
#gamesView .section-header h2{font-size:21px;margin-top:1px}
#gamesView .eyebrow{font-size:9px}
#gamesView .toolbar{padding:8px;margin-bottom:8px}
#gamesView .toolbar input,#gamesView .toolbar select{padding:8px 10px;font-size:12px}
#gamesView .legend{margin-bottom:6px}
.games-table table{min-width:760px}
.games-table th,.games-table td{padding:6px 8px;font-size:11.5px;line-height:1.2}
.games-table th{font-size:9.5px}
.games-table .row-pu td:first-child{font-size:12px}
.games-table .small-button{padding:4px 6px;font-size:10px}
.apu-inactive td{opacity:.68}

.apu-dialog-compact{width:min(1120px,97vw);max-height:94vh}
.apu-dialog-compact .dialog-header{padding:12px 16px 8px}
.apu-dialog-compact .dialog-header h2{font-size:18px;line-height:1.15;margin:1px 0}
.apu-dialog-compact .dialog-header .eyebrow{font-size:10px}
.apu-dialog-compact .dialog-header p{margin:2px 0;font-size:10px}
.apu-dialog-compact .apu-detail-top{padding:8px 12px;gap:9px;align-items:center}
.apu-dialog-compact .dialog-summary{gap:6px}
.apu-dialog-compact .dialog-summary .card{padding:7px 9px;border-radius:8px}
.apu-dialog-compact .dialog-summary .card .label{font-size:9px}
.apu-dialog-compact .dialog-summary .card .value{font-size:15px;margin-top:2px}
.apu-dialog-compact .dialog-summary .card .note{font-size:9px;margin-top:1px}
.apu-dialog-compact .apu-actions{gap:4px}
.apu-dialog-compact .apu-actions .button{padding:6px 8px;font-size:10px;border-radius:7px}
.apu-dialog-compact .dialog-table{margin:0 10px 10px;max-height:62vh}
.apu-dialog-compact .dialog-table table{min-width:850px}
.apu-dialog-compact .dialog-table th,.apu-dialog-compact .dialog-table td{padding:5px 7px;font-size:10.5px;line-height:1.18}
.apu-dialog-compact .dialog-table th{font-size:9px}
.apu-dialog-compact .small-button{padding:4px 6px;font-size:9.5px}
.component-view-options{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 12px 7px;padding:6px 9px;background:#f4f8ef;border:1px solid #d5e0cc;border-radius:7px;font-size:10px;color:var(--muted)}
.component-view-options label{display:flex;align-items:center;gap:6px;font-weight:750;color:#4c6242}
.component-key-link{border:0;background:transparent;color:var(--green-dark);font:inherit;font-weight:900;text-decoration:underline;text-underline-offset:2px;cursor:pointer;padding:0;text-align:left}
.component-key-link:hover{color:#2f551c}
.deleted-component td{background:#f3f3f3!important;color:#7a7a7a;font-style:italic}

#budgetView{max-width:1180px;margin:0 auto}
#budgetView .section-header{margin-bottom:10px}
#budgetView .section-header h2{font-size:22px}
#budgetSubnav{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:6px;position:sticky;top:72px;z-index:8;background:var(--bg);padding:7px 0 9px;margin-bottom:11px}
#budgetSubnav .subnav-button{padding:7px 8px;font-size:11px;white-space:normal;line-height:1.15}
#budgetView .budget-cards{grid-template-columns:repeat(5,minmax(120px,1fr));gap:7px;margin-bottom:9px}
#budgetView .budget-cards .card{padding:9px}
#budgetView .budget-cards .value{font-size:16px}
#budgetView .budget-cards .label,#budgetView .budget-cards .note{font-size:9.5px}
#budgetView .table-panel{max-width:100%}
.budget-table table{min-width:760px}
#budgetView th,#budgetView td{padding:6px 8px;font-size:11px;line-height:1.2}
#budgetView th{font-size:9.5px}
#budgetView .subsection-header{margin-bottom:9px;align-items:center}
#budgetView .subsection-header h3{font-size:17px}
#budgetView .subsection-header p{font-size:11px}

@media(max-width:1050px){#budgetSubnav{grid-template-columns:repeat(2,minmax(150px,1fr));top:0;position:relative}#budgetView .budget-cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:780px){.component-view-options{align-items:flex-start;flex-direction:column}.apu-dialog-compact .dialog-table{max-height:55vh}#budgetSubnav{grid-template-columns:1fr}.games-table table,.budget-table table{min-width:720px}}
.badge.deleted{background:#e7e7e7;color:#666}


/* v3.1.1 — Materiales compactos y valores visibles */
#materialsView{max-width:1180px;margin:0 auto}
#materialsView .section-header{margin-bottom:8px;gap:8px}
#materialsView .section-header h2{font-size:21px;margin:1px 0 0}
#materialsView .section-header .actions{gap:5px}
#materialsView .section-header .button{padding:7px 9px;font-size:10.5px;border-radius:7px}
#materialsView .toolbar{padding:7px;margin-bottom:7px;gap:7px}
#materialsView .toolbar input,#materialsView .toolbar select{padding:7px 9px;font-size:11px}
#materialsView .toolbar-note{font-size:10px;padding:6px 8px}
#materialsView .selection-hint{padding:7px 10px;margin-bottom:7px;font-size:11px}
.materials-table table{min-width:930px;table-layout:fixed}
.materials-table th,.materials-table td{padding:5px 7px;font-size:10.5px;line-height:1.15}
.materials-table th{font-size:9px}
.materials-table th:nth-child(1){width:105px}.materials-table th:nth-child(2){width:auto}.materials-table th:nth-child(3){width:70px}.materials-table th:nth-child(4){width:125px}.materials-table th:nth-child(5){width:145px}.materials-table th:nth-child(6){width:72px}.materials-table th:nth-child(7){width:190px}
.materials-table td:nth-child(2){white-space:normal;overflow-wrap:anywhere}
.material-cost-cell{white-space:nowrap;overflow:visible}
.price-edit-button{min-width:118px;padding:4px 7px;font-size:11px}
.materials-table .row-actions{min-width:0;white-space:normal;display:flex;gap:4px;flex-wrap:wrap}
.materials-table .row-actions .small-button{padding:4px 6px;font-size:9.5px}
@media(max-width:1050px){#materialsView{max-width:100%}.materials-table table{min-width:860px}}


/* ==============================================================
   v3.1.2 - MODO DE TRABAJO COMPACTO
   Prioridad: datos completos en pantalla, mínima ornamentación.
   ============================================================== */
@media (min-width: 1000px){
  .topbar{height:68px;padding:8px 16px;box-shadow:none}
  .brand-mark.small{width:36px;height:36px;border-radius:8px;font-size:14px}
  .topbar h1{font-size:23px}
  .topbar .eyebrow{font-size:9px}
  .user-chip{padding:6px 10px}
  .layout{grid-template-columns:205px minmax(0,1fr);min-height:calc(100vh - 68px)}
  .sidebar{top:68px;height:calc(100vh - 68px);padding:14px 10px}
  .sidebar nav{margin-top:12px;gap:3px}
  .nav-button{padding:8px 9px;font-size:13px}
  .nav-button span{width:21px;height:21px}
  .sidebar-note{margin-top:14px;padding:9px;font-size:10.5px}
  .content{padding:12px;overflow-x:hidden}
}

#materialsView .section-header{align-items:center;margin-bottom:6px;gap:8px}
#materialsView .section-header h2{font-size:21px;margin:1px 0}
#materialsView .section-header .eyebrow{font-size:9px}
#materialsView .actions{gap:4px;flex-wrap:nowrap}
#materialsView .button{padding:6px 8px;font-size:10.5px;border-radius:6px;white-space:nowrap}
#materialsView .toolbar.four{grid-template-columns:minmax(190px,1fr) 160px 135px 92px;gap:5px;padding:6px;margin-bottom:6px;border-radius:7px;box-shadow:none}
#materialsView .toolbar input,#materialsView .toolbar select{padding:6px 7px;font-size:11px;border-radius:6px;height:32px}
#materialsView .toolbar-note{font-size:10px;border-radius:6px;white-space:nowrap}
#materialSelectionHint{display:none}

.materials-table{overflow-x:hidden;border-radius:7px;box-shadow:none}
.materials-table table{width:100%;min-width:0;table-layout:fixed}
.materials-table th,.materials-table td{padding:5px 6px;font-size:11px;line-height:1.15;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
.materials-table th{font-size:9.5px;letter-spacing:0;white-space:nowrap}
.materials-table th:nth-child(1),.materials-table td:nth-child(1){width:10%}
.materials-table th:nth-child(2),.materials-table td:nth-child(2){width:28%}
.materials-table th:nth-child(3),.materials-table td:nth-child(3){width:7%}
.materials-table th:nth-child(4),.materials-table td:nth-child(4){width:11%}
.materials-table th:nth-child(5),.materials-table td:nth-child(5){width:13%}
.materials-table th:nth-child(6),.materials-table td:nth-child(6){width:8%}
.materials-table th:nth-child(7),.materials-table td:nth-child(7){width:23%}
.materials-table td:nth-child(2){white-space:normal;overflow-wrap:anywhere}
.materials-table td:nth-child(1),.materials-table td:nth-child(3),.materials-table td:nth-child(4),.materials-table td:nth-child(5),.materials-table td:nth-child(6),.materials-table td:nth-child(7){white-space:nowrap}
.materials-table .badge{font-size:9px;padding:3px 5px}
.materials-table .small-button{font-size:9.5px;padding:4px 5px;margin:0 1px;border-radius:5px}
.materials-table .row-actions{white-space:nowrap;overflow:visible}
.materials-table .material-cost-cell{overflow:visible}
.price-edit-button,.price-readonly{display:inline-flex;align-items:center;justify-content:flex-end;width:100%;min-width:0;padding:4px 6px!important;font-size:11px!important;line-height:1.1!important;white-space:nowrap!important;border-radius:5px!important;font-variant-numeric:tabular-nums}
.price-edit-button small{display:none!important}
.materials-table tbody tr{height:34px}
#materialsPager{padding:5px 2px;font-size:11px}

/* Juegos: compacto para mostrar más componentes. */
#gamesView .section-header{margin-bottom:7px;align-items:center}
#gamesView .section-header h2{font-size:21px;margin:1px 0}
#gamesView .button{padding:6px 8px;font-size:10.5px}
#gamesView .toolbar{padding:6px;gap:5px;margin-bottom:6px;grid-template-columns:minmax(210px,1fr) 170px 135px}
#gamesView .toolbar input,#gamesView .toolbar select{padding:6px 7px;height:32px;font-size:11px}
.games-table table{min-width:0;table-layout:fixed}
.games-table th,.games-table td{padding:5px 6px;font-size:11px;line-height:1.15}
.games-table th{font-size:9.5px}
.apu-dialog-compact .dialog-header{padding:8px 12px}
.apu-dialog-compact .dialog-header h2{font-size:18px;margin:2px 0}
.apu-dialog-compact .apu-detail-top{padding:6px 10px;gap:6px}
.apu-dialog-compact .dialog-summary{gap:5px}
.apu-dialog-compact .card{padding:6px 8px;box-shadow:none}
.apu-dialog-compact .card .label{font-size:9px}
.apu-dialog-compact .card .value{font-size:15px;margin-top:2px}
.apu-dialog-compact .card .note{font-size:9px}
.apu-dialog-compact .button{padding:5px 7px;font-size:10px}
.apu-dialog-compact .component-view-options{padding:4px 10px;font-size:10px}
.apu-dialog-compact th,.apu-dialog-compact td{padding:4px 5px;font-size:10.5px;line-height:1.1}

@media (max-width: 1199px){
  .materials-table th:nth-child(4),.materials-table td:nth-child(4){display:none}
  .materials-table th:nth-child(1),.materials-table td:nth-child(1){width:11%}
  .materials-table th:nth-child(2),.materials-table td:nth-child(2){width:34%}
  .materials-table th:nth-child(3),.materials-table td:nth-child(3){width:8%}
  .materials-table th:nth-child(5),.materials-table td:nth-child(5){width:15%}
  .materials-table th:nth-child(6),.materials-table td:nth-child(6){width:9%}
  .materials-table th:nth-child(7),.materials-table td:nth-child(7){width:23%}
}

/* ==============================================================
   v3.1.3 — DENSIDAD OPERATIVA Y BAJAS FUERA DE OPERACIÓN
   Prioridad absoluta: toda la información útil dentro de la ventana.
   ============================================================== */
@media (min-width:1000px){
  .topbar{height:60px;padding:5px 10px}
  .brand-mark.small{width:32px;height:32px;font-size:12px}
  .topbar h1{font-size:20px}
  .layout{grid-template-columns:160px minmax(0,1fr);min-height:calc(100vh - 60px)}
  .sidebar{top:60px;height:calc(100vh - 60px);padding:8px 6px}
  .sidebar>label{font-size:10px;margin:0 4px 3px}
  .sidebar select{padding:6px;font-size:10.5px;border-radius:5px}
  .project-create{width:100%;margin-top:4px;padding:5px!important;font-size:10px!important}
  .sidebar nav{margin-top:7px;gap:1px}
  .nav-button{padding:6px 6px;font-size:11px;gap:5px;border-radius:5px}
  .nav-button span{width:18px;height:18px;border-radius:4px;font-size:9px}
  .sidebar-note{display:none}
  .content{padding:6px;overflow-x:hidden}
}

/* Materiales: renglón aproximadamente a la mitad de la versión anterior. */
#materialsView{max-width:none;width:100%;margin:0}
#materialsView .section-header{margin-bottom:3px}
#materialsView .section-header h2{font-size:18px}
#materialsView .toolbar.four{grid-template-columns:minmax(170px,1fr) 130px 95px 74px;padding:3px;gap:3px;margin-bottom:3px}
#materialsView .toolbar input,#materialsView .toolbar select{height:26px;padding:3px 5px;font-size:10px}
#materialsView .toolbar-note{font-size:9px;padding:3px}
.materials-table{overflow-x:hidden!important}
.materials-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.materials-table th,.materials-table td{padding:1px 4px!important;font-size:10px!important;line-height:1.05!important;height:20px!important;vertical-align:middle!important}
.materials-table th{font-size:8.5px!important}
.materials-table tbody tr{height:20px!important}
.materials-table th:nth-child(1),.materials-table td:nth-child(1){width:10%!important}
.materials-table th:nth-child(2),.materials-table td:nth-child(2){width:39%!important}
.materials-table th:nth-child(3),.materials-table td:nth-child(3){width:6%!important}
.materials-table th:nth-child(4),.materials-table td:nth-child(4){width:13%!important}
.materials-table th:nth-child(5),.materials-table td:nth-child(5){width:15%!important}
.materials-table th:nth-child(6),.materials-table td:nth-child(6){display:none!important}
.materials-table th:nth-child(7),.materials-table td:nth-child(7){width:17%!important;position:static!important;box-shadow:none!important}
.materials-table td:nth-child(2){white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.materials-table .badge{font-size:8px!important;padding:1px 3px!important}
.materials-table .small-button{font-size:8.5px!important;padding:2px 4px!important;margin:0!important}
.materials-table .row-actions{display:flex!important;gap:2px!important;flex-wrap:nowrap!important;white-space:nowrap!important}
.price-edit-button,.price-readonly{padding:1px 3px!important;font-size:10px!important;height:18px!important}
#materialsPager{padding:2px;font-size:9.5px}
#materialsPager button{padding:3px 6px}

/* Juegos: menú, Unidad y Rendimiento estrechos; descripción recibe el espacio. */
#gamesView{max-width:none;width:100%}
#gamesView .section-header{margin-bottom:3px}
#gamesView .section-header h2{font-size:18px}
#gamesView .toolbar{grid-template-columns:minmax(180px,1fr) 145px 90px;padding:3px;gap:3px;margin-bottom:3px}
#gamesView .toolbar input,#gamesView .toolbar select{height:26px;padding:3px 5px;font-size:10px}
#gamesView .legend{font-size:9px;margin-bottom:3px}
.games-table{overflow-x:hidden!important}
.games-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.games-table th,.games-table td{padding:2px 4px!important;font-size:10px!important;line-height:1.05!important;vertical-align:middle!important}
.games-table th{font-size:8.5px!important}
.games-table th:nth-child(1),.games-table td:nth-child(1){width:9%!important}
.games-table th:nth-child(2),.games-table td:nth-child(2){width:10%!important}
.games-table th:nth-child(3),.games-table td:nth-child(3){width:5%!important;text-align:center}
.games-table th:nth-child(4),.games-table td:nth-child(4){width:41%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.games-table th:nth-child(5),.games-table td:nth-child(5){width:10%!important;white-space:nowrap}
.games-table th:nth-child(6),.games-table td:nth-child(6){width:10%!important;white-space:nowrap}
.games-table th:nth-child(7),.games-table td:nth-child(7){width:15%!important}
.games-table .row-actions{display:flex;gap:2px;flex-wrap:nowrap;min-width:0!important;white-space:nowrap}
.games-table .small-button{padding:2px 4px!important;font-size:8.5px!important;margin:0!important}

/* Presupuesto: clave, unidad, cantidad, P.U., importe y acción siempre visibles. */
#budgetView{max-width:none!important;width:100%;margin:0}
#budgetView .section-header{margin-bottom:3px}
#budgetView .section-header h2{font-size:18px}
#budgetSubnav{grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;padding:3px 0;margin-bottom:4px;position:static}
#budgetSubnav .subnav-button{padding:4px 3px;font-size:8.5px;line-height:1.05;border-radius:4px}
#budgetView .budget-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin-bottom:4px}
#budgetView .budget-cards .card{padding:4px 5px;border-radius:5px;box-shadow:none}
#budgetView .budget-cards .label,#budgetView .budget-cards .note{font-size:8px}
#budgetView .budget-cards .value{font-size:13px;margin-top:1px}
.budget-table{overflow-x:hidden!important}
.budget-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
#budgetView th,#budgetView td{padding:2px 4px!important;font-size:9.5px!important;line-height:1.05!important;vertical-align:middle!important}
#budgetView th{font-size:8px!important}
.budget-table th:nth-child(1),.budget-table td:nth-child(1){width:4%!important}
.budget-table th:nth-child(2),.budget-table td:nth-child(2){width:8%!important}
.budget-table th:nth-child(3),.budget-table td:nth-child(3){width:43%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.budget-table th:nth-child(4),.budget-table td:nth-child(4){width:5%!important;text-align:center}
.budget-table th:nth-child(5),.budget-table td:nth-child(5){width:10%!important;white-space:nowrap}
.budget-table th:nth-child(6),.budget-table td:nth-child(6){width:10%!important;white-space:nowrap}
.budget-table th:nth-child(7),.budget-table td:nth-child(7){width:12%!important;white-space:nowrap}
.budget-table th:nth-child(8),.budget-table td:nth-child(8){width:8%!important;white-space:nowrap}
.budget-table .small-button{padding:2px 3px!important;font-size:8px!important;margin:0!important}

/* Tarjeta de Juego: Unidad y Rendimiento más estrechos. */
.apu-dialog-compact{width:min(1180px,98vw)!important}
.apu-dialog-compact .dialog-summary{grid-template-columns:1.05fr .8fr .8fr}
.apu-dialog-compact .dialog-table{overflow-x:hidden}
.apu-dialog-compact table{width:100%;min-width:0;table-layout:fixed}
.apu-dialog-compact th:nth-child(1),.apu-dialog-compact td:nth-child(1){width:4%}
.apu-dialog-compact th:nth-child(2),.apu-dialog-compact td:nth-child(2){width:10%}
.apu-dialog-compact th:nth-child(3),.apu-dialog-compact td:nth-child(3){width:9%}
.apu-dialog-compact th:nth-child(4),.apu-dialog-compact td:nth-child(4){width:35%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apu-dialog-compact th:nth-child(5),.apu-dialog-compact td:nth-child(5){width:5%}
.apu-dialog-compact th:nth-child(6),.apu-dialog-compact td:nth-child(6){width:10%}
.apu-dialog-compact th:nth-child(7),.apu-dialog-compact td:nth-child(7){width:10%}
.apu-dialog-compact th:nth-child(8),.apu-dialog-compact td:nth-child(8){width:10%}
.apu-dialog-compact th:nth-child(9),.apu-dialog-compact td:nth-child(9){width:7%}

/* Eliminados: fuera de la operación normal, restauración solo desde Seguridad. */
.deleted-panel{margin-top:10px;padding-bottom:8px}
.deleted-panel .panel-title{padding:8px 10px 4px}
.deleted-panel .panel-title h3{margin:0;font-size:15px}
.deleted-panel .panel-title p{margin:2px 0;font-size:10px}
.deleted-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 8px 8px}
.deleted-grid h4{margin:4px 0;font-size:12px}
.deleted-table{max-height:240px;overflow:auto}
.deleted-table table{min-width:0;table-layout:fixed}
.deleted-table th,.deleted-table td{padding:3px 4px;font-size:9.5px}

@media(max-width:1100px){
  #budgetSubnav{grid-template-columns:repeat(4,minmax(0,1fr))}
  .deleted-grid{grid-template-columns:1fr}
}

/* v3.2.0 — tarjetas operativas por secciones. */
.hidden{display:none!important}
.special-card-row td{background:#fbfcf7}
.component-section-row th{background:#dfead3!important;color:#315027;font-size:9px!important;letter-spacing:.04em;padding:3px 5px!important;border-top:2px solid #b4c99f}
.apu-dialog-compact th:nth-child(4),.apu-dialog-compact td:nth-child(4){width:31%}
.apu-dialog-compact th:nth-child(9),.apu-dialog-compact td:nth-child(9){width:11%}
.apu-dialog-compact .row-actions{display:flex;gap:2px;flex-wrap:nowrap;white-space:nowrap}
.apu-dialog-compact .row-actions .small-button{padding:2px 4px;font-size:8.5px}
#componentReferenceInfo{margin:0;padding:6px 8px}
#componentBasisHelp{padding:7px 9px;margin:0;font-size:11px}


/* v3.2.1 — encabezado de Materiales en una sola línea útil. */
#materialsView .materials-compact-header{
  display:grid!important;
  grid-template-columns:minmax(250px,auto) 1fr;
  align-items:center!important;
  gap:7px!important;
  margin-bottom:3px!important;
  min-height:30px;
}
#materialsView .materials-title-line{
  display:flex;
  align-items:baseline;
  gap:5px;
  min-width:0;
  white-space:nowrap;
  line-height:1;
}
#materialsView .materials-title-primary{
  color:#5f793e;
  font-size:10px;
  font-weight:850;
  letter-spacing:.035em;
}
#materialsView .materials-title-separator{
  color:#78915c;
  font-size:11px;
  font-weight:800;
}
#materialsView .materials-title-secondary{
  color:var(--ink);
  font-size:14px;
  font-weight:850;
  letter-spacing:-.01em;
}
#materialsView .materials-compact-header .actions{
  justify-content:flex-end;
  align-items:center;
  min-width:0;
}
@media(max-width:1180px){
  #materialsView .materials-compact-header{grid-template-columns:1fr!important;gap:3px!important}
  #materialsView .materials-compact-header .actions{justify-content:flex-start}
}
@media(max-width:780px){
  #materialsView .materials-title-line{white-space:normal;flex-wrap:wrap}
  #materialsView .materials-compact-header .actions{flex-wrap:wrap!important}
}


/* v3.3.0 — navegación operativa y presupuesto compacto */
.nav-divider{margin:8px 8px 3px;font-size:9px;font-weight:800;letter-spacing:.08em;color:#6d7b70}
.dashboard-cards-five{grid-template-columns:repeat(5,minmax(0,1fr))}
.dashboard-cards-five .dashboard-card{min-height:92px;padding:12px 10px}
.dashboard-cards-five .dashboard-card .icon{min-width:30px;height:30px;font-size:12px}
.budget-header{margin-bottom:6px}
.budget-only-subnav{margin-bottom:7px}
.budget-quick-settings{display:grid;grid-template-columns:150px 150px minmax(190px,1fr) auto;gap:7px;align-items:end;padding:8px 10px;margin-bottom:7px}
.budget-quick-settings label{font-size:10px;font-weight:700}
.budget-quick-settings input{height:29px;padding:4px 7px;margin-top:2px}
.budget-table tbody tr.selectable-row{cursor:pointer}
.budget-table tbody tr.selected-row{outline:2px solid #78934d;outline-offset:-2px;background:#edf5e4}
.hidden{display:none!important}
@media(max-width:1200px){.dashboard-cards-five{grid-template-columns:repeat(3,minmax(0,1fr))}.budget-quick-settings{grid-template-columns:repeat(2,minmax(160px,1fr))}}

/* v3.4.0 — generadores como origen del presupuesto y edición continua de tarjetas */


/* v3.5.1 — Reportes derivados del Presupuesto */
.concept-resource-table{overflow-x:hidden!important}
.concept-resource-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.concept-resource-table th,.concept-resource-table td{padding:3px 5px!important;font-size:9.5px!important;line-height:1.15!important;vertical-align:middle!important}
.concept-resource-table th:nth-child(1),.concept-resource-table td:nth-child(1){width:5%!important}
.concept-resource-table th:nth-child(2),.concept-resource-table td:nth-child(2){width:10%!important}
.concept-resource-table th:nth-child(3),.concept-resource-table td:nth-child(3){width:30%!important;white-space:normal!important;overflow-wrap:anywhere!important}
.concept-resource-table th:nth-child(4),.concept-resource-table td:nth-child(4){width:7%!important;text-align:center}
.concept-resource-table th:nth-child(5),.concept-resource-table td:nth-child(5){width:15%!important}
.concept-resource-table th:nth-child(6),.concept-resource-table td:nth-child(6){width:15%!important}
.concept-resource-table th:nth-child(7),.concept-resource-table td:nth-child(7){width:18%!important}
/* En Insumos la descripción queda aproximadamente a la mitad de la amplitud previa y puede ocupar dos líneas. */
.supplies-table td:nth-child(3){white-space:normal!important;line-height:1.2!important;max-height:2.4em!important}
.financial-concepts-table{overflow-x:hidden!important}
.financial-concepts-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.financial-concepts-table th,.financial-concepts-table td{padding:3px 5px!important;font-size:9.5px!important;line-height:1.15!important}
.financial-concepts-table th:nth-child(1),.financial-concepts-table td:nth-child(1){width:5%!important}
.financial-concepts-table th:nth-child(2),.financial-concepts-table td:nth-child(2){width:9%!important}
.financial-concepts-table th:nth-child(3),.financial-concepts-table td:nth-child(3){width:34%!important;white-space:normal!important;overflow-wrap:anywhere!important}
.financial-concepts-table th:nth-child(4),.financial-concepts-table td:nth-child(4){width:13%!important}
.financial-concepts-table th:nth-child(5),.financial-concepts-table td:nth-child(5),.financial-concepts-table th:nth-child(6),.financial-concepts-table td:nth-child(6){width:9%!important}
.financial-concepts-table th:nth-child(7),.financial-concepts-table td:nth-child(7),.financial-concepts-table th:nth-child(8),.financial-concepts-table td:nth-child(8){width:10.5%!important}
.subsection-header.compact{margin-top:8px;margin-bottom:4px}

/* v3.5.2 — Juegos más compactos y columna BAJA siempre visible. */
.games-table{overflow-x:hidden!important}
.games-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.games-table th,.games-table td{padding:5px 6px!important;vertical-align:middle!important}
.games-table th:nth-child(1),.games-table td:nth-child(1){width:11%!important}
.games-table th:nth-child(2),.games-table td:nth-child(2){width:9%!important}
.games-table th:nth-child(3),.games-table td:nth-child(3){width:7%!important;text-align:center}
.games-table th:nth-child(4),.games-table td:nth-child(4){width:30%!important}
.games-table th:nth-child(5),.games-table td:nth-child(5){width:12%!important}
.games-table th:nth-child(6),.games-table td:nth-child(6){width:11%!important}
.games-table th:nth-child(7),.games-table td:nth-child(7){width:20%!important}
.games-table td:nth-child(3){font-size:14px!important;font-weight:900!important;color:var(--green-dark)}
.games-table td:nth-child(4){font-size:11px!important;line-height:1.18!important}
.games-table td:nth-child(5),.games-table td:nth-child(6){padding-left:4px!important;padding-right:4px!important;white-space:nowrap}
.games-table .row-actions{display:flex;gap:3px;flex-wrap:nowrap;white-space:nowrap;align-items:center}
.games-table .row-actions .small-button{padding:4px 6px!important;font-size:9.5px!important;margin:0!important}

/* Tarjeta Juego: descripción más discreta, UNIDAD destacada y resumen en una sola línea. */
.apu-dialog-compact .dialog-header h2{font-size:15.5px!important;line-height:1.12!important;font-weight:750!important}
.apu-dialog-compact .dialog-header p{font-size:9.5px!important}
.apu-dialog-compact .dialog-summary{grid-template-columns:1.20fr .78fr .78fr .92fr .55fr!important;gap:4px!important}
.apu-dialog-compact .dialog-summary .card{padding:5px 6px!important;min-width:0!important}
.apu-dialog-compact .dialog-summary .card .label{font-size:8px!important;line-height:1!important}
.apu-dialog-compact .dialog-summary .card .value{font-size:13px!important;line-height:1.05!important;margin-top:1px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apu-dialog-compact .dialog-summary .card:first-child .label{font-size:9.5px!important;font-weight:900!important}
.apu-dialog-compact .dialog-summary .card:first-child .value{font-size:19px!important;font-weight:950!important;color:var(--green-dark)!important;text-align:center}
.apu-dialog-compact .dialog-summary .card .note{font-size:8px!important;margin-top:0!important}

/* Componentes de tarjeta: más espacio para Acción/Baja y menos para Descripción. */
.apu-dialog-compact th:nth-child(1),.apu-dialog-compact td:nth-child(1){width:4%!important}
.apu-dialog-compact th:nth-child(2),.apu-dialog-compact td:nth-child(2){width:9%!important}
.apu-dialog-compact th:nth-child(3),.apu-dialog-compact td:nth-child(3){width:9%!important}
.apu-dialog-compact th:nth-child(4),.apu-dialog-compact td:nth-child(4){width:28%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9.5px!important}
.apu-dialog-compact th:nth-child(5),.apu-dialog-compact td:nth-child(5){width:7%!important;text-align:center;font-size:12px!important;font-weight:900!important}
.apu-dialog-compact th:nth-child(6),.apu-dialog-compact td:nth-child(6){width:9%!important}
.apu-dialog-compact th:nth-child(7),.apu-dialog-compact td:nth-child(7){width:9%!important;padding-left:3px!important;padding-right:3px!important}
.apu-dialog-compact th:nth-child(8),.apu-dialog-compact td:nth-child(8){width:10%!important;padding-left:3px!important;padding-right:3px!important}
.apu-dialog-compact th:nth-child(9),.apu-dialog-compact td:nth-child(9){width:15%!important}
.apu-dialog-compact .row-actions{display:flex!important;gap:2px!important;flex-wrap:nowrap!important;white-space:nowrap!important;align-items:center}
.apu-dialog-compact .row-actions .small-button{padding:3px 4px!important;font-size:8.5px!important;margin:0!important}

@media(max-width:900px){
  .games-table{overflow-x:auto!important}
  .games-table table{min-width:900px!important}
  .apu-dialog-compact .dialog-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* v3.5.3 — Ajustes de ancho, renglón y edición operativa */
@media (min-width:1000px){
  .layout{grid-template-columns:145px minmax(0,1fr)!important}
  .sidebar{padding:6px 4px!important}
  .sidebar nav{margin-top:5px!important;gap:1px!important}
  .nav-button{padding:4px 5px!important;font-size:10.5px!important;line-height:1.05!important;gap:4px!important;min-height:25px!important}
  .nav-button span{width:17px!important;height:17px!important;font-size:8.5px!important}
  .sidebar>label{font-size:9.5px!important;margin:0 3px 2px!important}
  .sidebar select{padding:5px!important;font-size:10px!important}
}
.games-table th:nth-child(1),.games-table td:nth-child(1){width:10%!important}
.games-table th:nth-child(2),.games-table td:nth-child(2){width:8%!important}
.games-table th:nth-child(3),.games-table td:nth-child(3){width:8%!important;text-align:center}
.games-table th:nth-child(4),.games-table td:nth-child(4){width:28%!important}
.games-table th:nth-child(5),.games-table td:nth-child(5){width:9%!important}
.games-table th:nth-child(6),.games-table td:nth-child(6){width:9%!important}
.games-table th:nth-child(7),.games-table td:nth-child(7){width:28%!important}
.games-table td:nth-child(3){font-size:15px!important;font-weight:950!important}
.games-table td:nth-child(4){font-size:9.5px!important;line-height:1.08!important}
.games-table td:nth-child(5),.games-table td:nth-child(6){font-size:9.5px!important;padding-left:2px!important;padding-right:2px!important}
.games-table .row-actions .small-button{padding:3px 5px!important;font-size:9px!important}
.apu-dialog-compact .dialog-summary{grid-template-columns:1.25fr .62fr .68fr .76fr .42fr!important;gap:3px!important}
.apu-dialog-compact .dialog-summary .card .value{font-size:12px!important}
.apu-dialog-compact .dialog-summary .card:first-child .value{font-size:20px!important}
.budget-table th:nth-child(1),.budget-table td:nth-child(1){width:4%!important}
.budget-table th:nth-child(2),.budget-table td:nth-child(2){width:8%!important}
.budget-table th:nth-child(3),.budget-table td:nth-child(3){width:34%!important}
.budget-table th:nth-child(4),.budget-table td:nth-child(4){width:6%!important}
.budget-table th:nth-child(5),.budget-table td:nth-child(5){width:9%!important}
.budget-table th:nth-child(6),.budget-table td:nth-child(6){width:9%!important}
.budget-table th:nth-child(7),.budget-table td:nth-child(7){width:11%!important}
.budget-table th:nth-child(8),.budget-table td:nth-child(8){width:19%!important;white-space:normal!important;overflow:visible!important}
.budget-table .generator-actions{display:flex!important;gap:2px!important;flex-wrap:wrap!important;align-items:center!important}
.budget-table .generator-actions .small-button{white-space:nowrap!important;padding:2px 4px!important;font-size:8px!important}
.concept-resource-table th,.concept-resource-table td{padding:2px 4px!important;font-size:9px!important;line-height:1.05!important;vertical-align:middle!important}
.concept-resource-table th:nth-child(1),.concept-resource-table td:nth-child(1){width:4%!important}
.concept-resource-table th:nth-child(2),.concept-resource-table td:nth-child(2){width:9%!important}
.concept-resource-table th:nth-child(3),.concept-resource-table td:nth-child(3){width:27%!important}
.concept-resource-table th:nth-child(4),.concept-resource-table td:nth-child(4){width:7%!important}
.concept-resource-table th:nth-child(5),.concept-resource-table td:nth-child(5){width:16%!important}
.concept-resource-table th:nth-child(6),.concept-resource-table td:nth-child(6){width:17%!important}
.concept-resource-table th:nth-child(7),.concept-resource-table td:nth-child(7){width:20%!important}
.concept-cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.08;max-height:2.16em;overflow-wrap:anywhere}
.calendar-table{overflow-x:hidden!important}
.calendar-table table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.calendar-table th,.calendar-table td{padding:3px 4px!important;font-size:9.5px!important;line-height:1.08!important;vertical-align:middle!important}
.calendar-table th:nth-child(1),.calendar-table td:nth-child(1){width:10%!important}
.calendar-table th:nth-child(2),.calendar-table td:nth-child(2){width:31%!important}
.calendar-table th:nth-child(3),.calendar-table td:nth-child(3){width:10%!important}
.calendar-table th:nth-child(4),.calendar-table td:nth-child(4){width:10%!important}
.calendar-table th:nth-child(5),.calendar-table td:nth-child(5){width:7%!important}
.calendar-table th:nth-child(6),.calendar-table td:nth-child(6){width:10%!important}
.calendar-table th:nth-child(7),.calendar-table td:nth-child(7){width:10%!important}
.calendar-table th:nth-child(8),.calendar-table td:nth-child(8){width:12%!important;white-space:nowrap!important}
.calendar-table .small-button{padding:3px 5px!important;font-size:9px!important}
.financial-concepts-table th:nth-child(1),.financial-concepts-table td:nth-child(1){width:4%!important}
.financial-concepts-table th:nth-child(2),.financial-concepts-table td:nth-child(2){width:8%!important}
.financial-concepts-table th:nth-child(3),.financial-concepts-table td:nth-child(3){width:27%!important}
.financial-concepts-table th:nth-child(4),.financial-concepts-table td:nth-child(4){width:12%!important}
.financial-concepts-table th:nth-child(5),.financial-concepts-table td:nth-child(5){width:9%!important}
.financial-concepts-table th:nth-child(6),.financial-concepts-table td:nth-child(6){width:9%!important}
.financial-concepts-table th:nth-child(7),.financial-concepts-table td:nth-child(7){width:10%!important}
.financial-concepts-table th:nth-child(8),.financial-concepts-table td:nth-child(8){width:10%!important}
.financial-concepts-table th:nth-child(9),.financial-concepts-table td:nth-child(9){width:11%!important;white-space:nowrap!important}
.financial-concepts-table .small-button{padding:3px 5px!important;font-size:9px!important}

/* ACU-Natale v4.0 Integral: pantalla completa, columnas útiles y gráficas. */
@media (min-width:900px){
  .topbar{height:54px!important;min-height:54px!important;padding:4px 12px!important}
  .brand-mark.small{width:34px!important;height:34px!important}
  .topbar h1{font-size:23px!important;line-height:1.04!important}
  .topbar .eyebrow{font-size:8.5px!important}
  .layout{grid-template-columns:154px minmax(0,1fr)!important;min-height:calc(100vh - 54px)!important}
  .sidebar{top:54px!important;height:calc(100vh - 54px)!important;padding:8px 6px!important}
  .sidebar nav{gap:2px!important;margin-top:8px!important}
  .nav-button{min-height:31px!important;padding:5px 6px!important;font-size:11px!important}
  .nav-divider{padding:7px 4px 3px!important;font-size:8px!important}
  .content{padding:9px 11px!important}
}
#materialsView,#gamesView,#budgetView{width:100%!important;max-width:none!important;margin:0!important}
.section-header,.subsection-header{gap:8px!important;margin-bottom:6px!important}
.section-header h2{font-size:19px!important;line-height:1.08!important}
.subsection-header h3{font-size:20px!important;line-height:1.12!important;margin:0!important}
.section-header .button,.subsection-header .button{padding:6px 9px!important;font-size:10px!important}
.budget-header.standalone-subview{display:none!important}
.subsection-header p,#generatorContext{display:none!important}
#generatorContext:has(button){display:block!important;padding:5px 8px!important;margin-bottom:5px!important}
#budgetSelectionHint{padding:5px 8px!important;margin-bottom:5px!important;font-size:10px!important}
#budgetSubnav{position:static!important;grid-template-columns:repeat(3,minmax(80px,1fr))!important;padding:2px 0 5px!important;margin-bottom:5px!important}
#budgetSubnav .subnav-button{padding:4px 7px!important}
.budget-quick-settings{padding:7px 9px!important;gap:8px!important;margin-bottom:6px!important}
.budget-cards .card{padding:6px 8px!important;min-height:0!important}
.budget-cards .value{font-size:14px!important}
.table-panel{max-width:100%!important}
.materials-table table,.games-table table,.budget-table table,.concept-resource-table table,.calendar-table table,.financial-concepts-table table{min-width:0!important;width:100%!important;table-layout:fixed!important}
.materials-table th,.materials-table td,.games-table th,.games-table td,.budget-table th,.budget-table td,.concept-resource-table th,.concept-resource-table td,.calendar-table th,.calendar-table td,.financial-concepts-table th,.financial-concepts-table td{padding:4px 6px!important;font-size:10.5px!important;line-height:1.18!important;height:auto!important;vertical-align:middle!important}
.materials-table th,.games-table th,.budget-table th,.concept-resource-table th,.calendar-table th,.financial-concepts-table th{font-size:9px!important;white-space:nowrap!important}
.materials-table tr,.games-table tr{height:auto!important}
.materials-table th:nth-child(1),.materials-table td:nth-child(1){display:table-cell!important;width:12%!important}
.materials-table th:nth-child(2),.materials-table td:nth-child(2){display:table-cell!important;width:43%!important}
.materials-table th:nth-child(3),.materials-table td:nth-child(3){display:table-cell!important;width:8%!important}
.materials-table th:nth-child(4),.materials-table td:nth-child(4){display:table-cell!important;width:18%!important}
.materials-table th:nth-child(5),.materials-table td:nth-child(5){display:table-cell!important;width:19%!important;position:static!important;box-shadow:none!important}
.materials-table td:nth-child(2){white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.materials-table .price-edit-button,.materials-table .price-readonly{width:100%!important;min-width:0!important;height:auto!important;padding:3px 5px!important;font-size:10.5px!important}
.games-table th:nth-child(1),.games-table td:nth-child(1){width:13%!important;text-align:left!important}
.games-table th:nth-child(2),.games-table td:nth-child(2){width:53%!important;text-align:left!important;font-size:10.5px!important;font-weight:400!important;color:inherit!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.games-table th:nth-child(3),.games-table td:nth-child(3){width:15%!important;text-align:right!important;font-size:10.5px!important;font-weight:700!important;color:inherit!important}
.games-table th:nth-child(4),.games-table td:nth-child(4){width:19%!important;text-align:left!important;overflow:visible!important;font-size:10px!important}
.games-table .row-actions,.materials-table .row-actions{display:flex!important;gap:3px!important;flex-wrap:nowrap!important;white-space:nowrap!important}
.games-table .small-button,.materials-table .small-button{padding:3px 5px!important;font-size:9px!important}
.budget-table th:nth-child(1),.budget-table td:nth-child(1){width:5%!important}
.budget-table th:nth-child(2),.budget-table td:nth-child(2){width:11%!important}
.budget-table th:nth-child(3),.budget-table td:nth-child(3){width:39%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.budget-table th:nth-child(4),.budget-table td:nth-child(4){width:8%!important}
.budget-table th:nth-child(5),.budget-table td:nth-child(5){width:10%!important}
.budget-table th:nth-child(6),.budget-table td:nth-child(6){width:12%!important}
.budget-table th:nth-child(7),.budget-table td:nth-child(7){width:15%!important;white-space:nowrap!important}
.concept-resource-table th:nth-child(1),.concept-resource-table td:nth-child(1){width:12%!important}
.concept-resource-table th:nth-child(2),.concept-resource-table td:nth-child(2){width:39%!important}
.concept-resource-table th:nth-child(3),.concept-resource-table td:nth-child(3){width:8%!important}
.concept-resource-table th:nth-child(4),.concept-resource-table td:nth-child(4){width:13%!important}
.concept-resource-table th:nth-child(5),.concept-resource-table td:nth-child(5){width:13%!important}
.concept-resource-table th:nth-child(6),.concept-resource-table td:nth-child(6){width:15%!important}
.calendar-table th:nth-child(1),.calendar-table td:nth-child(1){width:11%!important}
.calendar-table th:nth-child(2),.calendar-table td:nth-child(2){width:36%!important}
.calendar-table th:nth-child(3),.calendar-table td:nth-child(3),.calendar-table th:nth-child(4),.calendar-table td:nth-child(4){width:9%!important}
.calendar-table th:nth-child(5),.calendar-table td:nth-child(5){width:6%!important}
.calendar-table th:nth-child(6),.calendar-table td:nth-child(6),.calendar-table th:nth-child(7),.calendar-table td:nth-child(7){width:9%!important}
.calendar-table th:nth-child(8),.calendar-table td:nth-child(8){width:11%!important}
.financial-concepts-table th:nth-child(1),.financial-concepts-table td:nth-child(1){width:11%!important}
.financial-concepts-table th:nth-child(2),.financial-concepts-table td:nth-child(2){width:30%!important}
.financial-concepts-table th:nth-child(3),.financial-concepts-table td:nth-child(3){width:12%!important}
.financial-concepts-table th:nth-child(4),.financial-concepts-table td:nth-child(4),.financial-concepts-table th:nth-child(5),.financial-concepts-table td:nth-child(5){width:8%!important}
.financial-concepts-table th:nth-child(6),.financial-concepts-table td:nth-child(6),.financial-concepts-table th:nth-child(7),.financial-concepts-table td:nth-child(7){width:12%!important}
.financial-concepts-table th:nth-child(8),.financial-concepts-table td:nth-child(8){width:9%!important}
.report-apu-link{font-size:inherit!important;white-space:nowrap}
.progress-chart{padding:11px 13px;margin:0 0 9px;border:1px solid #c9d8bc;border-radius:9px;background:#fff}
.chart-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;font-size:12px}
.chart-title strong{font-size:14px;color:#395628}.chart-title span{font-size:10px;color:#657263;white-space:nowrap}
.chart-dot{display:inline-block;width:9px;height:9px;margin:0 3px 0 8px;border-radius:50%;vertical-align:middle}.chart-dot.planned,.finance-bar.planned{background:#b6ca9f}.chart-dot.actual,.finance-bar.actual{background:#e87513}
.gantt-scale{display:flex;justify-content:space-between;margin:0 52px 4px 80px;color:#6a7565;font-size:9px}
.gantt-row,.finance-chart-row{display:grid;grid-template-columns:72px minmax(0,1fr) 53px;align-items:center;gap:7px;min-height:20px}
.chart-key{overflow:hidden;font-size:9px;font-weight:750;text-overflow:ellipsis;white-space:nowrap}.gantt-track{position:relative;height:13px;background:repeating-linear-gradient(90deg,#f3f6f0,#f3f6f0 calc(10% - 1px),#e2e8dc 10%)}
.gantt-bar{position:absolute;top:2px;height:9px;overflow:hidden;border-radius:5px;background:#b6ca9f}.gantt-bar i{display:block;height:100%;background:#e87513}.chart-percent{text-align:right;font-size:9px}
.finance-chart-row{grid-template-columns:84px minmax(0,1fr) 112px;min-height:29px}.finance-bars{display:grid;gap:3px}.finance-bar{height:8px;border-radius:5px}.chart-amount{text-align:right;font-size:9px;white-space:nowrap}.chart-empty{padding:10px;color:#6a7565;font-size:11px}
@media print{.progress-chart{break-inside:avoid}.progress-chart.hidden{display:block!important}.report-apu-link{color:inherit;text-decoration:none}}


/* ACU-Natale v4.1 Revisión aprobada 2026-08-25 */
.topbar .brand-block h1{font-size:27px!important;letter-spacing:-.3px!important}
.topbar .user-chip{font-size:10px!important;padding:4px 7px!important;min-width:0!important}
.topbar .user-chip small{font-size:8px!important}

/* Inicio: el menú lateral es el menú principal; sin tarjetas duplicadas. */
#homeView .hero{padding:12px 15px!important;margin-bottom:8px!important}
#homeView .hero h2{font-size:21px!important;margin:2px 0!important}
#homeView .hero-total strong{font-size:22px!important}
#homeView .home-grid{margin-top:6px!important}

/* Presupuesto de Obra */
.budget-main-title{font-size:25px!important;font-weight:900!important;color:var(--green-dark)!important;letter-spacing:.2px}
.budget-project-identity{display:grid;grid-template-columns:1fr 1fr;gap:7px 14px;padding:9px 12px!important;margin:0 0 7px!important;border-left:4px solid var(--green)!important}
.budget-project-identity .wide{grid-column:1/-1}
.budget-project-identity span{display:block;font-size:8.5px;font-weight:900;letter-spacing:.7px;color:var(--green-dark)}
.budget-project-identity strong{display:block;font-size:13px;line-height:1.25;margin-top:1px;color:#28382a}
.budget-signature-summary{display:grid;grid-template-columns:minmax(260px,1fr) minmax(330px,460px);gap:24px;align-items:end;margin-top:10px;padding:10px 5px 4px}
.budget-authorization{padding:8px 12px;min-height:108px;display:flex;flex-direction:column;justify-content:flex-end}
.budget-authorization span{font-size:11px;font-weight:900;color:var(--green-dark)}
.budget-authorization strong{font-size:12px;margin:5px 0 25px}
.signature-line{border-top:1px solid #526251;padding-top:3px;max-width:280px;text-align:center;font-size:9px;color:var(--muted)}
.budget-final-summary{margin-left:auto;width:100%;max-width:440px;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
.budget-final-summary>div{display:grid;grid-template-columns:1fr auto;gap:20px;padding:7px 10px;border-bottom:1px solid var(--line);align-items:center}
.budget-final-summary>div:last-child{border-bottom:0}.budget-final-summary span{font-size:10px;font-weight:850}.budget-final-summary strong{font-size:12px;text-align:right}.budget-final-summary .grand{background:var(--pistachio-2);color:var(--green-dark)}.budget-final-summary .grand span,.budget-final-summary .grand strong{font-size:13px;font-weight:950}

/* Desglose de Mano de Obra e Insumos */
.resource-concept-row td{background:#edf5e7!important;border-top:2px solid #b9cdaa!important;font-weight:800!important}
.resource-detail-row td{background:#fff!important}
.resource-detail-row td:nth-child(2){padding-left:14px!important}
.resource-grand-total td{background:#dcebd2!important;color:var(--green-dark)!important;font-weight:950!important;border-top:2px solid var(--green)!important}

/* Resumen financiero */
.financial-summary{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:7px;margin:8px 0 11px}
.financial-summary>div{border:1px solid #bfd0b1;border-radius:8px;background:#f3f8ef;padding:7px 9px;display:flex;justify-content:space-between;gap:10px;align-items:center}
.financial-summary span{font-size:8.5px;font-weight:900;color:#557044}.financial-summary strong{font-size:11px;white-space:nowrap;color:var(--green-dark)}

@media (min-width:900px){
  /* Claves más angostas, descripciones más útiles. */
  .materials-table th:nth-child(1),.materials-table td:nth-child(1){width:9%!important}
  .materials-table th:nth-child(2),.materials-table td:nth-child(2){width:46%!important}
  .games-table th:nth-child(1),.games-table td:nth-child(1){width:9%!important}
  .games-table th:nth-child(2),.games-table td:nth-child(2){width:57%!important}
  .budget-table th:nth-child(2),.budget-table td:nth-child(2){width:9%!important}
  .budget-table th:nth-child(3),.budget-table td:nth-child(3){width:41%!important}
  .concept-resource-table th:nth-child(1),.concept-resource-table td:nth-child(1){width:8%!important}
  .concept-resource-table th:nth-child(2),.concept-resource-table td:nth-child(2){width:48%!important}
  .concept-resource-table th:nth-child(3),.concept-resource-table td:nth-child(3){width:8%!important}
  .concept-resource-table th:nth-child(4),.concept-resource-table td:nth-child(4){width:12%!important}
  .concept-resource-table th:nth-child(5),.concept-resource-table td:nth-child(5){width:11%!important}
  .concept-resource-table th:nth-child(6),.concept-resource-table td:nth-child(6){width:13%!important}
  .generator-table th:nth-child(1),.generator-table td:nth-child(1){width:7%!important}
  .generator-table th:nth-child(2),.generator-table td:nth-child(2){width:25%!important}
  .generator-table th:nth-child(3),.generator-table td:nth-child(3){width:6%!important}
  .generator-table th:nth-child(4),.generator-table td:nth-child(4){width:6%!important}
  .generator-table th:nth-child(5),.generator-table td:nth-child(5){width:7%!important}
  .generator-table th:nth-child(6),.generator-table td:nth-child(6),.generator-table th:nth-child(7),.generator-table td:nth-child(7),.generator-table th:nth-child(8),.generator-table td:nth-child(8),.generator-table th:nth-child(9),.generator-table td:nth-child(9){width:6%!important}
  .generator-table th:nth-child(10),.generator-table td:nth-child(10){width:9%!important}
  .generator-table th:nth-child(11),.generator-table td:nth-child(11),.generator-table th:nth-child(12),.generator-table td:nth-child(12){width:8%!important}
  .generator-table th,.generator-table td{padding:4px 4px!important;font-size:9.8px!important}
  .calendar-table th:nth-child(1),.calendar-table td:nth-child(1){width:8%!important}
  .calendar-table th:nth-child(2),.calendar-table td:nth-child(2){width:31%!important}
  .calendar-table th:nth-child(3),.calendar-table td:nth-child(3){width:12%!important}
  .calendar-table th:nth-child(4),.calendar-table td:nth-child(4),.calendar-table th:nth-child(5),.calendar-table td:nth-child(5){width:9%!important}
  .calendar-table th:nth-child(6),.calendar-table td:nth-child(6){width:6%!important}
  .calendar-table th:nth-child(7),.calendar-table td:nth-child(7),.calendar-table th:nth-child(8),.calendar-table td:nth-child(8){width:8%!important}
  .calendar-table th:nth-child(9),.calendar-table td:nth-child(9){width:9%!important}
  .financial-concepts-table th:nth-child(1),.financial-concepts-table td:nth-child(1){width:8%!important}
  .financial-concepts-table th:nth-child(2),.financial-concepts-table td:nth-child(2){width:34%!important}
  .financial-concepts-table th:nth-child(3),.financial-concepts-table td:nth-child(3){width:13%!important}
  .financial-concepts-table th:nth-child(4),.financial-concepts-table td:nth-child(4),.financial-concepts-table th:nth-child(5),.financial-concepts-table td:nth-child(5){width:8%!important}
  .financial-concepts-table th:nth-child(6),.financial-concepts-table td:nth-child(6),.financial-concepts-table th:nth-child(7),.financial-concepts-table td:nth-child(7){width:10%!important}
  .financial-concepts-table th:nth-child(8),.financial-concepts-table td:nth-child(8){width:9%!important}
}
@media(max-width:1050px){.financial-summary{grid-template-columns:repeat(2,1fr)}.budget-signature-summary{grid-template-columns:1fr}}

/* v4.3.8 — revisión general consolidada: totales pegados y estilos normalizados. */
.budget-signature-summary{align-items:start!important;margin-top:2px!important;padding-top:2px!important}
.budget-final-summary{align-self:start!important;margin-top:0!important}


/* ACU-Natale v4.2 — ajustes finales aprobados 2026-08-27 */
@media (min-width:900px){
  /* Presupuesto: CLAVE, UNIDAD y CANTIDAD realmente compactas. */
  .budget-table th:nth-child(1),.budget-table td:nth-child(1){width:4%!important}
  .budget-table th:nth-child(2),.budget-table td:nth-child(2){width:7%!important}
  .budget-table th:nth-child(3),.budget-table td:nth-child(3){width:53%!important}
  .budget-table th:nth-child(4),.budget-table td:nth-child(4){width:5%!important;text-align:center!important}
  .budget-table th:nth-child(5),.budget-table td:nth-child(5){width:7%!important}
  .budget-table th:nth-child(6),.budget-table td:nth-child(6){width:10%!important}
  .budget-table th:nth-child(7),.budget-table td:nth-child(7){width:14%!important}
  /* M.O. e Insumos: clave/unidad/cantidad compactas; descripción recibe el espacio. */
  .concept-resource-table th:nth-child(1),.concept-resource-table td:nth-child(1){width:7%!important}
  .concept-resource-table th:nth-child(2),.concept-resource-table td:nth-child(2){width:55%!important}
  .concept-resource-table th:nth-child(3),.concept-resource-table td:nth-child(3){width:6%!important;text-align:center!important}
  .concept-resource-table th:nth-child(4),.concept-resource-table td:nth-child(4){width:8%!important}
  .concept-resource-table th:nth-child(5),.concept-resource-table td:nth-child(5){width:10%!important}
  .concept-resource-table th:nth-child(6),.concept-resource-table td:nth-child(6){width:14%!important}
  /* Calendario: clave compacta y monto claramente visible. */
  .calendar-table th:nth-child(1),.calendar-table td:nth-child(1){width:7%!important}
  .calendar-table th:nth-child(2),.calendar-table td:nth-child(2){width:35%!important}
  .calendar-table th:nth-child(3),.calendar-table td:nth-child(3){width:13%!important}
  .calendar-table th:nth-child(4),.calendar-table td:nth-child(4),.calendar-table th:nth-child(5),.calendar-table td:nth-child(5){width:8%!important}
  .calendar-table th:nth-child(6),.calendar-table td:nth-child(6){width:5%!important}
  .calendar-table th:nth-child(7),.calendar-table td:nth-child(7),.calendar-table th:nth-child(8),.calendar-table td:nth-child(8){width:8%!important}
  .calendar-table th:nth-child(9),.calendar-table td:nth-child(9){width:8%!important}
  /* Programa Financiero: CLAVE, PROGRAMADO y EJECUTADO ajustados. */
  .financial-concepts-table th:nth-child(1),.financial-concepts-table td:nth-child(1){width:7%!important}
  .financial-concepts-table th:nth-child(2),.financial-concepts-table td:nth-child(2){width:36%!important}
  .financial-concepts-table th:nth-child(3),.financial-concepts-table td:nth-child(3){width:13%!important}
  .financial-concepts-table th:nth-child(4),.financial-concepts-table td:nth-child(4),.financial-concepts-table th:nth-child(5),.financial-concepts-table td:nth-child(5){width:8%!important}
  .financial-concepts-table th:nth-child(6),.financial-concepts-table td:nth-child(6),.financial-concepts-table th:nth-child(7),.financial-concepts-table td:nth-child(7){width:10%!important}
  .financial-concepts-table th:nth-child(8),.financial-concepts-table td:nth-child(8){width:8%!important}
}
/* Presupuesto: subir los totales y bajar nombre/firma dentro del cierre de la hoja. */
.budget-signature-summary{align-items:stretch!important;margin-top:5px!important;padding-top:5px!important}
.budget-final-summary{align-self:start!important;margin-top:0!important}
.budget-authorization{min-height:132px!important;justify-content:flex-start!important;padding-top:5px!important}
.budget-authorization strong{margin-top:auto!important;margin-bottom:24px!important}
/* Insumos es una relación global consolidada; no requiere renglones de encabezado por concepto. */
.supplies-table .resource-detail-row td:nth-child(2){padding-left:6px!important}

/* v4.3 consolidacion 2026-08-27 */
.materials-table th:nth-child(1),.materials-table td:nth-child(1){width:7%!important}
.materials-table th:nth-child(2),.materials-table td:nth-child(2){width:56%!important}
.materials-table th:nth-child(3),.materials-table td:nth-child(3){width:7%!important}
.materials-table th:nth-child(4),.materials-table td:nth-child(4){width:17%!important}
.materials-table th:nth-child(5),.materials-table td:nth-child(5){width:13%!important}
.material-key-link,.generator-key-link{border:0;background:transparent;padding:0;color:var(--green-dark);font:inherit;font-weight:900;text-decoration:underline;cursor:pointer}
.budget-table th:nth-child(2),.budget-table td:nth-child(2){width:5.5%!important}
.budget-table th:nth-child(3),.budget-table td:nth-child(3){width:54.5%!important}
.budget-signature-summary{align-items:start!important;margin-top:2px!important;padding-top:2px!important}
.budget-authorization{min-height:112px!important;padding-top:4px!important;justify-content:flex-start!important}
.budget-final-summary{align-self:start!important;margin-top:0!important}
.calendar-table th:nth-child(1),.calendar-table td:nth-child(1){width:6%!important}
.calendar-table th:nth-child(2),.calendar-table td:nth-child(2){width:37%!important}
.calendar-table th:nth-child(4),.calendar-table td:nth-child(4){width:6%!important}
.calendar-table th:nth-child(3),.calendar-table td:nth-child(3){width:10%!important}
.financial-concepts-table th:nth-child(1),.financial-concepts-table td:nth-child(1){width:6%!important}
.financial-concepts-table th:nth-child(2),.financial-concepts-table td:nth-child(2){width:39%!important}
.financial-concepts-table th:nth-child(6),.financial-concepts-table td:nth-child(6),.financial-concepts-table th:nth-child(7),.financial-concepts-table td:nth-child(7){width:9%!important}
#userDialog{width:min(650px,92vw)!important}#userDialog .dialog-header{padding:13px 18px 8px!important}#userDialog .dialog-form>label{margin:7px 18px!important}#userDialog input,#userDialog select{padding:8px 10px!important}#userDialog .dialog-actions{padding:10px 18px 13px!important}
.generator-table th:nth-child(1),.generator-table td:nth-child(1){width:6%!important}.generator-table th:nth-child(2),.generator-table td:nth-child(2){width:27%!important}

/* v4.3.9 — cierre definitivo de Presupuesto aprobado.
   El bloque de totales inicia inmediatamente después del último concepto.
   La firma comparte esa misma franja y no puede empujar los totales hacia abajo. */
#budgetMainSubview .budget-table{margin-bottom:0!important}
#budgetMainSubview .budget-signature-summary{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) minmax(330px,460px)!important;
  gap:24px!important;
  align-items:start!important;
  margin-top:0!important;
  padding:0 5px 4px!important;
  min-height:0!important;
}
#budgetMainSubview .budget-authorization{
  min-height:0!important;
  height:auto!important;
  align-self:start!important;
  justify-content:flex-start!important;
  padding-top:5px!important;
}
#budgetMainSubview .budget-authorization strong{
  margin-top:8px!important;
  margin-bottom:18px!important;
}
#budgetMainSubview .budget-final-summary{
  align-self:start!important;
  margin-top:0!important;
  margin-bottom:0!important;
}
@media(max-width:1050px){
  #budgetMainSubview .budget-signature-summary{grid-template-columns:1fr!important}
}


/* v4.4.0 — cierre estructural de Presupuesto sin heredar reglas antiguas. */
#budgetMainSubview .budget-close-row-v440{display:grid;grid-template-columns:minmax(260px,1fr) minmax(330px,460px);gap:24px;align-items:start;margin:0;padding:0 5px 4px}
#budgetMainSubview .budget-auth-v440{padding:5px 12px 0;display:flex;flex-direction:column;justify-content:flex-start;min-height:0;height:auto}
#budgetMainSubview .budget-auth-v440 span{font-size:11px;font-weight:900;color:var(--green-dark)}
#budgetMainSubview .budget-auth-v440 strong{font-size:12px;margin:8px 0 18px}
#budgetMainSubview .budget-totals-v440{margin:0;width:100%;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff;align-self:start}
#budgetMainSubview .budget-totals-v440>div{display:grid;grid-template-columns:1fr auto;gap:20px;padding:7px 10px;border-bottom:1px solid var(--line);align-items:center}
#budgetMainSubview .budget-totals-v440>div:last-child{border-bottom:0}
#budgetMainSubview .budget-totals-v440 span{font-size:10px;font-weight:850}
#budgetMainSubview .budget-totals-v440 strong{font-size:12px;text-align:right}
#budgetMainSubview .budget-totals-v440 .grand{background:var(--pistachio-2);color:var(--green-dark)}
#budgetMainSubview .budget-totals-v440 .grand span,#budgetMainSubview .budget-totals-v440 .grand strong{font-size:13px;font-weight:950}
.security-role-guide{padding:10px 14px;margin-bottom:12px;font-size:11px;line-height:1.45;color:var(--muted)}
.security-role-guide strong{color:var(--green-dark)}
@media(max-width:1050px){#budgetMainSubview .budget-close-row-v440{grid-template-columns:1fr}}


/* v4.4.2 — catálogos maestro/proyecto editables sin altas involuntarias. */
@media (min-width:900px){
  .budget-table th:nth-child(1),.budget-table td:nth-child(1){width:3.5%!important}
  .budget-table th:nth-child(2),.budget-table td:nth-child(2){width:9%!important;white-space:nowrap!important}
  .budget-table th:nth-child(3),.budget-table td:nth-child(3){width:51.5%!important}
  .budget-table th:nth-child(4),.budget-table td:nth-child(4){width:5%!important}
  .budget-table th:nth-child(5),.budget-table td:nth-child(5){width:7%!important}
  .budget-table th:nth-child(6),.budget-table td:nth-child(6){width:10%!important}
  .budget-table th:nth-child(7),.budget-table td:nth-child(7){width:14%!important}
}
#budgetMainSubview .budget-close-row-v441{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:24px!important;margin:0!important;padding:0 5px 4px!important;min-height:0!important}
#budgetMainSubview .budget-auth-v441{flex:1 1 auto!important;min-width:0!important;padding:5px 12px 0!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;min-height:0!important;height:auto!important}
#budgetMainSubview .budget-auth-v441 span{font-size:11px;font-weight:900;color:var(--green-dark)}
#budgetMainSubview .budget-auth-v441 strong{font-size:12px;margin:8px 0 18px}
#budgetMainSubview .budget-totals-v441{flex:0 0 460px!important;max-width:44%!important;margin:0!important;align-self:flex-start!important}
#budgetMainSubview .budget-totals-v441>div{display:grid;grid-template-columns:1fr auto;gap:20px;padding:7px 10px;border-bottom:1px solid var(--line);align-items:center}
#budgetMainSubview .budget-totals-v441>div:last-child{border-bottom:0}
#budgetMainSubview .budget-totals-v441 span{font-size:10px;font-weight:850}
#budgetMainSubview .budget-totals-v441 strong{font-size:12px;text-align:right}
#budgetMainSubview .budget-totals-v441 .grand{background:var(--pistachio-2);color:var(--green-dark)}
#budgetMainSubview .budget-totals-v441 .grand span,#budgetMainSubview .budget-totals-v441 .grand strong{font-size:13px;font-weight:950}
.catalog-master-row{opacity:.96}

/* v4.4.4 — Capítulos y TÍTULOS en Presupuesto */
.budget-table tbody tr.budget-chapter-row td{font-weight:800;background:#edf4e5;border-top:2px solid #607d3b;border-bottom:2px solid #607d3b;color:#304722}
.budget-table tbody tr.budget-chapter-row td:nth-child(2),.budget-table tbody tr.budget-chapter-row td:nth-child(3){font-size:1.02em}
.budget-table tbody tr.budget-chapter-row .chapter-sum-label{text-align:center;letter-spacing:.06em}
.games-table tbody tr .badge.titulo{background:#e4efd8;color:#416129}

/* v4.4.5 — Inicio editable y Presupuesto reordenable */
.compact-project-edit{margin-top:8px;padding:7px 12px;font-size:12px}
.budget-header .actions{flex-wrap:wrap}


/* v4.4.7 — Presupuesto compacto, capítulos y resumen de Mano de Obra */
#budgetView>.budget-header{display:grid!important;grid-template-columns:245px minmax(0,1fr)!important;align-items:start!important;gap:5px!important;margin:0 0 3px!important;padding:0!important;min-height:0!important}
#budgetView>.budget-header .eyebrow{font-size:9px!important;line-height:1.05!important;margin:0!important}
#budgetView .budget-main-title{font-size:22px!important;line-height:1.02!important;margin:1px 0 0!important}
#budgetView>.budget-header .actions{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;align-items:center!important;gap:4px!important;overflow:visible!important}
#budgetView>.budget-header .actions .button{font-size:9.5px!important;line-height:1!important;padding:7px 9px!important;min-height:30px!important;white-space:nowrap!important}
#budgetView .budget-only-subnav{margin:2px 0 4px!important;min-height:24px!important}
#budgetView .budget-only-subnav .subnav-button{padding:4px 8px!important;font-size:9.5px!important;min-height:24px!important}
#budgetMainSubview .budget-project-identity{gap:2px 12px!important;padding:5px 10px!important;margin:0 0 4px!important;min-height:0!important}
#budgetMainSubview .budget-project-identity span{font-size:8px!important;line-height:1!important}
#budgetMainSubview .budget-project-identity strong{font-size:12px!important;line-height:1.1!important;margin-top:1px!important}
#budgetMainSubview .selection-hint{margin:0 0 3px!important;padding:5px 9px!important;min-height:0!important;font-size:9.5px!important}
.budget-table tbody tr.budget-chapter-row td{font-size:14px!important;font-weight:900!important;line-height:1.05!important;padding-top:5px!important;padding-bottom:5px!important;background:#e8f1df!important;color:#283f1d!important}
.budget-table tbody tr.budget-chapter-row .chapter-sum-label{font-size:12px!important;font-weight:900!important}
.labor-mode-tabs{display:flex;gap:5px;margin-top:4px}
.labor-mode-tabs .small-button.active{background:var(--green)!important;color:white!important;border-color:var(--green)!important}
.labor-summary-title td{font-size:12px!important;font-weight:900!important;background:#e8f1df!important;border-top:2px solid #607d3b!important;color:#304722!important}
.labor-summary-table th:nth-child(1),.labor-summary-table td:nth-child(1){width:9%!important}
.labor-summary-table th:nth-child(2),.labor-summary-table td:nth-child(2){width:43%!important}
.labor-summary-table th:nth-child(3),.labor-summary-table td:nth-child(3){width:8%!important}
.labor-summary-table th:nth-child(4),.labor-summary-table td:nth-child(4){width:12%!important}
.labor-summary-table th:nth-child(5),.labor-summary-table td:nth-child(5){width:13%!important}
.labor-summary-table th:nth-child(6),.labor-summary-table td:nth-child(6){width:15%!important}
@media(max-width:1120px){#budgetView>.budget-header{grid-template-columns:1fr!important}#budgetView>.budget-header .actions{flex-wrap:wrap!important}}

/* v4.4.8 — TÍTULOS de Presupuesto: formato definitivo aprobado */
.budget-table tbody tr.budget-chapter-row td,
.budget-table tbody tr.budget-chapter-row td strong,
.budget-table tbody tr.budget-chapter-row .report-apu-link {
  font-size:14px !important;
  font-weight:900 !important;
}

/* v4.4.9 — Presupuesto consolidado */
#budgetView>.budget-header{display:block!important;margin:0 0 3px!important;padding:0!important}
#budgetView .budget-title-line{display:grid!important;grid-template-columns:auto minmax(420px,1fr)!important;align-items:end!important;gap:14px!important}
#budgetView .budget-title-line>.subnav{margin:0!important;min-height:30px!important;align-self:end!important}
#budgetView .budget-title-line>.subnav .subnav-button{padding:5px 14px!important;min-height:30px!important;font-size:10px!important}
#budgetMainSubview .budget-project-identity{display:grid!important;grid-template-columns:1fr 1fr!important;gap:1px 18px!important;padding:4px 10px!important;margin:0 0 3px!important;border-left:4px solid var(--green)!important;min-height:0!important}
#budgetMainSubview .budget-project-identity .wide{grid-column:1/-1!important}
#budgetMainSubview .budget-project-identity span{display:inline!important;font-size:7.5px!important;line-height:1!important;margin-right:6px!important}
#budgetMainSubview .budget-project-identity strong{display:inline!important;font-size:11.5px!important;line-height:1.05!important;margin:0!important}
#budgetMainSubview .budget-toolbar{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px!important;margin:0 0 3px!important;padding:0 5px!important;min-height:31px!important}
#budgetMainSubview .budget-toolbar .button{font-size:9.5px!important;line-height:1!important;padding:7px 9px!important;min-height:29px!important;white-space:nowrap!important}
#budgetMainSubview .budget-toolbar #addBudgetItem{margin-left:auto!important}
#budgetMainSubview .selection-hint{margin:0 0 2px!important;padding:4px 8px!important;min-height:0!important}
.budget-table tbody tr.budget-chapter-row td,.budget-table tbody tr.budget-chapter-row td strong,.budget-table tbody tr.budget-chapter-row .report-apu-link{font-size:14px!important;font-weight:900!important;line-height:1.05!important}
@media(max-width:1100px){#budgetView .budget-title-line{grid-template-columns:1fr!important}#budgetMainSubview .budget-toolbar{flex-wrap:wrap!important}#budgetMainSubview .budget-toolbar #addBudgetItem{margin-left:0!important}}


/* v4.4.10 — cierre de interfaz Presupuesto + actualización de costos */
#budgetView .budget-title-line{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:12px!important;margin:0!important;padding:0!important}
#budgetView .budget-title-line>div:first-child{flex:0 0 auto!important}
#budgetView .budget-title-line>.budget-only-subnav{display:flex!important;flex:1 1 auto!important;justify-content:flex-start!important;align-items:center!important;margin:0 0 1px 12px!important;padding:0!important;border:0!important;gap:5px!important;min-height:0!important}
#budgetView .budget-main-title{margin:0!important;line-height:1!important}
#budgetView .budget-header{margin:0 0 2px!important}
#budgetMainSubview .budget-project-identity{padding:3px 9px!important;margin-bottom:2px!important}
#budgetMainSubview .budget-toolbar{margin-bottom:2px!important}
.supply-price-input{width:105px;max-width:100%;padding:5px 6px;border:1px solid var(--green);border-radius:6px;text-align:right;font:inherit;background:#fff}
@media(max-width:980px){#budgetView .budget-title-line{align-items:flex-start!important;flex-wrap:wrap!important}#budgetView .budget-title-line>.budget-only-subnav{margin-left:0!important;flex-basis:100%!important}}

.form-feedback{padding:12px;border:2px solid #925000;background:#fff5df;color:#663800;white-space:pre-wrap;font-weight:600}
[hidden]{display:none!important}

.budget-quantity-button{border:1px solid #b8c9ad;border-radius:5px;background:#fff;color:var(--green-dark);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer;padding:3px 5px;min-width:48px;text-align:right}.budget-quantity-button:hover{background:#edf5e7}.budget-quantity-button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
#estimateDialog{width:min(1250px,96vw)}.estimate-concepts{padding:0 23px 12px}.estimate-concepts p{line-height:1.5;font-size:12px}.estimate-concepts>label{display:grid;gap:6px;margin-bottom:10px}.estimate-concepts .table-panel{max-height:38vh}.estimate-concepts table{min-width:1050px}.estimate-concepts td:first-child{min-width:230px;max-width:350px}.estimate-line-quantity{min-width:90px}.estimate-concepts td small{display:block;font-size:10px;margin-top:4px}.estimate-message{padding:0 23px 12px}#estimateNet{font-weight:bold;background:#edf5e7}


/* 5.1.6: menos espacio vertical, sin reducir los tamaños de letra. */
.view .section-header,.view .subsection-header{gap:8px;margin-bottom:7px}
.view .section-header p,.view .subsection-header p{margin-bottom:3px;line-height:1.25}
.view .toolbar{padding:6px;gap:6px;margin-bottom:7px}
.view .toolbar input,.view .toolbar select{padding:6px 8px}
.view th,.view td,dialog th,dialog td{padding-top:4px!important;padding-bottom:4px!important;line-height:1.22}
.view .button,dialog .button{padding-top:6px;padding-bottom:6px}
.view .cards{gap:7px;margin-bottom:7px}.view .card{padding:8px}
.hero{padding:11px;gap:12px}.hero h2{margin-bottom:4px}.hero-total strong{margin-top:3px}
.dashboard-cards{gap:8px;margin:8px 0}.dashboard-card{padding:9px;gap:8px}
.home-grid,.security-grid{gap:8px}.panel-title{padding:9px 12px 6px}
.summary-list{padding:0 12px 9px}.summary-row{padding:5px 0}
.security-message{padding:6px 12px 10px;line-height:1.25}
.dialog-header,dialog .dialog-header,#userDialog .dialog-header{padding:8px 12px!important}
.form-grid{padding:8px 12px;gap:7px 10px}
.dialog-form>label,#userDialog .dialog-form>label{margin:6px 12px!important}
.dialog-form label,.form-grid label{gap:3px}
.dialog-form input,.dialog-form select,.dialog-form textarea,#userDialog input,#userDialog select{padding:6px 8px!important}
.dialog-form input[type=checkbox],.dialog-form input[type=radio]{padding:0!important}
.dialog-actions,#userDialog .dialog-actions{padding:8px 12px!important;gap:7px}
.dialog-form p{margin-top:4px;margin-bottom:4px;line-height:1.25}
.apu-dialog-compact .dialog-header{padding:7px 10px!important}
.estimate-concepts{padding:0 12px 6px}.estimate-concepts>label{gap:3px;margin-bottom:5px}
.estimate-concepts p{line-height:1.25;margin:4px 0}.estimate-concepts td small{margin-top:2px}
.estimate-message{padding:0 12px 6px}.form-feedback{padding:7px}
@media(min-width:781px){.content{padding:6px 8px!important}}
@media print{.view th,.view td{padding-top:3px!important;padding-bottom:3px!important}}

/* Calculadora de materiales: captura compacta y resultados con unidades visibles. */
.calc-layout{display:grid;grid-template-columns:minmax(280px,0.8fr) minmax(400px,1.3fr);gap:12px;align-items:start}
.calc-layout .panel{min-width:0;padding:12px}.calc-layout .actions{margin:10px 0;flex-wrap:wrap}
.calc-layout .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
.calc-layout input,.calc-layout select{width:100%;min-width:0}.calc-formula{display:block;color:#59674f;font-size:11px;margin-top:3px}
.calc-notes{padding-left:18px;margin:8px 0;line-height:1.35}.calc-notes li{margin-bottom:4px}
.calc-layout th,.calc-layout td{padding:5px;vertical-align:top}.calc-layout td.num{white-space:nowrap}
#calcApplyPanel{border-top:1px solid #c9d5c0;margin-top:12px;padding-top:8px}#calcStatus{margin-top:0;font-weight:700}
@media(max-width:1050px){.calc-layout{grid-template-columns:1fr}}

.calc-layout.dosage-layout{grid-template-columns:minmax(0,1fr)}.dosage-layout .form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.dosage-layout .span2{grid-column:span 2}.calc-source{font-size:12px;margin:8px 0}.dosage-layout td{overflow-wrap:anywhere}.dosage-layout td.num{white-space:normal}#calcShowDeleted{width:auto}
@media(max-width:800px){.dosage-layout .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Jornales por unidad: conservar visibles ambos coeficientes de la cuadrilla. */
.apu-dialog-compact .dialog-summary .card:nth-child(4) .value{white-space:normal;overflow:visible;text-overflow:clip}

.material-cost-cell button.price-readonly{border:0;background:transparent;padding:0;font:inherit;color:inherit;text-decoration:underline;cursor:pointer}

/* Costo horario: margen uniforme, importes identificados y desplazamiento contenido. */
html,body,dialog{overscroll-behavior-x:contain}
dialog{overscroll-behavior:contain}
#equipmentDialog .dialog-header{padding:12px 24px 10px!important}
#equipmentDialog .form-grid{padding:8px 24px;grid-template-columns:repeat(2,minmax(0,1fr))}
#equipmentDialog .dialog-form>p,#equipmentDialog .selection-hint{margin:8px 24px!important}
#equipmentDialog .dialog-actions{padding:12px 24px 16px}
#equipmentDialog .currency-control{display:flex;align-items:stretch;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#fff}
#equipmentDialog .currency-symbol{display:flex;align-items:center;padding:0 10px;background:#f1f5ed;color:var(--ink);font-weight:800;border-right:1px solid var(--line)}
#equipmentDialog .currency-control input{border:0;border-radius:0;min-width:0}
@media(max-width:600px){#equipmentDialog .form-grid{grid-template-columns:1fr}}


/* Compact, explicit list ordering without changing stored rows. */
.catalog-order,.list-order-control{display:flex;align-items:center;gap:.45rem;font-size:.8rem;white-space:nowrap;margin:0}
.catalog-order select,.list-order-control select{width:auto;min-width:140px;padding:.3rem .5rem}
.list-order-control{padding:.25rem .5rem;justify-content:flex-end;flex-wrap:wrap}
.list-order-control small{font-size:.73rem;color:#657080}

/* OM 2026-10-26: move controls stay beside the row number, including horizontal scroll. */
#apuDialog .dialog-table thead th:first-child{width:78px!important;min-width:78px!important;position:sticky;left:0;z-index:4;background:#edf4e6}
#apuDialog .dialog-table tbody td.component-position{width:78px!important;min-width:78px!important;position:sticky;left:0;z-index:2;background:#fff;white-space:nowrap!important;overflow:visible!important}
#apuDialog .component-order-controls{display:inline-flex;gap:2px;margin-left:4px;vertical-align:middle}
#apuDialog .component-order-controls .component-move{display:inline-flex;align-items:center;justify-content:center;width:23px;min-width:23px;height:24px;padding:1px!important;font-size:15px!important;line-height:1!important}
#apuDialog .deleted-component td.component-position{background:#f6eeee}
@media print{#apuDialog .component-order-controls{display:none!important}}

/* Keep the key and start of the description visible in native catalog menus. */
#budgetItemApu{direction:ltr;text-align:left;width:100%;min-width:0;max-width:100%}
#budgetItemApu option{direction:ltr;text-align:left}
#budgetItemApuInfo{white-space:normal;overflow-wrap:anywhere}
