@import url('https://fonts.googleapis.com/css2?family=Material+Icons+Outlined');

/* ── record-teaser: previsualización de expediente en panel flotante ── */
.record-teaser {
  font-size: 13px;
  color: #222;
  line-height: 1.5;
}

.record-teaser__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.record-teaser__headline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.record-teaser__link {
  font-weight: 700;
  font-size: 14px;
  color: #1565c0;
  text-decoration: none;
}
.record-teaser__link:hover {
  text-decoration: underline;
}

.record-teaser__nid {
  font-size: 12px;
  color: #777;
}

.record-teaser__status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e3f2fd;
  color: #1565c0;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Secciones colapsables (nivel 1) ── */
.record-teaser__group {
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  margin-bottom: 6px;
  overflow: hidden;
}

.record-teaser__group-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  cursor: pointer;
  background: #f5f5f5;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #444;
  list-style: none;
  user-select: none;
}
.record-teaser__group-summary::-webkit-details-marker { display: none; }
.record-teaser__group-summary::after {
  content: '+';
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}
.record-teaser__group[open] > .record-teaser__group-summary::after {
  content: '−';
}
.record-teaser__group-summary .material-icons-outlined {
  font-size: 15px;
  opacity: .7;
}

/* ── Tabla dl de campos simples ── */
.record-teaser__dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0 0 4px;
}

.record-teaser__field {
  display: contents;
}

.record-teaser__dl dt {
  padding: 5px 8px 5px 12px;
  color: #666;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid #f0f0f0;
}

.record-teaser__dl dd {
  padding: 5px 12px 5px 4px;
  margin: 0;
  font-size: 13px;
  color: #222;
  border-bottom: 1px solid #f0f0f0;
  word-break: break-word;
}

/* ── Costes: nivel 2 colapsable ── */
.record-teaser__costs {
  padding: 6px 8px;
}

.record-teaser__cost-item {
  border: 1px solid #ececec;
  border-radius: 4px;
  margin-bottom: 4px;
  background: #fafafa;
}

.record-teaser__cost-summary {
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  list-style: none;
  user-select: none;
}
.record-teaser__cost-summary::-webkit-details-marker { display: none; }
.record-teaser__cost-summary::after {
  content: '+';
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}
.record-teaser__cost-item[open] > .record-teaser__cost-summary::after {
  content: '−';
}

.record-teaser__cost-body {
  padding: 6px 10px 8px;
  border-top: 1px solid #ececec;
  font-size: 12px;
}

/* Precio total en la summary del cost-item */
.record-teaser__cost-label-text {
  flex: 1;
}
.record-teaser__cost-price-badge {
  font-size: 11px;
  font-weight: 700;
  color: #1565c0;
  background: #e3f2fd;
  padding: 1px 7px;
  border-radius: 8px;
  margin-right: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Cabeceras de sección: Facturas / Abonos */
.record-teaser__cost-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #3949ab;
  margin: 6px 0 3px;
  padding: 0;
}
.record-teaser__cost-section-label--deposit {
  color: #c62828;
}

/* Sub-details: cost_element y deposit */
.record-teaser__cost-sub {
  border: 1px solid #e8eaf6;
  border-radius: 3px;
  margin-bottom: 3px;
  background: #fff;
}
.record-teaser__cost-sub--deposit {
  border-color: #ffcdd2;
  background: #fff9f9;
}

.record-teaser__cost-sub-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  color: #444;
  list-style: none;
  user-select: none;
}
.record-teaser__cost-sub-summary::-webkit-details-marker { display: none; }
.record-teaser__cost-sub-summary::before {
  content: '▶';
  font-size: 8px;
  flex-shrink: 0;
  transition: transform .15s;
  color: #888;
}
.record-teaser__cost-sub[open] > .record-teaser__cost-sub-summary::before {
  transform: rotate(90deg);
}
.record-teaser__cost-sub-summary > span:first-child {
  flex: 1;
}
.record-teaser__cost-sub-summary--deposit {
  color: #b71c1c;
}

.record-teaser__cost-sub-price {
  font-weight: 700;
  color: #1b5e20;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
}
.record-teaser__cost-sub-price--deposit {
  color: #c62828;
}

/* DL dentro del sub-detail */
.record-teaser__cost-sub-dl {
  margin: 0;
  padding: 4px 8px 6px 18px;
  border-top: 1px solid #e8eaf6;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
}
.record-teaser__cost-sub--deposit .record-teaser__cost-sub-dl {
  border-top-color: #ffcdd2;
}
.record-teaser__cost-sub-dl div {
  display: contents;
}
.record-teaser__cost-sub-dl dt {
  font-size: 10px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 0;
  white-space: nowrap;
}
.record-teaser__cost-sub-dl dd {
  font-size: 11px;
  color: #333;
  margin: 0;
  padding: 2px 0;
  word-break: break-word;
}

.record-teaser__cost-empty {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
  margin: 4px 0 0;
}

.material-icons-outlined {
  font-family: 'Material Icons Outlined';
}

/*Ordenando notas en backend*/
#edit-field-notas-wrapper table tbody {
  display: flex;
  flex-direction: column-reverse;
}

/*Arreglando el error del breadcrumb de administracion en el que no se ven los enlaces*/
.gin-breadcrumb__link em {
  background: transparent;
  cursor: pointer;
}

/*Arreglando el header de la tabla de permisos en los campos*/
#permissions thead {
  position: unset;
}

/*Señalando si el documento es privado*/
.table-file-multiple-widget .form-managed-file, .table-file-multiple-widget  .form-managed-file.has-value.is-multiple {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.table-file-multiple-widget .form-managed-file .file, .table-file-multiple-widget  .form-managed-file.has-value.is-multiple .file {
  margin: 0 10px 0 0;
}

/*Maquetando los detalles del pago en edicion*/
.field--name-field-pago>.field__label {
   font-weight: 600;
   font-size: 1.125rem;
   color: #081225;
   border: unset;
   background: #e1eafc;
   padding: 20px;
   border-radius: 10px;
   margin-top: 25px;
}
.field--name-field-pago>.field__item {
  margin: 10px 20px;
}
.field--name-field-pago>.field__item .paragraph--type--pago .field--name-field-estado {
  margin-bottom: 10px;
}


/*Desplegables de los nodos en crear y editar al 50%*/
.node-offer-edit-form .layout-region__content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}
.node-offer-edit-form .layout-region__content .multi-steps-label {
  width: 100%;
}

.node-offer-edit-form .layout-region__content .required-fields {
  width: 49%;
}

.views-ef-fieldset-container {
  min-width: 100%;
}

.views-ef-fieldset-container .claro-details__wrapper.details-wrapper {
  column-count: 2;
  column-gap: 20px;
}

.views-ef-fieldset-container .claro-details__wrapper.details-wrapper > * {
  break-inside: avoid;
}

#edit-group-estado-financiero .field-group-tab .claro-details__wrapper.details-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 20px;
}

#edit-group-estado-financiero .field-group-tab .claro-details__wrapper.details-wrapper > * {
  display: flex;
  flex-direction: column;
}

/* El ancho completo es para los campos de texto de la rejilla. Estirar una
   casilla la convierte en una pastilla enorme, con la etiqueta descolgada. */
#edit-group-estado-financiero .field-group-tab .claro-details__wrapper.details-wrapper input:not([type='checkbox']):not([type='radio']) {
  width: 100%;
}

/* Casilla y etiqueta en la misma línea dentro de la rejilla. */
#edit-group-estado-financiero .field-group-tab .claro-details__wrapper.details-wrapper .form-type--boolean {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline-start: 0;
}

#edit-group-estado-financiero .field-group-tab .claro-details__wrapper.details-wrapper .form-type--boolean .form-item__label {
  margin: 0;
}

#edit-group-general>.claro-details__wrapper.details-wrapper {
  display: grid;
  grid-template-columns: 1fr; /* Dos columnas iguales */
  gap: 20px;
  padding: 20px;
}

#edit-group-general>.claro-details__wrapper.details-wrapper > * {
  display: flex;
  flex-direction: column;
}

#edit-group-general>.claro-details__wrapper.details-wrapper .form-item {
  margin-block: 0;
}

#edit-group-informacion-oferta .claro-details__wrapper.details-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 20px;
}

details[id^='edit-group-general-'] .claro-details__wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 20px;
}
#edit-group-informacion-oferta .claro-details__wrapper.details-wrapper > * {
  display: flex;
  flex-direction: column;
}

.field--name-field-offer-palets .paragraphs-tabs-wrapper .paragraphs-subform {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 20px;
}

