/*
 * Portal SGI — protótipo exploratório local.
 *
 * Harmonização visual com o CRM INTRI&CO (TAR-2026-08-24-002).
 * Todos os valores abaixo foram extraídos do código e dos estilos reais do CRM
 * em C:\Projetos\crm-intrico, sem leitura por imagem:
 *
 *   - tokens dos três temas ......... resources/css/app.css (Design B0, 4.2)
 *   - família e pesos tipográficos .. resources/css/app.css (--font-sans) e
 *                                     public/build/fonts-manifest.json
 *   - escala de texto e geometria ... Tailwind v4 tal como compilado no CRM
 *   - botões, campos, cartões,
 *     badges, sidebar e navegação ... vendor/livewire/flux/stubs/.../flux/*
 *   - ícones ....................... Heroicons publicados pelo Flux (outline)
 *
 * Nada aqui altera a estrutura funcional, as rotas, a navegação ou a separação
 * entre Painel do Cliente e Clube já validadas no protótipo.
 */

/* ==========================================================================
   1. Tipografia — Instrument Sans, os mesmos arquivos servidos pelo CRM
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/instrument-sans-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   2. Régua fixa — escala, geometria e densidade do CRM
   ========================================================================== */

:root {
  /* Idêntico a --font-sans do CRM. */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

  /*
   * Escala tipografica global do SGI — padrao transversal de interface.
   *
   * --type-scale e o unico ponto de controle: P mantem a escala do CRM, M
   * amplia 12,5% e G amplia 25%. Todo passo tipografico abaixo deriva do
   * mesmo multiplicador, entao a hierarquia entre titulo, texto, rotulo,
   * badge e apoio e preservada por construcao — nao ha tres conjuntos fixos
   * de valores. Qualquer modulo do SGI, atual ou futuro, consome estes
   * tokens e herda a preferencia sem implementar logica propria.
   */
  --type-scale: 1;

  /* Escala de texto do Tailwind v4, como o CRM compila, multiplicada. */
  --text-2xs: calc(0.625rem * var(--type-scale));
  --text-xs: calc(0.75rem * var(--type-scale));
  --leading-xs: calc(1rem * var(--type-scale));
  --text-sm: calc(0.875rem * var(--type-scale));
  --leading-sm: calc(1.25rem * var(--type-scale));
  --text-base: calc(1rem * var(--type-scale));
  --leading-base: calc(1.5rem * var(--type-scale));
  --text-lg: calc(1.125rem * var(--type-scale));
  --leading-lg: calc(1.75rem * var(--type-scale));
  --text-2xl: calc(1.5rem * var(--type-scale));
  --leading-2xl: calc(2rem * var(--type-scale));

  /* Entrelinha propria do campo de texto do Flux (leading-[1.375rem]). */
  --leading-input: calc(1.375rem * var(--type-scale));

  /*
   * Diametro dos botoes da escala. Igual a altura do botao do seletor de
   * tema em qualquer nivel, para que os dois controles globais fiquem
   * exatamente alinhados.
   */
  --pill-size: calc(0.75rem + var(--leading-sm));

  /* Raios do Design B0: 6 px em badges, 8–12 px em campos, botões e cartões. */
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;

  /* Alturas de controle do Flux. */
  --control-h: 2.5rem;
  --control-h-sm: 2rem;
  --nav-item-h: 2rem;
  --nav-item-h-mobile: 2.5rem;

  --sidebar-width: 16rem;
  --header-h: 3.5rem;
  /* A faixa e uma tira de texto: acompanha a escala para nao cortar. */
  --banner-height: calc(2.25rem * var(--type-scale));

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 5%);
  --transition: 150ms ease;

  /* Cinzas do CRM (@theme), usados onde o Flux fixa zinc. */
  --zinc-200: #e5e5e5;
  --zinc-300: #d4d4d4;
  --zinc-400: #a3a3a3;
  --zinc-600: #525252;
  --zinc-800: #262626;
}

