/* ============================================================================
   GalleryOS — Shared Design System (gos-ui)
   Single source of truth for the SaaS auth, onboarding, and workspace surfaces.
   Tokens mirror the in-app palette (index.html :root) so every surface matches.
   ============================================================================ */

:root {
  color-scheme: light;
  --gos-bg: #EEF0F4;
  --gos-surface: #F8F9FC;
  --gos-surface-muted: #E4E7EE;
  --gos-surface-elevated: #FFFFFF;
  --gos-border: rgba(18, 20, 26, 0.09);
  --gos-border-strong: rgba(18, 20, 26, 0.15);
  --gos-accent: #1B4DFF;
  --gos-accent-hover: #153FE0;
  --gos-accent-soft: rgba(27, 77, 255, 0.11);
  --gos-text-primary: #12141A;
  --gos-text-secondary: rgba(18, 20, 26, 0.62);
  --gos-text-soft: rgba(18, 20, 26, 0.46);
  --gos-danger: #dc2626;
  --gos-danger-soft: rgba(220, 38, 38, 0.10);
  --gos-success: #16a34a;
  --gos-success-soft: rgba(22, 163, 74, 0.12);
  --gos-warning: #d97706;
  --gos-warning-soft: rgba(217, 119, 6, 0.12);

  --gos-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gos-ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --gos-duration-fast: 180ms;
  --gos-duration-medium: 360ms;
  --gos-duration-slow: 520ms;

  --gos-shadow-card: 0 1px 2px rgba(18, 24, 40, 0.04), 0 4px 20px -8px rgba(18, 24, 40, 0.10);
  --gos-shadow-elevated: 0 2px 10px rgba(18, 24, 40, 0.05), 0 16px 40px -14px rgba(18, 24, 40, 0.14);
  --gos-hover-fill: rgba(18, 20, 26, 0.04);
  --gos-hover-fill-strong: rgba(18, 20, 26, 0.07);

  --gos-radius-sm: 8px;
  --gos-radius-md: 12px;
  --gos-radius-lg: 18px;
  --gos-radius-xl: 26px;
  --gos-radius-full: 999px;

  --gos-space-1: 4px;
  --gos-space-2: 8px;
  --gos-space-3: 12px;
  --gos-space-4: 16px;
  --gos-space-5: 20px;
  --gos-space-6: 24px;
  --gos-space-8: 32px;
  --gos-space-10: 40px;
  --gos-space-12: 48px;

  --gos-text-xs: 11px;
  --gos-text-sm: 13px;
  --gos-text-base: 14px;
  --gos-text-lg: 16px;
  --gos-text-xl: 20px;
  --gos-text-2xl: 26px;
  --gos-text-3xl: 34px;

  --gos-font: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gos-brand-intro-exit: 520ms;
  --gos-dashboard-border: var(--gos-border);
  --gos-dashboard-surface: var(--gos-surface-elevated);

  /* Navigation shell — keep in sync with @media (min-width: 1024px) in gos-nav.css / gos-shell.css */
  --gos-nav-width-expanded: 17rem;
  --gos-nav-width-rail: 3.5rem;
  --gos-nav-item-height: 2.5rem;
  --gos-nav-group-gap: 0.75rem;
  --gos-nav-active-indicator: 3px;
  --gos-breakpoint-lg: 1024px;
}

.dark {
  color-scheme: dark;
  --gos-bg: #000000;
  --gos-surface: #0a0a0a;
  --gos-surface-muted: rgba(255, 255, 255, 0.05);
  --gos-surface-elevated: rgba(255, 255, 255, 0.03);
  --gos-border: rgba(255, 255, 255, 0.08);
  --gos-border-strong: rgba(255, 255, 255, 0.16);
  --gos-accent-soft: rgba(27, 77, 255, 0.18);
  --gos-text-primary: #ffffff;
  --gos-text-secondary: rgba(255, 255, 255, 0.60);
  --gos-text-soft: rgba(255, 255, 255, 0.45);
  --gos-danger-soft: rgba(220, 38, 38, 0.18);
  --gos-success-soft: rgba(22, 163, 74, 0.18);
  --gos-warning-soft: rgba(217, 119, 6, 0.18);
  --gos-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 40px -28px rgba(0, 0, 0, 0.18);
  --gos-shadow-elevated: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 20px 48px -24px rgba(0, 0, 0, 0.45);
  --gos-hover-fill: rgba(255, 255, 255, 0.04);
  --gos-hover-fill-strong: rgba(255, 255, 255, 0.07);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; letter-spacing: -0.01em; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--gos-font);
  font-size: var(--gos-text-base);
  color: var(--gos-text-primary);
  background: var(--gos-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--gos-accent); text-decoration: none; }
