@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --page-bg: #eff1f5;
  --page-bg-accent: rgba(136, 57, 239, 0.08);
  --page-bg-wash: rgba(30, 102, 245, 0.08);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-muted: rgba(220, 224, 232, 0.6);
  --border: rgba(124, 127, 147, 0.2);
  --text-primary: #4c4f69;
  --text-secondary: #5c5f77;
  --text-muted: #7c7f93;
  --accent: #7287fd;
  --accent-strong: #5a6fe0;
  --accent-soft: rgba(114, 135, 253, 0.14);
  --danger: #d20f39;
  --focus-ring: 0 0 0 4px rgba(114, 135, 253, 0.18);
}

:root[data-theme="dark"] {
  --page-bg: #1e2030;
  --page-bg-accent: rgba(198, 160, 246, 0.12);
  --page-bg-wash: rgba(138, 173, 244, 0.1);
  --surface: rgba(36, 39, 58, 0.84);
  --surface-strong: rgba(30, 32, 48, 0.94);
  --surface-muted: rgba(54, 58, 79, 0.82);
  --border: rgba(166, 173, 200, 0.16);
  --text-primary: #cad3f5;
  --text-secondary: #b8c0e0;
  --text-muted: #a5adcb;
  --accent: #8aadf4;
  --accent-strong: #91b7ff;
  --accent-soft: rgba(138, 173, 244, 0.18);
  --danger: #ed8796;
  --focus-ring: 0 0 0 4px rgba(138, 173, 244, 0.2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --page-bg: #1e2030;
    --page-bg-accent: rgba(198, 160, 246, 0.12);
    --page-bg-wash: rgba(138, 173, 244, 0.1);
    --surface: rgba(36, 39, 58, 0.84);
    --surface-strong: rgba(30, 32, 48, 0.94);
    --surface-muted: rgba(54, 58, 79, 0.82);
    --border: rgba(166, 173, 200, 0.16);
    --text-primary: #cad3f5;
    --text-secondary: #b8c0e0;
    --text-muted: #a5adcb;
    --accent: #8aadf4;
    --accent-strong: #91b7ff;
    --accent-soft: rgba(138, 173, 244, 0.18);
    --danger: #ed8796;
    --focus-ring: 0 0 0 4px rgba(138, 173, 244, 0.2);
  }
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, var(--page-bg-accent), transparent 28%),
    radial-gradient(circle at top right, var(--page-bg-wash), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    var(--page-bg);
  transition: background-color 180ms ease, color 180ms ease;
}

body.app-shell {
  padding: 32px 20px 48px;
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-header h1,
.panel h2 {
  font-weight: 700;
  letter-spacing: -0.04em;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
}

.page-copy,
.panel-copy,
.helper-text {
  color: var(--text-secondary);
  line-height: 1.6;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  backdrop-filter: blur(18px);
}

.theme-toggle,
button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.theme-toggle {
  padding: 0.8rem 1rem;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}

button {
  padding: 0.95rem 1.2rem;
  background: var(--text-primary);
  color: var(--surface-strong);
}

button:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
}

button:focus-visible,
.theme-toggle:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

input {
  width: 100%;
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text-primary);
  font: inherit;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus {
  border-color: var(--accent);
}

@media (max-width: 720px) {
  body.app-shell {
    padding: 20px 14px 32px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .theme-toggle {
    width: 100%;
  }
}
