:root{
  --bp-dark:#0f172a;--bp-dark-2:#182237;--bp-bg:#f5f7fb;--bp-card:#fff;--bp-border:#d9e2ef;
  --bp-text:#0b1220;--bp-muted:#64748b;--bp-gold:#d69b1e;--bp-green:#16a34a;--bp-red:#dc2626;
  --bp-radius:18px;--bp-shadow:0 14px 35px rgba(15,23,42,.065)
}
body.brokerty-panel-page{background:var(--bp-bg)!important}.bp-erp{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:900px;background:var(--bp-bg);font-family:Inter,Arial,sans-serif;color:var(--bp-text)}.bp-sidebar{background:var(--bp-dark);color:#fff;padding:28px 18px;display:flex;flex-direction:column;gap:22px;min-height:100vh;position:sticky;top:0}.bp-logo{font-weight:950;letter-spacing:.12em;font-size:19px}.bp-logo span{display:block;font-size:11px;color:#cbd5e1;text-transform:uppercase;margin-top:5px}.bp-side-link,.bp-logout{display:flex;justify-content:center;align-items:center;border-radius:13px;padding:12px;background:rgba(255,255,255,.08);color:#fff!important;text-decoration:none!important;font-weight:900}.bp-menu{display:grid;gap:8px}.bp-menu span{font-size:11px;text-transform:uppercase;color:#94a3b8;font-weight:900;letter-spacing:.08em;margin-bottom:8px}.bp-menu a{color:#dbe4f0!important;text-decoration:none!important;border-radius:13px;padding:13px 15px;font-weight:900}.bp-menu a.active,.bp-menu a:hover{background:rgba(255,255,255,.12);box-shadow:inset 4px 0 0 var(--bp-gold);color:#fff!important}.bp-sidebar-note{border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.06);border-radius:16px;padding:16px}.bp-sidebar-note strong{display:block;font-size:18px;margin-bottom:7px}.bp-sidebar-note p{font-size:13px;line-height:1.45;color:#dbe4f0;margin:0}.bp-session{margin-top:auto;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.06);border-radius:16px;padding:15px}.bp-session small{display:block;color:#94a3b8}.bp-session strong{display:block;margin-top:5px}.bp-main{padding:28px 34px;min-width:0}.bp-global-search{display:flex;gap:10px;justify-content:flex-end;margin-bottom:20px}.bp-global-search label{position:relative}.bp-global-search span,.bp-filters span{display:block;font-size:10px;font-weight:900;text-transform:uppercase;color:#64748b;margin-bottom:4px}.bp-global-search input{width:330px}.bp-global-search input,.bp-global-search button,.bp-filters input,.bp-filters select,.bp-filters button,.bp-form input,.bp-form select,.bp-form textarea,.bp-inline-form input,.bp-inline-form select{border:1px solid var(--bp-border);border-radius:10px;padding:10px 12px;background:#fff;font-size:14px}.bp-global-search button,.bp-filters button,.bp-btn{border:0;background:var(--bp-dark);color:#fff!important;border-radius:11px;padding:10px 16px;font-weight:950;text-decoration:none!important;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.bp-btn-light{background:#fff!important;color:var(--bp-dark)!important;border:1px solid var(--bp-border)!important}.bp-card{background:var(--bp-card);border:1px solid var(--bp-border);border-radius:var(--bp-radius);box-shadow:var(--bp-shadow);padding:20px;margin-bottom:16px}.bp-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.bp-page-head h1{font-size:36px;margin:0 0 5px;line-height:1}.bp-page-head p,.bp-entity-head p,.bp-muted{color:var(--bp-muted);margin:0}.bp-grid{display:grid;gap:14px}.bp-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.bp-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.bp-kpi-row{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #edf2f7;padding:8px 0}.bp-kpi-row:last-child{border-bottom:0}.bp-kpi-row span{color:var(--bp-muted)}.bp-kpi-row strong{font-size:20px}.bp-filters{display:grid;grid-template-columns:1fr 180px 150px;gap:10px;align-items:end;margin-bottom:14px}.bp-filters-compact{grid-template-columns:1fr 220px 140px}.bp-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--bp-border);border-radius:14px;overflow:hidden;background:#fff}.bp-table th{background:#f8fafc;text-align:left;font-size:11px;text-transform:uppercase;color:#334155;padding:9px}.bp-table td{border-top:1px solid #e9eef6;padding:10px;vertical-align:top}.bp-table strong{display:block}.bp-table small{display:block;color:var(--bp-muted);margin-top:3px}.bp-click{cursor:pointer}.bp-click:hover{background:#f9fbff}.bp-entity{max-width:1600px}.bp-entity-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:12px}.bp-entity-head h1{font-size:34px;margin:0;line-height:1.05}.bp-entity-head p{font-weight:900;color:#486078}.bp-entity-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);gap:14px;align-items:start}.bp-entity-grid-bottom{grid-template-columns:1fr 1fr}.bp-entity-primary,.bp-entity-side{min-width:0}.bp-section-block{border:1px solid var(--bp-border);border-radius:15px;padding:15px;margin:0 0 14px;background:#fff}.bp-compact-card{box-shadow:none}.bp-card-soft{background:#f8fafc}.bp-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.bp-section-block h2,.bp-section-title h2{font-size:18px;margin:0}.bp-section-block h3{font-size:14px;margin:14px 0 8px;color:#334155}.bp-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:10px}.bp-form-grid-tight{grid-template-columns:repeat(4,minmax(0,1fr))}.bp-form-grid-2col{grid-template-columns:1fr 1fr}.bp-wide{grid-column:1/-1}.bp-form label,.bp-inline-form label{font-weight:800;font-size:13px;color:#1f2a44}.bp-form label input,.bp-form label select,.bp-form label textarea{display:block;width:100%;margin-top:5px;box-sizing:border-box}.bp-form textarea{min-height:72px}.bp-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0 10px}.bp-check-grid-tight{grid-template-columns:repeat(3,minmax(0,1fr))}.bp-check-grid label{border:1px solid var(--bp-border);background:#f8fafc;border-radius:11px;padding:9px 10px;font-weight:900;font-size:13px}.bp-inline-form{display:grid;grid-template-columns:1fr 190px auto;gap:8px;margin-top:12px;align-items:center}.bp-mini-action{margin-top:10px}.bp-details{margin-top:12px}.bp-details summary{cursor:pointer;font-weight:950;color:#a16207;margin-bottom:8px}.bp-mini-list,.bp-doc-list,.bp-service-grid{display:grid;gap:8px}.bp-mini-list a,.bp-doc-list a,.bp-service-card{border:1px solid var(--bp-border);border-radius:13px;padding:12px;background:#f8fafc;text-decoration:none!important;color:var(--bp-text)!important}.bp-mini-list a strong,.bp-doc-list a strong,.bp-service-card strong{display:block}.bp-mini-list a span,.bp-doc-list a span,.bp-service-card span{display:block;color:var(--bp-muted);font-size:12px;margin-top:4px}.bp-service-grid{grid-template-columns:1fr}.bp-service-card b,.bp-pill{display:inline-flex;margin-top:8px;border-radius:999px;padding:6px 10px;background:#fff;border:1px solid var(--bp-border);font-weight:950}.bp-doc-list{grid-template-columns:repeat(2,minmax(0,1fr))}.bp-timeline{display:grid;gap:8px;margin-bottom:14px}.bp-timeline div{border-left:4px solid var(--bp-gold);background:#f8fafc;border-radius:12px;padding:11px 13px}.bp-timeline strong{display:block}.bp-timeline span{color:var(--bp-muted);font-size:12px}.bp-notice{border-radius:14px;padding:12px 15px;margin-bottom:14px;font-weight:900}.bp-notice--success{background:#dcfce7;color:#166534;border:1px solid #86efac}.bp-notice--danger{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.bp-login-wrap{min-height:560px;display:flex;align-items:center;justify-content:center;background:#f5f7fb}.bp-login-card{width:380px;background:#fff;border:1px solid var(--bp-border);border-radius:20px;padding:32px;box-shadow:var(--bp-shadow)}.bp-login-card span{color:var(--bp-gold);font-weight:950;letter-spacing:.15em}.bp-login-card h1{margin:12px 0 8px}.bp-login-card p{color:var(--bp-muted)}.bp-login-card input[type=text],.bp-login-card input[type=password]{width:100%;box-sizing:border-box;border:1px solid var(--bp-border);border-radius:12px;padding:12px}.bp-login-card input[type=submit]{width:100%;border:0;border-radius:12px;padding:12px;background:var(--bp-dark);color:#fff;font-weight:950}.bp-public-card{max-width:700px;margin:80px auto;background:#fff;border:1px solid var(--bp-border);border-radius:18px;padding:30px}
@media(max-width:1300px){.bp-entity-grid,.bp-entity-grid-bottom{grid-template-columns:1fr}.bp-form-grid,.bp-form-grid-tight{grid-template-columns:repeat(2,minmax(0,1fr))}.bp-check-grid-tight{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.bp-erp{grid-template-columns:1fr}.bp-sidebar{position:relative;min-height:auto}.bp-form-grid,.bp-check-grid,.bp-grid-3,.bp-grid-2,.bp-service-grid,.bp-doc-list,.bp-form-grid-tight,.bp-form-grid-2col{grid-template-columns:1fr}.bp-filters,.bp-filters-compact,.bp-inline-form{grid-template-columns:1fr}.bp-global-search{justify-content:flex-start}.bp-global-search input{width:100%}.bp-page-head,.bp-entity-head{flex-direction:column}.bp-page-head h1,.bp-entity-head h1{font-size:32px}}
.bp-focus-flash{outline:3px solid rgba(214,155,30,.35);box-shadow:0 0 0 6px rgba(214,155,30,.12)!important;transition:box-shadow .25s ease, outline .25s ease}


/* V6.2 - modo ERP compacto */
body.brokerty-panel-page,
body.brokerty-panel-page * { box-sizing: border-box; }
body.brokerty-panel-page { font-size: 13px !important; line-height: 1.35; }
body.brokerty-panel-page .bp-erp {
  grid-template-columns: 220px minmax(0,1fr) !important;
  min-height: 100vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  font-size: 13px !important;
}
body.brokerty-panel-page .bp-sidebar {
  padding: 18px 14px !important;
  gap: 14px !important;
  min-height: 100vh !important;
}
body.brokerty-panel-page .bp-logo { font-size: 15px !important; margin:0 !important; }
body.brokerty-panel-page .bp-logo span { font-size: 9px !important; }
body.brokerty-panel-page .bp-side-link,
body.brokerty-panel-page .bp-logout,
body.brokerty-panel-page .bp-menu a {
  border-radius: 9px !important;
  padding: 9px 10px !important;
  font-size: 13px !important;
}
body.brokerty-panel-page .bp-menu { gap: 5px !important; }
body.brokerty-panel-page .bp-menu span { font-size: 9px !important; margin: 4px 0 4px !important; }
body.brokerty-panel-page .bp-sidebar-note { padding: 11px !important; border-radius: 11px !important; }
body.brokerty-panel-page .bp-sidebar-note strong { font-size: 14px !important; }
body.brokerty-panel-page .bp-sidebar-note p { font-size: 11px !important; }
body.brokerty-panel-page .bp-session { padding: 10px !important; border-radius: 11px !important; }
body.brokerty-panel-page .bp-main {
  padding: 16px 18px !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}
body.brokerty-panel-page .bp-global-search {
  margin: 0 0 12px !important;
  gap: 8px !important;
  align-items: flex-end !important;
}
body.brokerty-panel-page .bp-global-search label { width: min(360px, 100%) !important; }
body.brokerty-panel-page .bp-global-search input { width: 100% !important; height: 36px !important; }
body.brokerty-panel-page .bp-global-search button { height: 36px !important; padding: 0 14px !important; }
body.brokerty-panel-page .bp-global-search span,
body.brokerty-panel-page .bp-filters span { font-size: 9px !important; margin-bottom: 3px !important; }
body.brokerty-panel-page .bp-card,
body.brokerty-panel-page .bp-section-block {
  padding: 12px !important;
  margin-bottom: 10px !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.045) !important;
}
body.brokerty-panel-page .bp-page-head { padding: 14px !important; }
body.brokerty-panel-page .bp-page-head h1,
body.brokerty-panel-page .bp-entity-head h1 {
  font-size: 24px !important;
  line-height: 1.05 !important;
  margin: 0 0 3px !important;
  letter-spacing: -.02em !important;
}
body.brokerty-panel-page .bp-page-head p,
body.brokerty-panel-page .bp-entity-head p { font-size: 12px !important; }
body.brokerty-panel-page .bp-entity { max-width: none !important; }
body.brokerty-panel-page .bp-entity-head {
  margin-bottom: 8px !important;
  align-items: center !important;
}
body.brokerty-panel-page .bp-entity-head > div:first-child { min-width:0 !important; }
body.brokerty-panel-page .bp-entity-head h1 {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}
body.brokerty-panel-page .bp-entity-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr) !important;
  gap: 10px !important;
}
body.brokerty-panel-page .bp-entity-grid-bottom {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  gap: 10px !important;
}
body.brokerty-panel-page .bp-section-block h2,
body.brokerty-panel-page .bp-section-title h2 { font-size: 14px !important; }
body.brokerty-panel-page .bp-section-block h3 { font-size: 12px !important; margin: 8px 0 5px !important; }
body.brokerty-panel-page .bp-form-grid,
body.brokerty-panel-page .bp-form-grid-tight {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 7px !important;
  margin-bottom: 7px !important;
}
body.brokerty-panel-page .bp-form-grid-2col { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
body.brokerty-panel-page .bp-form label,
body.brokerty-panel-page .bp-inline-form label { font-size: 11px !important; }
body.brokerty-panel-page .bp-global-search input,
body.brokerty-panel-page .bp-global-search button,
body.brokerty-panel-page .bp-filters input,
body.brokerty-panel-page .bp-filters select,
body.brokerty-panel-page .bp-filters button,
body.brokerty-panel-page .bp-form input,
body.brokerty-panel-page .bp-form select,
body.brokerty-panel-page .bp-form textarea,
body.brokerty-panel-page .bp-inline-form input,
body.brokerty-panel-page .bp-inline-form select {
  font-size: 12px !important;
  padding: 7px 9px !important;
  min-height: 34px !important;
  border-radius: 8px !important;
  max-width: 100% !important;
}
body.brokerty-panel-page .bp-form textarea { min-height: 54px !important; }
body.brokerty-panel-page .bp-btn,
body.brokerty-panel-page .bp-filters button {
  min-height: 34px !important;
  padding: 7px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}
body.brokerty-panel-page .bp-check-grid,
body.brokerty-panel-page .bp-check-grid-tight {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 6px !important;
}
body.brokerty-panel-page .bp-check-grid label {
  padding: 7px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 34px !important;
}
body.brokerty-panel-page .bp-check-grid input { width: 13px !important; height: 13px !important; }
body.brokerty-panel-page .bp-inline-form {
  grid-template-columns: minmax(0,1fr) minmax(115px,155px) auto !important;
  gap: 6px !important;
  margin-top: 8px !important;
}
body.brokerty-panel-page .bp-entity-side .bp-inline-form {
  grid-template-columns: minmax(0,1fr) minmax(100px,135px) !important;
}
body.brokerty-panel-page .bp-entity-side .bp-inline-form .bp-btn,
body.brokerty-panel-page .bp-entity-side .bp-inline-form button {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}
body.brokerty-panel-page .bp-mini-list,
body.brokerty-panel-page .bp-doc-list,
body.brokerty-panel-page .bp-service-grid { gap: 6px !important; }
body.brokerty-panel-page .bp-mini-list a,
body.brokerty-panel-page .bp-doc-list a,
body.brokerty-panel-page .bp-service-card {
  padding: 8px !important;
  border-radius: 9px !important;
  overflow-wrap: anywhere !important;
}
body.brokerty-panel-page .bp-mini-list a span,
body.brokerty-panel-page .bp-doc-list a span,
body.brokerty-panel-page .bp-service-card span { font-size: 11px !important; }
body.brokerty-panel-page .bp-table th { font-size: 9px !important; padding: 6px 7px !important; }
body.brokerty-panel-page .bp-table td { padding: 7px !important; font-size: 12px !important; }
body.brokerty-panel-page .bp-table small { font-size: 10px !important; }
body.brokerty-panel-page .bp-kpi-row { padding: 5px 0 !important; }
body.brokerty-panel-page .bp-kpi-row strong { font-size: 16px !important; }
body.brokerty-panel-page .bp-pill,
body.brokerty-panel-page .bp-service-card b { padding: 4px 7px !important; font-size: 11px !important; }
body.brokerty-panel-page .bp-timeline div { padding: 8px 10px !important; border-radius: 9px !important; }
body.brokerty-panel-page .bp-details summary { font-size: 12px !important; margin-bottom: 6px !important; }
body.brokerty-panel-page .bp-notice { padding: 9px 11px !important; border-radius: 10px !important; font-size: 12px !important; }
@media(max-width:1200px){
  body.brokerty-panel-page .bp-entity-grid,
  body.brokerty-panel-page .bp-entity-grid-bottom { grid-template-columns: 1fr !important; }
  body.brokerty-panel-page .bp-form-grid,
  body.brokerty-panel-page .bp-form-grid-tight { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media(max-width:900px){
  body.brokerty-panel-page .bp-erp{ grid-template-columns:1fr !important; }
  body.brokerty-panel-page .bp-sidebar{ position:relative !important; min-height:auto !important; }
  body.brokerty-panel-page .bp-form-grid,
  body.brokerty-panel-page .bp-form-grid-tight,
  body.brokerty-panel-page .bp-check-grid,
  body.brokerty-panel-page .bp-check-grid-tight,
  body.brokerty-panel-page .bp-grid-3,
  body.brokerty-panel-page .bp-grid-2,
  body.brokerty-panel-page .bp-doc-list,
  body.brokerty-panel-page .bp-inline-form,
  body.brokerty-panel-page .bp-filters,
  body.brokerty-panel-page .bp-filters-compact { grid-template-columns:1fr !important; }
}

/* V6.3 - ERP real: panel aislado, compacto y sin desbordes */
html body.brokerty-panel-page,
html body.brokerty-panel-page.admin-bar {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #f3f6fb !important;
}
html body.brokerty-panel-page #wpadminbar { display: none !important; }
html body.brokerty-panel-page .bp-erp,
html body.brokerty-panel-page .bp-login-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr) !important;
  overflow: hidden !important;
  background: #f3f6fb !important;
}
html body.brokerty-panel-page .bp-login-wrap {
  display: flex !important;
}
html body.brokerty-panel-page .bp-sidebar {
  width: 210px !important;
  min-width: 210px !important;
  max-width: 210px !important;
  height: 100vh !important;
  min-height: 100vh !important;
  position: relative !important;
  top: auto !important;
  overflow-y: auto !important;
  padding: 18px 14px !important;
}
html body.brokerty-panel-page .bp-main {
  min-width: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 14px 18px !important;
}
html body.brokerty-panel-page .bp-global-search {
  justify-content: flex-end !important;
  margin: 0 0 10px !important;
}
html body.brokerty-panel-page .bp-global-search label { width: min(330px, 100%) !important; }
html body.brokerty-panel-page .bp-card,
html body.brokerty-panel-page .bp-entity {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
html body.brokerty-panel-page .bp-entity-grid {
  grid-template-columns: minmax(0, 1fr) 330px !important;
  gap: 10px !important;
  align-items: start !important;
}
html body.brokerty-panel-page .bp-entity-side { min-width: 0 !important; max-width: 330px !important; }
html body.brokerty-panel-page .bp-entity-grid-single { grid-template-columns: 1fr !important; }
html body.brokerty-panel-page .bp-entity-head h1 {
  font-size: 22px !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  word-break: break-word !important;
}
html body.brokerty-panel-page .bp-entity-head p { font-size: 11px !important; }
html body.brokerty-panel-page .bp-section-title { margin-bottom: 8px !important; }
html body.brokerty-panel-page .bp-section-title h2 { font-size: 13px !important; }
html body.brokerty-panel-page .bp-section-block { padding: 10px !important; }
html body.brokerty-panel-page .bp-form-grid,
html body.brokerty-panel-page .bp-form-grid-tight {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 6px !important;
}
html body.brokerty-panel-page .bp-check-grid,
html body.brokerty-panel-page .bp-check-grid-tight {
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 6px !important;
}
html body.brokerty-panel-page .bp-form-grid-2col { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
html body.brokerty-panel-page .bp-form input,
html body.brokerty-panel-page .bp-form select,
html body.brokerty-panel-page .bp-form textarea,
html body.brokerty-panel-page .bp-inline-form input,
html body.brokerty-panel-page .bp-inline-form select,
html body.brokerty-panel-page .bp-global-search input {
  min-height: 30px !important;
  height: auto !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
}
html body.brokerty-panel-page .bp-form label,
html body.brokerty-panel-page .bp-inline-form label {
  font-size: 10px !important;
  line-height: 1.2 !important;
}
html body.brokerty-panel-page .bp-form textarea { min-height: 46px !important; }
html body.brokerty-panel-page .bp-btn,
html body.brokerty-panel-page .bp-global-search button,
html body.brokerty-panel-page .bp-filters button {
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
}
html body.brokerty-panel-page .bp-check-grid label {
  min-height: 31px !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
}
html body.brokerty-panel-page .bp-inline-form {
  grid-template-columns: minmax(0,1fr) minmax(92px,120px) !important;
  gap: 6px !important;
}
html body.brokerty-panel-page .bp-inline-form .bp-btn,
html body.brokerty-panel-page .bp-inline-form button { grid-column: 1 / -1 !important; width: 100% !important; }
html body.brokerty-panel-page .bp-doc-list { grid-template-columns: 1fr !important; }
html body.brokerty-panel-page .bp-mini-list a,
html body.brokerty-panel-page .bp-doc-list a,
html body.brokerty-panel-page .bp-service-card { padding: 7px 8px !important; }
html body.brokerty-panel-page .bp-mini-list a strong,
html body.brokerty-panel-page .bp-doc-list a strong,
html body.brokerty-panel-page .bp-service-card strong { font-size: 12px !important; }
html body.brokerty-panel-page .bp-mini-list a span,
html body.brokerty-panel-page .bp-doc-list a span,
html body.brokerty-panel-page .bp-service-card span { font-size: 10px !important; }
html body.brokerty-panel-page .bp-details summary { font-size: 11px !important; }
@media(max-width: 1180px){
  html body.brokerty-panel-page .bp-entity-grid { grid-template-columns: 1fr !important; }
  html body.brokerty-panel-page .bp-entity-side { max-width: none !important; }
  html body.brokerty-panel-page .bp-form-grid,
  html body.brokerty-panel-page .bp-form-grid-tight { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}


/* V6.3.2 - fuerza ERP aislado, columna derecha más amplia y sin bloque Estatik */
html.brokerty-panel-live body {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #f3f6fb !important;
}
html.brokerty-panel-live .masthead,
html.brokerty-panel-live .mobile-header-bar,
html.brokerty-panel-live .dt-mobile-header,
html.brokerty-panel-live .top-bar,
html.brokerty-panel-live .top-header,
html.brokerty-panel-live .header-bar,
html.brokerty-panel-live header.header,
html.brokerty-panel-live header.site-header,
html.brokerty-panel-live #header,
html.brokerty-panel-live #phantom,
html.brokerty-panel-live .page-title,
html.brokerty-panel-live .breadcrumbs,
html.brokerty-panel-live footer,
html.brokerty-panel-live #footer,
html.brokerty-panel-live .footer,
html.brokerty-panel-live .footer-overlap,
html.brokerty-panel-live .bottom-text-block,
html.brokerty-panel-live .wf-wrap.footer,
html.brokerty-panel-live .wf-container-footer,
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  overflow:hidden !important;
  visibility:hidden !important;
}
html body.brokerty-panel-page .bp-erp {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  display: grid !important;
  grid-template-columns: 210px minmax(0,1fr) !important;
  overflow: hidden !important;
  background: #f3f6fb !important;
}
html body.brokerty-panel-page .bp-main {
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
html body.brokerty-panel-page .bp-entity-grid {
  grid-template-columns: minmax(0, 1fr) 430px !important;
  gap: 12px !important;
}
html body.brokerty-panel-page .bp-entity-side {
  width: 430px !important;
  min-width: 0 !important;
  max-width: 430px !important;
}
html body.brokerty-panel-page .bp-entity-primary {
  min-width: 0 !important;
}
html body.brokerty-panel-page .bp-entity-head h1 {
  font-size: 21px !important;
  max-width: 100% !important;
}
html body.brokerty-panel-page .bp-global-search {
  padding-right: 0 !important;
}
html body.brokerty-panel-page .bp-global-search label { width: 330px !important; }
html body.brokerty-panel-page .bp-form-grid,
html body.brokerty-panel-page .bp-form-grid-tight {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
}
html body.brokerty-panel-page .bp-check-grid,
html body.brokerty-panel-page .bp-check-grid-tight {
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
}
html body.brokerty-panel-page .bp-entity-side .bp-inline-form {
  grid-template-columns: minmax(0,1fr) 128px !important;
}
html body.brokerty-panel-page .bp-entity-side .bp-inline-form button,
html body.brokerty-panel-page .bp-entity-side .bp-inline-form .bp-btn {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}
html body.brokerty-panel-page .bp-section-block#estatik { display:none !important; }
@media(max-width: 1320px){
  html body.brokerty-panel-page .bp-entity-grid { grid-template-columns: 1fr !important; }
  html body.brokerty-panel-page .bp-entity-side { width: auto !important; max-width: none !important; }
}

.bp-ref-col { width: 118px; }
.bp-ref-cell strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f7;
    border: 1px solid #d8e0ec;
    color: #13213a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
}


/* V6.3.5 - edición de relaciones/servicios/documentos/CRM y filtros ampliados */
.bp-filters-rich {
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(150px, 1fr)) 110px !important;
  align-items: end;
}
.bp-mini-row,
.bp-doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 6px;
}
.bp-mini-row > a,
.bp-doc-row > a {
  min-width: 0;
  text-decoration: none !important;
  color: inherit !important;
}
.bp-mini-row strong,
.bp-doc-row strong {
  display:block;
  font-size: 12px;
  line-height: 1.2;
}
.bp-mini-row span,
.bp-doc-row span {
  display:block;
  font-size: 11px;
  color:#64748b;
  margin-top:3px;
}
.bp-mini-row details,
.bp-doc-row details,
.bp-service-card details,
.bp-timeline details {
  font-size: 11px;
  color:#9a5a00;
}
.bp-mini-row summary,
.bp-doc-row summary,
.bp-service-card summary,
.bp-timeline summary {
  cursor:pointer;
  font-weight:900;
  white-space:nowrap;
}
.bp-edit-inline,
.bp-edit-form {
  display:grid;
  gap:6px;
  margin-top:8px;
  min-width: 210px;
}
.bp-edit-inline input,
.bp-edit-inline select,
.bp-edit-inline textarea,
.bp-edit-form input,
.bp-edit-form select,
.bp-edit-form textarea {
  min-height: 30px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
}
.bp-btn-mini {
  border:0;
  border-radius:8px;
  background:#0f172a;
  color:#fff;
  font-weight:900;
  min-height:30px;
  padding:6px 10px;
  cursor:pointer;
}
.bp-link-danger {
  border:0;
  background:transparent;
  color:#b91c1c;
  font-weight:900;
  cursor:pointer;
  padding:4px 0;
  text-align:left;
}
.bp-service-card {
  overflow:hidden;
}
.bp-service-card .bp-edit-form {
  grid-template-columns: 1fr 1fr;
}
.bp-service-card .bp-edit-form textarea,
.bp-service-card .bp-edit-form button,
.bp-service-card .bp-edit-form .bp-link-danger {
  grid-column:1 / -1;
}
.bp-timeline > div {
  position:relative;
}
.bp-timeline details { margin-top:6px; }
body.brokerty-panel-page .masthead,
body.brokerty-panel-page .mixed-header,
body.brokerty-panel-page .classic-header,
body.brokerty-panel-page .branding,
body.brokerty-panel-page .main-nav,
body.brokerty-panel-page .mini-widgets,
body.brokerty-panel-page .mobile-mini-widgets,
body.brokerty-panel-page .dt-mobile-menu,
body.brokerty-panel-page .header-space,
body.brokerty-panel-page .page-header,
html.brokerty-panel-live .masthead,
html.brokerty-panel-live .mixed-header,
html.brokerty-panel-live .classic-header,
html.brokerty-panel-live .branding,
html.brokerty-panel-live .main-nav,
html.brokerty-panel-live .mini-widgets,
html.brokerty-panel-live .mobile-mini-widgets,
html.brokerty-panel-live .dt-mobile-menu,
html.brokerty-panel-live .header-space,
html.brokerty-panel-live .page-header {
  display:none !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  overflow:hidden !important;
  visibility:hidden !important;
}
@media(max-width: 1500px){
  .bp-filters-rich { grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 1fr)) 100px !important; }
}
@media(max-width: 1050px){
  .bp-filters-rich { grid-template-columns: 1fr 1fr !important; }
}


