html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.shell,
.shell > *,
.section {
  min-width: 0;
}

.section {
  max-width: 100%;
}

.notice,
.alert,
.error {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}

.field-head > span:first-child {
  display: grid;
  gap: 3px;
}

.compact-button {
  flex: none;
  min-height: 32px;
  padding: 0 13px;
  color: #fff !important;
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.compact-button:hover {
  opacity: .88;
}

.compact-button:disabled {
  color: #71717a !important;
  background: #f4f4f5 !important;
  border-color: #e4e4e7 !important;
  box-shadow: none;
}

#suggestion-status {
  min-height: 18px;
  padding-top: 2px;
}

.prompt-status {
  min-height: 18px;
}

.assist-modal {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  color: var(--foreground);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

.assist-modal::backdrop {
  background: rgba(9, 9, 11, .45);
  backdrop-filter: blur(2px);
}

.assist-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.assist-card > p {
  margin: 0;
}

.assist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.assist-head .eyebrow {
  display: block;
  margin-bottom: 5px;
}

.assist-head h2 {
  margin: 0;
}

.modal-close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--foreground);
  background: var(--muted-bg);
}

.assist-status {
  min-height: 20px;
  color: #b91c1c;
  font-size: 12px;
}

.assist-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.danger-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fffafa;
}

.danger-heading {
  display: grid;
  gap: 4px;
}

.danger-heading > span {
  color: #b91c1c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.danger-heading h2 {
  margin: 0;
  color: #7f1d1d;
  font-size: 14px;
}

.danger-heading p {
  margin: 0;
  color: #71717a;
  font-size: 12px;
}

.danger-section form {
  flex: none;
  margin: 0;
}

.button.danger {
  flex: none;
  color: #b91c1c;
  background: #fff;
  border-color: #fecaca;
}

.button.danger:hover {
  color: #fff;
  background: #b91c1c;
  border-color: #b91c1c;
  opacity: 1;
}

@media (max-width: 640px) {
  .shell {
    width: 100%;
  }

  .table-wrap {
    max-width: calc(100vw - 32px);
  }

  .table-wrap table {
    min-width: 720px;
  }

  .danger-section {
    align-items: stretch;
    flex-direction: column;
  }

  .danger-section .button {
    width: 100%;
  }
}
