@import url("tokens.css?v=0eef580");

/* ------------------------------------------------------------------ */
/* Field                                                               */
/* ------------------------------------------------------------------ */

* { box-sizing: border-box; }

html, body { height: 100%; }

html {
  /* App-wide scale: 14px root (about 12% smaller than the 16px default),
     per the plan-v2 mock. */
  font-size: 14px;
  scrollbar-color: #2c4064 var(--navy-950);
  overflow-x: hidden;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--navy-950);
  background-image:
    radial-gradient(80rem 42rem at 8% -10%, rgba(143, 179, 172, 0.2), transparent 55%),
    radial-gradient(60rem 36rem at 110% 0%, rgba(36, 54, 86, 0.32), transparent 52%),
    radial-gradient(48rem 32rem at 70% 120%, rgba(237, 228, 208, 0.14), transparent 46%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 46%, var(--navy-950) 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 36% at 22% 30%, rgba(143, 179, 172, 0.22), transparent 62%),
    radial-gradient(32% 34% at 82% 18%, rgba(36, 54, 86, 0.3), transparent 60%),
    radial-gradient(28% 28% at 64% 82%, rgba(237, 228, 208, 0.16), transparent 62%);
  animation: aurora-drift 26s var(--ease) infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("../img/grain.png");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

.pointer-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(18rem 18rem at var(--px, 50vw) var(--py, 38vh), rgba(143, 179, 172, 0.22), transparent 70%);
  mix-blend-mode: screen;
}

::selection { background: rgba(143, 179, 172, 0.28); color: #fff; }

.hidden { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a { color: var(--color-link); }

h1, h2, .brand-word, .home-greeting, .business-name, .auth-title {
  font-family: var(--font-display);
}

h1 {
  margin: 0 0 0.45rem;
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: var(--track-tight);
  line-height: 1.05;
}

.subtitle {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--color-text-secondary);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.button-primary,
.button-secondary,
.button-ghost,
.login-button {
  --mx: 0px;
  --my: 0px;
  --ms: 1;
  appearance: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform: translate3d(var(--mx), var(--my), 0) scale(var(--ms));
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur-fast) var(--ease);
}

.button-primary,
.login-button {
  color: #1b2a47;
  background: #ede4d0;
  border-color: #ede4d0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.button-secondary {
  color: var(--color-cream);
  background: transparent;
  border-color: var(--color-sea);
}

.button-ghost {
  color: var(--color-ice);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.button-primary::after,
.login-button::after,
.button-secondary::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 42%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-20%);
  opacity: 0;
  pointer-events: none;
}

.button-primary:hover:not(:disabled),
.login-button:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px #8fb3ac,
    0 0 28px rgba(143, 179, 172, 0.55);
}

.button-primary:hover:not(:disabled)::after,
.login-button:hover:not(:disabled)::after,
.button-secondary:hover::after {
  opacity: 1;
  transform: translateX(320%);
  transition: transform 0.7s var(--ease), opacity 0.2s linear;
}

.button-secondary:hover {
  color: var(--color-cream);
  background: rgba(143, 179, 172, 0.12);
}

.button-ghost:hover {
  background: rgba(143, 179, 172, 0.1);
  color: #fff;
}

.button-primary:active:not(:disabled),
.button-secondary:active,
.button-ghost:active,
.login-button:active:not(:disabled) {
  --ms: 0.97;
}

.button-primary:disabled,
.login-button:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.button-small {
  min-height: 2.15rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.button-danger-text { color: var(--color-danger); }

.button-primary:focus-visible,
.button-secondary:focus-visible,
.button-ghost:focus-visible,
.login-button:focus-visible,
.icon-button:focus-visible,
.account-button:focus-visible,
.tab:focus-visible,
.filter:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(143, 179, 172, 0.22);
}

