:root{--navy:#06265f;--blue:#087bd8;--cyan:#08b9ed;--ink:#14213d;--muted:#64748b;--line:#e7edf5;--bg:#f4f8fc;--red:#c73c3c;--orange:#d97706;--green:#16805b}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:14px/1.45 Arial,sans-serif;color:var(--ink)}.layout{display:flex;min-height:100vh}.side{position:sticky;top:0;height:100vh;width:250px;padding:25px 14px;background:linear-gradient(180deg,var(--navy),#031a40);color:#fff}.brand-wrap{display:flex;align-items:center;gap:10px;padding:0 8px 25px;border-bottom:1px solid #ffffff1e}.brand-logo{width:48px;height:48px;object-fit:contain}.brand-text strong{display:block;letter-spacing:.8px}.brand-text small{color:#a8ddff}.side nav{padding-top:16px}.side a{display:block;color:#dcecff;text-decoration:none;padding:11px 13px;border-radius:9px;margin:3px 0}.side a:hover{background:#ffffff16}.main{width:calc(100% - 250px);padding:25px 32px}.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.top h2{margin:1px 0 0;font-size:23px}.eyebrow{display:block;color:var(--blue);font-size:11px;font-weight:800;letter-spacing:1.2px}.season-label{display:block;font-size:11px;color:var(--muted);font-weight:bold}.input,select,textarea{width:100%;padding:10px 12px;border:1px solid #cad6e4;border-radius:9px;background:#fff;font:inherit}.btn{display:inline-block;border:0;border-radius:9px;background:var(--blue);color:#fff;text-decoration:none;padding:10px 14px;cursor:pointer;font-weight:bold}.btn-light{background:#fff;color:var(--navy)}.btn-secondary{background:#e8f1fb;color:#075eae}.btn-sm{padding:7px 10px;font-size:12px}.card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px;margin:16px 0;box-shadow:0 6px 20px #072a5108}.hero,.client-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;background:linear-gradient(120deg,#06265f,#087bd8);border-radius:18px;padding:27px;color:#fff}.hero h1,.client-hero h1{margin:3px 0;font-size:29px}.hero p,.client-hero p{margin:4px 0;color:#e1f2ff}.hero .eyebrow,.client-hero .eyebrow{color:#9ee6ff}.hero-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.hero.compact{padding:21px}.hero.compact h1{font-size:25px}.kpi-grid,.executive-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}.kpi,.metric{background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px;text-decoration:none;color:inherit;box-shadow:0 5px 18px #072a5108}.kpi span,.metric small{display:block;color:var(--muted);font-size:11px;font-weight:bold;letter-spacing:.7px}.kpi strong,.metric strong{display:block;color:var(--navy);font-size:28px;margin-top:8px}.red{color:var(--red)!important}.orange{color:var(--orange)!important}.green{color:var(--green)!important}.toolbar,.section-head,.searchbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.filter-pills{display:flex;gap:7px;flex-wrap:wrap}.filter-pills a{padding:8px 11px;border-radius:20px;background:#eaf1f8;color:#456;text-decoration:none}.filter-pills a.active{background:var(--navy);color:#fff}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th{text-align:left;color:var(--muted);font-size:11px;letter-spacing:.6px}th,td{padding:13px 10px;border-bottom:1px solid var(--line);vertical-align:middle}td small{display:block;color:var(--muted);margin-top:3px}.status{display:inline-block;padding:5px 9px;border-radius:20px;font-size:12px;font-weight:bold}.status.ok{background:#e6f7ef;color:#116c4a}.status.warn{background:#fff5da;color:#9a6400}.status.hot{background:#ffe9d2;color:#b45309}.status.bad{background:#fde7e7;color:#b42318}.status.muted{background:#edf2f7;color:#667085}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-stack{display:grid;gap:12px}.form-stack label{font-weight:bold}.rules-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}.rules-grid div{padding:11px;border-radius:10px;background:#f3f7fc}.rules-grid b,.rules-grid span{display:block}.rules-grid span{font-size:12px;color:var(--muted)}.calendar{display:grid;grid-template-columns:repeat(7,1fr);border:1px solid var(--line);border-radius:15px;overflow:hidden;background:#fff}.cal-head{padding:11px;background:#edf5fc;color:var(--navy);font-weight:bold;text-align:center}.cal-day{min-height:135px;padding:8px;border-right:1px solid var(--line);border-top:1px solid var(--line)}.cal-day.today{background:#eff9ff}.cal-day.empty{background:#f9fbfd}.cal-item{display:block;background:#e9f4ff;border-left:3px solid var(--blue);border-radius:6px;padding:5px;margin-top:6px;color:var(--ink);text-decoration:none;font-size:11px}.cal-item.done{border-left-color:var(--green);background:#edf8f2}.cal-item span,.cal-item small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.client-hero{background:linear-gradient(120deg,#06265f,#0b62b4)}.avatar{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--navy);font-size:24px;font-weight:bold}.client-hero>div:nth-child(2){flex:1}.details{display:grid;grid-template-columns:145px 1fr;gap:10px}.details dt{font-weight:bold;color:var(--muted)}.details dd{margin:0}.declaration-list{display:grid;gap:8px}.declaration-list a{display:flex;justify-content:space-between;gap:10px;padding:12px;background:#f4f8fc;border-radius:9px;text-decoration:none;color:var(--ink)}.declaration-list span{color:var(--muted);font-size:12px}.link-card{display:block;text-decoration:none;color:inherit}.link-card:hover{border-color:var(--blue);transform:translateY(-1px)}.muted{color:var(--muted)}hr{border:0;border-top:1px solid var(--line);margin:18px 0}@media(max-width:960px){.side{width:72px;padding:20px 8px}.brand-text,.side a{font-size:0}.side a{height:40px}.brand-logo{width:42px}.main{width:calc(100% - 72px);padding:20px}.kpi-grid,.executive-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:680px){.side{display:none}.main{width:100%;padding:14px}.top,.hero,.client-hero,.toolbar,.section-head{align-items:flex-start;flex-direction:column}.kpi-grid,.executive-grid,.split{grid-template-columns:1fr}.calendar{font-size:10px}.cal-day{min-height:95px;padding:4px}.cal-head{padding:7px 2px}.cal-item{padding:3px;margin-top:3px}.hero h1,.client-hero h1{font-size:23px}.details{grid-template-columns:1fr}.declaration-list a{flex-direction:column}.top form{width:100%}}

.ht-head{text-align:center}.ht-wrap{overflow:auto}.ht-table{width:100%;border-collapse:collapse}.ht-table th,.ht-table td{padding:9px;border:1px solid #d9dee5}.ht-section td{font-weight:800;background:#eef2f6}.ht-history{background:#f7f7f7}.ht-form{display:flex;gap:6px}.ht-form input{min-width:120px;padding:7px}.ht-add td{font-weight:700;cursor:pointer}

.ht-add-form{display:flex;gap:8px;align-items:center}.ht-add-form input{padding:8px;min-width:180px}@media(max-width:700px){.ht-add-form{flex-direction:column;align-items:stretch}}

.ht-doc-form{display:flex;gap:5px}.ht-doc-form select{max-width:220px;padding:6px}

.ht-multilinks{display:grid;gap:7px;margin:12px 0;max-height:420px;overflow:auto}.ht-multilinks label{padding:8px;border-bottom:1px solid #e5e7eb}

.ht-total{font-weight:800;text-align:right}

.ht-alert{display:inline-block;padding:4px 7px;margin:2px;border-radius:12px;font-size:11px;font-weight:800;background:#eef2f6}.ht-alert-faltante,.ht-alert-sin-soporte{border:1px solid #b91c1c}.ht-alert-variacion{border:1px solid #b45309}.ht-alert-nuevo{border:1px solid #047857}

.ht-action{display:inline-block;padding:4px 8px;border:1px solid #cbd5e1;border-radius:12px;font-size:11px;font-weight:800}

/* V23 P13.1 Integracion UX */
.ht-toolbar{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.ht-head{position:sticky;top:0;z-index:5}
.ht-table thead th{position:sticky;top:0;z-index:4}
.ht-table input[type=number]{width:150px}
@media(max-width:900px){.ht-table{min-width:1050px}.ht-toolbar{justify-content:flex-start}}

.ht-main-card{outline:2px solid rgba(13,126,220,.18)}.exp-actions{margin-top:20px}

/* V23 P13.4 Hoja de trabajo reconstruida */
.ht-page{display:grid;gap:16px}.ht-premium-head{display:flex;justify-content:space-between;align-items:center;padding:24px;border-radius:18px;background:linear-gradient(135deg,#071b2e,#123b59);color:#fff}.ht-premium-head h1{margin:4px 0}.ht-premium-head p{margin:0;opacity:.8}.ht-actions{display:flex;gap:8px;flex-wrap:wrap}.ht-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.ht-summary div{background:#fff;padding:18px;border-radius:14px;border:1px solid #e5e7eb}.ht-summary small{display:block;color:#64748b;font-weight:700}.ht-summary strong{display:block;margin-top:7px;font-size:21px}.ht-filter{display:flex;gap:20px;align-items:center}.ht-filter input[type=text],#htSearch{flex:1;padding:11px;border:1px solid #cbd5e1;border-radius:9px}.ht-section-card{padding:0;overflow:hidden}.ht-section-card summary{display:flex;justify-content:space-between;padding:17px 20px;cursor:pointer;font-weight:800;background:#f8fafc}.ht-section-card summary strong{font-size:18px}.ht-table{margin:0}.ht-table th{font-size:11px;letter-spacing:.04em}.ht-table td{vertical-align:middle}.ht-history{font-weight:700}.ht-ok{font-weight:800}.ht-alert{white-space:nowrap}.ht-form button,.ht-doc-form button{padding:7px 9px}.ht-add td{background:#f8fafc}.ht-add-form{padding:5px}.ht-add-form input{background:#fff}@media(max-width:900px){.ht-premium-head{align-items:flex-start;flex-direction:column;gap:16px}.ht-summary{grid-template-columns:repeat(2,1fr)}}

.ht-upload-form{display:flex;align-items:center;gap:7px}.ht-upload-btn{display:inline-block;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;cursor:pointer;font-weight:700}.ht-upload-btn input{display:none}.ht-support-count{font-size:12px;font-weight:800}.ht-link-existing{margin-top:5px;font-size:11px}.ht-link-existing summary{cursor:pointer;color:#64748b}
.ai-config{display:grid;gap:18px}.ai-master{display:flex;justify-content:space-between;align-items:center}.ai-master p{color:#64748b}.ai-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.ai-provider{display:grid;gap:10px;cursor:pointer}.ai-provider.active{outline:2px solid #0b7fe5}.ai-title{display:flex;align-items:center;gap:10px}.ai-title strong{font-size:22px}.ai-title span{margin-left:auto;font-size:11px;font-weight:800}.ai-provider input[type=password],.ai-provider input[name$=model]{padding:12px;border:1px solid #cbd5e1;border-radius:9px}.switch input{display:none}.switch span{display:block;width:54px;height:30px;background:#cbd5e1;border-radius:30px;cursor:pointer}.switch input:checked+span{background:#0b7fe5}.ai-success{padding:12px;background:#ecfdf5;border-radius:9px}@media(max-width:800px){.ai-grid{grid-template-columns:1fr}}.ai-test{padding:10px;border:1px solid #cbd5e1;border-radius:8px;cursor:pointer}.ai-ok{color:#15803d;font-weight:700}.ai-error{color:#b91c1c;font-weight:700}.pd-wrap{display:grid;gap:18px}.pd-wrap form{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.pd-preview{width:100%;min-height:420px;padding:14px;border:1px solid #cbd5e1;border-radius:9px;font-family:monospace}.pd-head{display:flex;justify-content:space-between;align-items:center}.pd-error{border-left:4px solid #b91c1c}.ia-doc-grid{display:grid;gap:14px}.ia-doc{display:grid;gap:12px}.campo-form{display:grid!important;grid-template-columns:1fr 1fr auto}.ia-status{padding:5px 9px;border-radius:20px;background:#eef2ff;font-size:12px}.campos{display:grid;gap:5px}.ht-ia-panel{margin-bottom:22px}.ht-ia-panel form{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.ht-ia-actions{display:flex;gap:15px;align-items:center;margin:15px 0}.ht-ia-queue{display:grid;gap:8px}.ht-ia-item{display:grid;grid-template-columns:1fr auto;gap:6px;padding:12px;border:1px solid #dbe3ef;border-radius:10px}.ht-ia-item .ia-error{grid-column:1/-1;color:#b91c1c}.ht-ia-panel .pd-head span{font-weight:700;color:#64748b}.ht-ia-proposals{margin-bottom:20px}.ia-proposal-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;padding:10px;border-bottom:1px solid #e5e7eb;align-items:center}.ia-proposal-row em{font-style:normal;font-size:11px;font-weight:800;padding:4px 8px;border-radius:12px;background:#eef2ff}.ht-ia-panel{margin:0 0 18px;padding:0!important;overflow:hidden}.ht-ia-panel summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;padding:16px 20px}.ht-ia-panel summary::-webkit-details-marker{display:none}.ht-ia-panel summary b{font-size:18px}.ht-ia-panel summary small{color:#64748b;margin-left:8px}.ht-ia-toggle{font-size:12px;font-weight:800;color:#2563eb;background:#eff6ff;padding:7px 11px;border-radius:999px}.ht-ia-body{padding:18px 20px;border-top:1px solid #e5e7eb}.ht-ia-body h2{font-size:20px;margin:0 0 6px}.ht-ia-body p{margin:0 0 14px;color:#64748b}.ht-ia-queue{max-height:280px;overflow:auto}.ht-ia-item{padding:10px 12px!important;background:#fafcff}.ia-retry{width:auto!important;padding:7px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;justify-self:end}.ht-page{max-width:1500px;margin:auto}.ht-premium-head{padding:20px 24px!important}.ht-kpis{gap:12px!important}.ht-kpi,.card{box-shadow:0 6px 22px rgba(15,23,42,.04)}.ht-section{margin-bottom:18px!important;overflow:hidden}.ht-section-head{padding:15px 20px!important}.ht-section table{font-size:14px}.ht-section th{padding:11px 14px!important}.ht-section td{padding:10px 14px!important;vertical-align:middle}.ht-section input{min-height:40px;border-radius:8px!important}.ht-section .btn{min-height:40px;border-radius:9px!important}.ht-ia-proposals{padding:18px 20px!important}.ia-proposal-row{padding:9px 4px!important;font-size:13px}@media(max-width:800px){.ht-ia-panel summary,.ht-ia-body{padding:14px}.ht-section{overflow-x:auto}.ht-premium-head{padding:16px!important}.ia-proposal-row{grid-template-columns:1fr auto}}.ht-premium-head{padding:12px 18px!important}.ht-premium-head h1{font-size:22px!important;margin:2px 0!important}.ht-premium-head p{margin:2px 0!important}.ia-proposal-row{grid-template-columns:1fr auto auto auto!important}.ia-actions{display:flex;gap:6px}.ia-actions button{padding:5px 9px;border:1px solid #dbe3ef;border-radius:7px;background:#fff;cursor:pointer}.ht-add td{background:#f8fafc!important;border-top:1px solid #e2e8f0!important;padding:12px 14px!important}.ht-add-form{display:grid;grid-template-columns:minmax(220px,1fr) 180px auto;gap:10px;align-items:center}.ht-add-form .btn{white-space:nowrap}@media(max-width:800px){.ht-add-form{grid-template-columns:1fr}.ht-add-form .btn{width:100%}}
/* V25 P2 - Hoja de Trabajo integral */
.ht-v25-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.ht-v25-main{min-width:0}.ht-v25-side{display:grid;gap:14px;position:sticky;top:16px}
.v25-side-card{padding:18px!important}.v25-side-card h3{font-size:14px;text-transform:uppercase;letter-spacing:.03em;margin:0 0 15px}
.v25-stat{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #edf1f5;font-size:13px}.v25-stat strong{font-variant-numeric:tabular-nums}
.v25-progress{display:grid;gap:7px;font-size:13px}.v25-progress span{color:#64748b;line-height:1.45}.v25-full{display:block;text-align:center;margin-top:14px}
.v25-side-card>a:not(.btn){display:block;padding:9px 0;border-bottom:1px solid #edf1f5;color:#172554;text-decoration:none;font-size:13px;font-weight:650}
.ht-premium-head{border:1px solid #e4eaf2!important;background:linear-gradient(180deg,#fff,#fbfdff)!important}.ht-premium-head h1{font-size:20px!important}
.ht-section{border:1px solid #e4eaf2!important;border-radius:12px!important}.ht-section-head{background:#fbfdff!important}
.ht-data-row:hover td{background:#f8fbff}.ht-add td{background:#fbfdff!important}.ht-add-form .btn{background:#fff!important;color:#172554!important;border:1px dashed #9fb0c8!important}
.ht-ia-proposals{border-left:4px solid #2563eb}.ia-proposal-row{border-radius:8px}.ia-actions button:hover{background:#f1f5f9}
@media(max-width:1100px){.ht-v25-layout{grid-template-columns:1fr}.ht-v25-side{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.ht-v25-side{grid-template-columns:1fr}.ht-v25-layout{gap:12px}}

/* V25 P2.2 - Reversion visual controlada */
.ht-page{max-width:1500px!important;width:100%!important;margin:0 auto!important}
.ht-v25-layout{display:block!important}.ht-v25-side{display:none!important}.ht-v25-main{display:block!important;width:100%!important}
.ht-section-card,.ht-filter,.ht-ia-proposals,.ht-ia-panel{width:100%!important;max-width:none!important}
.ht-wrap{width:100%;overflow-x:auto}.ht-table{width:100%;min-width:980px;table-layout:auto}
.ht-data-row td{height:auto!important;min-height:0!important;padding:10px 14px!important}
.ht-add-form{width:100%}.ht-ia-panel summary{min-height:64px}

/* V25 P2.3 - Hoja de trabajo compacta y fluida */
.ht-wrap{overflow-x:visible!important}
.ht-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.ht-table th:nth-child(1),.ht-table td:nth-child(1){width:22%}
.ht-table th:nth-child(2),.ht-table td:nth-child(2){width:8%}
.ht-table th:nth-child(3),.ht-table td:nth-child(3){width:27%}
.ht-table th:nth-child(4),.ht-table td:nth-child(4){width:10%}
.ht-table th:nth-child(5),.ht-table td:nth-child(5){width:18%}
.ht-table th:nth-child(6),.ht-table td:nth-child(6){width:15%}
.ht-table th,.ht-table td{padding:9px 10px!important;vertical-align:middle!important;overflow-wrap:anywhere}
.ht-form{display:flex!important;gap:6px!important;align-items:center}.ht-form input{min-width:0!important;width:100%!important}.ht-form button{flex:0 0 auto!important;padding:8px 10px!important}
.ht-upload-form{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap}.ht-upload-btn{padding:7px 9px!important}.ht-link-existing summary{padding:5px 0!important;font-size:12px}
.ht-alert,.ht-ok{display:inline-block!important;margin:2px!important;font-size:11px!important;white-space:nowrap}
.ht-add-form{display:grid!important;grid-template-columns:minmax(0,1fr) 180px auto!important;gap:8px!important}.ht-add-form input{min-width:0!important;width:100%!important}
@media(max-width:900px){.ht-wrap{overflow-x:auto!important}.ht-table{min-width:850px!important}.ht-add-form{grid-template-columns:1fr!important}}


/* V30.15 - Hoja de trabajo sin desplazamiento horizontal y editor compacto */
.ht-wrap{
  width:100%!important;
  overflow-x:hidden!important;
}
.ht-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
.ht-table th,.ht-table td{
  box-sizing:border-box!important;
  min-width:0!important;
  overflow:hidden!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
.ht-table th:nth-child(1),.ht-table td:nth-child(1){width:21%!important}
.ht-table th:nth-child(2),.ht-table td:nth-child(2){width:8%!important}
.ht-table th:nth-child(3),.ht-table td:nth-child(3){width:31%!important}
.ht-table th:nth-child(4),.ht-table td:nth-child(4){width:10%!important}
.ht-table th:nth-child(5),.ht-table td:nth-child(5){width:18%!important}
.ht-table th:nth-child(6),.ht-table td:nth-child(6){width:12%!important}

.ht-data-row td{
  padding:10px 10px!important;
  vertical-align:top!important;
}
.ht-form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(105px,.42fr) auto!important;
  grid-template-areas:
    "concept concept concept"
    "description value save"!important;
  gap:7px 8px!important;
  align-items:end!important;
  width:100%!important;
  min-width:0!important;
}
.ht-form label{min-width:0!important;margin:0!important}
.ht-concept-edit{grid-area:concept!important;display:grid!important;gap:3px!important}
.ht-description-edit{grid-area:description!important;display:grid!important;gap:3px!important;min-width:0!important}
.ht-value-edit{grid-area:value!important;display:grid!important;gap:3px!important;min-width:0!important}
.ht-save-edit{grid-area:save!important;align-self:end!important;white-space:nowrap!important;height:40px!important;padding:7px 9px!important}
.ht-form select,.ht-form input{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  height:40px!important;
  padding:7px 9px!important;
  font-size:14px!important;
}
.ht-form select{
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
.ht-form small{display:block!important;font-size:11px!important;line-height:1.15!important;color:#64748b!important}
.ht-rounded-hint{font-size:10px!important;line-height:1.1!important;white-space:nowrap!important;color:#64748b!important}
.ht-support-links{display:grid!important;gap:3px!important;margin-top:5px!important}
.ht-support-links a{display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:normal!important;line-height:1.25!important}
.ht-upload-form{display:flex!important;gap:5px!important;align-items:center!important;flex-wrap:wrap!important}
.ht-link-existing{max-width:100%!important}
.ht-doc-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;max-width:100%!important}
.ht-doc-form select{width:100%!important;min-width:0!important;max-width:100%!important}
.ht-delete{max-width:100%!important;white-space:normal!important;padding:7px 8px!important}

@media(max-width:1100px){
  .ht-table th:nth-child(1),.ht-table td:nth-child(1){width:19%!important}
  .ht-table th:nth-child(2),.ht-table td:nth-child(2){width:7%!important}
  .ht-table th:nth-child(3),.ht-table td:nth-child(3){width:35%!important}
  .ht-table th:nth-child(4),.ht-table td:nth-child(4){width:8%!important}
  .ht-table th:nth-child(5),.ht-table td:nth-child(5){width:19%!important}
  .ht-table th:nth-child(6),.ht-table td:nth-child(6){width:12%!important}
  .ht-form{grid-template-columns:minmax(0,1fr) minmax(95px,.42fr)!important;grid-template-areas:"concept concept" "description value" "save save"!important}
  .ht-save-edit{width:100%!important}
}

@media(max-width:760px){
  .ht-wrap{overflow:visible!important}
  .ht-table,.ht-table thead,.ht-table tbody,.ht-table tr,.ht-table th,.ht-table td{display:block!important;width:100%!important}
  .ht-table thead{display:none!important}
  .ht-data-row{display:grid!important;grid-template-columns:1fr 1fr!important;border-bottom:1px solid #dbe3ef!important;padding:8px!important}
  .ht-data-row td{width:auto!important;border:0!important;padding:6px 8px!important;overflow:visible!important}
  .ht-data-row td:nth-child(1),.ht-data-row td:nth-child(3),.ht-data-row td:nth-child(5){grid-column:1/-1!important}
  .ht-form{grid-template-columns:1fr!important;grid-template-areas:"concept" "description" "value" "save"!important}
  .ht-add{display:block!important}.ht-add td{display:block!important;width:100%!important}
}

/* V30.16 - Distribución exacta del editor 2025 solicitada:
   Concepto (100%) -> Descripción (100%) -> Valor + Guardar -> Final bajo valor */
.ht-form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:
    "concept concept"
    "description description"
    "value save"!important;
  gap:6px 8px!important;
  align-items:end!important;
  width:100%!important;
  min-width:0!important;
}
.ht-concept-edit{grid-area:concept!important;width:100%!important;min-width:0!important}
.ht-description-edit{grid-area:description!important;width:100%!important;min-width:0!important}
.ht-value-edit{grid-area:value!important;width:100%!important;min-width:0!important}
.ht-save-edit{
  grid-area:save!important;
  align-self:end!important;
  width:auto!important;
  min-width:118px!important;
  max-width:100%!important;
  height:40px!important;
  white-space:nowrap!important;
}
.ht-rounded-hint{
  display:block!important;
  margin-top:2px!important;
  line-height:1.1!important;
  white-space:normal!important;
}

@media(max-width:1100px){
  .ht-form{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "concept concept"
      "description description"
      "value save"!important;
  }
  .ht-save-edit{width:auto!important;min-width:110px!important}
}

@media(max-width:760px){
  .ht-form{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "concept concept"
      "description description"
      "value save"!important;
  }
  .ht-save-edit{width:auto!important;min-width:104px!important;padding-left:8px!important;padding-right:8px!important}
}

@media(max-width:430px){
  .ht-form{
    grid-template-columns:1fr!important;
    grid-template-areas:
      "concept"
      "description"
      "value"
      "save"!important;
  }
  .ht-save-edit{width:100%!important}
}
