/* ══════════════════════════════════════════
   SCOOP SUPPLIER PORTAL — SIGN-IN (style-guide §B.2)
   Same v2 sign-in rules as the staff and client login pages, kept as this
   portal's own copy (share-nothing isolation — no theme.css import).
   Light values below, dark under [data-sp-theme="dark"] (portal-theme.js).
══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
:root {
  --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --auth-bg-0:#F7F7F8; --auth-bg-1:#FFFFFF; --auth-bg-3:#F1F1F3;
  --auth-line-1:#EDEDF0; --auth-line-2:#E2E2E6; --auth-line-3:#CFCFD5;
  --auth-fg-1:#0F0F12; --auth-fg-2:#52525B; --auth-fg-3:#71717A;
  --auth-brand:#981E32; --auth-brand-600:#83192B; --auth-brand-700:#6C1424;
  --auth-brand-a24:rgba(152,30,50,.24); --auth-link:#981E32;
  --auth-danger:#DC2626; --auth-danger-fg:#B91C1C; --auth-success-fg:#15803D; --auth-warning-fg:#B45309;
}
[data-sp-theme="dark"] {
  --auth-bg-0:#0A0A0B; --auth-bg-1:#111113; --auth-bg-3:#1F1F23;
  --auth-line-1:rgba(255,255,255,.06); --auth-line-2:rgba(255,255,255,.09); --auth-line-3:rgba(255,255,255,.16);
  --auth-fg-1:#EDEDEF; --auth-fg-2:#A1A1AA; --auth-fg-3:#8A8A93;
  --auth-brand-a24:rgba(217,106,126,.32); --auth-link:#D96A7E;
  --auth-danger-fg:#F87171; --auth-success-fg:#4ADE80; --auth-warning-fg:#FBBF24;
}

/* ── Layout: full-bleed photo, headline on the left, sign-in card on the
   right. Below 900px the headline sits over the top of the photo and the
   card follows it; below 600px the card runs edge to edge to the bottom. ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body.auth-page {
  font-family: var(--auth-font); font-size: 14px; line-height: 1.5;
  background: #0b0c0e; color: var(--auth-fg-1);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.auth-page::before { display: none; }   /* no page watermark here */
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20; line-height: 1; }
.auth-page :focus-visible { outline: none; box-shadow: 0 0 0 2px var(--auth-bg-1), 0 0 0 4px var(--auth-brand); }

.auth { position: relative; min-height: 100vh; min-height: 100dvh; isolation: isolate; }
/* The portals don't load theme.css, so restate its global rule — without it
   .auth-caps (display:flex) shows "Caps Lock is on" while still hidden. */
.auth-page [hidden] { display: none !important; }

/* Photo + darkening overlay, fixed behind everything */
.auth-bg { position: fixed; inset: 0; z-index: -1; background: #0b0c0e; }
.auth-bg-photo {
  position: absolute; inset: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.auth-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,12,14,.72) 0%, rgba(11,12,14,.45) 55%, rgba(11,12,14,.35) 100%),
    linear-gradient(180deg, rgba(11,12,14,.15) 0%, rgba(11,12,14,.55) 100%);
}

.auth-shell {
  min-height: 100vh; min-height: 100dvh;
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; gap: 64px;
}

/* ── Hero copy (left) ───────────────────────────────────── */
.auth-hero { color: #fff; align-self: stretch; display: flex; flex-direction: column; }
.auth-brand { display: inline-flex; align-self: flex-start; border-radius: 6px; }
.auth-brand img { height: 72px; width: auto; display: block; }
.auth-hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; }
.auth-hero-title {
  font-size: clamp(36px, 4.4vw, 60px); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em;
  max-width: 17ch; text-wrap: balance;
}
.auth-hero-sub { margin-top: 16px; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.86); }
.auth-hero-sub span + span::before { content: "|"; margin: 0 8px; color: rgba(255,255,255,.5); }

/* ── Sign-in card (right) ───────────────────────────────── */
.auth-card {
  background: var(--auth-bg-1); color: var(--auth-fg-1);
  border-radius: 12px; padding: 40px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.18);
}
.auth-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auth-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.auth-sub { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--auth-fg-2); }
.auth-icon-btn {
  width: 36px; height: 36px; border: none; border-radius: 6px; background: transparent; cursor: pointer;
  color: var(--auth-fg-2); display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: background 120ms, color 120ms;
}
.auth-icon-btn:hover { background: var(--auth-bg-3); color: var(--auth-fg-1); }
.auth-icon-btn .material-symbols-outlined { font-size: 20px; }