.view-ldc-others .views-exposed-form, .view-ldc-tte .views-exposed-form {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important; /* Dos columnas iguales */
  gap: 20px !important;
}

.view-ldc-others .views-exposed-form > *, .view-ldc-tte .views-exposed-form > *, .view-ldc-shipping .views-exposed-form > * {
  display: flex !important;
  flex-direction: column !important;
}

.view-ldc-others .views-exposed-form .form-actions, .view-ldc-tte .views-exposed-form .form-actions, .view-ldc-shipping .views-exposed-form .form-actions {
  flex-direction: row !important;
}

/*
.view-ldc-others table th, .view-ldc-tte table th{
  min-width: 150px !important;
}*/

.field--name-field-offer-palets .paragraphs-tabs-wrapper .paragraphs-subform > * {
  display: flex;
  flex-direction: column;
}

.ief-form > .form-wrapper > .form-wrapper:last-of-type {
  background: white !important;
  margin-inline: unset !important;
}


.gin-breadcrumb__link {
  background: #e0f1ec;
  padding: 10px;
  border-radius: 5px;
  color: white;
}

.gin-breadcrumb__list {
  text-align: center;
}

.menu--dashboard ul.menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-left: 0 !important;
  justify-content: center;
  margin-bottom: 10px;
}

.menu--dashboard .menu-item {
  list-style: none !important;
  margin: 10px 5px !important;
}

.menu--dashboard ul.menu a.is-active {
  background: var(--gin-color-primary);
  color: white;
}

.menu--dashboard .menu-item a {
  padding: 10px;
  border: 1px solid #e0f1ec;
  background: #e0f1ec;
  border-radius: 10px;
  text-decoration: none;
}

#block-gin-menudecuentadeusuario {
  position: absolute;
  top: 0;
  right: 0;
  padding-right: 50px;
}

.menu--main ul.menu, #block-gin-menudecuentadeusuario ul.menu{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-left: 0 !important;
  justify-content: center;
  margin-bottom: 10px;
}

.menu--main .menu-item, #block-gin-menudecuentadeusuario .menu-item {
  list-style: none !important;
  margin: 10px 5px !important;
}

.menu--main ul.menu a.is-active, #block-gin-menudecuentadeusuario ul.menu a.is-active{
  background: #9a37ce;
  color: white;
}

.menu--main .menu-item a, #block-gin-menudecuentadeusuario .menu-item a{
  padding: 10px;
  border: 1px solid #e0f1ec;
  background: #e3e0f1;
  color: #9a37ce;
  border-radius: 10px;
  text-decoration: none;
}

.view-ofertas  table th {
  min-width: 120px !important;
}

.site-logo img {
  max-width: 300px;
}

#block-gin-marcadelsitio {
  display: block;
  width: 100%;
  text-align: center;
}

.kitchen-offer-icon {
  font-size: 2em;
}

.field-group-form-step {

}

.ui-autocomplete-input {
  max-width: 250px  !important;
  width: 250px  !important;
}

.entities-list:not(.entities-list--single-item) {
  grid-template-columns: unset !important;
}

#edit-relations {
  display: none;
}

.taxonomy-term-form  {

}


/**
Carátula expediente


.caratula-expediente {
  display: table;
  width: 100%;
  border-collapse: collapse;
}


.caratula-expediente .form-item:not(.form-type--checkbox){
  display: table-row;
  border: 1px solid #ddd;
  margin-block: 0;
  padding: 10px 20px;
}

.caratula-expediente .claro-autocomplete {
  width: auto;
}

.caratula-expediente .dropbutton {
  margin: 0 50px;
}

*/
.caratula-expedientes-readonly {
  background: #e0f1ec !important;
  max-width: 300px;
}

.caratula-expediente .form-element {
  width: 100%;
  max-width: 100%;
}

.caratula-expediente details, .caratula-expediente .field--widget-entity-browser-entity-reference {
  grid-column: 1/span 2;
}

.caratula-expediente .form-type--entity-autocomplete {
  display: flex;
  flex-direction: column;
}

.caratula-expediente .claro-autocomplete {
  margin-bottom: 10px;
}

.tippy-box {
  max-width: unset !important;
}

#edit-group-origen-destino .claro-details__wrapper.details-wrapper {
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  display: grid;
}

.holded-wrapper{
  text-align: center;
  padding: 20px;
}

.holded-bill-preview__notice {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  background: #eef1fb;
  border: 1px solid #c5cae9;
  color: #283593;
}

.holded-wrapper a {
  padding: 10px;
  border-radius: 20px;
  background: var(--gin-color-primary);
  color: white;
  text-decoration: none;
  margin-top: 10px;
  margin-right: 10px;
  display: inline-block;
}

#field-additionals-non-included-values .form-wrapper, #field-included-additionals-values .form-wrapper {
  margin: 10px 0;
}

.form-element {
  border: 1px solid #e0f1ec !important;
}

.node-record-form #edit-group-general .form-item, .node-record-edit-form #edit-group-general .form-item{
  padding: 0;
  border: 0;
}

.node-record-form #edit-group-general .form-item .fieldset__wrapper, .node-record-edit-form #edit-group-general .form-item .fieldset__wrapper {
  margin: 0;
}

.node-record-form #edit-group-general .form-item .fieldset__wrapper .fieldset__label, .node-record-edit-form #edit-group-general .form-item .fieldset__wrapper .fieldset__label {
  margin: 0;
}

.node-record-form #edit-group-expediente>.claro-details__wrapper.details-wrapper, .node-record-edit-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* Dos columnas iguales */
  gap: 5px;
  background: #fff;
  padding: 20px;
}


.node-record-form details#edit-group-expediente div#estados-div ,.node-record-edit-form details#edit-group-expediente div#estados-div {
  grid-column: 3;
  grid-row: 1/6;
}

.node-record-form details#edit-group-expediente div#estados-div .form-item__description, .node-record-edit-form details#edit-group-expediente div#estados-div .form-item__description {
  display: inline;
}

.node-record-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper>div:nth-child(even) , .node-record-edit-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper>div:nth-child(even) {
  grid-column: 1;
  border: 1px solid #e0f1ec;
  padding: 10px;
  border-radius: 5px;
  min-width: unset;
}

.node-record-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper>div:nth-child(1) , .node-record-edit-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper>div:nth-child(1) {
  grid-row: 1;
  padding: 10px;
  border-radius: 5px;
}

.node-record-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper>div:nth-child(odd) , .node-record-edit-form details#edit-group-expediente>.claro-details__wrapper.details-wrapper>div:nth-child(odd) {
  grid-column: 2;
  border: 1px solid #e0f1ec;
  padding: 10px;
  border-radius: 5px;
  min-width: unset;
}

#estados-div .form-wrapper{
  margin: 10px 0 !important;
}

.tooltip {
  z-index: 999;
}

.ui-dialog.entity-browser-modal.ui-widget.ui-widget-content.ui-front.ui-draggable {
  width: 90vw !important;
  min-width: 90vw !important;
  max-width: unset !important;
}

.view-costes-expedientes  table {
  background: white;
}

.view-costes-expedientes table th {
  min-width: 150px;
}

#edit-field-record-current-info-wrapper {
  order: -1;
}

/** quitando el campo relaciones para los popup referenciando entidades */
[id^="edit-relations--"] {
  /* estilos */
  display: none;
}

.info-prov {
  padding: 20px;
  background: #e0f1ec;
  color: #00875f;
  position: fixed;
  z-index: 10;
  bottom: 0;
  right: 0;
  border-radius: 10px;
  max-width: 200px;
  font-size: 0.8em;
}

.gin-layer-wrapper .views-table {
  margin-block-start: 0;
  display: table;
  white-space: nowrap;
}

.tooltip {
  background-color: #333;
  color: white !important;
}

.step-description {
  background: #e0f1ec !important;
  text-align: center;
  padding: 20px !important;
  font-size: 1em !important;
  color: #00875f;
}

.view-footer a {
  display: inline-block;
  padding: 10px;
  background: #e0f1ec;
  border-radius: 10px;
  margin: 10px;
}

[data-drupal-selector="edit-title-readonly-field"] {
  padding: 10px;
  background: #e0f1ec;
  display: inline-block;
  margin: 10px 0;
  border-radius: 10px;
  float: left;
}

[data-drupal-selector="edit-field-record-customer-readonly-field"] {
  padding: 10px;
  margin-bottom: 10px;
}

[data-drupal-selector="edit-field-pvp-readonly-field"] {
  background: #e0f1ec;
  padding: 10px;
  color: #00875f;
}

