/* Fix: el atributo hidden debe ocultar elementos aunque una regla CSS defina display */
[hidden] {
  display: none !important;
}

:root {
  --green: #0b5d55;
  --green-dark: #063f3a;
  --green-2: #138277;
  --mint: #eaf7f4;
  --gold: #d7a84a;
  --ink: #102a2a;
  --muted: #607575;
  --white: #fff;
  --line: #dce9e7;
  --bg: #f7fbfa;
  --shadow: 0 20px 60px rgba(10, 55, 51, .12);
  --radius: 22px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: transparent;/* var(--bg); */
  line-height: 1.55;
}

.widget-content {
  display: inline-block;
  position: relative;
  width: max-content;
  height: max-content;
}

.container {
  width: min(1160px, 92%);
  margin: auto
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -.03em
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--green), var(--green-2));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(11, 93, 85, .2);
}

.logo svg {
  width: 25px
}

.brand span {
  font-size: 20px
}

.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--muted);
  font-weight: 700;
  margin-top: -2px
}

.menu {
  display: none;
  background: none;
  border: 0;
  font-size: 25px;
  color: var(--green)
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold)
}

h1 {
  font-size: clamp(44px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 22px 0 22px
}

h1 em {
  font-style: normal;
  color: var(--green)
}

.hero-copy {
  font-size: 19px;
  color: #526867;
  max-width: 650px
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px
}

.micro {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: #59706f;
  font-size: 13px
}

.micro span {
  display: flex;
  gap: 7px;
  align-items: center
}

.check {
  color: var(--green);
  font-weight: 900
}

.hero-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 25px;
  overflow: hidden;
}

.hero-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--green), var(--gold))
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px
}

.card-title {
  font-weight: 850
}

.status {
  font-size: 11px;
  font-weight: 800;
  background: #eaf7f4;
  color: var(--green);
  padding: 7px 10px;
  border-radius: 99px
}

.progress {
  height: 9px;
  background: #edf3f2;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 7px
}

.progress i {
  display: block;
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #31a596);
  border-radius: 99px
}

.small {
  font-size: 12px;
  color: var(--muted)
}

.today {
  margin-top: 22px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fbfdfc
}

.today-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted)
}

.today h3 {
  margin: 7px 0;
  font-size: 17px
}

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #edf2f1
}

.task:first-of-type {
  border-top: 0
}

.task-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--mint);
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 15px
}

.task strong {
  font-size: 13px
}

.task p {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--muted)
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px
}

.float {
  position: static;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 65, 61, .08);
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.float b {
  display: block;
  color: var(--green);
  font-size: 18px;
  line-height: 1.05;
  margin-bottom: 3px;
}

@media(max-width:620px) {
  .metric-row {
    grid-template-columns: 1fr 1fr
  }

  .float {
    padding: 9px 10px;
    font-size: 10px
  }

  .float b {
    font-size: 16px
  }
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  margin-bottom: 20px
}

.icon svg {
  width: 24px;
  height: 24px
}

.form {
  display: grid;
  gap: 12px
}

.form label {
  font-size: 12px;
  font-weight: 800;
  color: #526867
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  outline: none
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--green)
}

.form textarea {
  min-height: 90px;
  resize: vertical
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45
}

.form-success {
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  padding: 14px;
  background: var(--mint);
  border-radius: 12px
}

.form button {
  margin-top: 5px;
  width: 100%
}

.chat-pulse {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #59d6a2;
  border: 2px solid #fff
}

.chat-window {
  position: fixed;
  right: 24px;
  bottom: 98px;
  width: 380px/* min(380px, calc(100vw - 32px)) */;
  /* background: #fff; */
  border: 1px solid var(--line);
  border-radius: 22px;
  /* box-shadow: 0 25px 70px rgba(7, 47, 44, .22); */
  z-index: 80;
  overflow: hidden;
  display: none
}

.chat-window.open {
  display: block
}

.chat-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px
}

.chat-header strong {
  display: block;
  font-size: 14px
}

.chat-header small {
  color: #c6dfdb;
  font-size: 11px
}

.chat-close {
  margin-left: auto;
  border: 0;
  background: none;
  color: #fff;
  font-size: 23px;
  cursor: pointer
}

.chat-body {
  padding: 15px;
  height: 290px;
  overflow: auto;
  background: #f7fbfa;
}

.chat-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  margin: 7px 0;
  line-height: 1.45;
  white-space: pre-line; 
}

.chat-msg.bot {
  background: #fff;
  border: 1px solid var(--line);
  border-top-left-radius: 5px;
}

.chat-msg.user {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  border-top-right-radius: 5px;
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 11px 13px;
  border-top: 1px solid var(--line)
}

.chat-options button {
  border: 1px solid #cfe2df;
  background: #fff;
  color: var(--green);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer
}

.chat-input {
  display: flex;
  border-top: 1px solid var(--line)
}

.chat-input input {
  flex: 1;
  border: 0;
  padding: 12px;
  outline: 0;
  font: inherit;
  font-size: 12px
}

