/* Made by Federico Dionisi for BadLab Corporation Agency */
/* © 2026 – All rights reserved. */
:root {
  --auth-shell-pad-x: clamp(16px, 3.2vw, 56px);
  --auth-shell-pad-y: clamp(16px, 3.6vh, 48px);
  --auth-stage-gap: clamp(20px, 2.4vh, 42px);
  --auth-panel-width: clamp(300px, 40vw, 620px);
  --auth-panel-pad: clamp(22px, 1.6vw + 14px, 56px);
  --auth-panel-gap: clamp(18px, 1.8vw, 36px);
  --auth-form-max-width: 440px;
  --auth-form-gap: clamp(12px, 1vw, 16px);
  --auth-logo-size: clamp(240px, 38vw, 560px);
  --auth-input-height: clamp(52px, 1.5vw + 36px, 68px);
  --auth-button-height: clamp(50px, 1.3vw + 34px, 60px);
  --auth-input-font-size: clamp(0.96rem, 0.84rem + 0.25vw, 1.08rem);
  --auth-status-font-size: clamp(0.82rem, 0.76rem + 0.12vw, 0.92rem);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(var(--auth-shell-pad-y) + var(--blc-safe-top))
    calc(var(--auth-shell-pad-x) + var(--blc-safe-right))
    calc(var(--auth-shell-pad-y) + var(--blc-safe-bottom))
    calc(var(--auth-shell-pad-x) + var(--blc-safe-left));
  display: grid;
  place-items: center;
}

.auth-stage {
  width: min(100%, max(var(--auth-panel-width), var(--auth-logo-size)));
  display: grid;
  justify-items: center;
  gap: var(--auth-stage-gap);
}

.auth-panel {
  width: min(100%, var(--auth-panel-width));
  min-width: 0;
  padding: var(--auth-panel-pad);
  border: 1px solid var(--panel-edge);
  border-radius: clamp(24px, 1.8vw, 32px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(10, 11, 13, 0.94) 32%);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.52),
    inset 0 0 0 1px rgba(209, 20, 47, 0.04);
  display: grid;
  justify-items: center;
  gap: var(--auth-panel-gap);
  text-align: center;
  backdrop-filter: blur(18px);
}

.auth-logo {
  width: var(--auth-logo-size);
  height: auto;
  aspect-ratio: 749 / 562;
  display: block;
  filter: drop-shadow(0 22px 36px rgba(121, 8, 23, 0.14));
}

.auth-form {
  width: min(100%, var(--auth-form-max-width));
  display: grid;
  gap: var(--auth-form-gap);
  justify-items: center;
  text-align: center;
}

.auth-field {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: var(--auth-input-height);
  border: 1px solid rgba(209, 20, 47, 0.22);
  border-radius: clamp(18px, 1.1vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(209, 20, 47, 0.025), rgba(0, 0, 0, 0) 42%),
    rgba(6, 7, 9, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.auth-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(209, 20, 47, 0.16), transparent 14%, transparent 86%, rgba(209, 20, 47, 0.16));
  opacity: 0.45;
  pointer-events: none;
}

.auth-field::after {
  content: "";
  position: absolute;
  left: clamp(16px, 1.4vw, 22px);
  right: clamp(16px, 1.4vw, 22px);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

.auth-field:focus-within {
  border-color: rgba(209, 20, 47, 0.72);
  box-shadow:
    0 0 0 4px var(--focus-ring),
    0 18px 44px rgba(121, 8, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(209, 20, 47, 0.07), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(255, 53, 87, 0.08), rgba(0, 0, 0, 0) 45%),
    rgba(7, 8, 10, 1);
}

.auth-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  padding: 0 clamp(16px, 1.5vw, 24px);
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--auth-input-font-size);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: none;
  caret-color: var(--accent-bright);
  outline: none;
}

.auth-input[type="password"]::-ms-reveal,
.auth-input[type="password"]::-ms-clear {
  display: none;
}

.auth-input[type="password"]::-webkit-credentials-auto-fill-button,
.auth-input[type="password"]::-webkit-strong-password-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

.auth-input::placeholder {
  color: rgba(247, 244, 245, 0.34);
  text-align: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 120ms ease, color 120ms ease;
}

.auth-input:focus::placeholder {
  opacity: 0;
  color: transparent;
}

.auth-field-password .auth-input {
  padding-left: clamp(56px, 4vw, 82px);
  padding-right: clamp(56px, 4vw, 82px);
}

.auth-password-toggle {
  position: absolute;
  top: calc(50% + 1px);
  right: clamp(5px, 0.45vw, 12px);
  z-index: 2;
  width: clamp(42px, 0.9vw + 30px, 64px);
  height: clamp(42px, 0.9vw + 30px, 64px);
  padding: 0;
  border: 0;
  border-radius: clamp(12px, 0.5vw + 8px, 18px);
  background: transparent;
  color: rgba(247, 244, 245, 0.48);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 140ms ease, box-shadow 140ms ease;
  transform: translateY(-50%);
}

.auth-password-toggle:hover {
  color: var(--text);
}

