/* Páginas de autenticação — alinhadas ao tema do dashboard (--dx-*) */

* {
  box-sizing: border-box;
}

body.dx-auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--dx-bg);
  color: var(--dx-text);
  display: flex;
  flex-direction: column;
}

.dx-auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: var(--dx-surface);
  border-bottom: 1px solid var(--dx-border);
  flex-shrink: 0;
}

.dx-auth-brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.2;
}

.dx-auth-brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dx-brand);
}

.dx-auth-brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--dx-muted);
  letter-spacing: 0.02em;
}

.dx-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2.5rem;
}

.dx-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--dx-surface);
  border: 1px solid var(--dx-border);
  border-radius: 10px;
  box-shadow: var(--dx-shadow);
  padding: 1.75rem 1.5rem 1.5rem;
}

.dx-auth-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dx-brand);
}

.dx-auth-card-desc,
.dx-auth-intro {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--dx-muted);
  line-height: 1.45;
}

.dx-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dx-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dx-auth-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dx-heading);
}

.dx-auth-field input,
.dx-auth-field select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
  border: 1px solid var(--dx-border);
  border-radius: 6px;
  background: var(--dx-surface);
  color: var(--dx-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dx-auth-field input:focus,
.dx-auth-field select:focus {
  outline: none;
  border-color: var(--dx-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dx-brand) 22%, transparent);
}

.dx-auth-field-hint {
  font-size: 0.72rem;
  color: var(--dx-muted);
  line-height: 1.35;
}

.dx-auth-submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--dx-brand);
  background: var(--dx-brand);
  color: var(--dx-brand-contrast);
  cursor: pointer;
  transition: filter 0.15s;
}

.dx-auth-submit:hover {
  filter: brightness(1.06);
}

.dx-auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dx-auth-msg {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
  border-radius: 6px;
  line-height: 1.4;
}

.dx-auth-msg--error {
  background: var(--dx-error-bg);
  color: var(--dx-error-text);
}

.dx-auth-msg--success {
  background: color-mix(in srgb, var(--dx-brand) 12%, var(--dx-surface));
  color: var(--dx-heading);
  border: 1px solid var(--dx-metric-border);
}

.dx-auth-footer-link {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.dx-auth-footer-link a {
  color: var(--dx-brand);
  font-weight: 600;
  text-decoration: none;
}

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

/* Botão tema (mesmas medidas do header do dashboard) */
.dx-auth-topbar .header-theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--dx-border);
  outline: 1px solid color-mix(in srgb, var(--dx-brand) 55%, var(--dx-border));
  background: var(--dx-surface);
  color: var(--dx-brand);
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dx-auth-topbar .header-theme-btn:hover {
  background: var(--dx-surface-2);
}

.dx-auth-topbar .header-theme-btn:focus-visible {
  outline: 2px solid var(--dx-brand);
  outline-offset: 1px;
}
