}
#record-modal.client-mode .record-back-list svg,
#record-modal.provider-mode .record-back-list svg,
#record-modal.provider-mode .record-back-list svg{
  width:17px!important;
  height:17px!important;
}
#record-modal.client-mode .record-back-list:hover,
#record-modal.provider-mode .record-back-list:hover,
#record-modal.provider-mode .record-back-list:hover{
  color:#075fb8!important;
  background:#eaf3fd!important;
  border-color:#7eafe4!important;
  border-radius:4px!important;
  text-decoration:none!important;
}
#record-modal.client-mode .record-dialog-head small,
#record-modal.provider-mode .record-dialog-head small,
#record-modal.provider-mode .record-dialog-head small{
  display:block!important;
  margin:0 0 3px!important;
  color:#0878ec!important;
  font:800 10px/1 "Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  letter-spacing:.04em!important;
}
#record-modal.client-mode .record-dialog-head small:empty,
#record-modal.provider-mode .record-dialog-head small:empty,
#record-modal.provider-mode .record-dialog-head small:empty{display:none!important}
#record-modal.client-mode .record-dialog-head h2,
#record-modal.provider-mode .record-dialog-head h2,
#record-modal.provider-mode .record-dialog-head h2{
  margin:0!important;
  color:#0b2d5c!important;
  font:700 23px/1.1 "Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  white-space:nowrap!important;
}
#record-modal.client-mode .record-head-actions,
#record-modal.provider-mode .record-head-actions,
#record-modal.provider-mode .record-head-actions{
  gap:8px!important;
}
#record-modal.client-mode .record-head-actions>.btn,
#record-modal.provider-mode .record-head-actions>.btn,
#record-modal.provider-mode .record-head-actions>.btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  height:38px!important;
  min-width:132px!important;
  padding:0 16px!important;
  border-radius:4px!important;
  box-shadow:none!important;
  font:700 11.5px/1 "Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  letter-spacing:.01em!important;
  cursor:pointer!important;
}
#record-modal.client-mode #record-head-cancel,
#record-modal.provider-mode #record-head-cancel,
#record-modal.provider-mode #record-head-cancel{
  border:1px solid #a9c9ed!important;
  background:#f4f8fd!important;
  color:#0b5db7!important;
}
#record-modal.client-mode #record-head-cancel:hover,
#record-modal.provider-mode #record-head-cancel:hover,
#record-modal.provider-mode #record-head-cancel:hover{
  background:#eaf3fd!important;
  border-color:#7eafe4!important;
}
#record-modal.client-mode #record-head-save:not(.is-dirty),
#record-modal.provider-mode #record-head-save:not(.is-dirty),
#record-modal.provider-mode #record-head-save:not(.is-dirty){
  border:1px solid #76c997!important;
  background:#effbf4!important;
  color:#098644!important;
}
#record-modal.client-mode #record-head-save:hover:not(.is-dirty),
#record-modal.provider-mode #record-head-save:hover:not(.is-dirty),
#record-modal.provider-mode #record-head-save:hover:not(.is-dirty){
  background:#e2f7eb!important;
  border-color:#55b77a!important;
}
#record-modal.client-mode .record-head-actions>.btn svg,
#record-modal.provider-mode .record-head-actions>.btn svg,
#record-modal.provider-mode .record-head-actions>.btn svg{
  width:16px!important;
  height:16px!important;
}
#record-modal.client-mode #record-close,
#record-modal.provider-mode #record-close,
#record-modal.provider-mode #record-close{
  display:none!important;
}

/* Menú horizontal de la ficha de cliente = jerarquía visual Base Industrial */
#record-modal.client-mode .client-tabs,
#record-modal.provider-mode .client-tabs,
#record-modal.budget-mode .client-tabs{
  display:flex!important;
  grid-template-columns:none!important;
  align-items:stretch!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
  gap:0!important;
  min-height:76px!important;
  margin:8px 12px 10px!important;
  padding:0!important;
  border:1px solid #d9e5f2!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(21,58,99,.04)!important;
}
#record-modal.client-mode .client-tab,
#record-modal.provider-mode .client-tab,
#record-modal.budget-mode .client-tab{
  --client-accent:#1776ee;
  flex:1 0 102px!important;
  min-width:102px!important;
  min-height:74px!important;
  padding:8px 7px 7px!important;
  border:0!important;
  border-right:1px solid #e6eef7!important;
  border-bottom:0!important;
  position:relative!important;
  background:#fff!important;
  color:#25486f!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  cursor:pointer!important;
  font-family:"Segoe UI",Arial,sans-serif!important;
  transition:background .16s ease,box-shadow .16s ease!important;
}
#record-modal.client-mode .client-tab:last-child,
#record-modal.provider-mode .client-tab:last-child,
#record-modal.budget-mode .client-tab:last-child{border-right:0!important}
#record-modal.client-mode .client-tab:nth-child(2),
#record-modal.provider-mode .client-tab:nth-child(2),
#record-modal.budget-mode .client-tab:nth-child(2){--client-accent:#10a957}
#record-modal.client-mode .client-tab:nth-child(3),
#record-modal.provider-mode .client-tab:nth-child(3),
#record-modal.budget-mode .client-tab:nth-child(3){--client-accent:#7546ef}
#record-modal.client-mode .client-tab:nth-child(4),
#record-modal.provider-mode .client-tab:nth-child(4),
#record-modal.budget-mode .client-tab:nth-child(4){--client-accent:#10a957}
#record-modal.client-mode .client-tab:nth-child(5),
#record-modal.provider-mode .client-tab:nth-child(5),
#record-modal.budget-mode .client-tab:nth-child(5){--client-accent:#1677ee}
#record-modal.client-mode .client-tab:nth-child(6),
#record-modal.provider-mode .client-tab:nth-child(6),
#record-modal.budget-mode .client-tab:nth-child(6){--client-accent:#123b73}
#record-modal.client-mode .client-tab:nth-child(7),
#record-modal.provider-mode .client-tab:nth-child(7),
#record-modal.budget-mode .client-tab:nth-child(7){--client-accent:#7137ef}
#record-modal.client-mode .client-tab:nth-child(8),
#record-modal.provider-mode .client-tab:nth-child(8),
#record-modal.provider-mode .client-tab:nth-child(8){--client-accent:#f28a0b}
#record-modal.client-mode .client-tab:nth-child(9),
#record-modal.provider-mode .client-tab:nth-child(9),
#record-modal.provider-mode .client-tab:nth-child(9){--client-accent:#10a957}
#record-modal.client-mode .client-tab:nth-child(10),
#record-modal.provider-mode .client-tab:nth-child(10),
#record-modal.provider-mode .client-tab:nth-child(10){--client-accent:#7546ef}
#record-modal.client-mode .client-tab:nth-child(11),
#record-modal.provider-mode .client-tab:nth-child(11),
#record-modal.provider-mode .client-tab:nth-child(11){--client-accent:#06a6b8}
#record-modal.client-mode .client-tab:hover,
#record-modal.provider-mode .client-tab:hover,
#record-modal.budget-mode .client-tab:hover{
  background:color-mix(in srgb,var(--client-accent) 7%,white)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--client-accent) 18%,transparent)!important;
}
#record-modal.client-mode .client-tab.active,
#record-modal.provider-mode .client-tab.active,
#record-modal.budget-mode .client-tab.active{
  background:color-mix(in srgb,var(--client-accent) 10%,white)!important;
  box-shadow:inset 0 -4px var(--client-accent)!important;
  color:#143b68!important;
}
#record-modal.client-mode .client-tab b,
#record-modal.provider-mode .client-tab b,
#record-modal.budget-mode .client-tab b{
  width:31px!important;
  height:31px!important;
  margin:0 auto 2px!important;
  display:grid!important;
  place-items:center!important;
  color:var(--client-accent)!important;
  font-size:0!important;
}
#record-modal.client-mode .client-tab b svg,
#record-modal.provider-mode .client-tab b svg,
#record-modal.budget-mode .client-tab b svg{
  width:29px!important;
  height:29px!important;
  display:block!important;
}
#record-modal.client-mode .client-tab span,
#record-modal.provider-mode .client-tab span,
#record-modal.budget-mode .client-tab span{
  display:block!important;
  color:#173d6b!important;
  font-size:10.5px!important;
  line-height:1.1!important;
  font-weight:700!important;
  letter-spacing:.01em!important;
  white-space:normal!important;
  text-align:center!important;
}
#record-modal.client-mode .client-tab.active span,
#record-modal.provider-mode .client-tab.active span,
#record-modal.budget-mode .client-tab.active span{
  color:var(--client-accent)!important;
}
@media(max-width:1400px){
#record-modal.client-mode .client-tab,
#record-modal.provider-mode .client-tab,
#record-modal.budget-mode .client-tab{
    flex:0 0 106px!important;
    min-width:106px!important;
  }
}

