:root {
  color-scheme: dark;

  --background: #080808;
  --surface: rgba(18, 16, 13, 0.96);
  --surface-border: rgba(187, 132, 55, 0.28);

  --text: #f2eee8;
  --text-muted: #9e978e;

  --gold: #bb8437;
  --gold-light: #e1b86e;
  --gold-dark: #70451c;

  --danger: #e07474;
  --danger-background: rgba(130, 34, 34, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(117, 72, 27, 0.12),
      transparent 32rem
    ),
    var(--background);
  color: var(--text);
  font-family:
    Inter,
    "Segoe UI",
    Arial,
    sans-serif;
}

button,
input {
  font: inherit;
}

.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 32px 20px;
}

.background-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(137, 82, 29, 0.1);
  filter: blur(90px);
  pointer-events: none;
}

.background-glow-left {
  left: -260px;
  bottom: -140px;
}

.background-glow-right {
  top: -220px;
  right: -250px;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 42px;
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  background:
    linear-gradient(
      145deg,
      rgba(24, 21, 17, 0.98),
      rgba(10, 10, 10, 0.98)
    );
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.login-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 42px;
  width: 74px;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(187, 132, 55, 0.5);
}

.brand-link {
  display: block;
  width: fit-content;
  margin: 0 auto 28px;
}

.login-logo {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

.login-heading {
  margin-bottom: 30px;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.login-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-heading p {
  margin: 14px auto 0;
  max-width: 330px;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.login-message {
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(224, 116, 116, 0.35);
  background: var(--danger-background);
  color: #efaaaa;
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #c9c2b9;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #36322d;
  border-radius: 2px;
  outline: none;
  background: #0d0d0d;
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input:hover {
  border-color: #4a433b;
}

.field input:focus {
  border-color: var(--gold);
  background: #10100f;
  box-shadow: 0 0 0 3px rgba(187, 132, 55, 0.1);
}

.login-button {
  position: relative;
  display: grid;
  min-height: 50px;
  margin-top: 6px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background:
    linear-gradient(
      135deg,
      #b77c31,
      #7c4a1c
    );
  color: #fff8ed;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.login-button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-loader {
  display: none;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.login-button.loading .button-label {
  display: none;
}

.login-button.loading .button-loader {
  display: block;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 26px auto 0;
  color: #827b72;
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.back-link:hover {
  color: var(--gold-light);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .login-panel {
    padding: 34px 24px;
  }

  .login-panel::before {
    left: 24px;
  }
}