/* ==========================================================================
   PPCTrace - Login Page Styles
   (Loads alongside common.css)

   Login is an isolated auth page — no navbar, no footer.
   Uses CSS variables from common.css.
   Imports Inter + Syne fonts on this page only (form/heading styling).
   ========================================================================== */

/* ==========================================================================
   Page-specific font overrides
   ========================================================================== */
.login-page {
  /* font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; */
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* On desktop, lock viewport to prevent body scroll */
@media (min-width: 992px) {
  html.login-html, body.login-page { height: 100%; overflow: hidden; }
}

/* ==========================================================================
   Page Layout
   ========================================================================== */
.login-shell {
  min-height: 100vh;
}

/* ==========================================================================
   LEFT — Brand Panel
   ========================================================================== */
.login-left {
  background: var(--blue);
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* decorative circles */
.login-left::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .08);
}
.login-left::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .06);
}

.left-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 32px;
}

/* logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-logo img {
  height: 65px;
  filter: brightness(0) invert(1);
}

/* heading block */
.brand-heading {
  /* font-family: 'Syne', sans-serif; */
  font-size: clamp(32px, 3.2vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 14px;
}
.brand-heading span {
  color: rgba(255, 255, 255, .45);
  display: block;
}
.brand-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
  line-height: 1.7;
  max-width: 380px;
  margin: 0;
}

/* stats */
.brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  overflow: hidden;
}
.bstat {
  background: rgba(255, 255, 255, .07);
  padding: 16px 14px;
  text-align: center;
}
.bstat-n {
  /* font-family: 'Syne', sans-serif; */
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
  display: block;
}
.bstat-t {
  font-size: 10px;
  color: rgba(255, 255, 255, .45);
  line-height: 1.4;
}

/* quote */
.brand-quote {
  border-left: 2px solid rgba(255, 255, 255, .25);
  padding-left: 14px;
}
.bq-text {
  font-size: 13px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 10px;
}
.bq-author {
  display: flex;
  align-items: center;
  gap: 9px;
}
.bq-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}
.bq-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.bq-role {
  font-size: 11px;
  color: rgba(255, 255, 255, .4);
}

/* ==========================================================================
   RIGHT — Login Form
   ========================================================================== */
.login-right {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  min-height: 100vh;
}
.form-wrap {
  width: 100%;
  max-width: 360px;
}

.form-title {
  /* font-family: 'Syne', sans-serif; */
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--text);
  margin-bottom: 6px;
}
.form-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}

.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted2);
  margin-bottom: 5px;
}
.form-input {
  width: 100%;
  background: var(--bluelt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 71, 194, .08);
}
.form-input::placeholder { color: var(--muted2); }

/* password row */
.pw-row { position: relative; }
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  padding: 4px 6px;
}

/* forgot */
.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 14px;
}
.forgot-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.forgot-link:hover { text-decoration: underline; }

/* submit */
.btn-submit {
  width: 100%;
  background: var(--blue);
  color: #fff;
  /* font-family: 'Syne', sans-serif; */
  font-size: 14px;
  font-weight: 800;
  padding: 13px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  letter-spacing: -.2px;
  transition: background .15s, box-shadow .15s, transform .1s;
  margin-bottom: 16px;
}
.btn-submit:hover {
  background: var(--blue2);
  box-shadow: 0 4px 20px rgba(24, 71, 194, .28);
  transform: translateY(-1px);
}

/* divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span {
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
}

/* SSO button */
.btn-sso {
  width: 100%;
  background: #fff;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid rgba(24, 71, 194, .18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 24px;
}
.btn-sso:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 10px rgba(24, 71, 194, .10);
}
.btn-sso svg { width: 16px; height: 16px; }

/* form footer */
.form-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted2);
}
.form-footer a {
  color: var(--blue);
  font-weight: 600;
}
.form-footer a:hover { text-decoration: underline; }

/* help link */
.help-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.help-row a {
  font-size: 12px;
  color: var(--muted2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.help-row a:hover { color: var(--blue); }

/* ==========================================================================
   Mobile-only top bar (only shown when split layout collapses)
   ========================================================================== */
.login-mobile-bar {
  display: none;
  background: var(--blue);
  padding: 18px 20px;
  text-align: center;
}
.login-mobile-bar img {
  height: 26px;
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet — narrower split, smaller padding */
@media (max-width: 1199px) {
  .login-left  { padding: 44px 40px; }
  .login-right { padding: 44px 40px; }
}

/* Below lg — collapse to single column, brand panel on top */
@media (max-width: 991px) {
  .login-shell { min-height: auto; }

  .login-mobile-bar { display: block; }

  .login-left {
    display: none; /* hide the heavy brand panel; mobile bar replaces it */
  }

  .login-right {
    min-height: calc(100vh - 62px); /* account for the mobile bar */
    padding: 40px 24px;
  }
}

/* Phone tweaks */
@media (max-width: 575px) {
  .login-mobile-bar { padding: 14px 16px; }
  .login-mobile-bar img { height: 22px; }

  .login-right { padding: 32px 20px; }
  .form-title { font-size: 22px; }
  .form-sub { margin-bottom: 24px; }
  .form-wrap { max-width: 100%; }
}

/* Very tall mobile screens — show a slim brand strip with key value prop */
.login-mobile-tagline {
  display: none;
}
@media (max-width: 991px) {
  .login-mobile-tagline {
    display: block;
    background: var(--bluelt);
    border-bottom: 1px solid var(--border);
    text-align: center;
    padding: 14px 20px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
  }
  .login-mobile-tagline strong { color: var(--text); font-weight: 700; }
}
