@import url('./fonts.css');
@import url('./core/tokens.css');
@import url('./core/base.css');
@import url('./core/logo.css');
@import url('./core/bootstrap-overrides.css');
@import url('./core/modal-loading.css');
@import url('./core/custom-select.css');

/* =================== ?? INDEX PAGE STYLES =================== */

:root {
  /* Variantes de marca del index/login/register */
  --logo-link-color: inherit;
  --logo-link-letter-spacing: 0.04em;
  --logo-icon-size: 96px;
  --logo-icon-radius: 28px;
  --logo-icon-display: flex;
  --logo-wordmark-size: 2rem;
  --logo-wordmark-letter-spacing: 0.24em;
  --logo-wordmark-color: var(--brand-slate);
  --logo-wordmark-accent-color: var(--brand-forest);
  --logo-overlay-gradient: linear-gradient(130deg, rgba(65, 182, 230, 0.4), rgba(27, 177, 155, 0.45), rgba(168, 255, 115, 0.6));
  --logo-icon-hover-filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.16)) drop-shadow(0 0 18px rgba(126, 217, 87, 0.55));
  --logo-wordmark-hover-color: var(--brand-emerald);
}

/* =================== MAIN CONTENT =================== */
.main-content {
  margin-left: 0;
  padding: 2.5rem 1.5rem 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

body.register-page {
  overflow: hidden;
}

body.register-page .main-content {
  position: relative;
  z-index: 30;
  min-height: calc(100vh - 46px);
  padding: 1.4rem 1.5rem 1.2rem;
  overflow: hidden;
}

body.register-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  /* Ajuste fino solicitado: menos blanco y menos blur */
  background: linear-gradient(0deg, rgba(245, 248, 244, 0.1), rgba(245, 248, 244, 0.1)), rgba(0, 0, 0, 0.38);
  opacity: 1;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* =================== AUTH REDIRECT TRANSITION =================== */
.auth-redirect-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
  background: radial-gradient(circle at 22% 20%, rgba(126, 217, 87, 0.16), transparent 48%),
    radial-gradient(circle at 78% 80%, rgba(27, 177, 155, 0.22), transparent 55%),
    rgba(7, 20, 28, 0.64);
  backdrop-filter: blur(7px);
}

.auth-redirect-card {
  width: min(560px, 100%);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.09));
  box-shadow: 0 22px 42px rgba(4, 116, 66, 0.24);
  color: rgba(255, 255, 255, 0.96);
  padding: 1.5rem 1.5rem 1.35rem;
  transform: translateY(10px) scale(0.99);
  transition: transform 0.28s ease;
}

.auth-redirect-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 217, 87, 0.4);
  background: rgba(4, 116, 66, 0.2);
  color: rgba(227, 255, 240, 0.96);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.auth-redirect-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.97);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-redirect-text {
  margin: 0.7rem 0 0;
  color: rgba(241, 255, 247, 0.92);
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 520;
}

.auth-redirect-hint {
  margin: 0.75rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.13);
  padding: 0.28rem 0.82rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.auth-redirect-hint.is-empty {
  display: none;
}

.auth-redirect-loader {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  color: rgba(227, 255, 240, 0.92);
  font-weight: 600;
  font-size: 0.93rem;
}

.auth-redirect-loading-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  object-fit: contain;
  flex: 0 0 auto;
}

body.auth-redirecting .auth-redirect-overlay {
  opacity: 1;
  pointer-events: all;
}

body.auth-redirecting .auth-redirect-card {
  transform: translateY(0) scale(1);
}

body.auth-redirecting .main-content,
body.auth-redirecting footer {
  pointer-events: none;
}

/* =================== FOOTER =================== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 46px;
  min-height: 46px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(26px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 -10px 24px rgba(4, 116, 66, 0.12);
  padding: 0 0.95rem;
}

.footer-copyright {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  text-align: center;
}

.footer-tools {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-action-link:hover {
  color: var(--brand-emerald);
  transform: translateY(-1px);
}

.footer-action-link:focus-visible {
  outline: 2px solid rgba(126, 217, 87, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

body.register-page footer {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.14));
  color: rgba(255, 255, 255, 0.97);
}

body.register-page .footer-action-link {
  color: rgba(255, 255, 255, 0.97);
}

/* =================== WELCOME CARD =================== */
.welcome-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow: var(--glow-shadow);
  border: 1px solid rgba(255, 255, 255, 0.32);
  padding: 3.2rem 3rem;
  max-width: 620px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.welcome-card h1 {
  color: var(--brand-slate);
  margin-bottom: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.welcome-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 2.4rem;
  font-weight: 500;
  line-height: 1.6;
}

/* =================== BRAND =================== */
.welcome-brand {
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.8rem;
  background: none;
}

.welcome-brand .logo-wordmark {
  color: var(--brand-slate);
}

.welcome-brand .logo-wordmark-accent {
  color: var(--brand-forest);
}

