body.auth-login-page .auth-panel {
    width: min(560px, 100%);
}

body.auth-login-page .next__page a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    color: var(--auth-link-color);
    transition: box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.auth-login-page .next__page a:hover,
body.auth-login-page .next__page a:focus {
    color: var(--auth-link-color) !important;
  
    box-shadow: rgba(185, 45, 52, 0.18), rgba(145, 24, 31, 0.16);
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

.auth-panel--compact {
    width: min(540px, 100%);
}

.auth-panel--message {
    gap: 0;
}

.auth-panel--message .auth-panel__header {
    margin-bottom: 0.95rem;
}

.auth-panel--message .sign-in__form {
    margin-top: 1rem;
}

.auth-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.78rem;
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--auth-input-border);
    color: var(--auth-text-primary);
    box-shadow: none;
}

.btn.secondary:hover,
.btn.secondary:focus {
    transform: translateY(-1px);
    background: rgba(185, 45, 52, 0.08);
}

html[data-auth-theme="light"] .btn.secondary {
    background: rgba(255, 255, 255, 0.7);
}

html[data-auth-theme="light"] .btn.secondary:hover,
html[data-auth-theme="light"] .btn.secondary:focus {
    background: rgba(255, 255, 255, 0.94);
}

.auth-inline-links {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    margin-top: -0.08rem;
}

.auth-inline-links small,
.forgot small,
.auth-message-stack p,
.auth-inline-note {
    color: var(--auth-text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-inline-links a,
.forgot a {
    color: var(--auth-link-color);
    font-weight: 600;
}

.auth-message-stack {
    display: flex;
    flex-direction: column;
    gap: 0.78rem;
}

.auth-support-email {
    color: var(--auth-text-primary) !important;
    font-size: 1rem !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-inline-note {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--auth-input-border);
    background: rgba(185, 45, 52, 0.07);
}

.auth-code-input {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}

.auth-visual-card-link {
    display: block;
    height: 100%;
}

.sign-in__form input[readonly] {
    opacity: 0.88;
    cursor: not-allowed;
}

.error {
    color: var(--color-feedback-warning);
    font-size: 0.88rem;
    line-height: 1.35;
}

.d-none {
    display: none !important;
}

#toast-container {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 9999 !important;
}

.toast {
  display: flex !important;
  align-items: center;
  min-width: 280px;
  max-width: 400px;
  padding: 14px 20px;
  margin-bottom: 12px;
  border-radius: 10px;
  background-color: #f44336;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
  animation: slideIn 0.4s ease, fadeOut 0.5s ease 4.5s forwards;
  position: relative;
  overflow: hidden;
}

.toast::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.7);
  animation: progressBar 5s linear forwards;
  width: 100%;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0%);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
    height: 0;
    padding: 0;
    margin: 0;
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* spinner pequeño */
.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1); /* convierte cualquier SVG en blanco */
  margin-right: 12px;
}
.auth-action-disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.78;
}

.auth-inline-action-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: #ffffff;
    animation: auth-btn-spin 0.8s linear infinite;
}

.auth-inline-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

@keyframes auth-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 760px) {
    .auth-form-actions {
        gap: 0.7rem;
    }

    .auth-inline-links small,
    .forgot small,
    .auth-message-stack p,
    .auth-inline-note {
        font-size: 0.86rem;
    }

    .auth-support-email {
        font-size: 0.95rem !important;
    }

    #toast-container {
        top: 84px;
        left: 12px;
        right: 12px;
    }

    .toast {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}