.final-group-cost, .recommende-group-cost, .min-group-cost {
  border-radius: 10px;
  border: 1px solid #00875f ;
  background: white;
  padding: 10px;
  margin: 5px 0;
}

#edit-field-line-additionals-non-inclu-wrapper .form-element, #edit-field-additionals-non-included-wrapper .form-element {
  width: 50%;
  max-width: 50%;
  margin: 5px 0;
}

#edit-field-line-additionals-non-inclu-wrapper .field--type-boolean, #edit-field-additionals-non-included-wrapper .field--type-boolean {
  margin: 5px 0;
}

.record-management-actions {
  list-style: none;
  margin: 0;
}

.record-management-actions li {
  background: #00875f;
  padding: 5px;
  padding-top: 0;
  border-radius: 5px;
  margin: 2px 0;
}


.record-management-actions li a{
  color: white;
  font-size: 0.7em;
}


.cost-diff-negative {
  background: #e0f1ec;
  color: black;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #00875f;
}

.cost-diff-positive {
  background: #a1351e;
  padding: 10px;
  color: white;
  border-radius: 10px;
  border: 1px solid;
}

#views-exposed-form-ldc-tte-entity-browser-1, #views-exposed-form-ldc-tte-entity-browser-3 {
  display: block !important;
}

.pac-container {
  z-index: 9999;
}

ul.copy-address-list {
  display: block;
  text-align: center;
  margin-top: 10px;
}

li.copy-address-origin,  li.copy-address-destiny{
  padding: 10px;
  text-align: center;
  border: 2px solid #4285f4;
  color: #4285f4;
  display: inline-block;
  border-radius: 10px;
  font-weight: bold;
}

.providers-management-menu, .bl-parties-management-menu, .costs-management-menu, .bills-management-menu, .bill-management-menu{
  text-align: center;
  width: 100%;
  justify-content: center;
}

.providers-management-menu li, .bl-parties-management-menu li, .costs-management-menu li, .bills-management-menu li, .bill-management-menu li {
  margin: 10px 0;
  display: inline-block;
  padding: 20px;
  border-radius: 10px;
  width: 50%;
  text-align: center;
  background: #e5f3ef;
}

.providers-management-menu li:hover, .bl-parties-management-menu li:hover, .costs-management-menu li:hover, .bills-management-menu li:hover, .bill-management-menu li:hover {
  background: #003e37;
}

.providers-management-menu li a, .bl-parties-management-menu li a, .costs-management-menu li a, .bills-management-menu li a, .bill-management-menu li a{
  color: #00694a;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.providers-management-menu li a:hover, .bl-parties-management-menu li a:hover, .costs-management-menu li a:hover, .bills-management-menu li a:hover, .bill-management-menu li a:hover{
  color: white;
}

.holded-lines-wrapper {
  overflow: auto;
}

/* Gin envuelve toda tabla en .gin-table-scroll-wrapper con overflow-x/y
   propio (para su scroll horizontal). Aunque esa caja nunca llega a
   desbordarse por sí misma (crece para caber el contenido), basta con que
   tenga un overflow distinto de "visible" para que el navegador la trate
   como el "ancestro con scroll" más cercano a efectos de position:sticky
   — y entonces la cabecera deja de fijarse respecto al scroll real, que es
   el de .holded-lines-wrapper (ya con alto acotado y overflow:auto, y del
   que ya depende el propio scroll horizontal vía el botón hscroll). Se
   neutraliza aquí para que la cabecera "vea" el scroll correcto.
   https://github.com/w3c/csswg-drafts/issues/6704 */
.holded-lines-wrapper .gin-table-scroll-wrapper {
  overflow: visible;
}

.holded-lines-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.holded-lines-table thead th {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  padding-block: 2px;
  line-height: 1;
}

/* Compactación general: el tema base pone celdas de 4rem de alto y 8px/16px
   de padding, excesivo con 14 columnas. Se reduce alto, padding y tipografía
   en todo el listado (cabecera y filas). */
.holded-lines-table th,
.holded-lines-table td {
  height: auto;
  padding: 4px 8px;
  font-size: .78rem;
  line-height: 1.3;
}

.holded-lines-table thead th {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
}

/* La columna Estado ya no necesita tanto ancho: las etiquetas se acortaron
   (Pendiente/Abono/Disputa/Aprobado) y el detalle completo va en el title. */
.holded-line-state {
  padding: 1px 6px;
  font-size: .65rem;
}

/* Columna ID: solo lleva un número (o el botón "N" de grupo colapsado), no
   necesita el ancho que el layout automático de la tabla le da por defecto. */
.holded-lines-table:not(.holded-aprobacion-table) th:nth-child(2),
.holded-lines-table:not(.holded-aprobacion-table) td:nth-child(2) {
  width: 48px;
  max-width: 48px;
  white-space: nowrap;
}

/* En Aprobación de facturas no hay columna de selección: el ID de línea es
   la 1ª columna y la 2ª es el ID de factura, que necesita su ancho. */
.holded-aprobacion-table th:first-child,
.holded-aprobacion-table td:first-child {
  width: 48px;
  white-space: nowrap;
}

.holded-aprobacion-table td:nth-child(2) {
  white-space: nowrap;
}

.holded-lines-hscroll {
  float: right;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1;
  vertical-align: middle;
}

.holded-lines-hscroll:hover {
  background: rgba(255, 255, 255, .3);
}

.holded-lines-hscroll .material-icons-outlined {
  font-size: 1.1rem;
}

.holded-lines-col-check {
  width: 32px;
  text-align: center !important;
}

.holded-lines-action-bar {
  display: none;
  align-items: center;
  gap: 12px;
  background: #e5f3ef;
  border: 1px solid #00694a;
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.holded-lines-action-bar.is-visible {
  display: flex;
}

.holded-lines-selected-count {
  font-weight: 600;
  color: #003e37;
}

.holded-lines-actions {
  display: flex;
  gap: 8px;
}

.holded-lines-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.holded-summary-bar {
  display: flex;
  gap: 1px;
  margin-bottom: 14px;
  background: #e2e8f0;
}

.holded-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 18px;
  background: #f8fafc;
  flex: 1;
  min-width: 100px;
}

.holded-summary-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
}

.holded-summary-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.holded-lines-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-end;
  margin-bottom: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #6ee7b7;
  padding: 14px 16px;
}

.holded-lines-filters .form-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.holded-lines-filters label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
}

.holded-lines-filters input.form-text,
.holded-lines-filters input[type="date"],
.holded-lines-filters select.form-select {
  height: 32px;
  padding: 0 8px;
  font-size: .85rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  box-shadow: none;
  min-width: 140px;
}

.holded-lines-filters input.form-text:focus,
.holded-lines-filters input[type="date"]:focus,
.holded-lines-filters select.form-select:focus {
  border-color: #6ee7b7;
  outline: none;
  box-shadow: 0 0 0 2px rgba(110,231,183,.25);
}

.holded-lines-filters input[type="submit"] {
  height: 32px;
  padding: 0 18px;
  font-size: .85rem;
  font-weight: 600;
  align-self: flex-end;
  letter-spacing: .02em;
}

.holded-lines-table tr.holded-lines-group-header td {
  background: #d1fae5;
  color: #1a4731;
  font-weight: 700;
  padding: 6px 12px;
  letter-spacing: .03em;
  cursor: pointer;
  user-select: none;
}

.holded-lines-table tr.holded-lines-group-header:hover td {
  background: #a7f3d0;
}

.holded-lines-table tr.holded-lines-row--no-record td {
  background: #fefce8;
}

.holded-lines-table tr.holded-lines-row--no-record:hover td {
  background: #fef9c3;
}

.holded-lines-table tr.holded-lines-row--bad-record td {
  background: #fef2f2;
}

.holded-lines-table tr.holded-lines-row--bad-record:hover td {
  background: #fee2e2;
}

.holded-lines-table tr.holded-lines-row--approved td {
  background: #f0fdf4;
  color: #166534;
}

.holded-lines-table tr.holded-lines-row--approved:hover td {
  background: #dcfce7;
}

.holded-lines-table tr.holded-lines-group-header--approved td {
  background: #bbf7d0;
  color: #14532d;
}

.holded-lines-table tr.holded-lines-group-header--approved:hover td {
  background: #a7f3d0;
}

.holded-lines-bill-approved {
  font-size: 1rem;
  vertical-align: middle;
  color: #15803d;
}

/* Aprobación de facturas */
.holded-lines-table tr.holded-aprobacion-group--pending td,
.holded-lines-table tr.holded-aprobacion-group--approved td {
  padding-block: 6px;
  line-height: 1;
}

