.ai-ca-host-page {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #0f172a;
}

.ai-ca-host-page *,
.ai-ca-host-page *::before,
.ai-ca-host-page *::after {
  box-sizing: inherit;
}

.ai-ca-host-shell {
  max-width: 420px;
  margin: 4rem auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ai-ca-host-shell h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ai-ca-host-shell p {
  margin: 0 0 1.25rem;
  color: #475569;
  line-height: 1.5;
  font-size: 0.9375rem;
}

.ai-ca-host-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.ai-ca-host-field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.ai-ca-host-field input {
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  min-height: 2.5rem;
}

.ai-ca-host-field input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #60a5fa;
}

.ai-ca-host-field input:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
  border-color: #60a5fa;
}

.ai-ca-host-field input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.ai-ca-host-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.ai-ca-host-btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.75rem;
}

.ai-ca-host-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.ai-ca-host-btn-primary {
  background: #2563eb;
  color: #fff;
}

.ai-ca-host-btn-primary:hover {
  background: #1d4ed8;
}

.ai-ca-host-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-ca-host-error {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.9rem;
}

.ai-ca-host-info {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.9rem;
}

.ai-ca-host-dashboard-root {
  min-height: 100vh;
}

.ai-ca-host-hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .ai-ca-host-shell {
    margin: 1.5rem 1rem;
    padding: 1.5rem;
    max-width: calc(100vw - 2rem);
  }

  .ai-ca-host-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-ca-host-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-ca-host-page *,
  .ai-ca-host-page *::before,
  .ai-ca-host-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