a:hover { color: var(--gos-accent-hover); }
:focus-visible { outline: 2px solid var(--gos-accent); outline-offset: 2px; border-radius: 6px; }

.gos-muted { color: var(--gos-text-secondary); }
.gos-soft { color: var(--gos-text-soft); }

/* ---------- Typography ---------- */
.gos-h1 { font-size: var(--gos-text-3xl); font-weight: 600; line-height: 1.1; margin: 0; }
.gos-h2 { font-size: var(--gos-text-2xl); font-weight: 600; line-height: 1.15; margin: 0; }
.gos-h3 { font-size: var(--gos-text-xl); font-weight: 600; margin: 0; }
.gos-label {
  font-size: var(--gos-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gos-text-secondary);
}

/* ---------- Brand mark ---------- */
.gos-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--gos-text-lg); color: var(--gos-text-primary); text-decoration: none; }
.gos-brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--gos-text-primary); color: var(--gos-bg);
  font-weight: 700; font-size: 15px;
}
.gos-brand__mark--accent { background: var(--gos-accent); color: #fff; }
.gos-brand__icon {
  width: 24px; height: 24px; border-radius: 6px;
  flex: 0 0 auto; display: grid; place-items: center; overflow: hidden;
}
.gos-brand__icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gos-brand__wordmark {
  font-weight: 600; letter-spacing: -0.04em; font-size: 14px; line-height: 1;
  color: var(--gos-text-primary);
}
.gos-brand__wordmark-muted { opacity: 0.5; }

/* ---------- Buttons ---------- */
.gos-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; font-size: var(--gos-text-base); font-weight: 500; font-family: inherit;
  border-radius: var(--gos-radius-sm); border: 1px solid transparent; cursor: pointer;
  transition: background-color var(--gos-duration-fast), border-color var(--gos-duration-fast), transform var(--gos-duration-fast), opacity var(--gos-duration-fast);
  white-space: nowrap;
}
.gos-btn:active { transform: translateY(0.5px); }
.gos-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.gos-btn--block { width: 100%; }
.gos-btn--lg { padding: 13px 20px; font-size: var(--gos-text-lg); }
.gos-btn--sm { padding: 7px 12px; font-size: var(--gos-text-sm); }

.gos-btn-primary { color: #fff; background: var(--gos-accent); box-shadow: 0 1px 2px rgba(0,0,0,0.10); }
.gos-btn-primary:hover:not(:disabled) { background: var(--gos-accent-hover); }

.gos-btn-ghost { color: var(--gos-text-secondary); background: transparent; border-color: var(--gos-border-strong); }
.gos-btn-ghost:hover:not(:disabled) { color: var(--gos-text-primary); background: var(--gos-hover-fill); }

.gos-btn-danger { color: #fff; background: var(--gos-danger); }
.gos-btn-danger:hover:not(:disabled) { background: #b91c1c; }

.gos-btn-subtle { color: var(--gos-text-secondary); background: var(--gos-surface-muted); }
.gos-btn-subtle:hover:not(:disabled) { color: var(--gos-text-primary); background: var(--gos-hover-fill-strong); }

/* ---------- Form fields ---------- */
.gos-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--gos-space-4); }
.gos-field--password { position: relative; }
.gos-forgot-link {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 12px;
  color: var(--gos-accent);
  text-decoration: none;
}
.gos-forgot-link:hover { text-decoration: underline; }
.gos-field__label { font-size: var(--gos-text-sm); font-weight: 600; color: var(--gos-text-primary); }
.gos-field__hint { font-size: var(--gos-text-xs); color: var(--gos-text-soft); }
.gos-field__error { font-size: var(--gos-text-xs); color: var(--gos-danger); min-height: 14px; }

.gos-input, .gos-select, .gos-textarea {
  width: 100%; padding: 11px 13px;
  font-family: inherit; font-size: var(--gos-text-base); color: var(--gos-text-primary);
  background: var(--gos-surface); border: 1px solid var(--gos-border-strong); border-radius: var(--gos-radius-sm);
  transition: border-color var(--gos-duration-fast), box-shadow var(--gos-duration-fast), background-color var(--gos-duration-fast);
}
.gos-input::placeholder, .gos-textarea::placeholder { color: var(--gos-text-soft); }
.gos-input:focus, .gos-select:focus, .gos-textarea:focus {
  outline: none; border-color: var(--gos-accent); box-shadow: 0 0 0 3px var(--gos-accent-soft);
}
.gos-input--invalid { border-color: var(--gos-danger); }
.gos-textarea { resize: vertical; min-height: 90px; }

.gos-input-group { position: relative; }
.gos-input-group .gos-input { padding-right: 42px; }
.gos-input-group__btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; cursor: pointer; color: var(--gos-text-soft);
  padding: 6px; border-radius: 6px; display: grid; place-items: center;
}
.gos-input-group__btn:hover { color: var(--gos-text-primary); background: var(--gos-hover-fill); }