.icon-button {
  appearance: none;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-left: 0.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.icon-button svg { width: 17px; height: 17px; display: block; margin: auto; }

/* ------------------------------------------------------------------ */
/* Chrome                                                              */
/* ------------------------------------------------------------------ */

body.booting main,
body.booting #app-header,
body.booting .landing-field { visibility: hidden; }

.boot-veil { display: none; }

body.booting .boot-veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(22, 33, 58, 0.28);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem max(1.1rem, calc((100vw - 76rem) / 2));
  color: var(--color-text);
  background: rgba(27, 42, 71, 0.62);
  border-bottom: 1px solid rgba(143, 179, 172, 0.16);
  box-shadow: 0 16px 40px -28px rgba(3, 12, 48, 0.9);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
}

.brand-word {
  font-family: "Jost", var(--font-sans);
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  color: var(--color-cream);
}

.shell {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.title-row .subtitle { margin-bottom: 0; max-width: 44rem; }

.avatar {
  --size: 32px;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(143, 179, 172, 0.35), rgba(30, 61, 150, 0.8));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-initial {
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.42);
  font-weight: 700;
  color: #fff;
}

/* Account menu */

.account { position: relative; margin-left: auto; }

.account-button {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.22rem 0.7rem 0.22rem 0.22rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(143, 179, 172, 0.28);
  background: rgba(27, 42, 71, 0.55);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  background: rgba(36, 54, 86, 0.72);
  border-color: rgba(143, 179, 172, 0.55);
  box-shadow: 0 0 24px -10px rgba(143, 179, 172, 0.8);
}

.account-name-label {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.8;
  transition: transform var(--dur) var(--ease);
}

.account-button[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  z-index: 30;
  min-width: 16.5rem;
  padding: 0.45rem;
  border-radius: 18px;
  background: rgba(22, 33, 58, 0.82);
  border: 1px solid rgba(143, 179, 172, 0.2);
  box-shadow: var(--shadow-dialog);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  opacity: 0;
  visibility: hidden;
  translate: 0 -8px;
  scale: 0.96;
  transform-origin: top right;
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease), scale var(--dur) var(--ease), visibility var(--dur);
}

.account-menu.is-open {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  scale: 1;
}

.account-identity {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.65rem 0.75rem 0.7rem;
}

.account-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.account-email { font-size: 0.78rem; color: var(--color-text-secondary); }

.account-identity .badge { margin: 0.4rem 0 0; align-self: flex-start; }

.account-sep {
  height: 1px;
  margin: 0.3rem 0.4rem;
  background: linear-gradient(90deg, transparent, rgba(143, 179, 172, 0.35), transparent);
}

.account-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.58rem 0.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.account-item:hover,
.account-item:focus-visible {
  background: linear-gradient(90deg, rgba(143, 179, 172, 0.18), rgba(143, 179, 172, 0.04));
  color: #fff;
  outline: none;
}

/* ------------------------------------------------------------------ */
/* Landing                                                             */
/* ------------------------------------------------------------------ */

.landing-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.landing-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding:
    max(8vh, env(safe-area-inset-top))
    max(1.5rem, env(safe-area-inset-right))
    max(18vh, env(safe-area-inset-bottom))
    max(1.5rem, env(safe-area-inset-left));
  text-align: center;
}

.lockup-mark-wrap,
.wordmark-row,
.lockup-legal,
#landing-tagline,
#auth-login,
#auth-pending,
#auth-error {
  animation: hero-in var(--dur-hero) var(--ease) both;
}

.wordmark-row { animation-delay: 0.14s; }
.lockup-legal { animation-delay: 0.26s; }
#landing-tagline { animation-delay: 0.38s; }
#auth-login,
#auth-pending,
#auth-error { animation-delay: 0.5s; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

.wordmark-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.lockup-mark-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.15rem;
}

.lockup-mark {
  display: block;
  width: min(46vw, 210px);
  height: auto;
}

/* A soft diagonal beam, taller and wider than the viewport, parked fully
   off the right edge until it travels. The gradient is transparent at both
   ends, so the element's box never draws a line. */
.hero-beam {
  position: fixed;
  top: -30vh;
  left: 0;
  z-index: 3;
  width: 62vw;
  height: 160vh;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: linear-gradient(
    108deg,
    transparent 0%,
    transparent 18%,
    rgba(143, 179, 172, 0.03) 34%,
    rgba(237, 228, 208, 0.07) 46%,
    rgba(237, 228, 208, 0.12) 50%,
    rgba(143, 179, 172, 0.06) 54%,
    rgba(143, 179, 172, 0.02) 66%,
    transparent 82%,
    transparent 100%
  );
  filter: blur(18px);
  transform: translate3d(130vw, 0, 0);
  animation: hero-beam 16s ease-in-out infinite;
}