.auth-password-toggle:focus-visible {
  outline: none;
  color: var(--text);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.auth-password-toggle svg {
  width: clamp(26px, 0.55vw + 20px, 38px);
  height: clamp(26px, 0.55vw + 20px, 38px);
  stroke: currentColor;
}

.auth-password-toggle svg[hidden],
.auth-password-toggle[data-on="false"] .eye-closed,
.auth-password-toggle[data-on="true"] .eye-open {
  display: none !important;
}

.auth-password-toggle svg * {
  stroke-width: 2.8;
}

.auth-remember {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 2px 0;
  color: rgba(247, 244, 245, 0.76);
  cursor: pointer;
  user-select: none;
}

.auth-remember-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-remember-box {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(209, 20, 47, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.auth-remember-box svg {
  width: 13px;
  height: 13px;
  color: #fff7f8;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 140ms ease, transform 140ms ease;
}

.auth-remember-input:checked + .auth-remember-box {
  border-color: rgba(255, 53, 87, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, var(--accent-bright), var(--accent-strong));
  box-shadow:
    0 10px 24px rgba(95, 10, 22, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-remember-input:checked + .auth-remember-box svg {
  opacity: 1;
  transform: scale(1);
}

.auth-remember-input:focus-visible + .auth-remember-box {
  box-shadow:
    0 0 0 4px var(--focus-ring),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24);
}

.auth-remember-text {
  font-size: clamp(0.9rem, 0.84rem + 0.12vw, 0.98rem);
  letter-spacing: 0.04em;
  color: rgba(247, 244, 245, 0.72);
}

.primary-button {
  appearance: none;
  min-width: 152px;
  height: var(--auth-button-height);
  padding: 0 clamp(22px, 1.8vw, 30px);
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(135deg, var(--accent-bright), var(--accent-strong));
  color: #fff4f5;
  font: inherit;
  font-size: clamp(0.9rem, 0.84rem + 0.16vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(95, 10, 22, 0.34);
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.auth-button {
  width: 100%;
  margin-top: 4px;
}

.status-text {
  min-height: 1.4rem;
  margin: 0;
  font-size: var(--auth-status-font-size);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}

.status-text[data-variant="error"] {
  color: #ffb4b4;
}

.status-text[data-variant="success"] {
  color: #ffc4cb;
}

.auth-status:empty {
  min-height: 0;
}

@media (max-width: 640px) {
  .auth-screen {
    min-height: 100svh;
    min-height: 100dvh;
    overflow-y: hidden;
  }

  .auth-shell {
    min-height: 100svh;
    min-height: 100dvh;
  }

  .auth-input {
    font-size: 16px;
  }
}

@media (min-width: 900px) and (max-width: 2199px) and (min-height: 860px) {
  :root {
    --auth-logo-size: clamp(440px, 40vw, 920px);
  }
}

@media (min-width: 900px) and (max-width: 2199px) and (max-height: 859px) {
  :root {
    --auth-logo-size: clamp(280px, 34vh, 460px);
  }
}

@media (min-width: 2200px) {
  :root {
    --auth-shell-pad-x: clamp(28px, 3vw, 88px);
    --auth-shell-pad-y: clamp(24px, 3.5vh, 64px);
    --auth-stage-gap: clamp(28px, 2.4vh, 54px);
    --auth-panel-width: clamp(520px, 26vw, 920px);
    --auth-panel-pad: clamp(34px, 1.4vw + 18px, 68px);
    --auth-panel-gap: clamp(24px, 1.3vw, 44px);
    --auth-form-max-width: 600px;
    --auth-form-gap: clamp(14px, 0.8vw, 20px);
    --auth-logo-size: clamp(360px, 16vw, 620px);
    --auth-input-height: clamp(60px, 1.1vw + 42px, 78px);
    --auth-button-height: clamp(58px, 1vw + 40px, 70px);
    --auth-input-font-size: clamp(1.04rem, 0.92rem + 0.22vw, 1.18rem);
    --auth-status-font-size: clamp(0.9rem, 0.84rem + 0.1vw, 1rem);
  }
}

@media (min-width: 3200px) {
  :root {
    --auth-panel-width: clamp(640px, 25vw, 1040px);
    --auth-form-max-width: 660px;
    --auth-logo-size: clamp(520px, 16vw, 860px);
    --auth-input-height: clamp(64px, 0.9vw + 44px, 82px);
    --auth-button-height: clamp(60px, 0.85vw + 42px, 74px);
    --auth-input-font-size: clamp(1.08rem, 0.96rem + 0.18vw, 1.22rem);
  }
}

@media (max-height: 760px) {
  :root {
    --auth-shell-pad-y: 14px;
    --auth-stage-gap: 14px;
    --auth-panel-pad: clamp(18px, 2vw + 10px, 28px);
    --auth-panel-gap: 16px;
    --auth-logo-size: clamp(156px, 26vh, 270px);
    --auth-input-height: clamp(48px, 7vh, 56px);
    --auth-button-height: clamp(46px, 6.5vh, 54px);
  }
}