/* =================== BUTTON GROUPS =================== */
.button-section {
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn-login,
.btn-register {
  border: none;
  padding: 0.85rem 2.25rem;
  font-size: 1.05rem;
  border-radius: 999px;
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-login {
  background: var(--primary-gradient);
}

.btn-register {
  background: var(--accent-gradient);
}

.btn-login:hover,
.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(4, 116, 66, 0.25);
}

/* CTA del landing: unificar proporciones y estados en smartphone/desktop */
@media (max-width: 767.98px), (min-width: 992px) {
  body.index-page #guestActions .button-section {
    display: grid;
    align-items: stretch;
  }

  body.index-page #guestActions .btn-login,
  body.index-page #guestActions .btn-register {
    width: 100%;
    min-height: 50px;
    padding: 0.78rem 1.3rem;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  body.index-page #guestActions .btn-register {
    background: linear-gradient(135deg, rgba(27, 177, 155, 0.95), rgba(65, 182, 230, 0.88));
  }

  body.index-page #guestActions .btn-login:hover,
  body.index-page #guestActions .btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 20px rgba(4, 116, 66, 0.24);
  }

  body.index-page #guestActions .btn-login:active,
  body.index-page #guestActions .btn-register:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(4, 116, 66, 0.18);
  }

  body.index-page #guestActions .btn-login:focus-visible,
  body.index-page #guestActions .btn-register:focus-visible {
    outline: 2px solid rgba(126, 217, 87, 0.65);
    outline-offset: 2px;
  }
}

@media (max-width: 767.98px) {
  body.index-page #guestActions .button-section {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto 0.15rem;
    gap: 0.58rem;
  }
}

.btn-secondary-outline {
  background: rgba(4, 116, 66, 0.08);
  border: 1px solid rgba(4, 116, 66, 0.28);
  padding: 0.65rem 1.7rem;
  font-size: 0.95rem;
  border-radius: 999px;
  color: var(--brand-forest);
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  font-weight: 500;
}

.btn-secondary-outline:hover {
  background: rgba(4, 116, 66, 0.16);
  border-color: rgba(4, 116, 66, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(4, 116, 66, 0.2);
  color: var(--brand-forest);
}

/* =================== SESSION CONFLICT MODAL =================== */
#sessionConflictModal .modal-body {
  padding-top: 1.2rem;
}

#sessionConflictModal .modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

#sessionConflictModal .modal-footer > * {
  margin: 0;
}

.session-conflict-panel {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: linear-gradient(140deg, rgba(241, 246, 242, 0.96), rgba(223, 244, 230, 0.92));
  border: 1px solid rgba(4, 116, 66, 0.24);
  border-radius: 16px;
  padding: 1rem 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 20px rgba(4, 116, 66, 0.12);
}

.session-conflict-panel__icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-forest), var(--brand-emerald));
  color: #ffffff;
  box-shadow: 0 8px 14px rgba(4, 116, 66, 0.24);
}

.session-conflict-panel__text {
  color: var(--brand-slate);
  font-weight: 600;
  line-height: 1.45;
}

.session-conflict-action-status {
  min-height: 1.45rem;
  margin: 0.95rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.session-conflict-action-status--ok {
  color: #d8ffe9;
}

.session-conflict-action-status--err {
  color: #ffd8d8;
}

#sessionConflictModal .modal-footer .btn-login {
  min-width: 170px;
  white-space: nowrap;
}

/* =================== COOKIE POLICY MODAL =================== */
#cookiePolicyModal .modal-dialog {
  max-width: 760px;
}

#cookiePolicyModal .modal-content {
  max-height: min(86vh, 760px);
  overflow: hidden;
}

#cookiePolicyModal .modal-header {
  padding: 0.9rem 1.15rem 0.8rem;
  border-bottom: 1px solid rgba(4, 116, 66, 0.2);
}

#cookiePolicyModal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#cookiePolicyModal .modal-title i {
  font-size: 0.92rem;
  color: var(--brand-forest);
}

#cookiePolicyModal .btn-close.cookie-policy-close {
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  margin: -0.2rem -0.2rem -0.2rem auto;
  border-radius: 12px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#cookiePolicyModal .btn-close.cookie-policy-close:hover {
  background: rgba(4, 116, 66, 0.1);
  box-shadow: inset 0 0 0 1px rgba(4, 116, 66, 0.2);
  transform: translateY(-1px);
}

#cookiePolicyModal .btn-close.cookie-policy-close:focus-visible {
  outline: 2px solid rgba(4, 116, 66, 0.55);
  outline-offset: 2px;
}

#cookiePolicyModal .modal-body {
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.cookie-policy-layout {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
  flex: 1 1 auto;
}