@keyframes hero-beam {
  0%, 14% { opacity: 0; transform: translate3d(130vw, 0, 0); }
  20% { opacity: 1; transform: translate3d(108vw, 0, 0); }
  46% { opacity: 1; transform: translate3d(-150vw, 0, 0); }
  54%, 100% { opacity: 0; transform: translate3d(-170vw, 0, 0); }
}

.wordmark-row {
  position: relative;
  display: inline-block;
}

.wordmark {
  display: block;
  font-family: "Jost", var(--font-sans);
  font-weight: 300;
  font-size: var(--text-display);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  line-height: 1;
  color: #ede4d0;
  background: none;
}

.lockup-legal {
  margin-top: clamp(1.25rem, 2.6vw, 2rem);
  font-family: "Jost", var(--font-sans);
  font-weight: 300;
  font-size: clamp(0.62rem, 1.35vw, 0.78rem);
  letter-spacing: 0.48em;
  padding-left: 0.48em;
  color: #ede4d0;
}

@keyframes text-drift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.tagline {
  margin: clamp(2.6rem, 5.5vw, 4rem) 0 0;
  max-width: min(92vw, 16em);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-wrap: balance;
  color: #ede4d0;
}

.login-button { margin-top: 2.4rem; min-width: 9.5rem; padding-inline: 2.1rem; }

#auth-login {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#auth-login[hidden],
#auth-pending[hidden],
#auth-error[hidden],
#auth-notice[hidden],
#landing-tagline[hidden],
#auth-error-detail[hidden] { display: none !important; }

#auth-pending {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2.2rem;
}

.mark-loader {
  position: relative;
  width: 64px;
  height: 64px;
  display: block;
  flex: none;
}

.mark-loader-arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    transparent 0deg 210deg,
    rgba(143, 179, 172, 0.18) 250deg,
    #8fb3ac 300deg,
    #ede4d0 330deg,
    transparent 348deg 360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 64% 72%, transparent 78%);
  mask: radial-gradient(circle, transparent 58%, #000 64% 72%, transparent 78%);
  filter: drop-shadow(0 0 4px rgba(143, 179, 172, 0.45));
  animation: loader-sweep 2.8s cubic-bezier(0.45, 0.02, 0.2, 1) infinite;
}

.mark-loader-spin {
  position: absolute;
  inset: 0;
  animation: loader-sweep 3.6s linear infinite;
}

.mark-loader-orb {
  position: absolute;
  left: 50%;
  top: 1px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #ede4d0;
  box-shadow: 0 0 6px 1px rgba(237, 228, 208, 0.85);
}

.mark-loader-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  height: auto;
  overflow: visible;
  transform: translate(-50%, -50%);
  animation: wave-float 3.6s ease-in-out infinite;
}

@keyframes wave-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 1px)); }
}

@keyframes loader-sweep {
  to { transform: rotate(360deg); }
}

.mark-loader-wave .wave-a,
.mark-loader-wave .wave-b {
  fill-opacity: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1800;
  stroke-dashoffset: 0;
  opacity: 1;
}

.mark-loader-wave .wave-a {
  fill: #8fb3ac;
  stroke: #d5ebe6;
  stroke-width: 8;
  animation: wave-draw 2.8s ease-in-out infinite;
}

.mark-loader-wave .wave-b {
  fill: #ede4d0;
  stroke: #8fb3ac;
  stroke-width: 7;
  animation: wave-draw 2.8s ease-in-out 0.4s infinite;
}