/* slug / prefixed input */
.gos-prefixed { display: flex; align-items: stretch; border: 1px solid var(--gos-border-strong); border-radius: var(--gos-radius-sm); overflow: hidden; background: var(--gos-surface); }
.gos-prefixed:focus-within { border-color: var(--gos-accent); box-shadow: 0 0 0 3px var(--gos-accent-soft); }
.gos-prefixed__addon { display: flex; align-items: center; padding: 0 12px; background: var(--gos-surface-muted); color: var(--gos-text-soft); font-size: var(--gos-text-sm); border-right: 1px solid var(--gos-border); }
.gos-prefixed .gos-input { border: 0; box-shadow: none; background: transparent; }
.gos-prefixed .gos-input:focus { box-shadow: none; }

/* ---------- Cards / panels ---------- */
.gos-card {
  background: var(--gos-surface); border: 1px solid var(--gos-border);
  border-radius: var(--gos-radius-lg); box-shadow: var(--gos-shadow-card);
}
.gos-card--pad { padding: var(--gos-space-6); }

/* ---------- Alerts ---------- */
.gos-alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--gos-radius-sm); font-size: var(--gos-text-sm);
  border: 1px solid transparent;
}
.gos-alert--error { background: var(--gos-danger-soft); color: var(--gos-danger); border-color: rgba(220,38,38,0.25); }
.gos-alert--success { background: var(--gos-success-soft); color: var(--gos-success); border-color: rgba(22,163,74,0.25); }
.gos-alert--info { background: var(--gos-accent-soft); color: var(--gos-accent); border-color: color-mix(in srgb, var(--gos-accent) 28%, transparent); }
.gos-alert--warning { background: var(--gos-warning-soft); color: var(--gos-warning); border-color: rgba(217,119,6,0.25); }

/* ---------- Badges / role pills ---------- */
.gos-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--gos-radius-full);
  font-size: var(--gos-text-xs); font-weight: 600; text-transform: capitalize;
  background: var(--gos-surface-muted); color: var(--gos-text-secondary);
}
.gos-pill--owner { background: rgba(124,58,237,0.14); color: #7c3aed; }
.gos-pill--admin { background: var(--gos-accent-soft); color: var(--gos-accent); }
.gos-pill--editor { background: var(--gos-success-soft); color: var(--gos-success); }
.gos-pill--viewer { background: var(--gos-surface-muted); color: var(--gos-text-secondary); }
.gos-pill--pending { background: var(--gos-warning-soft); color: var(--gos-warning); }

/* ---------- Avatar ---------- */
.gos-avatar {
  width: 36px; height: 36px; border-radius: var(--gos-radius-full);
  display: grid; place-items: center; flex: 0 0 auto;
  background: var(--gos-accent); color: #fff; font-weight: 600; font-size: var(--gos-text-sm);
  overflow: hidden;
}
.gos-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gos-avatar--lg { width: 56px; height: 56px; font-size: var(--gos-text-lg); }

/* ---------- Spinner ---------- */
.gos-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: gos-spin var(--gos-spinner-speed, 0.7s) linear infinite; display: inline-block;
}
@keyframes gos-spin { to { transform: rotate(360deg); } }

