/* Cuba Health Assist — Unified Sign In v7 */
.auth-login-status{margin:14px 0 0;padding:12px 14px;border-radius:14px;background:#ecfeff;border:1px solid rgba(14,124,123,.18);color:#0f766e;font-size:13px;line-height:1.45;font-weight:600}.auth-login-status.is-error{background:#fef2f2;border-color:rgba(220,38,38,.18);color:#991b1b}.auth-login-status.is-success{background:#f0fdf4;border-color:rgba(22,163,74,.18);color:#166534}.auth-login-status.is-info{background:#eff6ff;border-color:rgba(37,99,235,.16);color:#1e40af}.auth-access-note{margin-top:18px;color:#64748b;font-size:13px;line-height:1.55;text-align:center}.auth-access-note a{color:#0e7c7b;font-weight:700}.cha-auth-demo-note{margin-top:14px;padding:12px 14px;border:1px dashed rgba(14,124,123,.22);border-radius:14px;background:#f8fafb;color:#64748b;font-size:12px;line-height:1.5}.cha-auth-demo-note strong{color:#1e293b;font-weight:600}.btn-submit[disabled]{cursor:not-allowed;opacity:.72}.auth-card{position:relative}.auth-card::after{content:"";position:absolute;inset:auto 28px 0;height:1px;background:linear-gradient(90deg,transparent,rgba(14,124,123,.22),transparent)}

/* Cuba Health Assist — Sign-in forgot password modal v16.1 */
.cha-forgot-trigger{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  font:inherit;
  cursor:pointer;
}
.cha-auth-modal{
  position:fixed;
  inset:0;
  z-index:220;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .22s ease,visibility .22s ease;
}
.cha-auth-modal.is-open{
  opacity:1;
  pointer-events:auto;
  visibility:visible;
}
.cha-auth-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.34);
  backdrop-filter:blur(10px);
}
.cha-auth-modal__panel{
  position:relative;
  width:min(100%,460px);
  border:1px solid rgba(14,124,123,.16);
  border-radius:24px;
  background:#fff;
  box-shadow:0 28px 80px rgba(15,23,42,.18),0 10px 26px rgba(14,124,123,.10);
  padding:28px;
  color:#1e293b;
  transform:translateY(10px) scale(.985);
  transition:transform .24s ease;
  overflow:hidden;
}
.cha-auth-modal.is-open .cha-auth-modal__panel{
  transform:translateY(0) scale(1);
}
.cha-auth-modal__panel::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg,#0e7c7b,#2aa8a6);
}
.cha-auth-modal__close{
  position:absolute;
  top:16px;
  right:16px;
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#64748b;
  cursor:pointer;
  transition:background .2s ease,color .2s ease,border-color .2s ease;
}
.cha-auth-modal__close:hover{
  background:#e8f4f4;
  color:#0e7c7b;
  border-color:rgba(14,124,123,.22);
}
.cha-auth-modal__close svg,
.cha-auth-modal__icon svg,
.cha-auth-modal__submit svg{
  width:18px;
  height:18px;
}
.cha-auth-modal__brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  max-width:calc(100% - 52px);
  min-height:38px;
  padding:6px 12px 6px 6px;
  border:1px solid rgba(14,124,123,.14);
  border-radius:999px;
  background:#f8fbfb;
  color:#0e7c7b;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
}
.cha-auth-modal__icon{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#e8f4f4;
  color:#0e7c7b;
  flex:0 0 auto;
}
.cha-auth-modal__header{
  margin-top:20px;
}
.cha-auth-modal__header h2{
  margin:0;
  color:#1e293b;
  font-size:26px;
  line-height:1.15;
  font-weight:700;
  letter-spacing:-.03em;
}
.cha-auth-modal__header p{
  margin:10px 0 0;
  color:#64748b;
  font-size:14px;
  line-height:1.55;
}
.cha-auth-modal__form{
  margin-top:22px;
}
.cha-auth-modal__status{
  margin-top:14px;
}
.cha-auth-modal__actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:18px;
}
.cha-auth-modal__secondary{
  height:48px;
  padding:0 18px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#475569;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:background .2s ease,color .2s ease,border-color .2s ease;
}
.cha-auth-modal__secondary:hover{
  background:#f8fafc;
  color:#1e293b;
}
.cha-auth-modal__submit{
  flex:1;
  min-width:0;
  height:48px;
  margin:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.cha-auth-modal__note{
  margin:16px 0 0;
  color:#64748b;
  font-size:12.5px;
  line-height:1.5;
  text-align:center;
}
body.cha-auth-modal-open{
  overflow:hidden;
}
@media (max-width:640px){
  .cha-auth-modal{
    align-items:flex-end;
    padding:0;
  }
  .cha-auth-modal__panel{
    width:100%;
    max-height:calc(100dvh - 18px);
    overflow:auto;
    border-radius:24px 24px 0 0;
    padding:24px 20px 22px;
    box-shadow:0 -18px 60px rgba(15,23,42,.20);
    transform:translateY(28px);
  }
  .cha-auth-modal.is-open .cha-auth-modal__panel{
    transform:translateY(0);
  }
  .cha-auth-modal__header h2{
    font-size:23px;
  }
  .cha-auth-modal__actions{
    flex-direction:column-reverse;
    align-items:stretch;
  }
  .cha-auth-modal__secondary,
  .cha-auth-modal__submit{
    width:100%;
  }
}


/* CHA v16.3 — Forgot/reset password mobile polish
   Goal: more professional bottom-sheet rhythm on iPhone/Android without changing desktop behavior. */
.cha-auth-modal__panel{overscroll-behavior:contain;}
.cha-auth-modal__close{box-shadow:0 1px 2px rgba(15,23,42,.04);}
.cha-auth-modal__secondary{box-shadow:none;}
@media (max-width:640px){
  .cha-auth-modal{align-items:flex-end;padding:0;}
  .cha-auth-modal__backdrop{background:rgba(15,23,42,.42);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
  .cha-auth-modal__panel{
    width:100%;
    max-width:none;
    max-height:calc(100dvh - 92px);
    min-height:min(420px, calc(100dvh - 120px));
    border-radius:28px 28px 0 0;
    border:1px solid rgba(14,124,123,.10);
    border-top:2px solid rgba(42,168,166,.72);
    box-shadow:0 -24px 70px rgba(15,23,42,.24), 0 -8px 22px rgba(14,124,123,.10);
    padding:22px 20px calc(26px + env(safe-area-inset-bottom));
    transform:translateY(30px);
    scrollbar-width:thin;
  }
  .cha-auth-modal__panel::after{
    content:"";
    position:absolute;
    top:10px;
    left:50%;
    transform:translateX(-50%);
    width:52px;
    height:5px;
    border-radius:999px;
    background:rgba(14,124,123,.22);
  }
  .cha-auth-modal__close{
    top:16px;
    right:18px;
    width:44px;
    height:44px;
    border-radius:16px;
    background:#fff;
  }
  .cha-auth-modal__brand{
    max-width:calc(100% - 72px);
    min-height:38px;
    padding:7px 14px 7px 7px;
    border-color:rgba(14,124,123,.12);
    background:#f8fbfb;
    font-size:11.75px;
    letter-spacing:.01em;
  }
  .cha-auth-modal__icon{width:30px;height:30px;}
  .cha-auth-modal__header{margin-top:18px;}
  .cha-auth-modal__header h2{font-size:22px;line-height:1.14;letter-spacing:-.03em;}
  .cha-auth-modal__header p{margin-top:10px;font-size:14px;line-height:1.62;max-width:30ch;}
  .cha-auth-modal__form{margin-top:20px;}
  .cha-auth-modal__form .field__label{font-size:12.5px;font-weight:700;letter-spacing:-.01em;}
  .cha-auth-modal__form .field__input{height:52px;font-size:16px;border-radius:16px;}
  .cha-auth-modal__form .field__wrap{border-radius:16px;}
  .cha-auth-modal__status{margin-top:12px;border-radius:14px;font-size:12.75px;}
  .cha-auth-modal__actions{gap:12px;margin-top:18px;}
  .cha-auth-modal__submit,.cha-auth-modal__secondary{
    width:100%;
    height:50px;
    border-radius:16px;
    font-size:14px;
    font-weight:700;
  }
  .cha-auth-modal__secondary{background:#fff;color:#475569;border:1px solid #dbe5ef;}
  .cha-auth-modal__note{margin-top:18px;font-size:12.5px;line-height:1.6;padding:0 4px;color:#64748b;}
}
@media (max-width:390px){
  .cha-auth-modal__panel{padding-left:16px;padding-right:16px;}
  .cha-auth-modal__close{right:16px;}
  .cha-auth-modal__header h2{font-size:20px;}
  .cha-auth-modal__header p{font-size:13.5px;}
}


/* CHA v16.4 — Centered mobile recovery modal polish
   User feedback: keep the recovery popup visually aligned with the brand system, avoid bottom-sheet behavior, and center it on mobile. */
@media (max-width:640px){
  .cha-auth-modal{
    align-items:center !important;
    justify-content:center;
    padding:24px 14px max(24px, env(safe-area-inset-bottom));
  }
  .cha-auth-modal__backdrop{
    background:rgba(15,23,42,.46);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
  }
  .cha-auth-modal__panel{
    width:min(100%, 420px);
    max-width:420px;
    min-height:auto;
    max-height:min(86dvh, 760px);
    border-radius:26px;
    border-top:1px solid rgba(226,232,240,.92);
    box-shadow:0 24px 80px rgba(15,23,42,.24), 0 8px 28px rgba(14,124,123,.10);
    padding:18px 18px 20px;
    transform:translateY(14px) scale(.985);
  }
  .cha-auth-modal.is-open .cha-auth-modal__panel{
    transform:translateY(0) scale(1);
  }
  .cha-auth-modal__panel::after{display:none;}
  .cha-auth-modal__close{
    top:16px;
    right:16px;
    width:40px;
    height:40px;
    border-radius:14px;
    border-color:#dbe5ef;
    box-shadow:0 6px 16px rgba(15,23,42,.06);
  }
  .cha-auth-modal__brand{
    max-width:calc(100% - 60px);
    min-height:34px;
    padding:6px 12px 6px 6px;
    border-radius:999px;
  }
  .cha-auth-modal__icon{width:28px;height:28px;}
  .cha-auth-modal__header{margin-top:18px;}
  .cha-auth-modal__header h2{font-size:24px;line-height:1.12;letter-spacing:-.035em;}
  .cha-auth-modal__header p{margin-top:10px;max-width:26ch;font-size:14px;line-height:1.6;}
  .cha-auth-modal__form{margin-top:18px;}
  .cha-auth-modal__form .field__input{height:50px;border-radius:14px;}
  .cha-auth-modal__form .field__wrap{border-radius:14px;}
  .cha-auth-modal__status{margin-top:12px;}
  .cha-auth-modal__actions{flex-direction:column-reverse;gap:10px;margin-top:18px;}
  .cha-auth-modal__submit,.cha-auth-modal__secondary{
    width:100%;
    height:48px;
    border-radius:14px;
    font-size:14px;
    font-weight:700;
  }
  .cha-auth-modal__secondary{
    background:#fff;
    border-color:#dbe5ef;
    color:#475569;
  }
  .cha-auth-modal__note{
    margin-top:16px;
    padding:0 2px;
    font-size:12.5px;
    line-height:1.58;
  }
}
@media (max-width:390px){
  .cha-auth-modal{padding-left:12px;padding-right:12px;}
  .cha-auth-modal__panel{padding:16px 16px 18px;}
  .cha-auth-modal__header h2{font-size:22px;}
}


/* CHA v16.5 — Reset recovery modal professional mobile alignment
   Focus: centered presentation and perfectly consistent mobile action buttons. */
@media (max-width:640px){
  .cha-auth-modal{padding:20px 14px max(20px, env(safe-area-inset-bottom));}
  .cha-auth-modal__panel{
    width:min(100%, 402px);
    max-width:402px;
    max-height:min(84dvh, 720px);
    border-radius:24px;
    padding:22px 22px 24px;
    border:1px solid rgba(226,232,240,.95);
    border-top:4px solid #55b9b5;
    box-shadow:0 26px 72px rgba(15,23,42,.22), 0 10px 24px rgba(14,124,123,.08);
  }
  .cha-auth-modal__brand{
    max-width:calc(100% - 74px);
    min-height:40px;
    padding:7px 16px 7px 9px;
    border-radius:999px;
    font-size:11.75px;
    font-weight:700;
  }
  .cha-auth-modal__close{
    width:44px;
    height:44px;
    border-radius:16px;
    border:1px solid #dbe5ef;
    background:#fff;
  }
  .cha-auth-modal__header{margin-top:18px;}
  .cha-auth-modal__header h2{font-size:25px;line-height:1.12;letter-spacing:-.04em;}
  .cha-auth-modal__header p{font-size:14px;line-height:1.62;max-width:30ch;}
  .cha-auth-modal__form{margin-top:18px;}
  .cha-auth-modal__form .field__label{font-size:13.5px;}
  .cha-auth-modal__form .field__wrap{border-radius:15px;}
  .cha-auth-modal__form .field__input{height:52px;border-radius:15px;font-size:14px;}
  .cha-auth-modal__actions{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
    margin-top:18px;
    align-items:stretch;
  }
  .cha-auth-modal__submit,
  .cha-auth-modal__secondary{
    width:100% !important;
    min-width:100%;
    max-width:100%;
    height:52px;
    padding:0 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    box-sizing:border-box;
    border-radius:16px;
    font-size:14px;
    font-weight:700;
    letter-spacing:-.01em;
  }
  .cha-auth-modal__submit{
    flex:none;
    background:linear-gradient(180deg,#3e8f8c 0%, #2f7f7d 100%);
    border:1px solid #2f7f7d;
    box-shadow:0 8px 18px rgba(14,124,123,.16);
  }
  .cha-auth-modal__secondary{
    flex:none;
    background:#f8fafc;
    border:1px solid #dbe5ef;
    color:#334155;
    box-shadow:none;
  }
  .cha-auth-modal__note{margin-top:18px;font-size:12.5px;line-height:1.6;max-width:32ch;margin-left:auto;margin-right:auto;}
}
@media (max-width:390px){
  .cha-auth-modal{padding-left:12px;padding-right:12px;}
  .cha-auth-modal__panel{padding:20px 18px 22px;}
  .cha-auth-modal__header h2{font-size:23px;}
  .cha-auth-modal__submit,
  .cha-auth-modal__secondary{height:50px;border-radius:15px;}
}
