/* ============================================================
   ISB auth pages: split screen.
   Left: verdigris banknote brand panel. Right: paper form panel.
   Relies on tokens and helpers in style.css.
   ============================================================ */

body.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: var(--bg);
}

/* ---------- Brand panel ---------- */
.auth-brand {
  --g-size: 150%;
  --g-right: -45%;
  --g-top: -20%;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 3rem clamp(2rem, 4vw, 4rem);
  background: var(--note-bg);
  color: var(--note-ink);
  border-right: 1px solid var(--note-line);
}
.auth-brand-content { position: relative; z-index: 1; width: 100%; max-width: 30rem; }

.brand-logo {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--note-ink);
  margin-bottom: 2.5rem;
}
.brand-logo svg { width: 36px; height: 36px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-logo-text {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1;
}
.brand-logo-sub {
  font-family: var(--font-display); font-weight: 500; font-size: 1.125rem;
  color: var(--note-ink-2); padding-left: 0.75rem; margin-left: 0.1rem;
  border-left: 1px solid var(--note-line);
}

.auth-brand h2 {
  color: var(--note-ink);
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.25rem);
  line-height: 1.15;
  padding-top: 1.25rem;
  border-top: 1px solid var(--note-line);
  margin-bottom: 0.75rem;
}
.auth-brand p { color: var(--note-ink-2); font-size: 1rem; max-width: 36ch; }

/* Merchant: sibling product. Ink-coloured note, brass hairline. */
.auth-merchant .auth-brand { --note-bg: var(--ink); --guilloche: rgba(168,134,58,0.30); }
.auth-merchant .auth-brand h2 { border-top-color: var(--brass); }

/* ---------- Form panel ---------- */
.auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem clamp(1.25rem, 5vw, 4rem);
  background: var(--bg);
}
.auth-form-container { width: 100%; max-width: 26rem; }

.auth-form-container h1 {
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.25rem);
  margin-bottom: 0.5rem;
}
.auth-subtitle { color: var(--text-3); margin-bottom: 1.75rem; }

.auth-input-group { margin-bottom: 1.1rem; }
.auth-input-group label { margin-bottom: 0.375rem; }
.auth-field { position: relative; }
.auth-field .input-icon {
  position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-3); pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.auth-field input { padding-left: 2.6rem; min-height: 44px; }

.auth-form-container form button[type="submit"] {
  width: 100%; min-height: 46px; margin-top: 0.5rem; font-size: 1rem;
}

/* Inline messages: #message (style.css) and merchant JS classes */
#merchantAuthMessage:empty { display: none; }
#merchantAuthMessage {
  padding: 0.75rem 1rem; margin-bottom: 1.25rem;
  border-radius: var(--r-md); border: 1px solid var(--border); border-left-width: 4px;
  font-size: 0.9375rem; font-weight: 500;
}
#merchantAuthMessage.merchant-inline-error   { background: var(--red-bg);   color: var(--red-text);   border-color: var(--red); }
#merchantAuthMessage.merchant-inline-success { background: var(--green-bg); color: var(--green-text); border-color: var(--green); }

.auth-links {
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.5rem;
  font-size: 0.9375rem;
}
.auth-links a { display: inline-block; padding: 0.15rem 0; width: fit-content; }
.auth-note { margin-top: 1.25rem; font-size: 0.8125rem; color: var(--text-3); }

/* ---------- Mobile: compact brand header over a single column ---------- */
@media (max-width: 860px) {
  body.auth-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-brand {
    --g-size: 260px; --g-right: -60px; --g-top: -110px;
    align-items: center; padding: 1.1rem 1.25rem; border-right: 0;
    border-bottom: 1px solid var(--note-line);
  }
  .brand-logo { margin-bottom: 0; }
  .brand-logo svg { width: 28px; height: 28px; }
  .brand-logo-text { font-size: 1.375rem; }
  .auth-brand h2, .auth-brand p { display: none; }
  .auth-form-panel { align-items: flex-start; padding: 2rem 1.25rem 3rem; }
  .auth-links a { padding: 0.6rem 0; }
}