/* ---------- Auth page — photo wall + quiet form ---------- */
.gos-auth-page {
  --gos-auth-brand: 'Syne', system-ui, sans-serif;
  --gos-auth-ui: 'Figtree', system-ui, sans-serif;
  --gos-font: var(--gos-auth-ui);
  min-height: 100dvh;
  background: var(--gos-bg);
  overflow-x: hidden;
  font-family: var(--gos-auth-ui);
}
html.dark .gos-auth-page { background: #050505; }
.gos-auth-canvas {
  position: relative;
  min-height: 100dvh;
  isolation: isolate;
}

.gos-auth-chrome {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 60;
}
.gos-auth-theme-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--gos-border);
  background: color-mix(in srgb, var(--gos-surface-elevated) 92%, transparent);
  color: var(--gos-text-secondary);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--gos-shadow-card);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), color 180ms, background 180ms;
}
.gos-auth-theme-btn:hover { color: var(--gos-text-primary); transform: scale(1.04); }
html.dark .gos-auth-theme-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 20, 0.9);
  color: rgba(255, 255, 255, 0.65);
}
html.dark .gos-auth-theme-btn:hover { color: #fff; }
.gos-auth-theme-btn .is-hidden { display: none; }

.gos-auth-splash {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0c0b;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), visibility 520ms;
}
.gos-auth-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.gos-auth-splash__mark {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
}
.gos-auth-splash__mark img { width: 2.15rem; height: 2.15rem; display: block; }
.gos-auth-splash__wordmark {
  margin: 0;
  font-family: var(--gos-auth-brand);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
}
.gos-auth-splash__wordmark span { color: rgba(255, 255, 255, 0.4); }
.gos-auth-page.gos-auth-ready .gos-auth-splash,
.gos-auth-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gos-auth-page.gos-auth-pending .gos-auth-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gos-auth-shell {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  transition: opacity 580ms cubic-bezier(0.22, 1, 0.36, 1), visibility 580ms;
}
.gos-auth-page.gos-auth-ready .gos-auth-shell {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.gos-auth-page.gos-auth-ready--instant .gos-auth-shell { transition-duration: 0ms; }

.gos-auth-frame {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--gos-bg);
}
html.dark .gos-auth-frame { background: #050505; }
@media (min-width: 960px) {
  .gos-auth-frame {
    grid-template-columns: minmax(0, 1.15fr) minmax(400px, 0.85fr);
  }
}

.gos-auth-page.gos-auth-shake .gos-auth-panel__inner {
  animation: gos-auth-shake 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes gos-auth-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.gos-auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 42vw;
  max-height: 46vh;
  overflow: hidden;
  background: #121211;
  color: #fff;
}
@media (min-width: 960px) {
  .gos-auth-showcase {
    min-height: 100dvh;
    max-height: none;
    justify-content: space-between;
  }
}
.gos-auth-showcase__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: gos-auth-photo-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
@keyframes gos-auth-photo-in {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1.04); }
}
.gos-auth-showcase__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 7, 0.35) 0%, rgba(8, 8, 7, 0.15) 35%, rgba(8, 8, 7, 0.72) 100%),
    linear-gradient(90deg, rgba(8, 8, 7, 0.25) 0%, transparent 45%);
  pointer-events: none;
}
.gos-auth-showcase__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
  padding: 1.15rem 1.25rem 1.35rem;
}
@media (min-width: 960px) {
  .gos-auth-showcase__content {
    padding: clamp(2rem, 4vw, 3.25rem);
  }
}
.gos-auth-showcase__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  color: #fff;
  text-decoration: none;
  font-family: var(--gos-auth-brand);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.gos-auth-showcase__brand img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 7px;
  background: #fff;
  padding: 3px;
}
.gos-auth-showcase__brand-muted { color: rgba(255, 255, 255, 0.45); }
.gos-auth-showcase__hero {
  max-width: 22rem;
  padding-bottom: 0.25rem;
}
@media (max-width: 959px) {
  .gos-auth-showcase__hero { display: none; }
  .gos-auth-showcase {
    min-height: 0;
    max-height: none;
    flex-direction: row;
    align-items: center;
    background: #0f0f0e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .gos-auth-showcase__photo,
  .gos-auth-showcase__veil { display: none; }
  .gos-auth-showcase__content {
    flex-direction: row;
    align-items: center;
    height: auto;
    padding: 1rem 1.25rem;
    padding-right: 4.5rem;
  }
}
.gos-auth-showcase__brand-hero {
  margin: 0;
  font-family: var(--gos-auth-brand);
  font-size: clamp(3.75rem, 7.5vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
  color: #fff;
}
.gos-auth-showcase__brand-hero span { color: rgba(255, 255, 255, 0.38); }
.gos-auth-showcase__copy {
  margin: 1.1rem 0 0;
  max-width: 28ch;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

.gos-auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  min-width: 0;
  background: var(--gos-surface-elevated);
}
html.dark .gos-auth-panel { background: #050505; }
.gos-auth-panel__inner {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.gos-auth-panel__inner.is-exiting {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.gos-auth-panel__inner.is-entering {
  opacity: 0;
  transform: translateY(12px);
}

.gos-auth-switch {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--gos-border);
}
html.dark .gos-auth-switch { border-bottom-color: rgba(255, 255, 255, 0.1); }
.gos-auth-switch__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gos-text-soft);
  text-decoration: none;
  transition: color 180ms;
}
html.dark .gos-auth-switch__btn { color: rgba(255, 255, 255, 0.4); }
.gos-auth-switch__btn:hover { color: var(--gos-text-primary); }
html.dark .gos-auth-switch__btn:hover { color: #fff; }
.gos-auth-switch__btn.is-active {
  color: var(--gos-text-primary);
  font-weight: 700;
}
html.dark .gos-auth-switch__btn.is-active { color: #fff; }
.gos-auth-switch__btn.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--gos-text-primary);
  border-radius: 2px;
}
html.dark .gos-auth-switch__btn.is-active::after { background: #fff; }

.gos-auth__head { margin-bottom: 1.75rem; }
.gos-auth__head h1 {
  margin: 0;
  font-family: var(--gos-auth-brand);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--gos-text-primary);
}
html.dark .gos-auth__head h1 { color: #fff; }
.gos-auth__head p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--gos-text-secondary);
}
html.dark .gos-auth__head p { color: rgba(255, 255, 255, 0.55); }

.gos-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.gos-auth-field + .gos-auth-field { margin-top: 1.1rem; }
.gos-auth-field__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gos-text-secondary);
}
html.dark .gos-auth-field__label { color: rgba(255, 255, 255, 0.55); }
.gos-auth-field__control {
  position: relative;
  display: flex;
  align-items: center;
}
.gos-auth-field__icon { display: none; }
.gos-auth-field__input {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.975rem;
  color: var(--gos-text-primary);
  background: var(--gos-surface-muted);
  border: 1px solid transparent;
  border-radius: 12px;
  outline: none;
  transition: background 180ms, border-color 180ms, box-shadow 180ms;
}
.gos-auth-field--password .gos-auth-field__input { padding-right: 2.85rem; }
html.dark .gos-auth-field__input {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.gos-auth-field__input::placeholder { color: var(--gos-text-soft); }
html.dark .gos-auth-field__input::placeholder { color: rgba(255, 255, 255, 0.3); }
.gos-auth-field__input:hover { background: color-mix(in srgb, var(--gos-surface-muted) 70%, var(--gos-text-primary) 6%); }
html.dark .gos-auth-field__input:hover { background: rgba(255, 255, 255, 0.07); }
.gos-auth-field__input:focus {
  background: var(--gos-surface-elevated);
  border-color: var(--gos-accent);
  box-shadow: 0 0 0 4px var(--gos-accent-soft);
}
html.dark .gos-auth-field__input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--gos-accent);
}
.gos-auth-field__input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.gos-auth-field__action {
  position: absolute;
  right: 0.3rem;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--gos-text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
html.dark .gos-auth-field__action { color: rgba(255, 255, 255, 0.4); }
.gos-auth-field__action:hover {
  color: var(--gos-text-primary);
  background: var(--gos-hover-fill);
}
html.dark .gos-auth-field__action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.gos-auth-field__hint {
  font-size: 0.75rem;
  color: var(--gos-text-soft);
  line-height: 1.4;
}
html.dark .gos-auth-field__hint { color: rgba(255, 255, 255, 0.4); }
.gos-auth-field__hint.is-error { color: #b91c1c; }
html.dark .gos-auth-field__hint.is-error { color: #fecaca; }
.gos-auth-field__hint[hidden] { display: none; }

.gos-auth-page .gos-forgot-link {
  position: static;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gos-accent);
  text-decoration: none;
}
.gos-auth-page .gos-forgot-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.gos-auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.05rem;
  flex-wrap: wrap;
}
.gos-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--gos-text-secondary);
  user-select: none;
}
html.dark .gos-auth-remember { color: rgba(255, 255, 255, 0.55); }
.gos-auth-remember input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gos-accent);
}

