/* Login Devise */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 20% -10%, #334155 0%, #0f172a 45%, #020617 100%);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-signin-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
  border-radius: inherit;
  backdrop-filter: blur(4px);
}

/* El atributo HTML hidden debe ocultar el overlay; sin esto, display:flex del bloque anterior
   gana la especificidad y el velo queda siempre encima del formulario. */
.auth-signin-overlay[hidden] {
  display: none !important;
}

.auth-signin-overlay:not([hidden]) {
  display: flex;
}

.auth-signin-overlay__panel {
  text-align: center;
  max-width: 280px;
}

.auth-signin-overlay__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--theme-heading);
}

.auth-signin-overlay__detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--theme-muted);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--theme-card-bg);
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--theme-card-border);
  padding: 28px 28px 24px;
}

.auth-theme-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--theme-toggle-text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.auth-theme-toggle:hover {
  filter: brightness(1.06);
}

.auth-brand {
  text-align: center;
  margin-bottom: 22px;
}

.auth-brand__mark {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sandos-accent) 0%, var(--sandos-accent-dark) 100%);
  margin-bottom: 10px;
  box-shadow: 0 8px 20px var(--sandos-shadow-accent);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--theme-heading);
  letter-spacing: -0.03em;
}

.auth-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--theme-muted);
  line-height: 1.4;
}

.auth-flash {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.auth-flash--alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-flash--notice {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-subtle);
}

.auth-input {
  height: 42px;
  border: 1px solid var(--theme-input-border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--theme-input-text);
  background: var(--theme-input-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--sandos-accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.auth-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--sandos-accent);
}

.auth-checkbox-label {
  font-size: 13px;
  color: var(--theme-subtle);
  cursor: pointer;
}

.auth-submit {
  margin-top: 4px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--sandos-accent) 0%, var(--sandos-accent-dark) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px var(--sandos-shadow-accent);
  transition: transform 0.08s ease, filter 0.15s ease;
}

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

.auth-submit:active {
  transform: scale(0.99);
}