.holded-lines-table tr.holded-aprobacion-group--pending td {
  background: #fef9c3;
  color: #713f12;
}

.holded-lines-table tr.holded-aprobacion-group--pending:hover td {
  background: #fef08a;
}

.holded-lines-table tr.holded-aprobacion-group--approved td {
  background: #d1fae5;
  color: #1a4731;
}

.holded-lines-table tr.holded-aprobacion-group--approved:hover td {
  background: #a7f3d0;
}

.holded-aprobacion-group-actions {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  font-size: .8rem;
}

.holded-aprobacion-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  padding: 2px 8px;
  font-size: .75rem;
  line-height: 1.2;
}

.holded-aprobacion-badge--pending {
  background: rgba(113,63,18,.1);
  color: #92400e;
}

.holded-aprobacion-badge--approved {
  background: rgba(20,83,45,.1);
  color: #14532d;
}

/* Botones "Aprobar" (fila de factura) y "Devolver" (líneas): .button del
   tema trae márgenes verticales, padding y alto mínimo que estiran la fila;
   se compactan para que las filas tengan la misma altura que en el listado
   de Control de facturas. */
.holded-lines-table .button.holded-aprobacion-approve-btn,
.holded-lines-table .button.holded-aprobacion-revert-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  min-height: 0;
  height: auto;
  padding: 3px 10px;
  font-size: .75rem;
  line-height: 1.2;
}

.holded-aprobacion-revert-btn .material-icons-outlined {
  font-size: .95rem;
  line-height: 1;
}

.holded-lines-table td:has(> .holded-aprobacion-revert-btn) {
  white-space: nowrap;
}

.holded-lines-group-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.holded-lines-bill-link {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  color: #00875f;
  border-radius: 5px;
  background: rgb(255, 255, 255);
  padding: 5px;
}

.holded-lines-bill-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.holded-lines-bill-link .material-icons-outlined {
  font-size: 0.95rem;
}

.bill-management-menu ul, .costs-management-menu ul, .providers-management-menu ul, .bl-parties-management-menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.bill-management-menu li, .costs-management-menu li, .providers-management-menu li, .bl-parties-management-menu li {
  width: calc(50% - 16px) !important;
  display: flex !important;
  align-items: stretch;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.bill-management-menu li:hover, .costs-management-menu li:hover, .providers-management-menu li:hover, .bl-parties-management-menu li:hover {
  box-shadow: 0 4px 14px rgba(0,62,55,.25);
}

.bill-management-menu li a, .costs-management-menu li a, .providers-management-menu li a, .bl-parties-management-menu li a {
  width: 100%;
}

.bill-management-menu li a strong, .costs-management-menu li a strong, .providers-management-menu li a strong, .bl-parties-management-menu li a strong {
  font-size: 1rem;
  display: block;
}

.bill-management-menu__desc {
  font-size: .82rem;
  opacity: .8;
  line-height: 1.4;
}

#block-gin-page-title {
  justify-content: center;
}

.view-control-costes .views-table tbody td {
  max-width: 33ch;
  min-width: 33ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-control-costes .views-table tbody th:nth-child(1),
.view-control-costes .views-table tbody td:nth-child(1) {
  min-width: 1ch; /* ancho fijo deseado */
  max-width: 1ch;
}

.view-control-costes .views-table tbody th:nth-child(3),
.view-control-costes .views-table tbody td:nth-child(3),
.view-control-costes .views-table tbody th:nth-child(6),
.view-control-costes .views-table tbody td:nth-child(6)

{
  min-width: 5ch; /* ancho fijo deseado */
  max-width: 5ch; /* ancho fijo deseado */
}

.view-control-costes .views-table tbody th:nth-child(8),
.view-control-costes .views-table tbody td:nth-child(8),
.view-control-costes .views-table tbody th:nth-child(9),
.view-control-costes .views-table tbody td:nth-child(9){
  min-width: 10ch; /* ancho fijo deseado */
  max-width: 10ch; /* ancho fijo deseado */
}

.view-control-costes .views-table tbody th:nth-child(5),
.view-control-costes .views-table tbody td:nth-child(5){
  min-width: 20ch; /* ancho fijo deseado */
  max-width: 20ch; /* ancho fijo deseado */
}

.view-control-costes .views-table tbody th:nth-child(7),
.view-control-costes .views-table tbody td:nth-child(7){
  min-width: 10ch; /* ancho fijo deseado */
  max-width: 10ch; /* ancho fijo deseado */
}

.view-control-costes .views-table tbody th:nth-child(10),
.view-control-costes .views-table tbody td:nth-child(10){
  min-width: 15ch; /* ancho fijo deseado */
  max-width: 15ch; /* ancho fijo deseado */
}

.view-control-costes .views-table tbody th:nth-child(11),
.view-control-costes .views-table tbody td:nth-child(11),
.view-control-costes .views-table tbody th:nth-child(12),
.view-control-costes .views-table tbody td:nth-child(12){
  min-width: 15ch; /* ancho fijo deseado */
  max-width: 15ch; /* ancho fijo deseado */
}

.view-control-costes .gin-table-scroll-wrapper.gin-horizontal-scroll-shadow.syncscroll {
  margin: 30px 0;
}

.view-ldc-tte .views-table tbody th:nth-child(1),
.view-ldc-tte .views-table tbody td:nth-child(1)
{
  min-width: 5ch; /* ancho fijo deseado */
  max-width: 5ch; /* ancho fijo deseado */
}

.view-content {
  position: relative;
}

.scroll-right-arrow,
.scroll-left-arrow {
  position: fixed;
  right: 0;
  z-index: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  padding: 12px 0;
  font-size: 18px;
  color: #fff;
  background: #00875f;
  border-radius: 6px 0 0 6px;
  box-shadow: -2px 2px 8px rgba(0, 0, 0, .28);
  user-select: none;
  transition: background .15s, transform .12s;
}

.scroll-right-arrow {
  top: calc(50% - 40px);
}

.scroll-left-arrow {
  top: calc(50% + 4px);
}

.scroll-right-arrow:hover,
.scroll-left-arrow:hover {
  background: #005c40;
  transform: translateX(-3px);
}

[data-tooltip] {
  margin: 5px;
  border-bottom: none !important;
}

[data-tooltip]:hover {
  transform: scale(2.15);
  display: inline-flex !important;
  text-decoration: none;
}

a.add-cost-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #1a6e45;
  color: #fff;
  margin: 0 6px 0 ;
  border-radius: 3px;
  border: 1px solid #145536;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: background 0.15s, box-shadow 0.15s;
  vertical-align: middle;
}
a.add-cost-button:hover {
  background: #145536;
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  color: #fff;
  text-decoration: none;
}
a.add-cost-button:active {
  background: #0e3d27;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.4);
  transform: translateY(1px);
}


.field--widget-entity-browser-entity-reference article div div {
  display: flex;
  text-align: center;
  justify-content: center;
}

.field--widget-entity-browser-entity-reference article div div .field__label:after {
  content: ":";
}

#iframe-container {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
}


p.last-notif-message {
  padding: 20px;
  background: #ffe00047;
  color: #b07920;
  border-radius: 10px;
}

.notif-message-destiny {
  padding: 20px;
  background: #9df3b447;
  color: #00875f;
  border-radius: 10px;
}

#edit-field-pro-b-l-0--description {
  background: #ff000017;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid red;
}

/* Columna lateral del expediente: apila el panel "ADR estimado" encima del menú
   de navegación. Ambos son fijos por separado, así que dentro de la columna se
   les quita el posicionamiento propio y manda el flex. */
.record-side-column {
  position: fixed;
  right: 0;
  bottom: 0;
  /* Mismo ancho que los paneles laterales de la cocina de una oferta. */
  width: 330px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.record-side-column .costs-side-panels {
  position: static;
  right: auto;
  bottom: auto;
  width: auto;
  max-height: none;
  z-index: auto;
  overflow: visible;
  flex: 0 0 auto;
}

.record-side-column .record-menu {
  position: static;
  right: auto;
  bottom: auto;
  width: auto;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Record menu — ERP sidebar nav */
.record-menu {
  position: fixed;
  right: 0;
  bottom: 0;
  /* Mismo ancho que los paneles laterales de la cocina de una oferta. */
  width: 330px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-right: none;
  box-shadow: -2px 0 8px rgba(0,0,0,.06);
  z-index: 100;
  max-height: 90vh;
  overflow-y: auto;
}

.record-menu__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.record-menu__header-icon {
  font-size: 1.2rem;
  color: #059669;
}

.record-menu__header-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
}

.record-menu__save-notice {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: .68rem;
  font-weight: 600;
  color: #92400e;
  background: #fef9c3;
  border-bottom: 1px solid #fde68a;
}

.record-menu__save-notice .material-icons-outlined {
  font-size: .95rem;
  color: #d97706;
}

.record-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-menu__list > li {
  border-bottom: 1px solid #f1f5f9;
}

.record-menu__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: background .13s, color .13s;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  list-style: none;
}

