.acl-editor[hidden], .acl-box [hidden] { display: none; }
.acl-editor { display: grid; gap: 14px; }
.acl-box { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.acl-box legend { padding: 0 5px; font-weight: 650; }
.acl-toolbar, .acl-choice, .acl-group-head, .acl-actions, .customer-selection {
  display: flex;
  align-items: center;
  gap: 8px;
}
.acl-toolbar, .acl-actions, .customer-selection { flex-wrap: wrap; }
.acl-box .subtitle { margin-block: 8px; }
.acl-choice, .acl-chip { cursor: pointer; }
.acl-choice input, .acl-chip input, .customer-check input { accent-color: var(--teal-dark); }
.acl-areas { display: grid; gap: 6px; max-height: 160px; overflow: auto; margin-top: 9px; }
.acl-box [data-area-selection] { margin-top: 9px; }
.acl-group-list { display: grid; gap: 7px; }
.acl-group { background: var(--bg); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.acl-group-head { justify-content: space-between; }
.acl-actions { margin: 6px 0 0 23px; }
.acl-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; font-size: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 5px;
}
.acl-chip input { margin: 0; }
.acl-chip:has(:checked) { background: var(--light-teal); border-color: var(--teal); }
.acl-chip:has(:disabled) { opacity: .55; cursor: default; }
.acl-footer { margin: 10px 0; }
.acl-footer [data-acl-count] { margin-left: auto; }
.customer-selection { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.customer-check { width: 1%; }
.plan-taxes > strong { display: block; margin-bottom: 6px; }
.settings-fields { margin: 0; border: 0; min-width: 0; padding: 0; }
.gateway-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.gateway-filters label { display: grid; gap: 4px; min-width: 0; }
.gateway-filters label > span { font-size: 11px; color: var(--muted); font-weight: 650; }
.gateway-search { flex: 1 1 180px; }
.gateway-filters .period-input { color: var(--ink); }
@media (max-width: 550px) {
  .acl-actions { margin-left: 0; }
  .acl-box { padding: 9px; }
  .gateway-filters label { flex: 1 1 130px; }
  .gateway-filters input, .gateway-filters select { width: 100%; }
}
.modal > form { min-height: 0; display: flex; flex-direction: column; }
.modal-head, .modal-footer { flex-shrink: 0; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

.acl-choice.activation-granted { outline: 1px solid var(--accent, #0b9d89); }
.isp-context { font-size: .75rem; color: var(--muted); max-width: 15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media(max-width: 850px) { .isp-context { display: none; } }
