:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #111827;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --line: #1e293b;
  --blue: #4f6ef7;
  --blue-dark: #3b5de7;
  --red: #ef4444;
  --red-bg: #450a0a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

.login-shell {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.login-box {
  padding: 32px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.login-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.login-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.login-field input {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1729;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.15s;
}

.login-field input:focus {
  border-color: var(--blue);
  outline: none;
}

.login-error {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  text-align: center;
}

.login-error.hidden { display: none; }

.login-hint {
  margin: 2px 0 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(79, 110, 247, 0.08);
  color: var(--blue);
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
  user-select: all;
}

.login-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #6366f1);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.login-submit:hover { opacity: 0.9; }
.login-submit:disabled { opacity: 0.5; cursor: not-allowed; }