.chat-input button {
  border: 0;
  background: var(--green);
  color: #fff;
  width: 48px;
  cursor: pointer
}

@media(max-width:620px) {
  .success-grid {
    grid-template-columns: 1fr
  }

  .join-box {
    padding: 30px 24px
  }

  .chat-launcher {
    right: 16px;
    bottom: 16px;
    width: 58px;
    height: 58px
  }

  .chat-window {
    right: 16px;
    bottom: 86px
  }
}

/* V20 — bienvenida, movimiento y disponibilidad del asistente */
.chat-launcher {
  animation: assistantFloat 3.2s ease-in-out infinite;
}

.chat-launcher:hover {
  animation-play-state: paused;
}

@keyframes assistantFloat {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-7px)
  }
}

.chat-pulse {
  background: #22c55e !important;
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: availabilityPulse 1.8s infinite;
}

@keyframes availabilityPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55)
  }

  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0)
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0)
  }
}

.chat-welcome {
  position: fixed;
  right: 98px;
  bottom: 35px;
  max-width: 250px;
  width: 200px;
  padding: 11px 15px;
  margin-left: 20px;
  border-radius: 15px 15px 4px 15px;
  background: #fff;
  border: 1px solid #d9d2f2;
  color: #3d2a67;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 15px 12px 30px -10px rgba(47, 35, 86, .16);
  z-index: 79;
  animation: welcomeIn .7s ease both, welcomeFloat 3.2s ease-in-out 1s infinite;
}

.chat-welcome strong {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
  color: #4b2f83
}

.chat-welcome.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none
}

.chat-welcome::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 14px;
  width: 13px;
  height: 13px;
  background: #fff;
  border-top: 1px solid #d9d2f2;
  border-right: 1px solid #d9d2f2;
  transform: rotate(45deg);
}

@keyframes welcomeIn {
  from {
    opacity: 0;
    transform: translateX(12px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes welcomeFloat {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-4px)
  }
}

@media(max-width:620px) {
  .chat-welcome {
    right: 84px;
    bottom: 25px;
    max-width: 250px;
    width: 200px;
    font-size: 11px;
    padding: 9px 12px;
    margin-left: 20px;
  }
}

.chat-window {
  border: 1px solid #d9d2f2;
  /* box-shadow: 0 25px 70px rgba(47, 35, 86, .25);
  background: #fcfbff; */
}

.chat-header {
  background: linear-gradient(135deg, #4b2f83, #7654b3);
  color: #fff;
}

.chat-avatar {
  background: linear-gradient(145deg, #f2d58a, #d5a84a);
  color: #3d2a67;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .16);
}
.chat-avatar {
  width: 60px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 950
}


.chat-header small {
  color: #e8def9
}

.chat-body {
  background: #f5f1fb
}

.chat-msg.bot {
  background: #fff;
  border-color: #ddd5ef
}

.chat-msg.user {
  background: #4b2f83;
  color: #fff
}

.chat-options {
  background: #fcfbff;
  border-top-color: #e4ddf0
}

.chat-options button {
  border-color: #d7ccec;
  background: #fff;
  color: #4b2f83
}

.chat-options button:hover {
  background: #eee8fa;
  border-color: #7654b3
}

.chat-input {
  background: #fff;
  border-top-color: #e4ddf0
}

.chat-input button {
  background: #4b2f83
}

.chat-launcher {
  background-color: transparent;
  /* background:linear-gradient(145deg,#4b2f83,#7654b3);
  box-shadow:0 14px 35px rgba(75,47,131,.34); */
}

/* .chat-launcher:hover{background:linear-gradient(145deg,#3d246d,#6746a1)} */
.chat-pulse {
  background: #d7a84a
}

.chat-launcher {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 80px;
  height: 80px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  z-index: 80;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .2s
}

.chat-launcher:hover {
  transform: translateY(-3px)
}

.chat-launcher input {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.date-divider {
    text-align: center;
}








/* STYLES PARA PEDIR LOS DATOS PERSONALES AL INICIO */
.chat-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #fbf9fe;
  border: 1px solid #d7ccec;
  border-radius: 16px;
}

.chat-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d7ccec;
  border-radius: 999px;
  background: #fff;
  color: #4b2f83;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.chat-form-input::placeholder {
  color: #9a8fb5;
}

.chat-form-input:focus {
  border-color: #4b2f83;
  box-shadow: 0 0 0 3px rgba(75, 47, 131, .15);
}

.chat-form-note {
  margin: 0;
  padding: 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #7a6f94;
  text-align: center;
}

.chat-form-btn {
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4b2f83, #7654b3);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: filter .2s, transform .1s;
}

.chat-form-btn:hover  { filter: brightness(1.08); }
.chat-form-btn:active { transform: scale(.98); }
.chat-form-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Error de validación, solo después de intentar enviar */
.chat-form.was-validated .chat-form-input:invalid {
  border-color: #c0392b;
}