.record-menu__link .material-icons-outlined {
  font-size: 1.05rem;
  color: #059669;
  flex-shrink: 0;
}

.record-menu__link:hover {
  background: #f0fdf4;
  color: #059669;
  text-decoration: none;
}

/* details/summary reset */
.record-menu details {
  border: none;
}

.record-menu details > summary {
  list-style: none;
}

.record-menu details > summary::-webkit-details-marker {
  display: none;
}

.record-menu__link--summary {
  justify-content: flex-start;
}

.record-menu__chevron {
  margin-left: auto;
  font-size: .95rem !important;
  color: #94a3b8 !important;
  transition: transform .2s;
}

.record-menu details[open] .record-menu__chevron {
  transform: rotate(180deg);
}

/* Submenu */
ul.record-submenu {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

ul.record-submenu li {
  border-bottom: 1px solid #f1f5f9;
}

ul.record-submenu li a {
  display: block;
  padding: 7px 12px 7px 32px;
  font-size: .72rem;
  color: #475569;
  text-decoration: none;
  transition: background .13s, color .13s;
}

ul.record-submenu li a:hover {
  background: #f0fdf4;
  color: #059669;
}

.message-mail-sent {
  background: #e0f1ec;
  padding: 10px;
  color: #00875f;
  border-radius: 10px;
}

.margin-negative {
  background: rgba(255, 0, 0, 0.48);
  animation: blink 5s infinite; /* Duración 1s, infinito */
}

@keyframes blink {
  0%, 50%, 100% { background: white; }
  25%, 75% {  background: rgba(255, 0, 0, 0.48); }
}

.view-resumen-precios-ofertas td.views-field.views-field-nothing-2 span {
  background: #f1efe0;
  padding: 10px;
  border-radius: 10px;
}

div #edit-actions {
  margin: 0 10px;
}

.toolbar-menu .bill-management .toolbar-box .toolbar-icon::before, .bill-management .toolbar-icon::before {
  mask-image: url('../icons/dollar-sign-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/dollar-sign-solid-full.svg') !important;
}


.toolbar-menu .price-update .toolbar-box .toolbar-icon::before, .price-update .toolbar-icon::before {
  mask-image: url('../icons/magnifying-glass-dollar-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/magnifying-glass-dollar-solid-full.svg') !important;
}

.toolbar-menu .cost-management .toolbar-box .toolbar-icon::before, .cost-management .toolbar-icon::before {
  mask-image: url('../icons/truck-ramp-box-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/truck-ramp-box-solid-full.svg') !important;
}

.toolbar-menu .provider-management .toolbar-box .toolbar-icon::before, .provider-management .toolbar-icon::before {
  mask-image: url('../icons/ship-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/ship-solid-full.svg') !important;
}

.toolbar-menu .kitchen .toolbar-box .toolbar-icon::before, .kitchen .toolbar-icon::before {
  mask-image: url('../icons/kitchen-set-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/kitchen-set-solid-full.svg') !important;
}


.toolbar-menu .customer-management .toolbar-box .toolbar-icon::before, .customer-management .toolbar-icon::before {
  mask-image: url('../icons/user-regular-full.svg') !important;
  -webkit-mask-image: url('../icons/user-regular-full.svg') !important;
}


.toolbar-menu .record-management .toolbar-box .toolbar-icon::before, .record-management .toolbar-icon::before {
  mask-image: url('../icons/clipboard-regular-full.svg') !important;
  -webkit-mask-image: url('../icons/clipboard-regular-full.svg') !important;
}


.toolbar-menu .offer-management .toolbar-box .toolbar-icon::before, .offer-management .toolbar-icon::before {
  mask-image: url('../icons/file-contract-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/file-contract-solid-full.svg') !important;
}


.toolbar-menu .bl-parties-management .toolbar-box .toolbar-icon::before, .bl-parties-management .toolbar-icon::before {
  mask-image: url('../icons/people-group-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/people-group-solid-full.svg') !important;
}


.toolbar-menu .toolbar-icon-system-dashboard .toolbar-box .toolbar-icon::before, .toolbar-icon-system-dashboard .toolbar-icon::before {
  mask-image: url('../icons/table-columns-solid-full.svg') !important;
  -webkit-mask-image: url('../icons/table-columns-solid-full.svg') !important;
}


#toolbar-administration, #toolbar-administration * {
  overflow: hidden;
}

.info-prov {
}

.claro-details__description {
  min-width: 100%;
}

/* ---- Holded bulk-action select ---- */
.holded-lines-action-select {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #c3d9d5;
  background: #fff;
  font-size: .9rem;
  cursor: pointer;
  height: 32px;
}

/* ---- Holded bulk-action modal ---- */
.holded-bulk-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
}

.holded-bulk-modal.is-open {
  display: flex;
}

.holded-bulk-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.holded-bulk-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 10px;
  padding: 28px 32px;
  min-width: 320px;
  max-width: 460px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .22);
}

.holded-bulk-modal__title {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: #003e37;
}

.holded-bulk-modal__body .form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.holded-bulk-modal__body label {
  font-weight: 600;
  font-size: .9rem;
}

.holded-bulk-modal__body .form-text {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #c3d9d5 !important;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.holded-bulk-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Resumen de "Revisar autoasignación" (líneas seleccionadas). */
.holded-bulk-report-wrap {
  max-height: 50vh;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-top: 10px;
}

.holded-bulk-report {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .72rem;
}

.holded-bulk-report th,
.holded-bulk-report td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

.holded-bulk-report thead th {
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .62rem;
  font-weight: 700;
  color: #475569;
  position: sticky;
  top: 0;
}

.holded-bulk-report tbody tr:last-child td {
  border-bottom: 0;
}

.holded-bulk-report td small {
  color: #64748b;
}

.holded-bulk-report__cell.is-ok {
  color: #15803d;
}

.holded-bulk-report__cell.is-assigned {
  color: #15803d;
  font-weight: 600;
  background: #f0fdf4;
}

.holded-bulk-report__cell.is-failed {
  color: #b91c1c;
  background: #fef2f2;
}

.important-info-element {
  background: #c72525d1;
  color: white;
  padding: 20px;
  text-align: center;
  justify-content: center;
  display: inline-block;
  width: 80%;
}

/* Holded — etiqueta proveedor */
.holded-provider-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  border-radius: 3px;
  white-space: nowrap;
}

