/* Auth pages — accent #8F00FF */
:root {
  --auth-accent: #8f00ff;
  --auth-accent-soft: rgba(143, 0, 255, 0.12);
  --auth-accent-mid: rgba(143, 0, 255, 0.25);
  --auth-text: #1a1423;
  --auth-muted: #6c5f7a;
  --auth-page-bg: linear-gradient(
    165deg,
    #f2e8ff 0%,
    #e4d4ff 38%,
    #d4b8ff 72%,
    #c9a8f5 100%
  );
}

/* Фиолетовый фон на всю страницу (html + body — без белых полос) */
html:has(.auth-page) {
  background: var(--auth-page-bg);
  background-attachment: fixed;
  min-height: 100%;
}

body:has(.auth-page) {
  background: var(--auth-page-bg);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Убираем ограничение ширины контейнера только на страницах входа/регистрации */
body:has(.auth-page) .main-layout.container {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin-top: 0 !important;
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  margin: 0;
  background: transparent;
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow:
    0 4px 24px rgba(143, 0, 255, 0.08),
    0 12px 40px rgba(26, 20, 35, 0.06);
  border: 1px solid rgba(143, 0, 255, 0.1);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--auth-accent),
    #b855ff
  );
}

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

.auth-card__logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-accent-soft);
  border-radius: 1rem;
  color: var(--auth-accent);
  font-size: 1.75rem;
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auth-text);
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.auth-card__subtitle {
  font-size: 0.9rem;
  color: var(--auth-muted);
  margin: 0;
  line-height: 1.45;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--auth-text);
  margin-bottom: 0.4rem;
}

.auth-form .form-control {
  border-radius: 0.65rem;
  border: 1px solid #e4ddf0;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-control:hover {
  border-color: #d4c8e8;
}

.auth-form .form-control:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-form .form-text {
  color: var(--auth-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.auth-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: var(--auth-accent-soft);
  border-radius: 0.65rem;
  font-size: 0.8rem;
  color: #4a3d5c;
  line-height: 1.45;
  margin-top: 0.5rem;
}

.auth-hint i {
  color: var(--auth-accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.btn-auth-primary {
  --bs-btn-bg: var(--auth-accent);
  --bs-btn-border-color: var(--auth-accent);
  --bs-btn-hover-bg: #7a00e0;
  --bs-btn-hover-border-color: #7a00e0;
  --bs-btn-active-bg: #6b00c7;
  --bs-btn-active-border-color: #6b00c7;
  --bs-btn-focus-shadow-rgb: 143, 0, 255;
  border-radius: 0.65rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  margin-top: 0.25rem;
  box-shadow: 0 4px 14px var(--auth-accent-mid);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-auth-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(143, 0, 255, 0.35);
}

.btn-auth-primary:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #efe8f5;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.auth-footer a, a {
  color: var(--auth-accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-page .alert {
  border-radius: 0.65rem;
  border: none;
  font-size: 0.9rem;
}

.auth-page .alert-danger {
  background: #fdeef0;
  color: #842029;
}

.auth-page .alert-success {
  background: #e8f8f0;
  color: #0f5132;
}
