:root {
  --auth-bg: #0b0b0b;
  --auth-card: rgba(255, 255, 255, 0.05);
  --auth-border: rgba(255, 255, 255, 0.14);
  --auth-text: #ffffff;
  --auth-muted: #c4c4c4;
  --auth-accent: #D4A43A;
  --auth-accent-hover: #B8902E;
}

* {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  padding: 1.25rem;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 80% -10%, rgba(212, 164, 58, 0.16), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(139, 30, 30, 0.11), transparent 42%),
    var(--auth-bg);
  color: var(--auth-text);
  display: grid;
  place-items: center;
}

.auth-shell {
  width: 100%;
  max-width: 440px;
}

.auth-logo-wrap {
  text-align: center;
  margin-bottom: 1.1rem;
}

.auth-logo {
  width: clamp(128px, 24vw, 172px);
  height: auto;
}

.auth-card {
  width: 100%;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
  padding: 1.2rem;
}

.auth-title {
  margin: 0 0 0.45rem;
  font-size: 1.3rem;
  line-height: 1.3;
}

.auth-subtitle {
  margin: 0 0 1rem;
  color: var(--auth-muted);
  font-size: 0.95rem;
}

.auth-alert {
  border-radius: 10px;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.8rem;
  font-size: 0.94rem;
  line-height: 1.45;
}

.auth-alert--error {
  background: rgba(255, 84, 100, 0.12);
  border: 1px solid rgba(255, 84, 100, 0.32);
  color: #ffb0b7;
}

.auth-alert--ok {
  background: rgba(51, 200, 126, 0.12);
  border: 1px solid rgba(51, 200, 126, 0.32);
  color: #b9f6d9;
}

.auth-field {
  margin-bottom: 0.78rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.94rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-field input {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--auth-text);
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
}

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

.auth-field input:focus {
  outline: none;
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(212, 164, 58, 0.24);
}

.auth-input-wrap input[type="password"] {
  padding-right: 3rem;
}

.auth-toggle-pass {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #dddddd;
  min-width: 44px;
  min-height: 36px;
  border-radius: 8px;
  cursor: pointer;
}

.auth-toggle-pass:hover,
.auth-toggle-pass:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--auth-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  margin-top: 0.35rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: var(--auth-accent-hover);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.auth-links {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.42rem;
}

.auth-links a {
  color: #f0f0f0;
  text-decoration: none;
  opacity: 0.9;
  font-size: 0.92rem;
}

.auth-links a:hover,
.auth-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 380px) {
  body.auth-page {
    padding: 0.8rem;
  }

  .auth-card {
    border-radius: 14px;
    padding: 1rem;
  }
}
