:root {
  --bg: #07111f;
  --panel: #0d1b2d;
  --line: rgba(148, 163, 184, 0.24);
  --text: #f8fafc;
  --muted: #91a3ba;
  --gold: #d4af37;
  --red: #f87171;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

body.light-mode {
  --bg: #eef3f6;
  --panel: #ffffff;
  --line: rgba(71, 85, 105, 0.22);
  --text: #102033;
  --muted: #607287;
  --gold: #b98a13;
  --red: #dc2626;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 32px;
}

form {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

body.light-mode input {
  background: #ffffff;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  user-select: none;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-slider {
  position: relative;
  width: 48px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.theme-slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 180ms ease;
}

.theme-switch input:checked + .theme-slider::after {
  transform: translateX(20px);
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: stretch;
}

#captcha-button {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

#captcha-button svg {
  display: block;
  width: 100%;
  height: 100%;
  flex: 0 0 auto;
}

.submit-button {
  height: 54px;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: #07111f;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

@media (max-width: 560px) {
  .captcha-row {
    grid-template-columns: 1fr;
  }
}

.message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}
