/* CoreView sign-in screens, on the same design as the Medray Group SSO page (medray-auth.css in the
 * auth repo). Everything is prefixed so app.css, which the login page still loads for the loader,
 * cannot reach in, and so this file cannot reach out. */

body.cv-auth {
  --navy: #002C84;
  --navy-bright: #0A4AAE;
  --navy-deep: #001A4F;
  --cyan: #0098CC;
  --link: #00678F;
  --body: #516274;
  --muted: #6D7F93;
  --line: #D7E4EF;
  --line-soft: #E3EDF5;
  --field: #F9FCFF;
  --page: #F6F9FC;
  --bad: #8B2D2B;
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--body);
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
body.cv-auth *, body.cv-auth *::before, body.cv-auth *::after { box-sizing: border-box; }
body.cv-auth [hidden] { display: none !important; }

.cv-auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.cv-auth-card {
  width: min(1120px, 100%);
  min-height: 640px;
  display: flex;
  align-items: stretch;
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 44, 132, 0.14);
}

/* Left: the brand. */
.cv-auth-brand {
  position: relative;
  flex: 0 0 50%;
  padding: 0 clamp(32px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  background: linear-gradient(152deg, var(--navy-bright) 0%, var(--navy) 48%, var(--navy-deep) 100%);
}
.cv-auth-brand::before {
  content: "";
  position: absolute;
  top: -22%;
  left: -14%;
  width: 78%;
  padding-bottom: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 152, 204, 0.30) 0%, rgba(0, 152, 204, 0.08) 50%, rgba(0, 152, 204, 0) 72%);
  pointer-events: none;
}
.cv-auth-brand > * { position: relative; z-index: 2; }
/* Registered so the white curve's rightmost point (viewBox x=276 of 420) lands on the panel edge. */
.cv-auth-brand > .cv-auth-wave {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -144px;
  width: 420px;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}
.cv-auth-headline {
  margin: 0;
  max-width: 8em;
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -1px;
  color: #FFFFFF;
}
.cv-auth-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 330px;
}
.cv-auth-area {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.72);
}
.cv-auth-area::before {
  content: "";
  display: block;
  width: 34px;
  height: 5px;
  border-radius: 3px;
  background: var(--cyan);
}
.cv-auth-brand > .cv-auth-footnote {
  position: absolute;
  left: clamp(32px, 4vw, 52px);
  bottom: 26px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.55);
}

/* Right: the form. */
.cv-auth-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(28px, 3.4vw, 52px);
  background: #FFFFFF;
}
.cv-auth-panel > * { width: 100%; max-width: 400px; margin-left: auto; margin-right: auto; }
.cv-auth-heading { text-align: center; }
.cv-auth-lockup {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}
.cv-auth-word { width: 190px; height: auto; }
.cv-auth-product {
  font-family: "Avenir Next", "Century Gothic", sans-serif;
  font-size: 31px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #5F6368;
}
.cv-auth-line {
  margin: 26px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}

.cv-auth-field { margin-top: 18px; }
.cv-auth-label {
  display: block;
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--body);
}
.cv-auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cv-auth-link,
.cv-auth-reveal {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  cursor: pointer;
}
.cv-auth-link:hover,
.cv-auth-reveal:hover { color: #00506F; text-decoration: underline; }

.cv-auth-input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  font-family: inherit;
  font-size: 15px;
  color: var(--navy);
}
.cv-auth-input:focus,
.cv-auth-digit:focus {
  outline: none;
  background: #FFFFFF;
  border: 1.5px solid var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 152, 204, 0.14);
}
.cv-auth-password { position: relative; }
.cv-auth-password .cv-auth-input { padding-right: 62px; }
.cv-auth-reveal {
  position: absolute;
  top: 0;
  right: 15px;
  height: 52px;
}

