/* Общий стиль auth (Haze) — legacy /app и haze shell */
:root {
  --haze-accent: #ed5b2f;
  --haze-accent-muted: rgba(237, 91, 47, 0.14);
  --haze-surface: #1c252e;
  --haze-border: rgba(145, 158, 171, 0.22);
  --haze-text-muted: #919eab;
}

.haze-auth-backdrop,
#authModal.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.haze-auth-backdrop[hidden],
#authModal.auth-modal-overlay.hidden {
  display: none !important;
}

.haze-auth-card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  background: var(--haze-surface, #1c252e);
  border: 1px solid var(--haze-border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  color: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.haze-auth-card--wide { width: min(460px, 100%); }

.haze-auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--haze-text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.haze-auth-close:hover { color: #fff; background: rgba(255,255,255,0.06); }

.haze-auth-brand {
  text-align: center;
  margin-bottom: 16px;
}
.haze-auth-brand__logo { margin-bottom: 8px; border-radius: 10px; }
.haze-auth-brand__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.haze-auth-brand__tagline {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--haze-text-muted);
}

.haze-auth-vk {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(145, 158, 171, 0.14);
}
.haze-auth-vk__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--haze-text-muted);
  text-align: center;
}
.haze-auth-vk__error {
  margin-top: 8px;
  font-size: 12px;
  color: #f87171;
  text-align: center;
  min-height: 1em;
}

.haze-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.haze-auth-tab,
.auth-tab.tab-btn.haze-auth-tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--haze-border);
  background: transparent;
  color: var(--haze-text-muted);
  cursor: pointer;
  font-size: 14px;
}
.haze-auth-tab.is-active,
.auth-tab.tab-btn.haze-auth-tab.is-active {
  background: var(--haze-accent-muted);
  border-color: var(--haze-accent);
  color: #fff;
}

.haze-label {
  display: block;
  font-size: 12px;
  color: var(--haze-text-muted);
  margin: 0 0 6px;
}
.haze-input,
.auth-glass-input.haze-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--haze-border);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 15px;
}
.haze-input:focus,
.auth-glass-input.haze-input:focus {
  outline: none;
  border-color: var(--haze-accent);
  box-shadow: 0 0 0 2px var(--haze-accent-muted);
}

.haze-password-field {
  position: relative;
  margin-bottom: 12px;
}
.haze-password-field .haze-input,
.haze-password-field .auth-glass-input {
  margin-bottom: 0;
  padding-right: 44px;
}
.haze-password-field__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--haze-text-muted);
  cursor: pointer;
}
.haze-password-field__toggle:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.haze-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.haze-btn--primary,
.btn-lux.haze-btn--primary {
  width: 100%;
  background: var(--haze-accent);
  border-color: var(--haze-accent);
  color: #fff;
}
.haze-btn--primary:hover { filter: brightness(1.06); }
.haze-btn--ghost {
  background: transparent;
  border-color: var(--haze-border);
  color: var(--haze-text-muted);
}

.haze-auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--haze-text-muted);
  cursor: pointer;
}
.haze-auth-remember input { width: 16px; height: 16px; }

.haze-auth-link {
  font-size: 12px;
  color: var(--haze-accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  margin-bottom: 12px;
}

.haze-auth-card__error,
.haze-auth-card__success {
  font-size: 13px;
  margin-top: 10px;
  min-height: 1.2em;
}
.haze-auth-card__error { color: #f87171; }
.haze-auth-card__success {
  color: #6ee7b7;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.haze-auth-divider {
  text-align: center;
  font-size: 12px;
  color: var(--haze-text-muted);
  margin: 0 0 12px;
}

.haze-auth-legal {
  border: 1px solid var(--haze-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0 16px;
}
.haze-auth-legal__legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
}
.haze-auth-legal__intro {
  font-size: 12px;
  line-height: 1.45;
  color: var(--haze-text-muted);
  margin: 0 0 10px;
}
.haze-auth-legal__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 8px;
  cursor: pointer;
}
.haze-auth-legal__row a { color: var(--haze-accent); }
.haze-auth-legal__optional {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(145, 158, 171, 0.14);
}

.haze-drawer-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--haze-text-muted);
  text-align: center;
}
.haze-drawer-hint a { color: var(--haze-accent); }

.auth-legal-group {
  border: 1px solid var(--haze-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.auth-legal-group__legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
  color: #e2e8f0;
}

.haze-auth-vk-complete {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--haze-border);
  background: rgba(0,0,0,0.2);
}
.haze-auth-vk-complete.hidden { display: none !important; }

.haze-auth-reaccept {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(69, 26, 3, 0.35);
}
.haze-auth-reaccept.hidden { display: none !important; }

.haze-auth-forgot.hidden { display: none !important; }