.gos-auth-submit {
  width: 100%;
  margin-top: 1.5rem;
  min-height: 52px;
  font-size: 0.975rem;
  font-weight: 650;
  font-family: inherit;
  color: #fff;
  background: var(--gos-text-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms, opacity 180ms;
}
.gos-auth-submit:not(:disabled):hover {
  background: var(--gos-accent);
  transform: translateY(-1px);
  color: #fff;
}
html.dark .gos-auth-submit {
  background: #fff;
  color: #111;
}
html.dark .gos-auth-submit:not(:disabled):hover {
  background: var(--gos-accent);
  color: #fff;
}
.gos-auth-submit:not(:disabled):active { transform: translateY(0); }
.gos-auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.gos-auth-error {
  display: none;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.16);
}
.gos-auth-error.is-visible { display: flex; }
html.dark .gos-auth-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.25);
}

.gos-auth-success-card {
  text-align: center;
  padding: 1.1rem 0.5rem 0.25rem;
}
.gos-auth-success-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.18);
  animation: gos-auth-check-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.gos-auth-success-card__icon--info {
  color: var(--gos-accent);
  background: var(--gos-accent-soft);
  border-color: color-mix(in srgb, var(--gos-accent) 22%, transparent);
}
.gos-auth-success-card__icon--danger {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.18);
}
@keyframes gos-auth-check-in {
  from { opacity: 0; transform: scale(0.75); }
  to { opacity: 1; transform: scale(1); }
}

