/* ==========================================================================
   Radius365i(TM) by TPRA - logged-out pages (login, timeout, logoff, locked,
   support, securityQuestion, failed login).

   Ported from the TPRA dashboard (branch design/brand-2027,
   www/css/design-system.css, "Login screen (ca-login-*)" block) so the two
   apps and the tpra.com /radius/ login look the same. Keep the ca-login*
   rules in step with that block; Radius365i-only additions are at the end.

   Loaded by /inc_login_shell_top.cfm and /inc_content.cfm with a ?v=
   cache-buster - bump it there when this file changes.
   Fonts: Inter (Google Fonts <link> in the page head); icons: Bootstrap Icons
   (/theme1/assets/fonts/bootstrap/). Images: /img/login/.
   ========================================================================== */

body.ca-login-body {
  margin: 0;
  padding: 0;
  background: #050B1D;
  color: #FFFFFF;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ca-login, .ca-login *, .ca-login *::before, .ca-login *::after { box-sizing: border-box; }
.ca-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  background: #050B1D;
  font-family: 'Inter', system-ui, sans-serif;
  color: #FFFFFF;
}
.ca-login a { color: #33B9E7; text-decoration: none; }
.ca-login a:hover, .ca-login a:focus-visible { color: #FFFFFF; }

/* Left: space image + patient photo */
.ca-login__visual {
  position: relative;
  min-height: 420px;
  background: #050B1D url('/img/login/space-bg.webp') 20% 70% / auto 150% no-repeat;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px clamp(24px, 4vw, 64px);
}
.ca-login__patient {
  position: absolute;
  left: -4%;
  bottom: -10%;
  height: 78%;
  width: auto;
  max-width: none;
  pointer-events: none;
}
.ca-login__brand,
.ca-login__back { position: relative; align-self: flex-start; }
.ca-login__brand img { height: 26px; width: auto; display: block; }
.ca-login .ca-login__back { font-size: 14px; font-weight: 500; color: #E6EBF3; }
.ca-login .ca-login__back:hover { color: #FFFFFF; }

/* Right: form panel */
.ca-login__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px clamp(24px, 5vw, 96px);
  border-left: 1px solid rgba(230, 235, 243, 0.1);
  background: #070F26;
}
.ca-login__form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
}
.ca-login__intro { display: flex; flex-direction: column; gap: 16px; }
.ca-login__tag {
  align-self: flex-start;
  padding: 6px 10px;
  background: rgba(0, 167, 225, 0.14);
  color: #33B9E7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ca-login__title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 48px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: #FFFFFF;
}
.ca-login__lede { margin: 0; font-size: 15px; line-height: 1.6; color: #A1A5AA; }

.ca-login__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #CFD4DB;
}
.ca-login__field-head { display: flex; justify-content: space-between; gap: 12px; }
.ca-login__field-head a { font-weight: 500; }
.ca-login__input {
  height: 52px;
  width: 100%;
  padding: 0 16px;
  margin: 0;
  background: #091432;
  border: 1px solid rgba(230, 235, 243, 0.18);
  border-radius: 0;
  box-shadow: none;
  color: #FFFFFF;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.ca-login__input::placeholder { color: #73767A; opacity: 1; }
.ca-login__input:focus { border-color: #00A7E1; }
/* Keep autofilled fields on-brand (Chrome/Safari paint them light by default) */
.ca-login__input:-webkit-autofill,
.ca-login__input:-webkit-autofill:hover,
.ca-login__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF;
  -webkit-box-shadow: 0 0 0 1000px #091432 inset;
  caret-color: #FFFFFF;
  transition: background-color 9999s ease-out 0s;
}

.ca-login__submit {
  height: 54px;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #00A7E1;
  color: #091432;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ca-login__submit:hover, .ca-login__submit:focus-visible { background: #33B9E7; color: #091432; }
.ca-login__submit:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
a.ca-login__submit:hover, a.ca-login__submit:focus-visible { color: #091432; }

.ca-login__note {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(230, 235, 243, 0.1);
  font-size: 14px;
  line-height: 1.6;
  color: #A1A5AA;
}
.ca-login__note p { margin: 0; }
.ca-login__note p + p { margin-top: 8px; }
.ca-login__legal { margin: 0; font-size: 12px; line-height: 1.6; color: #73767A; }

/* Server-rendered status / error notices */
.ca-login__notice {
  padding: 14px 16px;
  border: 1px solid rgba(0, 167, 225, 0.4);
  background: rgba(0, 167, 225, 0.08);
  font-size: 14px;
  line-height: 1.6;
  color: #E6EBF3;
}
.ca-login__notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}
.ca-login__notice--error {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.08);
}
.ca-login__notice--error .ca-login__notice-title i { color: #FF8A8A; }
.ca-login__notice a { color: #33B9E7; font-weight: 500; text-decoration: underline; }
.ca-login__notice a:hover { color: #FFFFFF; }

/* --- Logged-out sibling pages (timeout, logoff, locked, support, signup,
       securityQuestion) — shell in /inc_login_shell_top.cfm + _bottom.cfm --- */
.ca-login__form--wide { max-width: 560px; }
.ca-login__panel--top { align-items: flex-start; }
.ca-login__title--sm { font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; }
.ca-login__subtitle { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; color: #FFFFFF; letter-spacing: -0.01em; }
.ca-login__text { margin: 0; font-size: 15px; line-height: 1.6; color: #CFD4DB; }
.ca-login__text + .ca-login__text { margin-top: 12px; }
.ca-login__hint { margin: 0; font-size: 13px; line-height: 1.5; color: #A1A5AA; font-weight: 400; }
.ca-login__stack { display: flex; flex-direction: column; gap: 20px; }
.ca-login__stack > form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.ca-login__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ca-login__actions > .ca-login__submit,
.ca-login__actions > .ca-login__btn { flex: 1 1 160px; }
.ca-login__readonly {
  min-height: 52px; display: flex; align-items: center; padding: 0 16px;
  border: 1px dashed rgba(230, 235, 243, 0.18); color: #E6EBF3; font-size: 15px; font-weight: 400;
}

/* Tag colour variants */
.ca-login__tag--warning { background: rgba(245, 166, 35, 0.14); color: #F5B547; }
.ca-login__tag--danger  { background: rgba(255, 107, 107, 0.14); color: #FF8A8A; }
.ca-login__tag--success { background: rgba(52, 199, 123, 0.14); color: #5BD69A; }

/* Notice variants */
.ca-login__notice--warning { border-color: rgba(245, 166, 35, 0.45); background: rgba(245, 166, 35, 0.08); }
.ca-login__notice--warning .ca-login__notice-title i { color: #F5B547; }
.ca-login__notice--success { border-color: rgba(52, 199, 123, 0.45); background: rgba(52, 199, 123, 0.08); }
.ca-login__notice--success .ca-login__notice-title i { color: #5BD69A; }
.ca-login__notice p { margin: 0; }
.ca-login__notice p + p { margin-top: 8px; }

/* Buttons: <a>/<button>/<input type=submit> all share the primary look */
a.ca-login__submit, .ca-login__btn { text-decoration: none; }
.ca-login__panel input[type="submit"],
.ca-login__panel input[type="button"] {
  height: 54px; width: 100%; border: 0; border-radius: 0; background: #00A7E1; color: #091432;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.ca-login__panel input[type="submit"]:hover,
.ca-login__panel input[type="submit"]:focus-visible { background: #33B9E7; }
.ca-login__btn {
  height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 20px; border: 1px solid rgba(230, 235, 243, 0.3); border-radius: 0; background: transparent;
  color: #FFFFFF; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ca-login .ca-login__btn { color: #FFFFFF; }
.ca-login .ca-login__btn:hover, .ca-login .ca-login__btn:focus-visible { border-color: #00A7E1; color: #FFFFFF; background: rgba(0, 167, 225, 0.08); }
.ca-login .ca-login__submit, .ca-login .ca-login__submit:hover { color: #091432; }

/* Plain form controls inside the panel (cfinput / select / textarea markup
   that can't carry a class) get the same look as .ca-login__input */
.ca-login__panel input[type="text"],
.ca-login__panel input[type="email"],
.ca-login__panel input[type="tel"],
.ca-login__panel input[type="password"],
.ca-login__panel select,
.ca-login__panel textarea {
  width: 100%; min-height: 52px; padding: 0 16px; margin: 0;
  background: #091432; border: 1px solid rgba(230, 235, 243, 0.18); border-radius: 0; box-shadow: none;
  color: #FFFFFF; font: inherit; font-size: 15px; font-weight: 400; outline: none;
}
.ca-login__panel textarea { padding: 14px 16px; min-height: 140px; resize: vertical; line-height: 1.5; }
.ca-login__panel select {
  -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23CFD4DB' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.ca-login__panel select option { background: #091432; color: #FFFFFF; }
.ca-login__panel input:focus, .ca-login__panel select:focus, .ca-login__panel textarea:focus { border-color: #00A7E1; }
.ca-login__panel input::placeholder, .ca-login__panel textarea::placeholder { color: #73767A; opacity: 1; }

/* Support topic list */
.ca-login__topics { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ca-login__topics a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  font-size: 14px; font-weight: 500; color: #E6EBF3;
  background: #091432; border: 1px solid rgba(230, 235, 243, 0.1);
}
.ca-login__topics a i { font-size: 16px; color: #33B9E7; flex-shrink: 0; }
.ca-login .ca-login__topics a:hover { color: #FFFFFF; border-color: rgba(0, 167, 225, 0.5); }
.ca-login .ca-login__topics a.is-active { color: #FFFFFF; border-color: #00A7E1; background: rgba(0, 167, 225, 0.1); }
.ca-login__divider { height: 1px; background: rgba(230, 235, 243, 0.1); border: 0; margin: 0; }
.ca-login__empty { padding: 28px 20px; text-align: center; border: 1px dashed rgba(230, 235, 243, 0.18); color: #A1A5AA; font-size: 14px; }
.ca-login__empty i { display: block; font-size: 28px; color: #33B9E7; margin-bottom: 8px; }
.ca-login__section-label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #A1A5AA; }
.ca-login__required { color: #FF8A8A; }
/* Sign in button + "Forgot password?" stacked below it (keeps natural tab order) */
.ca-login__submit-group { display: flex; flex-direction: column; gap: 16px; }
.ca-login .ca-login__forgot { align-self: flex-start; font-size: 14px; font-weight: 500; color: #33B9E7; }
.ca-login .ca-login__forgot:hover, .ca-login .ca-login__forgot:focus-visible { color: #FFFFFF; }
/* Bare selects/textareas/submit inputs inside the panel (kept !important as in
   the dashboard so cfform/cfinput markup can't override them) */
.ca-login .ca-login__panel select,
.ca-login .ca-login__panel textarea {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 15px !important;
  background-color: #091432 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(230, 235, 243, 0.18) !important;
  border-radius: 0 !important;
}
.ca-login .ca-login__panel select {
  padding: 0 44px 0 16px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23CFD4DB' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
}
.ca-login .ca-login__panel textarea { padding: 14px 16px !important; }
.ca-login .ca-login__panel select:focus,
.ca-login .ca-login__panel textarea:focus { border-color: #00A7E1 !important; }
.ca-login__panel input[type="submit"],
.ca-login__panel input[type="button"] {
  background: #00A7E1 !important;
  color: #091432 !important;
  font-weight: 600 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 20px !important;
  box-shadow: none !important;
}
.ca-login__panel input[type="submit"]:hover,
.ca-login__panel input[type="submit"]:focus-visible,
.ca-login__panel input[type="button"]:hover { background: #33B9E7 !important; box-shadow: none !important; }
.ca-login__tag { display: inline-flex; align-items: center; gap: 6px; }
.ca-login .ca-login__backlink { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: #E6EBF3; }
.ca-login .ca-login__backlink:hover { color: #FFFFFF; }
.ca-login__inputrow { display: flex; }
.ca-login__inputrow > .ca-login__input { flex: 1 1 auto; min-width: 0; }
.ca-login__btn--icon { width: 52px; height: 52px; padding: 0; border-left: 0; flex: 0 0 52px; }

@media (min-width: 960px) {
  /* Side by side: keep the photo panel one viewport tall and pinned while a
     long right column (support form) scrolls, instead of stretching it. */
  .ca-login__visual { position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: start; }
}
@media (max-width: 959px) {
  /* Stacked (same breakpoint the auto-fit grid collapses at): divider moves to the top */
  .ca-login__panel { border-left: 0; border-top: 1px solid rgba(230, 235, 243, 0.1); }
}


/* ---------- Radius365i additions (design/brand-2027, Phase 1) ---------- */

/* "by TPRA" endorsement line directly under the product name */
.ca-login__byline {
  margin: -8px 0 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #33B9E7;
}

/* Phones (L-05): 44px tap targets for the stand-alone links */
.ca-login .ca-login__forgot,
.ca-login .ca-login__back,
.ca-login .ca-login__backlink { min-height: 44px; display: inline-flex; align-items: center; }
.ca-login__brand { min-height: 44px; display: flex; align-items: center; }
.ca-login__submit-group { gap: 4px; }
.ca-login__panel input[type="submit"], .ca-login__panel input[type="button"] { min-height: 54px; }

/* Keyboard focus on links */
.ca-login a:focus-visible { outline: 2px solid #33B9E7; outline-offset: 2px; }

/* Never let long words (emails, usernames, URLs) push the page sideways */
.ca-login__form { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 479px) {
  .ca-login__visual { min-height: 300px; padding: 28px 16px; }
  .ca-login__panel { padding: 40px 16px 48px; }
  .ca-login__title { font-size: 40px; }
  .ca-login__title--sm { font-size: 30px; }
}
