/* Auth — layout oscuro moderno (login, reset, etc.) */

:root {
  --auth-bg-top: #0c0f14;
  --auth-bg-bottom: #151c28;
  --auth-card-bg: #1a2230;
  --auth-card-border: rgba(255, 255, 255, 0.08);
  --auth-text: #e8edf4;
  --auth-text-muted: #94a3b8;
  --auth-input-bg: #121820;
  --auth-input-border: #334155;
  --auth-accent: #4d9fff;
  --auth-accent-hover: #7cb3ff;
  --auth-danger: #f87171;
  --auth-footer-bg: #141b26;
}

body.auth-layout {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(77, 159, 255, 0.12), transparent 55%),
    linear-gradient(165deg, var(--auth-bg-top) 0%, var(--auth-bg-bottom) 100%);
  color: var(--auth-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.auth-layout .auth-footer {
  background: var(--auth-footer-bg) !important;
  border-top: 1px solid var(--auth-card-border);
  color: var(--auth-text-muted);
}

body.auth-layout .auth-footer a {
  color: var(--auth-accent);
  text-decoration: none;
}

body.auth-layout .auth-footer a:hover {
  color: var(--auth-accent-hover);
}

/* Fallback si alguna pantalla auth usa cards Bootstrap legacy */
body.auth-layout .card {
  background: var(--auth-card-bg);
  border-color: var(--auth-card-border);
  color: var(--auth-text);
}

body.auth-layout .card .card-body,
body.auth-layout .card .card-header,
body.auth-layout .card .card-footer {
  background: transparent;
  color: inherit;
  border-color: var(--auth-card-border);
}

.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  border-radius: 1rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.auth-card__brand {
  text-align: center;
  padding: 1.75rem 1.5rem 0.5rem;
}

.auth-card__brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.auth-card__brand-name {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-text-muted);
  font-weight: 600;
}

.auth-card__header {
  padding: 0.5rem 1.75rem 0;
  text-align: center;
}

.auth-card__header h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  color: var(--auth-text);
}

.auth-card__body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.auth-card__body p {
  color: var(--auth-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-card__footer {
  padding: 1rem 1.75rem;
  text-align: center;
  border-top: 1px solid var(--auth-card-border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
}

.auth-card__footer a {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-card__footer a:hover {
  color: var(--auth-accent-hover);
}

.auth-form .form-floating > label {
  color: var(--auth-text-muted);
}

.auth-form .form-control {
  background-color: var(--auth-input-bg);
  border-color: var(--auth-input-border);
  color: var(--auth-text);
}

.auth-form .form-control:focus {
  background-color: var(--auth-input-bg);
  border-color: var(--auth-accent);
  color: var(--auth-text);
  box-shadow: 0 0 0 0.2rem rgba(77, 159, 255, 0.2);
}

.auth-form .form-control::placeholder {
  color: var(--auth-text-muted);
}

.auth-form .text-danger,
.auth-alert-error {
  color: var(--auth-danger) !important;
  font-size: 0.85rem;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.auth-actions--center {
  justify-content: center;
}

.auth-link {
  color: var(--auth-accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.auth-link:hover {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

.btn-auth-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-auth-primary:hover {
  filter: brightness(1.08);
  color: #fff;
}

.btn-auth-primary:active {
  transform: scale(0.98);
}

.auth-message-success {
  color: #6ee7b7;
  text-align: center;
}

.auth-message-info {
  text-align: center;
  color: var(--auth-text-muted);
}
