:root {
  --bg: #0f141d;
  --card: #171f2c;
  --text: #edf2fa;
  --muted: #99a8bd;
  --accent: #7770f5;
  --red: #ff5470;
  --border: rgba(255, 255, 255, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body {
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(99, 91, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(0, 212, 170, 0.1), transparent 60%), var(--bg);
}
.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo {
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #8a83ff);
  display: grid; place-items: center;
  font-weight: 800; color: white; font-size: 19px;
  box-shadow: 0 4px 14px rgba(99, 91, 255, 0.35);
}
h1 { font-size: 17px; font-weight: 700; }
p.sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
label {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 6px; font-weight: 500;
}
.field { margin-bottom: 14px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  background: rgba(10, 14, 39, 0.6);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.12s ease;
}
input:focus { outline: none; border-color: var(--accent); }
button.primary {
  width: 100%;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  font-family: inherit;
  transition: background 0.12s ease;
}
button.primary:hover { background: #7269ff; }
button[disabled] { opacity: 0.6; cursor: not-allowed; }
.google-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background 0.12s ease;
  font-family: inherit;
}
.google-btn:hover { background: rgba(255, 255, 255, 0.08); }
.google-icon {
  width: 18px; height: 18px;
  background: white;
  border-radius: 3px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px; color: #4285f4;
}
.divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 16px;
  position: relative;
}
.divider::before, .divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.error {
  background: rgba(255, 84, 112, 0.15);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 14px;
  display: none;
}
.error.show { display: block; }
.foot {
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  margin-top: 22px;
  line-height: 1.5;
}
.foot a { color: var(--accent); text-decoration: none; }
.link-btn {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  margin-top: 12px;
}
.link-btn:hover { text-decoration: underline; }

/* Match the signed-in application surfaces and keyboard focus. */
:root { color-scheme: dark; }
body { background: var(--bg); }
.card { border-radius: 12px; box-shadow: 0 12px 36px #00000026; }
:where(a,button,input):focus-visible { outline: 2px solid #a8a2ff; outline-offset: 3px; }
