:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #5f6670;
  --border: #d8dce2;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --focus: rgba(79, 70, 229, 0.25);
  --ok-bg: #e7f6ec;
  --ok-text: #1b6b37;
  --err-bg: #fdecec;
  --err-text: #a12626;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #181b21;
    --text: #e8eaed;
    --muted: #9aa1ab;
    --border: #2c313a;
    --accent: #818cf8;
    --accent-hover: #6f7bf4;
    --focus: rgba(129, 140, 248, 0.3);
    --ok-bg: #133222;
    --ok-text: #7fdca0;
    --err-bg: #3a1717;
    --err-text: #f4a3a3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.card__header h1 { margin: 0 0 6px; font-size: 1.75rem; }
.card__header p { margin: 0 0 24px; color: var(--muted); }

.form { display: grid; gap: 18px; }

.field { display: grid; gap: 6px; }

label { font-weight: 600; font-size: 0.95rem; }

input, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea { resize: vertical; min-height: 130px; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.btn {
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.status {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-weight: 500;
}
.status--ok { background: var(--ok-bg); color: var(--ok-text); }
.status--err { background: var(--err-bg); color: var(--err-text); }

@media (max-width: 480px) {
  .card { padding: 22px 18px; border-radius: 12px; }
  .card__header h1 { font-size: 1.5rem; }
}
