/* Shared Lattice auth/onboarding brand layer — cream, teal, coral, editorial type */
:root {
  --auth-paper: #fff8ec;
  --auth-mist: #e9f6f1;
  --auth-ink: #16130f;
  --auth-muted: #5d554c;
  --auth-teal: #0f766e;
  --auth-teal-hover: #115e59;
  --auth-coral: #e7653b;
  --auth-surface: rgba(255, 253, 245, 0.92);
  --auth-border: rgba(22, 19, 15, 0.12);
  --auth-shadow: 0 24px 70px rgba(22, 19, 15, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: 'Manrope', ui-sans-serif, sans-serif;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(231, 101, 59, 0.16), transparent 30rem),
    radial-gradient(circle at 82% 16%, rgba(15, 118, 110, 0.18), transparent 34rem),
    linear-gradient(135deg, var(--auth-paper) 0%, #f8efe0 52%, var(--auth-mist) 100%);
}

.auth-bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(22, 19, 15, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.7;
}

.auth-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.auth-bg-orb--coral {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(231, 101, 59, 0.18), transparent 70%);
}

.auth-bg-orb--teal {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: -60px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.16), transparent 70%);
}

.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-logo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  text-decoration: none;
  color: inherit;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-teal), var(--auth-coral));
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.22);
}

.auth-logo-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.auth-shell {
  width: min(480px, 100%);
  padding: 40px 34px;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(16px);
}

.auth-shell--wide {
  width: min(520px, 100%);
}

.auth-title {
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(32px, 7vw, 46px);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-title span {
  color: var(--auth-teal);
}

.auth-subtitle {
  margin: 14px 0 0;
  color: var(--auth-muted);
  font-size: 14px; /* text-sm */
  line-height: 1.5;
}

.auth-status {
  margin-top: 28px;
  color: var(--auth-teal);
  font-weight: 800;
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 26px;
}

.auth-badge {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.08);
  color: var(--auth-teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px; /* text-sm */
  font-weight: 600; /* semibold/medium weight */
  letter-spacing: normal; /* tracking-normal */
  text-transform: none;
  color: #334155; /* text-slate-700 */
}

.auth-field input {
  width: 100%;
  padding: 8px 12px; /* py-2 px-3 */
  min-height: 44px; /* 44px minimum target sizes */
  border: 1px solid #cbd5e1; /* border-slate-300 */
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.5); /* bg-slate-50/50 */
  color: #1e293b; /* slate-800 text */
  font: inherit;
  font-size: 14px; /* text-sm/text-base input fields */
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* focus transition */
}

.auth-field input:focus {
  outline: none;
  border-color: #3b82f6; /* focus:border-blue-500 */
  background-color: #ffffff; /* focus:bg-white */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); /* focus:ring-2 focus:ring-blue-500/10 */
}

.auth-field input::placeholder {
  color: #94a3b8; /* text-slate-400 placeholder */
}

.auth-btn-primary {
  width: 100%;
  margin-top: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb; /* bg-blue-600 */
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 4px 12px 0 rgba(191, 219, 254, 0.5); /* shadow-sm shadow-blue-200/50 */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-btn-primary:hover:not(:disabled) {
  background: #1d4ed8; /* hover:bg-blue-700 */
  border-color: #1d4ed8;
  transform: translateY(0);
}

.auth-btn-primary:active:not(:disabled) {
  transform: scale(0.98); /* active:scale-[0.98] */
}

.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn-secondary,
.auth-link-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.auth-btn-secondary {
  border: 1px solid #cbd5e1; /* subtle border */
  background: transparent;
  color: #334155; /* lightweight text */
  transition: all 0.2s ease-in-out;
}

.auth-btn-secondary:hover {
  background: rgba(241, 245, 249, 0.5); /* transparent hover bg */
  border-color: #cbd5e1;
  color: #1e293b;
}

.auth-btn-secondary:active {
  transform: scale(0.98);
}

.auth-divider {
  margin-top: 20px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-divider a {
  color: var(--auth-teal);
  font-weight: 700;
  text-decoration: none;
}

.auth-divider a:hover {
  text-decoration: underline;
}

.auth-fallback {
  display: none;
  margin-top: 24px;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-fallback.show {
  display: flex;
}

.auth-ring-bg {
  fill: none;
  stroke: rgba(15, 118, 110, 0.15);
  stroke-width: 6;
}

.auth-ring-fg {
  fill: none;
  stroke: var(--auth-teal);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  transition: stroke-dashoffset 0.6s ease;
}

.auth-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(22, 19, 15, 0.08);
  font-size: 13px;
  color: var(--auth-muted);
}

.auth-step-item:last-child {
  border-bottom: none;
}

.auth-step-item.active {
  color: var(--auth-ink);
}

.auth-step-item.done {
  color: var(--auth-teal);
}

.auth-step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: rgba(22, 19, 15, 0.05);
  flex-shrink: 0;
}

.auth-step-item.active .auth-step-icon {
  background: rgba(15, 118, 110, 0.14);
  color: var(--auth-teal);
}

.auth-step-item.done .auth-step-icon {
  background: rgba(15, 118, 110, 0.12);
  color: var(--auth-teal);
}

.auth-mcp-box {
  background: #16130f;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  margin-bottom: 16px;
}

.auth-mcp-box label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 248, 236, 0.72);
}

.auth-mcp-box code {
  font-size: 12px;
  color: #fff8ec;
  word-break: break-all;
  font-family: 'Courier New', monospace;
}