/* Holded — estado de línea (Pendiente/Solicitar abono/En disputa/Aprobado) */
.holded-line-state {
  display: inline-block;
  padding: 2px 8px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.holded-line-state--pending {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.holded-line-state--refund {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.holded-line-state--disputed {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.holded-line-state--approved {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

/* Holded — etiqueta tipo documento */
.holded-doctype-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  border-radius: 3px;
  white-space: nowrap;
}

.holded-doctype-badge--refund {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #f0abfc;
}

.record-billing-status__invoices-table tr.record-billing-status__invoices-row--refund td {
  background: #fdf4ff;
}

/* Holded — diferencia coste real vs estimado */
.holded-diff { font-weight: 600; }
.holded-diff--over  { color: #b91c1c; }
.holded-diff--under { color: #15803d; }
.holded-diff-icon { font-size: 1rem; vertical-align: middle; margin-right: 2px; }
.holded-diff-icon--over { color: #b91c1c; }
.holded-diff-icon--ok   { color: #15803d; }
.holded-diff-abono {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 3px;
  vertical-align: middle;
}

/* Badge "Solicitar abono" clicable (abre el formulario de solicitud) */
button.holded-diff-abono--action {
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

button.holded-diff-abono--action:hover,
button.holded-diff-abono--action:focus-visible {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

/* Bill management menu — ERP style */
.bm-menu {
  max-width: 760px;
  margin: 24px auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

/* Cabecera informativa (no clicable): franja de título en verde corporativo
   para que no se confunda con las opciones del menú. */
.bm-menu__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #006547 0%, #0b7a58 100%);
  color: #fff;
  cursor: default;
}

.bm-menu__header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  font-size: 1.5rem;
  color: #fff;
}

.bm-menu__header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.bm-menu__header-sub {
  font-size: .75rem;
  color: rgba(255, 255, 255, .8);
  margin-top: 2px;
}

.bm-menu__grid {
  display: flex;
  flex-direction: column;
}

.bm-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
  background: #fff;
  transition: background .15s;
}

.bm-card:last-child {
  border-bottom: none;
}

.bm-card:hover {
  background: #f0fdf4;
  text-decoration: none;
}

.bm-card:hover .bm-card__arrow {
  color: #059669;
}

.bm-card__icon {
  font-size: 1.6rem;
  color: #059669;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.bm-card__body {
  flex: 1;
}

.bm-card__title {
  font-size: .875rem;
  font-weight: 700;
  color: #1e293b;
}

.bm-card__desc {
  font-size: .75rem;
  color: #64748b;
  margin-top: 2px;
}

.bm-card__arrow {
  font-size: 1.2rem;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: color .15s;
}

/* ERP form panel */
.erp-form-panel {
  margin: 24px auto;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.erp-form-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.erp-form-panel__icon {
  font-size: 2rem;
  color: #059669;
  flex-shrink: 0;
}

.erp-form-panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.erp-form-panel__sub {
  font-size: .75rem;
  color: #64748b;
  margin-top: 2px;
}

.erp-form-panel__body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.erp-form .erp-form__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.erp-form .erp-form__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.erp-form label {
  font-size: .72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .07em !important;
  color: #64748b !important;
}

.erp-form .form-element,
.erp-form select.form-select {
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: .875rem;
  padding: 0 10px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.erp-form .form-element:focus,
.erp-form select.form-select:focus {
  border-color: #6ee7b7;
  outline: none;
  box-shadow: 0 0 0 2px #d1fae5;
}

.erp-form .form-item__description {
  font-size: .7rem;
  color: #94a3b8;
  margin-top: 2px;
}

.erp-form__submit {
  align-self: flex-start;
  margin-top: 8px;
}

.erp-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* Widget "chosen": select múltiple con chips (js/efs-chosen.js) */
.efs-chosen__source {
  display: none !important;
}

.efs-chosen {
  position: relative;
  width: 100%;
}

.efs-chosen__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  box-sizing: border-box;
  cursor: text;
}

.efs-chosen__box:focus-within {
  border-color: #6ee7b7;
  box-shadow: 0 0 0 2px #d1fae5;
}

.efs-chosen__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 2px 4px 2px 9px;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  font-size: .78rem;
  line-height: 1.5;
}

.efs-chosen__chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.efs-chosen__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(6, 95, 70, .12);
  color: inherit;
  font-size: .8rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.efs-chosen__remove:hover {
  background: #065f46;
  color: #fff;
}

.efs-chosen__input {
  flex: 1 1 120px;
  min-width: 120px;
  height: 24px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: .82rem;
  color: #1e293b;
}

.efs-chosen__dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

.efs-chosen__option {
  padding: 7px 10px;
  font-size: .82rem;
  color: #1e293b;
  cursor: pointer;
}

.efs-chosen__option:hover {
  background: #f1f5f9;
}

/* Variantes de color: distinguen de un vistazo origen de destino. */
.efs-chosen--origin .efs-chosen__chip {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.efs-chosen--origin .efs-chosen__remove {
  background: rgba(30, 64, 175, .12);
}

.efs-chosen--origin .efs-chosen__remove:hover {
  background: #1e40af;
  color: #fff;
}

.efs-chosen--destiny .efs-chosen__chip {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.efs-chosen--destiny .efs-chosen__remove {
  background: rgba(154, 52, 18, .12);
}

.efs-chosen--destiny .efs-chosen__remove:hover {
  background: #9a3412;
  color: #fff;
}

.erp-stat--ok {
  color: #059669;
}

.erp-stat--ko {
  color: #dc2626;
}

.erp-stat--ok small,
.erp-stat--ko small {
  font-size: .75rem;
  font-weight: 400;
  opacity: .8;
}

/* Etiquetas de oferta (SendLinePriceForm y similares) */
.erp-offer-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.erp-tag {
  display: inline-block;
  padding: 1px 7px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 3px;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.6;
}

/* Tipo contenedor — azul índigo */
.erp-tag--container {
  background: #eef2ff;
  color: #3730a3;
  border-color: #a5b4fc;
}

/* Tipo servicio — verde esmeralda */
.erp-tag--service {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

/* Naviera / shipping provider — violeta */
.erp-tag--shipping {
  background: #faf5ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

/* TTE origen — naranja ámbar */
.erp-tag--tte-origin {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

/* TTE destino — rojo rosa */
.erp-tag--tte-destiny {
  background: #fff1f2;
  color: #9f1239;
  border-color: #fda4af;
}

/* Ruta origen → destino */
.erp-tag--route {
  font-size: .72rem;
  font-weight: 400;
  color: #374151;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 4px;
}

/* PVP precio */
.erp-tag--pvp {
  background: #f0fdf4;
  color: #14532d;
  border-color: #86efac;
}

/* Etiqueta única para la tabla de embarque semanal */
.erp-tag--semana {
  background: transparent;
  color: #006547;
  border-color: #a8d5c5;
}

/* Check pendiente (embarque semanal) */
.erp-tag--check-pending {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* ── Tabla embarque semanal ────────────────────────────────── */

.erp-semana-bar {
  display: flex;
  gap: 1px;
  margin-bottom: 14px;
  background: #c9e6dd;
  border-radius: 6px;
  overflow: hidden;
}

.erp-semana-bar__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 20px;
  background: #f2f9f7;
  min-width: 110px;
}

.erp-semana-bar__item--accent {
  background: #006547;
}

.erp-semana-bar__label {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #4b9e7e;
}

.erp-semana-bar__item--accent .erp-semana-bar__label {
  color: #a8d5c5;
}

.erp-semana-bar__value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #006547;
  line-height: 1.1;
}

.erp-semana-bar__item--accent .erp-semana-bar__value {
  color: #ffffff;
}

/* Contenedor con scroll horizontal; la cabecera queda sticky dentro */
.erp-semana-scroll {
  overflow-x: auto;
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.erp-semana-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .77rem;
  white-space: nowrap;
}

.erp-semana-table thead th {
  background: #f2f9f7;
  color: #006547;
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 10px;
  border-right: 1px solid #c9e6dd;
  border-bottom: 2px solid #006547;
  white-space: nowrap;
}

.erp-semana-table thead.is-sticky th {
  box-shadow: 0 2px 4px rgba(0,0,0,.12);
}

.erp-semana-table thead th:last-child {
  border-right: none;
}

/* Filas de datos */
.erp-semana-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.erp-semana-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.erp-semana-table tbody tr:hover {
  background: #eff6ff;
}

.erp-semana-table td {
  padding: 4px 8px;
  line-height: 1.25;
  vertical-align: middle;
  border-right: 1px solid #f1f5f9;
  color: #374151;
}

.erp-semana-table td:last-child {
  border-right: none;
}

/* Riesgo consumido: limita el ancho de la columna Cliente (hay nombres muy
   largos) dejando que el nombre pase a una segunda línea en vez de
   ensanchar toda la tabla. */
.erp-riesgo-table td:first-child,
.erp-riesgo-table th:first-child {
  min-width: 170px;
  max-width: 240px;
  white-space: normal;
  overflow-wrap: break-word;
}

/* Riesgo consumido tiene muchas columnas: cabeceras en varias líneas y
   celdas más compactas para que quepa; si aun así no cabe, el contenedor
   .erp-semana-scroll muestra scroll horizontal. */
.erp-riesgo-table thead th {
  white-space: normal;
  vertical-align: bottom;
  padding: 6px 8px;
  line-height: 1.2;
  min-width: 70px;
}

.erp-riesgo-table td {
  padding: 4px 6px;
}

.erp-riesgo-table td .erp-tag {
  white-space: nowrap;
}

/* Checkbox de selección de fila */
.erp-row-select {
  width: 32px;
  text-align: center;
  padding: 4px 6px;
}

.erp-row-check {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: #006547;
}

.erp-semana-table tbody tr:has(.erp-row-check:checked),
.view-id-records tbody tr:has(.erp-row-check:checked) {
  background: #fefce8 !important;
  outline: 2px solid #ca8a04;
  outline-offset: -2px;
}

/* Fila de cliente con las cargas bloqueadas por impago */
.erp-semana-table tbody tr.erp-row-blocked,
.erp-semana-table tbody tr.erp-row-blocked:nth-child(even) {
  background: #fef2f2;
}

/* Cabecera de grupo (p. ej. agrupación por cliente) */
.erp-semana-table tbody tr.erp-group-header,
.erp-semana-table tbody tr.erp-group-header:nth-child(even) {
  background: #f2f9f7;
}

.erp-semana-table tbody tr.erp-group-header td {
  padding: 7px 10px;
  font-weight: 700;
  font-size: .8rem;
  color: #006547;
  border-bottom: 2px solid #c9e6dd;
  white-space: normal;
}

.erp-semana-table tbody tr.erp-group-header td a {
  color: #006547;
}

/* Fila de totales al final de la tabla */
.erp-semana-table tbody tr.erp-totals-row,
.erp-semana-table tbody tr.erp-totals-row:nth-child(even) {
  background: #f8fafc;
}

.erp-semana-table tbody tr.erp-totals-row td {
  padding: 8px 10px;
  font-weight: 700;
  font-size: .8rem;
  color: #0f172a;
  border-top: 2px solid #006547;
  border-bottom: none;
  text-align: right;
}

.erp-semana-table tbody tr.erp-totals-row td:first-child {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .72rem;
  color: #006547;
}

/* Fila de subtotal al final de cada grupo */
.erp-semana-table tbody tr.erp-subtotal-row,
.erp-semana-table tbody tr.erp-subtotal-row:nth-child(even) {
  background: #f1f8f5;
}

.erp-semana-table tbody tr.erp-subtotal-row td {
  padding: 6px 10px;
  font-weight: 700;
  font-size: .78rem;
  color: #0f172a;
  border-top: 1px solid #c9e6dd;
}

.erp-semana-table tbody tr.erp-subtotal-row td:first-child {
  text-align: right;
  color: #006547;
}

.erp-semana-table tbody tr.erp-row-blocked:hover {
  background: #fee2e2;
}

.erp-semana-table tbody tr.erp-row-blocked td {
  color: #b91c1c;
  border-right-color: #fecaca;
  border-bottom-color: #fecaca;
}

.erp-semana-table tbody tr.erp-row-blocked td a {
  color: #b91c1c;
}

/* Valor vacío */
.erp-semana-empty {
  color: #d1d5db;
  font-size: .8rem;
}

/* Enlace de checks en la columna */
.erp-checks-link {
  display: inline-block;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.erp-checks-link--pending {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.erp-checks-link--ok {
  background: #f0fdf4;
  color: #14532d;
  border-color: #86efac;
}

.erp-checks-link:hover {
  opacity: .8;
  text-decoration: none;
}

/* Lista de checks en el popup */
.erp-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.erp-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: .85rem;
  border-bottom: 1px solid #f3f4f6;
}

.erp-check-row:last-child {
  border-bottom: none;
}

.erp-check-icon {
  font-size: 1rem;
  width: 1.2em;
  text-align: center;
  flex-shrink: 0;
}

.erp-check-row--ok {
  color: #15803d;
}

.erp-check-row--ok .erp-check-icon {
  color: #16a34a;
}

.erp-check-row--pending {
  color: #991b1b;
}

.erp-check-row--pending .erp-check-icon {
  color: #dc2626;
}

.erp-check-row--na {
  color: #b0b7c3;
  text-decoration: line-through;
  font-style: italic;
}

.erp-check-row--na .erp-check-icon {
  color: #d1d5db;
  text-decoration: none;
}

/* ---- Panel informativo ---- */
.erp-info-box {
  margin: 0 0 18px;
  background: #f0faf6;
  border: 1px solid #c9e6dd;
  border-left: 4px solid #006547;
  border-radius: 6px;
  overflow: hidden;
}

.erp-info-box__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #e4f2ec;
  border-bottom: 1px solid #c9e6dd;
}

.erp-info-box__icon {
  font-size: 1.2rem;
  color: #006547;
  flex-shrink: 0;
  line-height: 1;
}

.erp-info-box__title {
  font-size: .72rem;
  font-weight: 700;
  color: #006547;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.erp-info-box__body {
  padding: 12px 16px 14px;
}

.erp-info-box__list {
  margin: 0;
  padding-left: 18px;
}

.erp-info-box__list li {
  font-size: .82rem;
  color: #334155;
  line-height: 1.55;
  padding: 4px 0;
}

.erp-info-box__list li + li {
  border-top: 1px solid #d8f0e8;
  padding-top: 6px;
  margin-top: 2px;
}

.erp-info-box__list strong {
  color: #004d35;
  font-weight: 700;
}

/* ---- Barra de filtros (embarque semanal) ---- */
.erp-filters {
  padding: 10px 16px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 10px;
}

.erp-filters__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-end;
}

.erp-filters__field {
  display: flex;
  flex-direction: column;
}

.erp-filters__label {
  font-size: 10px;
  font-weight: 700;
  color: #006547;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
  white-space: nowrap;
}

.erp-filters__input,
.erp-filters__select {
  padding: 4px 7px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  height: 28px;
  background: #fff;
  box-sizing: border-box;
  min-width: 90px;
  max-width: 160px;
}

.erp-filters__input:focus,
.erp-filters__select:focus {
  outline: none;
  border-color: #006547;
  box-shadow: 0 0 0 2px rgba(0, 101, 71, 0.12);
}

.erp-filters__actions {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  padding-bottom: 0;
}

.erp-filters__submit {
  padding: 0 14px;
  background: #006547;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  height: 28px;
}

.erp-filters__submit:hover {
  background: #004d35;
}

.erp-filters__reset {
  padding: 0 12px;
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  height: 28px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.erp-filters__reset:hover {
  background: #f3f4f6;
  color: #374151;
}

/* ---- Barra de filtros construida con la API de formularios ----
   La barra original es HTML plano (erp-filters__field/__label/__input). Cuando
   los filtros son elementos de formulario de Drupal el marcado es distinto
   (div.form-item + label + input.form-element), así que aquí se replica el
   mismo aspecto sobre esa estructura. */

.erp-filters .form-item,
.erp-filters .js-form-item {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.erp-filters label {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #006547;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  line-height: 1.4;
}

.erp-filters input[type="text"],
.erp-filters input[type="number"],
.erp-filters input[type="search"],
.erp-filters select {
  box-sizing: border-box;
  height: 28px;
  min-height: 28px;
  min-width: 90px;
  max-width: 170px;
  padding: 4px 7px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #fff;
  font-size: 12px;
}

.erp-filters input[type="text"]:focus,
.erp-filters input[type="number"]:focus,
.erp-filters input[type="search"]:focus,
.erp-filters select:focus {
  outline: none;
  border-color: #006547;
  box-shadow: 0 0 0 2px rgba(0, 101, 71, 0.12);
}

/* Claro pinta el desplegable con una flecha gris y la cambia por una azul al
   enfocarlo (.form-element--type-select:focus). Aquí se fija la misma flecha
   discreta en todos los estados: los selectores llevan el elemento además de
   la clase para ganar en especificidad sin recurrir a !important. */
.erp-filters select,
.erp-filters select:focus,
.erp-filters select:hover {
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3e%3cpath fill='none' stroke-width='1.5' d='M1 1l6 6 6-6' stroke='%236b7280'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 10px 7px;
}

/* Gin impone a .button un borde de 2px con !important y una sombra, que
   descuadran el botón compacto de la barra de filtros. */
.erp-filters .erp-filters__submit {
  box-sizing: border-box;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #006547 !important;
  border-radius: 4px;
  background: #006547;
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.erp-filters .erp-filters__submit:hover,
.erp-filters .erp-filters__submit:focus,
.erp-filters .erp-filters__submit:active {
  border-color: #004d35 !important;
  background: #004d35;
  box-shadow: none;
  color: #fff;
}

/* Indicador de columna activa en sort */
.erp-semana-table thead th a.tablesort--active {
  color: #004d35;
  font-weight: 800;
}

.erp-semana-table thead th a {
  color: #006547;
  text-decoration: none;
}

.erp-semana-table thead th a:hover {
  text-decoration: underline;
}

.mercancias-tooltip-content {
  display: none;
}

.mercancias-tooltip-trigger {
  cursor: pointer;
  color: #0073aa;
  text-decoration: underline;
}

.tippy-box[data-theme~='mercancias'] {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.tippy-box[data-theme~='mercancias'] .tippy-arrow::before {
  border-bottom-color: #fff;
}

.tippy-box[data-theme~='mercancias'] .mercancias-palet-table {
  border-collapse: collapse;
  font-size: .85em;
}

.tippy-box[data-theme~='mercancias'] .mercancias-palet-table th,
.tippy-box[data-theme~='mercancias'] .mercancias-palet-table td {
  padding: 4px 8px;
  border: 1px solid #ddd;
  text-align: left;
}

.tippy-box[data-theme~='mercancias'] .mercancias-palet-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}
.row-terminal-expired td {
  background-color: #fdd !important;
  color: #900 !important;
}

.row-terminal-critical td {
  background-color: #c00 !important;
  color: #fff !important;
}

.terminal-days-warning {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  background-color: #fdd;
  color: #900;
  border: 1px solid #e44;
}

.terminal-days-critical {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  background-color: #c00;
  color: #fff;
}


/* ── Mapa de campos por tipo de servicio (ofertasConCostesExceso) ── */
.erp-costes-map {
  margin: 1rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}
.erp-costes-map__summary {
  padding: .6rem 1rem;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #374151;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.erp-costes-map__summary::before {
  content: '▶';
  font-size: .65rem;
  transition: transform .15s;
  color: #6b7280;
}
.erp-costes-map[open] .erp-costes-map__summary::before {
  transform: rotate(90deg);
}
.erp-costes-map__body {
  padding: 0 1rem 1rem;
}
.erp-costes-map__table {
  font-size: .72rem !important;
}
.erp-costes-map__table td,
.erp-costes-map__table th {
  white-space: nowrap;
  text-align: center;
}
.erp-costes-map__table td:first-child,
.erp-costes-map__table th:first-child {
  text-align: left;
}
.erp-costes-map__check {
  color: #065f46;
  font-weight: 700;
  font-size: .9rem;
}

/* ── Botón de acción destructiva en tablas ERP ── */
.erp-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 2px 10px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.6;
}
.erp-btn-danger:hover {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #f87171;
}

/* ═══════════════════════════════════════════════════════
   Panel "EFS vigente" (efs-current-panel): panel ERP fijo abajo-derecha
   en el formulario de cliente. Restaurado (se eliminó por error en 665d48c).
   ═══════════════════════════════════════════════════════ */
.efs-current-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  width: 240px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .15);
  font-size: .7rem;
}

.efs-current-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.efs-current-panel:not([open]) .efs-current-panel__header {
  border-bottom-color: transparent;
}

/* Ocultar el marcador nativo del summary. */
.efs-current-panel__header::-webkit-details-marker {
  display: none;
}
.efs-current-panel__header::marker {
  content: '';
}

.efs-current-panel__icon {
  color: #059669;
  font-size: 17px;
}

.efs-current-panel__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #1e293b;
  font-size: .7rem;
}

/* Chevron a la derecha que rota al desplegar. */
.efs-current-panel__chevron {
  margin-left: auto;
  color: #94a3b8;
  font-size: 18px;
  transition: transform .2s ease;
}
.efs-current-panel[open] .efs-current-panel__chevron {
  transform: rotate(180deg);
}

.efs-current-panel__body {
  padding: 10px 12px 12px;
}

.efs-current-panel__date {
  margin-bottom: 8px;
  padding: 4px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: .66rem;
}

.efs-current-panel__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .66rem;
  border: 1px solid #e2e8f0;
}

.efs-current-panel__table th,
.efs-current-panel__table td {
  padding: 3px 5px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  line-height: 1.3;
}

.efs-current-panel__table tbody tr:last-child th,
.efs-current-panel__table tbody tr:last-child td {
  border-bottom: 0;
}

.efs-current-panel__table th {
  font-weight: 600;
  color: #64748b;
  width: auto;
}

/* Servicio en formato etiqueta compacta, con ajuste de línea. */
.efs-current-panel__service {
  display: inline-block;
  padding: 1px 5px;
  background: #eef2f7;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #334155;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.efs-current-panel__table thead th,
.efs-current-panel__table thead td {
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .6rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}
.efs-current-panel__table thead td {
  text-align: right;
}

.efs-current-panel__table tbody tr:nth-child(even) th,
.efs-current-panel__table tbody tr:nth-child(even) td {
  background: #fafcfe;
}

.efs-current-panel__table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  width: 1%;
}

.efs-current-panel__empty {
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  font-style: italic;
  font-size: .66rem;
}

/* Etiqueta "Vigente" del EFS actual en field_efs_client (restaurada, se eliminó por error en 665d48c). */
.efs-label-current {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 10px;
  color: #065f46;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ------------------------------------------------------------------
   Tabla "Estado de facturación" (record-billing-status)
   Pestaña Factura del expediente: PVP, adicionales y ADR.
   ------------------------------------------------------------------ */

.record-billing-status {
  margin: 0 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.record-billing-status__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.record-billing-status__icon {
  font-size: 18px;
  color: #64748b;
}

.record-billing-status__title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #475569;
}

.record-billing-status__summary {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 700;
}

.record-billing-status__summary--is-complete {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.record-billing-status__summary--is-pending {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
}

.record-billing-status__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .7rem;
}

.record-billing-status__table th,
.record-billing-status__table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  line-height: 1.3;
}

.record-billing-status__table tbody tr:last-child th,
.record-billing-status__table tbody tr:last-child td {
  border-bottom: 0;
}

.record-billing-status__totals-row th,
.record-billing-status__totals-row td {
  border-top: 2px solid #cbd5e1;
  background: #f8fafc !important;
  font-weight: 700;
  color: #0f172a;
}

.record-billing-status__table thead th,
.record-billing-status__table thead td {
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .6rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.record-billing-status__table tbody th {
  font-weight: 600;
  color: #0f172a;
}

.record-billing-status__table tbody tr:nth-child(even) th,
.record-billing-status__table tbody tr:nth-child(even) td {
  background: #fafcfe;
}

.record-billing-status__table thead td,
.record-billing-status__table tbody td {
  text-align: right;
  white-space: nowrap;
  width: 1%;
  font-variant-numeric: tabular-nums;
}

.record-billing-status__block {
  text-align: left;
}

.record-billing-status__block {
  color: #64748b;
  font-weight: 600;
  white-space: normal;
}

.record-billing-status__row--na th,
.record-billing-status__row--na td {
  color: #94a3b8;
}

.record-billing-status__tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.record-billing-status__tag--ok {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.record-billing-status__tag--ko {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.record-billing-status__tag--na {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
}

.record-billing-status__invoices {
  padding: 10px 12px 12px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.record-billing-status__invoices-title {
  margin: 0 0 6px;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #475569;
}

.record-billing-status__invoices .holded-wrapper {
  margin: 0;
}

.record-billing-status__invoices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .7rem;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.record-billing-status__invoices-table th,
.record-billing-status__invoices-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  line-height: 1.3;
}

.record-billing-status__invoices-table thead th {
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .6rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.record-billing-status__invoices-table tbody tr:last-child th,
.record-billing-status__invoices-table tbody tr:last-child td {
  border-bottom: 0;
}

.record-billing-status__invoices-table td:last-child {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.record-billing-status__invoices-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* .holded-wrapper a (más arriba en este mismo fichero) pone a TODOS los
   enlaces del bloque "Facturas en Holded" un estilo de botón píldora verde
   grande con márgenes; aquí se resetea para estos dos botones concretos. */
.record-billing-status__invoices-actions a {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 10px;
  border-radius: 4px;
  background: #eef1fb;
  color: #283593;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid #c5cae9;
  text-decoration: none;
}
.record-billing-status__invoices-actions a:hover {
  background: #e0e7ff;
}

.holded-record-bill-approve-icon {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}
.holded-record-bill-approve-icon:hover {
  background: #fde68a;
}

/* Aviso de facturación pendiente en la descripción de "Estado administración". */
.record-admin-state-alert {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  background: #fffbeb;
  color: #92400e;
  font-size: .72rem;
  line-height: 1.4;
}

.record-admin-state-alert__icon {
  flex: 0 0 auto;
  font-size: 16px;
  color: #d97706;
}

.record-admin-state-alert strong {
  font-weight: 700;
}

/* Modo test de facturación (holded). */
.holded-test-banner {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  background: #fef2f2;
  color: #991b1b;
  font-size: .72rem;
  line-height: 1.4;
}

.holded-test-bills {
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  font-size: .72rem;
}

.holded-test-bills ul {
  margin: 4px 0 8px;
  padding-left: 18px;
}

.holded-test-bills code {
  background: #eef2f7;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 0 4px;
}

.holded-test-payload pre {
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: .68rem;
  line-height: 1.45;
}

.holded-test-payload summary {
  cursor: pointer;
  font-weight: 700;
  margin: 6px 0;
}

/* Resumen de la búsqueda de términos de taxonomía. */
.erp-term-search__summary {
  margin: 0 0 12px;
  font-size: .78rem;
  color: #6b7280;
}

#edit-submit {
  padding-block: 0;
}