/* Spinner only on screen; the label stays for screen readers. */
.auth-pending-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes wave-rest {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes wave-draw {
  0% { stroke-dashoffset: 1800; fill-opacity: 0.12; opacity: 0.55; }
  46% { stroke-dashoffset: 0; fill-opacity: 1; opacity: 1; }
  70% { stroke-dashoffset: 0; fill-opacity: 1; opacity: 1; }
  100% { stroke-dashoffset: -1800; fill-opacity: 0.12; opacity: 0.55; }
}

.auth-status,
.auth-title {
  margin: 0.2rem 0 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.auth-status { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.auth-title {
  margin-top: 1.5rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 650;
}

.auth-detail {
  margin: 0.8rem auto 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.auth-actions .login-button,
.auth-actions .button-secondary,
.auth-actions .button-ghost { margin-top: 0; }

.landing-notice {
  position: absolute;
  top: calc(100% + 1.15rem);
  left: 50%;
  translate: -50% 0;
  width: max-content;
  max-width: 86vw;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--color-ice);
  pointer-events: none;
  animation: notice-fade 4.6s ease forwards;
}

@keyframes notice-fade {
  0%, 62% { opacity: 1; }
  100% { opacity: 0; }
}

body.gate .landing-main { padding-bottom: max(12vh, env(safe-area-inset-bottom)); }

body.gate .wordmark { font-size: clamp(2.25rem, 10vw, 4.25rem); letter-spacing: 0.28em; padding-left: 0.28em; }
body.gate .lockup-mark { width: min(40vw, 150px); }

/* No access: glass card under the lockup. No request-access path. */
body.no-access .landing-main { gap: 0; }
body.no-access .lockup-mark { width: min(30vw, 120px); }
body.no-access .wordmark { font-size: clamp(1.9rem, 8vw, 3.3rem); }
body.no-access .lockup-legal { display: none; }
.no-access-card {
  position: relative;
  z-index: 2;
  width: min(30rem, calc(100vw - 2.5rem));
  margin: 2.2rem auto 0;
  padding: 2rem 2rem 2.2rem;
  border-radius: 22px;
  border: 1px solid rgba(237, 228, 208, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 24px 60px rgba(4, 10, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}
.no-access-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  color: var(--color-sea);
  background: rgba(143, 179, 172, 0.12);
  border: 1px solid rgba(143, 179, 172, 0.28);
}
.no-access-lock { width: 22px; height: 22px; display: block; }
.no-access-card .auth-title { margin-top: 1rem; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.no-access-card .auth-detail { font-size: 1rem; }
.no-access-email { font-size: 0.9rem !important; color: var(--color-text-tertiary) !important; margin-top: 0.4rem !important; }
.no-access-card .no-access-back { display: inline-flex; align-items: center; justify-content: center; margin-top: 1.6rem; text-decoration: none; }
@media (max-width: 480px) {
  .no-access-card { padding: 1.6rem 1.25rem 1.8rem; margin-top: 1.6rem; }
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */

.home-main {
  position: relative;
  z-index: 2;
  flex: 1;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.home-hero { margin: 0.6rem 0 1.8rem; }

.home-greeting {
  margin: 0;
  font-family: "Jost", var(--font-sans);
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  color: #ede4d0;
}

.home-lead {
  margin: 0.8rem 0 0;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  perspective: 1400px;
}

.business-grid > li {
  animation: tile-in 0.8s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 130ms + 70ms);
}

@keyframes tile-in {
  from { opacity: 0; translate: 0 32px; }
  to { opacity: 1; translate: 0 0; }
}

.business-tile {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  --gx: 50%;
  --gy: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 31rem;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(237, 228, 208, 0.18);
  background: linear-gradient(180deg, rgba(30, 46, 77, 0.72), rgba(22, 33, 58, 0.88));
  box-shadow: var(--shadow-card);
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.business-tile:hover {
  --lift: -12px;
  border-color: rgba(143, 179, 172, 0.5);
  box-shadow: var(--shadow-lift);
}

.tile-glow {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(380px circle at var(--gx) var(--gy), rgba(237, 228, 208, 0.28), transparent 42%);
  transition: opacity var(--dur) var(--ease);
}

.business-tile:hover .tile-glow { opacity: 1; }

.business-visual {
  position: relative;
  height: 15.5rem;
  flex: none;
  overflow: hidden;
}

.business-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background: linear-gradient(transparent, rgba(22, 33, 58, 0.55));
}

.tile-sheen,
.tile-orb {
  position: absolute;
  pointer-events: none;
}

.tile-sheen {
  inset: -30%;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.38) 48%, transparent 60%);
  transform: translateX(-50%) rotate(8deg);
  animation: sheen 7.5s ease-in-out infinite;
}

.tile-orb {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  right: -1rem;
  top: -1.5rem;
  background: radial-gradient(circle, rgba(143, 179, 172, 0.65), transparent 68%);
  filter: blur(2px);
  animation: orb-float 8s ease-in-out infinite;
}

.tile-orb-b {
  width: 7rem;
  height: 7rem;
  left: -1rem;
  right: auto;
  top: auto;
  bottom: 1rem;
  background: radial-gradient(circle, rgba(237, 228, 208, 0.55), transparent 68%);
  animation-delay: -2.4s;
}

.business-visual[data-theme="media"] .tile-orb {
  background: radial-gradient(circle, rgba(196, 168, 140, 0.7), transparent 68%);
}

.business-visual[data-theme="media"] .tile-orb-b {
  background: radial-gradient(circle, rgba(143, 179, 172, 0.7), transparent 68%);
}

.business-visual[data-theme="hospitality"] .tile-orb {
  background: radial-gradient(circle, rgba(237, 228, 208, 0.7), transparent 68%);
}

@keyframes sheen {
  0%, 35% { transform: translateX(-55%) rotate(8deg); }
  70%, 100% { transform: translateX(40%) rotate(8deg); }
}

@keyframes orb-float {
  0%, 100% { translate: 0 0; }
  50% { translate: -8px 10px; }
}

.business-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.35rem 1.4rem;
}

.business-name {
  margin: 0;
  font-size: clamp(1.7rem, 2vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.business-desc {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.tag-row, .logo-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.tile-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(143, 179, 172, 0.28);
  background: rgba(143, 179, 172, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-ice);
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.55rem;
  min-width: 2.55rem;
  padding: 0.35rem 0.6rem;
  border-radius: 14px;
  background: #f4f7ff;
  box-shadow: 0 8px 18px -12px rgba(3, 12, 40, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.logo-chip-mark {
  height: 1.15rem;
  width: auto;
  max-width: 4.6rem;
  display: block;
}

.logo-chip[data-brand="amazon"] { box-shadow: inset 0 0 0 1px rgba(255, 153, 0, 0.45), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }
.logo-chip[data-brand="meta"] { box-shadow: inset 0 0 0 1px rgba(0, 129, 251, 0.35), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }
.logo-chip[data-brand="shopify"] { box-shadow: inset 0 0 0 1px rgba(150, 191, 72, 0.55), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }
.logo-chip[data-brand="instagram"] { box-shadow: inset 0 0 0 1px rgba(225, 48, 108, 0.4), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }
.logo-chip[data-brand="tiktok"] { box-shadow: inset 0 0 0 1px rgba(37, 244, 238, 0.45), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }
.logo-chip[data-brand="airbnb"] { box-shadow: inset 0 0 0 1px rgba(255, 90, 95, 0.45), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }
.logo-chip[data-brand="google"] { box-shadow: inset 0 0 0 1px rgba(66, 133, 244, 0.4), 0 8px 18px -12px rgba(3, 12, 40, 0.8); }

.skeleton-tile {
  min-height: 22rem;
  border-radius: 28px;
  border: 1px solid var(--color-border);
  background: rgba(27, 42, 71, 0.45);
  overflow: hidden;
}
.skeleton-block { margin: 1rem; border-radius: 16px; }

.skeleton,
.skeleton-bar,
.skeleton-block {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(143, 179, 172, 0.22) 50%, rgba(255, 255, 255, 0.05) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.35s ease-in-out infinite;
}

.skeleton-bar {
  display: block;
  height: 0.95rem;
  width: min(16rem, 70%);
  border-radius: 999px;
}

.skeleton-row td { padding: 1rem; }

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}

/* ------------------------------------------------------------------ */
/* Admin surfaces                                                      */
/* ------------------------------------------------------------------ */

.banner {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-control);
  background: var(--color-warn-bg);
  border: 1px solid var(--color-warn-border);
  color: var(--color-warn);
  font-size: 0.92rem;
  font-weight: 560;
}

.banner a { color: inherit; font-weight: 700; }

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}

.tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.95rem;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 560;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.tab[aria-selected="true"] {
  color: var(--color-ice);
  border-bottom-color: var(--color-cyan);
}

.nav-count,
.tab-count:not(:empty) {
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  background: rgba(143, 179, 172, 0.12);
  color: var(--color-ice);
}

.nav-count,
.tab-count[data-alert="true"] {
  background: var(--color-coral);
  color: #2a1020;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.toolbar .fine-print { max-width: 40rem; }

.filter-group {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-pill);
  background: rgba(22, 33, 58, 0.55);
  border: 1px solid var(--color-border);
}

.filter {
  appearance: none;
  padding: 0.38rem 0.75rem;
  border: none;
  border-radius: var(--radius-pill);
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.filter[aria-pressed="true"] {
  background: rgba(143, 179, 172, 0.18);
  color: #fff;
}

.search,
.inline-select,
.inline-form input,
.inline-form select,
.field input,
.field select {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--color-text);
  background: rgba(22, 33, 58, 0.55);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  padding: 0.55rem 0.75rem;
}

.search { width: min(18rem, 100%); }
.inline-select { padding: 0.32rem 0.5rem; font-size: 0.85rem; }
.inline-select:disabled { opacity: 0.55; }

.search:focus-visible,
.inline-select:focus-visible,
.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 1px;
  border-color: var(--color-cyan);
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.2rem 0.15rem;
  margin-bottom: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(16px);
}

.inline-form .button-primary,
.inline-form .button-secondary,
.inline-form .button-ghost { margin-bottom: 1rem; }

.table-panel {
  background: rgba(27, 42, 71, 0.55);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.table-scroll { position: relative; overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.data-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--color-border);
  padding: 0.8rem 1rem;
  white-space: nowrap;
}

.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(237, 228, 208, 0.08);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(143, 179, 172, 0.05); }

.name-stack { display: flex; flex-direction: column; line-height: 1.3; }
.name-primary { font-weight: 640; }
.name-secondary, .cell-secondary { color: var(--color-text-secondary); }
.name-secondary { font-size: 0.75rem; }
.cell-number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .button-small + .button-small { margin-left: 0.4rem; }
.cell-user { display: flex; align-items: center; gap: 0.75rem; min-width: 14rem; }
.cell-mono, .badge-mono { font-family: var(--font-mono); font-size: 0.8rem; }
.table-state { margin: 1rem; width: auto; }

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  vertical-align: middle;
}

td > .badge:first-child,
.project-meta .badge:first-child { margin-left: 0; }

.badge-role[data-role="admin"] {
  background: rgba(143, 179, 172, 0.16);
  border-color: transparent;
  color: var(--color-ice);
}

.badge-role[data-role="member"] {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success);
}

