/* Sign-in screens. Not from tch_core — tch.css is drawn for dense operator grids,
   and these are five fields on an empty page.

   Split layout: the form on a light panel (the wordmark carries black glyphs and
   needs a light surface), a photographic panel beside it. On a phone the panel
   collapses to a band so the form is never pushed below the fold. */

:root {
  --auth-ink: #16232a;
  --auth-body: #4a5c64;
  --auth-line: #dbe4e5;
  --auth-line-strong: #b9cbcb;
  --auth-brand: #126b69;
  --auth-brand-deep: #0b4643;
  --auth-brand-ink: #0e544f;
  --auth-brand-tint: #e7f1f0;
  --auth-danger: #a8352c;
  --auth-danger-tint: #fdf1ef;
  --auth-danger-line: #f0c9c3;
}

body.auth {
  margin: 0;
  background: #fff;
  color: var(--auth-ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
              min-height: 100vh; min-height: 100dvh; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ form side */
.auth-pane { display: flex; flex-direction: column; padding: 40px clamp(24px, 6vw, 76px) 32px; }
.auth-inner { flex: 1; display: flex; flex-direction: column; justify-content: center;
              width: 100%; max-width: 424px; margin: 0 auto; padding: 32px 0; }
@media (max-width: 900px) { .auth-inner { justify-content: flex-start; padding-top: 8px; } }

.auth-logo { display: block; margin-bottom: clamp(28px, 5vh, 52px); }
.auth-logo img { height: 30px; width: auto; display: block; }

.auth-inner h1 { font-size: clamp(28px, 3.4vw, 34px); font-weight: 700;
                 letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 10px;
                 color: var(--auth-ink); text-wrap: balance; }
.auth-inner .lede { color: var(--auth-body); font-size: 16px; line-height: 1.55;
                    margin: 0 0 28px; max-width: 40ch; }

/* ---------------------------------------------------------------------- fields */
.auth-label { display: block; font-size: 13.5px; font-weight: 600;
              color: var(--auth-ink); margin: 0 0 7px; }
.auth-field { width: 100%; font: inherit; font-size: 16px; color: var(--auth-ink);
              background: #fff; border: 1.5px solid var(--auth-line-strong);
              border-radius: 11px; padding: 14px 15px; transition: border-color .12s,
              box-shadow .12s; }
.auth-field::placeholder { color: #93a5aa; }
.auth-field:focus { outline: none; border-color: var(--auth-brand);
                    box-shadow: 0 0 0 3px rgba(18, 107, 105, .15); }

/* --------------------------------------------------------------------- buttons */
.auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            width: 100%; font: inherit; font-size: 16px; font-weight: 650;
            padding: 14px 20px; border-radius: 11px; border: 1.5px solid transparent;
            cursor: pointer; transition: background .12s, border-color .12s, transform .06s; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:focus-visible { outline: 3px solid rgba(18, 107, 105, .35); outline-offset: 2px; }
.auth-btn[disabled] { opacity: .6; cursor: default; transform: none; }

.auth-btn.primary { background: var(--auth-brand); color: #fff; border-color: var(--auth-brand); }
.auth-btn.primary:hover:not([disabled]) { background: var(--auth-brand-ink);
                                          border-color: var(--auth-brand-ink); }
.auth-btn.secondary { background: #fff; color: var(--auth-ink);
                      border-color: var(--auth-line-strong); }
.auth-btn.secondary:hover:not([disabled]) { border-color: var(--auth-ink); background: #fbfcfc; }

.auth-btn .key { width: 19px; height: 19px; flex: none; }

/* ---------------------------------------------------------------------- divider */
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0;
           color: #7d9095; font-size: 13.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--auth-line); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------------------- notices / small */
.auth-error { background: var(--auth-danger-tint); border: 1px solid var(--auth-danger-line);
              color: var(--auth-danger); border-radius: 10px; padding: 11px 13px;
              font-size: 14px; margin: 16px 0 0; }
.auth-ok { background: var(--auth-brand-tint); border: 1px solid #bcdcd8;
           color: var(--auth-brand-ink); border-radius: 10px; padding: 11px 13px;
           font-size: 14px; font-weight: 600; margin: 0 0 20px; }
.auth-note { color: var(--auth-body); font-size: 14px; line-height: 1.55; margin: 22px 0 0; }
.auth-note a { color: var(--auth-brand); font-weight: 600; text-underline-offset: 2px; }
.auth-legal { color: #7d9095; font-size: 13px; max-width: 424px; margin: 0 auto; width: 100%; }
.auth-legal a { color: #5c7075; }

.auth-skip { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
             color: var(--auth-body); font-weight: 600; font-size: 15px;
             text-decoration: none; }
.auth-skip:hover { color: var(--auth-brand); }

/* --------------------------------------------------------------- picture side */
.auth-art { position: relative; overflow: hidden; background: var(--auth-brand-deep);
            display: flex; align-items: flex-end; }
@media (max-width: 900px) { .auth-art { min-height: 168px; order: -1; } }

.auth-art-img { position: absolute; inset: 0; width: 100%; height: 100%;
                object-fit: cover; }

/* Shown when no photograph is configured, and behind one that is still loading, so
   the panel never flashes empty. Layered light rather than a picture of a building —
   a placeholder that admits to being one beats a bad stock photo. */
.auth-art-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 78% 8%, rgba(255, 255, 255, .22) 0%, transparent 58%),
    radial-gradient(90% 60% at 12% 96%, rgba(255, 189, 21, .16) 0%, transparent 62%),
    linear-gradient(160deg, #12706c 0%, #0c4a47 52%, #08312f 100%);
}

/* Scrim, so the caption holds its contrast over any photograph. */
.auth-art::after { content: ""; position: absolute; inset: 0;
                   background: linear-gradient(to top, rgba(6, 38, 36, .82) 0%,
                               rgba(6, 38, 36, .28) 42%, rgba(6, 38, 36, .06) 100%); }

.auth-art-copy { position: relative; z-index: 1; padding: clamp(28px, 5vw, 56px);
                 max-width: 30ch; }
.auth-art-copy p { color: #fff; font-size: clamp(19px, 2vw, 25px); font-weight: 600;
                   line-height: 1.32; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.auth-art-copy .sub { color: rgba(255, 255, 255, .78); font-size: 15px; font-weight: 400;
                      margin-top: 10px; letter-spacing: 0; }
@media (max-width: 900px) { .auth-art-copy { padding: 20px 24px; }
                            .auth-art-copy p { font-size: 17px; }
                            .auth-art-copy .sub { display: none; } }

/* --------------------------------------------------------------------- tables */
.auth-list { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 0; }
.auth-list th { text-align: left; font-size: 11.5px; text-transform: uppercase;
                letter-spacing: .07em; color: #7d9095; font-weight: 700;
                padding: 0 0 8px; border-bottom: 1px solid var(--auth-line); }
.auth-list td { padding: 12px 0; border-bottom: 1px solid var(--auth-line);
                vertical-align: top; }
.auth-list tr:last-child td { border-bottom: 0; }
.auth-list .muted { color: var(--auth-body); font-size: 13px; }
.auth-list .linkbtn { background: none; border: 0; padding: 0; font: inherit;
                      font-size: 14px; color: var(--auth-danger); font-weight: 600;
                      cursor: pointer; text-decoration: underline; }

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