:root {
  --auth-brand: #c8241d;
  --auth-brand-rgb: 200, 36, 29;
  --auth-dark: #111;
  --auth-muted: #666;
  --auth-border: #ddd;
  --auth-bg: #f5f5f5;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--auth-dark);
  background: var(--auth-bg);
  overflow-x: hidden;
}

body.auth-body #top,
body.auth-body footer,
body.auth-body .site-footer,
body.auth-body #wrapper,
body.auth-body #main_header_wrapper {
  display: none !important;
}

.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 2rem 1.75rem;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-top: 3px solid var(--auth-brand);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand img {
  display: inline-block;
  height: 44px;
  width: auto;
  max-width: 100%;
}

.auth-brand-label {
  margin: 0.5rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--auth-brand);
}

.auth-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 4vw, 1.625rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.auth-lead {
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
  color: var(--auth-muted);
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 1.15rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-dark);
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--auth-dark);
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 0;
  box-shadow: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input::placeholder {
  color: #aaa;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(var(--auth-brand-rgb), 0.12);
}

.auth-password-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}

.auth-password-wrap input {
  flex: 1;
  min-width: 0;
}

.auth-toggle-password {
  flex-shrink: 0;
  min-height: 48px;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-muted);
  background: #fafafa;
  border: 1px solid var(--auth-border);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

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

.auth-caps-warning {
  display: none;
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--auth-brand);
}

.auth-submit {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0.35rem 0 0;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--auth-brand);
  border: 1px solid var(--auth-brand);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-submit:hover {
  background: var(--auth-dark);
  border-color: var(--auth-dark);
}

.auth-back {
  display: block;
  margin-top: 1.5rem;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-muted);
  text-align: center;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-back:hover {
  color: var(--auth-brand);
}

.auth-response {
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid;
}

.auth-response#response_error {
  background: #fff0f0;
  border-color: var(--auth-brand);
  color: var(--auth-brand);
}

.auth-response#response_ok {
  background: #eefaf3;
  border-color: #0e6b42;
  color: #0e6b42;
}

#cookie__disabled {
  margin-top: 1rem;
  text-align: center;
}

#cookie__disabled p {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.82rem;
  background: var(--auth-brand);
  color: #fff;
}

@media (max-width: 480px) {
  .auth-shell {
    align-items: flex-start;
    padding-top: max(1.5rem, env(safe-area-inset-top));
  }

  .auth-card {
    padding: 1.75rem 1.15rem 1.5rem;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .auth-brand img {
    height: 38px;
  }

  .auth-password-wrap {
    flex-direction: column;
  }

  .auth-toggle-password {
    width: 100%;
  }
}
