* { box-sizing: border-box; }

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #06b6d4;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 20px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(79, 70, 229, 0.25), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(6, 182, 212, 0.25), transparent 40%),
    #eef2ff;
}

.card {
  width: 100%;
  max-width: 860px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 20px 50px rgba(30, 41, 100, 0.15);
}

.card header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }

h1 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle { margin: 0; color: var(--muted); font-size: 0.95rem; }

form { display: flex; flex-direction: column; gap: 20px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .card { padding: 24px; }
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

input, select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input:hover, select:hover { border-color: #c7d2fe; }

input:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

input.invalid, select.invalid { border-color: #ef4444; background: #fef2f2; }

.prefix-wrap { display: flex; align-items: stretch; }
.prefix-wrap span {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #eef2ff;
  color: var(--primary);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  font-weight: 700;
}
.prefix-wrap input { border-radius: 0 12px 12px 0; }

button {
  margin-top: 6px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
button:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 12px 26px rgba(79, 70, 229, 0.4); }
button:active { transform: translateY(0); }
button:disabled { filter: grayscale(0.6); cursor: not-allowed; transform: none; box-shadow: none; }

#message {
  display: none;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
#message:not(:empty) { display: block; }
#message.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
#message.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