/*
 * Niveis da escala tipografica global. P e exatamente a escala harmonizada
 * com o CRM; M e G ampliam proporcionalmente 12,5% e 25%.
 */
html[data-type-scale="p"] {
  --type-scale: 1;
}

html[data-type-scale="m"] {
  --type-scale: 1.125;
}

html[data-type-scale="g"] {
  --type-scale: 1.25;
}

/* ==========================================================================
   3. Temas oficiais — valores idênticos aos do CRM (Design B0, seção 4.2)
   ========================================================================== */

:root,
html[data-theme="claro"] {
  color-scheme: light;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-hover: rgb(15 23 42 / 4%);
  --border: #d8dde3;
  --border-subtle: #e7eaee;
  --text: #171a1f;
  --text-muted: #667085;

  --color-accent: #c99a24;
  --color-accent-content: #8c5c14;
  --color-accent-foreground: #171a1f;
  --accent-soft: rgb(201 154 36 / 16%);
  --focus-ring: var(--color-accent-content);
  --selected-bg: var(--accent-soft);
  --disabled-bg: #eef0f3;
  --disabled-text: #7c8494;
  --control-border: #171a1f;
  --shadow-soft: 0 1px 2px rgb(15 23 42 / 6%), 0 1px 1px rgb(15 23 42 / 4%);

  --info: #1d4ed8;
  --info-soft: #dbeafe;
  --success: #0f7a38;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;

  /* Derivados de superfície do Flux, resolvidos por tema. */
  --nav-item-text: var(--text);
  --nav-item-hover-bg: rgb(38 38 38 / 5%);
  --nav-current-bg: #ffffff;
  --nav-current-border: var(--zinc-200);
  --avatar-bg: var(--zinc-200);
  --avatar-text: var(--zinc-800);
  --input-border-b: rgb(212 212 212 / 80%);
  --input-icon: rgb(163 163 163 / 75%);
  --filled-bg: rgb(38 38 38 / 5%);
  --filled-bg-hover: rgb(38 38 38 / 10%);
  --badge-neutral-text: #404040;
  --badge-neutral-bg: rgb(163 163 163 / 15%);
  --scrim: rgb(15 23 42 / 45%);
}

html[data-theme="creme"] {
  color-scheme: light;

  --bg: #f6f1e8;
  --surface: #fffdf8;
  --surface-hover: rgb(70 55 30 / 5%);
  --border: #e5ddd2;
  --border-subtle: #efe8dc;
  --text: #1f1b17;
  --text-muted: #746c63;

  --accent-soft: rgb(201 154 36 / 16%);
  --selected-bg: var(--accent-soft);
  --disabled-bg: #efe7d8;
  --disabled-text: #867c6f;
  --control-border: #1f1b17;
  --shadow-soft: 0 1px 2px rgb(70 55 30 / 6%), 0 1px 1px rgb(70 55 30 / 4%);
}