.cookie-policy-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.cookie-policy-panel {
  border-radius: 18px;
  border: 1px solid rgba(4, 116, 66, 0.24);
  background: linear-gradient(145deg, rgba(245, 250, 247, 0.96), rgba(226, 243, 232, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 12px 24px rgba(4, 116, 66, 0.14);
  padding: 1.15rem 1.2rem;
}

.cookie-policy-lead {
  margin-bottom: 0.8rem;
  color: #1f3c2f;
  font-weight: 600;
  line-height: 1.45;
}

.cookie-policy-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cookie-policy-section.accordion-item {
  border: 1px solid rgba(4, 116, 66, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.cookie-policy-toggle.accordion-button {
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  background: transparent;
  padding: 0.72rem 0.82rem;
  font-size: 0.98rem;
  color: var(--brand-forest);
  font-weight: 700;
}

.cookie-policy-toggle.accordion-button:not(.collapsed) {
  background: rgba(4, 116, 66, 0.08);
  color: var(--brand-forest);
}

.cookie-policy-toggle.accordion-button:focus {
  box-shadow: none;
}

.cookie-policy-toggle.accordion-button:focus-visible {
  outline: 2px solid rgba(4, 116, 66, 0.45);
  outline-offset: -2px;
}

.cookie-policy-section .accordion-body {
  padding: 0 0.82rem 0.82rem;
}

.cookie-policy-section p {
  margin: 0.15rem 0 0;
  color: #2b4b3d;
  line-height: 1.52;
  font-weight: 500;
}

.cookie-policy-list {
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  color: #2b4b3d;
  font-weight: 500;
}

.cookie-policy-list li + li {
  margin-top: 0.35rem;
}

.cookie-policy-inline-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.52rem;
  margin-top: 0.72rem;
  padding-top: 0.62rem;
  border-top: 1px solid rgba(4, 116, 66, 0.14);
}

.cookie-policy-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cookie-policy-btn--primary {
  border: 0;
  color: #ffffff;
  background: var(--primary-gradient);
  box-shadow: 0 8px 18px rgba(4, 116, 66, 0.2);
}

.cookie-policy-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(4, 116, 66, 0.24);
}

.cookie-policy-btn--secondary {
  border: 1px solid rgba(4, 116, 66, 0.35);
  color: var(--brand-forest);
  background: rgba(4, 116, 66, 0.08);
}

.cookie-policy-btn--secondary:hover {
  background: rgba(4, 116, 66, 0.14);
  border-color: rgba(4, 116, 66, 0.5);
}

.cookie-policy-btn--ghost {
  border: 1px solid rgba(4, 116, 66, 0.22);
  color: var(--brand-forest);
  background: rgba(255, 255, 255, 0.75);
}

.cookie-policy-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(4, 116, 66, 0.36);
}

.cookie-policy-btn:focus-visible {
  outline: 2px solid rgba(4, 116, 66, 0.55);
  outline-offset: 2px;
}

/* =================== FLOATING ALERTS =================== */
.index-alert-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.index-alert-container .alert-message {
  position: relative;
  top: auto;
  right: auto;
  margin: 0;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

@keyframes slideInRight {
  from {
    transform: translateX(320px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .index-alert-container {
    top: 76px;
    right: 12px;
    left: 12px;
  }

  .index-alert-container .alert-message {
    min-width: 0;
    width: 100%;
  }
}

/* =================== REGISTER CARD =================== */
.register-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border-radius: 26px;
  box-shadow: 0 18px 36px rgba(4, 116, 66, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0;
  max-width: 560px;
  width: 100%;
  text-align: left;
  max-height: min(82vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.register-card h2 {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.15rem;
  letter-spacing: 0.07em;
  font-size: 1.95rem;
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  position: relative;
}

.register-card h2::after {
  content: '';
  display: block;
  width: 82px;
  height: 3px;
  margin: 0.62rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 217, 87, 0.95), rgba(27, 177, 155, 0.85));
  box-shadow: 0 6px 18px rgba(27, 177, 155, 0.35);
}

body.register-page .register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem 2rem 0;
  margin-bottom: 0;
}

body.register-page .register-card h2 {
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1.24rem;
  line-height: 1.25;
  margin-bottom: 0;
  text-shadow: none;
}

body.register-page .register-card h2::after {
  display: none;
}

body.register-page .register-close-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: none;
  border-radius: 0;
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: invert(100%);
  opacity: 0.85;
  background-size: 0.92rem;
  transition: opacity 0.18s ease;
}

body.register-page .register-close-btn:hover {
  opacity: 1;
}

body.register-page .register-close-btn:focus-visible {
  outline: 2px solid rgba(126, 217, 87, 0.58);
  outline-offset: 2px;
}

body.register-page .register-body {
  padding: 1.72rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.register-conversation {
  display: flex;
  flex-direction: column;
  gap: 0.92rem;
  margin-bottom: 1.3rem;
}

#registerForm {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  margin-right: 0;
}

.agent-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: 20px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent-gradient);
  color: white;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(27, 177, 155, 0.35);
}

.agent-content {
  flex: 1;
}

