/* 4.16.458 · Cabecera operativa y estado de jornada */
.top-work-status{margin-left:22px;min-width:205px;height:42px;border:1px solid var(--line);border-radius:9px;background:#fff;display:flex;align-items:center;gap:9px;padding:5px 12px;cursor:pointer;text-align:left;color:var(--text);transition:.15s ease}
.top-work-status:hover{box-shadow:0 3px 12px rgba(18,56,104,.10);transform:translateY(-1px)}
.work-status-dot{width:11px;height:11px;border-radius:50%;flex:0 0 11px;background:#94a3b8;box-shadow:0 0 0 4px #eef2f7}
.work-status-copy{display:flex;flex-direction:column;min-width:0}.work-status-copy b{font-size:11px;line-height:1.15;letter-spacing:.15px}.work-status-copy small{font-size:9px;color:#6d809d;margin-top:3px;white-space:nowrap}
.top-work-status.working{border-color:#bfe9d0;background:#f4fcf7}.top-work-status.working .work-status-dot{background:#10aa5b;box-shadow:0 0 0 4px #dff6e8}.top-work-status.working b{color:#087d43}
.top-work-status.paused{border-color:#f2d6a3;background:#fffaf0}.top-work-status.paused .work-status-dot{background:#f39a0a;box-shadow:0 0 0 4px #fff0d2}.top-work-status.paused b{color:#b56b00}
.top-work-status.outside{border-color:#f1c1c7;background:#fff7f8}.top-work-status.outside .work-status-dot{background:#e54855;box-shadow:0 0 0 4px #fde5e8}.top-work-status.outside b{color:#c72e3c}
body.sidebar-collapsed .app-shell{grid-template-columns:70px 1fr}body.sidebar-collapsed .sidebar{width:70px}body.sidebar-collapsed .brand strong,body.sidebar-collapsed .sidebar nav span,body.sidebar-collapsed .connection{display:none}body.sidebar-collapsed .brand{padding:0;justify-content:center}body.sidebar-collapsed .sidebar nav a{justify-content:center;font-size:18px;padding-left:8px;padding-right:8px}
@media(max-width:1050px){.top-work-status{min-width:0}.work-status-copy small{display:none}}


/* 4.16.460 · Cabecera WFERP: logo Desktop, jornada a la derecha y almanaque activo */
.desktop-brand{
  height:118px!important;background:#fff!important;color:#073b83!important;
  flex-direction:column!important;justify-content:center!important;gap:7px!important;
  padding:10px 8px!important;border-bottom:1px solid #e3ebf5;
}
.wf-logo-box{
  width:58px;height:58px;background:#123f80;color:#fff;display:flex;flex-direction:column;
  align-items:center;justify-content:center;line-height:1;border-radius:1px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)
}
.wf-logo-box b{font-size:23px;letter-spacing:.6px}.wf-logo-box small{font-size:11px;font-weight:800;margin-top:3px;letter-spacing:.8px}
.brand-client{display:flex;flex-direction:column;align-items:center;line-height:1.15;text-align:center;color:#113d78}
.brand-client small{font-size:8px;font-weight:700;letter-spacing:.1px}
.topbar .hamburger{margin-right:0!important}
.topbar .top-work-status{margin-left:13px;margin-right:0;min-width:205px}
#dashboard-calendar-button{cursor:pointer;transition:.15s ease}
#dashboard-calendar-button:hover{border-color:#8fbcf5;background:#f6faff;box-shadow:0 3px 10px rgba(21,72,135,.08)}
body.sidebar-collapsed .desktop-brand{height:78px!important;padding:8px 4px!important}
body.sidebar-collapsed .brand-client{display:none!important}
body.sidebar-collapsed .wf-logo-box{width:46px;height:46px}
body.sidebar-collapsed .wf-logo-box b{font-size:18px}
body.sidebar-collapsed .wf-logo-box small{font-size:9px}
@media(max-width:1050px){.topbar .top-work-status{min-width:44px;padding:5px 9px}.topbar .work-status-copy{display:none}}


/* 4.16.461 · Identidad lateral y agenda a pantalla completa */
.brand-client{gap:1px!important;margin-top:1px!important}
.brand-client small{font-size:10px!important;font-weight:800!important;letter-spacing:.15px!important;line-height:1.15!important}
#dashboard-agenda-link{cursor:pointer}
#top-modal.agenda-fullscreen{padding:58px 18px 18px!important;align-items:stretch!important;justify-content:stretch!important;background:rgba(28,47,70,.44)!important}
#top-modal.agenda-fullscreen .top-modal-dialog{width:100%!important;max-width:none!important;height:calc(100vh - 76px)!important;max-height:none!important;overflow:hidden!important;border-radius:8px!important;display:flex!important;flex-direction:column!important}
#top-modal.agenda-fullscreen .top-modal-head{min-height:58px!important;padding:12px 18px!important;flex:0 0 auto!important}
#top-modal.agenda-fullscreen .top-modal-head h2{font-size:20px!important}
#top-modal.agenda-fullscreen .top-modal-body{flex:1!important;min-height:0!important;overflow:auto!important;padding:14px 18px 22px!important;background:#f5f9fd!important}
.dashboard-agenda-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px;padding:10px 13px;border:1px solid #cfe0ef;border-radius:7px;background:#fff;color:#173b69}
.dashboard-agenda-toolbar>div{display:flex;align-items:baseline;gap:7px}.dashboard-agenda-toolbar b{font-size:20px;color:#1477f2}.dashboard-agenda-toolbar span{font-size:11px;font-weight:700}.dashboard-agenda-toolbar small{font-size:10px;color:#6d8299}
#top-modal.agenda-fullscreen .dashboard-agenda-modal{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-content:start!important}
#top-modal.agenda-fullscreen .dashboard-agenda-modal article{min-height:88px!important;display:grid!important;grid-template-columns:62px minmax(0,1fr) auto!important;align-items:center!important;gap:12px!important;padding:12px 14px!important;border:1px solid #cfdeed!important;border-radius:7px!important;background:#fff!important;box-shadow:0 1px 2px rgba(23,56,94,.03)!important}
.agenda-date-tile{width:54px;height:58px;border-radius:7px;background:#edf6ff;border:1px solid #bcd8f5;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#1477f2}.agenda-date-tile b{font-size:20px!important;line-height:1!important}.agenda-date-tile small{font-size:9px!important;font-weight:800!important;margin-top:4px!important;color:#54779d!important}
.agenda-event-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.agenda-event-copy .agenda-full-date{font-size:9px;color:#6b8098;text-transform:capitalize}.agenda-event-copy strong{font-size:13px!important;color:#123b6d!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agenda-event-copy small{font-size:10px!important;color:#6a8098!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-agenda-modal time{font-size:12px;font-weight:800;color:#1477f2;align-self:center}.agenda-empty{min-height:calc(100vh - 190px)!important;background:#fff;border:1px dashed #c7d8e9;border-radius:8px}
@media(max-width:900px){#top-modal.agenda-fullscreen .dashboard-agenda-modal{grid-template-columns:1fr!important}#top-modal.agenda-fullscreen{padding:54px 8px 8px!important}#top-modal.agenda-fullscreen .top-modal-dialog{height:calc(100vh - 62px)!important}.brand-client small{font-size:9px!important}}

/* 4.16.462 · Agenda extendida en dashboard e identidad lateral */
.brand-client small{
  font-size:11px!important;
  font-weight:600!important;
  line-height:1.25!important;
  letter-spacing:.01em!important;
}
#dashboard-view .bottom-row{
  grid-template-columns:1fr!important;
  align-items:stretch!important;
}
#dashboard-view .agenda-panel,
#dashboard-view .quick-panel{
  grid-column:1/-1!important;
}
#dashboard-view .agenda-panel{
  min-height:250px!important;
}
#dashboard-view .agenda-cards{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  padding:0 14px 14px!important;
  align-content:start!important;
}
#dashboard-view .agenda-cards article{
  min-height:74px!important;
  cursor:pointer!important;
}
#dashboard-view .quick-panel{margin-top:0!important}
@media(min-width:1500px){#dashboard-view .agenda-cards{grid-template-columns:repeat(6,minmax(0,1fr))!important}}
@media(max-width:1100px){#dashboard-view .agenda-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:820px){#dashboard-view .agenda-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:520px){#dashboard-view .agenda-cards{grid-template-columns:1fr!important}}


/* 4.16.463 · Navegación lateral con pictogramas profesionales WFERP */
.sidebar nav a{
  gap:10px;
  color:#17325c;
  font-weight:500;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.sidebar nav a .nav-picto, .sidebar nav .nav-group-toggle .nav-picto{
  width:22px;height:22px;min-width:22px;
  display:grid;place-items:center;
  color:#1477f2;
}
.sidebar nav a .nav-picto svg, .sidebar nav .nav-group-toggle .nav-picto svg{width:17px;height:17px;display:block}
.sidebar nav a .nav-picto.nav-blue, .sidebar nav .nav-group-toggle .nav-picto.nav-blue{color:#1477f2}
.sidebar nav a .nav-picto.nav-violet, .sidebar nav .nav-group-toggle .nav-picto.nav-violet{color:#6f38ed}
.sidebar nav a .nav-picto.nav-orange, .sidebar nav .nav-group-toggle .nav-picto.nav-orange{color:#f39a0a}
.sidebar nav a .nav-picto.nav-cyan, .sidebar nav .nav-group-toggle .nav-picto.nav-cyan{color:#08a6b7}
.sidebar nav a .nav-picto.nav-green, .sidebar nav .nav-group-toggle .nav-picto.nav-green{color:#10a957}
.sidebar nav a .nav-picto.nav-red, .sidebar nav .nav-group-toggle .nav-picto.nav-red{color:#ef4058}
.sidebar nav a:hover{background:#f4f8fd;color:#17325c}
.sidebar nav a.active{
  background:#eef5ff;
  color:#0b4b9c;
  font-weight:650;
  box-shadow:inset 3px 0 0 #1477f2;
}
.sidebar nav a.active .nav-picto{color:#1477f2}
@media(max-width:820px){
  .sidebar nav a .nav-picto{width:26px;height:26px;min-width:26px}
  .sidebar nav a .nav-picto svg{width:20px;height:20px}
}


/* 4.16.477 · Control horario Online: elimina banda heredada, listado a pie y footer WFERP */
body[data-route="control_horario"] .content{height:calc(100vh - 58px)!important;min-height:0!important;padding:6px 10px 0!important;overflow:hidden!important;box-sizing:border-box!important;}
body[data-route="control_horario"] #module-view{height:100%!important;min-height:0!important;padding:0!important;margin:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:0!important;}
body[data-route="control_horario"] #module-view>.module-card,body[data-route="control_horario"] #module-kpis,body[data-route="control_horario"] #client-selected-bar,body[data-route="control_horario"] #material-sector-menu,body[data-route="control_horario"] #material-sector-context,body[data-route="control_horario"] #order-sector-menu,body[data-route="control_horario"] #order-profile{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}
body[data-route="control_horario"] .module-head{flex:0 0 54px!important;height:54px!important;min-height:54px!important;margin:0!important;padding:0 0 5px!important;border:0!important;background:transparent!important;box-shadow:none!important;align-items:flex-start!important;box-sizing:border-box!important;}
body[data-route="control_horario"] .attendance-online-shell{flex:1 1 0!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important;gap:6px!important;overflow:hidden!important;}
body[data-route="control_horario"] .att-desktop-grid,body[data-route="control_horario"] .att-presence-row{flex:0 0 auto!important;}
body[data-route="control_horario"] .att-list-card{flex:1 1 0!important;min-height:0!important;height:0!important;display:flex!important;flex-direction:column!important;margin:0!important;overflow:hidden!important;}
body[data-route="control_horario"] .att-list-head{flex:0 0 auto!important;}
body[data-route="control_horario"] .att-table-wrap{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;overflow:auto!important;}
body[data-route="control_horario"] .att-table-footer{flex:0 0 28px!important;min-height:28px!important;margin:0!important;}
body[data-route="control_horario"] .att-compliance-footer{flex:0 0 29px!important;height:29px!important;min-height:29px!important;display:grid!important;grid-template-columns:1.35fr 2.05fr 1.65fr 1fr!important;align-items:center!important;gap:12px!important;background:#0b4a86!important;color:#fff!important;padding:0 12px!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;font-family:"Segoe UI",Arial,sans-serif!important;font-size:10px!important;font-weight:650!important;line-height:1!important;box-sizing:border-box!important;}
body[data-route="control_horario"] .att-compliance-footer span{color:#fff!important;white-space:nowrap!important;}
body[data-route="control_horario"] .att-compliance-footer span:first-child{color:#2fe1c2!important;font-weight:800!important;}
body[data-route="control_horario"] .att-compliance-footer span:nth-child(2),body[data-route="control_horario"] .att-compliance-footer span:nth-child(3){text-align:center!important;}
body[data-route="control_horario"] .att-compliance-footer span:last-child{text-align:right!important;}


/* 4.16.481 · Órdenes de trabajo: paridad visual con Base industrial */
body[data-route="ordenes"] .module-view{
  height:calc(100vh - 92px);
  min-height:650px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding-bottom:0;
}
body[data-route="ordenes"] .module-head,
body[data-route="ordenes"] .module-kpis,
body[data-route="ordenes"] #order-sector-menu{flex:0 0 auto}
body[data-route="ordenes"] .module-card{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
body[data-route="ordenes"] .records-wrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none !important;
  overflow:auto;
}
body[data-route="ordenes"] .order-pagination{
  flex:0 0 auto;
  margin-top:auto;
  padding:9px 10px 8px;
  background:#fff;
  border-top:1px solid #e4edf7;
}
body[data-route="ordenes"] .module-toolbar.orders-toolbar{
  grid-template-columns:170px minmax(340px,1fr) auto;
  align-items:center;
}
body[data-route="ordenes"] .orders-search-label{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
  color:#173d6b;
  font-size:9px;
  font-weight:600;
}
body[data-route="ordenes"] .orders-search-label>span{display:block;line-height:34px}
body[data-route="ordenes"] .orders-search-label input{
  width:100% !important;
  min-width:0;
  height:34px;
  padding:0 11px;
  border:1px solid #c8d9eb;
  border-radius:6px;
  background:#fff;
  color:#153d70;
  font-size:10px;
}
body[data-route="ordenes"] .orders-search-label input::placeholder{color:#8295ad;opacity:1}
body[data-route="ordenes"] .orders-search-label input:focus{
  border-color:#1677ee;
  box-shadow:0 0 0 2px rgba(22,119,238,.08);
}

/* El menú de secciones de OT adopta la misma jerarquía y comportamiento que Base industrial. */
.order-sector-menu{
  display:flex !important;
  grid-template-columns:none !important;
  align-items:stretch;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  gap:0;
  min-height:76px;
  border-radius:12px;
  border:1px solid #d9e5f2;
  background:#fff;
  box-shadow:0 2px 8px rgba(21,58,99,.04);
  margin:0 0 10px;
}
.order-sector-btn{
  flex:1 0 102px;
  min-width:102px;
  min-height:74px;
  padding:8px 7px 7px;
  border:0;
  border-right:1px solid #e6eef7;
  position:relative;
  background:#fff;
  color:#25486f;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  cursor:pointer;
  font-family:inherit;
  transition:background .16s ease,box-shadow .16s ease;
}
.order-sector-btn:last-child{border-right:0}
.order-sector-btn:hover{
  background:color-mix(in srgb,var(--order-accent) 7%,white);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--order-accent) 18%,transparent);
}
.order-sector-btn.active{
  background:color-mix(in srgb,var(--order-accent) 10%,white) !important;
  box-shadow:inset 0 -4px var(--order-accent) !important;
  color:#143b68 !important;
}
.order-sector-icon{
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  margin:0 auto 4px;
  color:var(--order-accent);
}
.order-sector-icon svg{width:29px;height:29px;display:block}
.order-sector-btn small{
  display:block;
  font-size:10.5px;
  line-height:1.1;
  font-weight:750;
  letter-spacing:.01em;
  color:#173d6b;
  white-space:normal;
}

/* Prioridad urgente con la misma señal intermitente de Desktop. */
@keyframes wf-order-urgent-pulse{
  0%,42%{background:#e82238;color:#fff;box-shadow:0 0 0 0 rgba(232,34,56,.18)}
  50%,92%{background:#ffecf0;color:#d61f36;box-shadow:0 0 0 2px rgba(232,34,56,.08)}
  100%{background:#e82238;color:#fff;box-shadow:0 0 0 0 rgba(232,34,56,.18)}
}
body[data-route="ordenes"] .order-badge.urgent{
  animation:wf-order-urgent-pulse 1.15s steps(1,end) infinite;
  border:1px solid rgba(217,31,53,.22);
}
@media (prefers-reduced-motion:reduce){body[data-route="ordenes"] .order-badge.urgent{animation:none}}
@media(max-width:1200px){
  body[data-route="ordenes"] .module-view{height:auto;min-height:calc(100vh - 96px);overflow:visible}
  body[data-route="ordenes"] .module-card{min-height:560px}
  body[data-route="ordenes"] .module-toolbar.orders-toolbar{grid-template-columns:150px 1fr}
  body[data-route="ordenes"] .records-wrap{min-height:440px}
}

/* 4.16.482 · Órdenes de trabajo: corrección definitiva del campo Buscar */
body[data-route="ordenes"] .module-toolbar.orders-toolbar{
  grid-template-columns:190px minmax(420px,1fr) auto!important;
  column-gap:14px!important;
  row-gap:8px!important;
  align-items:center!important;
}
body[data-route="ordenes"] .orders-toolbar .client-filter-label{
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  font-size:11px!important;
  font-weight:650!important;
  color:#183d6c!important;
  white-space:nowrap!important;
}
body[data-route="ordenes"] .orders-toolbar .client-filter-label select{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 12px!important;
  font-size:11px!important;
  font-weight:650!important;
  border:1px solid #b9cde2!important;
  border-radius:6px!important;
  color:#143b6b!important;
  background:#fff!important;
}
body[data-route="ordenes"] .orders-search-label{
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr)!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  font-size:11px!important;
  font-weight:650!important;
  color:#183d6c!important;
  white-space:nowrap!important;
}
body[data-route="ordenes"] .orders-search-label>span{
  display:block!important;
  width:54px!important;
  line-height:38px!important;
  text-align:left!important;
  font-size:11px!important;
  font-weight:650!important;
  color:#183d6c!important;
}
body[data-route="ordenes"] .orders-search-label input#module-search{
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:0 13px!important;
  border:1px solid #b9cde2!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#123b6e!important;
  font-family:"Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:38px!important;
  outline:none!important;
  box-shadow:none!important;
}
body[data-route="ordenes"] .orders-search-label input#module-search::placeholder{
  color:#667f9c!important;
  opacity:1!important;
  font-size:12px!important;
  font-weight:400!important;
}
body[data-route="ordenes"] .orders-search-label input#module-search:focus{
  border-color:#1477f2!important;
  box-shadow:0 0 0 2px rgba(20,119,242,.10)!important;
}
@media(max-width:1280px){
  body[data-route="ordenes"] .module-toolbar.orders-toolbar{grid-template-columns:170px minmax(300px,1fr)!important}
  body[data-route="ordenes"] .orders-toolbar .client-toolbar-actions{grid-column:1/-1!important;justify-content:flex-end!important}
}


/* ===== 4.16.483 · Ficha OT Online = jerarquía Desktop ===== */
.record-modal.order-mode{align-items:stretch;padding:10px;background:rgba(20,48,82,.28)}
.record-dialog.order-dialog{width:min(1500px,calc(100vw - 28px));max-width:none;height:calc(100vh - 20px);max-height:none;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;background:#f5f8fc}
.order-dialog .record-dialog-head{display:none}
.order-dialog #record-form{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
.order-dialog #record-fields{display:block!important;flex:1;min-height:0;overflow:auto;padding:8px 10px 14px;background:#fff}
.order-dialog .record-dialog-actions{flex:0 0 auto;background:#fff;border-top:1px solid #dce8f4;padding:8px 12px;display:flex;justify-content:flex-end;gap:8px}
.order-dialog .record-dialog-actions button{min-width:130px;height:42px;font-weight:700;font-size:14px}
#order-hero{background:#fff;flex:0 0 auto;border-bottom:1px solid #dce8f4}
.ot-top-actions{height:52px;display:grid;grid-template-columns:auto auto 1fr auto auto auto;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid #e4edf7;color:#173b69}
.ot-top-actions>button:first-child{border:0;background:transparent;color:#1477ee;font-weight:700;cursor:pointer;font-size:13px}.ot-top-actions>b{font-size:17px}.ot-top-actions .wf-action-btn{height:38px;min-width:auto;padding:0 14px;font-size:13px}
.ot-identity{min-height:68px;display:flex;align-items:center;gap:12px;padding:9px 14px}.ot-avatar{width:44px;height:44px;border-radius:50%;background:#1477ee;color:white;display:grid;place-items:center}.ot-identity>div:nth-child(2){display:flex;flex-direction:column}.ot-identity strong{font-size:17px;color:#123b6d}.ot-identity small{font-size:12px;color:#6f8298}.ot-statuses{margin-left:auto;display:flex;gap:9px}
.ot-tabs{display:grid;grid-template-columns:repeat(3,1fr);min-height:56px;border-top:1px solid #e4edf7}.ot-tab{border:0;border-right:1px solid #e4edf7;background:#fff;color:#123b6d;cursor:pointer;font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center;gap:9px;position:relative}.ot-tab:last-child{border-right:0}.ot-tab.active{background:#f1f7ff;color:#086fe9}.ot-tab.active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:#1477ee}
.ot-section{border:1px solid #d8e6f4;border-radius:8px;margin:0 0 12px;background:#fff;overflow:hidden}.ot-section>h3{margin:0;padding:10px 14px;background:#eaf3fd;color:#123b6d;font-size:13px;display:flex;align-items:center;gap:9px}.ot-grid{display:grid;gap:12px;padding:14px}.ot-grid.six{grid-template-columns:repeat(6,minmax(0,1fr))}.ot-field{display:flex;flex-direction:column;gap:5px;min-width:0}.ot-field>span{font-size:11px;color:#274b75;font-weight:600;text-transform:uppercase}.ot-field input,.ot-field select,.ot-field textarea{width:100%;box-sizing:border-box;border:1px solid #c7d9ec;border-radius:5px;background:#fff;color:#123b6d;font:500 14px "Segoe UI",Arial;padding:9px 12px;min-height:42px;outline:none}.ot-field textarea{min-height:80px;resize:vertical}.ot-field input:focus,.ot-field select:focus,.ot-field textarea:focus{border-color:#1477ee;box-shadow:0 0 0 3px rgba(20,119,238,.12)}.ot-field input[readonly]{background:#f6f9fc;font-weight:700}.span2{grid-column:span 2}.span3{grid-column:span 3}.span6{grid-column:1/-1}.ot-route{display:flex;align-items:stretch}.ot-route b{display:flex;align-items:center;background:#eaf3fd;color:#123b6d;border:1px solid #c7d9ec;border-right:0;border-radius:5px 0 0 5px;padding:0 14px;font-size:13px}.ot-route input{border-radius:0 5px 5px 0}.ot-doc-drop{min-height:160px;margin:14px;border:1px dashed #9ec4ec;border-radius:9px;background:#f7fbff;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#1677ee;gap:8px}.ot-doc-drop strong{font-size:15px}.ot-doc-drop span{font-size:12px;color:#6e849a}
.ot-managed-combo{display:flex;align-items:stretch;gap:5px}.ot-managed-combo select{flex:1;min-width:0}
.ot-mini-btn{flex:0 0 auto;width:36px;min-height:42px;border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center;background:#eef2f7;color:#274b75;border:1px solid #c7d9ec}
.ot-mini-btn:hover{filter:brightness(.96)}
.ot-mini-btn.success{background:#EEF9F2;color:#079447;border-color:#85D9AA}
.ot-mini-btn.primary{background:#EEF5FF;color:#0B67D1;border-color:#8EBEFF}
.ot-mini-btn.danger{background:#FFF1F3;color:#E43A4F;border-color:#F5A6B0}
@media(max-width:1100px){.ot-managed-combo{flex-wrap:wrap}.ot-mini-btn{min-height:34px}}
@media(max-width:1100px){.ot-grid.six{grid-template-columns:repeat(3,minmax(0,1fr))}.span6{grid-column:1/-1}.ot-top-actions{grid-template-columns:auto 1fr auto auto}.ot-top-actions .wf-action-btn:nth-of-type(2){display:none}}
/* ===== /4.16.483 ===== */


/* 4.16.484 · aislamiento absoluto de menús horizontales por ruta */
body:not([data-route="ordenes"]) #order-sector-menu,
body:not([data-route="ordenes"]) #order-list-profile{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}
body:not([data-route="materiales"]) #material-sector-menu,
body:not([data-route="materiales"]) #material-sector-context{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}
body:not([data-route="productos"]) #product-sector-menu{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}
body:not([data-route="maquinaria"]) #machine-sector-menu{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;}

/* 4.16.485 · Menús horizontales WFERP: pictogramas y textos más legibles */
/* Productos: misma jerarquía visual que Base industrial, con más presencia sin saturar. */
body[data-route="productos"] .product-sector-menu{
  display:flex !important;
  grid-template-columns:none !important;
  align-items:stretch;
  min-height:82px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  gap:0;
  border-radius:12px;
  border:1px solid #d7e4f1;
  box-shadow:0 2px 8px rgba(21,58,99,.04);
}
body[data-route="productos"] .product-sector-btn{
  flex:1 0 122px;
  min-width:122px;
  min-height:80px;
  padding:9px 8px 8px;
  gap:5px;
  font-family:"Segoe UI",Arial,sans-serif;
  font-size:11.5px;
  font-weight:700;
  line-height:1.15;
  color:#173d6b;
  transition:background .16s ease,box-shadow .16s ease;
}
body[data-route="productos"] .product-sector-btn b{
  width:33px;
  height:33px;
  display:grid;
  place-items:center;
  margin:0 auto 1px;
}
body[data-route="productos"] .product-sector-btn b svg{width:29px;height:29px;display:block}
body[data-route="productos"] .product-sector-btn span{
  display:block;
  font-size:11.5px;
  font-weight:700;
  line-height:1.15;
  letter-spacing:.01em;
  white-space:normal;
  text-align:center;
}
body[data-route="productos"] .product-sector-btn small{
  right:9px;
  top:7px;
  font-size:9px;
  font-weight:700;
}
body[data-route="productos"] .product-sector-btn.active{box-shadow:inset 0 -4px #1478ee}

/* Materiales, maquinaria y órdenes mantienen exactamente la misma escala de lectura. */
body[data-route="materiales"] .material-sector-menu,
body[data-route="maquinaria"] .machine-sector-menu,
body[data-route="ordenes"] .order-sector-menu{min-height:82px}
body[data-route="materiales"] .material-sector-btn,
body[data-route="maquinaria"] .machine-sector-btn,
body[data-route="ordenes"] .order-sector-btn{
  min-height:80px;
  padding-top:9px;
  padding-bottom:8px;
  font-family:"Segoe UI",Arial,sans-serif;
  font-size:11.5px;
  font-weight:700;
  line-height:1.15;
}
body[data-route="materiales"] .material-sector-btn b,
body[data-route="maquinaria"] .machine-sector-btn b{
  width:33px;
  height:33px;
  display:grid;
  place-items:center;
}
body[data-route="materiales"] .material-sector-btn b svg,
body[data-route="maquinaria"] .machine-sector-btn b svg{width:29px;height:29px}
body[data-route="materiales"] .material-sector-btn span,
body[data-route="maquinaria"] .machine-sector-btn span{
  font-size:11.5px;
  font-weight:700;
  line-height:1.15;
  text-align:center;
}
body[data-route="materiales"] .material-sector-btn small,
body[data-route="maquinaria"] .machine-sector-btn small{font-size:9px;font-weight:700}
body[data-route="ordenes"] .order-sector-icon{width:34px;height:34px;margin-bottom:4px}
body[data-route="ordenes"] .order-sector-icon svg{width:31px;height:31px}
body[data-route="ordenes"] .order-sector-btn small{font-size:11.5px;line-height:1.15;font-weight:750}

@media(max-width:1200px){
  body[data-route="productos"] .product-sector-btn{flex:0 0 126px;min-width:126px}
  body[data-route="materiales"] .material-sector-btn,
  body[data-route="maquinaria"] .machine-sector-btn,
  body[data-route="ordenes"] .order-sector-btn{min-width:118px}
}


/* 4.16.486 · Presupuestos Online · paridad visual y operativa con Desktop */
/* 4.17.123 · Extendido también a Facturas/Albaranes/Rectificativas. */
body[data-route="presupuestos"] #module-view,
body[data-route="facturas"] #module-view,
body[data-route="albaranes"] #module-view,
body[data-route="rectificativas"] #module-view{min-height:calc(100vh - 74px)!important;display:flex!important;flex-direction:column!important}
body[data-route="presupuestos"] #module-view>.module-head,
body[data-route="facturas"] #module-view>.module-head,
body[data-route="albaranes"] #module-view>.module-head,
body[data-route="rectificativas"] #module-view>.module-head{flex:0 0 auto!important}
body[data-route="presupuestos"] #module-kpis,
body[data-route="facturas"] #module-kpis,
body[data-route="albaranes"] #module-kpis,
body[data-route="rectificativas"] #module-kpis{flex:0 0 auto!important;margin-bottom:8px!important}
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{flex:0 0 auto!important}
body[data-route="presupuestos"] #module-view>.module-card,
body[data-route="facturas"] #module-view>.module-card,
body[data-route="albaranes"] #module-view>.module-card,
body[data-route="rectificativas"] #module-view>.module-card{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
body[data-route="presupuestos"] .records-wrap,
body[data-route="facturas"] .records-wrap,
body[data-route="albaranes"] .records-wrap,
body[data-route="rectificativas"] .records-wrap{flex:1 1 auto!important;min-height:320px!important;max-height:none!important;overflow:auto!important}
body[data-route="presupuestos"] .records-table td,
body[data-route="facturas"] .records-table td,
body[data-route="albaranes"] .records-table td,
body[data-route="rectificativas"] .records-table td{font-family:"Segoe UI",Arial,sans-serif!important;font-size:11px!important;font-weight:400!important}
body[data-route="presupuestos"] .records-table .main-cell,
body[data-route="facturas"] .records-table .main-cell,
body[data-route="albaranes"] .records-table .main-cell,
body[data-route="rectificativas"] .records-table .main-cell{font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;font-weight:600!important;font-size:13.3px!important}
body[data-route="presupuestos"] .record-row.selected td,
body[data-route="facturas"] .record-row.selected td,
body[data-route="albaranes"] .record-row.selected td,
body[data-route="rectificativas"] .record-row.selected td{background:#dcecff!important}
body[data-route="presupuestos"] .record-row:hover td,
body[data-route="facturas"] .record-row:hover td,
body[data-route="albaranes"] .record-row:hover td,
body[data-route="rectificativas"] .record-row:hover td{background:#f3f8fd}
.budget-list-toolbar{display:flex!important;flex-direction:column!important;gap:0!important;padding:0!important;background:#fff!important}
.budget-list-toolbar-top,.budget-list-toolbar-bottom{display:flex;align-items:center;gap:10px;padding:7px 10px;border-bottom:1px solid #dce8f4}
.budget-list-toolbar-top{justify-content:space-between;background:#fff}
.budget-list-toolbar-bottom{background:#fbfdff}
.budget-list-title{display:flex;align-items:center;gap:9px;color:#123b73;min-width:260px}
.budget-list-title>svg{width:30px;height:30px;padding:6px;border-radius:50%;background:#7137ef;color:#fff}
.budget-list-title span{display:flex;flex-direction:column;line-height:1.05}
.budget-list-title b{font:700 12px "Segoe UI",Arial}
.budget-list-title small{margin-top:3px;color:#6f849b;font:400 9px "Segoe UI",Arial}
.budget-primary-actions,.budget-secondary-actions{margin-left:auto;display:flex;gap:6px;flex-wrap:nowrap}
.budget-search-label{flex:1 1 380px!important;display:flex!important;align-items:center!important;gap:8px!important}
.budget-search-label>span{font:600 11px "Segoe UI",Arial;color:#284b73;white-space:nowrap}
.budget-search-label input{height:34px!important;min-width:240px!important;font:600 12px "Segoe UI",Arial!important;color:#123b73!important;border:1px solid #bad0e6!important;border-radius:4px!important;padding:0 10px!important}
.budget-search-label input:focus{outline:none!important;border-color:#1477f2!important;box-shadow:0 0 0 1px #1477f2!important}
.budget-pagination{flex:0 0 auto!important;margin-top:0!important}
#record-modal.budget-mode .budget-dialog{max-width:none!important;max-height:none!important}
#record-modal.budget-mode .record-dialog-head{display:none!important}
#record-modal.budget-mode .record-body{background:#fff!important}
.budget-data-grid-desktop{grid-template-columns:1fr 1fr 1fr 1fr 1.3fr!important}
.budget-client-grid-desktop{grid-template-columns:repeat(6,1fr)!important}
/* 4.17.094 · Código y CIF ocupan 1 columna (datos cortos); Cliente,
   Dirección y Email ocupan 2 (datos largos). */
.budget-client-grid-desktop .budget-client-main{grid-column:span 2!important}
.budget-edit-head-grid{display:grid!important;grid-template-columns:2fr 1fr!important;gap:10px!important;padding-bottom:8px!important}
.budget-conditions-grid{display:grid!important;grid-template-columns:1.2fr .8fr .9fr 1fr!important;gap:10px!important}
.budget-conditions-grid .field-group.wide{grid-column:1/-1!important}
#record-modal.budget-mode .field-group input,#record-modal.budget-mode .field-group select,#record-modal.budget-mode .field-group textarea{min-height:34px!important;border:1px solid #bed3e8!important;border-radius:4px!important;background:#fff!important;color:#123b73!important;padding:6px 8px!important;box-sizing:border-box!important}
#record-modal.budget-mode .field-group input:focus,#record-modal.budget-mode .field-group select:focus,#record-modal.budget-mode .field-group textarea:focus{outline:none!important;border-color:#1477f2!important;box-shadow:0 0 0 1px #1477f2!important}
.budget-lines-table thead th{background:#edf5fd!important;color:#123b73!important;font:600 10px "Segoe UI",Arial!important}
.budget-lines-table td{font:400 11px "Segoe UI",Arial!important}
.budget-total-bar{position:sticky;bottom:0;z-index:3;border-top:1px solid #c9dced!important;font-weight:600!important}
@media(max-width:1150px){.budget-list-toolbar-bottom{flex-wrap:wrap}.budget-secondary-actions{width:100%;justify-content:flex-end}.budget-data-grid-desktop{grid-template-columns:1fr 1fr!important}.budget-client-grid-desktop,.budget-conditions-grid{grid-template-columns:1fr 1fr!important}}


/* 4.16.487 · Presupuestos Online · paridad fina con Desktop */
/* 4.17.055 · La barra contextual ahora se usa para Enviar/Enviar proforma/
   Imprimir/Vista previa del presupuesto seleccionado (patrón Clientes),
   por lo que ya no se oculta. 4.17.107 · Extendido 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{display:flex!important}
body[data-route="presupuestos"] #module-view>.module-card,
body[data-route="facturas"] #module-view>.module-card,
body[data-route="albaranes"] #module-view>.module-card,
body[data-route="rectificativas"] #module-view>.module-card{margin-top:0!important}
body[data-route="presupuestos"] .budget-list-toolbar,
body[data-route="facturas"] .budget-list-toolbar,
body[data-route="albaranes"] .budget-list-toolbar,
body[data-route="rectificativas"] .budget-list-toolbar{width:100%!important;box-sizing:border-box!important}
body[data-route="presupuestos"] .budget-list-toolbar-top,
body[data-route="facturas"] .budget-list-toolbar-top,
body[data-route="albaranes"] .budget-list-toolbar-top,
body[data-route="rectificativas"] .budget-list-toolbar-top,
body[data-route="presupuestos"] .budget-list-toolbar-bottom,
body[data-route="facturas"] .budget-list-toolbar-bottom,
body[data-route="albaranes"] .budget-list-toolbar-bottom,
body[data-route="rectificativas"] .budget-list-toolbar-bottom{
  width:100%!important;box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:10px!important;padding:7px 10px!important
}
body[data-route="presupuestos"] .budget-list-toolbar-top,
body[data-route="facturas"] .budget-list-toolbar-top,
body[data-route="albaranes"] .budget-list-toolbar-top,
body[data-route="rectificativas"] .budget-list-toolbar-top{background:#fff!important}
body[data-route="presupuestos"] .budget-list-title,
body[data-route="facturas"] .budget-list-title,
body[data-route="albaranes"] .budget-list-title,
body[data-route="rectificativas"] .budget-list-title{margin:0!important;min-width:280px!important;justify-content:flex-start!important}
body[data-route="presupuestos"] .budget-list-title>svg,
body[data-route="facturas"] .budget-list-title>svg,
body[data-route="albaranes"] .budget-list-title>svg,
body[data-route="rectificativas"] .budget-list-title>svg{width:32px!important;height:32px!important;padding:7px!important}
body[data-route="presupuestos"] .budget-list-title b,
body[data-route="facturas"] .budget-list-title b,
body[data-route="albaranes"] .budget-list-title b,
body[data-route="rectificativas"] .budget-list-title b{font-size:12.5px!important}
body[data-route="presupuestos"] .budget-primary-actions,
body[data-route="facturas"] .budget-primary-actions,
body[data-route="albaranes"] .budget-primary-actions,
body[data-route="rectificativas"] .budget-primary-actions{margin-left:auto!important}
body[data-route="presupuestos"] .budget-list-toolbar-bottom,
body[data-route="facturas"] .budget-list-toolbar-bottom,
body[data-route="albaranes"] .budget-list-toolbar-bottom,
body[data-route="rectificativas"] .budget-list-toolbar-bottom{background:#fbfdff!important}
body[data-route="presupuestos"] .budget-secondary-actions,
body[data-route="facturas"] .budget-secondary-actions,
body[data-route="albaranes"] .budget-secondary-actions,
body[data-route="rectificativas"] .budget-secondary-actions{margin-left:auto!important}
body[data-route="presupuestos"] .budget-list-avatar,
body[data-route="facturas"] .budget-list-avatar,
body[data-route="albaranes"] .budget-list-avatar,
body[data-route="rectificativas"] .budget-list-avatar{
  width:29px!important;height:29px!important;min-width:29px!important;
  color:#fff!important;font:700 9px "Segoe UI",Arial!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.20)
}
body[data-route="presupuestos"] .budget-status,
body[data-route="facturas"] .budget-status,
body[data-route="albaranes"] .budget-status,
body[data-route="rectificativas"] .budget-status{font-size:9px!important;font-weight:700!important;padding:4px 9px!important;border-radius:0!important;white-space:nowrap}
body[data-route="presupuestos"] .records-table tbody tr,
body[data-route="facturas"] .records-table tbody tr,
body[data-route="albaranes"] .records-table tbody tr,
body[data-route="rectificativas"] .records-table tbody tr{height:42px!important}

#record-modal.budget-mode .budget-dialog{background:#fff!important}
/* 4.17.100 · Esquinas rectas del diálogo de presupuesto: selector muy
   específico para garantizar que gana pase lo que pase compita con él. */
#record-modal.budget-mode .record-dialog.budget-dialog{border-radius:0!important}
#record-modal.budget-mode #budget-hero{display:block!important;padding:0!important;margin:0!important}
#record-modal.budget-mode .budget-editor-topbar{
  min-height:48px;display:flex;align-items:center;gap:14px;
  padding:6px 10px;border-bottom:1px solid #cbdceb;background:#f8fbff;box-sizing:border-box
}
#record-modal.budget-mode .budget-editor-heading{display:flex;align-items:center;gap:14px;min-width:320px}
#record-modal.budget-mode .budget-editor-heading strong{font:700 18px "Segoe UI",Arial;color:#102f57;white-space:nowrap}
#record-modal.budget-mode .budget-back-list{
  border:0;background:transparent;color:#1477f2;padding:0;cursor:pointer;
  font:700 11px "Segoe UI",Arial;white-space:nowrap
}
#record-modal.budget-mode .budget-back-list:hover{text-decoration:underline}
#record-modal.budget-mode .budget-editor-actions{margin-left:auto;display:flex;align-items:center;gap:7px;flex-wrap:nowrap}
#record-modal.budget-mode .budget-editor-actions .wf-action-btn{height:34px!important;padding:0 12px!important;font-size:10px!important;white-space:nowrap}
#record-modal.budget-mode .budget-hero{
  display:grid!important;grid-template-columns:46px minmax(260px,1fr) auto minmax(440px,1.25fr)!important;
  min-height:54px!important;margin:0 8px!important;padding:6px 10px!important;border-radius:0!important;
  border-left:1px solid #d4e2ef!important;border-right:1px solid #d4e2ef!important;border-bottom:1px solid #d4e2ef!important
}
/* 4.17.099 · CORREGIDA: esta regla (con más especificidad que cualquier
   selector por id) era la que realmente ganaba la cascada y dejaba el
   título en 13px pasara lo que pasara con las demás reglas. */
#record-modal.budget-mode .budget-hero .client-identity strong{font:800 18px "Segoe UI",Arial!important;color:#123b73!important;white-space:nowrap!important}
#record-modal.budget-mode .budget-document-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important}
#record-modal.budget-mode .budget-document-actions button{min-height:32px!important;padding:0 11px!important;font-size:10px!important;border-radius:2px!important;font-weight:700!important}
#record-modal.budget-mode .budget-send-current{background:#effbf4!important;border-color:#b7e4c8!important;color:#078d43!important}
#record-modal.budget-mode .budget-proforma-current{background:#f4f8ff!important;border-color:#c7dcf5!important;color:#0b67d5!important}
#record-modal.budget-mode .budget-print-current,
#record-modal.budget-mode .budget-preview-current{background:#f7f9fc!important;border-color:#d3deea!important;color:#123b73!important}
/* 4.17.092 · budget-mode ya no usa margen/borde propio: hereda de #record-modal.budget-mode .client-tabs */
#record-modal.budget-mode #record-fields{border-left:1px solid #d4e2ef!important;border-right:1px solid #d4e2ef!important;border-bottom:1px solid #d4e2ef!important;margin:0 8px 8px!important}

@media(max-width:1200px){
  #record-modal.budget-mode .budget-editor-topbar{flex-wrap:wrap}
  #record-modal.budget-mode .budget-editor-actions{width:100%;justify-content:flex-end}
  #record-modal.budget-mode .budget-hero{grid-template-columns:46px 1fr auto!important}
  #record-modal.budget-mode .budget-document-actions{grid-column:1/-1!important}
}

/* 4.16.488 · Presupuestos: acciones agrupadas Desktop/Online */
.wf-actions-dropdown{position:relative;display:inline-block;z-index:40}
.wf-actions-dropdown>summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:7px;min-width:126px;height:36px;padding:0 12px;border:1px solid #a9c9ec;border-radius:3px;background:#f3f8fe;color:#123b73;font-size:10px;font-weight:800;cursor:pointer;user-select:none;box-sizing:border-box}
.wf-actions-dropdown>summary::-webkit-details-marker{display:none}
.wf-actions-dropdown[open]>summary,.wf-actions-dropdown>summary:hover{background:#eaf4ff;border-color:#6da7e7;color:#0b5fc6}
.wf-actions-dropdown>summary .wf-svg-icon{width:17px;height:17px}
.wf-actions-dropdown>summary>b{font-size:10px;margin-left:2px}
.wf-actions-dropdown-menu{position:absolute;right:0;top:calc(100% + 5px);width:218px;padding:6px;background:#fff;border:1px solid #c8daed;border-radius:5px;box-shadow:0 10px 28px rgba(22,55,94,.16);z-index:2000}
.wf-actions-dropdown-menu button{width:100%;height:34px;border:0;background:#fff;color:#123b73;display:flex;align-items:center;gap:9px;padding:0 10px;border-radius:3px;font-size:10px;font-weight:700;text-align:left;cursor:pointer}
.wf-actions-dropdown-menu button:hover{background:#eef6ff;color:#0b5fc6}
.wf-actions-dropdown-menu button.is-success{color:#078d43}.wf-actions-dropdown-menu button.is-primary{color:#1477f2}.wf-actions-dropdown-menu button.is-danger{color:#e53950}
.wf-actions-dropdown-menu button.is-success:hover{background:#f0fbf5}.wf-actions-dropdown-menu button.is-danger:hover{background:#fff1f3}
.wf-actions-dropdown-menu i{display:block;height:1px;background:#e2ebf5;margin:5px 3px}
body[data-route="presupuestos"] .budget-list-toolbar-top,
body[data-route="facturas"] .budget-list-toolbar-top,
body[data-route="albaranes"] .budget-list-toolbar-top,
body[data-route="rectificativas"] .budget-list-toolbar-top{overflow:visible!important}
body[data-route="presupuestos"] .budget-list-toolbar-bottom,
body[data-route="facturas"] .budget-list-toolbar-bottom,
body[data-route="albaranes"] .budget-list-toolbar-bottom,
body[data-route="rectificativas"] .budget-list-toolbar-bottom{padding-right:0!important}
body[data-route="presupuestos"] .budget-list-toolbar-bottom .budget-search-label,
body[data-route="facturas"] .budget-list-toolbar-bottom .budget-search-label,
body[data-route="albaranes"] .budget-list-toolbar-bottom .budget-search-label,
body[data-route="rectificativas"] .budget-list-toolbar-bottom .budget-search-label{flex:1!important;max-width:none!important}
#record-modal.budget-mode .budget-editor-topbar{overflow:visible!important}
#record-modal.budget-mode .budget-editor-actions-dropdown{margin-left:auto}
#record-modal.budget-mode .budget-editor-actions-dropdown .wf-actions-dropdown-menu{width:238px}
#record-modal.budget-mode .budget-hero{grid-template-columns:58px 1fr auto!important}
@media(max-width:900px){.wf-actions-dropdown-menu{right:0;left:auto}.wf-actions-dropdown>summary{min-width:116px}.budget-list-toolbar-top{align-items:center!important}}


/* 4.16.489 · Presupuestos: jerarquía WFERP de acciones y ficha */
body[data-route="presupuestos"] .wf-actions-dropdown>summary,
#record-modal.budget-mode .wf-actions-dropdown>summary{
  min-width:142px!important;height:38px!important;padding:0 14px!important;
  border:1px solid #8fb8e7!important;border-radius:4px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f2f8ff 100%)!important;
  color:#123b73!important;font:800 11px "Segoe UI",Arial!important;
  box-shadow:0 1px 2px rgba(20,75,135,.08)!important
}
body[data-route="presupuestos"] .wf-actions-dropdown>summary:hover,
body[data-route="presupuestos"] .wf-actions-dropdown[open]>summary,
#record-modal.budget-mode .wf-actions-dropdown>summary:hover,
#record-modal.budget-mode .wf-actions-dropdown[open]>summary{
  border-color:#1477f2!important;background:#eaf4ff!important;color:#0b5fc6!important
}
body[data-route="presupuestos"] .wf-actions-dropdown>summary .wf-svg-icon,
#record-modal.budget-mode .wf-actions-dropdown>summary .wf-svg-icon{width:19px!important;height:19px!important;color:#1477f2!important}
body[data-route="presupuestos"] .wf-actions-dropdown-menu,
#record-modal.budget-mode .wf-actions-dropdown-menu{
  width:252px!important;padding:7px!important;border-radius:6px!important;
  border:1px solid #bfd4ea!important;box-shadow:0 12px 30px rgba(18,59,115,.18)!important
}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button,
#record-modal.budget-mode .wf-actions-dropdown-menu button{
  height:39px!important;padding:0 11px!important;gap:10px!important;
  font:700 11px "Segoe UI",Arial!important;border-radius:4px!important
}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button .wf-svg-icon,
#record-modal.budget-mode .wf-actions-dropdown-menu button .wf-svg-icon{width:18px!important;height:18px!important;flex:0 0 18px!important}

#record-modal.budget-mode .budget-editor-topbar{min-height:54px!important;padding:7px 11px!important}
#record-modal.budget-mode .budget-editor-heading{gap:16px!important;min-width:0!important;flex-wrap:nowrap!important}
#record-modal.budget-mode .budget-editor-heading strong{font:800 22px "Segoe UI",Arial!important;color:#102f57!important;line-height:1!important}
#record-modal.budget-mode .budget-back-list{font:800 13px "Segoe UI",Arial!important;color:#1477f2!important}
#record-modal.budget-mode .budget-editor-actions-dropdown{margin-left:0!important;flex:0 0 auto!important}
#record-modal.budget-mode .budget-editor-actions-dropdown .wf-actions-dropdown-menu{left:0!important;right:auto!important}

#record-modal.budget-mode .budget-hero{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;
  min-height:66px!important;padding:8px 11px!important
}
#record-modal.budget-mode .budget-avatar{flex:0 0 44px!important;width:44px!important;height:44px!important}
#record-modal.budget-mode .budget-identity{flex:0 1 auto!important;min-width:0!important}
#record-modal.budget-mode .budget-identity-line{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important}
/* 4.17.099 · Título unificado en la regla de mayor especificidad, más
   arriba en este mismo archivo (budget-hero .client-identity strong).
   Se retira esta duplicada para no confundir a futuras ediciones. */
#record-modal.budget-mode .budget-hero-status{position:static!important;margin:0!important;display:inline-flex!important;align-items:center!important;flex:0 0 auto!important}
#record-modal.budget-mode .budget-identity small{font-size:12px!important;margin-top:3px!important;display:block!important}


/* 4.16.490 · NORMALIZACIÓN WFERP · Presupuestos Desktop -> Online */
/* Desktop es la referencia tipográfica: Segoe UI / Segoe UI Semibold. */
body[data-route="presupuestos"],
body[data-route="presupuestos"] button,
body[data-route="presupuestos"] input,
body[data-route="presupuestos"] select,
body[data-route="presupuestos"] textarea,
#record-modal.budget-mode,
#record-modal.budget-mode button,
#record-modal.budget-mode input,
#record-modal.budget-mode select,
#record-modal.budget-mode textarea{
  font-family:"Segoe UI",sans-serif!important;
}
body[data-route="presupuestos"] .module-head h1{font:700 22px "Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .module-head p{font:400 11px "Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .budget-list-title b{font:600 13px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .budget-list-title small{font:400 10px "Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .client-filter-label,
body[data-route="presupuestos"] .budget-search-label>span,
body[data-route="facturas"] .budget-search-label>span,
body[data-route="albaranes"] .budget-search-label>span,
body[data-route="rectificativas"] .budget-search-label>span{font:600 11px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .client-filter-label select,
body[data-route="presupuestos"] .budget-search-label input,
body[data-route="facturas"] .budget-search-label input,
body[data-route="albaranes"] .budget-search-label input,
body[data-route="rectificativas"] .budget-search-label input{font:600 12px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .records-table th{font:600 10px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .records-table td{font:400 11px "Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .records-table .main-cell{font:600 13.3px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="presupuestos"] .budget-status{font:600 9px "Segoe UI Semibold","Segoe UI",sans-serif!important}

/* ACCIONES sigue la jerarquía del menú lateral: icono con color, texto azul. */
body[data-route="presupuestos"] .wf-actions-dropdown>summary,
#record-modal.budget-mode .wf-actions-dropdown>summary{
  min-width:146px!important;height:40px!important;padding:0 14px!important;
  border:1px solid #B8CEE5!important;border-radius:5px!important;background:#F8FBFF!important;
  color:#123B73!important;font:600 12px "Segoe UI Semibold","Segoe UI",sans-serif!important;
  box-shadow:none!important;gap:8px!important
}
body[data-route="presupuestos"] .wf-actions-dropdown>summary:hover,
body[data-route="presupuestos"] .wf-actions-dropdown[open]>summary,
#record-modal.budget-mode .wf-actions-dropdown>summary:hover,
#record-modal.budget-mode .wf-actions-dropdown[open]>summary{
  background:#EAF4FF!important;border-color:#78AEE8!important;color:#0B5FC6!important
}
body[data-route="presupuestos"] .wf-actions-dropdown-menu,
#record-modal.budget-mode .wf-actions-dropdown-menu{
  width:258px!important;padding:6px!important;background:#fff!important;border:1px solid #C5D8EB!important;
  border-radius:5px!important;box-shadow:0 10px 24px rgba(18,59,115,.16)!important
}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button,
#record-modal.budget-mode .wf-actions-dropdown-menu button{
  height:40px!important;border:0!important;border-radius:4px!important;background:#fff!important;color:#123B73!important;
  padding:0 11px!important;gap:10px!important;font:600 12px "Segoe UI Semibold","Segoe UI",sans-serif!important
}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button:hover,
#record-modal.budget-mode .wf-actions-dropdown-menu button:hover{background:#EEF6FF!important;color:#0B5FC6!important}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button.is-success,
body[data-route="presupuestos"] .wf-actions-dropdown-menu button.is-primary,
body[data-route="presupuestos"] .wf-actions-dropdown-menu button.is-danger,
#record-modal.budget-mode .wf-actions-dropdown-menu button.is-success,
#record-modal.budget-mode .wf-actions-dropdown-menu button.is-primary,
#record-modal.budget-mode .wf-actions-dropdown-menu button.is-danger{color:#123B73!important}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button .wf-svg-icon,
#record-modal.budget-mode .wf-actions-dropdown-menu button .wf-svg-icon{color:#1477F2!important;width:18px!important;height:18px!important}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button.is-success .wf-svg-icon,
#record-modal.budget-mode .wf-actions-dropdown-menu button.is-success .wf-svg-icon{color:#08A64A!important}
body[data-route="presupuestos"] .wf-actions-dropdown-menu button.is-danger .wf-svg-icon,
#record-modal.budget-mode .wf-actions-dropdown-menu button.is-danger .wf-svg-icon{color:#E53950!important}
body[data-route="presupuestos"] .wf-actions-dropdown-menu i,
#record-modal.budget-mode .wf-actions-dropdown-menu i{height:1px!important;background:#E3ECF6!important;margin:5px 4px!important}

/* Ficha: más aire y jerarquía equivalente a Desktop. */
#record-modal.budget-mode .budget-editor-topbar{
  min-height:62px!important;padding:10px 14px!important;background:#F8FBFF!important;
  border-bottom:1px solid #CBDCEB!important;display:flex!important;align-items:center!important
}
#record-modal.budget-mode .budget-editor-heading{gap:18px!important;align-items:center!important;width:100%!important}
#record-modal.budget-mode .budget-back-list{
  font:600 13px "Segoe UI Semibold","Segoe UI",sans-serif!important;color:#1477F2!important;line-height:1.2!important
}
#record-modal.budget-mode .budget-editor-heading>strong{
  font:700 20px "Segoe UI",sans-serif!important;color:#102F57!important;line-height:1.15!important
}
#record-modal.budget-mode .budget-editor-actions-dropdown{margin-left:0!important}
#record-modal.budget-mode .budget-hero{min-height:70px!important;padding:9px 13px!important;gap:11px!important}
#record-modal.budget-mode .budget-avatar{width:44px!important;height:44px!important;flex:0 0 44px!important}
#record-modal.budget-mode .budget-identity-line{gap:10px!important}
/* 4.17.099 · Duplicada retirada: la regla que realmente manda es
   #record-modal.budget-mode .budget-hero .client-identity strong,
   más arriba en este archivo (mayor especificidad). */
#record-modal.budget-mode .budget-hero-status{margin-left:0!important}
/* 4.17.093 · Badge de estado en la ficha, 1px más grande que en el listado */
#record-modal.budget-mode .budget-status{font-size:10px!important}
#record-modal.budget-mode .budget-identity small{font:400 12px "Segoe UI",sans-serif!important;color:#6B7E98!important}
/* 4.17.092 · Tipografía de pestaña ahora la fija #record-modal.budget-mode .client-tab span, igual que Clientes */
#record-modal.budget-mode .client-section h3{font:600 12px "Segoe UI Semibold","Segoe UI",sans-serif!important}
#record-modal.budget-mode .field-group label{font:600 10px "Segoe UI Semibold","Segoe UI",sans-serif!important}
#record-modal.budget-mode .field-group input,
#record-modal.budget-mode .field-group select,
#record-modal.budget-mode .field-group textarea{font:600 12px "Segoe UI Semibold","Segoe UI",sans-serif!important}


/* 4.16.491 · Presupuestos: pictogramas profesionales y acciones de ficha */
#record-modal.budget-mode .budget-editor-heading{justify-content:flex-start!important;gap:16px!important}
#record-modal.budget-mode .budget-editor-actions-dropdown{margin-left:0!important;margin-right:auto!important}
#record-modal.budget-mode .budget-editor-actions-dropdown .wf-actions-dropdown-menu{left:0!important;right:auto!important}
#record-modal.budget-mode .wf-actions-dropdown-menu button .wf-svg-icon,
body[data-route="presupuestos"] .wf-actions-dropdown-menu button .wf-svg-icon{stroke-width:1.9!important}

/* =====================================================================
   4.17.091 VER1 — FICHA DE PRESUPUESTO: reorganización de acciones
   - "Volver al listado" vuelve a ser un botón real (con chrome, no un link).
   - Se retira el desplegable ACCIONES: Cancelar/Guardar cambios/Guardar y
     salir pasan a la cabecera, a la derecha del título.
   - Enviar/Enviar proforma/Imprimir/Vista previa pasan al menú horizontal
     de Datos/Edición presupuesto/Condiciones, agrupados a la derecha.
   ===================================================================== */
#record-modal.budget-mode .budget-editor-topbar{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  flex-wrap:nowrap!important;gap:14px!important;
}
#record-modal.budget-mode .budget-editor-heading{
  display:flex!important;align-items:center!important;gap:14px!important;
  width:auto!important;flex:0 1 auto!important;min-width:0!important;
}
#record-modal.budget-mode .budget-back-list{
  display:inline-flex!important;align-items:center!important;gap:7px!important;
  height:34px!important;padding:0 14px!important;min-width:0!important;
  border:1px solid #a9c9ec!important;border-radius:4px!important;
  background:#f3f8fe!important;color:#123b73!important;
  font:700 12px "Segoe UI Semibold","Segoe UI",sans-serif!important;
  line-height:1!important;cursor:pointer!important;white-space:nowrap!important;
}
#record-modal.budget-mode .budget-back-list .wf-svg-icon{width:16px!important;height:16px!important;color:#1477f2!important}
#record-modal.budget-mode .budget-back-list:hover{background:#eaf4ff!important;border-color:#6da7e7!important;color:#0b5fc6!important}

#record-modal.budget-mode .budget-editor-primary-actions{
  display:flex!important;align-items:center!important;gap:8px!important;
  flex:0 0 auto!important;margin-left:auto!important;flex-wrap:nowrap!important;
}
#record-modal.budget-mode .budget-editor-primary-actions .wf-action-btn{
  height:34px!important;padding:0 13px!important;font-size:10.5px!important;white-space:nowrap!important;
}

/* Menú horizontal de la ficha: Datos/Edición/Condiciones + acciones rápidas,
   todo integrado en una sola barra con la misma jerarquía visual que
   Clientes (ver #record-modal.budget-mode .client-tabs en styles.07). */

@media(max-width:1200px){
  #record-modal.budget-mode .budget-editor-topbar{flex-wrap:wrap!important}
  #record-modal.budget-mode .budget-editor-primary-actions{width:100%!important;justify-content:flex-end!important}
}


/* 4.16.495 · Listados continuos WFERP: sin paginación, hasta el final del viewport. */
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view{
  min-height:calc(100vh - 74px)!important;
  height:calc(100vh - 74px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>.module-head,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>#module-kpis,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>#client-selected-bar,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>#material-sector-menu,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>#material-sector-context,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>#order-sector-menu,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>#order-profile{flex:0 0 auto!important;}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>.module-card{
  flex:1 1 auto!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>.module-card>.records-wrap{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
}
#budget-pagination,#order-pagination{display:none!important;}


/* 4.16.496 · Scroll aislado: la página queda fija y sólo se desplaza el listado. */
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) {
  overflow:hidden!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) .content{
  height:calc(100vh - 58px)!important;
  min-height:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>.module-card{
  flex:1 1 0!important;
  min-height:0!important;
  overflow:hidden!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-view>.module-card>.records-wrap{
  flex:1 1 0!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) .module-head,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) #module-kpis,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) .module-toolbar,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) .client-selected-bar,
body:not([data-route="inicio"]):not([data-route="control_horario"]):not([data-route="personal_rrhh"]):not([data-route="configuracion"]):not([data-route="informes"]) .sector-menu{
  flex-shrink:0!important;
}


/* 4.16.498 · Clientes: búsqueda profesional y favoritos */
.client-smart-search{position:relative;flex:0 0 auto;font-family:"Segoe UI",sans-serif}
.client-smart-search>summary{height:38px;min-width:104px;display:flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid #9fc8f7;border-radius:4px;background:#fff;color:#0b5fb7;font-size:12px;font-weight:600;cursor:pointer;list-style:none}
.client-smart-search>summary::-webkit-details-marker{display:none}.client-smart-search[open]>summary{background:#edf6ff;border-color:#58a3f5}
.client-smart-panel{position:absolute;z-index:3000;top:44px;right:0;width:min(760px,calc(100vw - 230px));display:grid;grid-template-columns:1fr 1fr 1.08fr;background:#fff;border:1px solid #c9d7e7;border-radius:7px;box-shadow:0 12px 30px rgba(31,59,91,.18);overflow:hidden}
.client-smart-panel section{padding:17px 18px 14px;border-right:1px solid #dbe4ef;min-height:245px}.client-smart-panel section:nth-child(3){border-right:0}
.client-smart-panel h4{margin:0 0 12px;color:#25384e;font:600 14px/1.2 "Segoe UI",sans-serif}.client-smart-panel h4 span{margin-left:6px}
.client-smart-panel label{display:flex;align-items:center;gap:9px;min-height:29px;color:#26384d;font:400 13px/1.2 "Segoe UI",sans-serif;cursor:pointer}.client-smart-panel label:hover{background:#f1f7ff}
.client-smart-panel input{accent-color:#1477f2}.client-favorites>button,.client-favorites>div{width:100%}.client-favorites button{border:0;background:#fff;color:#1f3f68;min-height:31px;text-align:left;font:500 12.5px "Segoe UI",sans-serif;cursor:pointer}.client-favorites button:hover{background:#eef6ff}.client-favorites>div{display:flex}.client-favorites>div button:first-child{flex:1}.client-favorites>div button:last-child{width:32px;color:#d82e42;text-align:center}
.client-smart-panel footer{grid-column:1/-1;display:flex;justify-content:space-between;padding:10px 14px;background:#f7fafe;border-top:1px solid #dbe4ef}.client-smart-panel footer button{min-width:92px;height:32px;border:1px solid #c8d8eb;background:#fff;color:#526b88;font:600 11px "Segoe UI",sans-serif;cursor:pointer}.client-smart-panel footer button:last-child{background:#eaf4ff;border-color:#94c5f7;color:#0b67d1}
@media(max-width:1100px){.client-smart-panel{width:680px;right:-120px}.client-smart-panel section{padding-left:12px;padding-right:12px}}

/* 4.16.499 · Clientes: filtros integrados dentro del buscador, patrón WFERP */
.client-desktop-toolbar .client-search-pro{flex:1 1 520px;min-width:320px;max-width:none;display:flex;align-items:center;gap:8px;margin:0;color:#29425f;font:400 12px/1 "Segoe UI",sans-serif}
.client-desktop-toolbar .client-search-pro>span{flex:0 0 auto}
.client-smart-search{position:relative;flex:1 1 auto;min-width:0;font-family:"Segoe UI",sans-serif}
.client-search-input-shell{height:38px;display:flex;align-items:center;border:1px solid #b9cde5;border-radius:4px;background:#fff;overflow:hidden;box-sizing:border-box;transition:border-color .15s,box-shadow .15s}
.client-search-input-shell:focus-within{border-color:#1477f2;box-shadow:0 0 0 2px rgba(20,119,242,.10)}
.client-search-input-shell>.wf-svg-icon{margin-left:11px;color:#54708f;flex:0 0 auto}
.client-search-input-shell>input{flex:1 1 auto;min-width:0;height:36px!important;border:0!important;outline:0!important;box-shadow:none!important;padding:0 10px!important;background:#fff!important;color:#16395f!important;font:600 13px/36px "Segoe UI Semibold","Segoe UI",sans-serif!important}
.client-search-input-shell>input::placeholder{color:#7b8da3;font-weight:400;opacity:1}
.client-search-chevron{align-self:stretch;width:42px;border:0;border-left:1px solid #d8e3ef;background:#f5f9fe;color:#173a6b;font:700 15px "Segoe UI",sans-serif;cursor:pointer}
.client-search-chevron:hover,.client-smart-search.open .client-search-chevron{background:#eaf4ff;color:#0868cf}
.client-smart-panel{position:absolute;z-index:4000;top:43px;left:0;right:auto;width:min(760px,calc(100vw - 260px));display:grid;grid-template-columns:1fr 1fr 1.12fr;background:#fff;border:1px solid #c6d6e8;border-radius:6px;box-shadow:0 14px 34px rgba(24,53,86,.20);overflow:hidden}
.client-smart-panel[hidden]{display:none!important}
.client-smart-panel section{padding:18px 20px 15px;border-right:1px solid #dce6f1;min-height:250px;box-sizing:border-box}.client-smart-panel section:nth-child(3){border-right:0}
.client-smart-panel h4{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:#173a6b;font:600 14px/1.2 "Segoe UI Semibold","Segoe UI",sans-serif}.client-smart-panel h4 .wf-svg-icon{color:#1477f2}
.client-smart-panel label{display:flex;align-items:center;gap:9px;min-height:30px;padding:0 5px;border-radius:3px;color:#243b55;font:400 13px/1.25 "Segoe UI",sans-serif;cursor:pointer;white-space:nowrap}.client-smart-panel label:hover{background:#eef6ff}
.client-smart-panel input[type="checkbox"],.client-smart-panel input[type="radio"]{width:15px!important;height:15px!important;flex:0 0 auto;accent-color:#1477f2}
.client-favorites>button,.client-favorites>div{width:100%}.client-favorites button{display:flex;align-items:center;gap:7px;border:0;border-radius:3px;background:#fff;color:#1d416b;min-height:32px;padding:0 6px;text-align:left;font:600 12.5px "Segoe UI Semibold","Segoe UI",sans-serif;cursor:pointer}.client-favorites button:hover{background:#eef6ff}.client-favorites>div{display:flex}.client-favorites>div button:first-child{flex:1}.client-favorites>div button:last-child{width:34px;justify-content:center;color:#d82e42}.client-favorites small{display:block;padding:8px 6px;color:#7c8fa5;font:400 12px "Segoe UI",sans-serif}
.client-smart-panel footer{grid-column:1/-1;display:flex;justify-content:space-between;padding:10px 14px;background:#f7fafe;border-top:1px solid #dbe4ef}.client-smart-panel footer button{min-width:96px;height:32px;border:1px solid #c8d8eb;border-radius:3px;background:#fff;color:#526b88;font:600 11px "Segoe UI Semibold","Segoe UI",sans-serif;cursor:pointer}.client-smart-panel footer button:last-child{background:#eaf4ff;border-color:#94c5f7;color:#0b67d1}
@media(max-width:1150px){.client-smart-panel{width:min(680px,calc(100vw - 215px))}.client-smart-panel section{padding-left:13px;padding-right:13px}}


/* 4.16.500 · Buscador profesional WFERP: pictogramas vectoriales y chevron */
.client-smart-panel section h4{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:30px;
  color:#173A6B!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
}
.client-smart-panel section:nth-child(1) h4 .wf-svg-icon{color:#7A5576}
.client-smart-panel section:nth-child(2) h4 .wf-svg-icon{color:#0E8290}
.client-smart-panel section:nth-child(3) h4 .wf-svg-icon{color:#F0B500}
.client-search-chevron{
  width:40px!important;
  min-width:40px!important;
  height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  border-left:1px solid #D3E0EF!important;
  background:#F4F8FD!important;
  color:#173A6B!important;
  cursor:pointer!important;
}
.client-search-chevron:hover,
.client-smart-search.open .client-search-chevron{
  background:#E8F2FF!important;
  color:#0B67D1!important;
}
.client-search-chevron .wf-svg-icon{
  width:18px!important;
  height:18px!important;
  transition:transform .16s ease;
}
.client-smart-search.open .client-search-chevron .wf-svg-icon{
  transform:rotate(180deg);
}
.client-smart-panel footer{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:7px 12px!important;
  border-top:1px solid #DCE7F3!important;
  background:#F7FAFE!important;
}
.client-smart-panel footer button{
  min-height:32px!important;
  padding:0 14px!important;
  border:1px solid #C7D6E7!important;
  border-radius:3px!important;
  background:#FFFFFF!important;
  color:#5D718A!important;
  font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:600!important;
}
.client-smart-panel footer button[data-client-apply-filters]{
  border-color:#9EC4F1!important;
  background:#E7F4FF!important;
  color:#0B67D1!important;
}


/* 4.16.509 · Ficha Clientes: cabecera operativa WFERP como Desktop */
.record-head-title{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
.record-back-list,.record-head-actions>.btn{display:none}
.record-head-actions{display:flex;align-items:center;gap:8px}
#record-modal.client-mode .record-dialog-head,
#record-modal.provider-mode .record-dialog-head,
#record-modal.provider-mode .record-dialog-head{min-height:64px;padding:10px 16px;gap:12px}
#record-modal.client-mode .record-head-title,
#record-modal.provider-mode .record-head-title,
#record-modal.provider-mode .record-head-title{align-items:center;gap:16px}
#record-modal.client-mode .record-back-list,
#record-modal.provider-mode .record-back-list,
#record-modal.provider-mode .record-back-list{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:#0878ec;font:700 12px/1 'Segoe UI',Arial,sans-serif;cursor:pointer;padding:8px 4px;white-space:nowrap}
#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;text-decoration:underline}
#record-modal.client-mode .record-head-title>div,
#record-modal.provider-mode .record-head-title>div,
#record-modal.provider-mode .record-head-title>div{display:flex;align-items:center;gap:10px;min-width:0}
#record-modal.client-mode .record-dialog-head small,
#record-modal.provider-mode .record-dialog-head small,
#record-modal.provider-mode .record-dialog-head small{margin:0;color:#0878ec;font-size:10px;font-weight:800;letter-spacing:.02em}
#record-modal.client-mode .record-dialog-head h2,
#record-modal.provider-mode .record-dialog-head h2,
#record-modal.provider-mode .record-dialog-head h2{font-size:20px;line-height:1.1;margin:0;color:#0b2d5c;font-weight:700}
#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;align-items:center;justify-content:center;height:34px;padding:0 16px;border-radius:4px;font:700 11px/1 'Segoe UI',Arial,sans-serif}
#record-modal.client-mode #record-close,
#record-modal.provider-mode #record-close,
#record-modal.provider-mode #record-close{margin-left:2px}
#record-modal.client-mode .record-dialog-actions,
#record-modal.provider-mode .record-dialog-actions,
#record-modal.provider-mode .record-dialog-actions{display:none!important}
#record-modal.client-mode #record-form,
#record-modal.provider-mode #record-form,
#record-modal.provider-mode #record-form{min-height:0}

/* 4.16.511 · Clientes Online: cabecera y navegación horizontal normalizadas WFERP */
#record-modal.client-mode .record-dialog-head,
#record-modal.provider-mode .record-dialog-head,
#record-modal.provider-mode .record-dialog-head{
  min-height:76px!important;
  padding:12px 20px!important;
  gap:16px!important;
  border-bottom:1px solid #d7e5f4!important;
  background:#fff!important;
}
#record-modal.client-mode .record-head-title,
#record-modal.provider-mode .record-head-title,
#record-modal.provider-mode .record-head-title{
  gap:18px!important;
  align-items:center!important;
}
#record-modal.client-mode .record-back-list,
#record-modal.provider-mode .record-back-list,
#record-modal.provider-mode .record-back-list{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:38px!important;
  padding:0 14px!important;
  border:1px solid #a9c9ed!important;
  border-radius:4px!important;
  background:#f4f8fd!important;
  color:#0b5db7!important;
  font:700 12.5px/1 "Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;
  text-decoration:none!important;
}
/* ---- Grupos plegables del menu lateral (Ventas / Compras) ---- */
.nav-group{margin:2px 0}
.nav-group-toggle{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:9px 12px;margin:0;border:0;border-radius:6px;background:transparent;
  color:#17325c;font:500 13px "Segoe UI",Arial,sans-serif;cursor:pointer;text-align:left;
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  outline:none;box-shadow:none;
}
.nav-group-toggle::-moz-focus-inner{border:0}
.nav-group-toggle:focus-visible{outline:2px solid #1477f2;outline-offset:-2px;box-shadow:none}
.nav-group-toggle:hover{background:#f4f8fd;color:#17325c}
.nav-group-toggle .nav-group-chevron{
  margin-left:auto;font-size:10px;color:#7186a3;transition:transform .18s ease;
}
.nav-group.open>.nav-group-toggle .nav-group-chevron{transform:rotate(180deg)}
.nav-group-items{
  max-height:0;overflow:hidden;transition:max-height .2s ease;
}
.nav-group.open>.nav-group-items{max-height:420px}
.nav-group-items a{padding-left:30px;font-size:12.5px}
.nav-group.has-active>.nav-group-toggle{color:#0b4b9c;font-weight:650}
.nav-group.open>.nav-group-toggle{
  background:#eef5ff;
  color:#0b4b9c;
  font-weight:650;
  box-shadow:inset 3px 0 0 #1477f2;
}
.nav-group.open>.nav-group-toggle .nav-picto{color:#1477f2}
.nav-group.open>.nav-group-items{background:#eef3fa}
body.sidebar-collapsed .nav-group-toggle span:not(.nav-picto),
body.sidebar-collapsed .nav-group-toggle .nav-group-chevron{display:none}
body.sidebar-collapsed .nav-group-items{display:none}

/* 4.17.140 · Cobros: misma maquetación fina que Presupuestos/Ventas */
body[data-route="cobros"] #module-view{min-height:calc(100vh - 74px)!important;display:flex!important;flex-direction:column!important}
body[data-route="cobros"] #module-view>.module-head{flex:0 0 auto!important}
body[data-route="cobros"] #module-kpis{flex:0 0 auto!important;margin-bottom:8px!important}
body[data-route="cobros"] #client-selected-bar{flex:0 0 auto!important}
body[data-route="cobros"] #module-view>.module-card{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
body[data-route="cobros"] .records-wrap{flex:1 1 auto!important;min-height:320px!important;max-height:none!important;overflow:auto!important}
body[data-route="cobros"] .records-table td{font-family:"Segoe UI",Arial,sans-serif!important;font-size:11px!important;font-weight:400!important}
body[data-route="cobros"] .records-table .main-cell{font-family:"Segoe UI Semibold","Segoe UI",Arial,sans-serif!important;font-weight:600!important;font-size:13.3px!important}
body[data-route="cobros"] .record-row.selected td{background:#dcecff!important}
body[data-route="cobros"] .record-row:hover td{background:#f3f8fd}
body[data-route="cobros"] .budget-list-toolbar{width:100%!important;box-sizing:border-box!important}
body[data-route="cobros"] .budget-list-toolbar-top{
  width:100%!important;box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:10px!important;padding:7px 10px!important
}
body[data-route="cobros"] .budget-list-toolbar-bottom{
  width:100%!important;box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  flex-wrap:wrap!important;
  gap:10px!important;padding:7px 10px!important
}
body[data-route="cobros"] .budget-search-label{
  flex:1 1 260px!important;min-width:200px!important;max-width:none!important;
}
body[data-route="cobros"] .client-toolbar-actions{
  flex:0 0 auto!important;display:flex!important;gap:8px!important;flex-wrap:nowrap!important;
}
body[data-route="cobros"] .wf-action-btn{white-space:nowrap!important}
body[data-route="cobros"] .budget-list-title{margin:0!important;min-width:280px!important;justify-content:flex-start!important}
body[data-route="cobros"] .budget-list-title>svg{width:32px!important;height:32px!important;padding:7px!important}
body[data-route="cobros"] .budget-list-title b{font-size:12.5px!important}
body[data-route="cobros"] .budget-primary-actions{margin-left:auto!important}
body[data-route="cobros"] .budget-secondary-actions{margin-left:auto!important}
body[data-route="cobros"] .budget-list-avatar{
  width:29px!important;height:29px!important;min-width:29px!important;
  color:#fff!important;font:700 9px "Segoe UI",Arial!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.20)
}
body[data-route="cobros"] .budget-status{font-size:9px!important;font-weight:700!important;padding:4px 9px!important;border-radius:0!important;white-space:nowrap}
body[data-route="cobros"] .records-table tbody tr{height:42px!important}
body[data-route="cobros"] .budget-list-toolbar-bottom .budget-search-label{flex:1!important;max-width:none!important}
body[data-route="cobros"] .budget-search-label>span{font:600 11px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="cobros"] .budget-search-label input{font:600 12px "Segoe UI Semibold","Segoe UI",sans-serif!important}
body[data-route="cobros"] .records-table td:nth-child(4){font-weight:700!important}
