:root {
  color-scheme: dark;
  --bg: #0b0a1e;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .07);
  --solid: #15132e;
  --text: #f5f3ff;
  --muted: #b2adcc;
  --border: rgba(255, 255, 255, .12);
  --primary: #8b5cf6;
  --primary-dark: #6d3df0;
  --primary-soft: rgba(139, 92, 246, .18);
  --accent: #c4b5fd;
  --good: #6ee7a8;
  --danger: #fca5a5;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(124, 58, 237, .38), transparent 70%),
    radial-gradient(700px 420px at 100% 100%, rgba(109, 61, 240, .28), transparent 70%),
    radial-gradient(700px 420px at 0% 100%, rgba(139, 92, 246, .2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
button, input, select, textarea { font: inherit; color: inherit; }

.page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth { width: 100%; max-width: 448px; }
.auth-head { text-align: center; margin-bottom: 32px; }
.brand-tile { width: 56px; height: 56px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #a78bfa, #6d3df0); box-shadow: 0 12px 28px rgba(109, 61, 240, .45); }
.auth-head .sub { margin-top: 8px; color: var(--muted); font-size: 1rem; }

.card { padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(16px); }

label { display: block; margin: 20px 0 8px; font-size: .875rem; font-weight: 600; }
.card > label:first-child { margin-top: 0; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; height: 48px; padding: 0 16px; background: rgba(255, 255, 255, .06); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s, background .15s;
}
select option { background: var(--solid); }
::placeholder { color: #8f8aad; opacity: 1; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 3px var(--primary-soft); }

.phone { display: flex; }
.phone .prefix { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--surface-2); border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 600; font-size: .875rem; white-space: nowrap; }
.phone input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; min-width: 0; }
.hint { margin-top: 8px; font-size: .8125rem; color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; font-size: .8125rem; color: var(--text); background: var(--primary-soft); border-radius: var(--radius-sm); }
.notice svg { flex: none; margin-top: 2px; color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: var(--radius-sm); font-weight: 600; color: #fff; cursor: pointer; background: linear-gradient(135deg, #a07bfb, #6d3df0); box-shadow: 0 10px 24px rgba(109, 61, 240, .35); transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; margin-top: 24px; }
.btn.ghost { min-height: 40px; padding: 0 14px; font-size: .8125rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { filter: none; background: rgba(255, 255, 255, .12); }

.msg { display: none; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .875rem; }
.msg.show { display: block; }
.msg.error { background: rgba(248, 113, 113, .14); color: #fecaca; }
.msg.ok { background: rgba(52, 211, 153, .14); color: #bbf7d0; }

.contact { margin-top: 24px; text-align: center; font-size: .875rem; color: var(--muted); }
.contact strong { color: var(--text); font-weight: 600; }

@media (max-width: 520px) {
  .page { padding: 24px 16px; }
  .card { padding: 24px 20px; }
  h1 { font-size: 1.625rem; }
}
