/* ============================================================================
   juribooks-auth-landing-v1.css — the sign-in landing page.

   A two-panel landing: the firm-facing story on the left, the credential card
   on the right. It replaces the single centred card the auth gate used to
   draw. Scoped entirely under #authGate, so it cannot reach the application
   shell behind it, and it carries no accounting styling.

   The left panel's photograph is a firm-supplied asset, not a bundled one:
   set --auth-hero to a url() to use one. Without it the panel renders as a
   deep navy field, which is the intended default rather than a broken image.
   ========================================================================== */

#authGate {
  --auth-navy: #0B2239;
  --auth-navy-2: #123253;
  --auth-blue: #1668E3;
  --auth-blue-hover: #1257C4;
  --auth-ink: #16233A;
  --auth-body: #4A5568;
  --auth-muted: #6B7A90;
  --auth-line: #DCE3ED;
  --auth-field: #FFFFFF;
  --auth-radius: 10px;
  --auth-hero: none;

  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: stretch; justify-content: stretch;
  background: #F4F7FB;
  font-family: 'Inter Tight', Inter, -apple-system, 'Segoe UI', system-ui, sans-serif;
  color: var(--auth-ink);
  overflow: auto;
}

/* the two panels ---------------------------------------------------------- */
#authGate .ag-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%; min-height: 100%;
}

/* ---------------------------------------------------------------- LEFT ---- */
#authGate .ag-hero {
  position: relative; display: flex; flex-direction: column;
  padding: 34px 48px 40px; color: #fff; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 34, 57, .82) 0%, rgba(11, 34, 57, .93) 55%, rgba(8, 26, 44, .97) 100%),
    var(--auth-hero),
    radial-gradient(120% 90% at 18% 12%, #17406B 0%, var(--auth-navy) 46%, #081A2C 100%);
  background-size: cover; background-position: center;
}
/* a quiet ledger-rule texture, so the panel reads as considered rather than flat */
#authGate .ag-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.055) 0 1px, transparent 1px 34px);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 72%, transparent 100%);
}
#authGate .ag-hero > * { position: relative; z-index: 1; }

/* the law symbol: a large, quiet watermark rather than a photograph, so the
   headline stays the loudest thing on the panel. Sits above the gradient and
   below the content; never intercepts a click. */
#authGate .ag-emblem {
  position: absolute; z-index: 0; pointer-events: none;
  right: -60px; top: 50%; transform: translateY(-50%);
  width: 460px; height: 460px; max-width: 62%;
  fill: none; stroke: #7FB4EE; stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: .11;
}
#authGate .ag-emblem path[d^="M28 84"], #authGate .ag-emblem path[d^="M138 84"] {
  fill: #7FB4EE; fill-opacity: .16;
}
@media (max-width: 900px) {
  #authGate .ag-emblem { width: 260px; height: 260px; right: -40px; opacity: .085; }
}

#authGate .ag-hero-top { display: flex; align-items: center; gap: 22px; flex: 0 0 auto; }
#authGate .ag-logo { display: flex; align-items: center; gap: 11px; }
#authGate .ag-logo img { width: 38px; height: 38px; border-radius: 8px; }
#authGate .ag-logo b {
  display: block; font-size: 25px; font-weight: 700; letter-spacing: -.5px; line-height: 1.05;
}
#authGate .ag-logo b i { font-style: normal; color: #5FA8FF; }
#authGate .ag-logo span {
  display: block; font-size: var(--text-xs); font-weight: 500; color: #9DB4CE; letter-spacing: .02em;
}
#authGate .ag-eyebrow {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .16em; color: #9DB4CE; text-transform: uppercase;
}

/* the body centres itself in the space left between the masthead and the
   bottom edge, so the quote stays on screen at 900px tall */
#authGate .ag-hero-body {
  flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 0 0; max-width: 520px;
}
#authGate .ag-hero h1 {
  font-size: 42px; line-height: 1.12; font-weight: 700; letter-spacing: -1.1px; margin: 0 0 20px;
}
#authGate .ag-hero p.ag-lede {
  font-size: var(--text-xl); line-height: 1.66; color: #C3D2E4; margin: 0 0 34px; max-width: 470px;
}
#authGate .ag-hero p.ag-lede u { text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 3px; }