/* 4.16.512 · Clientes Online · Direcciones y estados vacíos WFERP */
#record-modal.client-mode .client-address-grid,
#record-modal.provider-mode .client-address-grid,
#record-modal.provider-mode .client-address-grid{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:10px 12px!important;
  align-items:end!important;
}
#record-modal.client-mode .client-address-grid [data-client-field="direccion"],
#record-modal.provider-mode .client-address-grid [data-client-field="direccion"],
#record-modal.provider-mode .client-address-grid [data-client-field="direccion"]{grid-column:span 4!important}
#record-modal.client-mode .client-address-grid [data-client-field="provincia"],
#record-modal.provider-mode .client-address-grid [data-client-field="provincia"],
#record-modal.provider-mode .client-address-grid [data-client-field="provincia"]{grid-column:span 2!important}
#record-modal.client-mode .client-address-grid [data-client-field="poblacion"],
#record-modal.provider-mode .client-address-grid [data-client-field="poblacion"],
#record-modal.provider-mode .client-address-grid [data-client-field="poblacion"]{grid-column:span 2!important}
#record-modal.client-mode .client-address-grid [data-client-field="codigo_postal"],
#record-modal.provider-mode .client-address-grid [data-client-field="codigo_postal"],
#record-modal.provider-mode .client-address-grid [data-client-field="codigo_postal"]{grid-column:span 2!important}
#record-modal.client-mode .client-address-grid [data-client-field="pais"],
#record-modal.provider-mode .client-address-grid [data-client-field="pais"],
#record-modal.provider-mode .client-address-grid [data-client-field="pais"]{grid-column:span 3!important}
#record-modal.client-mode .client-address-grid .field-group,
#record-modal.provider-mode .client-address-grid .field-group,
#record-modal.provider-mode .client-address-grid .field-group{min-width:0!important}
#record-modal.client-mode .client-address-grid .field-group label,
#record-modal.provider-mode .client-address-grid .field-group label,
#record-modal.provider-mode .client-address-grid .field-group label{
  display:block!important;margin:0 0 5px!important;color:#405a7a!important;
  font:400 12px "Segoe UI",Arial,sans-serif!important;letter-spacing:.01em!important
}
#record-modal.client-mode .client-address-grid input,
#record-modal.provider-mode .client-address-grid input,
#record-modal.client-mode .client-address-grid select,
#record-modal.provider-mode .client-address-grid select,
#record-modal.provider-mode .client-address-grid select{
  width:100%!important;height:40px!important;min-height:40px!important;box-sizing:border-box!important;
  border:1px solid #bdd3ea!important;border-radius:4px!important;background-color:#fff!important;
  color:#173b69!important;font:600 13px "Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  padding:0 34px 0 10px!important;outline:none!important;box-shadow:none!important
}
#record-modal.client-mode .client-address-grid select,
#record-modal.provider-mode .client-address-grid select,
#record-modal.provider-mode .client-address-grid select{
  appearance:none!important;-webkit-appearance:none!important;
  background-image:linear-gradient(45deg,transparent 50%,#274f7c 50%),linear-gradient(135deg,#274f7c 50%,transparent 50%),linear-gradient(to right,#eef5fc,#eef5fc)!important;
  background-position:calc(100% - 15px) 14px,calc(100% - 10px) 14px,100% 0!important;
  background-size:5px 5px,5px 5px,30px 100%!important;background-repeat:no-repeat!important
}
#record-modal.client-mode .client-address-grid select:focus,
#record-modal.provider-mode .client-address-grid select:focus,
#record-modal.client-mode .client-address-grid input:focus,
#record-modal.provider-mode .client-address-grid input:focus,
#record-modal.provider-mode .client-address-grid input:focus{border-color:#2187ef!important;box-shadow:0 0 0 2px rgba(33,135,239,.10)!important}
#record-modal.client-mode .client-address-grid select:disabled,
#record-modal.provider-mode .client-address-grid select:disabled,
#record-modal.provider-mode .client-address-grid select:disabled{background-color:#f4f7fa!important;color:#8495aa!important;cursor:not-allowed!important}
.client-related-empty.wf-empty-cell{padding:0!important;height:210px!important;vertical-align:middle!important;background:#fff!important}
.wf-client-empty-state{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#7186a3;text-align:center;font:400 10px "Segoe UI",Arial,sans-serif}
.wf-client-empty-icon{width:58px;height:48px;color:#6ea4f4;display:block}
@media(max-width:1100px){
#record-modal.client-mode .client-address-grid,
#record-modal.provider-mode .client-address-grid,
#record-modal.provider-mode .client-address-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#record-modal.client-mode .client-address-grid [data-client-field="direccion"],
#record-modal.provider-mode .client-address-grid [data-client-field="direccion"],
#record-modal.provider-mode .client-address-grid [data-client-field="direccion"]{grid-column:span 4!important}
#record-modal.client-mode .client-address-grid [data-client-field="provincia"],
#record-modal.provider-mode .client-address-grid [data-client-field="provincia"],
#record-modal.client-mode .client-address-grid [data-client-field="poblacion"],
#record-modal.provider-mode .client-address-grid [data-client-field="poblacion"],
#record-modal.client-mode .client-address-grid [data-client-field="codigo_postal"],
#record-modal.provider-mode .client-address-grid [data-client-field="codigo_postal"],
#record-modal.client-mode .client-address-grid [data-client-field="pais"],
#record-modal.provider-mode .client-address-grid [data-client-field="pais"],
#record-modal.provider-mode .client-address-grid [data-client-field="pais"]{grid-column:span 2!important}
}


/* 4.16.513 · Dashboard administrador multipágina WFERP */
.dashboard-page-nav{display:flex;gap:8px;margin:0 0 10px;padding:7px;background:#fff;border:1px solid var(--line);border-radius:9px;overflow-x:auto}
.dashboard-page-nav button{border:1px solid #d9e5f1;background:#fff;color:#284563;border-radius:7px;padding:9px 14px;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer}
.dashboard-page-nav button.active{background:#eaf3ff;border-color:#8fbcf5;color:#0b6ef3;font-weight:800}
.dashboard-page{min-height:calc(100vh - 210px)}
.organizer-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:10px}
.organizer-kpi{background:#fff;border:1px solid var(--line);border-radius:9px;padding:11px;display:flex;align-items:center;gap:9px;min-width:0}.organizer-kpi i{width:34px;height:34px;border-radius:50%;background:#1477f2;flex:0 0 auto}.organizer-kpi.orange i{background:#ff9800}.organizer-kpi.green i{background:#0aaf62}.organizer-kpi.red i{background:#ff3048}.organizer-kpi.gray i{background:#7a8797}.organizer-kpi span{display:block;font-size:9px;color:#5c708a}.organizer-kpi b{display:block;font-size:17px;color:#0a2a57;margin-top:2px}
.organizer-layout{display:grid;grid-template-columns:minmax(320px,.78fr) minmax(560px,1.6fr);gap:10px;min-height:calc(100vh - 335px)}
.organizer-clients,.organizer-detail{display:flex;flex-direction:column;min-height:0}.organizer-search{padding:0 12px 9px}.organizer-search input,.organizer-work-toolbar input,.organizer-work-toolbar select{height:34px;border:1px solid #cddbea;border-radius:6px;background:#fff;color:#284563;padding:0 10px;font-size:10px;outline:none}.organizer-search input{width:100%}
.organizer-client-table,.organizer-work-table{overflow:auto;min-height:0}.organizer-client-table{flex:1;padding:0 10px 10px}.organizer-client-table table,.organizer-work-table table{width:100%;border-collapse:collapse;font-size:9px}.organizer-client-table th,.organizer-work-table th{position:sticky;top:0;background:#eef4fa;color:#4e6480;text-align:left;padding:8px 7px;border-bottom:1px solid #d6e2ee;z-index:1}.organizer-client-table td,.organizer-work-table td{padding:8px 7px;border-bottom:1px solid #e5edf5;color:#18395f}.organizer-client-table tr{cursor:pointer}.organizer-client-table tbody tr:hover,.organizer-client-table tbody tr.selected{background:#eaf3ff}.organizer-client-table td:not(:first-child),.organizer-client-table th:not(:first-child){text-align:center}.organizer-client-table .orange{color:#e98a00}.organizer-client-table .blue{color:#1477f2}.organizer-client-table .green{color:#0aaf62}
.organizer-client-head{display:flex;align-items:center;gap:12px;padding:13px 14px 8px}.organizer-client-head>div{flex:1}.organizer-client-head h2{margin:0;color:#092a57;font-size:16px}.organizer-client-head small{color:#71829a;font-size:9px}.organizer-client-head button,.organizer-work-toolbar button{border:1px solid #8fbcf5;background:#f5f9ff;color:#0b6ef3;border-radius:6px;padding:8px 11px;font-size:9px;font-weight:700}.organizer-tabs{display:flex;border-bottom:1px solid #dbe6f2;padding:0 12px}.organizer-tabs button{border:0;background:#fff;color:#536a85;padding:9px 13px;font-size:9px}.organizer-tabs button.active{background:#eaf3ff;color:#0b6ef3;font-weight:800;border-bottom:2px solid #1477f2}.organizer-work-toolbar{display:grid;grid-template-columns:1fr 160px auto;gap:7px;padding:9px 12px}.organizer-work-table{flex:1;padding:0 12px 12px}.organizer-work-table tr[data-org-order]{cursor:pointer}.organizer-work-table tr[data-org-order]:hover{background:#f5f9ff}.organizer-state{display:inline-block;border-radius:999px;padding:3px 7px;font-size:8px;font-weight:700;background:#edf2f7;color:#596b80}.organizer-state.pendiente{background:#fff1d8;color:#ad6900}.organizer-state.en-proceso{background:#e5f1ff;color:#0b6ef3}.organizer-state.en-espera{background:#edf0f4;color:#697687}.organizer-state.finalizado{background:#e5f8ec;color:#0a8c4b}.organizer-state.retrasado{background:#ffe8ec;color:#d92e42}
.dashboard-calendar-full{min-height:calc(100vh - 230px);padding:12px}.calendar-title{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 12px}.calendar-title h2{margin:0;color:#092a57;font-size:16px}.calendar-title p{margin:3px 0 0;color:#71829a;font-size:9px}.calendar-title strong{color:#0b6ef3;text-transform:capitalize}.calendar-week{display:grid;grid-template-columns:repeat(7,1fr);background:#eef4fa;border:1px solid #dbe6f2;border-bottom:0}.calendar-week span{text-align:center;padding:8px;font-size:9px;font-weight:800;color:#526983}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:minmax(105px,1fr);border-left:1px solid #dbe6f2;border-top:1px solid #dbe6f2}.calendar-cell{background:#fff;border-right:1px solid #dbe6f2;border-bottom:1px solid #dbe6f2;padding:6px;min-width:0}.calendar-cell.muted{background:#f8fafc}.calendar-cell.today{background:#f3f8ff;box-shadow:inset 0 0 0 2px #8fbcf5}.calendar-cell>b{display:block;color:#173b68;font-size:10px;margin-bottom:5px}.calendar-cell>span{display:block;background:#eaf3ff;color:#0b6ef3;border-left:3px solid #1477f2;border-radius:4px;padding:4px 5px;margin:3px 0;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1200px){.organizer-kpis{grid-template-columns:repeat(3,1fr)}.organizer-layout{grid-template-columns:1fr}.organizer-clients{max-height:340px}}


/* 4.16.535 · Dashboard Desktop/Online: iconografía Canvas + Organizador legible */
.dashboard-page-nav{gap:10px;padding:8px;margin-bottom:12px}
.dashboard-page-nav button{min-height:44px;padding:8px 17px;font-size:12px;display:inline-flex;align-items:center;gap:8px;border-radius:8px}
.dashboard-nav-canvas{width:25px;height:25px;flex:0 0 25px;display:block}
.wf-dashboard-canvas{display:block}
.kpi-icon-canvas,.organizer-kpi-icon{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center}
.organizer-kpi i{display:none}
.organizer-kpi{padding:12px 13px;gap:10px;min-height:62px}
.organizer-kpi span{font-size:10px}.organizer-kpi b{font-size:18px}
#dashboard-organizer-page .organizer-layout{grid-template-columns:minmax(360px,.86fr) minmax(650px,1.74fr);min-height:calc(100vh - 300px);gap:12px}
#dashboard-organizer-page .organizer-client-table table,#dashboard-organizer-page .organizer-work-table table{font-size:10px}
#dashboard-organizer-page .organizer-client-table th,#dashboard-organizer-page .organizer-work-table th{padding:10px 8px;font-size:9px}
#dashboard-organizer-page .organizer-client-table td,#dashboard-organizer-page .organizer-work-table td{padding:10px 8px}
#dashboard-organizer-page .organizer-client-head{padding:15px 15px 10px}
#dashboard-organizer-page .organizer-client-head h2{font-size:17px}
#dashboard-organizer-page .organizer-tabs button{padding:10px 14px;font-size:10px}
#dashboard-organizer-page .organizer-work-toolbar{grid-template-columns:1fr 170px auto;padding:10px 13px;gap:8px}
#dashboard-organizer-page .organizer-search{padding:0 13px 10px}
#dashboard-organizer-page .organizer-search input,#dashboard-organizer-page .organizer-work-toolbar input,#dashboard-organizer-page .organizer-work-toolbar select{height:37px;font-size:10px}
.organizer-client-identity{display:flex;align-items:center;gap:8px;min-width:0}.organizer-client-avatar{width:30px;height:30px;min-width:30px;border-radius:50%;display:grid;place-items:center;color:#fff;font:800 9px "Segoe UI",Arial,sans-serif;letter-spacing:.2px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}.organizer-client-identity strong{font:600 10px "Segoe UI",Arial,sans-serif;color:#17385e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1450px){#dashboard-organizer-page .organizer-layout{grid-template-columns:minmax(330px,.9fr) minmax(560px,1.55fr)}#dashboard-organizer-page .organizer-client-table table,#dashboard-organizer-page .organizer-work-table table{font-size:9.5px}}

/* 4.16.536 · Organizador: mayor superficie útil y navegación funcional */
#dashboard-organizer-page .organizer-layout{
  grid-template-columns:minmax(390px,.88fr) minmax(760px,1.85fr);
  min-height:calc(100vh - 255px);
  gap:14px;
}
#dashboard-organizer-page .organizer-clients,
#dashboard-organizer-page .organizer-detail{min-height:560px}
#dashboard-organizer-page .organizer-client-table table,
#dashboard-organizer-page .organizer-work-table table{font-size:10.5px}
#dashboard-organizer-page .organizer-client-table th,
#dashboard-organizer-page .organizer-work-table th{padding:11px 9px;font-size:9.5px}
#dashboard-organizer-page .organizer-client-table td,
#dashboard-organizer-page .organizer-work-table td{padding:11px 9px}
#dashboard-organizer-page .organizer-tabs{gap:2px;padding:0 14px}
#dashboard-organizer-page .organizer-tabs button{
  min-height:38px;padding:10px 15px;font-size:10px;font-weight:700;cursor:pointer;border-radius:7px 7px 0 0;
}
#dashboard-organizer-page .organizer-client-head{min-height:58px;padding:13px 15px 9px}
#dashboard-organizer-page .organizer-new-order-head{min-height:38px;padding:0 15px;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
#dashboard-organizer-page .organizer-work-toolbar{grid-template-columns:minmax(260px,1fr) 190px;padding:11px 14px}
#dashboard-organizer-page .organizer-work-table{padding:0 14px 14px}
#dashboard-organizer-page tr[data-org-order]:focus{outline:2px solid #1477f2;outline-offset:-2px;background:#eef6ff}
.organizer-tab-panel{padding:15px 14px 18px;overflow:auto;flex:1;min-height:0}
.organizer-info-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:10px}
.organizer-info-grid article{border:1px solid #dce7f2;border-radius:10px;background:#f8fbff;padding:12px 13px;display:flex;flex-direction:column;gap:4px}
.organizer-info-grid small{color:#6d8198;font-size:9px;text-transform:uppercase;font-weight:700;letter-spacing:.02em}
.organizer-info-grid strong{color:#17385e;font-size:11px}
.organizer-empty-panel{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;color:#72849a;text-align:center}
.organizer-empty-panel b{color:#17385e;font-size:12px}.organizer-empty-panel span{font-size:10px}
.organizer-doc-list,.organizer-history{display:flex;flex-direction:column;gap:7px}
.organizer-doc-list article,.organizer-history article{display:flex;align-items:center;gap:10px;border:1px solid #dfe8f2;border-radius:9px;background:#fff;padding:10px 12px}
.organizer-doc-list article div,.organizer-history article div{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.organizer-doc-list small,.organizer-history small{color:#71829a;font-size:9px}.organizer-doc-list strong,.organizer-history strong{color:#17385e;font-size:10.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.organizer-history article{cursor:pointer}.organizer-history article:hover{background:#f5f9ff;border-color:#b9d6f7}
.organizer-history-dot{width:10px;height:10px;border-radius:50%;background:#91a0b1}.organizer-history-dot.pendiente{background:#ff9800}.organizer-history-dot.en-proceso{background:#1477f2}.organizer-history-dot.en-espera{background:#7a8797}.organizer-history-dot.finalizado{background:#0aaf62}
@media(max-width:1450px){#dashboard-organizer-page .organizer-layout{grid-template-columns:minmax(340px,.9fr) minmax(620px,1.65fr)}#dashboard-organizer-page .organizer-clients,#dashboard-organizer-page .organizer-detail{min-height:500px}}

/* 4.16.537 · Organizador con jerarquía de Órdenes de trabajo */
#dashboard-organizer-page .organizer-work-table table{table-layout:auto}
#dashboard-organizer-page .organizer-work-table th:nth-child(3){min-width:210px}
#dashboard-organizer-page .organizer-work-table th:nth-child(4){min-width:150px}
#dashboard-organizer-page .organizer-new-order-head{min-height:44px!important;padding:0 20px!important;border-radius:8px!important;background:#1477f2!important;color:#fff!important;border-color:#0b67d1!important;font-size:10.5px!important;box-shadow:0 2px 5px rgba(20,119,242,.16)}
#dashboard-organizer-page .organizer-new-order-head svg{width:17px;height:17px}
.organizer-order-context{display:flex;align-items:center;gap:8px;color:#17385e;background:#f4f8fd;border:1px solid #dce7f2;border-radius:8px;padding:9px 11px;margin-bottom:10px}.organizer-order-context strong{font-size:11px}.organizer-order-context span{font-size:9px;color:#6d8198}
.organizer-priority{display:inline-block;border-radius:999px;padding:3px 7px;font-size:8px;font-weight:700;background:#e8f2ff;color:#1477f2}.organizer-priority.priority-alta{background:#fff1d6;color:#d97706}.organizer-priority.priority-urgente{background:#ffe5e8;color:#d92d3a}.organizer-priority.priority-baja{background:#e7f7ef;color:#0a8f78}


/* 4.16.538 · Identidad WFERP única Desktop / Online =====================
   Badges Online reproducen la geometría Desktop: esquinas casi rectas,
   Segoe UI Semibold, cuerpo compacto y sin píldoras. */
:root{
  --wf-badge-radius:0;
  --wf-badge-font:"Segoe UI Semibold","Segoe UI",Arial,sans-serif;
  --wf-badge-size:8px;
  --wf-badge-weight:600;
  --wf-badge-px:7px;
  --wf-badge-py:3px;
}
.client-status-badge,
.order-badge,
.rrhh-badge,
.rrhh-mark-badge,
.rrhh-request-badge,
.status-badge,
.config-safe-badge,
.config-sync-pill,
.organizer-state,
.organizer-priority{
  border-radius:var(--wf-badge-radius)!important;
  font-family:var(--wf-badge-font)!important;
  font-size:var(--wf-badge-size)!important;
  font-weight:var(--wf-badge-weight)!important;
  line-height:1.15!important;
  letter-spacing:0!important;
  padding:var(--wf-badge-py) var(--wf-badge-px)!important;
  min-height:0!important;
  box-shadow:none!important;
  text-transform:uppercase;
  white-space:nowrap;
}
/* 4.17.102 · Esquinas cuadradas en el resto de badges/píldoras de
   estado del programa, sin tocar su tipografía/tamaño propios (solo
   la forma de la esquina). */
.budget-status,
.client-status,
.status,
.material-state,
.material-list-state,
.config-status,
.config-role-pill,
.budget-readonly-pill{
  border-radius:0!important;
}
/* Estados oficiales, iguales al Organizador Desktop. */
.organizer-state.pendiente,.order-badge.pending{background:#FFF0D1!important;color:#B66C00!important}
.organizer-state.en-proceso,.order-badge.production{background:#E3F0FF!important;color:#0B67D1!important}
.organizer-state.en-espera{background:#EDF1F5!important;color:#64748B!important}
.organizer-state.finalizado,.order-badge.delivery,.order-badge.done{background:#DDF6E8!important;color:#07894B!important}
.organizer-state.retrasado{background:#FFE5E8!important;color:#D92D3A!important}
.organizer-priority{background:#E8F2FF!important;color:#1477F2!important}
.organizer-priority.priority-alta,.order-badge.high{background:#FFF1D6!important;color:#D97706!important}
.organizer-priority.priority-baja,.order-badge.low{background:#E7F7EF!important;color:#0A8F78!important}

/* URGENTE comparte exactamente la señal roja intermitente WFERP Desktop. */
@keyframes wf-priority-urgent-blink{
  0%,49%{background:#D92D3A;color:#FFFFFF;border-color:#D92D3A}
  50%,100%{background:#FFE5E8;color:#D92D3A;border-color:#F2A9B2}
}
.organizer-priority.priority-urgente,
.order-badge.urgent{
  border:1px solid #D92D3A!important;
  animation:wf-priority-urgent-blink 1.3s steps(1,end) infinite!important;
}
@media (prefers-reduced-motion:reduce){
  .organizer-priority.priority-urgente,.order-badge.urgent{animation:none!important;background:#D92D3A!important;color:#fff!important}
}

/* WorkflowActionBar es la única barra de alta en el Organizador. */
#dashboard-organizer-page .organizer-order-actionbar{
  flex:0 0 auto;
  justify-content:flex-end;
  gap:7px;
}
#dashboard-organizer-page .organizer-order-actionbar .organizer-new-order-head{
  height:42px!important;
  min-width:148px!important;
  padding:0 15px!important;
  border-radius:2px!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-size:10px!important;
  font-weight:600!important;
  box-shadow:none!important;
}
#dashboard-organizer-page .organizer-order-actionbar .organizer-new-order-head .wf-svg-icon{
  width:17px!important;height:17px!important;
}


/* 4.16.539 · Online: corrección de especificidad WFERP */
#dashboard-organizer-page .organizer-order-actionbar .organizer-new-order-head.wf-action-btn.success,
#dashboard-organizer-page .organizer-order-actionbar .organizer-new-order-head{background:#EEF9F3!important;color:#078B43!important;border:1px solid #8ED7AD!important;border-radius:2px!important;height:42px!important;min-width:148px!important;padding:0 15px!important;box-shadow:none!important;font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;font-size:10px!important;font-weight:600!important;text-transform:uppercase!important}
#dashboard-organizer-page .organizer-order-actionbar .organizer-new-order-head:hover{background:#E3F5EB!important;border-color:#63C58D!important}
@keyframes wf539UrgentPulse{0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(217,45,58,.36)}50%{opacity:.35;box-shadow:0 0 0 4px rgba(217,45,58,.10)}}
#dashboard-organizer-page .organizer-priority.priority-urgente,body[data-route="ordenes"] .order-badge.urgent{background:#D92D3A!important;color:#fff!important;border:1px solid #B91C2C!important;border-radius:2px!important;animation:wf539UrgentPulse 1s ease-in-out infinite!important}
@media (prefers-reduced-motion:reduce){#dashboard-organizer-page .organizer-priority.priority-urgente,body[data-route="ordenes"] .order-badge.urgent{animation:wf539UrgentPulse 1s ease-in-out infinite!important}}

/* ==== WFERP 4.16.612 · Lista/Kanban/Por cliente + selector de sector OT ==== */
.order-view-toggle{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.order-view-toggle button{display:flex;align-items:center;gap:6px;border:1px solid #c7d9ec;background:#fff;color:#123b6d;border-radius:6px;padding:7px 12px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.order-view-toggle button svg{width:14px;height:14px}
.order-view-toggle button.active{background:#1477ee;border-color:#1477ee;color:#fff}
.order-view-toggle button:hover:not(.active){background:#f2f7ff}

.order-board{padding:14px}
.order-board.hidden{display:none}

.order-kanban{display:grid;grid-template-columns:repeat(5,minmax(200px,1fr));gap:12px;overflow-x:auto}
.order-kanban-col{background:#f6f9fc;border:1px solid #e1eaf4;border-radius:8px;display:flex;flex-direction:column;min-height:120px}
.order-kanban-col-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:2px solid var(--kb-color,#1477ee);font-size:11px;font-weight:700;color:#123b6d;text-transform:uppercase}
.order-kanban-col-head b{color:var(--kb-color,#1477ee);font-size:13px}
.order-kanban-col-body{padding:8px;display:flex;flex-direction:column;gap:8px;overflow-y:auto}
.order-kanban-card{background:#fff;border:1px solid #e1eaf4;border-left:3px solid var(--kb-color,#1477ee);border-radius:6px;padding:9px 10px;cursor:pointer;display:flex;flex-direction:column;gap:5px}
.order-kanban-card:hover{box-shadow:0 4px 14px rgba(10,40,80,.1)}
.order-kanban-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.order-kanban-card-top b{font-size:12px;color:#123b6d}
.order-kanban-card-title{font-size:12px;color:#274b75;font-weight:600;line-height:1.3}
.order-kanban-card-meta{display:flex;justify-content:space-between;font-size:10px;color:#6e849a}
.order-kanban-empty{padding:16px;text-align:center;font-size:11px;color:#8ba0b8}

.order-by-client{display:flex;flex-direction:column;gap:14px}
.order-client-group{border:1px solid #e1eaf4;border-radius:8px;overflow:hidden;background:#fff}
.order-client-group-head{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#f6f9fc;border-bottom:1px solid #e1eaf4}
.order-client-avatar{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:11px;font-weight:700;flex:0 0 auto}
.order-client-group-head strong{font-size:12.5px;color:#123b6d}
.order-client-group-head small{margin-left:auto;font-size:10px;color:#7186a0}
.order-client-group-rows{display:flex;flex-direction:column}
.order-client-row{display:grid;grid-template-columns:110px 1fr auto auto 110px;align-items:center;gap:10px;padding:9px 14px;border-top:1px solid #f0f4f9;font-size:11.5px;color:#274b75;cursor:pointer}
.order-client-row:first-child{border-top:0}
.order-client-row:hover{background:#f8fbff}
.order-client-row-title{font-weight:600}
@media(max-width:900px){.order-kanban{grid-template-columns:repeat(2,minmax(180px,1fr))}.order-client-row{grid-template-columns:1fr;gap:4px}}

.ot-sector-picker{width:min(560px,92vw)}
.ot-sector-picker-hint{margin:0;padding:0 16px 6px;color:#6e849a;font-size:12px}
.ot-sector-picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:6px 16px 18px}
.ot-sector-picker-btn{border:1px solid #c7d9ec;background:#f6f9fc;color:#123b6d;border-radius:8px;padding:16px 10px;font-size:12.5px;font-weight:700;cursor:pointer}
.ot-sector-picker-btn:hover{background:#e8f2ff;border-color:#1477ee;color:#0b67d1}
@media(max-width:600px){.ot-sector-picker-grid{grid-template-columns:repeat(2,1fr)}}

/* ==== WFERP 4.16.612 · Adjuntar imagen y documentos en la ficha OT ==== */
.ot-image-row{display:flex;gap:16px;padding:14px;align-items:flex-start;flex-wrap:wrap}
.ot-image-preview{width:160px;height:120px;flex:0 0 auto;border:1px dashed #9ec4ec;border-radius:8px;background:#f7fbff;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#6e849a;gap:6px;overflow:hidden}
.ot-image-preview img{width:100%;height:100%;object-fit:cover}
.ot-image-preview span{font-size:10px}
.ot-image-actions{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.ot-image-actions small{color:#7186a0;font-size:10px}
.ot-file-btn{cursor:pointer}
.ot-doc-list{padding:0 14px}
.ot-doc-empty{padding:14px 0;color:#8ba0b8;font-size:12px}
.ot-doc-item{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #eef2f7;font-size:12px}
.ot-doc-item a{color:#0b67d1;font-weight:600;text-decoration:none;flex:1}
.ot-doc-item a:hover{text-decoration:underline}
.ot-doc-item small{color:#8ba0b8}
.ot-doc-remove{border:1px solid #F5A6B0;background:#FFF1F3;color:#E43A4F;border-radius:5px;width:26px;height:26px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.ot-doc-add{display:flex;align-items:center;gap:10px;padding:12px 14px}
.ot-doc-add small{color:#7186a0;font-size:10px}

/* ==== WFERP 4.16.613 · Accesos Online (cuentas de acceso administrables) ==== */
.config-accounts-list{padding-bottom:14px}
.config-accounts-table{width:100%;border-collapse:collapse;font-size:12.5px}
.config-accounts-table th{text-align:left;padding:8px 10px;background:#f2f7fc;color:#123b6d;font-size:10.5px;text-transform:uppercase;border-bottom:1px solid #dbe6f2}
.config-accounts-table td{padding:9px 10px;border-bottom:1px solid #eef2f7;color:#274b75}
.config-role-pill{display:inline-block;padding:3px 9px;border-radius:999px;background:#eef2f7;color:#526c8c;font-size:10px;font-weight:700}
.config-role-pill.admin{background:#e8f2ff;color:#0b67d1}
.config-accounts-actions{display:flex;gap:6px}
.config-loading{padding:16px 0;color:#8ba0b8;font-size:12px}

/* ==== WFERP 4.16.625 · Selector Lista / Kanban / Por cliente ==== */
body[data-route="ordenes"] .order-view-toggle{gap:8px}
body[data-route="ordenes"] .order-view-toggle button{
  min-height:38px;
  padding:8px 14px;
  border:1px solid #1477ee;
  background:#fff;
  color:#1477ee;
  border-radius:6px;
  font-size:14px;
  font-weight:700;
  line-height:1;
  box-shadow:none;
}
body[data-route="ordenes"] .order-view-toggle button svg{
  width:16px;
  height:16px;
  color:currentColor;
}
body[data-route="ordenes"] .order-view-toggle button.active{
  background:#1477ee;
  border-color:#1477ee;
  color:#fff;
}
body[data-route="ordenes"] .order-view-toggle button:hover:not(.active){
  background:#f3f8ff;
  color:#0b67d1;
  border-color:#0b67d1;
}

/* ==== WFERP 4.16.627 · Selector Lista / Kanban / Por cliente ==== */
body[data-route="ordenes"] .order-view-toggle{
  display:flex;
  align-items:center;
  gap:8px;
}
body[data-route="ordenes"] .order-view-toggle button{
  min-height:40px;
  padding:9px 16px;
  border:1px solid #1477ee;
  background:#fff;
  color:#1477ee;
  border-radius:6px;
  font-size:14px;
  font-weight:700;
  line-height:1;
  box-shadow:none;
}
body[data-route="ordenes"] .order-view-toggle button svg{
  width:16px;
  height:16px;
  color:currentColor;
}
body[data-route="ordenes"] .order-view-toggle button.active{
  background:#1477ee;
  border-color:#1477ee;
  color:#fff;
}
body[data-route="ordenes"] .order-view-toggle button:hover:not(.active){
  background:#fff;
  color:#0b67d1;
  border-color:#0b67d1;
}


/* ==== WFERP 4.16.628 · Selector Lista / Kanban / Por cliente · override definitivo ==== */
body[data-route="ordenes"] .order-view-toggle [data-order-view]{
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-width:112px!important;
  height:42px!important;
  min-height:42px!important;
  padding:0 18px!important;
  border:1.5px solid #1477ee!important;
  border-radius:6px!important;
  background:#ffffff!important;
  color:#1477ee!important;
  font-family:"Segoe UI",Arial,sans-serif!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:14px!important;
  letter-spacing:0!important;
  box-shadow:none!important;
  opacity:1!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view] span{
  color:inherit!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:14px!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view] svg,
body[data-route="ordenes"] .order-view-toggle [data-order-view] .wf-svg-icon{
  width:17px!important;
  height:17px!important;
  min-width:17px!important;
  color:inherit!important;
  stroke:currentColor!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view].active{
  background:#1477ee!important;
  border-color:#1477ee!important;
  color:#ffffff!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view]:not(.active){
  background:#ffffff!important;
  border-color:#1477ee!important;
  color:#1477ee!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view]:not(.active):hover{
  background:#ffffff!important;
  border-color:#0b67d1!important;
  color:#0b67d1!important;
}


/* ==== WFERP 4.16.629 · Navegación OT y barra de acciones ==== */
body[data-route="ordenes"] .order-view-toggle [data-order-view],
body[data-route="ordenes"] .order-view-toggle [data-order-all]{
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-width:112px!important;
  height:42px!important;
  min-height:42px!important;
  padding:0 18px!important;
  border:1.5px solid #1477ee!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#1477ee!important;
  font-family:"Segoe UI",Arial,sans-serif!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:14px!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-all]{min-width:164px!important}
body[data-route="ordenes"] .order-view-toggle [data-order-view] span,
body[data-route="ordenes"] .order-view-toggle [data-order-all] span{
  color:inherit!important;font-size:14px!important;font-weight:700!important;line-height:14px!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view] svg,
body[data-route="ordenes"] .order-view-toggle [data-order-all] svg,
body[data-route="ordenes"] .order-view-toggle [data-order-view] .wf-svg-icon,
body[data-route="ordenes"] .order-view-toggle [data-order-all] .wf-svg-icon{
  width:17px!important;height:17px!important;min-width:17px!important;color:inherit!important;stroke:currentColor!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view].active{
  background:#1477ee!important;border-color:#1477ee!important;color:#fff!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-view]:not(.active):hover,
body[data-route="ordenes"] .order-view-toggle [data-order-all]:hover{
  background:#f5f9ff!important;border-color:#0b67d1!important;color:#0b67d1!important;
}
/* El antiguo botón central deja de participar en el layout por compatibilidad con sesiones cacheadas. */
body[data-route="ordenes"] #order-show-all{display:none!important}

/* Acciones de la OT: títulos a 12px y superficies más amplias. */
body[data-route="ordenes"] .orders-toolbar .client-toolbar-actions{gap:8px!important}
body[data-route="ordenes"] .orders-toolbar .wf-action-btn{
  box-sizing:border-box!important;
  height:42px!important;
  min-height:42px!important;
  min-width:108px!important;
  padding:0 14px!important;
  border-width:1px!important;
  border-radius:3px!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:12px!important;
  gap:8px!important;
  white-space:nowrap!important;
}
body[data-route="ordenes"] .orders-toolbar .wf-action-btn span{
  font-size:12px!important;font-weight:700!important;line-height:12px!important;
}
body[data-route="ordenes"] .orders-toolbar .wf-action-btn .wf-svg-icon,
body[data-route="ordenes"] .orders-toolbar .wf-action-btn svg{
  width:17px!important;height:17px!important;min-width:17px!important;
}
body[data-route="ordenes"] .orders-toolbar #generic-duplicate,
body[data-route="ordenes"] .orders-toolbar #order-finalize{min-width:122px!important}
body[data-route="ordenes"] .orders-toolbar #generic-delete{min-width:116px!important}

/* ===== 4.16.630 · Ficha OT Online: cabecera, estados/prioridades y descripción libre ===== */
#record-modal.order-mode .ot-top-actions{
  grid-template-columns:auto 1fr auto auto auto;
}
#record-modal.order-mode .ot-top-actions .ot-back-btn{
  min-height:38px;
  padding:0 16px;
  border:1px solid #1477ee;
  border-radius:5px;
  background:#fff;
  color:#1477ee;
  font:700 13px "Segoe UI",Arial,sans-serif;
  cursor:pointer;
}
#record-modal.order-mode .ot-top-actions .ot-back-btn:hover{
  background:#eef6ff;
}
#record-modal.order-mode .ot-colored-select{
  font-weight:700;
  border-width:1px;
  transition:background-color .12s ease,border-color .12s ease,color .12s ease;
}
#record-modal.order-mode .ot-colored-select.ot-tone-pendiente{background:#fff3d8;color:#b66a00;border-color:#f0c56d}
#record-modal.order-mode .ot-colored-select.ot-tone-produccion{background:#e4f0ff;color:#0868d7;border-color:#9bc6f7}
#record-modal.order-mode .ot-colored-select.ot-tone-manipulado{background:#efe7ff;color:#7441d6;border-color:#c7b0f6}
#record-modal.order-mode .ot-colored-select.ot-tone-terminado{background:#e3f6e9;color:#078636;border-color:#9bd5ae}
#record-modal.order-mode .ot-colored-select.ot-tone-entregado{background:#dff6f0;color:#008a70;border-color:#93d7c8}
#record-modal.order-mode .ot-colored-select.ot-tone-baja{background:#e7f7ef;color:#168451;border-color:#9fd6bd}
#record-modal.order-mode .ot-colored-select.ot-tone-normal{background:#e7f1ff;color:#176bd6;border-color:#a5c7f2}
#record-modal.order-mode .ot-colored-select.ot-tone-alta{background:#fff0d2;color:#c07000;border-color:#efc573}
#record-modal.order-mode .ot-colored-select.ot-tone-urgente{background:#ffe3e7;color:#cf2038;border-color:#ee9aa7}
#record-modal.order-mode input[name="descripcion_trabajo"]{
  min-height:42px;
  background:#fff;
}


/* ===== 4.16.631 · Ficha OT: jerarquía cabecera, badges, clientes, catálogos y ruta ===== */
#record-modal.order-mode #order-hero{display:flex;flex-direction:column}
#record-modal.order-mode .ot-identity{order:1;padding:13px 14px 10px;min-height:64px;box-sizing:border-box}
#record-modal.order-mode .ot-identity>div:not(.ot-statuses){min-width:0}
#record-modal.order-mode .ot-identity strong{font-size:18px!important;line-height:1.15!important;font-weight:800!important;letter-spacing:.1px}
#record-modal.order-mode .ot-identity small{font-size:10px!important;line-height:1.25!important;margin-top:3px}
#record-modal.order-mode .ot-top-actions{order:2;border-top:1px solid #e1e9f2;border-bottom:1px solid #dce6f1;padding:7px 12px!important;min-height:52px;box-sizing:border-box}
#record-modal.order-mode .ot-tabs{order:3}
#record-modal.order-mode .ot-back-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px}
#record-modal.order-mode .ot-back-btn .wf-svg-icon,#record-modal.order-mode .ot-back-btn svg{width:15px!important;height:15px!important;stroke:currentColor}
#record-modal.order-mode .ot-statuses{gap:8px!important}
#record-modal.order-mode .ot-statuses .order-badge{font-size:14px!important;line-height:1!important;min-height:28px!important;padding:0 11px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}

/* Fila Cliente / Contacto / Teléfono / Email: evitar cortes en 6 columnas */
#record-modal.order-mode .ot-client-field{grid-column:span 2!important;min-width:0}
#record-modal.order-mode .ot-contact-field{grid-column:span 2!important;min-width:0}
#record-modal.order-mode .ot-phone-field{grid-column:span 1!important;min-width:0}
#record-modal.order-mode .ot-email-field{grid-column:span 1!important;min-width:0}
#record-modal.order-mode .ot-client-field select,
#record-modal.order-mode .ot-contact-field input,
#record-modal.order-mode .ot-phone-field input,
#record-modal.order-mode .ot-email-field input{width:100%!important;min-width:0!important;box-sizing:border-box!important;text-overflow:ellipsis}
#record-modal.order-mode .ot-email-field input{font-weight:600!important;font-family:"Segoe UI",Arial,sans-serif!important}

/* Descripción libre con gestión de catálogo */
#record-modal.order-mode .ot-description-editor{display:grid;grid-template-columns:minmax(0,1fr) 38px 38px;gap:6px;align-items:center}
#record-modal.order-mode .ot-description-editor input{width:100%!important;min-width:0!important;box-sizing:border-box!important}
#record-modal.order-mode .ot-description-editor .ot-mini-btn{width:38px!important;height:38px!important;padding:0!important}

/* Cada opción de Estado/Prioridad conserva su propio color al desplegar. */
#record-modal.order-mode select.ot-colored-select option{font-weight:700!important;padding:7px 10px!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-pendiente{background:#fff3d8!important;color:#b66a00!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-produccion{background:#e4f0ff!important;color:#0868d7!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-manipulado{background:#efe7ff!important;color:#7441d6!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-terminado{background:#e3f6e9!important;color:#078636!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-entregado{background:#dff6f0!important;color:#008a70!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-baja{background:#e7f7ef!important;color:#168451!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-normal{background:#e7f1ff!important;color:#176bd6!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-alta{background:#fff0d2!important;color:#c07000!important}
#record-modal.order-mode select.ot-colored-select option.ot-tone-urgente{background:#ffe3e7!important;color:#cf2038!important}

#record-modal.order-mode .ot-route-section{margin-top:10px}
#record-modal.order-mode .ot-route-section .ot-route{width:100%}

@media(max-width:1050px){
 #record-modal.order-mode .ot-client-field,#record-modal.order-mode .ot-contact-field{grid-column:span 3!important}
 #record-modal.order-mode .ot-phone-field,#record-modal.order-mode .ot-email-field{grid-column:span 3!important}
}

/* ===== 4.16.633 · Ficha OT: jerarquía visual, autocomplete y catálogos por sector ===== */
#record-modal.order-mode .ot-identity{
  padding:18px 16px 14px!important;
  min-height:76px!important;
}
#record-modal.order-mode .ot-identity strong{
  font-size:19px!important;
  line-height:1.2!important;
  font-weight:700!important;
  text-transform:none!important;
}
#record-modal.order-mode .ot-identity small{
  margin-top:5px!important;
}
#record-modal.order-mode .ot-top-actions{
  margin-top:4px!important;
  padding:10px 14px!important;
  min-height:58px!important;
}
#record-modal.order-mode .ot-tabs{
  margin-top:4px!important;
}
#record-modal.order-mode .ot-statuses .order-badge{
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-weight:600!important;
  font-size:14px!important;
}

/* Cliente / contacto / teléfono / email: más espacio real para el correo. */
#record-modal.order-mode .ot-client-field{grid-column:span 2!important}
#record-modal.order-mode .ot-contact-field{grid-column:span 1!important}
#record-modal.order-mode .ot-phone-field{grid-column:span 1!important}
#record-modal.order-mode .ot-email-field{grid-column:span 2!important}
#record-modal.order-mode .ot-email-field input{
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-weight:600!important;
  overflow:visible!important;
  text-overflow:clip!important;
}

/* Estado / prioridad: combobox propio para garantizar un color distinto por opción. */
#record-modal.order-mode .ot-color-combo{position:relative;min-width:0}
#record-modal.order-mode .ot-color-trigger{
  width:100%;min-height:42px;padding:9px 12px;border:1px solid #c7d9ec;border-radius:5px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  font:600 14px "Segoe UI Semibold","Segoe UI",Arial,sans-serif;cursor:pointer;text-align:left;
}
#record-modal.order-mode .ot-color-trigger b{font-size:16px;font-weight:700;line-height:1}
#record-modal.order-mode .ot-color-menu{
  position:absolute;left:0;right:0;top:calc(100% + 3px);z-index:80;display:none;
  border:1px solid #b8cce2;background:#fff;box-shadow:0 8px 24px rgba(23,55,92,.18);border-radius:5px;overflow:hidden;
}
#record-modal.order-mode .ot-color-combo.open .ot-color-menu{display:block}
#record-modal.order-mode .ot-color-option{
  width:100%;min-height:38px;border:0;border-bottom:1px solid rgba(20,50,80,.07);padding:8px 12px;
  text-align:left;font:600 14px "Segoe UI Semibold","Segoe UI",Arial,sans-serif;cursor:pointer;
}
#record-modal.order-mode .ot-color-option:last-child{border-bottom:0}
#record-modal.order-mode .ot-color-option:hover{filter:brightness(.97)}
#record-modal.order-mode .ot-tone-pendiente{background:#fff3d8!important;color:#a85f00!important;border-color:#efc56e!important}
#record-modal.order-mode .ot-tone-produccion{background:#e4f0ff!important;color:#0868d7!important;border-color:#9bc6f7!important}
#record-modal.order-mode .ot-tone-manipulado{background:#efe7ff!important;color:#7441d6!important;border-color:#c7b0f6!important}
#record-modal.order-mode .ot-tone-terminado{background:#e3f6e9!important;color:#078636!important;border-color:#9bd5ae!important}
#record-modal.order-mode .ot-tone-entregado{background:#dff6f0!important;color:#008a70!important;border-color:#93d7c8!important}
#record-modal.order-mode .ot-tone-baja{background:#e7f7ef!important;color:#168451!important;border-color:#9fd6bd!important}
#record-modal.order-mode .ot-tone-normal{background:#e7f1ff!important;color:#176bd6!important;border-color:#a5c7f2!important}
#record-modal.order-mode .ot-tone-alta{background:#fff0d2!important;color:#c07000!important;border-color:#efc573!important}
#record-modal.order-mode .ot-tone-urgente{background:#ffe3e7!important;color:#cf2038!important;border-color:#ee9aa7!important}

/* Autocompletado de descripción: solo valores que empiezan por lo escrito. */
#record-modal.order-mode .ot-description-autocomplete{position:relative;min-width:0}
#record-modal.order-mode .ot-description-suggestions{
  display:none;position:absolute;left:0;right:0;top:calc(100% + 3px);z-index:70;
  max-height:220px;overflow:auto;border:1px solid #b8cce2;border-radius:5px;background:#fff;box-shadow:0 8px 24px rgba(23,55,92,.16)
}
#record-modal.order-mode .ot-description-suggestions.open{display:block}
#record-modal.order-mode .ot-description-suggestions button{
  display:block;width:100%;border:0;border-bottom:1px solid #edf2f7;background:#fff;color:#18395f;
  padding:9px 11px;text-align:left;font:500 13px "Segoe UI",Arial,sans-serif;cursor:pointer
}
#record-modal.order-mode .ot-description-suggestions button:hover{background:#eef6ff;color:#0868d7}
#record-modal.order-mode .ot-description-editor .ot-mini-btn:disabled{opacity:.35;cursor:not-allowed}

@media(max-width:1050px){
 #record-modal.order-mode .ot-client-field,#record-modal.order-mode .ot-email-field{grid-column:span 3!important}
 #record-modal.order-mode .ot-contact-field,#record-modal.order-mode .ot-phone-field{grid-column:span 3!important}
}

/* ===== 4.16.634 · Ficha OT: menú único de acciones + autocompletado visible ===== */
#record-modal.order-mode .record-dialog-actions{display:none!important}
#record-modal.order-mode .ot-top-actions{justify-content:flex-end!important;overflow:visible!important;position:relative;z-index:120}
#record-modal.order-mode .ot-top-actions>span:first-child{flex:1}
#record-modal.order-mode .ot-actions-dropdown{z-index:160}
#record-modal.order-mode .ot-actions-dropdown>summary{
  min-width:142px!important;height:42px!important;padding:0 15px!important;background:#fff!important;
  border:1px solid #1477f2!important;color:#0b67cf!important;font-size:12px!important;font-weight:700!important
}
#record-modal.order-mode .ot-actions-dropdown[open]>summary,#record-modal.order-mode .ot-actions-dropdown>summary:hover{background:#eef6ff!important}
#record-modal.order-mode .ot-actions-dropdown .wf-actions-dropdown-menu{width:238px!important;right:0!important;left:auto!important;z-index:5000!important}
#record-modal.order-mode .ot-actions-dropdown .wf-actions-dropdown-menu button{height:40px!important;font-size:12px!important;font-weight:600!important}
#record-modal.order-mode .ot-actions-dropdown .wf-actions-dropdown-menu button .wf-svg-icon{width:17px!important;height:17px!important;flex:0 0 17px!important}
#record-modal.order-mode .ot-general-info-section{overflow:visible!important;position:relative;z-index:35}
#record-modal.order-mode .ot-general-info-section + .ot-section{position:relative;z-index:1}
#record-modal.order-mode .ot-description-field{position:relative;z-index:60}
#record-modal.order-mode .ot-description-autocomplete{z-index:80}
#record-modal.order-mode .ot-description-suggestions{z-index:6000!important;max-height:260px!important}
#record-modal.order-mode .ot-required-field>span{font-weight:700!important;color:#173d6c!important}
#record-modal.order-mode .ot-required-field>span::after{content:""}

/* ===== 4.16.635 · Ficha OT: cabecera compacta profesional + acciones + navegación segura ===== */
#record-modal.order-mode .ot-identity{
  padding:14px 16px 11px!important;
  min-height:70px!important;
  gap:12px!important;
}
#record-modal.order-mode .ot-avatar{
  width:42px!important;height:42px!important;min-width:42px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
}
#record-modal.order-mode .ot-avatar .wf-svg-icon,
#record-modal.order-mode .ot-avatar svg{width:22px!important;height:22px!important}
#record-modal.order-mode .ot-identity strong{
  font-size:20px!important;
  line-height:1.15!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-weight:600!important;
  text-transform:none!important;
}
#record-modal.order-mode .ot-identity small{font-size:10.5px!important;margin-top:4px!important}

#record-modal.order-mode .ot-top-actions{
  display:flex!important;align-items:center!important;gap:9px!important;
  padding:9px 14px!important;min-height:60px!important;margin-top:5px!important;
  justify-content:flex-start!important;
}
#record-modal.order-mode .ot-actions-spacer{flex:1 1 auto!important}
#record-modal.order-mode .ot-back-btn,
#record-modal.order-mode .ot-actions-dropdown>summary{
  min-height:42px!important;height:42px!important;box-sizing:border-box!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  padding:0 15px!important;border:1px solid #1477f2!important;border-radius:5px!important;
  background:#fff!important;color:#0b67cf!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;font-weight:600!important;text-transform:none!important;
}
#record-modal.order-mode .ot-back-btn:hover,
#record-modal.order-mode .ot-actions-dropdown>summary:hover,
#record-modal.order-mode .ot-actions-dropdown[open]>summary{background:#eef6ff!important}
#record-modal.order-mode .ot-actions-dropdown>summary{min-width:132px!important}
#record-modal.order-mode .ot-actions-dropdown .wf-actions-dropdown-menu button{
  text-transform:none!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-size:12.5px!important;font-weight:600!important;
}
#record-modal.order-mode .ot-statuses{
  display:flex!important;align-items:center!important;gap:8px!important;margin-left:auto!important;
}
#record-modal.order-mode .ot-statuses .order-badge{
  min-height:36px!important;padding:0 14px!important;font-size:14px!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;font-weight:600!important;
}

#record-modal.order-mode .ot-tabs{
  min-height:62px!important;margin-top:6px!important;
  border-top:1px solid #dfe9f4!important;border-bottom:1px solid #d7e3ef!important;
}
#record-modal.order-mode .ot-tab{
  min-height:62px!important;gap:10px!important;padding:0 18px!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-size:15px!important;font-weight:600!important;
}
#record-modal.order-mode .ot-tab .wf-svg-icon,
#record-modal.order-mode .ot-tab svg{width:22px!important;height:22px!important;stroke-width:1.9!important}
#record-modal.order-mode .ot-tab.active{background:#eef6ff!important;color:#0b67cf!important}

@media(max-width:900px){
 #record-modal.order-mode .ot-top-actions{flex-wrap:wrap!important}
 #record-modal.order-mode .ot-actions-spacer{display:none!important}
 #record-modal.order-mode .ot-statuses{width:100%!important;margin-left:0!important;justify-content:flex-end!important}
}


/* ==== WFERP 4.16.636 · Ajustes listado OT ==== */
body[data-route="ordenes"] #order-list-profile .order-profile-icon{
  width:34px!important;height:34px!important;
}
body[data-route="ordenes"] #order-list-profile .order-profile-icon svg,
body[data-route="ordenes"] #order-list-profile .order-profile-icon .wf-svg-icon{
  width:16px!important;height:16px!important;min-width:16px!important;
}
body[data-route="ordenes"] #order-list-profile > div:nth-child(2) > strong{
  font-size:16px!important;font-weight:700!important;line-height:1.15!important;
  text-transform:none!important;color:#0b3265!important;
}
body[data-route="ordenes"] .order-view-toggle [data-order-all].active{
  background:#1477ee!important;border-color:#1477ee!important;color:#fff!important;
}
body[data-route="ordenes"] .order-title-cell .order-reference-text{
  font-size:inherit!important;font-weight:500!important;line-height:inherit!important;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body[data-route="ordenes"] .records-wrap .order-badge{
  font-size:10.5px!important;font-weight:700!important;line-height:1!important;
  min-height:22px!important;padding:0 9px!important;border-radius:4px!important;
}
body[data-route="ordenes"] .records-wrap .order-badge i{
  width:5px!important;height:5px!important;
}

/* ==== WFERP 4.16.637 · Ajuste tipográfico listado OT ==== */
body[data-route="ordenes"] #order-list-profile .order-profile-icon svg,
body[data-route="ordenes"] #order-list-profile .order-profile-icon .wf-svg-icon{
  width:19px!important;height:19px!important;min-width:19px!important;
}
body[data-route="ordenes"] #order-list-profile > div:nth-child(2) > strong{
  font-size:19px!important;font-weight:700!important;line-height:1.15!important;
}
/* Filas del listado: -1 px respecto a 4.16.636. La fecha conserva su tamaño. */
body[data-route="ordenes"] .records-table tbody td{
  font-size:8px!important;
}
body[data-route="ordenes"] .records-table tbody td:nth-child(7){
  font-size:9px!important;
}
body[data-route="ordenes"] .records-wrap .order-badge{
  font-size:9.5px!important;
}
body[data-route="ordenes"] .records-table tbody .row-action small{
  font-size:6px!important;
}


/* ==== WFERP 4.16.638 · Tipografía y cabecera Órdenes de trabajo ==== */
body[data-route="ordenes"] .module-head .breadcrumb{
  font-size:10px!important;
}
body[data-route="ordenes"] .module-head h1{
  font-size:24px!important;font-weight:700!important;line-height:1.15!important;
}
body[data-route="ordenes"] .module-head-left{
  display:flex!important;align-items:center!important;gap:12px!important;
}
body[data-route="ordenes"] #module-head-icon{
  display:inline-flex!important;width:42px!important;height:42px!important;min-width:42px!important;
  align-items:center!important;justify-content:center!important;color:#e11d48!important;
}
body[data-route="ordenes"] #module-head-icon svg{
  width:42px!important;height:42px!important;stroke-width:1.8!important;
}
body[data-route="ordenes"] #order-list-profile .order-profile-icon svg,
body[data-route="ordenes"] #order-list-profile .order-profile-icon .wf-svg-icon{
  width:22px!important;height:22px!important;min-width:22px!important;
}
body[data-route="ordenes"] #order-list-profile > div:nth-child(2) > strong{
  font-size:21px!important;font-weight:700!important;line-height:1.15!important;
}
/* Filas del listado: OT, Cliente, Referencia, 2ª Referencia y Fecha entrega a 10px. */
body[data-route="ordenes"] .records-table tbody td:nth-child(1),
body[data-route="ordenes"] .records-table tbody td:nth-child(2),
body[data-route="ordenes"] .records-table tbody td:nth-child(3),
body[data-route="ordenes"] .records-table tbody td:nth-child(4),
body[data-route="ordenes"] .records-table tbody td:nth-child(7){
  font-size:10px!important;
}
body[data-route="ordenes"] .records-table tbody td:nth-child(2){
  font-weight:700!important;
}
/* Prioridad y Estado mantienen el tamaño vigente. */
body[data-route="ordenes"] .records-wrap .order-badge{font-size:9.5px!important;}


/* ==== WFERP 4.16.639 · Ajustes finales listado Órdenes de trabajo ==== */
/* Pictograma de cabecera: exactamente el mismo símbolo que la barra lateral, a 42x42 px. */
body[data-route="ordenes"] #module-head-icon{
  display:inline-flex!important;width:42px!important;height:42px!important;min-width:42px!important;
  align-items:center!important;justify-content:center!important;color:#e11d48!important;
}
body[data-route="ordenes"] #module-head-icon svg{
  width:42px!important;height:42px!important;min-width:42px!important;stroke-width:1.8!important;
}
/* OT, Cliente, Referencia, 2ª Referencia y Fecha entrega a 11 px. */
body[data-route="ordenes"] .records-table tbody td:nth-child(1),
body[data-route="ordenes"] .records-table tbody td:nth-child(2),
body[data-route="ordenes"] .records-table tbody td:nth-child(3),
body[data-route="ordenes"] .records-table tbody td:nth-child(4),
body[data-route="ordenes"] .records-table tbody td:nth-child(7){
  font-size:11px!important;
}
/* Cliente en negrita 700. */
body[data-route="ordenes"] .records-table tbody td:nth-child(2){
  font-weight:700!important;
}


/* ==== WFERP 4.16.640 · Cliente listado OT Bold 700 ==== */
body[data-route="ordenes"] .records-table tbody td.order-client-cell{
  font-size:11px!important;
  font-weight:700!important;
}
body[data-route="ordenes"] .records-table tbody td.order-client-cell *{
  font-weight:700!important;
}

/* 4.17.012 · Roles y permisos granulares */
#menu a.nav-locked{
  opacity:.4;
  cursor:not-allowed;
  filter:grayscale(1);
}
#menu a.nav-locked:hover{background:transparent!important}
.module-readonly-banner{
  margin:0 0 12px;
  padding:10px 14px;
  border-radius:8px;
  background:#fff6e0;
  border:1px solid #f0d78c;
  color:#7a5c00;
  font-size:12px;
  font-weight:600;
}
.config-roles-layout{display:grid;grid-template-columns:220px 1fr;gap:16px}
.config-roles-nav{display:flex;flex-direction:column;gap:6px}
.config-roles-nav button{
  text-align:left;border:1px solid #d8e4f2;background:#fff;border-radius:8px;
  padding:10px 12px;font:inherit;color:#173b69;cursor:pointer;font-weight:600;font-size:12px;
}
.config-roles-nav button.active{background:#eef5ff;border-color:#1477F2;color:#1477F2}
.config-roles-add{display:flex;gap:6px;margin-top:6px}
.config-roles-add input{flex:1;border:1px solid #c7d9ec;border-radius:6px;padding:0 8px;height:32px;font-size:12px}
.config-roles-add button{border:0;background:#1477F2;color:#fff;border-radius:6px;padding:0 10px;font-size:11px;cursor:pointer}
.config-roles-matrix{width:100%;border-collapse:collapse}
.config-roles-matrix th,.config-roles-matrix td{padding:9px 10px;border-bottom:1px solid #e5edf6;text-align:left;font-size:12px}
.config-roles-matrix th{background:#edf4fb;color:#173b69;font-size:10px}
.config-roles-matrix select{border:1px solid #c7d9ec;border-radius:6px;height:30px;font-size:11px;padding:0 6px}
.config-roles-note{font-size:11px;color:#7990aa;margin:8px 0 14px}


/* ==== GestorProject Online 4.17.025 · Cabecera Clientes ==== */
/* Mismo pictograma de Clientes que en la barra lateral, 42 px, sin círculo. */
body[data-route="clientes"] .module-head-left{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
body[data-route="clientes"] #module-head-icon{
  display:inline-flex!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  align-items:center!important;
  justify-content:center!important;
  color:#7c3aed!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:0!important;
}
body[data-route="clientes"] #module-head-icon svg{
  display:block!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  stroke-width:1.8!important;
}

/* ==== GestorProject Online · Presupuestos · pictograma de cabecera 42px ==== */
body[data-route="presupuestos"] .module-head-left{
  display:flex!important;align-items:center!important;gap:12px!important;
}
body[data-route="presupuestos"] #module-head-icon{
  display:inline-flex!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  align-items:center!important;
  justify-content:center!important;
  color:#f39a0a!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:0!important;
}
body[data-route="presupuestos"] #module-head-icon svg{
  display:block!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  stroke-width:1.8!important;
}

/* ==== GestorProject Online · Albaranes/Facturas/Rectificativas ==== */
/* Mismo patrón exacto que Presupuestos: pictograma inline de 42px junto
   al título, sin círculo, color igual al de la barra lateral. */
body[data-route="albaranes"] .module-head-left,
body[data-route="facturas"] .module-head-left,
body[data-route="rectificativas"] .module-head-left,
body[data-route="cobros"] .module-head-left{
  display:flex!important;align-items:center!important;gap:12px!important;
}
body[data-route="albaranes"] #module-head-icon,
body[data-route="facturas"] #module-head-icon,
body[data-route="rectificativas"] #module-head-icon,
body[data-route="cobros"] #module-head-icon{
  display:inline-flex!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  align-items:center!important;
  justify-content:center!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:0!important;
}
body[data-route="albaranes"] #module-head-icon{color:#6f38ed!important}
body[data-route="facturas"] #module-head-icon{color:#1477f2!important}
body[data-route="rectificativas"] #module-head-icon{color:#f39a0a!important}
body[data-route="cobros"] #module-head-icon{color:#10a957!important}
body[data-route="albaranes"] #module-head-icon svg,
body[data-route="facturas"] #module-head-icon svg,
body[data-route="rectificativas"] #module-head-icon svg,
body[data-route="cobros"] #module-head-icon svg{
  display:block!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  stroke-width:1.8!important;
}

/* ==== GestorProject Online 4.17.026 · Proveedores · patrón visual maestro ==== */
/* Cabecera: mismo pictograma exacto de la barra lateral, 42 px, sin círculo. */
body[data-route="proveedores"] .module-head-left{
  display:flex!important;align-items:center!important;gap:12px!important;
}
body[data-route="proveedores"] #module-head-icon{
  display:inline-flex!important;width:42px!important;height:42px!important;min-width:42px!important;
  align-items:center!important;justify-content:center!important;color:#06b6d4!important;
  background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;
}
body[data-route="proveedores"] #module-head-icon svg{
  display:block!important;width:42px!important;height:42px!important;min-width:42px!important;stroke-width:1.8!important;
}
/* Tipografía base del patrón. */
body[data-route="proveedores"] .module-head h1{font-size:22px!important;font-weight:700!important}
body[data-route="proveedores"] .module-head p{font-size:11px!important;font-weight:400!important}
body[data-route="proveedores"] .module-head .breadcrumb{font-size:9px!important;font-weight:400!important}
body[data-route="proveedores"] .module-kpi-copy small{font-size:10px!important;font-weight:600!important}
body[data-route="proveedores"] .module-kpi-copy strong{font-size:22px!important;font-weight:700!important}
body[data-route="proveedores"] .module-kpi-copy span{font-size:9px!important;font-weight:400!important}
body[data-route="proveedores"] .module-kpi-icon{width:44px!important;height:44px!important;font-size:20px!important}
/* Barra contextual horizontal inmediatamente después de KPI. */
body[data-route="proveedores"] #client-selected-bar{min-height:68px!important;margin:10px 0!important}
body[data-route="proveedores"] .provider-selected-actions{display:grid!important;grid-template-columns:repeat(4,minmax(100px,1fr))!important;flex:0 1 520px!important}
body[data-route="proveedores"] .provider-selected-actions button{min-height:68px!important;font-size:11px!important;font-weight:600!important}
body[data-route="proveedores"] .provider-selected-actions button .wf-svg-icon{width:24px!important;height:24px!important}
/* Filtros, buscador y acciones. */
body[data-route="proveedores"] .module-toolbar select,
body[data-route="proveedores"] .module-toolbar input{height:38px!important;font-size:11px!important}
body[data-route="proveedores"] .module-toolbar .wf-action-btn{height:38px!important;font-size:10px!important;font-weight:600!important}
body[data-route="proveedores"] .module-toolbar .wf-action-btn .wf-svg-icon{width:17px!important;height:17px!important}
/* Tabla. */
body[data-route="proveedores"] #records-table th{font-size:10px!important;font-weight:600!important}
body[data-route="proveedores"] #records-table td{font-size:11px!important;font-weight:400!important}
body[data-route="proveedores"] .client-row-actions .wf-svg-icon{width:15px!important;height:15px!important}
body[data-route="proveedores"] .client-row-actions small{font-size:8px!important}


/* ==== GestorProject Online 4.17.027 · Proveedores = jerarquía Clientes ==== */
/* La barra contextual ocupa exactamente el mismo nivel y geometría que Clientes. */
body[data-route="proveedores"] #client-selected-bar{
  min-height:78px!important;
  margin:0 0 10px 0!important;
  padding:10px 14px!important;
}
body[data-route="proveedores"] .provider-selected-actions{
  display:flex!important;
  grid-template-columns:none!important;
  flex:0 0 auto!important;
  gap:6px!important;
}
body[data-route="proveedores"] .provider-selected-actions button{
  min-width:106px!important;
  width:auto!important;
  height:40px!important;
  min-height:40px!important;
  padding:0 12px!important;
  font-size:11px!important;
  font-weight:700!important;
}
body[data-route="proveedores"] .provider-selected-actions button .wf-svg-icon{
  width:18px!important;
  height:18px!important;
}
/* Misma escala de avatar, nombre y texto secundario que Clientes. */
body[data-route="proveedores"] .client-selected-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  font-size:14px!important;
}
body[data-route="proveedores"] .client-selected-copy strong{
  font-size:17px!important;
  font-weight:700!important;
}
body[data-route="proveedores"] .client-selected-copy span{
  margin-top:6px!important;
  font-size:10px!important;
}
/* Toolbar inmediatamente debajo de la barra contextual, como Clientes. */
body[data-route="proveedores"] .client-desktop-toolbar{
  min-height:58px!important;
  padding:8px 12px!important;
}


/* =====================================================================
   4.17.028 VER1 — PROVEEDORES · PATRÓN VISUAL MAESTRO DE CLIENTES
   ===================================================================== */

/* 1. Pictograma + título */
body[data-route="proveedores"] .module-heading-icon,
body[data-route="proveedores"] .module-title-icon,
body[data-route="proveedores"] .page-title-icon{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body[data-route="proveedores"] .module-heading-icon svg,
body[data-route="proveedores"] .module-title-icon svg,
body[data-route="proveedores"] .page-title-icon svg{
  width:42px!important;
  height:42px!important;
}
body[data-route="proveedores"] .module-heading h1,
body[data-route="proveedores"] .module-title h1,
body[data-route="proveedores"] .page-title h1{
  font-size:22px!important;
  line-height:1.1!important;
  font-weight:700!important;
}
body[data-route="proveedores"] .module-heading p,
body[data-route="proveedores"] .module-subtitle,
body[data-route="proveedores"] .page-subtitle{
  font-size:11px!important;
  line-height:1.3!important;
  font-weight:400!important;
}

/* 2. KPI */
body[data-route="proveedores"] .kpi-card,
body[data-route="proveedores"] .module-kpi-card{
  min-height:88px!important;
  height:88px!important;
}
body[data-route="proveedores"] .kpi-label,
body[data-route="proveedores"] .module-kpi-label{
  font-size:10px!important;
  font-weight:600!important;
}
body[data-route="proveedores"] .kpi-value,
body[data-route="proveedores"] .module-kpi-value{
  font-size:23px!important;
  line-height:1!important;
  font-weight:700!important;
}
body[data-route="proveedores"] .kpi-sub,
body[data-route="proveedores"] .kpi-foot,
body[data-route="proveedores"] .module-kpi-sub{
  font-size:9px!important;
  font-weight:400!important;
}

/* 3. Barra contextual / menú horizontal */
body[data-route="proveedores"] #client-selected-bar{
  min-height:68px!important;
  height:68px!important;
  margin:0 0 10px 0!important;
  padding:8px 12px!important;
}
body[data-route="proveedores"] .client-selected-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
}
body[data-route="proveedores"] .client-selected-copy strong{
  font-size:16px!important;
  line-height:1.15!important;
  font-weight:700!important;
}
body[data-route="proveedores"] .client-selected-copy span{
  margin-top:4px!important;
  font-size:10px!important;
  line-height:1.2!important;
}
body[data-route="proveedores"] .provider-selected-actions{
  display:flex!important;
  align-items:stretch!important;
  gap:6px!important;
}
body[data-route="proveedores"] .provider-selected-actions button{
  height:40px!important;
  min-height:40px!important;
  padding:0 14px!important;
  font-size:11px!important;
  font-weight:600!important;
}
body[data-route="proveedores"] .provider-selected-actions button .wf-svg-icon{
  width:18px!important;
  height:18px!important;
}

/* 4 + 5. Filtros, buscador y botones */
body[data-route="proveedores"] .client-desktop-toolbar{
  min-height:56px!important;
  padding:8px 10px!important;
  align-items:center!important;
}
body[data-route="proveedores"] .client-desktop-toolbar input,
body[data-route="proveedores"] .client-desktop-toolbar select,
body[data-route="proveedores"] .client-desktop-toolbar .filter-control{
  height:38px!important;
  min-height:38px!important;
  font-size:11px!important;
}
body[data-route="proveedores"] .client-desktop-toolbar button{
  height:38px!important;
  min-height:38px!important;
  font-size:10px!important;
  font-weight:600!important;
}
body[data-route="proveedores"] .client-desktop-toolbar button .wf-svg-icon{
  width:17px!important;
  height:17px!important;
}

/* 6. Cabecera de tabla */
body[data-route="proveedores"] table thead th,
body[data-route="proveedores"] .data-table thead th{
  height:38px!important;
  min-height:38px!important;
  font-size:10px!important;
  font-weight:600!important;
  text-transform:uppercase!important;
}

/* 7. Filas */
body[data-route="proveedores"] table tbody tr,
body[data-route="proveedores"] .data-table tbody tr{
  height:44px!important;
}
body[data-route="proveedores"] table tbody td,
body[data-route="proveedores"] .data-table tbody td{
  font-size:11px!important;
  font-weight:400!important;
  vertical-align:middle!important;
}
body[data-route="proveedores"] table tbody td:first-child,
body[data-route="proveedores"] .data-table tbody td:first-child{
  font-weight:600!important;
}
body[data-route="proveedores"] .table-avatar,
body[data-route="proveedores"] .row-avatar,
body[data-route="proveedores"] tbody .avatar{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  min-height:32px!important;
  font-size:10px!important;
}
body[data-route="proveedores"] .status-badge,
body[data-route="proveedores"] tbody .badge{
  font-size:8px!important;
}
body[data-route="proveedores"] tbody .row-actions button,
body[data-route="proveedores"] tbody td:last-child button{
  min-width:30px!important;
  min-height:32px!important;
}
body[data-route="proveedores"] tbody .row-actions svg,
body[data-route="proveedores"] tbody td:last-child button svg{
  width:15px!important;
  height:15px!important;
}


/* =====================================================================
   4.17.029 VER1 — PROVEEDORES · MENÚ HORIZONTAL PATRÓN MAESTRO
   Referencia: alto 60–70 px, icono 24–28 px, texto 11–12 px semibold,
   seleccionado con fondo suave + línea inferior 3 px.
   ===================================================================== */

body[data-route="proveedores"] #client-selected-bar{
  min-height:68px!important;
  height:68px!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:stretch!important;
}

body[data-route="proveedores"] .provider-selected-actions{
  height:68px!important;
  min-height:68px!important;
  display:flex!important;
  align-items:stretch!important;
  gap:0!important;
}

body[data-route="proveedores"] .provider-selected-actions button{
  position:relative!important;
  height:68px!important;
  min-height:68px!important;
  min-width:118px!important;
  padding:8px 18px!important;
  border-radius:0!important;
  border-top:0!important;
  border-bottom:3px solid transparent!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  box-shadow:none!important;
}

body[data-route="proveedores"] .provider-selected-actions button .wf-svg-icon,
body[data-route="proveedores"] .provider-selected-actions button svg{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  min-height:26px!important;
}

/* Elemento seleccionado: fondo suave + línea inferior 3 px */
body[data-route="proveedores"] .provider-selected-actions button.active,
body[data-route="proveedores"] .provider-selected-actions button.is-active,
body[data-route="proveedores"] .provider-selected-actions button[aria-selected="true"],
body[data-route="proveedores"] .provider-selected-actions button:first-child{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
}

/* El contenido identificativo del proveedor conserva su zona izquierda */
body[data-route="proveedores"] .client-selected-main{
  min-height:68px!important;
  display:flex!important;
  align-items:center!important;
}


/* =====================================================================
   4.17.030 VER1 — CLIENTES · MENÚ HORIZONTAL PATRÓN MAESTRO
   Alto 60–70 px · icono 24–28 px · texto 11–12 px Semibold
   Seleccionado: fondo suave + línea inferior 3 px.
   ===================================================================== */

body[data-route="clientes"] #client-selected-bar{
  min-height:68px!important;
  height:68px!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:stretch!important;
}

/* Los botones contextuales Ficha / Contacto / Comercial / Documentos / WhatsApp */
body[data-route="clientes"] #client-selected-bar button{
  position:relative!important;
  height:68px!important;
  min-height:68px!important;
  min-width:118px!important;
  padding:8px 18px!important;
  border-radius:0!important;
  border-bottom-width:3px!important;
  border-bottom-style:solid!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  box-shadow:none!important;
}

body[data-route="clientes"] #client-selected-bar button .wf-svg-icon,
body[data-route="clientes"] #client-selected-bar button svg{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  min-height:26px!important;
}

/* Ficha es la vista principal/seleccionada de la barra */
body[data-route="clientes"] #client-selected-bar button.active,
body[data-route="clientes"] #client-selected-bar button.is-active,
body[data-route="clientes"] #client-selected-bar button[aria-selected="true"],
body[data-route="clientes"] #client-selected-bar button:first-of-type{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
}

/* Mantener centrada verticalmente la identificación del cliente */
body[data-route="clientes"] #client-selected-bar > :first-child{
  min-height:68px!important;
  align-items:center!important;
}


/* =====================================================================
   4.17.031 VER1 — MENÚ HORIZONTAL INTERACTIVO · CLIENTES + PROVEEDORES
   Hover visible. Click conserva la función existente.
   Activo: fondo suave + línea inferior 3 px.
   ===================================================================== */

/* Transición y cursor: no altera listeners ni navegación existentes */
body[data-route="clientes"] #client-selected-bar button,
body[data-route="proveedores"] #supplier-selected-bar button,
body[data-route="proveedores"] #provider-selected-bar button {
  cursor:pointer!important;
  transition:
    background-color .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .08s ease,
    box-shadow .16s ease!important;
}

/* Hover: respuesta visual inequívoca */
body[data-route="clientes"] #client-selected-bar button:hover,
body[data-route="proveedores"] #supplier-selected-bar button:hover,
body[data-route="proveedores"] #provider-selected-bar button:hover {
  background:#e8f3ff!important;
  border-bottom-color:#4a9cff!important;
  box-shadow:inset 0 -3px 0 #4a9cff!important;
}

/* Pulsación física */
body[data-route="clientes"] #client-selected-bar button:active,
body[data-route="proveedores"] #supplier-selected-bar button:active,
body[data-route="proveedores"] #provider-selected-bar button:active {
  background:#dcecff!important;
  transform:translateY(1px)!important;
}

/* Accesibilidad por teclado */
body[data-route="clientes"] #client-selected-bar button:focus-visible,
body[data-route="proveedores"] #supplier-selected-bar button:focus-visible,
body[data-route="proveedores"] #provider-selected-bar button:focus-visible {
  outline:2px solid #1677ff!important;
  outline-offset:-2px!important;
}

/* Estado seleccionado */
body[data-route="clientes"] #client-selected-bar button.active,
body[data-route="clientes"] #client-selected-bar button.is-active,
body[data-route="clientes"] #client-selected-bar button[aria-selected="true"],
body[data-route="proveedores"] #supplier-selected-bar button.active,
body[data-route="proveedores"] #supplier-selected-bar button.is-active,
body[data-route="proveedores"] #supplier-selected-bar button[aria-selected="true"],
body[data-route="proveedores"] #provider-selected-bar button.active,
body[data-route="proveedores"] #provider-selected-bar button.is-active,
body[data-route="proveedores"] #provider-selected-bar button[aria-selected="true"] {
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
  box-shadow:inset 0 -3px 0 #1677ff!important;
}
/* =====================================================================
   4.17.055 VER1 — PRESUPUESTOS · MENÚ HORIZONTAL PATRÓN MAESTRO
   Mismo estilo y medidas que Clientes: alto 68 px, icono 26 px,
   texto 12 px Semibold, seleccionado con fondo suave + línea inferior 3 px.
   Acciones: Enviar / Enviar proforma / Imprimir / Vista previa.
   4.17.107 · Extendido también a Facturas/Albaranes/Rectificativas.
   ===================================================================== */

body[data-route="presupuestos"] #client-selected-bar,
body[data-route="facturas"] #client-selected-bar,
body[data-route="albaranes"] #client-selected-bar,
body[data-route="rectificativas"] #client-selected-bar{
  min-height:68px!important;
  height:68px!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:stretch!important;
}
/* Los botones contextuales Enviar / Enviar proforma / Imprimir / Vista previa */
body[data-route="presupuestos"] #client-selected-bar button,
body[data-route="facturas"] #client-selected-bar button,
body[data-route="albaranes"] #client-selected-bar button,
body[data-route="rectificativas"] #client-selected-bar button{
  position:relative!important;
  height:68px!important;
  min-height:68px!important;
  min-width:118px!important;
  padding:8px 18px!important;
  border-radius:0!important;
  border-bottom-width:3px!important;
  border-bottom-style:solid!important;
  border-bottom-color:transparent!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:
    background-color .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .08s ease,
    box-shadow .16s ease!important;
}
body[data-route="presupuestos"] #client-selected-bar button .wf-svg-icon,
body[data-route="facturas"] #client-selected-bar button .wf-svg-icon,
body[data-route="albaranes"] #client-selected-bar button .wf-svg-icon,
body[data-route="rectificativas"] #client-selected-bar button .wf-svg-icon,
body[data-route="presupuestos"] #client-selected-bar button svg,
body[data-route="facturas"] #client-selected-bar button svg,
body[data-route="albaranes"] #client-selected-bar button svg,
body[data-route="rectificativas"] #client-selected-bar button svg{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  min-height:26px!important;
}
/* Hover: misma respuesta visual que Clientes */
body[data-route="presupuestos"] #client-selected-bar button:hover,
body[data-route="facturas"] #client-selected-bar button:hover,
body[data-route="albaranes"] #client-selected-bar button:hover,
body[data-route="rectificativas"] #client-selected-bar button:hover{
  background:#e8f3ff!important;
  border-bottom-color:#4a9cff!important;
  box-shadow:inset 0 -3px 0 #4a9cff!important;
}
/* Pulsación física */
body[data-route="presupuestos"] #client-selected-bar button:active,
body[data-route="facturas"] #client-selected-bar button:active,
body[data-route="albaranes"] #client-selected-bar button:active,
body[data-route="rectificativas"] #client-selected-bar button:active{
  background:#dcecff!important;
  transform:translateY(1px)!important;
}
/* Accesibilidad por teclado */
body[data-route="presupuestos"] #client-selected-bar button:focus-visible,
body[data-route="facturas"] #client-selected-bar button:focus-visible,
body[data-route="albaranes"] #client-selected-bar button:focus-visible,
body[data-route="rectificativas"] #client-selected-bar button:focus-visible{
  outline:2px solid #1677ff!important;
  outline-offset:-2px!important;
}
/* "Enviar" es la acción principal/seleccionada de la barra por defecto */
body[data-route="presupuestos"] #client-selected-bar button.active,
body[data-route="facturas"] #client-selected-bar button.active,
body[data-route="albaranes"] #client-selected-bar button.active,
body[data-route="rectificativas"] #client-selected-bar button.active,
body[data-route="presupuestos"] #client-selected-bar button.is-active,
body[data-route="facturas"] #client-selected-bar button.is-active,
body[data-route="albaranes"] #client-selected-bar button.is-active,
body[data-route="rectificativas"] #client-selected-bar button.is-active,
body[data-route="presupuestos"] #client-selected-bar button[aria-selected="true"],
body[data-route="facturas"] #client-selected-bar button[aria-selected="true"],
body[data-route="albaranes"] #client-selected-bar button[aria-selected="true"],
body[data-route="rectificativas"] #client-selected-bar button[aria-selected="true"],
body[data-route="presupuestos"] #client-selected-bar button:first-of-type,
body[data-route="facturas"] #client-selected-bar button:first-of-type,
body[data-route="albaranes"] #client-selected-bar button:first-of-type,
body[data-route="rectificativas"] #client-selected-bar button:first-of-type{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
  box-shadow:inset 0 -3px 0 #1677ff!important;
}
/* Mantener centrada verticalmente la identificación del registro seleccionado */
body[data-route="presupuestos"] #client-selected-bar > :first-child,
body[data-route="facturas"] #client-selected-bar > :first-child,
body[data-route="albaranes"] #client-selected-bar > :first-child,
body[data-route="rectificativas"] #client-selected-bar > :first-child{
  min-height:68px!important;
  align-items:center!important;
}
/* Las acciones se agrupan a la derecha, igual que en Clientes */
body[data-route="presupuestos"] #client-selected-bar .client-selected-actions,
body[data-route="facturas"] #client-selected-bar .client-selected-actions,
body[data-route="albaranes"] #client-selected-bar .client-selected-actions,
body[data-route="rectificativas"] #client-selected-bar .client-selected-actions{
  margin-left:auto!important;
}
/* 4.17.112 · La barra se queda siempre fija (mismo tamaño), con los
   botones atenuados y deshabilitados cuando no hay ningún registro
   seleccionado, en vez de desaparecer o encogerse. */
body[data-route="presupuestos"] #client-selected-bar button:disabled,
body[data-route="facturas"] #client-selected-bar button:disabled,
body[data-route="albaranes"] #client-selected-bar button:disabled,
body[data-route="rectificativas"] #client-selected-bar button:disabled{
  opacity:.35!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
}

/* 4.17.038 · Ficha de cliente: ajustes pedidos por el usuario.
   1) Título en bold 700, con máxima especificidad (ID) para ganar
      sin depender de cuál de las reglas anteriores gane la cascada.
   2) Los botones Cancelar/Guardar se quedan pegados a la derecha:
      el título ocupa todo el espacio disponible (flex:1) y las
      acciones dejan de repartirse al 50% con él. */
#record-modal.client-mode #record-title,
#record-modal.provider-mode #record-title,
#record-modal.provider-mode #record-title{
  font-weight:700!important;
}
#record-modal.client-mode .record-head-actions,
#record-modal.provider-mode .record-head-actions,
#record-modal.provider-mode .record-head-actions{
  flex:0 0 auto!important;
  margin-left:auto!important;
}

