.install-label {
  margin: 22px 0 8px;
  color: var(--muted);
  font-weight: 650;
}

.text-button {
  width: 100%;
  margin-top: 12px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: var(--accent);
}

.text-button:hover {
  background: #edf2fc;
}

.form-result {
  margin: 14px 0 0;
  color: var(--success);
  font-size: 13px;
}

.device-grid {
  align-items: start;
}

.device {
  padding: 0;
  overflow: hidden;
}

.device > .device-head {
  position: relative;
  min-width: 0;
  padding: 17px 48px 17px 20px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.device > .device-head::-webkit-details-marker {
  display: none;
}

.device > .device-head::after {
  position: absolute;
  right: 20px;
  top: 50%;
  content: '›';
  color: #7a8493;
  font-size: 25px;
  line-height: 1;
  transform: translateY(-50%) rotate(90deg);
  transition: transform .15s ease;
}

.device[open] > .device-head::after {
  transform: translateY(-50%) rotate(-90deg);
}

.device > .device-head:hover {
  background: #fafbfc;
}

.device > .device-head:focus-visible {
  outline: 3px solid rgba(33, 91, 219, .18);
  outline-offset: -3px;
}

.device[open] > .device-head {
  border-bottom: 1px solid var(--line);
}

.device-body {
  padding: 0 20px 20px;
}

.device-title {
  min-width: 0;
}

.device-title-name,
.device-title > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-title-name {
  font-size: 17px;
}

.device-title > span {
  color: var(--muted);
  font-size: 12px;
}

.device-summary-contact {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
}

.device-summary-contact small,
.device-summary-contact time,
.device-summary-contact > span {
  display: block;
}

.device-summary-contact small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.device-summary-contact time,
.device-summary-contact > span {
  font-size: 11px;
  font-weight: 650;
}

.device dl.device-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.device-meta dd > time,
.device-meta dd > small {
  display: block;
}

.device-meta dd > small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 400;
}

.device-meta .device-ip {
  overflow-wrap: anywhere;
  white-space: normal;
}

.status.healthy {
  color: var(--success);
}

.status.healthy i {
  background: var(--success);
  box-shadow: 0 0 0 3px #dff5eb;
}

.status.warning {
  color: #9a6200;
}

.status.warning i {
  background: #d98a00;
  box-shadow: 0 0 0 3px #fff0cc;
}

.status.error {
  color: var(--danger);
}

.status.error i {
  background: var(--danger);
  box-shadow: 0 0 0 3px #feecef;
}

.status.offline,
.status.unknown {
  color: #687386;
}

.device-head .status {
  flex: 0 1 auto;
  margin-left: 0;
  max-width: 145px;
  text-align: right;
}

.agent-health {
  margin: 0 0 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fafb;
}

.agent-health summary {
  padding: 11px 12px;
  cursor: pointer;
  font-weight: 700;
}

.agent-health summary small {
  float: right;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.agent-health[open] summary {
  border-bottom: 1px solid var(--line);
}

.device .agent-health dl.health-components,
.device .agent-health dl.health-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 12px;
  border: 0;
}

.device .agent-health dl.health-facts {
  border-top: 1px solid var(--line);
}

.health-components > div,
.health-facts > div {
  min-width: 0;
}

.health-component {
  color: var(--danger);
}

.health-component.ok {
  color: var(--success);
}

.health-component i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
}

.health-facts dd {
  overflow-wrap: anywhere;
}

.health-issues,
.health-ok,
.health-empty,
.health-context {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 11px;
}

.health-context {
  padding-top: 12px;
  color: #687386;
}

.health-issues {
  color: #8a3f00;
}

.health-issues ul {
  margin: 5px 0 0;
  padding-left: 18px;
}

.health-ok {
  color: var(--success);
}

.health-empty {
  padding-top: 12px;
  color: var(--muted);
}

@media (max-width: 620px) {
  .device > .device-head {
    gap: 9px;
    padding: 14px 39px 14px 14px;
  }

  .device > .device-head::after {
    right: 14px;
  }

  .device-body {
    padding: 0 14px 14px;
  }

  .device-summary-contact {
    display: none;
  }

  .device-head .status {
    max-width: 105px;
    font-size: 10px;
  }

  .device-head .computer {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .device dl.device-meta {
    grid-template-columns: 1fr;
  }

  .device .agent-health dl.health-components,
  .device .agent-health dl.health-facts {
    grid-template-columns: 1fr;
  }

  .agent-health summary small {
    display: block;
    float: none;
    margin-top: 2px;
  }
}

#email-setup-logout {
  width: 100%;
  margin-top: 10px;
}

#token-result .install-command {
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

#copy-token {
  margin-bottom: 4px;
}