.badge-warn {
  background: var(--color-warn-bg);
  border-color: var(--color-warn-border);
  color: var(--color-warn);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: capitalize;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.status-pill[data-status="active"] { color: var(--color-success); }
.status-pill[data-status="pending"] { color: var(--color-warn); }
.status-pill[data-status="disabled"] { color: var(--color-text-tertiary); }

.project-icon {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(143, 179, 172, 0.12);
  color: var(--color-ice);
  font-size: 1rem;
}

.project-icon-small { width: 32px; height: 32px; border-radius: 10px; }

.fine-print, .help-text {
  margin: 0.85rem 0.15rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-text-tertiary);
}

.status-message {
  width: 100%;
  border-radius: var(--radius-control);
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: left;
}

.status-message[data-kind="error"] {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  color: var(--color-danger);
}

.status-message[data-kind="info"] {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; flex: 1; }
.field-row { display: flex; gap: 1rem; }
.field-narrow { flex: 0 0 8rem; }
.field label { font-size: 0.82rem; font-weight: 640; color: var(--color-text-secondary); }
.label-hint { font-weight: 450; color: var(--color-text-tertiary); }

.checkbox { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 560; }
.switch { width: 1.1rem; height: 1.1rem; accent-color: var(--color-cyan); cursor: pointer; }

