/* ── Shell Layers ──────────────────────────────────────────── */

.surface-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.demo-mode-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 16px;
  background: linear-gradient(180deg, #dc2626, #991b1b);
  color: #fff7ed;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 24px rgba(127, 29, 29, 0.32);
}

.demo-mode-banner[hidden] {
  display: none;
}

.demo-mode-banner span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-mode-banner strong {
  font-weight: 800;
}

.screen--public,
.screen--auth {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
}

.screen--app {
  max-width: 720px;
}

.screen--admin {
  max-width: 1120px;
  padding-inline: 16px;
}

.screen--super-admin {
  max-width: 100%;
  padding: 0;
}

.login-card--public,
.login-card--auth {
  max-width: 440px;
  margin: 0 auto;
}

.login-card--public {
  min-height: calc(100vh - 24px);
}

.login-card--auth {
  min-height: 100vh;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-left: none;
  border-right: none;
}

/* ── Shell State: visual separation without changing flows ── */

body[data-shell="public"] {
  --shell-accent: var(--gold);
}

body[data-shell="auth"] {
  --shell-accent: var(--green);
}

body[data-shell="app"] {
  --shell-accent: var(--green);
}

body[data-shell="admin"] {
  --shell-accent: #93c5fd;
}

body[data-shell="super-admin"] {
  --shell-accent: #fca5a5;
  background:
    radial-gradient(circle at top, rgba(185,28,28,0.24), transparent 34%),
    linear-gradient(180deg, rgba(24,8,8,0.98), rgba(12,4,4,1));
}

body[data-shell="public"] .pitch-bg,
body[data-shell="auth"] .pitch-bg {
  opacity: 1;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

body[data-shell="app"] .pitch-bg {
  opacity: 0.58;
  filter: saturate(0.88);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

body[data-shell="app"] .pitch-bg::before,
body[data-shell="app"] .pitch-bg::after {
  content: none;
  display: none;
}

body[data-shell="admin"] .pitch-bg {
  opacity: 1;
  filter: none;
  background: linear-gradient(180deg, rgba(10,18,11,1) 0%, rgba(8,12,8,1) 100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

body[data-shell="admin"] .pitch-bg::before,
body[data-shell="admin"] .pitch-bg::after {
  content: none;
  display: none;
}

body[data-shell="super-admin"] .pitch-bg {
  opacity: 0;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

body[data-shell="public"] #surface-root,
body[data-shell="auth"] #surface-root {
  max-width: none;
  margin: 0 auto;
}

body[data-shell="public"] .screen--public,
body[data-shell="auth"] .screen--auth {
  background: transparent;
}

body[data-shell="super-admin"] #surface-root {
  max-width: none;
}

body[data-shell="app"] .home-header {
  position: relative;
}

body[data-shell="app"] .home-header::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--shell-accent), transparent);
  opacity: 0.5;
}

body[data-shell="admin"] #screen-admin,
body[data-shell="super-admin"] #screen-super-admin {
  isolation: isolate;
}

body[data-shell="super-admin"] #screen-super-admin {
  background: transparent;
}

/* ── Future hooks: routing and i18n scopes ────────────────── */

.screen[data-shell][data-copy-scope] {
  position: relative;
}

body[data-copy-scope="marketing"] .landing-title,
body[data-copy-scope="onboarding"] #login-title,
body[data-copy-scope="product"] .nav-section-lbl,
body[data-copy-scope="ops"] .ballot-title {
  text-wrap: balance;
}

@media (min-width: 960px) {
  .screen--admin {
    padding-inline: 24px;
  }
}
