:root {
  --blue-900: #0b1a3a;
  --blue-800: #10265a;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --green: #22c55e;
  --red: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(59, 130, 246, 0.25), transparent 60%),
    radial-gradient(800px 600px at 100% 100%, rgba(29, 78, 216, 0.3), transparent 60%),
    linear-gradient(160deg, var(--blue-900) 0%, #060d1f 100%);
  color: #f4f7ff;
}

.card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  padding: 32px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.brand { text-align: center; margin-bottom: 24px; }

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: rgba(244, 247, 255, 0.65);
  line-height: 1.5;
}

form { margin-top: 8px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(244, 247, 255, 0.55);
  margin-bottom: 8px;
}

input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

input[type="email"]::placeholder { color: rgba(244, 247, 255, 0.35); }
input[type="email"]:focus { border-color: var(--blue-400); }
input[type="email"].valid { border-color: var(--green); }
input[type="email"].invalid { border-color: var(--red); }

.hint {
  font-size: 12px;
  color: rgba(244, 247, 255, 0.4);
  margin-top: 8px;
  line-height: 1.4;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

button:hover:not(:disabled) { opacity: 0.92; }
button:active:not(:disabled) { transform: scale(0.99); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.msg {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}

.msg.show { display: block; }
.msg.success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.4); color: #86efac; }
.msg.error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5; }

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: rgba(244, 247, 255, 0.3);
}

@media (max-width: 380px) {
  .card { padding: 24px 20px; }
  h1 { font-size: 20px; }
}