html[data-theme="escuro"] {
  color-scheme: dark;

  --bg: #0e1114;
  --surface: #151a1f;
  --surface-hover: rgb(255 255 255 / 6%);
  --border: #2a3138;
  --border-subtle: #20262c;
  --text: #f4f6f8;
  --text-muted: #aab1ba;

  --color-accent: #d2aa36;
  --color-accent-content: #d2aa36;
  --color-accent-foreground: #171a1f;
  --accent-soft: rgb(210 170 54 / 18%);
  --focus-ring: var(--color-accent);
  --selected-bg: var(--accent-soft);
  --disabled-bg: #1b2127;
  --disabled-text: #7a8390;
  --control-border: #ffffff;
  --shadow-soft: 0 1px 2px rgb(0 0 0 / 40%), 0 1px 1px rgb(0 0 0 / 30%);

  --info: #60a5fa;
  --info-soft: rgb(37 99 235 / 20%);
  --success: #4ade80;
  --success-soft: rgb(22 163 74 / 22%);
  --warning: #fbbf24;
  --warning-soft: rgb(217 119 6 / 22%);
  --danger: #f87171;
  --danger-soft: rgb(220 38 38 / 22%);
  --purple: #a78bfa;
  --purple-soft: rgb(124 58 237 / 24%);

  --nav-item-text: rgb(255 255 255 / 80%);
  --nav-item-hover-bg: rgb(255 255 255 / 7%);
  --nav-current-bg: rgb(255 255 255 / 7%);
  --nav-current-border: transparent;
  --avatar-bg: var(--zinc-600);
  --avatar-text: #ffffff;
  --input-border-b: rgb(255 255 255 / 10%);
  --input-icon: rgb(255 255 255 / 60%);
  --filled-bg: rgb(255 255 255 / 10%);
  --filled-bg-hover: rgb(255 255 255 / 20%);
  --badge-neutral-text: #e5e5e5;
  --badge-neutral-bg: rgb(163 163 163 / 40%);
  --scrim: rgb(0 0 0 / 55%);
}

/*
 * Regra do CRM para telas abaixo de 1024 px: o destaque continua dourado, com
 * menos saturação e um pouco menos de luminosidade, para evitar aparência neon.
 */
@media (max-width: 1023px) {
  html[data-theme="claro"],
  html[data-theme="creme"] {
    --color-accent: #b98239;
    --color-accent-content: #7d500d;
  }

  html[data-theme="escuro"] {
    --color-accent: #c99a24;
    --color-accent-content: #c99a24;
    --accent-soft: rgb(201 154 36 / 10%);
  }
}

/* ==========================================================================
   4. Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:not([disabled]),
a[href] {
  cursor: pointer;
}

svg {
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  stroke-width: 1.5;
}

.icon--sm {
  width: 0.875rem;
  height: 0.875rem;
}

.icon--lg {
  width: 1.25rem;
  height: 1.25rem;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  min-height: var(--control-h);
  align-items: center;
  padding-block: 0.5rem;
  padding-inline: 1rem;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: var(--radius-lg);
  background: var(--color-accent);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%);
  color: var(--color-accent-foreground);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   5. Faixa do protótipo
   ========================================================================== */

.prototype-banner {
  position: sticky;
  z-index: 90;
  top: 0;
  display: flex;
  min-height: var(--banner-height);
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--info-soft);
  color: var(--info);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  text-align: center;
}

.prototype-banner strong {
  font-weight: 600;
}

.prototype-banner span {
  color: inherit;
  opacity: 0.9;
}

/* ==========================================================================
   6. Estrutura do shell — sidebar w-64 + conteúdo, como no CRM
   ========================================================================== */

