:root {
  color-scheme: light;
  --portal-ink: #1d1d1f;
  --portal-muted: #6e6e73;
  --portal-line: #d2d2d7;
  --portal-bg: #f5f5f7;
  --portal-side: #1d1d1f;
  --portal-side-text: rgba(255, 255, 255, 0.72);
}

* { box-sizing: border-box; }

body.ecommerce-public,
body.ecommerce-portal {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--portal-ink);
  background: #fff;
}

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.landing-card { max-width: 28rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--portal-muted);
}

h1 { font-weight: 600; letter-spacing: -0.03em; margin: 0 0 0.75rem; }

.lede { font-size: 1.125rem; line-height: 1.5; color: var(--portal-muted); margin: 0 0 2rem; }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  text-decoration: none;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
}

.button-primary { background: var(--portal-ink); color: #fff; }
.button-secondary { background: #fff; color: var(--portal-ink); border-color: var(--portal-line); }
.button-quiet { background: transparent; color: var(--portal-side-text); padding-left: 0; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: var(--portal-bg); }
.auth-card { width: min(28rem, 100%); background: #fff; border-radius: 1.25rem; padding: 1.75rem; }
.auth-card h1 { font-size: 1.75rem; }

label { display: block; font-size: 0.875rem; margin: 0.9rem 0 0.35rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--portal-line);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
}
.errors { color: #9f1239; font-size: 0.9rem; }
.flash { margin: 0 0 1rem; padding: 0.75rem 0.9rem; border-radius: 0.75rem; background: #eef2ff; }
.flash-alert { background: #fff1f2; }

.portal { min-height: 100vh; display: grid; grid-template-columns: 15rem 1fr; }
.side {
  background: var(--portal-side);
  color: #fff;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.brand { color: #fff; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; }
.side nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side a, .side button.linkish {
  color: var(--portal-side-text);
  text-decoration: none;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.side a.active, .side a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.side form { margin-top: auto; }
.main { background: var(--portal-bg); padding: 1.5rem; }
.panel {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.list { display: grid; gap: 0.75rem; }
.meta { color: var(--portal-muted); font-size: 0.9rem; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0; border-bottom: 1px solid #eee; }
.choice input { width: auto; margin-top: 0.2rem; }
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .portal { grid-template-columns: 1fr; }
  .menu-toggle { display: block; margin: 0.75rem; }
  .side { display: none; }
  .side.open { display: flex; }
}
