:where(.aimogen-user-remote-panel) {
  --aimogen-surface: #ffffff;
  --aimogen-surface-2: rgba(255, 255, 255, 0.72);
  --aimogen-border: rgba(0, 0, 0, 0.10);
  --aimogen-border-2: rgba(0, 0, 0, 0.08);
  --aimogen-text: rgba(0, 0, 0, 0.88);
  --aimogen-muted: rgba(0, 0, 0, 0.62);
  --aimogen-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);

  --aimogen-accent: #2563eb;
  --aimogen-accent-contrast: #ffffff;

  --aimogen-radius: 14px;
  --aimogen-gap: 12px;

  --aimogen-pad: 14px;
  --aimogen-pad-sm: 10px;

  max-width: 980px;
  margin: 16px auto;
  padding: 14px;

  background: var(--aimogen-surface);
  border: 1px solid var(--aimogen-border);
  border-radius: var(--aimogen-radius);
  box-shadow: var(--aimogen-shadow);

  color: var(--aimogen-text);
  font: inherit;
}

@media (prefers-color-scheme: dark) {
  :where(.aimogen-user-remote-panel) {
    --aimogen-surface: rgba(18, 18, 18, 0.92);
    --aimogen-surface-2: rgba(255, 255, 255, 0.04);
    --aimogen-border: rgba(255, 255, 255, 0.12);
    --aimogen-border-2: rgba(255, 255, 255, 0.10);
    --aimogen-text: rgba(255, 255, 255, 0.92);
    --aimogen-muted: rgba(255, 255, 255, 0.70);
    --aimogen-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  }
}

:where(.aimogen-remote-error) {
  max-width: 980px;
  margin: 16px auto;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.88);
  font: inherit;
}

@media (prefers-color-scheme: dark) {
  :where(.aimogen-remote-error) {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(18, 18, 18, 0.92);
    color: rgba(255, 255, 255, 0.92);
  }
}

:where(.aimogen-user-remote-panel .aimogen-create-remote) {
  border-radius: calc(var(--aimogen-radius) - 6px);
}

:where(.aimogen-user-remote-panel .aimogen-create-remote.button-primary),
:where(.aimogen-user-remote-panel .aimogen-create-remote.is-primary) {
  background: var(--aimogen-accent);
  border-color: var(--aimogen-accent);
  color: var(--aimogen-accent-contrast);
}

:where(.aimogen-user-remote-panel .aimogen-remote-list) {
  margin-top: var(--aimogen-gap);
}

:where(.aimogen-user-remote-panel .aimogen-remote-list > p) {
  margin: 10px 0 0 0;
  color: var(--aimogen-muted);
}

:where(.aimogen-user-remote-panel .aimogen-instance) {
  background: var(--aimogen-surface-2);
  border: 1px solid var(--aimogen-border-2);
  border-radius: var(--aimogen-radius);
  padding: var(--aimogen-pad-sm);
  margin: 0 0 12px 0;
}

:where(.aimogen-user-remote-panel .aimogen-instance strong) {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  color: var(--aimogen-text);
}

:where(.aimogen-user-remote-panel .aimogen-instance textarea) {
  box-sizing: border-box;

  margin-top: 10px;
  padding: 10px;

  resize: vertical;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;

  background: transparent;
  color: inherit;

  border: 1px solid var(--aimogen-border);
  border-radius: calc(var(--aimogen-radius) - 6px);
}

:where(.aimogen-user-remote-panel .aimogen-instance textarea:focus) {
  outline: none;
  border-color: color-mix(in srgb, var(--aimogen-accent) 55%, var(--aimogen-border) 45%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aimogen-accent) 22%, transparent);
}

:where(.aimogen-user-remote-panel .aimogen-instance-actions) {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

:where(.aimogen-user-remote-panel .aimogen-instance-actions .button) {
  border-radius: calc(var(--aimogen-radius) - 6px);
}

:where(.aimogen-user-remote-panel .aimogen-delete-remote) {
  border-color: color-mix(in srgb, #dc2626 30%, var(--aimogen-border) 70%);
}

:where(.aimogen-user-remote-panel .aimogen-delete-remote:hover) {
  border-color: color-mix(in srgb, #dc2626 55%, var(--aimogen-border) 45%);
}

@media (max-width: 640px) {
  :where(.aimogen-user-remote-panel) {
    padding: 12px;
    margin: 14px 10px;
  }
}
:where(.aimogen-user-remote-panel .button) {

  appearance: none;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;

  font: inherit;
  font-size: 13px;
  font-weight: 500;

  padding: 6px 14px;
  line-height: 1.4;

  border-radius: 8px;

  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .05s ease;

  color: inherit;
}

:where(.aimogen-user-remote-panel .button:hover) {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.18);
}

:where(.aimogen-user-remote-panel .button:active) {
  transform: translateY(1px);
}

:where(.aimogen-user-remote-panel .button:focus-visible) {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.25);
}

:where(.aimogen-user-remote-panel .aimogen-create-remote) {
  background: var(--aimogen-accent, #2563eb);
  border-color: var(--aimogen-accent, #2563eb);
  color: #fff;
}

:where(.aimogen-user-remote-panel .aimogen-create-remote:hover) {
  background: color-mix(in srgb, var(--aimogen-accent, #2563eb) 90%, black);
}

:where(.aimogen-user-remote-panel .aimogen-regen-remote) {
  background: transparent;
}

:where(.aimogen-user-remote-panel .aimogen-delete-remote) {
  border-color: rgba(220,38,38,.35);
  color: #dc2626;
}

:where(.aimogen-user-remote-panel .aimogen-delete-remote:hover) {
  background: rgba(220,38,38,.08);
  border-color: rgba(220,38,38,.55);
}

@media (prefers-color-scheme: dark) {

  :where(.aimogen-user-remote-panel .button) {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.18);
    color: rgba(255,255,255,.92);
  }

  :where(.aimogen-user-remote-panel .button:hover) {
    background: rgba(255,255,255,.08);
  }

  :where(.aimogen-user-remote-panel .aimogen-create-remote) {
    color: #fff;
  }

  :where(.aimogen-user-remote-panel .aimogen-delete-remote) {
    color: #ff6b6b;
    border-color: rgba(255,107,107,.45);
  }

  :where(.aimogen-user-remote-panel .aimogen-delete-remote:hover) {
    background: rgba(255,107,107,.12);
  }
}