/* ============================================================
   Smart Fulfilment — auth pages (login / signup)
   Shared by /login/ and /signup/. Same brand tokens as the
   marketing site, self-contained so the versions stay decoupled.
   ============================================================ */

:root {
  --paper: #fbf7ef;
  --kraft: #f4ede0;
  --card: #ffffff;
  --ink-1: #232842;
  --ink-2: #4a4f68;
  --ink-3: #636880;
  --ink-4: #8e92a6;
  --border: #e6dfd0;
  --border-soft: #eee8db;
  --red: #bf3b2b;
  --red-hover: #a93325;
  --red-tint: #f8e9e5;
  --blue: #27418f;
  --blue-ui: #3a56a8;
  --blue-tint: #e9edf8;
  --navy: #1b2340;
  --radius-btn: 8px;
  --radius-panel: 14px;
  --shadow-soft: 0 1px 1px rgba(35, 40, 66, .04), 0 3px 6px rgba(35, 40, 66, .04), 0 12px 32px rgba(35, 40, 66, .07);
  --shadow-btn: 0 1px 1px rgba(35, 40, 66, .08), 0 3px 2px rgba(35, 40, 66, .04), 0 5px 4px rgba(35, 40, 66, .02);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --airmail: repeating-linear-gradient(-45deg,
      var(--red) 0 12px, var(--paper) 12px 22px,
      var(--blue) 22px 34px, var(--paper) 34px 44px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-1);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  height: 4px;
  background: var(--airmail);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--blue-ui);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.auth-header {
  padding: 20px 24px;
  display: flex;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-1);
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex: none; }
.brand-mark .perf { fill: var(--paper); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

/* ---------- Layout ---------- */

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
  padding: 36px 32px 32px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.15;
}

.auth-sub {
  margin-top: 10px;
  font-size: .9375rem;
  color: var(--ink-3);
}

/* ---------- Form ---------- */

.auth-form { margin-top: 26px; }

.field { margin-bottom: 16px; }

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: .875rem;
  font-weight: 550;
  margin-bottom: 6px;
}
.field-label a { font-size: .8125rem; font-weight: 500; }

.field-input,
.field-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-1);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.field-input::placeholder { color: var(--ink-4); }
.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--blue-ui);
  box-shadow: 0 0 0 3px var(--blue-tint);
}

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4f68' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
  cursor: pointer;
}
.field-select:invalid { color: var(--ink-4); }

.field-hint {
  margin-top: 6px;
  font-size: .8125rem;
  color: var(--ink-3);
}

.password-wrap { position: relative; }
.password-wrap .field-input { padding-right: 46px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--ink-3);
  cursor: pointer;
}
.password-toggle:hover { color: var(--ink-1); }
.password-toggle .eye-off { display: none; }
.password-toggle[aria-pressed="true"] .eye { display: none; }
.password-toggle[aria-pressed="true"] .eye-off { display: block; }

.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 550;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.auth-submit:hover { background: var(--red-hover); transform: translateY(-1px); }

.auth-notice {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--kraft);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}
.auth-notice.is-visible { display: block; }

.auth-alt {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: .9375rem;
  color: var(--ink-3);
}

/* ---------- Footer ---------- */

.auth-footer {
  padding: 24px;
  text-align: center;
}
.auth-footer p {
  font-size: .75rem;
  line-height: 1.6;
  color: var(--ink-4);
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px 26px; }
}
