:root {
  --burgundy-950: #25090c;
  --burgundy-900: #3f0d13;
  --burgundy-800: #5a1018;
  --burgundy-700: #7d1823;
  --red-600: #b42b32;
  --gold-500: #d9aa3b;
  --gold-400: #f2cb65;
  --cream: #fff8e9;
  --white: #fff;
  --ink: #241a1b;
  --muted: #716568;
  --line: rgba(87, 29, 34, 0.14);
}

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

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family: "Poppins", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 5%, rgba(217, 170, 59, 0.18), transparent 18rem),
    linear-gradient(145deg, var(--burgundy-950), var(--burgundy-800) 62%, var(--burgundy-700));
}

.login-page {
  display: grid;
  min-height: calc(100vh - 3rem);
  min-height: calc(100dvh - 3rem - env(safe-area-inset-bottom));
  place-items: center;
  padding:
    max(1.1rem, env(safe-area-inset-top))
    max(1.1rem, env(safe-area-inset-right))
    1.1rem
    max(1.1rem, env(safe-area-inset-left));
}

.login-card {
  width: min(100%, 420px);
  padding: 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 26px 70px rgba(31, 6, 9, 0.35);
  backdrop-filter: blur(14px);
}

.login-logo {
  display: block;
  width: 6.8rem;
  height: 6.8rem;
  margin: 0 auto 0.8rem;
  padding: 0.45rem;
  object-fit: contain;
  border: 1px solid rgba(90, 16, 24, 0.12);
  border-radius: 50%;
  background: var(--cream);
}

.eyebrow {
  margin: 0;
  color: var(--burgundy-700);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

h1 {
  margin: 0.15rem 0 0;
  color: var(--burgundy-800);
  font-size: clamp(1.45rem, 7vw, 2rem);
  line-height: 1.25;
  text-align: center;
}

.login-intro {
  margin: 0.35rem 0 1.15rem;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.field-label {
  display: block;
  margin: 0.72rem 0 0.35rem;
  color: var(--burgundy-800);
  font-size: 0.72rem;
  font-weight: 600;
}

.input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.15rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:focus-within {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(217, 170, 59, 0.14);
}

.input-wrap > i {
  color: var(--gold-500);
}

.input-wrap input {
  min-width: 0;
  height: 3rem;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  background: transparent;
}

.password-toggle {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
}

.remember-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--burgundy-700);
}

.form-message {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  color: #aa2932;
  font-size: 0.67rem;
  text-align: center;
}

.login-button {
  display: flex;
  width: 100%;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  cursor: pointer;
  background: linear-gradient(135deg, var(--burgundy-700), var(--red-600));
  box-shadow: 0 12px 22px rgba(105, 22, 30, 0.24);
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.customer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--burgundy-700);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
}

footer {
  min-height: 3rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.65rem;
  text-align: center;
}

:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .login-button:not(:disabled):hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
  }
}

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