#authGate .ag-feat { display: grid; gap: 20px; margin-bottom: 38px; }
#authGate .ag-feat-row { display: grid; grid-template-columns: 38px 1fr; gap: 15px; align-items: start; }
#authGate .ag-feat-ico {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .14);
}
#authGate .ag-feat-ico svg { width: 18px; height: 18px; stroke: #E8F1FB; fill: none; stroke-width: 1.8; }
#authGate .ag-feat-row b { display: block; font-size: var(--text-md); font-weight: 600; margin-bottom: 3px; }
#authGate .ag-feat-row span { display: block; font-size: var(--text-sm); color: #A9BCD2; line-height: 1.5; }

#authGate .ag-quote {
  border-left: 3px solid #5FA8FF; padding: 4px 0 4px 16px; margin: 6px 0 0;
  font-size: 14px; line-height: 1.55; font-style: italic; color: #D6E3F2; max-width: 380px;
}

/* --------------------------------------------------------------- RIGHT ---- */
#authGate .ag-panel {
  display: flex; flex-direction: column; background: #fff; padding: 26px 40px 30px;
}
#authGate .ag-panel-top {
  display: flex; align-items: center; justify-content: flex-end; gap: 26px; margin-bottom: 26px;
}
#authGate .ag-utility {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 4px 2px;
  font: inherit; font-size: 13px; color: var(--auth-body); cursor: pointer; border-radius: 6px;
}
#authGate .ag-utility:hover { color: var(--auth-ink); }
#authGate .ag-utility svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }

#authGate .ag-cardwrap { flex: 1; display: grid; place-items: center; }
#authGate .ag-card {
  width: 100%; max-width: 432px; background: #fff;
  border: 1px solid var(--auth-line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(16, 43, 76, .09), 0 2px 5px rgba(16, 43, 76, .05);
  padding: 0 0 26px; overflow: hidden;
}

/* tabs */
#authGate .ag-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--auth-line); background: #fff;
}
#authGate .ag-tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 15px 8px 13px; font: inherit; font-size: var(--text-md); font-weight: 500;
  color: var(--auth-muted); cursor: pointer; white-space: nowrap;
}
#authGate .ag-tab:hover { color: var(--auth-ink); }
#authGate .ag-tab[aria-selected="true"] { color: var(--auth-blue); border-bottom-color: var(--auth-blue); font-weight: 600; }

#authGate .ag-body { padding: 26px 30px 0; }
#authGate .ag-card h2 { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.5px; margin: 0 0 6px; color: var(--auth-ink); }
#authGate .ag-sub { font-size: var(--text-md); color: var(--auth-muted); margin: 0 0 22px; line-height: 1.5; }

/* fields */
#authGate .ag-field { margin-bottom: 15px; }
#authGate .ag-card label {
  display: block; font-size: var(--text-sm); font-weight: 600; color: var(--auth-ink); margin-bottom: 6px;
}
#authGate .ag-inputwrap { position: relative; display: block; }
#authGate .ag-inputwrap > svg.ag-lead {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--auth-muted); fill: none; stroke-width: 1.7; pointer-events: none;
}
#authGate .ag-card input[type="text"],
#authGate .ag-card input[type="email"],
#authGate .ag-card input[type="password"] {
  width: 100%; box-sizing: border-box; height: 44px;
  padding: 0 40px 0 38px; border: 1px solid var(--auth-line); border-radius: var(--auth-radius);
  background: var(--auth-field); font: inherit; font-size: 14px; color: var(--auth-ink);
  transition: border-color .12s, box-shadow .12s;
}
#authGate .ag-card input::placeholder { color: #9AA7B8; }
#authGate .ag-card input:focus {
  outline: none; border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(22, 104, 227, .14);
}
#authGate .ag-trail {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 7px; cursor: pointer; color: var(--auth-muted);
}
#authGate .ag-trail:hover { color: var(--auth-ink); background: #F1F5FA; }
#authGate .ag-trail:focus-visible { outline: 2px solid var(--auth-blue); outline-offset: 1px; }
#authGate .ag-trail svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }

#authGate .ag-hint { font-size: 12px; margin-top: 6px; text-align: right; }
#authGate .ag-hint a, #authGate .ag-link {
  color: var(--auth-blue); text-decoration: none; font-weight: 500; cursor: pointer;
}
#authGate .ag-hint a:hover, #authGate .ag-link:hover { text-decoration: underline; }

/* remember + forgot */
#authGate .ag-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px;
}
/* matches the specificity of `#authGate .ag-card label` above, which would
   otherwise make this a block and wrap the words under the checkbox */
