/* EA Presupuestos PRO - CSS */
:root { --ebp-primary:#0f3460; --ebp-accent:#e94560; --ebp-success:#16a085; --ebp-warn:#f39c12; --ebp-danger:#e74c3c; --ebp-bg:#f5f7fa; --ebp-card:#fff; --ebp-border:#e2e8f0; --ebp-text:#2d3748; --ebp-muted:#718096; --ebp-r:10px; }
.ebp-app { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; color:var(--ebp-text); max-width:1280px; margin:0 auto; }

/* Header */
.ebp-app-header { background:var(--ebp-primary); color:#fff; padding:14px 20px; border-radius:var(--ebp-r) var(--ebp-r) 0 0; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.ebp-logo { font-size:18px; font-weight:800; }
.ebp-version { font-size:11px; opacity:0.6; font-weight:400; }
.ebp-app-nav { display:flex; gap:3px; flex-wrap:wrap; }
.ebp-nav-btn { background:rgba(255,255,255,0.1); color:#fff; border:none; padding:7px 13px; border-radius:6px; cursor:pointer; font-size:12px; font-weight:600; transition:all 0.2s; white-space:nowrap; }
.ebp-nav-btn:hover { background:rgba(255,255,255,0.22); }
.ebp-nav-btn.active { background:var(--ebp-accent); }
.ebp-tab-content { display:none; }
.ebp-tab-content.active { display:block; }

/* Sections */
.ebp-section { background:var(--ebp-card); border:1px solid var(--ebp-border); border-radius:var(--ebp-r); padding:18px; margin:10px 0; }
.ebp-section-title { font-size:15px; font-weight:700; color:var(--ebp-primary); margin:0 0 12px; padding-bottom:8px; border-bottom:2px solid var(--ebp-border); cursor:default; }
.ebp-section-desc { font-size:12px; color:var(--ebp-muted); margin:-6px 0 14px; }

/* Collapsible */
.ebp-collapsible-toggle { cursor:pointer; user-select:none; }
.ebp-toggle-icon { font-size:11px; margin-left:6px; }
.ebp-collapsible.collapsed .ebp-collapsible-content { display:none; }

/* Forms */
.ebp-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
.ebp-field { position:relative; }
.ebp-field label,.ebp-setting label { display:block; font-size:11px; font-weight:600; color:var(--ebp-muted); margin-bottom:3px; text-transform:uppercase; letter-spacing:0.4px; }
.ebp-field input,.ebp-field select,.ebp-field textarea,.ebp-setting input,.ebp-setting select { width:100%; padding:7px 10px; border:1px solid var(--ebp-border); border-radius:6px; font-size:13px; box-sizing:border-box; transition:border 0.2s; }
.ebp-field input:focus,.ebp-field select:focus,.ebp-setting input:focus,.ebp-setting select:focus { border-color:var(--ebp-primary); outline:none; box-shadow:0 0 0 3px rgba(15,52,96,0.08); }
.ebp-input-group { display:flex; gap:4px; }
.ebp-input-group input { flex:1; }

/* Settings Grid */
.ebp-settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:8px; }
.ebp-settings-grid-main { grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); }
.ebp-setting { position:relative; }
.ebp-region-group { font-weight:700; color:var(--ebp-primary); }

/* Tooltips */
.ebp-tooltip { display:none; position:absolute; bottom:calc(100% + 6px); left:0; right:0; background:#1a202c; color:#fff; font-size:11px; padding:8px 10px; border-radius:6px; z-index:200; line-height:1.4; box-shadow:0 4px 12px rgba(0,0,0,0.2); pointer-events:none; font-weight:400; text-transform:none; letter-spacing:0; }
.ebp-tooltip.visible { display:block; animation:ebpTipIn 0.15s ease; }
.ebp-tooltip::after { content:''; position:absolute; top:100%; left:20px; border:5px solid transparent; border-top-color:#1a202c; }
@keyframes ebpTipIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }

/* Buttons */
.ebp-btn { display:inline-flex; align-items:center; gap:5px; padding:7px 14px; border-radius:6px; font-size:12px; font-weight:600; cursor:pointer; border:none; transition:all 0.15s; }
.ebp-btn-primary { background:var(--ebp-primary); color:#fff; }
.ebp-btn-primary:hover { background:#1a4a7a; }
.ebp-btn-secondary { background:var(--ebp-accent); color:#fff; }
.ebp-btn-secondary:hover { background:#d63851; }
.ebp-btn-outline { background:transparent; color:var(--ebp-primary); border:1.5px solid var(--ebp-primary); }
.ebp-btn-outline:hover { background:var(--ebp-primary); color:#fff; }
.ebp-btn-danger { background:transparent; color:var(--ebp-danger); border:1.5px solid var(--ebp-danger); }
.ebp-btn-danger:hover { background:var(--ebp-danger); color:#fff; }
.ebp-btn-lg { padding:10px 22px; font-size:13px; }
.ebp-btn-sm { padding:4px 10px; font-size:11px; }
.ebp-btn:disabled { opacity:0.5; cursor:not-allowed; }

/* Search */
.ebp-add-item-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ebp-search-container { position:relative; flex:1; min-width:240px; }
.ebp-search-container input { width:100%; padding:10px 14px; border:2px solid var(--ebp-border); border-radius:8px; font-size:13px; box-sizing:border-box; }
.ebp-search-container input:focus { border-color:var(--ebp-primary); }
.ebp-search-dropdown { position:absolute; top:100%; left:0; right:0; background:#fff; border:1px solid var(--ebp-border); border-radius:8px; max-height:360px; overflow-y:auto; z-index:100; box-shadow:0 8px 24px rgba(0,0,0,0.12); display:none; }
.ebp-search-dropdown.visible { display:block; }
.ebp-search-item { display:flex; align-items:center; padding:8px 12px; cursor:pointer; border-bottom:1px solid #f0f0f0; gap:8px; transition:background 0.1s; }
.ebp-search-item:hover { background:#f0f4f8; }
.ebp-search-item-name { flex:1; font-size:13px; }
.ebp-search-item-name small { display:block; font-size:10px; color:var(--ebp-muted); }
.ebp-search-item-price { font-weight:600; font-size:12px; color:var(--ebp-success); white-space:nowrap; }
.ebp-search-item-labor { font-size:11px; color:var(--ebp-muted); white-space:nowrap; }
.ebp-search-item-add { background:var(--ebp-primary); color:#fff; border:none; padding:3px 8px; border-radius:4px; font-size:11px; cursor:pointer; white-space:nowrap; }
.ebp-search-empty { padding:16px; text-align:center; color:var(--ebp-muted); font-size:13px; }
.ebp-or-divider { color:var(--ebp-muted); font-size:11px; }

/* Browse */
.ebp-browse-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:4px; margin-top:10px; }
.ebp-browse-subcat { grid-column:1/-1; font-weight:700; color:var(--ebp-primary); font-size:11px; padding:5px 0 2px; border-bottom:1px solid #eee; }
.ebp-browse-item { padding:6px 10px; background:var(--ebp-bg); border-radius:5px; cursor:pointer; display:flex; justify-content:space-between; font-size:12px; transition:all 0.1s; }
.ebp-browse-item:hover { background:var(--ebp-primary); color:#fff; }
.ebp-browse-item .price { font-weight:600; font-size:11px; }
.ebp-custom-item-toggle { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.ebp-custom-form { margin-top:10px; padding:14px; background:var(--ebp-bg); border-radius:8px; }

/* Items Table */
.ebp-table-responsive { overflow-x:auto; }
.ebp-items-table { width:100%; border-collapse:collapse; font-size:12px; }
.ebp-items-table thead th { background:var(--ebp-primary); color:#fff; padding:8px 6px; font-size:10px; text-transform:uppercase; letter-spacing:0.4px; white-space:nowrap; }
.ebp-items-table tbody td { padding:6px; border-bottom:1px solid #f0f0f0; vertical-align:middle; }
.ebp-items-table tbody tr:hover { background:#f8fafb; }
.ebp-item-name { font-weight:600; display:block; font-size:12px; }
.ebp-item-name-en { font-size:10px; color:var(--ebp-muted); font-style:italic; }
.ebp-col-ref-cell { font-size:10px; color:var(--ebp-muted); max-width:100px; }
.ebp-num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ebp-qty-input { width:65px; padding:3px 5px; border:1px solid var(--ebp-border); border-radius:4px; text-align:right; font-size:12px; }
.ebp-section-row { background:var(--ebp-bg); }
.ebp-section-row td { font-weight:700; color:var(--ebp-primary); }
.ebp-row-btn { width:24px; height:24px; border-radius:50%; border:none; cursor:pointer; font-size:11px; display:flex; align-items:center; justify-content:center; }
.ebp-row-btn.delete { background:rgba(231,76,60,0.08); color:var(--ebp-danger); }
.ebp-row-btn.delete:hover { background:var(--ebp-danger); color:#fff; }
.ebp-empty-state { text-align:center; padding:30px; color:var(--ebp-muted); }
.ebp-empty-icon { font-size:36px; display:block; margin-bottom:8px; }
.ebp-empty-message { text-align:center; color:var(--ebp-muted); padding:20px; }

/* Totals */
.ebp-totals-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.ebp-notes-area textarea { width:100%; box-sizing:border-box; border:1px solid var(--ebp-border); border-radius:6px; padding:10px; font-size:12px; }
.ebp-totals-box { background:var(--ebp-bg); border-radius:8px; padding:14px; }
.ebp-total-row { display:flex; justify-content:space-between; padding:5px 0; font-size:12px; border-bottom:1px solid rgba(0,0,0,0.04); }
.ebp-total-row-bold { font-weight:700; font-size:13px; border-top:2px solid var(--ebp-border); }
.ebp-grand-total { font-size:17px; font-weight:800; color:var(--ebp-primary); border-top:3px solid var(--ebp-primary); padding-top:8px; margin-top:4px; }
.ebp-labor-summary { text-align:center; margin-top:8px; font-size:11px; color:var(--ebp-muted); }
.ebp-actions-bar { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }

/* Sources & Disclaimer */
.ebp-sources-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:10px; margin-bottom:14px; }
.ebp-source-card { background:var(--ebp-bg); border-radius:8px; padding:12px; border-left:3px solid var(--ebp-primary); }
.ebp-source-card strong { color:var(--ebp-primary); font-size:12px; display:block; margin-bottom:4px; }
.ebp-source-card p { font-size:11px; color:var(--ebp-muted); margin:0; line-height:1.4; }
.ebp-disclaimer { background:#fffbeb; border:1px solid #fcd34d; border-radius:8px; padding:14px; font-size:11px; line-height:1.5; color:#92400e; }

/* Improvements Link */
.ebp-improvements-card { display:flex; align-items:center; gap:16px; background:linear-gradient(135deg,#f0f4f8,#e8edf3); border-radius:var(--ebp-r); padding:20px; }
.ebp-improvements-icon { font-size:40px; }
.ebp-improvements-card h4 { margin:0 0 4px; color:var(--ebp-primary); font-size:14px; }
.ebp-improvements-card p { margin:0; font-size:12px; color:var(--ebp-muted); }
.ebp-improvements-card .ebp-btn { white-space:nowrap; flex-shrink:0; }

/* Projects */
.ebp-projects-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:12px; }
.ebp-project-card { background:var(--ebp-card); border:1px solid var(--ebp-border); border-radius:var(--ebp-r); padding:14px; transition:box-shadow 0.2s; }
.ebp-project-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.06); }
.ebp-project-card-header { display:flex; justify-content:space-between; align-items:start; margin-bottom:6px; }
.ebp-project-card-header h4 { margin:0; font-size:14px; color:var(--ebp-primary); }
.ebp-project-card-info { font-size:11px; color:var(--ebp-muted); margin-bottom:6px; }
.ebp-project-card-total { font-size:20px; font-weight:800; color:var(--ebp-primary); margin:6px 0; }
.ebp-project-card-date { font-size:10px; color:var(--ebp-muted); margin-bottom:8px; }
.ebp-project-card-actions { display:flex; gap:4px; }

/* Status */
.ebp-status { display:inline-block; padding:2px 8px; border-radius:20px; font-size:10px; font-weight:600; }
.ebp-status-draft { background:#edf2f7; color:#4a5568; }
.ebp-status-sent { background:#ebf8ff; color:#2b6cb0; }
.ebp-status-approved { background:#f0fff4; color:#276749; }
.ebp-status-completed { background:#f0fff4; color:var(--ebp-success); }

/* Templates */
.ebp-templates-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.ebp-template-card { background:var(--ebp-card); border:1px solid var(--ebp-border); border-radius:var(--ebp-r); padding:18px; text-align:center; transition:all 0.2s; }
.ebp-template-card:hover { border-color:var(--ebp-primary); box-shadow:0 4px 14px rgba(15,52,96,0.08); transform:translateY(-1px); }
.ebp-template-icon { font-size:32px; margin-bottom:6px; }
.ebp-template-card h4 { margin:0 0 4px; color:var(--ebp-primary); font-size:14px; }
.ebp-template-card p { font-size:11px; color:var(--ebp-muted); margin:0 0 8px; }
.ebp-template-meta { display:flex; justify-content:center; gap:8px; font-size:10px; color:var(--ebp-muted); margin-bottom:10px; }

/* Suppliers & Quotes */
.ebp-supplier-add-bar { margin-bottom:12px; }
.ebp-supplier-form { background:var(--ebp-bg); padding:14px; border-radius:8px; margin-bottom:12px; }
.ebp-supplier-form-actions { display:flex; gap:6px; margin-top:10px; }
.ebp-suppliers-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:8px; }
.ebp-supplier-card { background:var(--ebp-bg); border-radius:8px; padding:12px; display:flex; flex-direction:column; gap:3px; font-size:12px; }
.ebp-supplier-card strong { color:var(--ebp-primary); font-size:13px; }
.ebp-quote-compare-bar { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin:10px 0; }
.ebp-quote-select { padding:7px 8px; border:1px solid var(--ebp-border); border-radius:6px; font-size:12px; min-width:160px; }
.ebp-quote-compare-bar input { padding:7px 8px; border:1px solid var(--ebp-border); border-radius:6px; font-size:12px; }
.ebp-quotes-table { width:100%; border-collapse:collapse; font-size:12px; margin-top:10px; }
.ebp-quotes-table thead th { background:var(--ebp-primary); color:#fff; padding:7px; font-size:10px; text-transform:uppercase; }
.ebp-quotes-table tbody td { padding:7px; border-bottom:1px solid #f0f0f0; }
.ebp-savings { color:var(--ebp-success); font-weight:700; }
.ebp-over { color:var(--ebp-danger); font-weight:700; }
.ebp-quote-summary { margin-top:14px; padding:14px; background:#f0fff4; border-radius:8px; border:1px solid #c6f6d5; }
.ebp-quote-summary h4 { margin:0 0 10px; color:var(--ebp-success); font-size:13px; }

/* Calculation Tools */
.ebp-calc-result { margin-top:12px; }
.ebp-calc-result-box { padding:16px; border-radius:8px; }
.ebp-result-ok { background:#f0fff4; border:1px solid #c6f6d5; }
.ebp-result-ok h4 { color:var(--ebp-success); margin:0 0 6px; font-size:14px; }
.ebp-result-warn { background:#fffbeb; border:1px solid #fcd34d; }
.ebp-result-warn h4 { color:#92400e; margin:0 0 6px; font-size:14px; }
.ebp-calc-result-box p { margin:4px 0; font-size:13px; }
.ebp-calc-result-box small { color:var(--ebp-muted); }

/* AI Import */
.ebp-import-area { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:14px 0; }
.ebp-import-dropzone { background:var(--ebp-bg); border:2px dashed var(--ebp-border); border-radius:var(--ebp-r); padding:30px; text-align:center; transition:all 0.2s; cursor:pointer; }
.ebp-import-dropzone.dragover { border-color:var(--ebp-primary); background:#e8edf3; }
.ebp-import-dropzone h4 { color:var(--ebp-primary); margin:8px 0; }
.ebp-import-dropzone p { font-size:12px; color:var(--ebp-muted); margin:0 0 12px; }
.ebp-import-icon { font-size:40px; }
.ebp-import-features h4 { color:var(--ebp-primary); margin:0 0 10px; font-size:14px; }
.ebp-feature-list { display:grid; gap:4px; }
.ebp-feature-item { font-size:12px; padding:4px 0; }
.ebp-import-note { font-size:11px; color:var(--ebp-muted); margin-top:10px; background:var(--ebp-bg); padding:10px; border-radius:6px; }
.ebp-import-table { width:100%; border-collapse:collapse; font-size:12px; margin:10px 0; }
.ebp-import-table th { background:var(--ebp-bg); padding:6px; text-align:left; font-size:11px; }
.ebp-import-table td { padding:6px; border-bottom:1px solid #f0f0f0; }
.ebp-import-actions { display:flex; gap:8px; margin-top:12px; }
.ebp-coming-soon-note { font-size:12px; color:var(--ebp-muted); margin-top:16px; padding:12px; background:var(--ebp-bg); border-radius:6px; border:1px solid var(--ebp-border); }

/* Catalog */
.ebp-catalog-search { margin-bottom:12px; }
.ebp-catalog-search input { width:100%; padding:10px 14px; border:2px solid var(--ebp-border); border-radius:8px; font-size:13px; box-sizing:border-box; }
.ebp-catalog-category { margin-bottom:14px; }
.ebp-catalog-category h4 { color:var(--ebp-primary); font-size:14px; margin:0 0 6px; padding-bottom:4px; border-bottom:2px solid var(--ebp-border); }
.ebp-catalog-category h4 small { font-weight:400; color:var(--ebp-muted); }
.ebp-catalog-items { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:4px; }
.ebp-catalog-item { padding:6px 10px; background:var(--ebp-bg); border-radius:5px; display:flex; justify-content:space-between; align-items:center; }
.ebp-catalog-item-name { font-weight:600; font-size:11px; }
.ebp-catalog-ref { color:var(--ebp-accent); font-size:9px; }
.ebp-catalog-item-price { font-size:10px; color:var(--ebp-muted); text-align:right; white-space:nowrap; }

/* Toast */
.ebp-toast { position:fixed; bottom:20px; right:20px; background:var(--ebp-primary); color:#fff; padding:10px 20px; border-radius:8px; z-index:10000; font-size:13px; box-shadow:0 4px 12px rgba(0,0,0,0.25); opacity:0; transform:translateY(8px); transition:all 0.3s; }
.ebp-toast.visible { opacity:1; transform:translateY(0); }

/* Login */
.ebp-login-notice { background:var(--ebp-bg); border:1px solid var(--ebp-border); border-radius:var(--ebp-r); padding:30px; text-align:center; }
.ebp-login-notice a { color:var(--ebp-primary); font-weight:700; }

/* Responsive */
@media (max-width:768px) {
    .ebp-app-header { flex-direction:column; align-items:flex-start; }
    .ebp-app-nav { width:100%; overflow-x:auto; }
    .ebp-totals-grid { grid-template-columns:1fr; }
    .ebp-settings-grid,.ebp-settings-grid-main { grid-template-columns:repeat(2,1fr); }
    .ebp-form-grid { grid-template-columns:1fr; }
    .ebp-import-area { grid-template-columns:1fr; }
    .ebp-improvements-card { flex-direction:column; text-align:center; }
}

/* Print */
@media print {
    .ebp-app-header,.ebp-actions-bar,.ebp-custom-item-toggle,.ebp-add-item-bar,.ebp-row-btn,.ebp-app-nav,.ebp-notes-area,.ebp-improvements-section,.ebp-sources-section,#ebp-custom-form { display:none !important; }
    .ebp-section { border:1px solid #ddd; box-shadow:none; page-break-inside:avoid; }
}

/* ═══ Price Warning ═══ */
.ebp-price-warning{background:#fffbeb;border:1px solid #fcd34d;border-radius:8px;padding:12px 16px;margin-bottom:12px;font-size:13px;color:#92400e;line-height:1.5;}
.ebp-price-warning strong{color:#7b341e;}

/* ═══ Editable Inputs in Table ═══ */
.ebp-cost-input,.ebp-labor-input{width:90px;padding:4px 6px;border:1px solid #e2e8f0;border-radius:4px;text-align:right;font-size:12px;background:#fffef5;transition:all .2s;}
.ebp-cost-input:focus,.ebp-labor-input:focus{border-color:#0f3460;background:#fff;box-shadow:0 0 0 2px rgba(15,52,96,0.15);}
.ebp-cost-input:hover,.ebp-labor-input:hover{border-color:#0f3460;background:#fff;}

/* ═══ Utility ═══ */
.ebp-hidden{display:none!important;}
.ebp-source-ref{margin-top:12px;padding:10px 14px;background:#f0f4f8;border-radius:6px;border-left:3px solid #0f3460;}
.ebp-source-ref small{color:#4a5568;line-height:1.6;display:block;}

/* ═══ Calculator Tabs ═══ */
.ebp-calc-tabs{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:16px;padding:4px;background:#f5f7fa;border-radius:8px;}
.ebp-calc-tab{padding:8px 14px;border:none;background:transparent;cursor:pointer;font-size:13px;font-weight:600;border-radius:6px;color:#4a5568;transition:all .2s;}
.ebp-calc-tab:hover{background:#e2e8f0;}
.ebp-calc-tab.active{background:var(--ebp-primary,#0f3460);color:#fff;}
.ebp-calc-panel{display:none;}
.ebp-calc-panel.active{display:block;}
.ebp-calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:12px 0;}
.ebp-calc-info{font-size:12px;color:#4a5568;background:#f0f4f8;padding:10px;border-radius:6px;margin-bottom:12px;border-left:3px solid #0f3460;}
.ebp-calc-ok{background:#f0fff4;border:2px solid #48bb78;color:#276749;border-radius:8px;padding:16px;}
.ebp-calc-ok h4{color:#22543d;margin:0 0 8px;}
.ebp-calc-warn{background:#fffbeb;border:2px solid #f6ad55;color:#7b341e;border-radius:8px;padding:16px;}
.ebp-calc-warn h4{color:#7b341e;margin:0 0 8px;}
.ebp-calc-bad{background:#fff5f5;border:2px solid #fc8181;color:#9b2c2c;border-radius:8px;padding:16px;}
.ebp-calc-bad h4{color:#9b2c2c;margin:0 0 8px;}

/* ═══ Conduit Wires ═══ */
.ebp-conduit-wires{margin:12px 0;padding:12px;background:#f5f7fa;border-radius:8px;}
.ebp-conduit-wires h5{margin:0 0 8px;font-size:13px;}
.ebp-wire-row{display:flex;gap:8px;align-items:center;margin-bottom:6px;}
.ebp-wire-row select,.ebp-wire-row input{padding:6px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:13px;}
.ebp-wire-row input{width:70px;}

/* ═══ Assembly Panel ═══ */
.ebp-assembly-panel{margin-top:12px;padding:16px;background:#f0f4f8;border-radius:8px;}
.ebp-assembly-panel h4{margin:0 0 12px;color:#0f3460;}
.ebp-assembly-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;}
.ebp-assembly-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:4px;transition:all .2s;}
.ebp-assembly-card:hover{border-color:#0f3460;box-shadow:0 2px 8px rgba(15,52,96,.1);}
.ebp-assembly-card strong{font-size:14px;color:#0f3460;}
.ebp-assembly-card small{font-size:11px;color:#718096;}
.ebp-assembly-price{font-weight:700;color:#16a085;font-size:13px;margin:4px 0;}

/* ═══ Import ═══ */
.ebp-import-zone{border:2px dashed #cbd5e0;border-radius:12px;padding:40px;text-align:center;background:#fafbfc;cursor:pointer;transition:all .2s;}
.ebp-import-zone:hover{border-color:#0f3460;background:#f0f4f8;}
.ebp-import-icon{font-size:48px;margin-bottom:10px;}
.ebp-import-formats{font-size:12px;color:#718096;margin:8px 0 16px;}
.ebp-import-instructions{margin-top:20px;padding:16px;background:#f5f7fa;border-radius:8px;}
.ebp-import-instructions h4{margin:0 0 10px;color:#0f3460;}
.ebp-import-example{width:100%;border-collapse:collapse;font-size:12px;margin:8px 0;}
.ebp-import-example thead th{background:#e2e8f0;padding:6px 10px;text-align:left;}
.ebp-import-example tbody td{padding:6px 10px;border-bottom:1px solid #eee;}
.ebp-progress-bar{height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden;margin:12px 0;}
.ebp-progress-fill{height:100%;background:#0f3460;border-radius:3px;width:0;transition:width .5s;}

/* ═══ Footer ═══ */
.ebp-app-footer{background:#0f3460;border-radius:0 0 10px 10px;padding:14px 24px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;}
.ebp-app-footer small{color:#e2e8f0;font-size:12px;}
.ebp-app-footer a{color:#fcd34d;}
.ebp-footer-left small{color:#718096;}
.ebp-footer-right a{text-decoration:none;color:#0f3460;font-weight:600;}

/* ═══ Mode Bar ═══ */
.ebp-mode-bar{display:flex;align-items:center;gap:8px;padding:12px 20px;background:#f0f4f8;border:1px solid #e2e8f0;border-radius:10px;margin:12px 0;flex-wrap:wrap;}
.ebp-mode-btn{padding:8px 20px;border:2px solid #0f3460;background:transparent;color:#0f3460;border-radius:6px;font-weight:700;font-size:13px;cursor:pointer;transition:all .2s;}
.ebp-mode-btn.active{background:#0f3460;color:#fff;}
.ebp-mode-right{margin-left:auto;display:flex;align-items:center;gap:6px;font-size:13px;}
.ebp-mode-right select{padding:5px 8px;border:1px solid #e2e8f0;border-radius:4px;font-size:12px;}

/* ═══ Currency Display ═══ */
.ebp-currency-display{display:inline-block;padding:7px 12px;background:#f0f4f8;border:1px solid #e2e8f0;border-radius:6px;font-weight:700;font-size:13px;color:#0f3460;}

/* ═══ Cost Empty ═══ */
.ebp-cost-empty{background:#fff3cd!important;border-color:#ffc107!important;}

/* ═══ Modal ═══ */
.ebp-modal{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:10001;display:flex;align-items:center;justify-content:center;}
.ebp-modal-content{background:#fff;border-radius:16px;padding:30px;max-width:700px;width:90%;max-height:90vh;overflow-y:auto;text-align:center;}
.ebp-modal-content h3{color:#0f3460;margin:0 0 12px;font-size:20px;}

/* ═══ Plan Cards ═══ */
.ebp-upgrade-plans{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px 0;}
.ebp-plan-card{border:2px solid #e2e8f0;border-radius:12px;padding:20px;text-align:center;}
.ebp-plan-card h4{color:#0f3460;margin:0 0 10px;font-size:16px;}
.ebp-plan-card p{font-size:12px;margin:4px 0;color:#4a5568;}
.ebp-plan-price{font-size:20px!important;font-weight:800!important;color:#0f3460!important;margin:12px 0!important;}
.ebp-plan-featured{border-color:#0f3460;background:#f0f4f8;position:relative;}
.ebp-plan-featured::before{content:'⭐ Recomendado';position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:#e94560;color:#fff;padding:2px 12px;border-radius:10px;font-size:10px;font-weight:700;}

@media(max-width:600px){.ebp-upgrade-plans{grid-template-columns:1fr;}}

/* ═══ Design Item Cards ═══ */
.ebp-design-item-card{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:12px 16px;transition:all .2s;}
.ebp-design-item-card:hover{border-color:#0f3460;background:#f8fafc;}
.ebp-di-info{flex:1;min-width:0;}
.ebp-di-info strong{display:block;font-size:13px;color:#1a202c;margin-bottom:2px;}
.ebp-di-info small{display:block;font-size:11px;color:#718096;line-height:1.4;}
.ebp-di-hours{display:inline-block;margin-top:4px;font-size:11px;font-weight:600;color:#0f3460;background:#edf2f7;padding:2px 8px;border-radius:10px;}
.ebp-design-item-card .ebp-btn{flex-shrink:0;}

/* ═══ Custom Form Standalone ═══ */
#ebp-custom-form{margin:12px 0;}
#ebp-custom-form .ebp-section{background:#fffef5;border:1px solid #fcd34d;}

/* ═══ Design Deliverables UI ═══ */
.ebp-di-global-bar{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;background:#edf2f7;border-radius:8px;margin-bottom:8px;}
.ebp-di-global-bar label{font-size:13px;}
.ebp-di-global-bar select{padding:6px 10px;border:1px solid #cbd5e0;border-radius:6px;font-size:13px;font-weight:600;}
.ebp-di-disclaimer{display:block;width:100%;font-size:11px;color:#718096;margin-top:4px;font-style:italic;}
.ebp-di-cat-header{grid-column:1/-1;font-weight:700;color:#0f3460;font-size:14px;padding:12px 0 4px;border-bottom:2px solid #0f3460;margin-top:10px;}
.ebp-di-cat-header small{display:block;font-weight:400;font-size:11px;color:#718096;}
.ebp-design-item-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px 14px;transition:all .2s;}
.ebp-design-item-card:hover{border-color:#0f3460;}
.ebp-design-item-card.ebp-di-na{opacity:.45;}
.ebp-di-main{display:flex;align-items:center;gap:12px;}
.ebp-di-info{flex:1;min-width:0;}
.ebp-di-info strong{display:block;font-size:13px;color:#1a202c;}
.ebp-di-info small{display:block;font-size:11px;color:#718096;line-height:1.3;margin-top:2px;}
.ebp-di-controls{display:flex;align-items:center;gap:6px;flex-shrink:0;}
.ebp-di-controls label{font-size:10px;color:#718096;font-weight:600;}
.ebp-di-qty{width:50px;padding:4px 6px;border:1px solid #cbd5e0;border-radius:4px;text-align:center;font-size:13px;}
.ebp-di-hrs{width:60px;padding:4px 6px;border:1px solid #cbd5e0;border-radius:4px;text-align:center;font-size:13px;background:#fffef5;}
.ebp-di-subtotal{font-weight:700;color:#0f3460;font-size:14px;min-width:40px;text-align:right;}
.ebp-di-unit{font-size:10px;color:#718096;min-width:35px;}
.ebp-di-actions{grid-column:1/-1;display:flex;align-items:center;gap:16px;padding:16px 0;border-top:2px solid #0f3460;margin-top:12px;}
.ebp-di-total-preview{font-size:14px;font-weight:700;color:#0f3460;}

/* ═══ Design Items Grid ═══ */
.ebp-design-items-grid{display:grid;grid-template-columns:1fr;gap:6px;}
@media(min-width:800px){.ebp-design-items-grid{grid-template-columns:1fr 1fr;}}

/* ═══ Design Method Tabs ═══ */
.ebp-design-method-tabs{display:flex;gap:4px;margin:14px 0 12px;padding:4px;background:#edf2f7;border-radius:8px;}
.ebp-design-method-tab{flex:1;padding:10px 16px;border:none;background:transparent;cursor:pointer;font-size:13px;font-weight:700;border-radius:6px;color:#4a5568;transition:all .2s;text-align:center;}
.ebp-design-method-tab:hover{background:#e2e8f0;}
.ebp-design-method-tab.active{background:#0f3460;color:#fff;}
.ebp-method-desc{font-size:12px;color:#4a5568;background:#f7fafc;padding:10px 14px;border-radius:6px;margin-bottom:14px;border-left:3px solid #0f3460;}
.ebp-method-desc strong{color:#0f3460;}

/* ═══ Parametric Panel ═══ */
.ebp-param-form{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px;}
.ebp-param-row{display:flex;flex-direction:column;gap:4px;}
.ebp-param-row label{font-size:12px;font-weight:600;color:#4a5568;}
.ebp-param-row select,.ebp-param-row input{padding:8px 10px;border:1px solid #cbd5e0;border-radius:6px;font-size:13px;}
.ebp-param-extras{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:12px;padding:10px;background:#f7fafc;border-radius:6px;}
.ebp-param-extras label{font-size:12px;display:flex;align-items:center;gap:4px;cursor:pointer;}
.ebp-param-result{margin:16px 0;padding:16px;background:#f0fff4;border:1px solid #c6f6d5;border-radius:8px;}
.ebp-param-result h4{margin:0 0 10px;color:#276749;}
.ebp-param-table{width:100%;border-collapse:collapse;font-size:13px;}
.ebp-param-table thead th{text-align:left;padding:6px 10px;background:#e2e8f0;font-size:11px;text-transform:uppercase;}
.ebp-param-table tbody td{padding:6px 10px;border-bottom:1px solid #e2e8f0;}
.ebp-param-table .num{text-align:right;}
.ebp-param-total{background:#f0fff4;font-size:14px;}
.ebp-param-total td{border-top:2px solid #276749;padding:10px;}
@media(max-width:600px){.ebp-param-form{grid-template-columns:1fr;}}

/* ═══ Parametric Section Headers ═══ */
.ebp-param-section-header{font-weight:700;color:#0f3460;font-size:13px;padding:8px 0 4px;border-bottom:1px solid #cbd5e0;margin-top:10px;}
.ebp-param-total-bar{font-size:14px;padding:10px 0;border-top:2px solid #0f3460;margin-top:10px;text-align:right;}

/* ═══ Catalog Toolbar ═══ */
.ebp-catalog-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap;}
.ebp-catalog-toolbar .ebp-catalog-search{flex:1;}

/* ═══ Catalog Item Cards ═══ */
.ebp-catalog-item-card{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:6px;margin:4px 0;transition:background .15s;cursor:pointer;}
.ebp-catalog-item-card:hover{background:#f7fafc;border-color:#0f3460;}
.ebp-cat-item-name{flex:1;font-size:13px;font-weight:500;}
.ebp-cat-item-sub{font-size:10px;color:#718096;display:block;margin-bottom:2px;}
.ebp-cat-item-detail{display:flex;gap:8px;font-size:11px;color:#4a5568;}
.ebp-cat-item-detail span{background:#edf2f7;padding:2px 6px;border-radius:4px;}
.ebp-catalog-item-card .ebp-btn-sm{font-size:11px;padding:4px 10px;white-space:nowrap;}

/* ═══ Comparador ═══ */
.ebp-compare-upload-zone{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;margin:16px 0;}
.ebp-compare-file-slot{border:2px dashed #cbd5e0;border-radius:10px;padding:20px;text-align:center;min-height:120px;}
.ebp-compare-file-slot h4{margin:0 0 12px;color:#0f3460;}
.ebp-compare-preview{margin-top:12px;text-align:left;}
.ebp-compare-preview img{max-height:300px;}
.ebp-compare-table{width:100%;border-collapse:collapse;font-size:11px;}
.ebp-compare-table th{background:#edf2f7;padding:4px 8px;text-align:left;font-size:10px;position:sticky;top:0;}
.ebp-compare-table td{padding:3px 8px;border-bottom:1px solid #e2e8f0;}
.ebp-compare-result{background:#f0fff4;border:1px solid #c6f6d5;border-radius:8px;padding:16px;margin-top:16px;}
.ebp-compare-totals{display:flex;gap:20px;margin:12px 0;padding:12px;background:#fff;border-radius:6px;border:1px solid #e2e8f0;}
.ebp-compare-totals p{margin:0;font-size:14px;}
@media(max-width:600px){.ebp-compare-upload-zone{grid-template-columns:1fr;}}

/* ═══ Disclaimer ═══ */
.ebp-disclaimer{background:#f7fafc;border:1px solid #e2e8f0;border-radius:8px;padding:14px 20px;margin-top:12px;font-size:11px;color:#718096;line-height:1.6;}
.ebp-disclaimer p{margin:0;}
.ebp-disclaimer strong{color:#4a5568;}

/* ═══ AI Button ═══ */
.ebp-ai-btn{display:inline-block;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border:none;border-radius:50%;width:22px;height:22px;font-size:11px;cursor:pointer;margin-left:4px;padding:0;line-height:1;vertical-align:middle;transition:transform .15s;}
.ebp-ai-btn:hover{transform:scale(1.15);}
.ebp-ai-btn:disabled{opacity:.6;cursor:wait;}

/* ═══ Design extra costs grid ═══ */
.ebp-extra-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;}
.ebp-extra-grid .ebp-field label{display:block;font-size:12px;font-weight:600;color:#4a5568;margin-bottom:4px;}
.ebp-extra-grid .ebp-field input{width:100%;padding:6px 8px;border:1px solid #cbd5e0;border-radius:6px;}

/* ═══ Design parametric enhancements ═══ */
.ebp-specialty-row{display:block;}
.ebp-specialty-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:8px;margin-top:8px;}
.ebp-specialty-check{display:flex;align-items:center;gap:6px;padding:8px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;cursor:pointer;font-size:13px;transition:all .15s;}
.ebp-specialty-check:hover{background:#edf2f7;border-color:#cbd5e0;}
.ebp-specialty-check input{margin:0;}
.ebp-specialty-check small{color:#667eea;font-weight:600;margin-left:auto;}
.ebp-specialty-check input:checked + small,
.ebp-specialty-check:has(input:checked){background:#edf2ff;border-color:#667eea;}
.ebp-estimate-box{background:linear-gradient(135deg,#f0f9ff 0%,#e0f2fe 100%);border:1px solid #0ea5e9;border-radius:10px;padding:14px 18px;margin:16px 0;}
.ebp-estimate-box h4{margin:0 0 10px;color:#0c4a6e;font-size:14px;}
.ebp-estimate-formula{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px;color:#0c4a6e;margin-bottom:6px;flex-wrap:wrap;}
.ebp-estimate-total{font-size:24px;font-weight:700;color:#0ea5e9;}
.ebp-estimate-box small{display:block;font-size:11px;color:#475569;font-style:italic;}
.ebp-param-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap;}

/* ═══ AI/Default badges in estimate ═══ */
.ebp-ai-badge{display:inline-block;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;margin-left:8px;}
.ebp-default-badge{display:inline-block;background:#e2e8f0;color:#475569;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:500;margin-left:8px;}

/* ═══ Common design params section ═══ */
.ebp-design-common-params{background:linear-gradient(135deg,#f0f9ff 0%,#fefce8 100%);border:1px solid #0ea5e9;border-radius:10px;padding:14px 18px;margin-bottom:14px;}
.ebp-common-params-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.ebp-common-params-grid .ebp-field{display:flex;flex-direction:column;gap:4px;}
.ebp-common-params-grid label{font-size:13px;font-weight:600;color:#0c4a6e;display:flex;align-items:center;gap:6px;}
.ebp-common-params-grid input{padding:8px 12px;border:1px solid #cbd5e0;border-radius:6px;font-size:14px;}
.ebp-hpm-source{font-size:11px;color:#475569;font-style:italic;}
@media(max-width:640px){.ebp-common-params-grid{grid-template-columns:1fr;}}

/* ═══ Design Mode UX v2 — Numbered Steps ═══ */
.ebp-design-step{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:18px 20px;margin-bottom:14px;box-shadow:0 1px 3px rgba(0,0,0,.05);}
.ebp-design-step-header{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #f1f5f9;}
.ebp-step-num{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;font-weight:700;font-size:16px;flex-shrink:0;}
.ebp-design-step-header h4{margin:0;color:#0f3460;font-size:15px;}
.ebp-design-step-header small{display:block;color:#64748b;font-size:12px;margin-top:2px;}
.ebp-design-type-select{width:100%;padding:10px 14px;border:2px solid #cbd5e0;border-radius:8px;font-size:14px;background:#fff;cursor:pointer;transition:border-color .15s;}
.ebp-design-type-select:hover,.ebp-design-type-select:focus{border-color:#667eea;outline:none;}
.ebp-specialty-collapse{margin-top:12px;}
.ebp-specialty-toggle{background:none;border:1px solid #e2e8f0;border-radius:6px;padding:8px 14px;cursor:pointer;font-size:13px;font-weight:600;color:#4a5568;display:flex;align-items:center;gap:8px;width:100%;justify-content:space-between;}
.ebp-specialty-toggle:hover{background:#f8fafc;border-color:#cbd5e0;}
.ebp-specialty-count{font-weight:400;font-size:12px;color:#667eea;}
.ebp-caret{transition:transform .2s;display:inline-block;}
.ebp-caret.open{transform:rotate(180deg);}
.ebp-specialty-content{padding:12px 4px 4px;}
.ebp-design-estimate-wrapper{margin-top:14px;}
.ebp-estimate-warning{background:#fef3c7;border:1px solid #fde68a;border-radius:8px;color:#92400e;font-size:13px;padding:10px 14px;margin-top:8px;}
.ebp-manual-badge{display:inline-block;background:#f59e0b;color:#fff;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;margin-left:8px;}
.ebp-custom-secondary{margin-top:16px;padding:10px;background:#f8fafc;border-radius:8px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.ebp-custom-secondary small{color:#64748b;font-size:12px;flex:1;}
.ebp-btn-sm{padding:4px 10px;font-size:12px;}

/* ═══ Prominent AI button + h/m² display ═══ */
.ebp-ai-btn-cta{display:flex;flex-direction:column;align-items:flex-start;width:100%;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border:none;border-radius:10px;padding:12px 18px;cursor:pointer;font-size:15px;font-weight:600;margin-top:12px;box-shadow:0 2px 8px rgba(102,126,234,.3);transition:transform .15s,box-shadow .15s;}
.ebp-ai-btn-cta:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(102,126,234,.4);}
.ebp-ai-btn-cta:disabled{opacity:.7;cursor:wait;}
.ebp-ai-btn-cta small{display:block;font-size:11px;font-weight:400;opacity:.9;margin-top:3px;text-transform:none;}

.ebp-hpm-display-box{display:flex;align-items:baseline;gap:8px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;}
.ebp-hpm-display-box strong{font-size:18px;color:#0f3460;}
.ebp-hpm-source.source-table{color:#64748b;}
.ebp-hpm-source.source-ai{color:#667eea;font-weight:600;}
.ebp-hpm-source.source-manual{color:#f59e0b;font-weight:600;}

.ebp-manual-hpm{margin-top:8px;font-size:12px;}
.ebp-manual-hpm summary{cursor:pointer;color:#64748b;padding:4px 0;list-style:none;}
.ebp-manual-hpm summary:hover{color:#0f3460;}
.ebp-manual-hpm summary::-webkit-details-marker{display:none;}
.ebp-manual-hpm summary::before{content:'▶ ';font-size:9px;transition:transform .2s;display:inline-block;}
.ebp-manual-hpm[open] summary::before{content:'▼ ';}
.ebp-manual-hpm input{margin-top:4px;width:100%;padding:6px 10px;border:1px solid #cbd5e0;border-radius:6px;font-size:13px;}

/* ═══ AI Primary Action Button (big, prominent) ═══ */
button.ebp-ai-action-primary,
.ebp-section button.ebp-ai-action-primary{
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
    width:100% !important;
    background:linear-gradient(135deg,#667eea 0%,#764ba2 100%) !important;
    color:#fff !important;
    border:none !important;
    border-radius:12px !important;
    padding:14px 18px !important;
    margin:14px 0 10px !important;
    cursor:pointer !important;
    text-align:left !important;
    font-family:inherit !important;
    line-height:1.3 !important;
    box-shadow:0 4px 12px rgba(102,126,234,.35) !important;
    transition:transform .15s,box-shadow .15s !important;
    text-decoration:none !important;
    text-transform:none !important;
    letter-spacing:normal !important;
}
button.ebp-ai-action-primary:hover,
.ebp-section button.ebp-ai-action-primary:hover{
    background:linear-gradient(135deg,#5568d3 0%,#653a92 100%) !important;
    color:#fff !important;
    transform:translateY(-1px) !important;
    box-shadow:0 6px 18px rgba(102,126,234,.5) !important;
    text-decoration:none !important;
}
button.ebp-ai-action-primary:focus,
button.ebp-ai-action-primary:active{
    color:#fff !important;
    outline:2px solid #fff !important;
    outline-offset:2px !important;
}
.ebp-ai-action-primary:disabled{opacity:.7 !important;cursor:wait !important;transform:none !important;}
.ebp-ai-action-icon{font-size:28px !important;line-height:1 !important;flex-shrink:0 !important;color:#fff !important;}
.ebp-ai-action-text{flex:1;display:flex;flex-direction:column;}
.ebp-ai-action-text strong{font-size:15px !important;font-weight:700 !important;color:#fff !important;}
.ebp-ai-action-text small{font-size:11px !important;font-weight:400 !important;opacity:.92 !important;margin-top:2px !important;color:#fff !important;}
.ebp-ai-action-arrow{font-size:20px;opacity:.7;flex-shrink:0;}

/* h/m² current value (small, secondary) */
.ebp-hpm-current-small{
    padding:10px 14px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:8px;
    font-size:13px;
    color:#64748b;
}
.ebp-hpm-current-small strong{font-size:16px;color:#0f3460;margin:0 4px;}
.ebp-hpm-current-small .ebp-hpm-source{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;}
.ebp-hpm-source.source-table{background:#e2e8f0;color:#64748b;}
.ebp-hpm-source.source-ai{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;}
.ebp-hpm-source.source-manual{background:#f59e0b;color:#fff;}

/* Manual edit collapsible */
.ebp-manual-hpm{margin-top:6px;font-size:12px;}
.ebp-manual-hpm summary{cursor:pointer;color:#64748b;padding:4px 0;list-style:none;font-size:12px;}
.ebp-manual-hpm summary:hover{color:#0f3460;}
.ebp-manual-hpm summary::-webkit-details-marker{display:none;}
.ebp-manual-hpm summary::before{content:'▶ ';font-size:9px;display:inline-block;}
.ebp-manual-hpm[open] summary::before{content:'▼ ';}
.ebp-manual-hpm input{margin-top:4px;width:200px;padding:6px 10px;border:1px solid #cbd5e0;border-radius:6px;font-size:13px;}

/* Pending/prompt states (no estimate yet) */
.ebp-hpm-source.source-pending{background:#fef3c7 !important;color:#92400e !important;}
.ebp-estimate-prompt{background:linear-gradient(135deg,#fef3c7 0%,#fed7aa 100%);border:1px dashed #f59e0b;border-radius:8px;color:#78350f;font-size:13px;padding:14px 16px;margin-top:8px;line-height:1.5;}
.ebp-estimate-prompt strong{color:#7c2d12;}

/* Estimate stale warning (params changed after IA) */
.ebp-estimate-stale{background:#fef3c7;border:1px solid #f59e0b;border-radius:8px;color:#78350f;font-size:13px;padding:10px 14px;margin-bottom:10px;line-height:1.5;}
.ebp-estimate-stale strong{color:#7c2d12;}

/* Type-specific params (niveles, pisos, etc.) shown in Step 2 */
.ebp-design-params-extra{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:12px;
    margin-top:12px;
    padding:10px 12px;
    background:#fafbfc;
    border:1px solid #e2e8f0;
    border-radius:8px;
}
.ebp-design-params-extra:empty{display:none;}
.ebp-design-params-extra .ebp-param-row{display:flex;flex-direction:column;}
.ebp-design-params-extra .ebp-param-row label{font-size:12px;font-weight:600;color:#4a5568;margin-bottom:4px;}
.ebp-design-params-extra .ebp-param-row input{padding:7px 10px;border:1px solid #cbd5e0;border-radius:6px;font-size:14px;}
.ebp-design-params-extra .ebp-param-row input:focus{outline:none;border-color:#667eea;}

/* Unified add-items bar above the budget table */
.ebp-add-items-bar{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:8px;
    margin-bottom:8px;
    flex-wrap:wrap;
}
.ebp-add-items-hint{font-size:12px;color:#64748b;flex:1;min-width:140px;}

/* Market comparison box */
.ebp-market-compare{
    margin-top:14px;
    padding:14px 18px;
    border-radius:10px;
    border-left:4px solid #94a3b8;
    background:linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%);
    font-size:13px;
}
.ebp-market-compare.ebp-market-in-range{border-left-color:#10b981;background:linear-gradient(135deg,#f0fdf4 0%,#dcfce7 100%);}
.ebp-market-compare.ebp-market-below{border-left-color:#f59e0b;background:linear-gradient(135deg,#fefce8 0%,#fef3c7 100%);}
.ebp-market-compare.ebp-market-above{border-left-color:#3b82f6;background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%);}
.ebp-market-compare h4{margin:0 0 10px;color:#0f3460;font-size:14px;}
.ebp-market-row{display:flex;justify-content:space-between;align-items:baseline;padding:4px 0;border-bottom:1px dashed #e2e8f0;}
.ebp-market-row:last-of-type{border-bottom:none;}
.ebp-market-row span{flex:1;color:#475569;}
.ebp-market-row strong{font-weight:600;color:#0f3460;}
.ebp-market-row.ebp-market-typ{background:rgba(102,126,234,.08);padding:6px 8px;border-radius:6px;margin:2px 0;border-bottom:none;}
.ebp-market-row.ebp-market-user{background:rgba(15,52,96,.08);padding:8px;border-radius:6px;margin-top:6px;border-bottom:none;font-weight:600;}
.ebp-market-row.ebp-market-user strong{color:#0f3460;font-size:15px;}
.ebp-market-status{margin-top:10px;padding:8px 12px;background:rgba(255,255,255,.7);border-radius:6px;font-weight:600;color:#0f3460;text-align:center;}
.ebp-market-compare small{display:block;margin-top:8px;color:#64748b;font-style:italic;font-size:11px;}
.ebp-market-hint{margin-top:10px;padding:10px 14px;background:#fef3c7;border:1px dashed #f59e0b;border-radius:8px;color:#78350f;font-size:12px;}

/* Market header with AI button */
.ebp-market-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:10px;
}
.ebp-market-header h4{margin:0;flex:1;}
.ebp-market-source{
    display:inline-block;
    font-size:10px;
    font-weight:600;
    padding:2px 8px;
    border-radius:12px;
    margin-left:6px;
    vertical-align:middle;
}
.ebp-market-source-ai{background:#ede9fe;color:#6d28d9;border:1px solid #c4b5fd;}
.ebp-market-source-table{background:#e0e7ff;color:#3730a3;border:1px solid #a5b4fc;}
.ebp-market-source-fallback{background:#fef3c7;color:#92400e;border:1px solid #fcd34d;}
.ebp-market-ai-btn{
    background:linear-gradient(135deg,#8b5cf6,#7c3aed);
    color:#fff;
    border:none;
    padding:6px 12px;
    border-radius:6px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
}
.ebp-market-ai-btn:hover{background:linear-gradient(135deg,#7c3aed,#6d28d9);}
.ebp-market-ai-btn:disabled{opacity:.6;cursor:not-allowed;}
.ebp-market-ai-note{
    background:rgba(139,92,246,.08);
    border-left:3px solid #8b5cf6;
    padding:8px 12px;
    margin-bottom:10px;
    border-radius:4px;
    font-size:12px;
    color:#4c1d95;
}
.ebp-market-disclaimer{
    margin-top:14px;
    padding:12px;
    background:#fffbeb;
    border:1px solid #fcd34d;
    border-radius:8px;
    font-size:11px;
    color:#78350f;
    line-height:1.5;
}
.ebp-market-disclaimer strong{color:#78350f;}

/* Niveles/pisos hint */
.ebp-param-hint{
    display:block;
    margin-top:8px;
    padding:8px 10px;
    background:#eff6ff;
    border-left:3px solid #3b82f6;
    border-radius:4px;
    font-size:11px;
    color:#1e40af;
    line-height:1.4;
}

/* Market target buttons (apuntar a rango) */
.ebp-market-target{
    margin-top:12px;
    padding:10px 12px;
    background:rgba(255,255,255,.6);
    border-radius:8px;
}
.ebp-market-target-label{
    display:block;
    font-size:12px;
    font-weight:600;
    color:#0f3460;
    margin-bottom:8px;
}
.ebp-market-target-btns{
    display:flex;
    gap:8px;
}
.ebp-market-target-btns button{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:2px;
    padding:8px 6px;
    border:1px solid #cbd5e1;
    border-radius:8px;
    background:#fff;
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    color:#475569;
    transition:all .15s;
}
.ebp-market-target-btns button small{font-size:11px;font-weight:500;color:#64748b;}
.ebp-market-target-btns button:hover{border-color:#667eea;background:#f5f3ff;color:#5b21b6;transform:translateY(-1px);}
.ebp-market-target-btns button.ebp-target-typ{border-color:#a5b4fc;background:#eef2ff;}
.ebp-market-target-btns button.ebp-target-typ:hover{border-color:#667eea;background:#e0e7ff;}

/* AI usage counter badge */
.ebp-ai-counter{
    display:inline-block;
    font-size:11px;
    font-weight:600;
    padding:3px 10px;
    border-radius:12px;
    line-height:1.4;
}
.ebp-ai-counter:empty{display:none;}
.ebp-aic-ok{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0;}
.ebp-aic-low{background:#fffbeb;color:#b45309;border:1px solid #fcd34d;}
.ebp-aic-empty{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;}
.ebp-aic-none{background:#f1f5f9;color:#64748b;border:1px solid #cbd5e1;}
.ebp-ai-counter-sidebar{display:block;margin-top:10px;text-align:center;}

/* AI pack purchase card */
.ebp-aipack-card{
    padding:20px;
    border-radius:12px;
    background:linear-gradient(135deg,#ede9fe 0%,#ddd6fe 100%);
    border:2px solid #8b5cf6;
    text-align:center;
}
.ebp-aipack-card h4{margin:0 0 10px;color:#5b21b6;font-size:18px;}
.ebp-aipack-card p{color:#4c1d95;margin:6px 0;}

/* Team size input in labor summary */
#ebp-team-size{border:1px solid #cbd5e1;border-radius:4px;font-size:12px;}

/* Modal simple de límite de prueba (estilo limpio, como otros plugins EA) */
.ebp-trial-content{
    max-width:420px;
    text-align:center;
    padding:36px 32px 28px;
    border-radius:18px;
}
.ebp-trial-content h3{
    font-size:22px;
    font-weight:800;
    color:#1e293b;
    margin:0 0 14px;
    line-height:1.25;
}
.ebp-trial-msg{
    color:#64748b;
    font-size:15px;
    line-height:1.5;
    margin:0 0 24px;
}
.ebp-trial-cta{
    display:inline-block;
    background:#f59e0b;
    color:#fff !important;
    font-weight:700;
    font-size:16px;
    padding:14px 32px;
    border-radius:10px;
    text-decoration:none;
    border:none;
    box-shadow:0 4px 12px rgba(245,158,11,.35);
    transition:background .15s;
}
.ebp-trial-cta:hover{background:#d97706;}
.ebp-trial-close{
    display:block;
    margin:18px auto 0;
    background:none;
    border:none;
    color:#94a3b8;
    font-size:13px;
    font-weight:600;
    letter-spacing:.5px;
    cursor:pointer;
    text-transform:uppercase;
}
.ebp-trial-close:hover{color:#64748b;}
