:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f4f7fb;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 18px;
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top right, #dbeafe 0, transparent 28rem), var(--bg);
  font-family: ui-sans-serif, "Segoe UI", system-ui, sans-serif;
}

.card {
  width: 100%;
  max-width: 640px;
  padding: 30px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

h1 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1.5rem;
}

p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  margin: 16px 0 7px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  font: inherit;
  transition: border-color .15s;
}

input {
  padding: 12px;
}

textarea {
  min-height: 220px;
  padding: 12px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  transition: background .2s;
}

button:hover {
  background: var(--primary-dark);
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.message {
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  font-size: .9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.success {
  border: 1px solid #bbf7d0;
  color: var(--success-text);
  background: var(--success-bg);
}

.message.error {
  border: 1px solid #fecaca;
  color: var(--error-text);
  background: var(--error-bg);
}

.message ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.hidden {
  display: none;
}