#authGate .ag-card label.ag-check {
  display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--auth-body); cursor: pointer; margin-bottom: 0;
}
#authGate .ag-check input {
  width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--auth-blue); cursor: pointer; margin: 0;
}

/* primary */
#authGate .ag-btn {
  width: 100%; height: 46px; border: 0; border-radius: var(--auth-radius);
  background: var(--auth-blue); color: #fff; font: inherit; font-size: var(--text-lg); font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .12s;
}
#authGate .ag-btn:hover:not(:disabled) { background: var(--auth-blue-hover); }
#authGate .ag-btn:disabled { opacity: .62; cursor: progress; }
#authGate .ag-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
#authGate .ag-btn[data-busy="1"] svg { display: none; }

/* divider + providers */
#authGate .ag-or {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  margin: 20px 0 16px; font-size: var(--text-sm); color: var(--auth-muted);
}
#authGate .ag-or::before, #authGate .ag-or::after { content: ''; height: 1px; background: var(--auth-line); }
#authGate .ag-providers { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
#authGate .ag-provider {
  height: 44px; padding: 0 6px; border: 1px solid var(--auth-line); border-radius: var(--auth-radius);
  background: #fff; font: inherit; font-size: var(--text-sm); font-weight: 500; color: var(--auth-ink);
  cursor: pointer; white-space: nowrap; letter-spacing: -.1px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: border-color .12s, background .12s;
}
#authGate .ag-provider:hover { background: #F7FAFD; border-color: #C3CFDF; }
#authGate .ag-provider:disabled { opacity: .6; cursor: progress; }
#authGate .ag-provider svg { width: 16px; height: 16px; flex: 0 0 16px; }

#authGate .ag-foot-line { margin-top: 20px; text-align: center; font-size: 13px; color: var(--auth-muted); }

/* messages */
#authGate .ag-err { font-size: var(--text-sm); color: #C0392B; margin: 2px 0 10px; min-height: 0; line-height: 1.45; }
#authGate .ag-err:empty { margin: 0; }
#authGate .ag-okmsg { color: #1E7F4D; }
#authGate .ag-note {
  font-size: var(--text-sm); color: var(--auth-body); background: #F2F7FD; border: 1px solid #D6E5F7;
  border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; line-height: 1.5;
}

/* page footer */
#authGate .ag-footer {
  border-top: 1px solid var(--auth-line); margin-top: 26px; padding-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--auth-muted);
}
#authGate .ag-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
#authGate .ag-footer a { color: var(--auth-muted); text-decoration: none; }
#authGate .ag-footer a:hover { color: var(--auth-ink); text-decoration: underline; }
#authGate .ag-status { display: inline-flex; align-items: center; gap: 7px; }
#authGate .ag-dot { width: 7px; height: 7px; border-radius: 50%; background: #23A55A; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 1080px) {
  #authGate .ag-hero { padding: 28px 34px 34px; }
  #authGate .ag-hero h1 { font-size: 34px; }
  #authGate .ag-panel { padding: 22px 28px 26px; }
}
@media (max-width: 900px) {
  /* the story panel is supporting material: on a phone the card comes first */
  #authGate .ag-split { grid-template-columns: 1fr; }
  #authGate .ag-hero { order: 2; padding: 30px 22px 34px; }
  #authGate .ag-hero-body { padding-top: 26px; }
  #authGate .ag-hero h1 { font-size: 27px; }
  #authGate .ag-feat { gap: 16px; margin-bottom: 26px; }
  #authGate .ag-panel { order: 1; padding: 18px 16px 22px; }
  #authGate .ag-panel-top { justify-content: center; gap: 18px; margin-bottom: 18px; }
  #authGate .ag-body { padding: 22px 20px 0; }
  #authGate .ag-card { box-shadow: none; }
}
@media (max-width: 420px) {
  #authGate .ag-providers { grid-template-columns: 1fr; }
  /* keep "Forgot password?" on one line; let the row wrap instead of the words */
  #authGate .ag-row { flex-wrap: wrap; gap: 10px 14px; }
  #authGate .ag-row .ag-link { white-space: nowrap; }
  #authGate .ag-tab { font-size: var(--text-sm); padding: 14px 4px 12px; }
}

/* the firm may prefer the interface dark; the card stays light for legibility
   of a credential form, which is the one surface that should not invert */
@media (prefers-reduced-motion: reduce) {
  #authGate * { transition: none !important; }
}
