:root {
  color-scheme: light dark;
  --background: #f4f5f2;
  --foreground: #1d2021;
  --card: #fffdfa;
  --card-foreground: #1d2021;
  --muted-foreground: #6a6f6d;
  --border: #d9dcd5;
  --input: #cfd3cc;
  --ring: #282d2d;
  --primary: #242a2a;
  --primary-foreground: #ffffff;
  --destructive: #a53d33;
  --destructive-muted: #fff1ee;
  --accent: #ece9df;
  --accent-foreground: #6e614b;
  --shadow: 0 26px 90px rgba(20, 24, 24, 0.17);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121414;
    --foreground: #f4f1e8;
    --card: #1b1e1e;
    --card-foreground: #f4f1e8;
    --muted-foreground: #a8aaa4;
    --border: #363a37;
    --input: #444842;
    --ring: #ded7c8;
    --primary: #e8dfcd;
    --primary-foreground: #1a1d1d;
    --destructive: #ffb4ab;
    --destructive-muted: #341e1b;
    --accent: #262925;
    --accent-foreground: #d0c3a8;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Geist, Satoshi, "Cabinet Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--foreground);
  background: var(--background);
}

.aether-dialog-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
}

.aether-dialog-page::before {
  content: "";
  position: fixed;
  inset: auto auto 9vh 8vw;
  width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--foreground) 22%, transparent), transparent);
  opacity: 0.65;
}

.aether-dialog-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 68%, transparent), transparent 42%),
    color-mix(in srgb, var(--foreground) 10%, transparent);
}

.aether-dialog-content {
  position: relative;
  width: min(100%, 430px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow);
}

.aether-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  color: var(--muted-foreground);
  background: transparent;
  cursor: pointer;
}

.aether-dialog-close:hover {
  color: var(--foreground);
  background: var(--accent);
}

.aether-dialog-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.aether-dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-right: 36px;
}

.aether-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.aether-avatar svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aether-eyebrow {
  margin: 0 0 5px;
  color: var(--accent-foreground);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

.aether-field-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aether-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.aether-field-label {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 650;
}

.aether-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--input);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--foreground);
  background: color-mix(in srgb, var(--card) 76%, var(--background));
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.aether-input::placeholder {
  color: color-mix(in srgb, var(--muted-foreground) 72%, transparent);
}

.aether-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 24%, transparent);
}

.aether-field[data-invalid="true"] .aether-input {
  border-color: var(--destructive);
}

.aether-alert {
  min-height: 38px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-foreground);
  background: var(--accent);
}

.aether-alert[hidden] {
  display: none;
}

.aether-alert[data-kind="error"] {
  color: var(--destructive);
  border-color: color-mix(in srgb, var(--destructive) 34%, var(--border));
  background: var(--destructive-muted);
}

.aether-dialog-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.aether-button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: var(--primary-foreground);
  background: var(--primary);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.aether-button:hover {
  filter: brightness(1.08);
}

.aether-button:active {
  transform: translateY(1px) scale(0.99);
}

.aether-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.aether-spinner {
  display: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  animation: aether-spin 0.8s linear infinite;
}

.aether-button[data-loading="true"] .aether-spinner {
  display: block;
}

.aether-spinner circle {
  opacity: 0.22;
}

@keyframes aether-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 460px) {
  .aether-dialog-page {
    padding: 12px;
  }

  .aether-dialog-content {
    padding: 22px;
  }
}
