:root {
  --black: #0b0b0b;
  --graphite: #20201e;
  --gold: #c79a32;
  --gold-dark: #9b7120;
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.97);
  --neutral-50: #f8f8f6;
  --neutral-200: #deded9;
  --neutral-500: #787872;
  --neutral-700: #42423e;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--black);
  background-image: url("../img/login-background.png?v=20260731-0152");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  color: var(--graphite);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background: rgba(3, 3, 3, 0.06);
  content: "";
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.login-panel {
  width: min(90vw, 390px);
}

.form {
  position: relative;
  min-height: unset;
  padding: 24px 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  background: var(--surface);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.form-heading {
  margin-bottom: -52px;
  text-align: center;
}

.login-logo {
  display: block;
  width: 500px;
  max-width: none;
  max-height: 334px;
  height: auto;
  margin: 0 0 0 50%;
  object-fit: contain;
  transform: translateX(-50%);
}

.field-group {
  margin-bottom: 10px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--neutral-700);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.input-wrap {
  position: relative;
}

.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #898981;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.form input[type="email"],
.form input[type="password"],
.form input[type="text"] {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 46px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  outline: none;
  background: var(--neutral-50);
  color: var(--black);
  font: inherit;
  font-size: 0.94rem;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.form input::placeholder {
  color: #a1a19b;
}

.form input[type="email"]:hover,
.form input[type="password"]:hover,
.form input[type="text"]:hover {
  border-color: #c9c8c1;
}

.form input[type="email"]:focus,
.form input[type="password"]:focus,
.form input[type="text"]:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(173, 133, 36, 0.14);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #77776f;
  place-items: center;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.password-toggle:hover {
  background: rgba(199, 154, 50, 0.1);
  color: var(--gold-dark);
  box-shadow: none;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
}

.form-group input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.control-label {
  color: var(--neutral-700);
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
}

.submit-button {
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  outline: none;
  background: linear-gradient(135deg, #d8b552, var(--gold));
  color: #17130a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.submit-button:hover {
  border-color: #7f5c18;
  background: linear-gradient(135deg, #e2c366, #b88926);
  box-shadow: 0 10px 24px rgba(143, 108, 27, 0.3);
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button:focus-visible {
  box-shadow: 0 0 0 4px rgba(173, 133, 36, 0.25);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 700px) {
  body {
    background-position: 62% center;
  }

  body::before {
    background: rgba(4, 4, 4, 0.08);
  }

  .login-shell {
    padding: 28px 18px;
  }

}

@media (max-width: 480px) {
  body {
    background-position: 66% center;
  }

  .login-shell {
    padding: 20px 14px;
  }

  .login-panel {
    width: calc(100% - 28px);
    max-width: 380px;
  }

  .form {
    padding: 24px 20px 26px;
    border-radius: 18px;
  }

  .form-heading {
    margin-bottom: -24px;
  }

  .login-logo {
    width: min(100%, 270px);
    max-width: 100%;
    max-height: 170px;
    margin: 0 auto;
    transform: none;
  }
}

@media (max-height: 650px) {
  .login-shell {
    align-items: flex-start;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .form {
    padding-top: 22px;
    padding-bottom: 24px;
  }

  .form-heading {
    margin-bottom: -40px;
  }

  .field-group {
    margin-bottom: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