.agent-name {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

body.register-page .register-steps {
  --register-step-min-width: 1.9rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: auto;
  margin: 0 auto;
  padding: 0;
  counter-reset: register-flow;
}

body.register-page .register-steps .step {
  min-width: var(--register-step-min-width);
  min-height: 1.42rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: transparent;
  font-size: 0;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

body.register-page .register-steps .step::before {
  counter-increment: register-flow;
  content: counter(register-flow);
  color: rgba(246, 255, 250, 0.88);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

body.register-page .register-steps .step.is-active {
  background: transparent;
  border-color: rgba(126, 217, 87, 0.7);
  cursor: default;
}

body.register-page .register-steps .step.is-active::before {
  color: #eafff3;
}

body.register-page .register-steps .step.is-done {
  background: transparent;
  border-color: rgba(27, 177, 155, 0.64);
}

body.register-page .register-steps .step.is-done::before {
  content: '\2713';
  color: #e9fffb;
  font-size: 0.7rem;
}

body.register-page .register-steps .step:not(.is-active):hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
}

body.register-page .register-steps .step:focus-visible {
  outline: 2px solid rgba(126, 217, 87, 0.55);
  outline-offset: 2px;
}

.register-step.step-animate {
  animation: registerStepIn 0.45s ease;
}

.register-step + .register-step {
  margin-top: 0.6rem;
}

/* =================== INVITE CONVERSATION =================== */
.invite-conversation {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.agent-response-card,
.invite-agent-card {
  position: relative;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1rem 0.95rem;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--agent-response-surface-start), var(--agent-response-surface-end));
  border: 1px solid var(--agent-response-border);
  box-shadow: var(--agent-response-shadow);
  overflow: hidden;
}

.agent-response-card::after,
.invite-agent-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--agent-response-overlay);
  pointer-events: none;
}

.agent-response-card .agent-content,
.invite-agent-card .agent-content {
  width: 100%;
  position: relative;
  z-index: 1;
}

.agent-response-meta,
.invite-agent-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.agent-response-card .agent-name,
.invite-agent-card .agent-name {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1.12rem;
  line-height: 1.2;
  color: var(--agent-response-name);
  margin: 0;
  font-weight: 700;
}

.agent-response-state,
.invite-chat-state {
  color: var(--agent-response-state);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.agent-response-state.is-typing::after,
.invite-chat-state.is-typing::after {
  content: '...';
  display: inline-block;
  width: 1.1em;
  overflow: hidden;
  vertical-align: bottom;
  animation: inviteTypingDots 1.2s steps(4, end) infinite;
}

.agent-response-card.is-typing,
.invite-agent-card.is-typing {
  border-color: rgba(4, 116, 66, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 10px 20px rgba(10, 35, 24, 0.16);
}

.agent-response-prompt,
.invite-agent-prompt {
  margin: 0;
  color: var(--agent-response-text);
  font-size: 0.97rem;
  line-height: 1.38;
  font-weight: 560;
}

body.register-page .agent-response-card {
  padding: 0.88rem 0.92rem 0.84rem;
  border-radius: 16px;
}

body.register-page .agent-response-prompt {
  font-size: 0.94rem;
  line-height: 1.33;
}

#inviteModal .invite-user-bubble {
  margin-left: auto;
  max-width: 84%;
  padding: 0.65rem 0.78rem 0.72rem;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, rgba(10, 152, 95, 0.92), rgba(40, 181, 160, 0.9));
  border: 1px solid rgba(168, 255, 115, 0.4);
  box-shadow: 0 10px 18px rgba(4, 116, 66, 0.22);
}

#inviteModal .invite-user-bubble__label {
  display: block;
  color: rgba(232, 255, 245, 0.86);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

#inviteModal #inviteUserEcho {
  margin: 0;
  color: #f3fff8;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 500;
}

#inviteModal .invite-user-bubble.bubble-animate {
  animation: inviteUserBubbleIn 0.32s ease;
}

.invite-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.invite-steps .step {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.invite-steps .step.is-active {
  background: rgba(126, 217, 87, 0.25);
  border-color: rgba(126, 217, 87, 0.55);
  color: #eafff3;
  box-shadow: 0 6px 14px rgba(126, 217, 87, 0.25);
}

.invite-steps .step.is-done {
  background: rgba(27, 177, 155, 0.25);
  border-color: rgba(27, 177, 155, 0.55);
  color: #e9fffb;
}

.invite-step-pane.step-animate {
  animation: registerStepIn 0.38s ease;
}

#inviteModal .invite-review-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.75rem;
}

#inviteModal .invite-review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
}

#inviteModal .invite-review-row + .invite-review-row {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

#inviteModal .invite-review-main {
  min-width: 0;
}

#inviteModal .invite-review-label {
  display: block;
  color: rgba(234, 255, 245, 0.78);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

#inviteModal .invite-review-value {
  margin: 0;
  color: #f6fffb;
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 520;
  word-break: break-word;
}

#inviteModal .invite-review-edit {
  border: 1px solid rgba(168, 255, 115, 0.35);
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.16);
  color: #e9fffb;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

