/* ==========================================================================
   OnTrack+ sign-in page. Scoped to body.ot-login so nothing here leaks into
   the app. Colours are taken from the OnTrack+ logo: navy #012858 and green.
   ========================================================================== */

.ot-login {
  --ot-navy:      #012858;
  --ot-navy-2:    #0A1F4D;
  --ot-navy-3:    #021B40;
  --ot-green:     #138A36;
  --ot-green-2:   #1FA34A;
  --ot-green-lt:  #2BB35A;
  --ot-ink:       #0F1B33;
  --ot-muted:     #5B6B85;
  --ot-line:      #DCE3EE;
  --ot-bg:        #F4F7FB;
  --ot-white:     #FFFFFF;

  margin: 0;
  min-height: 100vh;
  background: var(--ot-bg);
  color: var(--ot-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.ot-login *, .ot-login *::before, .ot-login *::after { box-sizing: border-box; }

.ot-shell {
  display: flex;
  min-height: 100vh;
}

/* ------------------------------ BRAND PANEL ------------------------------ */

.ot-brand {
  position: relative;
  flex: 1 1 56%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 56px 36px;
  color: #E6ECF7;
  background: linear-gradient(150deg, var(--ot-navy) 0%, var(--ot-navy-2) 55%, var(--ot-navy-3) 100%);
  overflow: hidden;
}

/* soft glows + a faint dot grid, fading out toward the bottom */
.ot-brand-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 380px at 88% 18%, rgba(43,179,90,.20), transparent 70%),
    radial-gradient(600px 420px at 0% 100%, rgba(66,120,255,.16), transparent 70%);
}
.ot-brand-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.ot-brand > *:not(.ot-brand-bg) { position: relative; z-index: 1; }

.ot-logo-chip {
  display: inline-flex; align-items: center;
  padding: 10px 16px;
  background: var(--ot-white);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.ot-logo-chip img { height: 46px; width: auto; display: block; }

.ot-brand-mid { max-width: 620px; }

.ot-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #BFE8CC;
  background: rgba(43,179,90,.12);
  border: 1px solid rgba(43,179,90,.30);
  border-radius: 999px;
}
.ot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ot-green-lt); box-shadow: 0 0 0 4px rgba(43,179,90,.20); }

.ot-headline {
  margin: 0 0 16px;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ot-white);
}
.ot-headline span { color: var(--ot-green-lt); }

.ot-sub {
  margin: 0 0 34px;
  max-width: 500px;
  font-size: 16px; line-height: 1.65;
  color: #B9C6DE;
}

/* --- product preview --- */
.ot-preview { position: relative; max-width: 470px; padding: 0 0 28px 0; }

.ot-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}

.ot-card-main { padding: 20px 22px 18px; }
.ot-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #AFC0DC; }
.ot-badge-up {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #CFF5DB; background: rgba(43,179,90,.22);
}
.ot-card-value {
  margin: 6px 0 8px;
  font-family: "Inter", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: 26px; color: var(--ot-white);
}
.ot-chart { display: block; width: 100%; height: 78px; }

.ot-bars { display: grid; gap: 9px; margin-top: 14px; }
.ot-bars div { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 10px; font-size: 12px; color: #AFC0DC; }
.ot-bars b {
  position: relative; display: block; height: 6px; border-radius: 6px;
  background: rgba(255,255,255,.10); overflow: hidden;
}
.ot-bars b::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ot-green), var(--ot-green-lt));
}

.ot-float {
  position: absolute;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(10,31,77,.85);
  font-size: 13px;
}
.ot-float > i {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  color: var(--ot-white); background: var(--ot-green);
}
.ot-float b { display: block; color: var(--ot-white); font-weight: 600; white-space: nowrap; }
.ot-float small { display: block; color: #9FB1CF; font-size: 12px; }
.ot-float-a { right: -160px; top: 104px; }
.ot-float-b { right: -110px; bottom: -6px; }
.ot-float-b > i { background: #2F6BFF; }
.ot-pill {
  margin-left: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: #CFF5DB; background: rgba(43,179,90,.25);
}

/* --- feature list --- */
.ot-features {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.ot-features li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px;
  font-size: 13px; font-weight: 500; color: #D5DFEF;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
}
.ot-features i { color: var(--ot-green-lt); font-size: 13px; }

/* ------------------------------ SIGN-IN PANEL ----------------------------- */

.ot-panel {
  flex: 1 1 44%;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(19,138,54,.06), transparent 70%),
    var(--ot-bg);
}

.ot-form {
  width: 100%; max-width: 420px;
  padding: 40px 36px 30px;
  background: var(--ot-white);
  border: 1px solid #E6EBF3;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(15,27,51,.04), 0 24px 60px rgba(15,27,51,.10);
}

.ot-logo-sm { display: none; height: 52px; width: auto; margin: 0 auto 22px; }

.ot-title {
  margin: 0 0 6px;
  font-family: 'Poppins', 'Inter', sans-serif; font-weight: 700;
  font-size: 26px; color: var(--ot-ink);
}
.ot-lede { margin: 0 0 26px; color: var(--ot-muted); font-size: 15px; }

.ot-field { margin-bottom: 18px; }
.ot-field label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 600; color: #2A3A57;
}

