:root {
  --mdxx-akc-bg: #ffffff;
  --mdxx-akc-panel: #f5f7fa;
  --mdxx-akc-line: #dcdfe6;
  --mdxx-akc-line-strong: #cfd5e2;
  --mdxx-akc-text: #1d2129;
  --mdxx-akc-muted: #4e5969;
  --mdxx-akc-muted-soft: #86909c;
  --mdxx-akc-brand: #4756ff;
  --mdxx-akc-brand-hover: #6f7bff;
  --mdxx-akc-brand-soft: #eef0ff;
  --mdxx-akc-green: #15b25e;
  --mdxx-akc-amber: #ff8c00;
  --mdxx-akc-red: #ff471f;
  --mdxx-akc-shadow: 0 20px 60px rgba(29, 33, 41, 0.18);
}

.mdxx-akc-button,
.mdxx-akc-modal button,
.mdxx-akc-modal input,
.mdxx-akc-modal select,
.mdxx-akc-modal textarea {
  font: inherit;
}

.mdxx-akc-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(49, 87, 213, 0.3);
  border-radius: 999px;
  background: var(--mdxx-akc-brand);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(49, 87, 213, 0.26);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.mdxx-akc-button[data-status="missing"] {
  background: #9a3412;
  border-color: rgba(154, 52, 18, 0.35);
  box-shadow: 0 12px 30px rgba(154, 52, 18, 0.24);
}

.mdxx-akc-button svg {
  width: 17px;
  height: 17px;
}

.mdxx-akc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: rgba(29, 33, 41, 0.34);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mdxx-akc-modal {
  width: min(1080px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(220, 223, 230, 0.9);
  border-radius: 8px;
  background: var(--mdxx-akc-bg);
  box-shadow: var(--mdxx-akc-shadow);
  color: var(--mdxx-akc-text);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.mdxx-akc-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--mdxx-akc-line);
  background: #ffffff;
}

.mdxx-akc-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.mdxx-akc-head p,
.mdxx-akc-subtle {
  margin: 0;
  color: var(--mdxx-akc-muted);
  line-height: 1.55;
  font-size: 13px;
}

.mdxx-akc-headline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mdxx-akc-head-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(71, 86, 255, 0.16);
  border-radius: 8px;
  background: var(--mdxx-akc-brand-soft);
  color: var(--mdxx-akc-brand);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.mdxx-akc-head-icon svg {
  width: 18px;
  height: 18px;
}

.mdxx-akc-head-kicker {
  margin: 0 0 2px;
  color: var(--mdxx-akc-muted-soft);
  font-size: 12px;
  font-weight: 650;
}

.mdxx-akc-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--mdxx-akc-line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--mdxx-akc-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.mdxx-akc-close:hover {
  background: var(--mdxx-akc-panel);
  color: var(--mdxx-akc-text);
}

.mdxx-akc-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 16px;
  background: var(--mdxx-akc-panel);
}

.mdxx-akc-sidebar,
.mdxx-akc-editor,
.mdxx-akc-help,
.mdxx-akc-security,
.mdxx-akc-provider-card {
  border: 1px solid var(--mdxx-akc-line);
  border-radius: 8px;
  background: #ffffff;
}

.mdxx-akc-sidebar {
  padding: 10px;
  align-self: start;
  position: sticky;
  top: 0;
}

.mdxx-akc-search {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--mdxx-akc-line);
  border-radius: 6px;
  margin-bottom: 10px;
  color: var(--mdxx-akc-text);
  background: #ffffff;
  outline: none;
}

.mdxx-akc-search:focus,
.mdxx-akc-field input:focus,
.mdxx-akc-field select:focus,
.mdxx-akc-field textarea:focus {
  border-color: var(--mdxx-akc-brand);
  box-shadow: 0 0 0 3px rgba(71, 86, 255, 0.12);
}

.mdxx-akc-provider-list {
  display: grid;
  gap: 4px;
  max-height: 520px;
  overflow: auto;
}

.mdxx-akc-provider-tab {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 9px 10px;
  color: var(--mdxx-akc-text);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.mdxx-akc-provider-tab:hover {
  background: var(--mdxx-akc-brand-soft);
}

.mdxx-akc-provider-tab.active {
  border-color: rgba(71, 86, 255, 0.35);
  background: var(--mdxx-akc-brand-soft);
  box-shadow: inset 3px 0 0 var(--mdxx-akc-brand);
}

.mdxx-akc-provider-tab strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.mdxx-akc-provider-tab span {
  color: var(--mdxx-akc-muted);
  font-size: 12px;
}

.mdxx-akc-content {
  display: grid;
  gap: 12px;
}

.mdxx-akc-security {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border-color: #ffe0b2;
  background: #fffaf2;
}

.mdxx-akc-security strong {
  color: #7a3d00;
  font-size: 13px;
}

.mdxx-akc-security-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fff0d9;
  color: #a15c05;
  display: inline-grid;
  place-items: center;
}