.app-shell {
  display: grid;
  min-height: calc(100vh - var(--banner-height));
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 70;
  top: var(--banner-height);
  display: flex;
  height: calc(100vh - var(--banner-height));
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

/* Marca — mesma assinatura do x-app-logo do CRM. */
.brand {
  display: flex;
  align-items: center;
  padding: 0.25rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand__intrico {
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand__intrico span {
  color: var(--color-accent);
}

.brand__sgi {
  color: var(--text-muted);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.brand__descriptor {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.primary-nav {
  display: flex;
  flex-direction: column;
}

.nav-heading {
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: var(--nav-item-h);
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.125rem;
  padding-inline: 0.75rem;
  margin-block: 1px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--nav-item-text);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
}

.nav-link:hover {
  background: var(--nav-item-hover-bg);
  color: var(--text);
}

.nav-link[aria-current="page"] {
  border-color: var(--nav-current-border);
  background: var(--nav-current-bg);
  color: var(--color-accent-content);
}

.nav-link[aria-current="page"]:hover {
  color: var(--color-accent-content);
}

.nav-link > span:not(.nav-link__icon):not(.nav-link__tag) {
  flex: 1;
}

.nav-link__icon {
  display: inline-flex;
  color: currentColor;
}

.nav-link__tag {
  display: inline-flex;
  align-items: center;
  padding: 0 0.375rem;
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--info);
  font-size: var(--text-2xs);
  font-weight: 500;
  line-height: var(--leading-sm);
  white-space: nowrap;
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.sidebar-note__dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  margin-top: 0.25rem;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
}

.sidebar-note div {
  display: grid;
  gap: 0.125rem;
}

.sidebar-note strong {
  color: var(--text);
  font-weight: 500;
}

.nav-scrim {
  display: none;
}

.app-stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

/* ==========================================================================
   7. Cabeçalho global — min-h-14, px-6/px-8, como o flux:header do CRM
   ========================================================================== */

.topbar {
  position: sticky;
  z-index: 60;
  top: var(--banner-height);
  display: grid;
  min-height: var(--header-h);
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  grid-template-columns: minmax(12rem, 1fr) auto auto auto;
}

.menu-button,
.mobile-brand {
  display: none;
}

/* Campo de busca — geometria do flux:input (h-10, rounded-lg, shadow-xs). */
.search {
  position: relative;
  width: min(100%, 24rem);
}

.search__icon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  color: var(--input-icon);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: var(--control-h);
  padding: 0.5rem 2.5rem;
  border: 1px solid var(--border);
  border-bottom-color: var(--input-border-b);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  font-size: var(--text-base);
  line-height: var(--leading-input);
}

.search input::placeholder {
  color: var(--text-muted);
}

/* Anel de foco idêntico ao dos campos do CRM. */
.search input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus-ring);
}

.search__clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  place-items: center;
  transform: translateY(-50%);
}

.search__clear:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Seletor de tema — mesmo componente do CRM. */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.theme-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
  transition: background-color var(--transition), color var(--transition);
}

.theme-switcher button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.theme-switcher button[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-accent-foreground);
}

/*
 * Escala tipografica — segundo controle global, irmao do seletor de tema.
 * Mesma moldura, mesma altura em qualquer nivel: os botoes sao circulares e
 * medem exatamente a altura do botao de tema (--pill-size).
 */
.type-scale {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.type-scale button {
  display: inline-flex;
  width: var(--pill-size);
  height: var(--pill-size);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  transition: background-color var(--transition), color var(--transition);
}

.type-scale button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.type-scale button[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-accent-foreground);
}

/* Conta — padrão do flux:sidebar.profile + flux:avatar do CRM. */
.demo-account {
  display: grid;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  border-radius: var(--radius-lg);
  color: var(--text);
  grid-template-columns: auto 1fr auto;
}

.demo-account:hover {
  background: var(--nav-item-hover-bg);
}

.demo-account__avatar,
.admin-identity__avatar {
  display: grid;
  border-radius: var(--radius-lg);
  background: var(--avatar-bg);
  color: var(--avatar-text);
  font-weight: 500;
  place-items: center;
}

.demo-account__avatar {
  width: 2.5rem;
  height: 2.5rem;
  font-size: var(--text-sm);
}

.demo-account__copy {
  display: grid;
  font-size: var(--text-sm);
  line-height: 1.25;
}

.demo-account__copy strong {
  font-weight: 500;
}

.demo-account__copy span {
  color: var(--text-muted);
}

.demo-account > svg {
  color: var(--text-muted);
}

/* ==========================================================================
   8. Área de conteúdo — p-6 / lg:p-8 e gap-6 entre blocos, como no CRM
   ========================================================================== */

