/* ── Garbianti Presupuestador – v0.6 ── */

/* Base */
.gbpres-card{background:#fff;border:1px solid #dcdcdc;border-radius:12px;padding:20px 24px}
.gbpres-header{border-bottom:1px solid #eee;padding-bottom:12px;margin-bottom:0}
.gbpres-header h2{margin:0 0 2px;font-size:20px}
.gbpres-header-microstats{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.gbpres-header-microstats .gbpres-inc-badge{padding:6px 12px;font-size:12px}

/* ── Barra de pasos ── */
.gbpres-stepsbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:18px 0 22px;padding:14px 16px;background:#f7f7f7;border-radius:10px}
.gbpres-step{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#e8e8e8;font-size:13px;font-weight:600;color:#555;transition:background .2s,color .2s}
.gbpres-step.active{background:#111;color:#fff}
.gbpres-step.done{background:#d1fae5;color:#065f46}
.gbpres-step-num{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.12);font-size:11px;font-weight:700}
.gbpres-step.active .gbpres-step-num{background:rgba(255,255,255,.2)}
.gbpres-step.done .gbpres-step-num{background:rgba(6,95,70,.2)}
.gbpres-step-label{font-size:12px}
.gbpres-step-arrow{color:#bbb;font-size:16px;line-height:1;flex-shrink:0}

/* ── Panel ── */
.gbpres-panel-header{margin-bottom:18px}
.gbpres-panel-badge{display:inline-block;padding:2px 10px;background:#111;color:#fff;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.5px;margin-bottom:6px}
.gbpres-panel-header h3{margin:4px 0 4px;font-size:17px}
.gbpres-panel-desc{margin:0;color:#666;font-size:13px}

/* ── Subsecciones dentro de un panel ── */
.gbpres-subsection-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.7px;color:#888;margin:20px 0 10px;padding-bottom:4px;border-bottom:1px solid #ebebeb}

/* ── Section cards ── */
.gbpres-section-card{
  margin:16px 0;
  padding:16px 20px 12px;
  border-radius:8px;
  border:1px solid #e8e8ec;
  border-left:3px solid #bbb;
  background:#fafafa;
}
.gbpres-section-card .gbpres-subsection-title{margin-top:0;margin-bottom:12px;border-bottom:none;padding-bottom:0;color:#1a1a2e;font-size:18px;letter-spacing:.3px}
.gbpres-section-mp{border-left-color:#c1272d}
.gbpres-section-tirador{border-left-color:#999}
.gbpres-section-cuerpo{border-left-color:#999}
.gbpres-section-herrajes{border-left-color:#999}
.gbpres-section-ms{border-left-color:#7b68a5}
.gbpres-section-entrega{border-left-color:#999}
.gbpres-section-buscar{border-left-color:#999}
.gbpres-section-lineas{border-left-color:#999}
.gbpres-section-cliente{border-left-color:#999}
.gbpres-section-obs{border-left-color:#999}
.gbpres-section-datos{border-left-color:#999}

/* ── Grid ── */
.gbpres-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 6px}
@media(max-width:980px){.gbpres-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.gbpres-grid{grid-template-columns:1fr}}
.gbpres-span2{grid-column:span 2}

/* ── Labels e inputs ── */
label{font-weight:600;font-size:13px}
label[data-required="1"]::after{content:" *";color:#b00020}
.gbpres-grid label{display:block}
.gbpres-grid input,
.gbpres-grid select,
.gbpres-grid textarea{width:100%;padding:9px 10px;border:1px solid #cfcfcf;border-radius:8px;background:#f5f5f5;font-size:13px;box-sizing:border-box;transition:border-color .15s,background .15s}
.gbpres-grid input:focus,
.gbpres-grid select:focus,
.gbpres-grid textarea:focus{outline:none;border-color:#111;background:#fff}
.gbpres-grid input:disabled{opacity:.55}
.gbpres-grid textarea{resize:vertical;min-height:72px}

/* ── Help / error ── */
.gbpres-help{display:block;color:#666;font-size:11px;margin-top:5px;line-height:1.4;font-weight:400}
.gbpres-error{color:#b00020}

/* ── Acciones ── */
.gbpres-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:16px}
.gbpres-muted{color:#888;font-size:12px}
.gbpres-btn-next{font-weight:700}
.gbpres-btn-prev{color:#fff;background:#c0392b;border-color:#a93226;font-weight:600}
.gbpres-btn-prev:hover,.gbpres-btn-prev:focus{color:#fff;background:#606360;border-color:#505350}

/* ── Warning ── */
.gbpres-warning{background:#fff3cd;border:1px solid #ffecb5;color:#664d03;padding:10px 14px;border-radius:8px;font-size:14px;margin-top:6px;line-height:1.5}
.gbpres-note{background:#eef6ff;border:1px solid #cfe3ff;color:#084298;padding:8px 10px;border-radius:8px;font-size:12px;line-height:1.35}

/* ── Summary pills ── */
.gbpres-summary{display:flex;gap:8px;flex-wrap:wrap}
.gbpres-pill{background:#f7f7f7;border:1px solid #e8e8e8;border-radius:999px;padding:6px 12px;font-size:12px}

/* Tooltip discreto (informativo) */
.gbpres-help{display:inline-flex;align-items:center;justify-content:center;margin-left:6px;width:18px;height:18px;border-radius:50%;border:1px solid #d0d0d0;font-size:12px;line-height:1;color:#666;cursor:help;user-select:none}

/* Estados */
.gbpres-status-badge{display:inline-block;padding:2px 8px;border-radius:999px;font-weight:800;font-size:11px;letter-spacing:.02em}
.gbpres-status-draft{background:#eee;color:#111}
.gbpres-status-sent{background:#d1fae5;color:#065f46}
.gbpres-status-error{background:#ffe4e6;color:#9f1239}

/* Sticky totals (Paso 3) */
.gbpres-sticky-totals{position:sticky;bottom:10px;z-index:30;margin-top:12px}
.gbpres-sticky-inner{max-width:420px;margin-left:auto;background:#fff;border:1px solid #e8e8e8;border-radius:12px;padding:10px 12px;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.gbpres-sticky-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0;font-size:12px}

/* Modo cliente final */
.gbpres-mode-client .gbpres-group-badge{display:none !important}
.gbpres-mode-client #gbpres_sum_groups_pill{display:none !important}

/* ── Búsqueda ── */
.gbpres-results{border:1px solid #ddd;border-radius:10px;background:#fff;max-height:420px;overflow-y:auto}
.gbpres-results-panel{margin-top:14px}
.gbpres-results-header{
  position: sticky;
  top: 10px;
  z-index: 20;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:12px;
}
.gbpres-results-body{margin-top:10px}
.gbpres-results-panel.is-minimized .gbpres-results-body{display:none}
.gbpres-results-toggle{white-space:nowrap}
.gbpres-cat-title{padding:8px 12px 4px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#888;background:#fafafa;position:sticky;top:0}
.gbpres-result-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 12px;border-bottom:1px solid #f0f0f0}
.gbpres-result-item:last-child{border-bottom:none}
.gbpres-result-info{flex:1;min-width:0}
.gbpres-result-desc{font-size:13px}
.gbpres-result-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.gbpres-result-actions label{font-size:11px;font-weight:400;color:#666;display:flex;align-items:center;gap:4px}
.gbpres-result-actions select{padding:4px 6px;border:1px solid #ccc;border-radius:6px;font-size:12px}

/* ── Tabla de líneas ── */
.gbpres-table{width:100%;border-collapse:collapse}
.gbpres-table th,.gbpres-table td{border-bottom:1px solid #eee;padding:8px 6px;text-align:left;font-size:12px;vertical-align:middle}
.gbpres-table th{font-weight:700;background:#fafafa;font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:#666}
.gbpres-badge{display:inline-block;padding:2px 8px;border-radius:999px;border:1px solid #e2e2e2;background:#f5f5f5;font-size:13px;font-family:monospace}
.gbpres-adj{color:#555;font-size:11px}
.gbpres-del{padding:2px 8px!important;font-size:11px;color:#b00020}
.gbpres-dup{padding:2px 8px!important;font-size:11px}

/* ── Total ── */
.gbpres-total{margin-top:12px;font-size:15px;text-align:right;padding:10px 0;border-top:2px solid #111}
.gbpres-lines-empty{color:#aaa;font-size:13px;margin:8px 0}

/* ── Resumen paso 4 ── */
.gbpres-resumen-block{border:1px solid #eee;border-radius:10px;overflow:hidden}
.gbpres-resumen-section{margin:16px 0;padding:0;border-radius:8px;border:1px solid #e8e8ec;border-left:3px solid #bbb;background:#fafafa;overflow:hidden}
.gbpres-resumen-section:last-child{margin-bottom:0}
.gbpres-resumen-label{padding:10px 14px;background:#f5f5f5;font-size:18px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:#1a1a2e;border-bottom:1px solid #e8e8ec}
.gbpres-resumen-grid{padding:14px 14px;grid-template-columns:repeat(4,minmax(0,1fr))}
.gbpres-resumen-grid>div{font-size:16px;line-height:1.55}
.gbpres-resumen-grid>div strong{display:block;font-size:13px;color:#666;text-transform:uppercase;letter-spacing:.4px;font-weight:700}

/* Ajuste para subsecciones sin grid en resumen */
.gbpres-resumen-block .gbpres-total{margin:0;padding:10px 14px;border-top:1px solid #eee;border-radius:0}
.gbpres-resumen-block .gbpres-table{margin:0}
.gbpres-resumen-block .gbpres-table th,.gbpres-resumen-block .gbpres-table td{padding:10px 14px;font-size:16px}
.gbpres-resumen-block .gbpres-table th{font-size:14px}

/* Valoración (Paso 4) */
.gbpres-val-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px}
.gbpres-val-grid label{font-size:16px}
.gbpres-val-grid input[type="number"],
.gbpres-val-grid input[type="text"],
.gbpres-val-grid select{font-size:16px;padding:10px;border-radius:8px}
.gbpres-val-summary{padding:0 14px 14px 14px;font-size:16px}
.gbpres-val-summary .row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed #e6e6e6}
.gbpres-val-summary .row:last-child{border-bottom:none}
.gbpres-val-summary .row strong{font-weight:800}

/* ── Responsive ── */
@media(max-width:640px){
  .gbpres-stepsbar{gap:2px;padding:10px}
  .gbpres-step-label{display:none}
  .gbpres-resumen-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ── Tirador info block ── */
.gbpres-tirador-info{margin:10px 0 6px;padding:12px 14px;background:#f8f8f8;border:1px solid #e8e8e8;border-radius:10px;font-size:13px;display:flex;flex-direction:column;gap:6px}
.gbpres-ti-badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.4px;margin-bottom:4px}
.gbpres-ti-badge--ok{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}
.gbpres-ti-badge--inc{background:#fef3c7;color:#92400e;border:1px solid #fde68a}
.gbpres-ti-row{display:flex;align-items:baseline;gap:6px;font-size:12px}
.gbpres-ti-row strong{color:#555;font-size:11px;text-transform:uppercase;letter-spacing:.4px;flex-shrink:0}
.gbpres-ti-pts{font-weight:700;color:#111}
.gbpres-ti-ral{color:#92400e;background:#fffbeb;padding:4px 8px;border-radius:6px;border:1px solid #fde68a}
.gbpres-ti-note{margin-top:4px;padding:6px 10px;background:#fff;border-left:3px solid #cfcfcf;border-radius:0 6px 6px 0;font-size:11px;color:#666;line-height:1.5}
.gbpres-ti-note--global{border-left-color:#3b82f6;background:#eff6ff;color:#1e3a5f}
.gbpres-ti-table{overflow-x:auto;margin-top:4px}
.gbpres-ti-table table{border-collapse:collapse;font-size:11px}
.gbpres-ti-table th,.gbpres-ti-table td{border:1px solid #e5e7eb;padding:3px 8px;text-align:center}
.gbpres-ti-table th{background:#f3f4f6;font-weight:700}

/* ── MS toggle bar ── */
.gbpres-ms-toggle-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.gbpres-toggle-label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;cursor:pointer;color:#111;background:#f5f5f5;padding:5px 12px;border-radius:999px;border:1px solid #ddd;transition:background .15s}
.gbpres-toggle-label:hover{background:#ebebeb}
.gbpres-toggle-label input[type=checkbox]{cursor:pointer;width:14px;height:14px}

/* ── MS section ── */
.gbpres-ms-section{margin-top:4px;padding:14px 16px;background:#fafafa;border:1px solid #e8e8e8;border-radius:10px}
.gbpres-ms-info{font-size:12px;color:#666;margin:0 0 12px;padding:8px 12px;background:#eff6ff;border-left:3px solid #93c5fd;border-radius:0 6px 6px 0}
.gbpres-ms-sub-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#888;margin:16px 0 8px;padding-bottom:3px;border-bottom:1px solid #e5e5e5}

/* ── Warning otro ── */
.gbpres-otro-warn{display:block;margin-top:6px;padding:6px 10px;background:#fff3cd;border:1px solid #ffd;border-radius:6px;font-size:11px;color:#856404;font-weight:400}

/* ── Model info block ── */
.gbpres-model-info-wrap{grid-column:1/-1}
.gbpres-model-info{padding:12px 14px;background:#f0f4ff;border:1px solid #c7d4f5;border-radius:10px}
.gbpres-model-info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.gbpres-mig-item{display:flex;flex-direction:column;gap:2px}
.gbpres-mig-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#6b7aa8}
.gbpres-mig-val{font-size:13px;font-weight:600;color:#1a1a2e}
.gbpres-group-badge{display:inline-block;background:#1a1a2e;color:#fff;font-size:12px;font-weight:700;border-radius:999px;padding:1px 8px;margin-left:2px}
.gbpres-model-prefix{display:block;margin-top:8px;padding:6px 10px;background:#fff;border:1px solid #c7d4f5;border-radius:6px;font-size:11px;color:#374475;font-weight:600}

/* ── Wood observation ── */
.gbpres-model-obs{margin:8px 0 4px;padding:10px 14px;background:#fff8e1;border:1px solid #ffe082;border-left:4px solid #f59e0b;border-radius:0 8px 8px 0;font-size:12px;color:#78350f;line-height:1.6}


/* ── Paso 3: DIMS / Variantes ── */
.gbpres-dims{display:block;min-width:200px;max-width:420px}
.gbpres-dims-summary{font-weight:700;font-size:16px;margin-bottom:8px}

/* Dims layout (Opción A): etiqueta arriba + input debajo */
.gbpres-dims-grid{display:grid;grid-template-columns:repeat(3,minmax(88px,1fr));gap:10px;align-items:start}
.gbpres-dimcell{display:flex;flex-direction:column;gap:6px}
.gbpres-dim-label{font-size:12px;line-height:1.1;color:#222;font-weight:600}
.gbpres-dims-toggle-row{margin-top:8px;display:flex;align-items:center;gap:8px}
.gbpres-dimrow{display:flex;align-items:center;gap:4px}
.gbpres-dimlbl{font-size:11px;font-weight:700;opacity:.7}
.gbpres-dim-input{width:100%;padding:10px 10px;border:1px solid #d0d0d0;border-radius:8px;font-size:16px;box-sizing:border-box}
.gbpres-dim-input[readonly]{background:#f3f3f3;opacity:.9}
.gbpres-smalllabel{font-size:11px;font-weight:700;opacity:.75;margin-bottom:4px}
.gbpres-inline{display:inline-flex;align-items:center;gap:6px;font-size:12px}
.gbpres-aperture{width:100%;max-width:240px;padding:6px 8px;border:1px solid #dcdcdc;border-radius:10px;font-size:12px;background:#fff}
.gbpres-comment{width:100%;max-width:340px;padding:6px 8px;border:1px solid #dcdcdc;border-radius:10px;font-size:12px;resize:vertical}

.gbpres-accordion{margin-top:8px;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:6px 10px;background:#fff}
.gbpres-accordion>summary{cursor:pointer;list-style:none;font-weight:700;font-size:12px}
.gbpres-accordion>summary::-webkit-details-marker{display:none}
.gbpres-acc-badge{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;background:rgba(0,0,0,.06)}
.gbpres-acc-body{margin-top:8px}
.gbpres-variants-list{margin:0;padding-left:16px}
.gbpres-variants-list li{font-size:12px;line-height:1.25;margin:3px 0}

/* Vista compacta: oculta secciones "detalles" para reducir ruido visual */
.gbpres-compact .gbpres-details{display:none!important}

/* ── Legibilidad (mínimo 12pt ≈ 16px) + tabla más cómoda ── */
.gbpres-card{max-width:1400px;margin:0 auto;font-size:16px}
label{font-size:16px}
.gbpres-muted,.gbpres-panel-desc,.gbpres-help{font-size:16px}
.gbpres-grid input,.gbpres-grid select,.gbpres-grid textarea{font-size:16px}
.gbpres-step,.gbpres-step-label,.gbpres-panel-badge,.gbpres-subsection-title,.gbpres-pill{font-size:16px}
.gbpres-table th,.gbpres-table td{font-size:16px}
.gbpres-table th{font-size:16px}
.gbpres-badge{font-size:16px}
.gbpres-total{font-size:18px}
.gbpres-dims-summary,.gbpres-inline,.gbpres-dimlbl,.gbpres-dim-input,.gbpres-smalllabel,.gbpres-aperture,.gbpres-comment,.gbpres-accordion>summary,.gbpres-variants-list li{font-size:16px}

/* Cantidad */
.gbpres-qty{width:70px;max-width:90px;padding:6px 8px;border:1px solid #dcdcdc;border-radius:10px;font-size:16px;background:#fff}

/* La tabla puede crecer y usar scroll horizontal cuando sea necesario */
.gbpres-table{min-width:1100px}

/* ── Config summary (Paso 3) ── */
.gbpres-config-summary{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0;padding:10px 14px;background:#f0f4f8;border-radius:10px;border:1px solid #dce3ea}
.gbpres-config-summary .gbpres-pill{background:#fff;border:1px solid #d0d7de;font-size:14px}

/* ── Gola info box ── */
.gbpres-info-box{background:#fffbe6;border:1px solid #e6d85e;border-radius:8px;padding:10px 14px;font-size:14px;line-height:1.5;margin:6px 0}

/* ── Tariff info (Paso 2) ── */
.gbpres-tariff-info{margin:8px 0 16px;padding:6px 12px;background:#f8f9fa;border-radius:8px;border:1px solid #e8e8e8}
.gbpres-tariff-info small{font-size:13px}

/* ── Code badge in table lines: 13px ── */
.gbpres-table .gbpres-badge{font-size:13px;padding:2px 7px}
/* ── Descripción en líneas del presupuesto: 14px (todos los pasos) ── */
.gbpres-table .gbpres-line-desc,.gbpres-resumen-block .gbpres-table .gbpres-line-desc{font-size:14px !important}
/* ── Resumen table: description wraps, dims stay compact ── */
.gbpres-resumen-table .gbpres-line-desc{word-break:break-word;max-width:420px}
.gbpres-resumen-table td,.gbpres-resumen-table th{vertical-align:top}

/* ── Profile count badge (perfil en canto / empotrado) ── */
.gbpres-profile-badge{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;background:#dbeafe;color:#1e40af;border:1px solid #93c5fd}

/* ══════════════════════════════════════════════════════════
   GATE: Login / Register form (acceso profesional)
   ══════════════════════════════════════════════════════════ */
.gbpres-gate{max-width:540px;margin:0 auto;padding:10px 0}
.gbpres-gate-header{text-align:center;margin-bottom:20px}
.gbpres-gate-header h2{font-size:20px;margin:0 0 6px}
.gbpres-gate-header p{color:#666;font-size:14px;margin:0}

.gbpres-gate-tabs{display:flex;gap:0;margin-bottom:20px;border-bottom:2px solid #e8e8e8}
.gbpres-gate-tab{flex:1;padding:12px 14px !important;background:transparent !important;border:none !important;border-bottom:3px solid transparent !important;margin-bottom:-2px;font-size:14px !important;font-weight:600 !important;color:#888 !important;cursor:pointer;transition:all .15s;text-transform:uppercase;letter-spacing:.5px}
.gbpres-gate-tab.active{color:#c1272d !important;border-bottom-color:#c1272d !important;background:transparent !important}
.gbpres-gate-tab:hover{color:#c1272d !important;background:rgba(193,39,45,.05) !important}

.gbpres-gate-panel{padding:4px 0}

.gbpres-gate-form{display:flex;flex-direction:column;gap:12px;margin:16px 0}
.gbpres-gate-form label{display:block;font-weight:600;font-size:14px}
.gbpres-gate-form input[type="text"],
.gbpres-gate-form input[type="email"],
.gbpres-gate-form input[type="tel"]{width:100%;padding:10px 12px;border:1px solid #cfcfcf;border-radius:8px;font-size:15px;box-sizing:border-box;background:#f9f9f9;transition:border-color .15s}
.gbpres-gate-form input:focus{outline:none;border-color:#111;background:#fff}
.gbpres-gate-form .button{padding:10px 20px;font-size:15px;font-weight:700}

.gbpres-gate-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:480px){.gbpres-gate-row{grid-template-columns:1fr}}

.gbpres-gate-consent{font-size:13px;color:#555;line-height:1.5}
.gbpres-gate-consent label{display:flex;gap:8px;align-items:flex-start;font-weight:400}
.gbpres-gate-consent input[type="checkbox"]{margin-top:3px;flex-shrink:0}

.gbpres-gate-msg{font-size:13px;margin:4px 0 0;min-height:20px}
.gbpres-gate-error{color:#b00020}
.gbpres-gate-success{color:#065f46;background:#d1fae5;padding:8px 12px;border-radius:8px}

.gbpres-gate-help{font-size:12px;color:#888;margin-top:12px}

/* ══ Client PDF preview ══ */
.gbpres-client-preview{margin:12px 0;padding:14px 16px;background:#f8faf8;border:1px solid #d1e7d1;border-radius:10px}
.gbpres-client-preview-inner{max-width:320px;margin-left:auto}
.gbpres-cpv-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;font-size:14px;border-bottom:1px dashed #e0e0e0}
.gbpres-cpv-row:last-of-type{border-bottom:none}
.gbpres-cpv-total{font-size:17px;font-weight:800;padding:8px 0 4px;border-top:2px solid #111;border-bottom:none;margin-top:4px}

/* ══ UX: Highlight selects with available options ══ */
select.gbpres-has-options{background-color:#eef4ff !important;border-color:#b8d0f0 !important}
select.gbpres-has-options:focus,select.gbpres-has-options:active{background-color:#fff !important;border-color:#888 !important}
/* optgroup headers */
select optgroup{font-style:normal;font-weight:700;color:#333;padding:4px 0}
select optgroup option{font-weight:400;color:#111}
.gbpres-model-media-wrap{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

/* ═══════════════════════════════════════════════════════════════════════════
   MEJORAS v0.9.2b
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Point 3: Mejora visual de variantes ───────────────────────────────────── */
.gbpres-accordion summary{
  font-size:13px;font-weight:600;padding:6px 10px;
  background:#f7f8fa;border-radius:6px;cursor:pointer;user-select:none;
  border:1px solid #e0e3e8;transition:background .15s;
}
.gbpres-accordion summary:hover{background:#eef1f6}
.gbpres-accordion[open] summary{background:#e8ecf3;border-color:#c5cad3}
.gbpres-acc-body{padding:10px 12px 8px;border:1px solid #e0e3e8;border-top:0;border-radius:0 0 6px 6px;background:#fcfcfd}
.gbpres-acc-badge{display:inline-block;background:#0073aa;color:#fff;font-size:10px;font-weight:700;
  padding:1px 6px;border-radius:10px;margin-left:4px;vertical-align:middle}
.gbpres-extras .gbpres-smalllabel{
  font-size:12px;font-weight:700;color:#444;margin:6px 0 4px;
  padding:3px 0;border-bottom:1px solid #e8e8e8;text-transform:uppercase;letter-spacing:.3px;
}
.gbpres-extras label{
  padding:3px 6px;border-radius:4px;transition:background .1s;font-size:12px;line-height:1.5;
}
.gbpres-extras label:hover{background:#f0f4ff}
.gbpres-extras input[type="checkbox"]:checked + *,
.gbpres-extras input[type="checkbox"]:checked ~ *,
.gbpres-extras label:has(input:checked){background:#e8f0fe;border-radius:4px}
.gbpres-extras input[type="radio"]:checked + *,
.gbpres-extras label:has(input[type="radio"]:checked){background:#e8f0fe}
.gbpres-variants-list{margin:4px 0 2px 0;padding:0;list-style:none;font-size:12px}
.gbpres-variants-list li{padding:2px 8px;border-left:3px solid #0073aa;margin:3px 0;background:#f8faff;border-radius:0 4px 4px 0;line-height:1.4;word-break:break-word;max-width:420px}

/* ── Point 7: Responsive ───────────────────────────────────────────────────── */
/* Tablet (768-1024px) */
@media(max-width:1024px){
  .gbpres-grid{grid-template-columns:1fr !important}
  .gbpres-resumen-grid{grid-template-columns:1fr 1fr !important}
  .gbpres-config-grid{grid-template-columns:1fr !important}
  .gbpres-lines-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .gbpres-lines-table thead{white-space:nowrap}
  .gbpres-lines-table td,.gbpres-lines-table th{padding:6px 8px;font-size:12px}
  .gbpres-dims-grid{grid-template-columns:1fr !important}
  .gbpres-steps{flex-wrap:wrap;gap:4px}
  .gbpres-step{font-size:12px;padding:6px 10px}
}
/* Small tablet */
@media(max-width:768px){
  .gbpres-app{padding:8px !important}
  .gbpres-panel{padding:10px !important}
  .gbpres-lines-table td,.gbpres-lines-table th{font-size:11px;padding:4px 6px}
  .gbpres-qty{width:50px !important}
  .gbpres-dim-input{width:60px !important}
}

/* Mobile warning: fully inline via JS (injected at body level) - no CSS needed */

/* ── Point 8: Paginación de líneas ──────────────────────────────────────────── */
.gbpres-pagination{
  display:flex !important;align-items:center;justify-content:center;gap:12px;
  padding:14px 0;margin:10px 0 0;border-top:2px solid #e0e3e8;
}
.gbpres-pagination button{
  padding:8px 20px !important;font-size:13px !important;font-weight:700 !important;
  border:2px solid #0073aa !important;color:#0073aa !important;
  background:#fff !important;border-radius:6px !important;cursor:pointer;
  transition:all .15s;letter-spacing:.3px;text-transform:uppercase;
  line-height:1.2 !important;min-width:120px;
}
.gbpres-pagination button:hover:not(:disabled){background:#0073aa !important;color:#fff !important}
.gbpres-pagination button:disabled{
  opacity:.35 !important;cursor:not-allowed !important;
  border-color:#bbb !important;color:#bbb !important;background:#f5f5f5 !important;
}
.gbpres-pagination .gbpres-page-info{font-size:13px;color:#444;font-weight:600;white-space:nowrap}
.gbpres-pagination .gbpres-page-info strong{color:#0073aa}

/* ── Point 4: Validation shake animation ──────────────────────────────────── */
@keyframes gbpres-shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.gbpres-shake{animation:gbpres-shake .4s ease-in-out}

.gbpres-subcat-box{background:#fff;border:1px solid #d8dde8;border-radius:10px;padding:12px 14px;box-shadow:0 1px 3px rgba(16,24,40,.04)}
.gbpres-subcat-title{font-size:12px;font-weight:700;color:#334155;margin-bottom:8px;text-transform:uppercase;letter-spacing:.04em}
.gbpres-subcat-pills{display:flex;flex-wrap:wrap;gap:8px}
.gbpres-subcat-pill{border:1px solid #cfd6e4;background:#f8fafc;border-radius:999px;padding:6px 10px;font-size:12px;cursor:pointer}
.gbpres-subcat-pill.is-active{background:#1f2937;color:#fff;border-color:#1f2937}


/* Búsqueda predictiva Paso 3 */
.gbpres-search-suggest{position:relative;margin:-6px 0 8px 0;border:1px solid #d9dee7;border-radius:10px;background:#fff;box-shadow:0 10px 25px rgba(16,24,40,.08);overflow:hidden;z-index:20;}
.gbpres-search-suggest-item{display:flex;flex-direction:column;gap:2px;width:100%;padding:10px 12px;border:0;background:#fff;text-align:left;cursor:pointer;border-bottom:1px solid #eef1f5;}
.gbpres-search-suggest-item:last-child{border-bottom:0;}
.gbpres-search-suggest-item:hover{background:#f7f9fc;}
.gbpres-search-suggest-code{font-weight:700;color:#24324a;}
.gbpres-search-suggest-desc{font-size:12px;color:#5a667a;}

/* Fix 1: Highlight animation for newly added line */
@keyframes gbpres-line-flash {
  0% { background-color: #e8f5e9; }
  100% { background-color: transparent; }
}
.gbpres-line-highlight td {
  animation: gbpres-line-flash 2s ease-out;
}


/* Fix 2: Autosave status indicator (inside stepsbar, pushed right) */
.gbpres-autosave-status {
  display: inline-block;
  font-size: 12px;
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 6px;
  transition: opacity 0.4s, color 0.3s, background 0.3s;
  white-space: nowrap;
  line-height: 1.4;
}
.gbpres-autosave-status:empty { display: none; }
.gbpres-autosave-saving { color: #1565c0; background: #e3f2fd; font-weight: 600; }
.gbpres-autosave-saved { color: #2e7d32; background: #e8f5e9; }
.gbpres-autosave-error { color: #c62828; background: #ffebee; font-weight: 600; }

/* ── Modal de conformidad PDF ── */
.gbpres-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease;
}
.gbpres-modal-overlay.gbpres-modal-visible { opacity: 1; }
.gbpres-modal-box {
  background: #fff;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 32px 28px 24px;
  transform: scale(.95);
  transition: transform .2s ease;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.gbpres-modal-visible .gbpres-modal-box { transform: scale(1); }
.gbpres-modal-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 8px;
}
.gbpres-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 14px;
  text-align: center;
}
.gbpres-modal-body {
  font-size: 13.5px;
  color: #333;
  line-height: 1.65;
}
.gbpres-modal-body p { margin: 0 0 10px; }
.gbpres-modal-body ul {
  margin: 8px 0 10px 18px;
  padding: 0;
}
.gbpres-modal-body li {
  margin-bottom: 6px;
  line-height: 1.55;
}
.gbpres-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.gbpres-modal-cancel {
  min-width: 100px;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}
.gbpres-modal-accept {
  min-width: 180px;
  background: #c1272d !important;
  border-color: #a82025 !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}
.gbpres-modal-accept:hover {
  background: #a82025 !important;
}

/* ── Pre-filled fields (token users) ── */
.gbpres-prefilled {
  background-color: #f0f7ff !important;
  border-color: #b3d4fc !important;
  color: #1a1a2e !important;
}
.gbpres-prefilled:focus {
  background-color: #fff !important;
  border-color: #0073aa !important;
}
/* Campos vinculados a la cuenta (sesión por token): visibles pero no editables */
.gbpres-locked {
  background-color: #f3f4f6 !important;
  border-color: #d6d9dd !important;
  color: #555 !important;
  cursor: not-allowed !important;
}
.gbpres-locked:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #d6d9dd !important;
}
/* Aviso de sesión caducada */
.gbpres-session-expired {
  margin: 10px 0;
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  color: #7a5200;
  font-size: 14px;
  line-height: 1.4;
}
.gbpres-session-expired a { color: #0b6aa2; font-weight: 600; }

/* ── Mejora 1: Config notice when going back ── */
.gbpres-config-notice {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  border-radius: 6px;
  font-size: 13px;
  color: #5d4037;
  line-height: 1.5;
  animation: gbpres-fade-in .3s ease;
}
@keyframes gbpres-fade-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ── Mejora 2: Sticky totals enhancement ── */
.gbpres-sticky-totals {
  position: sticky;
  bottom: 10px;
  z-index: 30;
  margin-top: 12px;
}
.gbpres-sticky-inner {
  max-width: 420px;
  margin-left: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.gbpres-sticky-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0;
  font-size: 13px;
}
.gbpres-sticky-count {
  font-size: 11px;
  color: #888;
  margin-bottom: 2px;
}

/* ── Mejora 3+4: Global banners ── */
.gbpres-banner {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 0 0 8px 8px;
  text-align: center;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.gbpres-banner-warn {
  background: #fff8e1;
  color: #6d4c00;
  border-bottom: 1px solid #ffe082;
}
.gbpres-banner-error {
  background: #ffebee;
  color: #b71c1c;
  border-bottom: 1px solid #ef9a9a;
}
.gbpres-banner-ok {
  background: #e8f5e9;
  color: #1b5e20;
  border-bottom: 1px solid #a5d6a7;
}

/* ── Mejora 5: Recent items panel ── */
.gbpres-recent-panel {
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}
.gbpres-recent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.gbpres-recent-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #666;
}
.gbpres-recent-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gbpres-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  max-width: 260px;
}
.gbpres-recent-chip:hover {
  border-color: #0073aa;
  box-shadow: 0 2px 8px rgba(0,115,170,.12);
}
.gbpres-recent-code {
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
}
.gbpres-recent-desc {
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.gbpres-recent-dims {
  color: #999;
  font-size: 11px;
  white-space: nowrap;
}


/* ── Bloque plegable: kit/cubos fregadero ── */
.gbpres-preset-kit-info--collapsible{padding:0;background:#f8fbff;border:1px solid #d6e9f7;border-radius:6px;overflow:hidden}
.gbpres-preset-kit-info--collapsible>summary{list-style:none;cursor:pointer;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:8px 10px;background:#f8fbff}
.gbpres-preset-kit-info--collapsible>summary::-webkit-details-marker{display:none}
.gbpres-preset-kit-head{display:flex;flex-direction:column;min-width:0;gap:2px}
.gbpres-preset-kit-kicker{font-weight:700;font-size:11px;line-height:1.2;color:#2e5167;text-transform:none}
.gbpres-preset-kit-summary{font-size:12px;line-height:1.3;color:#243746;word-break:break-word;overflow-wrap:anywhere}
.gbpres-preset-kit-meta-inline{font-size:11px;line-height:1.35;color:#4f6b7d;word-break:break-word;overflow-wrap:anywhere}
.gbpres-preset-kit-toggle{flex:0 0 auto;font-size:11px;color:#0f5f91;white-space:nowrap;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.65);font-weight:600;line-height:1.2;border:1px solid rgba(15,95,145,.18)}
.gbpres-preset-kit-info--collapsible[open] .gbpres-preset-kit-toggle{font-size:0}
.gbpres-preset-kit-info--collapsible[open] .gbpres-preset-kit-toggle::before{content:'Ocultar';font-size:11px;font-weight:600;color:#0f5f91}
.gbpres-preset-kit-body{padding:0 10px 10px;border-top:1px solid #9fd1f1;background:rgba(255,255,255,.18)}
.gbpres-preset-kit-kit,.gbpres-preset-kit-meta,.gbpres-preset-kit-message{margin-top:5px;font-size:11px;line-height:1.4;word-break:break-word;overflow-wrap:anywhere;color:#243746}
.gbpres-preset-kit-message br{content:''}

/* ── Panel "Mis presupuestos" (Paso 1) ── */
.gbpres-my-budgets{display:flex;flex-direction:column;gap:14px}
.gbpres-my-budgets-group{margin:0}
.gbpres-my-budgets-group h4{font-size:13px;font-weight:700;color:#1a1a2e;margin:0 0 8px;padding-bottom:4px;border-bottom:1px solid #e5e7eb}
.gbpres-my-budgets-group h4 .gbpres-badge-count{font-weight:400;color:#888;font-size:12px;margin-left:4px}
.gbpres-budget-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:6px;border:1px solid #e5e7eb;background:#fafbfc;transition:border-color .15s}
.gbpres-budget-row:hover{border-color:#0073aa}
.gbpres-budget-row+.gbpres-budget-row{margin-top:6px}
.gbpres-budget-row .gbpres-br-ref{font-weight:700;font-size:13px;color:#1a1a2e;min-width:90px}
.gbpres-budget-row .gbpres-br-meta{flex:1;font-size:12px;color:#555;display:flex;flex-wrap:wrap;gap:4px 12px}
.gbpres-budget-row .gbpres-br-meta span{white-space:nowrap}
.gbpres-budget-row .gbpres-br-actions{display:flex;gap:4px;flex-shrink:0}
.gbpres-budget-row .gbpres-br-actions button{font-size:11px;padding:3px 10px;border-radius:4px;cursor:pointer;border:1px solid #ccc;background:#fff;color:#333}
.gbpres-budget-row .gbpres-br-actions button:hover{border-color:#0073aa;color:#0073aa}
.gbpres-budget-row .gbpres-br-actions button.gbpres-br-open{background:#0073aa;color:#fff;border-color:#0073aa;font-weight:600}
.gbpres-budget-row .gbpres-br-actions button.gbpres-br-open:hover{background:#005a8c}
.gbpres-budget-row .gbpres-br-status{font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px;text-transform:uppercase}
.gbpres-budget-row .gbpres-br-status.st-draft{background:#fff3cd;color:#856404}
.gbpres-budget-row .gbpres-br-status.st-enviado{background:#d4edda;color:#155724}
.gbpres-my-budgets-empty{font-size:13px;color:#888;padding:8px 0}

/* ── Incentives Banner ───────────────────────────────────────────────────── */
#gbpres_incentive_banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 4px;
}
.gbpres-inc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.gbpres-inc-badge--active {
  background: #e6f6ea;
  color: #116329;
  border: 1px solid #b5dfc2;
}
.gbpres-inc-badge--gift {
  background: #fff3e0;
  color: #b45309;
  border: 1px solid #fcd9a0;
}
.gbpres-inc-badge--close {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde68a;
}
.gbpres-inc-badge--progress {
  background: #f0f4ff;
  color: #3b4cb8;
  border: 1px solid #c7d2fe;
}

/* ── Accessory Selector ──────────────────────────────────────────────────── */
.gbpres-acc-selector {
  background: #fff;
  border: 1px solid #d4edda;
  border-left: 4px solid #28a745;
  border-radius: 6px;
  padding: 16px 20px;
}
.gbpres-acc-selector__title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: #155724;
}
.gbpres-acc-selector__desc {
  font-size: 13px;
  color: #555;
  margin: 0 0 14px;
}
.gbpres-acc-selector__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.gbpres-acc-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fafafa;
}
.gbpres-acc-option:hover {
  border-color: #28a745;
  background: #f0fff4;
}
.gbpres-acc-option--selected {
  border-color: #28a745;
  background: #e6f6ea;
}
.gbpres-acc-option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.gbpres-acc-option__name {
  font-weight: 600;
  font-size: 13px;
  color: #222;
}
.gbpres-acc-option__desc {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}


/* ── Program discount box ──────────────────────────────────────────────── */
.gbpres-program-discount-box{margin:14px 0 14px;padding:14px 16px;border:1px solid #c7d2fe;border-left:4px solid #3b82f6;border-radius:8px;background:#f8fbff}
.gbpres-program-discount-box__title{font-size:14px;font-weight:700;color:#1e3a8a;margin:0 0 6px}
.gbpres-program-discount-box__desc{font-size:13px;line-height:1.55;color:#334155;margin:0 0 10px}
.gbpres-program-discount-box__check{display:flex;align-items:flex-start;gap:8px;font-size:13px;font-weight:600;color:#0f172a;cursor:pointer}
.gbpres-program-discount-box__note{margin-top:8px;font-size:12px;color:#475569}


.gbpres-header-main{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.gbpres-header-quick-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.gbpres-header-quick-actions .button{white-space:nowrap}
.gbpres-header-quick-select-wrap{display:flex;align-items:center;gap:6px;min-width:250px}
#gbpres_quick_recent_select{min-width:220px;height:32px;border:1px solid #cfd6dd;border-radius:6px;padding:0 10px;background:#fff}
@media (max-width:900px){
  .gbpres-header-quick-actions{width:100%}
  .gbpres-header-quick-select-wrap{min-width:0;flex:1}
  #gbpres_quick_recent_select{min-width:0;width:100%}
}


/* ── UI refresh cabecera / paso 4 / incentivos ── */
.gbpres-header--project{padding:18px 0 16px;border-bottom:1px solid #eceff3}
.gbpres-header-main{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}
.gbpres-header-titlewrap{max-width:760px}
.gbpres-header-kicker{display:inline-block;padding:4px 10px;border-radius:999px;background:#111827;color:#fff;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;margin-bottom:8px}
.gbpres-header-subtitle{margin:6px 0 0;color:#596273;max-width:760px;font-size:14px;line-height:1.55}
.gbpres-header-quick-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:#f8fafc;border:1px solid #e6ebf2;border-radius:14px;padding:10px}
.gbpres-header-quick-select-wrap{display:flex;gap:6px;align-items:center}
.gbpres-header-quick-select-wrap select{min-width:190px}
.gbpres-header-microstats{margin-top:14px;padding:12px;border:1px solid #e9edf3;border-radius:14px;background:linear-gradient(180deg,#fcfdff,#f7f9fc)}
.gbpres-header-microstats .gbpres-inc-badge{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:999px;font-weight:700;border:1px solid transparent}
.gbpres-inc-badge--active,.gbpres-inc-badge--gift{background:#eefbf3;border-color:#c7eed5;color:#166534}
.gbpres-inc-badge--close{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.gbpres-inc-badge--progress{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}

.gbpres-step4-shell{display:grid;gap:16px}
.gbpres-step4-headergrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.gbpres-step4-intro{padding:16px 18px;border-radius:14px;border:1px solid #e6ebf2;background:#fafcff}
.gbpres-step4-intro--internal{border-left:4px solid #111827}
.gbpres-step4-intro--client{border-left:4px solid #c1272d}
.gbpres-step4-intro__eyebrow{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;margin-bottom:6px}
.gbpres-step4-intro h4{margin:0 0 6px;font-size:18px}
.gbpres-step4-intro p{margin:0;color:#596273;font-size:14px;line-height:1.55}
.gbpres-step4-client-card{border-left-color:#c1272d;background:#fffdfd}
.gbpres-resumen-block{border:none;border-radius:14px;overflow:visible}
.gbpres-resumen-section{box-shadow:0 1px 2px rgba(16,24,40,.04);border-radius:14px;border-color:#e6ebf2}
.gbpres-resumen-section--internal-summary{border-left-color:#111827}
.gbpres-resumen-label{display:flex;align-items:center;gap:10px;background:#f8fafc;border-bottom-color:#e6ebf2;font-size:17px}
.gbpres-resumen-label-kicker{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#111827;color:#fff;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.gbpres-program-discount-box{margin:0 14px 14px;padding:14px 16px;border-radius:14px;border:1px solid #dbeafe;background:linear-gradient(180deg,#f9fbff,#eef6ff)}
.gbpres-program-discount-box__title{font-weight:800;font-size:16px;margin-bottom:6px;color:#0f172a}
.gbpres-program-discount-box__desc{font-size:14px;line-height:1.6;color:#334155}
.gbpres-program-discount-box__check{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:12px;padding:12px;border-radius:12px;background:#fff;border:1px solid #dbeafe;font-size:14px}
.gbpres-program-discount-box__mini{display:inline-block;padding:3px 8px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.gbpres-program-discount-box__note{margin-top:10px;font-size:13px;color:#475569}
.gbpres-section-cliente .gbpres-subsection-title{color:#7f1d1d}

@media(max-width:980px){
  .gbpres-step4-headergrid{grid-template-columns:1fr}
}


.gbpres-inline-info{padding:10px 12px;border-radius:10px;font-size:13px;line-height:1.45}
.gbpres-inline-info--soft{background:#f6f7f8;border:1px solid #e3e5e8;color:#344054}
.gbpres-unsaved-status{margin-left:10px;font-size:13px;font-weight:600}
.gbpres-unsaved-status--dirty{color:#9a6700}
.gbpres-inc-badge{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;margin:4px 6px 0 0;font-size:13px;line-height:1.35;border:1px solid transparent}
.gbpres-inc-badge strong{font-weight:700}
.gbpres-inc-badge em{font-style:normal;opacity:.85}
.gbpres-inc-badge--active{background:#ecfdf3;border-color:#b7ebc6;color:#0f5132}
.gbpres-inc-badge--close{background:#fff7e6;border-color:#f6d9a6;color:#8a5300}
.gbpres-inc-badge--progress{background:#eef4ff;border-color:#c7d7fe;color:#1d4ed8}
.gbpres-inc-badge--gift{background:#f5f3ff;border-color:#d9ccff;color:#6d28d9}
.gbpres-inc-badge--neutral{background:#f8fafc;border-color:#dbe3ea;color:#475467}
.gbpres-review-overlay{position:fixed;inset:0;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;z-index:99999;padding:20px}
.gbpres-review-modal{background:#fff;width:min(860px,100%);border-radius:18px;box-shadow:0 25px 80px rgba(0,0,0,.22);padding:24px}
.gbpres-review-modal__eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#667085;font-weight:700;margin-bottom:4px}
.gbpres-review-modal__head h3{margin:0 0 6px;font-size:24px}
.gbpres-review-modal__head p{margin:0 0 16px;color:#667085}
.gbpres-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.gbpres-review-card{border:1px solid #e5e7eb;border-radius:14px;padding:12px 14px;background:#fafafa;display:flex;flex-direction:column;gap:6px}
.gbpres-review-card strong{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#667085}
.gbpres-review-card span{font-size:15px;color:#101828}
.gbpres-review-modal__foot{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap}
@media (max-width: 767px){.gbpres-review-grid{grid-template-columns:1fr}.gbpres-review-modal{padding:18px}}

.gbpres-br-status.st-incentive{background:#eef6ff;color:#0b63ce;border:1px solid #bfdbfe;}
.gbpres-pager{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid #e5e7eb}
.gbpres-pager-btn{font-size:12px;padding:4px 12px;border-radius:4px;cursor:pointer;border:1px solid #ccc;background:#fff;color:#0073aa;font-weight:600}
.gbpres-pager-btn:hover{background:#0073aa;color:#fff;border-color:#0073aa}
.gbpres-pager-info{flex:1;text-align:center;font-size:12px;color:#666}
.gbpres-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:99999;display:flex;align-items:center;justify-content:center;padding:16px}
.gbpres-modal-box{background:#fff;border-radius:10px;box-shadow:0 8px 32px rgba(0,0,0,.22);overflow:auto;max-height:90vh}

.gbpres-cpv-note{margin-top:4px;font-size:12px;line-height:1.4;color:#667085;}


/* Ajuste visual Paso 4: resumen fábrica alineado como cliente final */
.gbpres-resumen-section--internal-summary .gbpres-val-summary{
  max-width:320px;
  margin-left:auto;
  padding:0 14px 14px 14px;
}
.gbpres-resumen-section--internal-summary .gbpres-val-summary .row{
  align-items:center;
}
.gbpres-resumen-section--internal-summary .gbpres-val-summary .row span:first-child,
.gbpres-resumen-section--internal-summary .gbpres-val-summary .row strong:first-child{
  flex:1 1 auto;
}
.gbpres-resumen-section--internal-summary .gbpres-val-summary .row span:last-child,
.gbpres-resumen-section--internal-summary .gbpres-val-summary .row strong:last-child{
  min-width:110px;
  text-align:right;
  white-space:nowrap;
}
@media(max-width:640px){
  .gbpres-resumen-section--internal-summary .gbpres-val-summary{
    max-width:none;
    margin-left:0;
  }
}

/* ── Otros conceptos: organización visual y alineación ── */
.gbpres-otros-modal-box{
  max-width:760px;
  width:calc(100% - 32px);
  padding:26px 28px;
  box-sizing:border-box;
}
.gbpres-otros-modal-box h4{
  margin:0 0 18px;
  font-size:22px;
  line-height:1.2;
  font-weight:700;
  color:#1f2433;
}
.gbpres-otros-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0 0 14px;
  font-size:14px;
  font-weight:700;
  color:#2f3340;
}
.gbpres-otros-field em{
  font-size:12px;
  font-weight:400;
  color:#666;
}
.gbpres-otros-field input,
.gbpres-otros-field select,
.gbpres-otros-field textarea{
  width:100%;
  min-height:42px;
  box-sizing:border-box;
  padding:9px 12px;
  border:1px solid #cfd3d8;
  border-radius:6px;
  background:#fff;
  font-size:14px;
  line-height:1.35;
}
.gbpres-otros-field textarea{
  min-height:82px;
  resize:vertical;
}
.gbpres-otros-form-row{
  display:grid;
  gap:16px;
  align-items:start;
  margin-bottom:2px;
}
.gbpres-otros-form-row-2{
  grid-template-columns:minmax(0,1fr) minmax(150px,.55fr);
}
.gbpres-otros-field-full{width:100%;}
.gbpres-required{color:#c00;}
.gbpres-otros-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
  margin-top:2px;
}
.gbpres-otros-group{
  margin:12px 0 16px;
  border:1px solid #e1e5ea;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.gbpres-otros-group-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  background:#f5f6f8;
  border-bottom:1px solid #e1e5ea;
  font-size:13px;
  font-weight:700;
  color:#202434;
}
.gbpres-otros-table-wrap{overflow-x:auto;}
.gbpres-otros-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:13px;
}
.gbpres-otros-table th,
.gbpres-otros-table td{
  padding:9px 10px;
  border-bottom:1px solid #edf0f2;
  vertical-align:middle;
  line-height:1.35;
}
.gbpres-otros-table th{
  background:#fbfbfc;
  text-align:left;
  font-weight:700;
  color:#303645;
  white-space:nowrap;
}
.gbpres-otros-table tbody tr:nth-child(even){background:#fafbfc;}
.gbpres-otros-table tbody tr:last-child td{border-bottom:0;}
.gbpres-otros-col-ref{width:13%;}
.gbpres-otros-col-desc{width:34%;}
.gbpres-otros-col-qty{width:9%;}
.gbpres-otros-col-price{width:12%;}
.gbpres-otros-col-total{width:12%;}
.gbpres-otros-col-vat{width:8%;}
.gbpres-otros-col-actions{width:12%;}
.gbpres-ta-center{text-align:center!important;}
.gbpres-ta-right{text-align:right!important;}
.gbpres-otros-ref{font-weight:600;color:#343948;word-break:break-word;}
.gbpres-otros-desc{word-break:break-word;}
.gbpres-otros-desc em{color:#777;font-size:12px;}
.gbpres-otros-total-cell{font-weight:700;}
.gbpres-otros-actions{
  text-align:center;
  white-space:nowrap;
}
.gbpres-otros-actions-inner{
  display:inline-flex;
  gap:6px;
  justify-content:center;
  align-items:center;
}
.gbpres-otros-edit,
.gbpres-otros-del{
  border:1px solid #d2d6dc;
  background:#fff;
  border-radius:5px;
  padding:4px 8px;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
}
.gbpres-otros-edit:hover{border-color:#2271b1;color:#2271b1;}
.gbpres-otros-del{border-color:#d63638;color:#b32d2e;background:#fff5f5;}
.gbpres-otros-del:hover{background:#d63638;color:#fff;}
@media(max-width:720px){
  .gbpres-otros-modal-box{width:calc(100% - 20px);padding:20px;}
  .gbpres-otros-form-row-2{grid-template-columns:1fr;}
}

/* Ajustes finales Otros conceptos: sin desplazamiento horizontal y acciones por iconos */
.gbpres-otros-group-head{
  font-size:18px;
  line-height:1.25;
  padding:14px 18px;
}
.gbpres-otros-group-head span:first-child{
  font-size:18px;
  font-weight:800;
}
.gbpres-otros-group-head span:last-child{
  font-size:16px;
  font-weight:800;
}
.gbpres-otros-table-wrap{
  overflow-x:visible;
  width:100%;
}
.gbpres-otros-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.gbpres-otros-col-ref{width:12%;}
.gbpres-otros-col-desc{width:38%;}
.gbpres-otros-col-qty{width:7%;}
.gbpres-otros-col-price{width:12%;}
.gbpres-otros-col-total{width:12%;}
.gbpres-otros-col-vat{width:8%;}
.gbpres-otros-col-actions{width:11%;}
.gbpres-otros-table th,
.gbpres-otros-table td{
  overflow-wrap:anywhere;
  word-break:normal;
}
.gbpres-otros-actions-inner{
  display:flex;
  gap:5px;
  justify-content:center;
  align-items:center;
  flex-wrap:nowrap;
}
.gbpres-otros-icon-btn{
  width:28px;
  height:28px;
  min-width:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d2d6dc;
  border-radius:6px;
  background:#fff;
  color:#303645;
  font-size:17px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}
.gbpres-otros-icon-btn:hover{border-color:#2271b1;color:#2271b1;background:#f6fbff;}
.gbpres-otros-copy{font-size:16px;}
.gbpres-otros-del{border-color:#d63638;color:#b32d2e;background:#fff7f7;font-size:20px;}
.gbpres-otros-del:hover{background:#d63638;color:#fff;border-color:#d63638;}
@media(max-width:900px){
  .gbpres-otros-col-ref{width:11%;}
  .gbpres-otros-col-desc{width:34%;}
  .gbpres-otros-col-qty{width:7%;}
  .gbpres-otros-col-price{width:12%;}
  .gbpres-otros-col-total{width:12%;}
  .gbpres-otros-col-vat{width:8%;}
  .gbpres-otros-col-actions{width:16%;}
}

/* Ajuste solicitado: encabezados de grupo y cierre controlado del modal */
.gbpres-otros-group-head,
.gbpres-otros-group-head span:first-child{
  font-size:18px !important;
  font-weight:700 !important;
}
.gbpres-otros-modal-box{
  position:relative;
}
.gbpres-otros-modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:32px;
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d2d6dc;
  border-radius:999px;
  background:#fff;
  color:#303645;
  font-size:24px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
}
.gbpres-otros-modal-close:hover{
  border-color:#d63638;
  color:#b32d2e;
  background:#fff7f7;
}
.gbpres-review-card--wide{grid-column:1 / -1}
.gbpres-review-overlay .gbpres-review-modal{max-height:90vh;overflow:auto}
.gbpres-identity-badge{display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:5px 12px;background:#f0f4ff;border:1px solid #c7d4f5;border-radius:20px;font-size:12px;color:#3a4a7a;max-width:100%}
.gbpres-identity-icon{flex-shrink:0}
.gbpres-identity-name{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.gbpres-identity-company{color:#6b7aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.gbpres-identity-company::before{content:"·";margin-right:4px}
.st-revision{background:#fff3cd;color:#92400e;border:1px solid #fcd34d}
.gbpres-revision-notice{font-size:12px;color:#92400e;background:#fffbf0;border-left:3px solid #f59e0b;padding:6px 10px;border-radius:3px;margin:4px 0 6px;line-height:1.4}

.gbpres-revision-notice-main{margin:12px 0 14px;padding:10px 12px;font-size:13px;border-left-width:4px}