.mdxx-akc-security-icon svg {
  width: 16px;
  height: 16px;
}

.mdxx-akc-editor {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.mdxx-akc-provider-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mdxx-akc-provider-title h3 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0;
}

.mdxx-akc-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--mdxx-akc-brand-soft);
  color: var(--mdxx-akc-brand);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.mdxx-akc-pill.ok {
  background: #e8f7ef;
  color: var(--mdxx-akc-green);
}

.mdxx-akc-pill.warn {
  background: #fff4dd;
  color: var(--mdxx-akc-amber);
}

.mdxx-akc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.mdxx-akc-field {
  display: grid;
  gap: 6px;
}

.mdxx-akc-field.full {
  grid-column: 1 / -1;
}

.mdxx-akc-field label {
  color: var(--mdxx-akc-text);
  font-size: 13px;
  font-weight: 650;
}

.mdxx-akc-field input,
.mdxx-akc-field select,
.mdxx-akc-field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--mdxx-akc-line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--mdxx-akc-text);
  background: #ffffff;
  box-sizing: border-box;
  outline: none;
}

.mdxx-akc-field textarea {
  min-height: 76px;
  resize: vertical;
}

.mdxx-akc-field small {
  color: var(--mdxx-akc-muted);
  line-height: 1.45;
  font-size: 12px;
}

.mdxx-akc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mdxx-akc-primary,
.mdxx-akc-secondary,
.mdxx-akc-danger {
  min-height: 38px;
  border-radius: 6px;
  padding: 0 13px;
  border: 1px solid var(--mdxx-akc-line);
  cursor: pointer;
  font-weight: 650;
}

.mdxx-akc-primary {
  background: var(--mdxx-akc-brand);
  border-color: var(--mdxx-akc-brand);
  color: #ffffff;
}

.mdxx-akc-primary:hover {
  background: var(--mdxx-akc-brand-hover);
  border-color: var(--mdxx-akc-brand-hover);
}

.mdxx-akc-secondary {
  background: #ffffff;
  color: var(--mdxx-akc-text);
}

.mdxx-akc-secondary:hover {
  border-color: var(--mdxx-akc-line-strong);
  background: var(--mdxx-akc-panel);
}

.mdxx-akc-danger {
  background: #fff1f1;
  border-color: #ffc7c7;
  color: var(--mdxx-akc-red);
}

.mdxx-akc-help {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.mdxx-akc-help h4 {
  margin: 0;
  font-size: 15px;
}

.mdxx-akc-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--mdxx-akc-text);
  line-height: 1.65;
}

.mdxx-akc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mdxx-akc-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--mdxx-akc-line);
  border-radius: 6px;
  color: var(--mdxx-akc-brand);
  text-decoration: none;
  background: #ffffff;
  font-size: 13px;
}

.mdxx-akc-env {
  border: 1px solid #202635;
  border-radius: 6px;
  background: #111827;
  color: #d7e3ff;
  padding: 12px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.mdxx-akc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--mdxx-akc-line);
  border-radius: 8px;
  background: #ffffff;
}

.mdxx-akc-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2147483002;
  border-radius: 999px;
  background: #102033;
  color: #ffffff;
  padding: 10px 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

@media (max-width: 820px) {
  .mdxx-akc-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .mdxx-akc-modal {
    max-height: calc(100vh - 20px);
  }

  .mdxx-akc-provider-title,
  .mdxx-akc-footer {
    flex-direction: column;
  }

  .mdxx-akc-head {
    align-items: flex-start;
    padding: 16px;
  }

  .mdxx-akc-headline {
    align-items: flex-start;
  }

  .mdxx-akc-head h2 {
    font-size: 19px;
  }

  .mdxx-akc-close {
    flex: 0 0 auto;
  }

  .mdxx-akc-body {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .mdxx-akc-sidebar {
    position: static;
  }

  .mdxx-akc-provider-list {
    max-height: 220px;
  }

  .mdxx-akc-form {
    grid-template-columns: 1fr;
  }
}