#inviteModal .invite-review-edit:hover {
  background: rgba(126, 217, 87, 0.26);
  border-color: rgba(168, 255, 115, 0.6);
  transform: translateY(-1px);
}

#inviteModal .invite-actions {
  margin-top: 0.75rem;
}

#inviteModal .invite-actions .btn-register {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 1.02rem;
  font-weight: 600;
}

#inviteModal .invite-actions .btn-register:disabled {
  opacity: 0.82;
  transform: none;
  box-shadow: none;
}

#inviteModal .invite-actions .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.16rem;
}

/* Registro embebido en modal de index (adaptación de sing_in al layout modal) */
#registerModal .modal-content.register-card--modal {
  max-width: 560px;
  width: 100%;
  max-height: min(82vh, 820px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#registerModal .register-body {
  padding: 1.72rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

#registerModal .register-conversation {
  display: flex;
  flex-direction: column;
  gap: 0.92rem;
  margin-bottom: 1.3rem;
}

#registerModal #registerForm {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  margin-right: 0;
}

#registerModal .register-steps {
  --register-step-min-width: 1.9rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: auto;
  margin: 0 auto;
  padding: 0;
  counter-reset: register-flow;
}

#registerModal .register-steps .step {
  min-width: var(--register-step-min-width);
  min-height: 1.42rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: transparent;
  font-size: 0;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

#registerModal .register-steps .step::before {
  counter-increment: register-flow;
  content: counter(register-flow);
  color: rgba(246, 255, 250, 0.88);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

#registerModal .register-steps .step.is-active {
  border-color: rgba(126, 217, 87, 0.7);
  cursor: default;
}

#registerModal .register-steps .step.is-active::before {
  color: #eafff3;
}

#registerModal .register-steps .step.is-done {
  border-color: rgba(27, 177, 155, 0.64);
}

#registerModal .register-steps .step.is-done::before {
  content: '\2713';
  color: #e9fffb;
  font-size: 0.7rem;
}

#registerModal .register-steps .step:not(.is-active):hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
}

#registerModal .register-steps .step:focus-visible {
  outline: 2px solid rgba(126, 217, 87, 0.55);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  #registerModal .modal-dialog {
    margin: 0.5rem;
    width: auto;
  }

  #registerModal .modal-content.register-card--modal {
    max-height: min(88svh, 700px);
    padding: 0;
    height: auto;
  }

  #registerModal .modal-header {
    padding: 0.92rem 1rem 0.42rem;
  }

  #registerModal .modal-header .modal-title {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  #registerModal .modal-header .btn-close {
    transform: scale(0.94);
  }

  #registerModal .register-body {
    padding: 0.58rem 1rem 0.9rem;
    overflow-y: auto;
  }

  #registerModal .register-conversation {
    margin-bottom: 0.5rem;
    gap: 0.5rem;
  }

  #registerModal .register-steps {
    --register-step-min-width: 1.88rem;
    gap: 0.2rem;
  }

  #registerModal .register-steps .step {
    min-height: 1.88rem;
    padding: 0.08rem 0.3rem;
  }

  #registerModal .register-steps .step::before {
    font-size: 0.68rem;
  }

  #registerModal .agent-response-card {
    padding: 0.62rem 0.72rem 0.58rem;
    border-radius: 13px;
  }

  #registerModal .agent-response-card .agent-name {
    font-size: 0.96rem;
  }

  #registerModal .agent-response-prompt {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  #registerModal #registerForm {
    flex: 0 0 auto;
    overflow: visible;
    padding-right: 0;
  }

  #registerModal .form-label {
    margin-bottom: 0.34rem;
  }

  #registerModal #stepCountry .mb-3 {
    margin-bottom: 0.56rem !important;
  }

  #registerModal .form-text {
    margin-top: 0.2rem;
  }
}

@keyframes registerStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes inviteTypingDots {
  from {
    width: 0;
  }
  to {
    width: 1.1em;
  }
}

@keyframes inviteUserBubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.register-card .form-label {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.register-card .form-control {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #2e3f36;
  font-weight: 500;
}

.register-card .form-select {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #2e3f36;
  font-weight: 500;
}

.register-card .form-control:focus {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--brand-emerald);
  box-shadow: 0 0 0 0.18rem rgba(55, 145, 71, 0.22);
}

.register-card .form-select:focus {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--brand-emerald);
  box-shadow: 0 0 0 0.18rem rgba(55, 145, 71, 0.22);
}

.register-card .form-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
}

.register-card .required {
  color: #ff8181;
}

.register-card .account-type-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.35rem 0.25rem 0;
}

.register-card .form-check-input {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.55);
}

.register-card .form-check-input:checked {
  background-color: var(--brand-emerald);
  border-color: var(--brand-emerald);
}

.register-card .form-check-label {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.register-review-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
}

.register-review-title {
  margin: 0.6rem 0 0.25rem;
  color: rgba(245, 255, 250, 0.96);
  font-size: 1rem;
  font-weight: 700;
}

