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

:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --surface: #131b2e;
  --input-bg: #0f1626;
  --border: #28354f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --emerald: #10b981;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.4);
  --danger-text: #fca5a5;
}

html, body {
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 18%, rgba(99, 102, 241, 0.16), transparent 46%),
    radial-gradient(circle at 82% 84%, rgba(16, 185, 129, 0.14), transparent 44%);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

.login-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.65);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.login-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(165, 180, 252, 0.25);
  flex-shrink: 0;
}

h1 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.season-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.brand-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.login-copy {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #cbd5e1;
}

.input-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.passcode-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.9rem;
}

.passcode-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.toggle-btn {
  min-height: 48px;
  min-width: 66px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0 0.85rem;
  cursor: pointer;
}

.toggle-btn:hover {
  border-color: #475569;
  color: var(--text);
}

.login-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.is-hidden {
  display: none;
}

.submit-btn {
  min-height: 48px;
  width: 100%;
  margin-top: 0.25rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.submit-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 440px) {
  .login-card {
    padding: 1.35rem;
    border-radius: 14px;
  }
}