.ot-input { position: relative; }
.ot-login .ot-input .form-control {
  height: 48px;
  padding: 0 44px 0 42px;
  font-size: 15px; color: var(--ot-ink);
  background: #F9FBFD;
  border: 1px solid var(--ot-line);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ot-login .ot-input .form-control::placeholder { color: #98A5BA; }
.ot-login .ot-input .form-control:focus {
  background: var(--ot-white);
  border-color: var(--ot-green);
  box-shadow: 0 0 0 4px rgba(19,138,54,.14);
  outline: none;
}
.ot-input > i {
  position: absolute; left: 15px; top: 24px; transform: translateY(-50%);
  font-size: 14px; color: #8C9AB3; pointer-events: none;
  transition: color .15s;
}
.ot-input .form-control:focus ~ i { color: var(--ot-green); }

.ot-eye {
  position: absolute; right: 6px; top: 6px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: #8C9AB3; background: transparent; border: 0; border-radius: 9px;
  cursor: pointer;
}
.ot-eye:hover { color: var(--ot-navy); background: #EEF2F8; }
.ot-eye:focus-visible { outline: 2px solid var(--ot-green); outline-offset: 1px; }

/* parsley's error text */
.ot-login .parsley-errors-list { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: #C62828; }
.ot-login .form-control.parsley-error { border-color: #E57373; background: #FFF8F8; }

.ot-login .ot-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; margin-top: 8px;
  font-family: 'Poppins', 'Inter', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .01em;
  color: var(--ot-white);
  background: linear-gradient(135deg, var(--ot-green) 0%, var(--ot-green-2) 100%);
  border: 0; border-radius: 12px;
  box-shadow: 0 10px 24px rgba(19,138,54,.28);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.ot-login .ot-submit:hover { color: var(--ot-white); filter: brightness(1.05); box-shadow: 0 14px 30px rgba(19,138,54,.34); }
.ot-login .ot-submit:active { transform: translateY(1px); }
.ot-login .ot-submit:focus-visible { outline: 3px solid rgba(1,40,88,.35); outline-offset: 2px; }
.ot-login .ot-submit[disabled] { opacity: .75; cursor: progress; }

.ot-secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 18px 0 0;
  font-size: 13px; color: var(--ot-muted);
}
.ot-secure i { color: var(--ot-green); }

.ot-credit {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid #EDF1F6;
  text-align: center; font-size: 12px; color: #8592A8;
}
.ot-credit a { color: var(--ot-navy); font-weight: 600; text-decoration: none; }
.ot-credit a:hover { text-decoration: underline; }

.ot-login .alert { border-radius: 10px; font-size: 14px; }

/* -------------------------------- RESPONSIVE ------------------------------- */

@media (max-width: 1280px) {
  .ot-brand { padding: 36px 40px 32px; }
  .ot-float-a { right: -70px; }
  .ot-float-b { right: -30px; }
}

/* Short laptop screens: keep everything above the fold. */
@media (min-width: 992px) and (max-height: 820px) {
  .ot-brand { padding-top: 28px; padding-bottom: 26px; gap: 20px; }
  .ot-logo-chip img { height: 40px; }
  .ot-eyebrow { margin-bottom: 12px; }
  .ot-headline { font-size: clamp(28px, 2.8vw, 38px); margin-bottom: 12px; }
  .ot-sub { margin-bottom: 22px; font-size: 15px; }
  .ot-bars { display: none; }
  .ot-chart { height: 64px; }
  .ot-preview { padding-bottom: 18px; }
  .ot-float-a { top: 70px; }
  .ot-float-b { display: none; }
}

@media (max-width: 1100px) {
  .ot-float { display: none; }
}

/* Tablet and phone: the brand panel goes, the logo moves onto the card. */
@media (max-width: 991.98px) {
  .ot-brand { display: none; }
  .ot-panel {
    padding: 32px 16px;
    background: linear-gradient(180deg, #EAF0F8 0%, var(--ot-bg) 45%);
  }
  .ot-logo-sm { display: block; }
  .ot-title, .ot-lede { text-align: center; }
}

@media (max-width: 480px) {
  .ot-panel { align-items: flex-start; padding-top: 28px; }
  .ot-form { padding: 28px 20px 22px; border-radius: 16px; }
  .ot-title { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .ot-login * { transition: none !important; }
}