.gos-auth__foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gos-text-secondary);
}
html.dark .gos-auth__foot { color: rgba(255, 255, 255, 0.5); }
.gos-auth__foot a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}
.gos-auth__legal {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--gos-text-soft);
}
html.dark .gos-auth__legal { color: rgba(255, 255, 255, 0.35); }

.gos-auth-invite-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--gos-text-secondary);
  background: var(--gos-surface-muted);
}
html.dark .gos-auth-invite-meta {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.05);
}
.gos-auth-invite-meta strong { color: var(--gos-text-primary); font-weight: 600; }
html.dark .gos-auth-invite-meta strong { color: #fff; }

.gos-auth-stagger { opacity: 0; }
.gos-auth-page.gos-auth-ready .gos-auth-stagger {
  opacity: 1;
  animation: gos-auth-stagger-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(0.1s + var(--auth-i, 0) * 0.045s);
}
.gos-auth-page.gos-auth-ready--instant .gos-auth-stagger {
  opacity: 1;
  animation: none;
}
@keyframes gos-auth-stagger-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gos-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--gos-text-soft);
  font-size: 11px;
}
.gos-auth__divider::before, .gos-auth__divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--gos-border);
}

@media (prefers-reduced-motion: reduce) {
  .gos-auth-showcase__photo,
  .gos-auth-page.gos-auth-ready .gos-auth-stagger,
  .gos-auth-success-card__icon {
    animation: none !important;
  }
  .gos-auth-showcase__photo { transform: none; }
  .gos-auth-stagger { opacity: 1; }
}

.gos-auth { display: contents; }
.gos-auth__aside { display: none; }
.gos-auth__main { display: contents; }
.gos-auth__panel { display: contents; }
.gos-auth-chrome__pill,
.gos-auth-trust,
.gos-auth__eyebrow,
.gos-auth-tabs { display: none; }