/* Campo con formato inválido (CIF/NIF) */
.field-invalid{
  border-color:#e23448!important;
  background:#fff6f6!important;
}
.client-field-hint{
  display:block;
  font-size:9px;
  color:#8a97ab;
  margin-top:4px;
}

/* 4.17.143 · Cobros: misma barra de "documento seleccionado" (altura, pestañas, hover) que Presupuestos/Ventas */
body[data-route="cobros"] .module-head-left{
  display:flex!important;align-items:center!important;gap:12px!important;
}
body[data-route="cobros"] #module-head-icon{
  display:inline-flex!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  align-items:center!important;
  justify-content:center!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:0!important;
}
body[data-route="cobros"] #module-head-icon svg{
  display:block!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  stroke-width:1.8!important;
}
body[data-route="cobros"] #client-selected-bar{
  min-height:68px!important;
  height:68px!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:stretch!important;
}
body[data-route="cobros"] #client-selected-bar button{
  position:relative!important;
  height:68px!important;
  min-height:68px!important;
  min-width:118px!important;
  padding:8px 18px!important;
  border-radius:0!important;
  border-bottom-width:3px!important;
  border-bottom-style:solid!important;
  border-bottom-color:transparent!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  font-size:12px!important;
  line-height:1!important;
  font-weight:600!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:
    background-color .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .08s ease,
    box-shadow .16s ease!important;
}
body[data-route="cobros"] #client-selected-bar button .wf-svg-icon{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  min-height:26px!important;
}
body[data-route="cobros"] #client-selected-bar button svg{
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  min-height:26px!important;
}
body[data-route="cobros"] #client-selected-bar button:hover{
  background:#e8f3ff!important;
  border-bottom-color:#4a9cff!important;
  box-shadow:inset 0 -3px 0 #4a9cff!important;
}
body[data-route="cobros"] #client-selected-bar button:active{
  background:#dcecff!important;
  transform:translateY(1px)!important;
}
body[data-route="cobros"] #client-selected-bar button:focus-visible{
  outline:2px solid #1677ff!important;
  outline-offset:-2px!important;
}
body[data-route="cobros"] #client-selected-bar button.active{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
  box-shadow:inset 0 -3px 0 #1677ff!important;
}
body[data-route="cobros"] #client-selected-bar button.is-active{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
  box-shadow:inset 0 -3px 0 #1677ff!important;
}
body[data-route="cobros"] #client-selected-bar button[aria-selected="true"]{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
  box-shadow:inset 0 -3px 0 #1677ff!important;
}
body[data-route="cobros"] #client-selected-bar button:first-of-type{
  background:#eef6ff!important;
  border-bottom-color:#1677ff!important;
  box-shadow:inset 0 -3px 0 #1677ff!important;
}
/* 4.17.154 · En Cobros los botones de esta barra son pestañas de
   filtro, no una acción principal fija — anulamos el resaltado
   automático del primer botón y dejamos que SOLO .is-active mande. */
body[data-route="cobros"] #client-selected-bar button:first-of-type:not(.is-active){
  background:transparent!important;
  border-bottom-color:transparent!important;
  box-shadow:none!important;
}
body[data-route="cobros"] #client-selected-bar button{color:#5a7391!important}
body[data-route="cobros"] #client-selected-bar button.is-active{color:#1477f2!important}
body[data-route="cobros"] #client-selected-bar > :first-child{
  min-height:68px!important;
  align-items:center!important;
}
body[data-route="cobros"] #client-selected-bar .client-selected-actions{
  margin-left:auto!important;
}
body[data-route="cobros"] #client-selected-bar button:disabled{
  opacity:.35!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
}