.register-review-help {
  margin: 0 0 0.35rem;
  color: rgba(231, 255, 245, 0.82);
  font-size: 0.86rem;
}

.register-review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0;
}

.register-review-row + .register-review-row {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.register-review-main {
  min-width: 0;
  flex: 1 1 auto;
}

.register-review-label {
  color: rgba(231, 255, 245, 0.75);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.register-review-value {
  color: #f6fffb;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.register-review-edit {
  border: 1px solid rgba(168, 255, 115, 0.34);
  border-radius: 999px;
  background: rgba(126, 217, 87, 0.14);
  color: #e9fffb;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.68rem;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.register-review-edit:hover {
  background: rgba(126, 217, 87, 0.24);
  border-color: rgba(168, 255, 115, 0.58);
  transform: translateY(-1px);
}

.register-review-edit:focus-visible {
  outline: 2px solid rgba(126, 217, 87, 0.58);
  outline-offset: 2px;
}

.register-captcha-container {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.85rem 0.95rem;
  margin-bottom: 1rem;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.register-captcha-container.is-disabled {
  opacity: 0.88;
}

.register-captcha-container.is-verified {
  border-color: rgba(126, 217, 87, 0.58);
  background: linear-gradient(135deg, rgba(126, 217, 87, 0.18), rgba(27, 177, 155, 0.16));
  box-shadow: inset 0 0 0 1px rgba(126, 217, 87, 0.22);
}

.register-captcha-title {
  margin: 0;
  color: rgba(245, 255, 250, 0.96);
  font-size: 0.92rem;
  font-weight: 700;
}

.register-captcha-help {
  margin: 0.35rem 0 0.65rem;
  color: rgba(231, 255, 245, 0.82);
  font-size: 0.84rem;
}

.register-captcha-widget {
  min-height: 64px;
  display: flex;
  align-items: center;
}

.agronai-altcha-widget {
  display: block;
  width: 100%;
  max-width: 100%;
  --altcha-max-width: 100%;
  --altcha-color-base: rgba(248, 253, 250, 0.94);
  --altcha-color-text: #1f2c26;
  --altcha-color-border: rgba(34, 139, 94, 0.42);
  --altcha-color-border-focus: rgba(34, 139, 94, 0.88);
  --altcha-border-width: 1px;
  --altcha-border-radius: 10px;
  --altcha-color-active: #168a56;
  --altcha-color-error-text: #ff7f7f;
  --altcha-color-footer-bg: transparent;
}

.agronai-altcha-widget .altcha {
  width: 100%;
}

.agronai-altcha-widget .altcha-main {
  gap: 0.62rem;
  padding: 0.66rem 0.74rem;
}

.agronai-altcha-widget .altcha-label {
  font-size: 0.98rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: #1f2c26;
}

.agronai-altcha-widget .altcha-checkbox {
  width: 40px;
  height: 22px;
  justify-content: flex-start;
}

.agronai-altcha-widget .altcha-checkbox input {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(56, 68, 61, 0.2);
  background: rgba(128, 140, 135, 0.58);
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.agronai-altcha-widget .altcha-checkbox input::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(44, 50, 47, 0.78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.agronai-altcha-widget .altcha-checkbox input:checked {
  background: rgba(132, 218, 164, 0.64);
  border-color: rgba(44, 147, 89, 0.66);
}

.agronai-altcha-widget .altcha-checkbox input:checked::before {
  transform: translateX(18px);
  background: rgba(22, 108, 67, 0.95);
}

.agronai-altcha-widget .altcha-checkbox input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(27, 177, 155, 0.2);
}

.agronai-altcha-widget .altcha-footer {
  padding: 0 0.72rem 0.38rem;
  justify-content: flex-end;
  opacity: 0.78;
}

.register-captcha-status {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.register-captcha-status.muted {
  color: rgba(231, 255, 245, 0.82);
}

.register-captcha-status.ok {
  color: #d7ffe4;
}

.register-captcha-status.err {
  color: #ffd9d9;
}

.btn-create {
  background: var(--primary-gradient);
  border: none;
  padding: 0.85rem 2.2rem;
  font-size: 1rem;
  border-radius: 999px;
  color: white;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(4, 116, 66, 0.28);
}

.btn-clear {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 999px;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  width: 100%;
}

.btn-clear:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.btn-back {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  color: white;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  text-transform: uppercase;
}

.btn-back:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16));
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
  color: white;
}

.btn-back i {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.55rem;
}

.register-step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.btn-step-continue {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: rgba(246, 255, 251, 0.94);
  border-radius: 999px;
  min-height: 38px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
}

.btn-step-continue:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}

.btn-step-continue:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.register-card .status-message {
  padding: 1rem;
  border-radius: 14px;
  margin-top: 1rem;
  backdrop-filter: blur(10px);
  
  font-weight: 500;
}

.register-card .status-message.show {
  display: flex;
}

.register-card .status-message.success {
  background: rgba(168, 255, 115, 0.3);
  border: 1px solid rgba(126, 217, 87, 0.4);
  color: #f5fff0;
}

.register-card .status-message.error {
  background: rgba(255, 142, 142, 0.28);
  border: 1px solid rgba(185, 28, 28, 0.35);
  color: #fff2f2;
}

.register-card .status-message.info {
  background: rgba(27, 177, 155, 0.25);
  border: 1px solid rgba(27, 177, 155, 0.45);
  color: #e9fffb;
}

.form-note {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 1rem;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
}

.welcome-logo-small {
  width: 120px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}

/* =================== USER INFO PILL =================== */
.user-info {
  background: rgba(255, 255, 255, 0.92);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 20px rgba(4, 116, 66, 0.15);
}

.user-info .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

/* =================== STATUS MESSAGE =================== */
.status-message {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  
  font-weight: 500;
}

.status-message.show {
  display: flex;
}

.status-message.success {
  background: rgba(168, 255, 115, 0.4);
  color: var(--brand-forest);
  border: 1px solid rgba(4, 116, 66, 0.2);
}

.status-message.error {
  background: rgba(255, 142, 142, 0.28);
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.25);
}

