@font-face {
  font-family: Urbanist;
  src: url('/static/fonts/Urbanist-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #1a2744;
  --paper: #fff;
  --muted: #566173;
  --line: #e3e6ec;
  --orange: #f5a623;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--navy);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid #94600c; outline-offset: 3px; }
.auth-card h1[tabindex="-1"]:focus { outline: none; }

.auth-header {
  min-height: 80px;
  padding: 20px clamp(24px, 4vw, 64px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf0f3;
  background: #fff;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: Urbanist, Arial, sans-serif;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1px;
}
.brand img { object-fit: contain; }
.brand-product {
  border-radius: 24px;
  padding: 4px 12px;
  background: #ffdfa5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}
.auth-layout {
  min-height: calc(100svh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 100px);
  padding: 64px clamp(24px, 6vw, 96px);
  background: radial-gradient(ellipse at 90% 0%, #fff1db 0, transparent 50%), linear-gradient(#fff, #f8f9fb);
}
.welcome { min-width: 0; }
.welcome-copy { max-width: 600px; }
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.welcome h2 {
  font-size: clamp(36px, 4.2vw, 56px);
  letter-spacing: -2px;
  line-height: 1.07;
  margin: 0 0 24px;
  font-weight: 650;
}
.welcome-description { font-size: 17px; line-height: 1.75; max-width: 380px; color: var(--muted); margin: 0; }
.welcome-note { margin: 32px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.welcome-note::before { content: ''; display: block; height: 3px; width: 42px; background: var(--orange); margin-bottom: 18px; border-radius: 4px; }
.form-area { display: flex; justify-content: center; min-width: 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 34px; font-weight: 650; line-height: 1.15; letter-spacing: -1px; margin: 0 0 12px; }
.description { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 28px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
input {
  display: block;
  width: 100%;
  min-height: 49px;
  border: 1px solid #c3cad4;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--navy);
  box-shadow: 0 2px 3px #1a274403;
}
input:focus { border-color: var(--navy); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }
.show-password { position: absolute; right: 4px; top: 3px; min-height: 43px; background: none; border: 0; border-radius: 6px; color: var(--navy); padding: 6px 10px; font-size: 13px; font-weight: 600; }
.primary, .secondary { display: block; width: 100%; text-align: center; min-height: 49px; padding: 13px 20px; border: 1px solid transparent; border-radius: 28px; font-size: 15px; font-weight: 650; text-decoration: none; }
.primary { background: var(--orange); color: var(--navy); margin-top: 26px; box-shadow: 0 8px 22px #f5a62326; }
.primary:hover { background: #e99a19; }
.secondary { background: transparent; color: var(--navy); border-color: #c3cad4; margin-top: 20px; }
.secondary:hover { background: #fff1db; }
.text-button { display: block; border: 0; background: none; color: var(--navy); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; margin: 12px auto 0; font-size: 14px; }
.back { margin-top: 24px; }
.hint, .fine-print { font-size: 12px; line-height: 1.6; color: var(--muted); }
.hint { margin: 8px 0 0; }
.fine-print { margin: 22px 0 0; text-align: center; }
.notice { border: 1px solid #c6d4ce; background: #eef4f0; color: #234d3e; border-radius: 10px; padding: 14px 16px; font-size: 14px; margin: 0 0 22px; }
.error { border-color: #d9b5a9; background: #fff0e9; color: #842f23; }
.auth-card [disabled] { cursor: wait; opacity: .65; }
.auth-card form[aria-busy=true] { opacity: .85; }
.hosted-fallback { display: block; text-align: center; min-height: 44px; padding: 12px 0; margin-top: 12px; font-size: 14px; text-underline-offset: 4px; }
a.text-button { text-align: center; padding: 11px 0; }
.onboarding { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onboarding h2 { font-size: 13px; line-height: 1.5; font-weight: 400; color: var(--muted); margin: 0; }
.onboarding-copy { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }
a.invitation-button { display: inline-flex; align-items: center; justify-content: flex-end; width: auto; flex-shrink: 0; min-height: 44px; padding: 10px 0; margin: 0; border: 0; border-radius: 0; background: transparent; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
a.invitation-button:hover { color: #80530b; }

@media (max-width: 760px) {
  .auth-header { padding: 20px 24px; min-height: 76px; }
  .brand { font-size: 25px; gap: 8px; }
  .brand img { width: 34px; height: 32px; }
  .brand-product { font-size: 13px; padding: 4px 10px; }
  .auth-layout { min-height: calc(100svh - 76px); grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 24px 40px; align-content: start; }
  .welcome, .form-area { width: 100%; max-width: 420px; justify-self: center; }
  .welcome h2 { font-size: 33px; letter-spacing: -1.2px; margin-bottom: 14px; }
  .welcome-description { font-size: 14px; line-height: 1.65; }
  .eyebrow { margin-bottom: 14px; }
  .welcome-note { display: none; }
  .auth-card h1 { font-size: 30px; }
  .onboarding { flex-wrap: wrap; gap: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