.cv-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  padding: 8px 16px;
  border: none;
  border-radius: 13px;
  background: var(--navy);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 44, 132, 0.26);
  transition: background 0.15s ease;
}
.cv-auth-submit:hover { background: #013A9E; color: #FFFFFF; }
.cv-auth-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border: 1.5px solid #C98F8D;
  border-radius: 13px;
  background: #FFFFFF;
  color: var(--bad);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.cv-auth-danger:hover { background: #FBEDED; }

.cv-auth-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.cv-auth-lock { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cv-auth-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 18px;
}
.cv-auth-actions form { margin: 0; }

.cv-auth-alert {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.cv-auth-alert.is-bad { border-color: #E4BDBC; background: #FBEDED; color: var(--bad); }
.cv-auth-alert.is-good { border-color: #B2D8BF; background: #E8F4EC; color: #1B6B3A; }
.cv-auth-alert.is-warning { border-color: #E3C98A; background: #FBF1DC; color: #5A4410; }

/* The six code boxes. auth.js builds them; without it the plain code field stays and still works. */
.cv-auth-digits {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.cv-auth-digit {
  width: 54px;
  min-width: 0;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  text-align: center;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

/* First-time setup. */
.cv-auth-steps {
  margin-top: 22px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  counter-reset: cv-auth-step;
}
.cv-auth-steps > li {
  counter-increment: cv-auth-step;
  position: relative;
  margin-top: 18px;
  padding-left: 38px;
  font-size: 14px;
  line-height: 1.45;
}
.cv-auth-steps > li::before {
  content: counter(cv-auth-step);
  position: absolute;
  top: -1px;
  left: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #EAF6FB;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.cv-auth-step-title { display: block; font-weight: 700; color: var(--navy); }
.cv-auth-step-text { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.cv-auth-steps .cv-auth-field { margin-top: 10px; }
.cv-auth-steps .cv-auth-digits { justify-content: flex-start; gap: 7px; margin-top: 10px; }
.cv-auth-steps .cv-auth-digit { width: 46px; height: 54px; font-size: 20px; }
.cv-auth-qr-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}
.cv-auth-qr {
  flex: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
}
.cv-auth-qr canvas, .cv-auth-qr img { display: block; }
.cv-auth-qr-meta { flex: 1; min-width: 0; }
.cv-auth-qr-meta .cv-auth-label { margin-bottom: 6px; letter-spacing: 0.6px; }
.cv-auth-key {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--navy);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.cv-auth-key.is-copied { border-color: #B2D8BF; background: #E8F4EC; }
.cv-auth-hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Recovery codes. */
.cv-auth-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.cv-auth-recovery {
  padding: 9px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--navy);
}
.cv-auth-tick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: 20px;
  border-radius: 50%;
  background: #2A8F53;
}
.cv-auth-panel > .cv-auth-tick { width: 46px; }
.cv-auth-tick svg { width: 26px; height: 26px; }
.cv-auth-centre {
  margin-top: 14px;
  margin-bottom: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .cv-auth-page { display: block; padding: 24px 16px; }
  .cv-auth-card { width: 100%; min-height: 0; flex-direction: column; }
  .cv-auth-brand { flex: none; padding: 40px 28px; gap: 18px; }
  .cv-auth-brand > .cv-auth-wave { display: none; }
  .cv-auth-brand > .cv-auth-footnote { position: static; }
  .cv-auth-panel { padding: 36px 24px 44px; }
  .cv-auth-word { width: 150px; }
  .cv-auth-product { font-size: 23px; }
}
@media (max-width: 420px) {
  .cv-auth-digits { gap: 6px; }
  .cv-auth-digit { width: 44px; height: 56px; }
  .cv-auth-steps > li { padding-left: 0; padding-top: 32px; }
  .cv-auth-steps .cv-auth-digit { width: 40px; height: 50px; }
  .cv-auth-qr-row { flex-direction: column; align-items: flex-start; }
  .cv-auth-qr-meta { width: 100%; }
}