.dialog {
  width: min(32rem, calc(100vw - 2rem));
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(30, 46, 77, 0.96), rgba(22, 33, 58, 0.98));
  color: var(--color-text);
  box-shadow: var(--shadow-dialog);
  padding: 1.6rem;
}

.dialog::backdrop {
  background: rgba(22, 33, 58, 0.72);
  backdrop-filter: blur(8px);
}

.dialog h2 {
  margin: 0 0 1.15rem;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.dialog-actions { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 1.3rem; }
.dialog .status-message { margin-top: 0.5rem; }

.toast-host {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2.5rem));
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-control);
  background: rgba(27, 42, 71, 0.92);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  font-size: 0.86rem;
  font-weight: 560;
  box-shadow: var(--shadow-dialog);
  backdrop-filter: blur(12px);
  animation: hero-in 0.35s var(--ease) both;
  transition: opacity 0.25s ease;
}

.toast[data-kind="error"] { background: #6d2438; color: #fff; border-color: transparent; }
.toast[data-kind="success"] { background: #0e6b56; color: #fff; border-color: transparent; }
.toast-leaving { opacity: 0; }

/* ------------------------------------------------------------------ */
/* Responsive + reduced motion                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .business-grid { grid-template-columns: 1fr; }
  .business-tile { min-height: 0; }
  .business-visual { height: 12.5rem; }
  .home-main { width: min(1180px, calc(100% - 1.5rem)); }
  .home-hero { max-width: none; }
}

@media (max-width: 640px) {
  .app-header { gap: 0.65rem; }
  .title-row, .field-row { flex-direction: column; align-items: stretch; }
  .field-narrow { flex: 1; }
  .account-name-label { max-width: 6.5rem; }
  .home-greeting { font-size: clamp(1.7rem, 7.4vw, 2.4rem); }
  .wordmark { letter-spacing: 0.22em; padding-left: 0.22em; }
  .lockup-legal { letter-spacing: 0.32em; padding-left: 0.32em; }
  .lockup-mark { width: min(52vw, 168px); }
  .brand-word { letter-spacing: 0.16em; padding-left: 0.16em; font-size: 0.78rem; }
  .mark-loader { width: 52px; height: 52px; }
  .mark-loader-orb { width: 3px; height: 3px; margin-left: -1.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-beam {
    display: none;
    opacity: 0;
  }

  .mark-loader-arc,
  .mark-loader-spin,
  .mark-loader-wave,
  .mark-loader-wave .wave-a,
  .mark-loader-wave .wave-b {
    animation: none !important;
  }

  .mark-loader-wave {
    animation: wave-rest 2.6s ease-in-out infinite !important;
  }

  .wordmark {
    background-position: 40% 50%;
  }

  .business-tile,
  .business-tile:hover,
  .button-primary,
  .button-secondary,
  .button-ghost,
  .login-button {
    transform: none;
  }

  .pointer-glow { display: none; }
}

/* ------------------------------------------------------------------ */
/* Logo film (hidden extra: click the landing logo)                    */
/* ------------------------------------------------------------------ */

.landing .lockup-mark-wrap { -webkit-tap-highlight-color: transparent; outline: none; }
.landing .lockup-mark-wrap:focus-visible { outline: 1px solid rgba(143, 179, 172, 0.55); outline-offset: 8px; border-radius: 50%; }

.logo-film {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(10, 16, 30, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease, ease), visibility 0s linear 0.45s;
}

.logo-film.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease, ease), visibility 0s;
}

.logo-film-video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 14px;
  background: #0a101e;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  transform: scale(0.97);
  transition: transform 0.6s var(--ease, ease);
}

.logo-film.is-open .logo-film-video { transform: none; }

.logo-film-close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(237, 228, 208, 0.22);
  border-radius: 50%;
  background: rgba(22, 33, 58, 0.6);
  color: #ede4d0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.logo-film-close:hover { background: rgba(30, 46, 77, 0.9); border-color: rgba(237, 228, 208, 0.45); }
.logo-film-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

html.logo-film-open, html.logo-film-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .logo-film, .logo-film.is-open, .logo-film-video { transition: none; transform: none; }
}
