/* Signed-off OnSiteiQ identity, 8 November 2026.
   Auth is always light; the signed-in workspace keeps its own theme preference. */
html:has(#auth-view:not([hidden])),
body:has(#auth-view:not([hidden])) {
  background: #f5f7f7;
  color-scheme: light;
}

.auth-layout {
  --bg: #f5f7f7;
  --panel: #ffffff;
  --panel-2: #f4f7f6;
  --line: #dce3e3;
  --text: #0b1117;
  --muted: #53636a;
  --muted-2: #64757c;
  --green: #087b58;
  --orange: #ff8500;
  --danger: #b42d36;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100svh;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  color-scheme: light;
  isolation: isolate;
}

.auth-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 109px;
  padding: 23px clamp(24px, 5vw, 80px) 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.auth-header::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: url("auth-brand/colour-band.svg") center / 100% 5px no-repeat;
  content: "";
}

.auth-brand { display: block; flex: 0 1 244px; min-width: 0; }
.auth-brand img { display: block; width: 100%; height: auto; }
.auth-layout a { color: var(--muted); text-decoration: none; }
.auth-layout a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.auth-layout .auth-brand:hover { text-decoration: none; }
.auth-home-link { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.auth-home-link > span { font-size: 19px; }

.auth-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 448px);
  align-items: center;
  gap: clamp(40px, 8vw, 112px);
  flex: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 64px 32px 76px;
}

.auth-introduction { padding: 0 0 24px; }
.auth-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.auth-kicker > span { width: 7px; height: 7px; border-radius: 2px; background: var(--orange); }
.auth-introduction h2 { margin: 0; color: var(--text); font-size: clamp(38px, 4.2vw, 58px); font-weight: 650; letter-spacing: -2px; line-height: 1.09; }
.auth-intro-copy { max-width: 340px; margin: 24px 0 32px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.auth-product-family { display: flex; flex-wrap: wrap; gap: 14px 18px; max-width: 410px; padding-top: 25px; border-top: 1px solid var(--line); }
.auth-product-family > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.auth-product-family i { width: 6px; height: 6px; border-radius: 50%; }
.auth-product-apiq { background: #ff8500; }
.auth-product-rigiq { background: #ff3b30; }
.auth-product-liftiq { background: #00d1ff; }
.auth-product-siteiq { background: #19b76b; }
.auth-product-fleetiq { background: #ffd400; }

.auth-layout .auth-panel {
  gap: 24px;
  width: 100%;
  min-width: 0;
  padding: 36px 38px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 38px #17342d07, 0 2px 5px #17342d03;
}

.auth-panel-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.auth-panel-label svg { width: 18px; height: 18px; flex: none; stroke: var(--green); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.auth-layout .login-form { gap: 19px; }
.auth-layout .login-form h1 { color: var(--text); font-size: 29px; font-weight: 650; letter-spacing: -.8px; line-height: 1.2; }
.auth-layout .auth-help { margin: -7px 0 6px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.65; }
.auth-layout .eyebrow { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1px; }
.auth-layout label { gap: 8px; color: #34454c; font-size: 12px; font-weight: 600; }
.auth-layout input {
  min-height: 48px;
  border: 1px solid #cbd6d6;
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  padding: 10px 13px;
  font-size: 16px;
  font-weight: 400;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.auth-layout input::placeholder { color: #708087; }
.auth-layout input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #087b581a; }
.auth-layout input:-webkit-autofill { -webkit-text-fill-color: #0b1117; -webkit-box-shadow: 0 0 0 1000px #f2f8f5 inset; caret-color: #0b1117; }
.auth-layout .primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 48px;
  margin-top: 3px;
  border: 1px solid var(--green);
  border-radius: 7px;
  background: var(--green);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
}
.auth-layout .primary-button > span { font-size: 19px; font-weight: 400; }
.auth-layout .primary-button:hover { background: #076b4d; filter: none; }
.auth-layout .ghost-button { min-height: 44px; border: 1px solid #cbd6d6; border-radius: 7px; background: #ffffff; color: #34454c; font-size: 13px; font-weight: 600; }
.auth-layout .ghost-button:hover { background: #f4f7f6; filter: none; }
.auth-layout button:disabled { opacity: .6; }
.auth-layout .auth-text-button { justify-self: center; min-height: 34px; margin-top: -6px; color: var(--green); font-size: 12px; font-weight: 600; }
.auth-layout .auth-text-button:hover { color: #075c43; text-decoration: underline; text-underline-offset: 4px; }
.auth-layout :is(a, button):focus-visible { outline: 3px solid #087b58; outline-offset: 4px; }
.auth-layout .form-message { min-height: 0; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.auth-layout .form-message:empty { display: none; }
.auth-layout .form-message:not(:empty) { padding: 11px 13px; border-radius: 6px; background: #f0f6f3; color: #235543; }
.auth-layout .form-message.error { background: #fff1f2; color: #a02632; }
.auth-layout .onboarding-summary,
.auth-layout .mfa-setup { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.auth-layout .onboarding-summary dt,
.auth-layout .mfa-secret-wrap span { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .8px; }
.auth-layout .onboarding-summary dd { color: var(--text); font-size: 14px; font-weight: 600; }
.auth-layout .mfa-secret-wrap code { color: #34454c; font-size: 12px; }
.auth-layout .mfa-setup img { border: 1px solid var(--line); border-radius: 5px; }
.auth-layout :is(#mfa-code, #mfa-enroll-code) { font-size: 22px; letter-spacing: 5px; font-variant-numeric: tabular-nums; }

.auth-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 21px clamp(24px, 5vw, 80px); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.auth-footer p { margin: 0; }
.auth-footer p > span { padding: 0 5px; }
.auth-footer a { font-weight: 600; }

@media (min-width: 1500px) { .auth-content { padding-top: 88px; padding-bottom: 110px; } }
@media (max-width: 900px) {
  .auth-content { grid-template-columns: minmax(0, 1fr) minmax(0, 412px); gap: 36px; padding: 48px 32px; }
  .auth-introduction h2 { font-size: 42px; letter-spacing: -1.5px; }
  .auth-layout .auth-panel { padding: 32px 28px 28px; }
  .auth-product-family { gap: 13px 16px; }
}
@media (max-width: 740px) {
  .auth-header { min-height: 91px; padding: 20px 24px 18px; }
  .auth-brand { flex-basis: 210px; }
  .auth-home-link { font-size: 12px; }
  .auth-content { grid-template-columns: minmax(0, 448px); justify-content: center; padding: 38px 24px 44px; }
  .auth-introduction { display: none; }
  .auth-layout .auth-panel { padding: 32px; }
  .auth-footer { flex-wrap: wrap; justify-content: center; gap: 9px; padding: 18px 24px; text-align: center; }
}
@media (max-width: 440px) {
  .auth-header { gap: 16px; min-height: 85px; padding: 20px 20px 17px; }
  .auth-brand { flex-basis: 180px; }
  .auth-home-link { gap: 5px; font-size: 11px; }
  .auth-home-link > span { display: none; }
  .auth-content { padding: 28px 16px 36px; }
  .auth-layout .auth-panel { padding: 28px 24px; border-radius: 11px; }
  .auth-layout .login-form h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) { .auth-layout input { transition: none; } }