@media (min-width: 992px) {
  body.index-page .welcome-card {
    max-width: 560px;
    padding: 2.6rem 2.4rem;
  }

  body.index-page .welcome-brand {
    gap: 1.2rem;
    margin-bottom: 2rem;
  }

  body.index-page #mainDescription {
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
    line-height: 1.5;
  }

  body.index-page #guestActions .button-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 430px;
    margin: 0 auto 0.95rem;
    gap: 0.65rem;
  }

  body.register-page .register-card {
    max-width: 560px;
    max-height: min(82vh, 820px);
  }

  body.register-page .register-card h2 {
    font-size: 1.24rem;
    margin-bottom: 0;
  }

  body.register-page .register-header {
    padding: 1.5rem 2rem 0;
  }

  body.register-page .register-body {
    padding: 1.72rem 2rem 2rem;
  }

  body.register-page .register-conversation {
    gap: 0.72rem;
    margin-bottom: 1.18rem;
  }

  body.register-page .register-steps {
    --register-step-min-width: 1.98rem;
    gap: 0.36rem;
  }

  body.register-page .register-steps .step::before {
    font-size: 0.69rem;
  }

  body.register-page #registerForm {
    padding-right: 0.12rem;
  }
}

@media (max-width: 767.98px) {
  body.register-page .main-content {
    min-height: calc(100svh - 46px - env(safe-area-inset-bottom, 0px));
    padding: 0.56rem 0.68rem calc(0.54rem + env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: center;
  }

  body.register-page .register-card {
    max-width: 540px;
    max-height: calc(100svh - 62px - env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.register-page .register-card h2 {
    font-size: 1.12rem;
    margin-bottom: 0;
  }

  body.register-page .register-header {
    gap: 0.62rem;
    margin-bottom: 0;
    padding: 0.98rem 1.08rem 0;
  }

  body.register-page .register-close-btn {
    width: 30px;
    height: 30px;
    background-size: 0.82rem;
  }

  body.register-page .register-body {
    padding: 1.04rem 1.08rem 0.92rem;
    flex: 0 0 auto;
  }

  body.register-page .register-conversation {
    gap: 0.5rem;
    margin-bottom: 0.78rem;
  }

  body.register-page .register-steps {
    --register-step-min-width: 1.82rem;
    gap: 0.32rem;
  }

  body.register-page .register-steps .step {
    min-height: 1.52rem;
    padding: 0.08rem 0.56rem;
  }

  body.register-page .register-steps .step::before {
    font-size: 0.64rem;
  }

  body.register-page .agent-response-card {
    padding: 0.74rem 0.82rem 0.72rem;
    border-radius: 15px;
  }

  body.register-page .agent-response-card .agent-name {
    font-size: 1.02rem;
  }

  body.register-page .agent-response-prompt {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  body.register-page #registerForm {
    padding-right: 0.02rem;
    flex: 0 0 auto;
    overflow: visible;
  }

}

/* Estilo específico para el mensaje del modal de invitación */
#inviteStatus,
#inviteStatus.success,
#inviteStatus.error {
  color: #ffffff !important;
}

#inviteStatus {
  display: none;
  margin-top: 0.4rem;
  margin-bottom: 0.35rem;
  padding: 0;
}

#inviteStatus.show {
  display: flex;
  padding: 0.75rem 0.9rem;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 640px) {
  body.index-page .main-content {
    min-height: calc(100svh - 44px - env(safe-area-inset-bottom, 0px));
    padding: 0.95rem 0.95rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
    align-items: center;
    justify-content: center;
  }

  body.index-page .welcome-card {
    padding: 1.95rem 1.55rem 1.55rem;
  }

  .welcome-card {
    padding: 2.5rem 1.75rem;
  }

  body.index-page .welcome-brand {
    gap: 1rem;
    margin-bottom: 1.65rem;
  }

  body.index-page #mainDescription {
    font-size: 1rem;
    margin-bottom: 1.45rem;
    line-height: 1.45;
  }

  body.index-page #guestActions .button-section {
    margin-bottom: 0.15rem;
    gap: 0.55rem;
  }

  body.index-page #guestActions .btn-login,
  body.index-page #guestActions .btn-register {
    min-height: 46px;
  }

  .auth-redirect-card {
    padding: 1.25rem 1.1rem 1.2rem;
  }

  .auth-redirect-title {
    font-size: 1.38rem;
  }

  .auth-redirect-text {
    font-size: 0.95rem;
  }

  .auth-redirect-loader {
    font-size: 0.85rem;
  }

  .logo-icon-wrapper {
    width: 82px;
    height: 82px;
  }

  .logo-wordmark {
    font-size: 1.6rem;
  }

  body.index-page #guestActions .button-section {
    gap: 0.55rem;
  }

  body.index-page #guestActions .btn-login,
  body.index-page #guestActions .btn-register {
    width: 100%;
  }

  footer {
    font-size: 0.8rem;
    height: 44px;
    padding: 0 0.7rem;
  }

  .footer-copyright {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 112px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer-tools {
    right: 10px;
    gap: 0.35rem;
  }

  .footer-action-link {
    font-size: 0.78rem;
  }

  .register-card {
    padding: 2.2rem 1.6rem;
    max-height: calc(100vh - 86px);
  }

  .agent-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .register-steps .step {
    font-size: 0.7rem;
  }

  body.register-page .register-review-row {
    align-items: center;
    gap: 0.55rem;
  }

  body.register-page .register-review-value {
    text-align: left;
  }

  body.register-page .register-review-edit {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 0.22rem 0.62rem;
  }

  body.register-page .main-content {
    padding: 0.5rem 0.62rem 0.5rem;
    align-items: center;
    justify-content: center;
  }

  body.register-page .register-card {
    max-height: calc(100svh - 58px - env(safe-area-inset-bottom, 0px));
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.register-page .register-header {
    padding: 0.9rem 0.9rem 0;
    margin-bottom: 0;
  }

  body.register-page .register-close-btn {
    width: 28px;
    height: 28px;
    background-size: 0.76rem;
  }

  body.register-page .register-body {
    padding: 0.98rem 0.9rem 0.82rem;
    flex: 0 0 auto;
  }

  body.register-page .register-steps {
    --register-step-min-width: 1.76rem;
    gap: 0.24rem;
  }

  body.register-page #registerForm {
    flex: 0 0 auto;
    overflow: visible;
  }

  #inviteModal .invite-review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  #cookiePolicyModal .modal-dialog {
    max-width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }

  #cookiePolicyModal .modal-content {
    max-height: calc(100dvh - 1rem);
  }

  #cookiePolicyModal .modal-header {
    padding: 0.74rem 0.84rem 0.72rem;
  }

  #cookiePolicyModal .modal-title {
    font-size: 1.08rem;
  }

  #cookiePolicyModal .modal-title i {
    font-size: 0.82rem;
  }

  #cookiePolicyModal .btn-close.cookie-policy-close {
    width: 40px;
    height: 40px;
  }

  #cookiePolicyModal .modal-body {
    padding: 0.78rem 0.84rem 0.84rem;
  }

  .cookie-policy-panel {
    padding: 0.78rem 0.78rem 0.72rem;
    border-radius: 14px;
  }

  .cookie-policy-lead {
    margin-bottom: 0.62rem;
    line-height: 1.38;
    font-size: 0.96rem;
  }

  .cookie-policy-toggle.accordion-button {
    padding: 0.62rem 0.7rem;
    font-size: 0.93rem;
  }

  .cookie-policy-section .accordion-body {
    padding: 0 0.7rem 0.72rem;
  }

  .cookie-policy-section p,
  .cookie-policy-list {
    font-size: 0.92rem;
    line-height: 1.43;
  }

  .cookie-policy-inline-actions {
    gap: 0.44rem;
    margin-top: 0.58rem;
    padding-top: 0.52rem;
  }

  .cookie-policy-btn {
    min-height: 42px;
    font-size: 0.9rem;
  }

}

@media (max-width: 420px) {
  body.index-page .main-content {
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  body.index-page .welcome-card {
    padding: 1.75rem 1.2rem 1.35rem;
  }

  .welcome-card {
    padding: 2.2rem 1.35rem;
  }

  body.index-page .welcome-brand {
    margin-bottom: 1.35rem;
    gap: 0.85rem;
  }

  body.index-page #mainDescription {
    font-size: 0.96rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
  }

  body.index-page #guestActions .button-section {
    margin-bottom: 0;
    gap: 0.5rem;
  }

  .logo-icon-wrapper {
    width: 74px;
    height: 74px;
  }

  .logo-wordmark {
    font-size: 1.45rem;
    letter-spacing: 0.18em;
  }
}





