.tariff-scope-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 22, 23, .66);
}

.tariff-scope-dialog {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid #292b2c;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .3);
  padding: 0 0 1.5rem;
  color: #242627;
  font-family: inherit;
}

.tariff-scope-header,
.tariff-scope-company-heading,
.tariff-scope-actions,
.tariff-scope-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tariff-scope-header { min-height: 4.75rem; padding: 1.25rem 1.5rem; background: #292b2c; color: #fff; }
.tariff-scope-header h2 { margin: 0; font-size: 1.75rem; font-weight: 650; line-height: 1.2; }
.tariff-scope-close { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: .5px solid #292b2c; border-radius: 6px; background: #baff39; color: #292b2c; font-size: 25px; line-height: 1; cursor: pointer; }
html body .tariff-scope-dialog button.tariff-scope-close:is(:hover,:focus-visible):not(:disabled) { background: #f5f5f3!important; border-color: #292b2c!important; color: #292b2c!important; outline: none!important; box-shadow: 0 0 0 2px #292b2c!important; }
.tariff-scope-mode { display: grid; gap: 10px; margin: 1.5rem 1.5rem 1.25rem; border: 1px solid #c9cdca; border-radius: 5px; padding: 14px; }
.tariff-scope-mode legend { padding: 0 6px; font-weight: 700; }
.tariff-scope-mode label,
.tariff-scope-companies label { cursor: pointer; }
.tariff-scope-mode input,.tariff-scope-companies input { accent-color: #77a916; }
.tariff-scope-company-heading { margin: 0 1.5rem; }
.tariff-scope-count { border-radius: 999px; background: #f3ffe3; color: #35520e; padding: .2rem .65rem; font-size: .85rem; font-weight: 650; }
.tariff-scope-search { width: calc(100% - 3rem); min-height: 2.5rem; margin: 10px 1.5rem; border: 1px solid #b9beb8; border-radius: 5px; background: #fff; padding: 8px 10px; font: inherit; }
.tariff-scope-search:hover,.tariff-scope-search:focus { border-color: #c9c9c9; outline: none; box-shadow: 0 0 0 2px #292b2c; }
.tariff-scope-links { justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin: 0 1.5rem 12px; }
html body .tariff-scope-dialog .tariff-scope-links button { border: .5px solid #292b2c!important; border-radius: 5px; background: #f5f5f3!important; padding: .45rem .85rem; min-height: 2.25rem; color: #292b2c!important; font: inherit; font-weight: 650; text-decoration: none!important; outline: none!important; box-shadow: none!important; cursor: pointer; }
html body .tariff-scope-dialog .tariff-scope-links button:is(:hover,:focus-visible):not(:disabled):not([aria-disabled=true]) { color: #292b2c!important; background: #baff39!important; outline: none!important; border-color: #292b2c!important; box-shadow: 0 0 0 2px #292b2c!important; }
.tariff-scope-companies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; max-height: 280px; margin: 0 1.5rem; overflow: auto; border: 1px solid #c9cdca; border-radius: 5px; background: #f8f9f7; padding: 12px; }
.tariff-scope-companies label { border-radius: 4px; padding: .25rem .35rem; }
.tariff-scope-companies label:hover { background: #f3ffe3; }
.tariff-scope-error { min-height: 20px; margin: 9px 1.5rem; color: #a02121; }
.tariff-scope-actions { justify-content: flex-end; }
.tariff-scope-actions { margin: 0 1.5rem; gap: 1rem; }
.tariff-scope-actions button { min-width: 9.5rem; min-height: 2.5rem; border: .5px solid #292b2c; border-radius: 5px; padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer; transition: background-color .15s,box-shadow .15s; }
.tariff-scope-cancel { background: #fff; }
.tariff-scope-confirm { background: #baff39; }
.tariff-scope-actions button:hover,.tariff-scope-actions button:focus-visible { background: #f5f5f3; color: #292b2c; outline: none; box-shadow: 0 0 0 2px #292b2c; }
.tariff-scope-confirm:hover,.tariff-scope-confirm:focus-visible { background: #baff39; }

@media (max-width: 560px) {
  .tariff-scope-companies { grid-template-columns: 1fr; }
  .tariff-scope-actions { align-items: stretch; flex-direction: column-reverse; }
  .tariff-scope-actions button { width: 100%; }
}
