:root {
  --background-image: url("./assets/login-background.png");
  --ink: #f7f1e9;
  --line: rgba(255, 246, 236, 0.22);
  --panel: rgba(33, 21, 16, 0.28);
  --panel-strong: rgba(33, 21, 16, 0.56);
  --button: rgba(255, 248, 240, 0.9);
  --button-ink: #241711;
  --button-shadow: 0 20px 60px rgba(10, 7, 6, 0.28);
  --radius-xl: 28px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #1c120e;
}

.image-layer,
.veil {
  position: fixed;
  inset: 0;
}

.image-layer {
  background-image:
    linear-gradient(180deg, rgba(18, 10, 8, 0.12), rgba(18, 10, 8, 0.48)),
    radial-gradient(circle at 18% 18%, rgba(255, 232, 207, 0.3), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(129, 60, 50, 0.22), transparent 26%),
    var(--background-image),
    linear-gradient(135deg, #2b1913 0%, #5f3625 48%, #2d1914 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.03);
}

.veil {
  background:
    linear-gradient(180deg, rgba(17, 10, 8, 0.22) 0%, rgba(17, 10, 8, 0.6) 100%),
    radial-gradient(circle at center, transparent 0%, rgba(12, 8, 7, 0.24) 62%, rgba(10, 7, 6, 0.58) 100%);
  backdrop-filter: blur(4px);
}

.auth-shell {
  position: relative;
  z-index: 1;
}

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

.auth-panel {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: min(100%, 500px);
  padding: 30px;
  border-radius: 32px;
  border: 1px solid rgba(255, 246, 236, 0.18);
  background: linear-gradient(180deg, rgba(43, 25, 19, 0.34), rgba(20, 12, 10, 0.5));
  box-shadow: 0 30px 90px rgba(10, 7, 6, 0.3);
  backdrop-filter: blur(20px) saturate(1.2);
}

.auth-form {
  display: grid;
  gap: 16px;
  width: 100%;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.auth-field {
  width: 100%;
  min-height: 72px;
  padding: 0 24px;
  border: 1px solid rgba(255, 246, 236, 0.2);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(180deg, rgba(36, 21, 17, 0.58), rgba(19, 11, 9, 0.44)),
    radial-gradient(circle at 16% 18%, rgba(255, 235, 214, 0.08), transparent 32%);
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.012em;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 240, 0.08),
    0 18px 40px rgba(10, 7, 6, 0.16);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.auth-field::placeholder {
  color: rgba(255, 240, 228, 0.62);
  font-weight: 500;
}

.auth-field:focus {
  border-color: rgba(255, 239, 223, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 240, 0.1),
    0 0 0 5px rgba(255, 233, 205, 0.1),
    0 22px 48px rgba(10, 7, 6, 0.22);
  background:
    linear-gradient(180deg, rgba(43, 25, 19, 0.68), rgba(19, 11, 9, 0.5)),
    radial-gradient(circle at 16% 18%, rgba(255, 235, 214, 0.12), transparent 32%);
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--button), #f3dcc4);
  color: var(--button-ink);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  cursor: pointer;
  box-shadow: var(--button-shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 26px 72px rgba(10, 7, 6, 0.32);
}

.auth-button:disabled {
  cursor: wait;
  opacity: 0.76;
}

.auth-status {
  margin: 0;
  min-height: 1.4rem;
  width: 100%;
  text-align: center;
  color: rgba(255, 244, 232, 0.9);
  font-size: 0.96rem;
  line-height: 1.5;
}

.auth-status[data-tone="error"] {
  color: #ffd6d1;
}

.auth-status[data-tone="pending"] {
  color: #fff2d9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 18px;
  }

  .auth-panel {
    width: min(100%, 100%);
    padding: 22px;
    border-radius: 28px;
  }

  .auth-field {
    min-height: 66px;
    padding: 0 20px;
    font-size: 1.02rem;
  }

  .auth-button {
    min-height: 60px;
  }
}