/* Underline fields (label above, single bottom rule) */
.auth-form { margin-top: 32px; display: flex; flex-direction: column; gap: 22px; }
.auth-field > label, .auth-label-row label { display: block; font-size: 13px; font-weight: 500; color: var(--auth-fg-2); }
.auth-field > label { margin-bottom: 2px; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.auth-field:focus-within > label, .auth-field:focus-within .auth-label-row label { color: var(--auth-brand); }
.auth-input {
  width: 100%; height: 40px; padding: 0;
  border: none; border-bottom: 1px solid var(--auth-line-3); border-radius: 0;
  background: transparent; color: var(--auth-fg-1); font: 400 16px/1 var(--auth-font);
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 120ms, box-shadow 120ms;
}
@media (min-width: 769px) { .auth-input { font-size: 15px; } }
.auth-input::placeholder { color: var(--auth-fg-3); }
.auth-input:hover { border-bottom-color: var(--auth-fg-3); }
.auth-input:focus { border-bottom-color: var(--auth-brand); box-shadow: 0 1px 0 0 var(--auth-brand); }
.auth-page .auth-input:focus-visible { box-shadow: 0 1px 0 0 var(--auth-brand); }
.auth-input[aria-invalid="true"] { border-bottom-color: var(--auth-danger); box-shadow: 0 1px 0 0 var(--auth-danger); }
.auth-pw-wrap { position: relative; }
.auth-pw-wrap .auth-input { padding-right: 40px; }
.auth-pw-toggle { position: absolute; right: -6px; top: 2px; }
.auth-link {
  border: none; background: none; padding: 0; cursor: pointer; text-decoration: none;
  color: var(--auth-link); font: 500 12px var(--auth-font); border-radius: 4px;
}
.auth-link:hover { text-decoration: underline; }
.auth-caps { margin-top: 6px; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--auth-warning-fg); }
.auth-caps .material-symbols-outlined { font-size: 14px; }
.auth-msg { font-size: 13px; line-height: 1.5; color: var(--auth-fg-2); }
.auth-msg:empty { display: none; }
.auth-msg.is-error { color: var(--auth-danger-fg); }
.auth-msg.is-success { color: var(--auth-success-fg); }
.auth-msg a { color: inherit; font-weight: 500; }
.auth-submit {
  height: 48px; margin-top: 10px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--auth-brand); color: #fff; font: 600 15px var(--auth-font); letter-spacing: .01em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 1px 2px rgba(15,15,18,.08), inset 0 1px 0 rgba(255,255,255,.12);
  transition: background 120ms;
}
.auth-submit:hover { background: var(--auth-brand-600); }
.auth-submit:active { background: var(--auth-brand-700); }
.auth-submit:disabled { opacity: .65; cursor: progress; }
.auth-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: authSpin .7s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-switch, .auth-help { text-align: center; font-size: 13px; line-height: 1.6; color: var(--auth-fg-2); }
.auth-switch { margin-top: 28px; }
.auth-help { margin-top: 4px; font-size: 12px; color: var(--auth-fg-3); text-wrap: balance; }
.auth-switch a { color: var(--auth-link); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; border-radius: 4px; }
.auth-switch a:hover { text-decoration-thickness: 2px; }
.auth-foot {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--auth-line-1);
  text-align: center; font-size: 12px; color: var(--auth-fg-3);
}

/* ── Tablet: headline over the top of the photo, card below ── */
@media (max-width: 899px) {
  .auth-shell {
    grid-template-columns: 1fr; align-items: start; gap: 24px;
    max-width: 600px; padding: 24px 20px 32px;
  }
  .auth-hero { align-self: auto; }
  .auth-brand img { height: 56px; }
  .auth-hero-body { padding: 32px 0 0; }
  .auth-hero-title { font-size: clamp(30px, 8vw, 48px); max-width: none; }
  .auth-hero-sub { font-size: 13px; margin-top: 10px; }
  .auth-card { padding: 28px 24px; }
}

/* ── Phone: card runs edge to edge down to the bottom ── */
@media (max-width: 599px) {
  .auth-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
  .auth-hero { padding: 20px 20px 24px; }
  .auth-brand img { height: 48px; }
  .auth-hero-body { padding-top: 20px; }
  .auth-hero-title { font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
  .auth-hero-sub { font-size: 12px; }
  .auth-hero-sub span + span::before { margin: 0 6px; }
  .auth-card { flex: 1; border-radius: 16px 16px 0 0; padding: 28px 20px 24px; box-shadow: 0 -8px 32px rgba(0,0,0,.25); }
  .auth-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .auth-spinner { animation-duration: 2s; } }

.auth-bg-photo { background-image: url('../../images/the_pearl.jpg'); }
.auth-theme-glyph { font-size: 16px; line-height: 1; }
