:root {
  --bg0: #050914;
  --bg1: #070d1c;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --muted2: rgba(255, 255, 255, 0.52);
  --blue: #2f7bff;
  --blue2: #0ea5ff;
  --danger: #ff4d6d;
  --ok: #22c55e;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(47, 123, 255, 0.22), transparent 55%),
    radial-gradient(700px 420px at 85% 25%, rgba(14, 165, 255, 0.18), transparent 58%),
    radial-gradient(800px 520px at 50% 95%, rgba(47, 123, 255, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.card {
  width: min(520px, 100%);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.035));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
}

.header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 40%),
    linear-gradient(135deg, rgba(47,123,255,0.95), rgba(14,165,255,0.85));
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 24px rgba(47, 123, 255, 0.22);
}

.titles { min-width: 0; }
.brand {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.title {
  margin: 3px 0 0 0;
  font-size: 20px;
  line-height: 1.25;
}
.subtitle {
  margin: 6px 0 0 0;
  color: var(--muted2);
  font-size: 13px;
}

.form { margin-top: 12px; }
.field { display: grid; gap: 8px; margin: 14px 0; }
.label { color: var(--muted); font-size: 13px; }

input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.24);
  color: var(--text);
  outline: none;
}

input::placeholder { color: rgba(255,255,255,0.35); }

input:focus {
  border-color: rgba(47, 123, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(47, 123, 255, 0.18);
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(47, 123, 255, 0.95), rgba(14, 165, 255, 0.92));
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.btn:hover { filter: brightness(1.03); transform: translateY(-1px); }
.btn:active { transform: translateY(0px); }
.btn[disabled] { opacity: 0.7; cursor: not-allowed; transform: none; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: rgba(255,255,255,0.95);
  display: none;
  animation: spin 0.9s linear infinite;
}

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

.message {
  margin-top: 12px;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

.message.error { color: rgba(255, 77, 109, 0.95); }
.message.ok { color: rgba(34, 197, 94, 0.95); }

.footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  color: rgba(255,255,255,0.50);
  font-size: 12px;
}

.sep { opacity: 0.6; }

@media (prefers-reduced-motion: reduce) {
  .btn, .spinner { transition: none; animation: none; }
}