#uninstall-dialog .install-command {
  display: block;
  max-height: 180px;
  margin: 16px 0;
  padding: 14px;
  overflow: auto;
  border: 1px dashed #9aabd0;
  border-radius: 8px;
  background: #eff3fa;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* legacy selector removed */
#download-uninstall-setup {
  width: 100%;
}

.uninstall-warning {
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.uninstall-warning code {
  font-weight: 700;
}

.device-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.device-actions .add-policy {
  width: auto;
}

.secondary.danger {
  color: var(--danger);
  border-color: #efbdc6;
}

.secondary.danger:hover {
  background: #feecef;
}

.page-actions,
.tags,
.list-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.page-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.policy .target-details {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.policy .target-details code {
  display: block;
}

.policy .target-details small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-head.compact {
  margin-top: 15px;
}

.tags {
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.tags.exceptions:empty {
  display: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 7px 4px 9px;
  border: 1px solid #cfdaef;
  border-radius: 99px;
  background: #edf2fc;
  color: #254f9f;
  font-size: 11px;
}

.exception-tag {
  border-color: #b9e5d1;
  background: #e8f8f0;
  color: #126d49;
}

.tag-remove {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font-size: 15px;
  line-height: 16px;
}

.tag-remove:hover {
  background: #ffffffa8;
}

.device-actions.policy-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.usb-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f8fa;
}

.usb-policy strong,
.usb-policy small {
  display: block;
}

.usb-policy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.usb-policy-form {
  display: flex;
  align-items: center;
  flex: none;
  gap: 7px;
}

.usb-policy-form select,
.usb-policy-form button {
  width: auto;
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
}

.device-inventory {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f8fa;
}

.device-inventory > summary,
.inventory-subsection > summary {
  cursor: pointer;
  font-weight: 700;
}

.device-inventory > summary small {
  margin-left: 7px;
  color: var(--muted);
  font-weight: 400;
}

.device-inventory section { margin-top: 15px; }
.device-inventory h4 { margin: 0 0 8px; font-size: 12px; }
.inventory-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.inventory-facts > div { min-width: 0; }
.inventory-facts dd { overflow-wrap: anywhere; }
.inventory-subsection { margin-top: 12px; }
.inventory-table-wrap { overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.inventory-table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 11px; }
.inventory-table th, .inventory-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.inventory-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; background: #f1f3f6; }
.inventory-table tr:last-child td { border-bottom: 0; }
.inventory-table td { overflow-wrap: anywhere; }

.device-actions.policy-actions button {
  width: auto;
  padding: 8px 6px;
  font-size: 12px;
}

.device-actions + .device-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: .5;
  background: #e7e9ed;
  color: #7b8491;
}

.pill.limit-reached {
  background: #feecef;
  color: var(--danger);
}

dialog.wide-dialog {
  width: min(900px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
}

.new-list-form {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  align-items: end;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8fa;
}

.new-list-form label {
  margin: 0;
}

.new-list-form button {
  width: auto;
  margin: 0;
}

.block-lists {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.list-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.list-head > div {
  min-width: 0;
  flex: 1;
}

.list-head h3,
.list-head p {
  margin: 0;
}

.list-head p {
  color: var(--muted);
  font-size: 12px;
}

.pill.neutral {
  flex: none;
  background: #f0f2f5;
  color: #566170;
}

.list-entries {
  max-height: 220px;
}

.list-entry-form {
  display: grid;
  grid-template-columns: 135px minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.list-entry-form input,
.list-entry-form select,
.list-entry-form button {
  width: auto;
  margin: 0;
}

.list-entry-form .mini-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.list-entry-form .mini-check input {
  width: auto;
}

.list-entry-form .mini-check[hidden] {
  display: none;
}

.empty-list {
  padding: 28px;
  border: 1px dashed #cfd5dd;
  border-radius: 10px;
  text-align: center;
}

.empty-list p {
  margin-bottom: 2px;
  font-weight: 650;
}

.group-note {
  padding: 10px 12px;
  border-left: 3px solid #d59a20;
  border-radius: 5px;
  background: #fff8e8;
  color: #725112;
  font-size: 12px;
}

.device-groups {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.group-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.group-card-head,
.group-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-card-head > div {
  min-width: 0;
  flex: 1;
}

.group-card-head h3,
.group-card-head p {
  margin: 0;
}

.group-card-head p {
  color: var(--muted);
  font-size: 12px;
}

.group-details-form {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(220px, 1.2fr) auto;
  align-items: end;
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.group-details-form label,
.group-details-form input,
.group-details-form button {
  margin: 0;
}

.group-details-form input {
  margin-top: 7px;
}

.group-details-form button,
.group-actions button {
  width: auto;
}

.group-members-form fieldset,
.bulk-device-fieldset {
  min-width: 0;
  margin: 16px 0 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.group-members-form legend,
.bulk-device-fieldset legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}

.member-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 230px;
  overflow: auto;
}

.member-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
  font-weight: 500;
}

.member-option input {
  width: auto;
  margin: 0;
}

.member-option span,
.member-option strong,
.member-option small {
  display: block;
  min-width: 0;
}

.member-option strong,
.member-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-option small {
  color: var(--muted);
  font-size: 11px;
}

.group-actions {
  justify-content: space-between;
  margin-top: 12px;
}

.bulk-form {
  display: grid;
  gap: 13px;
}

.bulk-form > label,
.bulk-form .bulk-panel > label {
  margin: 0;
}

.bulk-panel {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f8fa;
}

.bulk-panel[hidden] {
  display: none;
}

.bulk-target-fields {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr);
  gap: 10px;
}

.bulk-target-fields .check-label {
  grid-column: 1 / -1;
  margin: 0;
}

.bulk-device-fieldset .hint {
  margin: 10px 0 0;
}

.bulk-form .dialog-actions {
  margin-top: 4px;
}

@media (max-width: 720px) {
  .page-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .new-list-form,
  .list-entry-form,
  .group-details-form,
  .bulk-target-fields {
    grid-template-columns: 1fr;
  }

  .member-options {
    grid-template-columns: 1fr;
  }

  .bulk-target-fields .check-label {
    grid-column: auto;
  }

  .group-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .list-entry-form input,
  .list-entry-form select,
  .list-entry-form button {
    width: 100%;
  }

  .list-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .device-actions.policy-actions {
    grid-template-columns: 1fr;
  }

  .usb-policy {
    align-items: stretch;
    flex-direction: column;
  }

  .usb-policy-form select {
    min-width: 0;
    flex: 1;
  }

  .audit-filter {
    grid-template-columns: 1fr;
  }

  .audit-filter button {
    width: 100%;
  }
}

dialog.security-dialog {
  width: min(610px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
}

/* v0.18.2: .wide-dialog deve prevalecer sobre a largura base dos diálogos de segurança. */
dialog.security-dialog.wide-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  overflow-x: hidden;
  overflow-y: auto;
}

dialog.audit-dialog {
  width: min(1120px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
}

dialog.incidents-dialog {
  width: min(1180px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
}

.incident-settings {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.incident-settings label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.incident-settings input {
  width: 84px;
  margin: 0;
}

.incident-settings button {
  width: auto;
  margin: 0;
}

.incident-settings .form-result {
  margin: 0 0 8px;
}

.incidents-filter {
  display: grid;
  grid-template-columns: 158px 158px minmax(155px, .9fr) minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8fa;
}

.incidents-filter label,
.incidents-filter button,
.incidents-filter input,
.incidents-filter select {
  margin: 0;
}

.incidents-filter button {
  width: auto;
}

.incidents-filter input[type="date"] {
  min-width: 150px;
}

.incidents-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.incidents-summary > div {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.incidents-summary dd {
  margin-top: 3px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
}

.incidents-loading {
  margin: 10px 0;
  color: var(--muted);
  text-align: center;
}

.incidents-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.incidents-table-wrap:focus-visible {
  outline: 3px solid rgba(33, 91, 219, .18);
  outline-offset: 2px;
}

.incidents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.incidents-table th,
.incidents-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.incidents-table th {
  position: sticky;
  top: 0;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.incidents-table tr:last-child td {
  border-bottom: 0;
}

.incidents-table td:first-child,
.incidents-table td:last-child {
  white-space: nowrap;
}

.incidents-table strong,
.incidents-table small,
.incident-context span {
  display: block;
}

.incidents-table small,
.incident-context {
  color: var(--muted);
}

.incidents-table small {
  margin-top: 2px;
  font-weight: 400;
}

.incidents-table code {
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 11px;
}

.incident-type {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 99px;
  background: #f0f2f5;
  color: #566170;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.incident-type.domain_blocked,
.incident-type.ip_blocked,
.incident-type.usb_access_denied {
  background: #feecef;
  color: #a61f38;
}

.incident-type.usb_connected {
  background: #e1f6ec;
  color: #126d49;
}

.incident-type.usb_removed {
  background: #edf2fc;
  color: #2452b9;
}

.incident-context span + span {
  margin-top: 3px;
}

.incident-count {
  color: var(--ink);
  font-weight: 750;
  text-align: center !important;
}

#incidents-more {
  display: block;
  margin: 14px auto 0;
}

#incidents-more[hidden] {
  display: none;
}

#incidents-empty {
  margin: 0;
  border: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.audit-filter {
  display: grid;
  grid-template-columns: 170px 150px minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8fa;
}

.audit-filter label,
.audit-filter button,
.audit-filter input,
.audit-filter select {
  margin: 0;
}

.audit-filter button {
  width: auto;
}

.audit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.audit-table th,
.audit-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.audit-table th {
  position: sticky;
  top: 0;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.audit-table tr:last-child td {
  border-bottom: 0;
}

.audit-table td:first-child,
.audit-table td:nth-child(4),
.audit-table td:last-child {
  white-space: nowrap;
}

.audit-table td:nth-child(2) {
  font-weight: 650;
}

.audit-table strong,
.audit-table small {
  display: block;
}

.audit-table small {
  color: var(--muted);
  font-weight: 400;
}

.audit-table code {
  font-size: 11px;
}

.audit-result {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 750;
}

.audit-result.success {
  background: #e1f6ec;
  color: #126d49;
}

.audit-result.failure {
  background: #feecef;
  color: #a61f38;
}

.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 0;
}

.audit-pagination button {
  width: auto;
}

.audit-pagination button[hidden] {
  display: none;
}

#audit-page {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

#audit-empty {
  margin: 0;
  border: 0;
}

.security-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.security-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.security-warning,
.security-ok {
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff4dc;
  color: #76520b;
  font-size: 12px;
}

.security-ok {
  background: #e8f8f0;
  color: #126d49;
}

.button-link {
  display: block;
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.secret-code,
#recovery-codes {
  display: block;
  padding: 13px;
  border: 1px dashed #9aabd0;
  border-radius: 8px;
  background: #eff3fa;
  overflow-wrap: anywhere;
  text-align: center;
}

#mfa-qr-code {
  display: grid;
  place-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 14px auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

#mfa-qr-code canvas,
#mfa-qr-code img,
#mfa-qr-code svg {
  display: block;
  width: min(220px, 100%);
  height: auto;
}

#recovery-codes {
  columns: 2;
  white-space: pre-wrap;
  text-align: left;
}

#recovery-result button {
  width: 100%;
  margin-top: 9px;
}

@media (max-width: 620px) {
  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .header-actions button {
    width: 100%;
    padding: 9px 10px;
  }

  #dashboard > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  #recovery-codes {
    columns: 1;
  }

  .audit-filter {
    grid-template-columns: 1fr;
  }

  .audit-filter button {
    width: 100%;
  }

  .incidents-filter,
  .incidents-summary {
    grid-template-columns: 1fr;
  }

  .incidents-filter button {
    width: 100%;
  }

  .incident-settings {
    align-items: stretch;
    flex-direction: column;
  }

  .incident-settings label {
    align-items: flex-start;
    flex-direction: column;
  }

  .incident-settings button {
    width: 100%;
  }

  .incidents-table-wrap {
    overflow: visible;
    border: 0;
  }

  .incidents-table,
  .incidents-table tbody,
  .incidents-table tr,
  .incidents-table td {
    display: block;
    width: 100%;
  }

  .incidents-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .incidents-table tr {
    margin-bottom: 10px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .incidents-table td,
  .incidents-table tr:last-child td {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 0;
    border: 0;
    white-space: normal;
  }

  .incidents-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .incident-count {
    text-align: left !important;
  }
}

@media (min-width: 621px) and (max-width: 980px) {
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .incidents-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .incidents-search,
  .incidents-filter button {
    grid-column: span 2;
  }

  .incidents-filter button {
    width: 100%;
  }
}

/* v0.17.1 — grupos recolhíveis */
.group-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
}
.group-list-toolbar > div { display: flex; gap: 7px; flex-wrap: wrap; }
.group-list-toolbar button { width: auto; padding: 7px 10px; font-size: 11px; }
.group-card { transition: border-color .14s ease, background .14s ease; }
.group-card.collapsed { background: color-mix(in srgb, var(--surface) 96%, var(--bg)); }
.group-card-head { align-items: flex-start; }
.group-card-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.group-toggle { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 7px 9px; font-size: 11px; }
.group-toggle-chevron { display: inline-block; font-size: 15px; line-height: 1; transition: transform .14s ease; }
.group-card.expanded .group-toggle-chevron { transform: rotate(180deg); }
.group-card-body[hidden] { display: none !important; }
.group-card.collapsed .group-policy-summary { margin-top: 6px; }
@media (max-width: 620px) {
  .group-list-toolbar { align-items: flex-start; flex-direction: column; }
  .group-list-toolbar > div { width: 100%; }
  .group-list-toolbar button { flex: 1; }
  .group-card-head { gap: 8px; }
  .group-card-head-actions { align-items: flex-end; flex-direction: column; }
  .group-toggle-label { display: none; }
}

/* v0.22.5 — URL do Setup copiável nos fluxos de inscrição e atualização remota. */
.setup-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0 4px;
}
.setup-url-row .install-command {
  min-width: 0;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
}
.setup-url-row button {
  width: auto;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .setup-url-row { grid-template-columns: 1fr; }
  .setup-url-row button { width: 100%; }
}