main {
  width: 100%;
  padding: 1.5rem;
  outline: none;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: view-in 150ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.eyebrow,
.label {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: var(--leading-xs);
  text-transform: uppercase;
}

.context-label {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: var(--leading-xs);
  white-space: nowrap;
}

/* Títulos — flux:heading size="xl" (24 px) e size="lg" (16 px). */
.hero h1,
.page-heading h1 {
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: var(--leading-2xl);
}

.hero__copy > p,
.page-heading > p,
.page-heading > div > p {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) 20rem;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ==========================================================================
   9. Botões — flux:button (base h-10, rounded-lg, text-sm, font-medium)
   ========================================================================== */

.button {
  position: relative;
  display: inline-flex;
  min-height: var(--control-h);
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 0.375rem;
  padding-inline: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition);
}

.button--primary {
  border-color: rgb(0 0 0 / 10%);
  background: var(--color-accent);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%);
  color: var(--color-accent-foreground);
}

.button--primary:hover {
  background: color-mix(in oklab, var(--color-accent), transparent 10%);
}

.button--secondary {
  background: var(--filled-bg);
  color: var(--text);
}

.button--secondary:hover {
  background: var(--filled-bg-hover);
}

.button--disabled,
.button[disabled] {
  border-color: var(--border);
  background: var(--disabled-bg);
  box-shadow: none;
  color: var(--disabled-text);
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   10. Badges de estado — geometria dos badges do CRM
   (inline-flex, rounded-md, px-2, py-0.5, text-xs, font-medium)
   ========================================================================== */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: var(--leading-xs);
  white-space: nowrap;
}

.status--active {
  background: var(--success-soft);
  color: var(--success);
}

.status--active > span {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
}

.status--planned {
  background: var(--purple-soft);
  color: var(--purple);
}

.status--prototype {
  background: var(--info-soft);
  color: var(--info);
}

.status--offline {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
}

/* ==========================================================================
   11. Blocos e cartões
   ========================================================================== */

.section-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.section-heading h2,
.catalog-card h2,
.launch-card h2,
.boundary-card h2,
.ranking-card h2,
.admin-scope h2,
.empty-search h2,
.prototype-state h2,
.admin-identity h2 {
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-base);
}

.section-heading > p {
  max-width: 34rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.module-card h3,
.admin-scope__grid h3 {
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-base);
}

.module-card p,
.admin-scope__grid p,
.launch-card p,
.empty-search p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

/* Símbolo do módulo — ladrilho de ícone (size-10 / rounded-lg). */
.module-symbol {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: var(--radius-lg);
  background: var(--surface-hover);
  color: var(--text-muted);
  place-items: center;
}

.module-symbol svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 1.5;
}

.module-symbol--crm {
  border: 1px solid rgb(0 0 0 / 10%);
  background: var(--color-accent);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%);
  color: var(--color-accent-foreground);
}

.module-symbol--large {
  width: 3.5rem;
  height: 3.5rem;
}

.module-symbol--large svg {
  width: 1.75rem;
  height: 1.75rem;
}

.surface-card .module-symbol,
.module-card--planned .module-symbol,
.catalog-card .module-symbol {
  background: var(--accent-soft);
  color: var(--color-accent-content);
}