/* ---------- Onboarding stepper ---------- */
.gos-onboard { min-height: 100vh; display: flex; flex-direction: column; }
.gos-onboard__bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--gos-border); }
.gos-onboard__body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: var(--gos-space-10) var(--gos-space-5); }
.gos-onboard__panel { width: 100%; max-width: 560px; }
.gos-stepper { display: flex; align-items: center; gap: 8px; margin-bottom: var(--gos-space-8); }
.gos-step { display: flex; align-items: center; gap: 8px; }
.gos-step__dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--gos-text-xs); font-weight: 700;
  background: var(--gos-surface-muted); color: var(--gos-text-soft); border: 1px solid var(--gos-border);
}
.gos-step.is-active .gos-step__dot { background: var(--gos-accent); color: #fff; border-color: var(--gos-accent); }
.gos-step.is-done .gos-step__dot { background: var(--gos-success); color: #fff; border-color: var(--gos-success); }
.gos-step__label { font-size: var(--gos-text-sm); color: var(--gos-text-secondary); }
.gos-step.is-active .gos-step__label { color: var(--gos-text-primary); font-weight: 600; }
.gos-step__line { width: 28px; height: 2px; background: var(--gos-border); border-radius: 2px; }

/* swatches */
.gos-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.gos-swatch { width: 34px; height: 34px; border-radius: 9px; cursor: pointer; border: 2px solid transparent; box-shadow: var(--gos-shadow-card); transition: transform var(--gos-duration-fast); }
.gos-swatch:hover { transform: scale(1.08); }
.gos-swatch.is-selected { border-color: var(--gos-text-primary); }

/* selectable cards (currency/region) */
.gos-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gos-choice {
  text-align: left; padding: 13px 14px; border-radius: var(--gos-radius-md);
  border: 1px solid var(--gos-border-strong); background: var(--gos-surface); cursor: pointer;
  transition: border-color var(--gos-duration-fast), background-color var(--gos-duration-fast);
}
.gos-choice:hover { background: var(--gos-hover-fill); }
.gos-choice.is-selected { border-color: var(--gos-accent); background: var(--gos-accent-soft); }
.gos-choice__title { font-weight: 600; font-size: var(--gos-text-base); }
.gos-choice__sub { font-size: var(--gos-text-xs); color: var(--gos-text-soft); margin-top: 2px; }

/* role radio cards */
.gos-role-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--gos-radius-md); border: 1px solid var(--gos-border-strong); cursor: pointer; transition: border-color var(--gos-duration-fast), background var(--gos-duration-fast); }
.gos-role-card:hover { background: var(--gos-hover-fill); }
.gos-role-card.is-selected { border-color: var(--gos-accent); background: var(--gos-accent-soft); }
.gos-role-card__title { font-weight: 600; }
.gos-role-card__desc { font-size: var(--gos-text-xs); color: var(--gos-text-soft); margin-top: 2px; }

/* ---------- Toast ---------- */
.gos-toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.gos-toast {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--gos-radius-md);
  background: var(--gos-text-primary); color: var(--gos-bg); box-shadow: var(--gos-shadow-elevated);
  font-size: var(--gos-text-sm); max-width: 360px;
  animation: gos-toast-in var(--gos-duration-medium) var(--gos-ease-spring);
}
@keyframes gos-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Utilities ---------- */
.gos-stack-2 > * + * { margin-top: var(--gos-space-2); }
.gos-stack-4 > * + * { margin-top: var(--gos-space-4); }
.gos-row { display: flex; align-items: center; gap: var(--gos-space-3); }
.gos-row--between { justify-content: space-between; }
.gos-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gos-space-3); }
@media (max-width: 520px) { .gos-grid-2 { grid-template-columns: 1fr; } }
.gos-fade-in { animation: gos-fade var(--gos-duration-medium) var(--gos-ease-out); }
@keyframes gos-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.gos-hidden { display: none !important; }
.gos-text-center { text-align: center; }
.gos-mt-2 { margin-top: var(--gos-space-2); }
.gos-mt-4 { margin-top: var(--gos-space-4); }
.gos-mt-6 { margin-top: var(--gos-space-6); }
.gos-w-full { width: 100%; }

/* ---------- Password strength meter ---------- */
.gos-strength { display: flex; gap: 5px; margin-top: 7px; }
.gos-strength__bar { height: 4px; flex: 1; border-radius: 2px; background: var(--gos-border); transition: background var(--gos-duration-fast); }
.gos-strength__bar.is-on-1 { background: var(--gos-danger); }
.gos-strength__bar.is-on-2 { background: var(--gos-warning); }
.gos-strength__bar.is-on-3 { background: #eab308; }
.gos-strength__bar.is-on-4 { background: var(--gos-success); }