/* V6.3.6 - layout ERP: datos en 3 columnas y lateral de trabajo más ancho */
html body.brokerty-panel-page .bp-entity-grid,
html body.brokerty-panel-page .bp-entity-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(560px, 0.72fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

html body.brokerty-panel-page .bp-entity-side,
html body.brokerty-panel-page .bp-entity-side {
  width: auto !important;
  min-width: 560px !important;
  max-width: none !important;
}

html body.brokerty-panel-page .bp-entity-primary,
html body.brokerty-panel-page .bp-entity-primary {
  min-width: 0 !important;
}

html body.brokerty-panel-page .bp-form-grid,
html body.brokerty-panel-page .bp-form-grid-tight,
html body.brokerty-panel-page .bp-form-grid,
html body.brokerty-panel-page .bp-form-grid-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

html body.brokerty-panel-page .bp-check-grid,
html body.brokerty-panel-page .bp-check-grid-tight,
html body.brokerty-panel-page .bp-check-grid,
html body.brokerty-panel-page .bp-check-grid-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html body.brokerty-panel-page .bp-side-panel-wide,
html body.brokerty-panel-page .bp-side-panel-wide {
  width: 100% !important;
}

html body.brokerty-panel-page .bp-mini-list,
html body.brokerty-panel-page .bp-doc-list,
html body.brokerty-panel-page .bp-service-grid,
html body.brokerty-panel-page .bp-mini-list,
html body.brokerty-panel-page .bp-doc-list,
html body.brokerty-panel-page .bp-service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body.brokerty-panel-page .bp-entity-side .bp-inline-form,
html body.brokerty-panel-page .bp-entity-side .bp-inline-form {
  grid-template-columns: minmax(0, 1fr) 150px auto !important;
  align-items: end !important;
}

html body.brokerty-panel-page .bp-entity-side .bp-inline-form button,
html body.brokerty-panel-page .bp-entity-side .bp-inline-form .bp-btn,
html body.brokerty-panel-page .bp-entity-side .bp-inline-form button,
html body.brokerty-panel-page .bp-entity-side .bp-inline-form .bp-btn {
  grid-column: auto !important;
  width: auto !important;
  white-space: nowrap !important;
}

html body.brokerty-panel-page .bp-entity-side .bp-section-block,
html body.brokerty-panel-page .bp-entity-side .bp-section-block {
  overflow: hidden !important;
}

html body.brokerty-panel-page .bp-section-block h2,
html body.brokerty-panel-page .bp-section-title h2,
html body.brokerty-panel-page .bp-section-block h2,
html body.brokerty-panel-page .bp-section-title h2 {
  font-size: 12px !important;
}

@media(max-width: 1500px){
  html body.brokerty-panel-page .bp-entity-grid,
  html body.brokerty-panel-page .bp-entity-grid {
    grid-template-columns: minmax(0, 1fr) minmax(500px, .62fr) !important;
  }
  html body.brokerty-panel-page .bp-entity-side,
  html body.brokerty-panel-page .bp-entity-side { min-width: 500px !important; }
}

@media(max-width: 1260px){
  html body.brokerty-panel-page .bp-entity-grid,
  html body.brokerty-panel-page .bp-entity-grid { grid-template-columns: 1fr !important; }
  html body.brokerty-panel-page .bp-entity-side,
  html body.brokerty-panel-page .bp-entity-side { min-width: 0 !important; }
  html body.brokerty-panel-page .bp-mini-list,
  html body.brokerty-panel-page .bp-doc-list,
  html body.brokerty-panel-page .bp-service-grid,
  html body.brokerty-panel-page .bp-mini-list,
  html body.brokerty-panel-page .bp-doc-list,
  html body.brokerty-panel-page .bp-service-grid { grid-template-columns: 1fr !important; }
  html body.brokerty-panel-page .bp-form-grid,
  html body.brokerty-panel-page .bp-form-grid-tight,
  html body.brokerty-panel-page .bp-form-grid,
  html body.brokerty-panel-page .bp-form-grid-tight { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media(max-width: 900px){
  html body.brokerty-panel-page .bp-form-grid,
  html body.brokerty-panel-page .bp-form-grid-tight,
  html body.brokerty-panel-page .bp-form-grid,
  html body.brokerty-panel-page .bp-form-grid-tight,
  html body.brokerty-panel-page .bp-entity-side .bp-inline-form,
  html body.brokerty-panel-page .bp-entity-side .bp-inline-form { grid-template-columns: 1fr !important; }
}

/* V6.3.9 - acciones de eliminación y cabecera de ficha */
.bp-entity-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.bp-delete-entity-form { margin:0; }
.bp-entity-delete-link {
  font-size:12px !important;
  padding:6px 8px !important;
  line-height:1 !important;
  opacity:.9;
}
.bp-entity-delete-link:hover { opacity:1; text-decoration:underline; }