/* Cartão de destaque do CRM. */
.crm-feature {
  display: grid;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.crm-feature__identity {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.crm-feature__identity > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.crm-feature__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.crm-feature__state {
  display: grid;
  gap: 0.125rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.crm-feature__state strong {
  font-weight: 500;
}

.crm-feature__state span:last-child {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.surface-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-grid,
.catalog-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface-card,
.module-card--planned,
.catalog-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: background-color var(--transition);
}

.surface-card:hover,
.module-card--planned:hover,
.catalog-card:hover {
  background: var(--surface-hover);
}

.surface-card > div,
.catalog-card > div:not(.catalog-card__top) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.surface-card__index,
.scope-number,
.prototype-state__mark {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: var(--leading-xs);
}

.catalog-card__top {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-accent-content);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 6px;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.planned-note {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.relationship-note {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  color: var(--text);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.relationship-note strong {
  display: block;
  color: var(--color-accent-content);
  font-weight: 500;
}

/* Painel de estado do protótipo, na Home. */
.prototype-state {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.prototype-state__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.prototype-state ul {
  display: grid;
  gap: 0.5rem;
}

.prototype-state li,
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.prototype-state li svg,
.check-list li svg {
  margin-top: 0.125rem;
  color: var(--success);
}

.prototype-state li svg.icon--muted {
  color: var(--text-muted);
}

/* ==========================================================================
   12. Cabeçalhos de página, catálogo e busca vazia
   ========================================================================== */

.page-heading {
  display: flex;
  flex-direction: column;
}

.page-heading--with-status {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.catalog-summary {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-summary > div {
  display: grid;
  gap: 0.125rem;
  padding: 1rem;
}

.catalog-summary > div + div {
  border-left: 1px solid var(--border-subtle);
}

.catalog-summary strong {
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: var(--leading-base);
  order: 2;
}

.catalog-summary span {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  order: 1;
}

.empty-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.empty-search > svg {
  width: 2rem;
  height: 2rem;
  color: var(--text-muted);
  stroke-width: 1.5;
}

.empty-search .button {
  margin-top: 0.75rem;
}

/* ==========================================================================
   13. Rota do CRM
   ========================================================================== */

.launch-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) 20rem;
}

.launch-card {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  grid-template-columns: auto minmax(0, 1fr);
}

.launch-card > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.launch-card__address {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.launch-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

.boundary-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.boundary-card__line {
  display: block;
  width: 2rem;
  height: 2px;
  border-radius: 999px;
  background: var(--color-accent);
}

.check-list {
  display: grid;
  gap: 0.5rem;
}

code {
  padding: 0.0625rem 0.25rem;
  border-radius: var(--radius-md);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* ==========================================================================
   14. Rota de Armazenamento
   ========================================================================== */

.access-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.access-note__icon {
  display: inline-flex;
  color: var(--warning);
}

.access-note__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 1.5;
}

.access-note div {
  display: grid;
  gap: 0.125rem;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.access-note strong {
  font-weight: 500;
}

.access-note span:last-child {
  color: var(--text-muted);
}

.metric-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  display: grid;
  gap: 0.125rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-card > span {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.metric-card strong {
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: var(--leading-base);
}

.metric-card small {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.ranking-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.ranking-card__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Estado "vazio" do Design B0: borda tracejada, ícone, título e explicação. */
.ranking-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  text-align: center;
}

.ranking-empty > svg {
  width: 2rem;
  height: 2rem;
  color: var(--warning);
  stroke-width: 1.5;
}

.ranking-empty strong {
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-base);
}

/* ==========================================================================
   15. Rota de Superadmin
   ========================================================================== */

.admin-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-identity__avatar {
  width: 3rem;
  height: 3rem;
  font-size: var(--text-base);
}

.admin-identity > div {
  display: grid;
  gap: 0.125rem;
}

.admin-identity p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.admin-hero__badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--badge-neutral-bg);
  color: var(--text);
}

.admin-hero__badge > svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent-content);
  stroke-width: 1.5;
}

.admin-hero__badge div {
  display: grid;
  gap: 0.125rem;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.admin-hero__badge div strong {
  font-weight: 500;
}

.admin-hero__badge div span {
  color: var(--badge-neutral-text);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.admin-scope {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-scope__grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-scope__grid article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.prototype-details {
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.prototype-details summary {
  display: flex;
  min-height: var(--control-h);
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: var(--leading-sm);
}

.prototype-details summary:hover {
  color: var(--color-accent-content);
}

.prototype-details > div {
  display: grid;
  gap: 0.5rem;
  padding-bottom: 1rem;
}

.prototype-details p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

/* ==========================================================================
   16. Rodapé e ausência de JavaScript
   ========================================================================== */

.page-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.page-footer a {
  color: var(--color-accent-content);
  font-weight: 500;
}

.page-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.noscript-message {
  margin: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--warning);
  border-radius: var(--radius-xl);
  background: var(--warning-soft);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

/* ==========================================================================
   17. Responsividade — breakpoints do Tailwind usados pelo CRM
   ========================================================================== */

@media (min-width: 64rem) {
  main {
    padding: 2rem;
  }

  .topbar {
    padding-inline: 2rem;
  }
}

@media (max-width: 80rem) {
  .topbar {
    grid-template-columns: minmax(10rem, 1fr) auto auto;
  }

  .demo-account {
    display: none;
  }

  .crm-feature {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .crm-feature__state {
    display: none;
  }

  .module-grid,
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Abaixo de lg o CRM troca a barra lateral por navegação compacta. */
@media (max-width: 1023px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: var(--banner-height);
    left: 0;
    width: min(20rem, calc(100vw - 3rem));
    pointer-events: none;
    transform: translateX(-105%);
    transition: transform 220ms ease, visibility 0s linear 220ms;
    visibility: hidden;
  }

  .nav-open .sidebar {
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
    visibility: visible;
  }

  .nav-link {
    min-height: var(--nav-item-h-mobile);
  }

  .nav-scrim {
    position: fixed;
    z-index: 65;
    inset: var(--banner-height) 0 0;
    display: block;
    border: 0;
    background: var(--scrim);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    grid-template-columns: auto 1fr auto auto;
    padding-block: 0.5rem;
  }

  .menu-button {
    display: inline-flex;
    width: var(--control-h);
    height: var(--control-h);
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border);
    border-bottom-color: var(--input-border-b);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    color: var(--text);
  }

  .menu-button svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 1.5;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
  }

  .mobile-brand strong {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1;
  }

  .mobile-brand strong span {
    color: var(--color-accent);
  }

  .mobile-brand > span {
    color: var(--text-muted);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
  }

  .search {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .theme-switcher {
    justify-self: end;
  }

  .module-grid,
  .catalog-grid,
  .admin-scope__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .launch-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 48rem) {
  .prototype-banner {
    align-items: center;
    flex-direction: column;
    gap: 0;
    padding-block: 0.375rem;
  }

  :root {
    --banner-height: calc(3rem * var(--type-scale));
  }

  .search input,
  .theme-switcher button {
    font-size: var(--text-sm);
  }

  /*
   * Em telas estreitas, seletor de tema e escala tipografica dividem uma
   * linha propria e a busca desce para a terceira, como o cabecalho movel do
   * CRM ja faz com o seletor de tema.
   */
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .theme-switcher {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
  }

  .type-scale {
    grid-row: 2;
    grid-column: 2;
    justify-self: end;
  }

  .search {
    grid-row: 3;
  }

  .theme-switcher button > span:last-child {
    display: none;
  }

  .section-heading,
  .page-heading--with-status,
  .ranking-card__heading,
  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-feature,
  .surface-grid,
  .module-grid,
  .catalog-grid,
  .metric-grid,
  .admin-scope__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-feature {
    align-items: stretch;
  }

  .crm-feature .button {
    width: 100%;
  }

  .catalog-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-summary > div + div {
    border-top: 1px solid var(--border-subtle);
    border-left: 0;
  }

  .launch-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 25rem) {
  main {
    padding: 1rem;
  }

  .topbar {
    gap: 0.5rem;
    padding-inline: 1rem;
  }

  .hero__copy,
  .prototype-state,
  .crm-feature,
  .launch-card,
  .boundary-card,
  .ranking-card,
  .admin-hero {
    padding: 1rem;
  }

  .hero__actions,
  .launch-card__actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .admin-identity {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .prototype-banner,
  .sidebar,
  .topbar,
  .nav-scrim {
    display: none;
  }

  .app-shell {
    display: block;
  }

  body,
  main {
    background: #fff;
    color: #111;
  }
}
