/* Coffrebox — cofre web. Visual da rodada 5 (direção "Apple" das pranchas 22 e 23), aplicado ao
 * app inteiro por variáveis e classes compartilhadas.
 *
 * A CSP do servidor (default-src 'self', sem 'unsafe-inline') bloqueia atributos style no HTML:
 * todo o visual mora aqui, em classes. Tema escuro é o padrão de :root; o claro entra com
 * html[data-theme="light"], que /assets/tema-inicial.js aplica antes da primeira pintura.
 * Contraste AA nos dois temas: --faint é só decorativo (ícones, bordas), nunca texto. */

/* ---------- Fonte: Inter variável auto-hospedada (@fontsource-variable/inter 5.3.0, OFL-1.1) ----------
 * Entra só onde a fonte do sistema da Apple não existe (-apple-system vem antes na pilha).
 * Versão e integridade em web/fonts.lock, conferidas por teste. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-opsz-normal.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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-opsz-normal.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;
}

/* ---------- Tokens ---------- */

html[data-theme="dark"],
:root {
  --bg: #000000;
  --bg-alt: #0B0B0C;
  --canvas: #000000;
  --surface: #1C1C1E;
  --surface2: #2C2C2E;
  --field: #2C2C2E;
  --fg: #F5F5F7;
  --muted: #A1A1A6;
  --faint: #86868B;
  --accent: #E3B341;
  --accent-fg: #000000;
  --gold: #D4A72C;
  --primary: #F5F5F7;
  --primary-fg: #000000;
  --primary-hover: #FFFFFF;
  --hover: rgba(255, 255, 255, 0.07);
  --ok: #30D158;
  --ok-fg: #FFFFFF;
  --ok-bg: rgba(48, 209, 88, 0.14);
  --ok-inv: #1B7F46;
  --danger: #FF6961;
  --danger-bg: rgba(255, 69, 58, 0.14);
  --danger-btn: #D92D20;
  --danger-inv: #B42318;
  --warn-bg: rgba(212, 167, 44, 0.16);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --ring: rgba(227, 179, 65, 0.40);
  --glass: rgba(22, 22, 23, 0.78);
  --backdrop: rgba(0, 0, 0, 0.55);
  --t1: #6E4AE0;
  --t2: #14866E;
  --t3: #C2511F;
  --t4: #2E6BE6;
  --g1: linear-gradient(145deg, #8E5CF7, #5B3BD6);
  --g2: linear-gradient(145deg, #34C7A5, #14866E);
  --g3: linear-gradient(145deg, #FF9F5A, #D9622B);
  --g4: linear-gradient(145deg, #5AA9FF, #2E6BE6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-3xl: 28px;
  --r-pill: 980px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #F5F5F7;
  --bg-alt: #F5F5F7;
  --canvas: #FFFFFF;
  --surface: #FFFFFF;
  --surface2: #F5F5F7;
  --field: #FFFFFF;
  --fg: #1D1D1F;
  --muted: #6E6E73;
  --faint: #86868B;
  --accent: #8A6400;
  --accent-fg: #FFFFFF;
  --gold: #B8901C;
  --primary: #1D1D1F;
  --primary-fg: #FFFFFF;
  --primary-hover: #000000;
  --hover: rgba(0, 0, 0, 0.04);
  --ok: #1B7F46;
  --ok-fg: #FFFFFF;
  --ok-bg: rgba(31, 138, 76, 0.10);
  --ok-inv: #30D158;
  --danger: #B42318;
  --danger-bg: rgba(180, 35, 24, 0.07);
  --danger-btn: #B42318;
  --danger-inv: #FF6961;
  --warn-bg: rgba(184, 144, 28, 0.13);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --ring: rgba(138, 100, 0, 0.22);
  --glass: rgba(255, 255, 255, 0.78);
  --backdrop: rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.cfb-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.cfb-body--canvas {
  background: var(--canvas);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

/* Link no meio de um texto: sublinhado sempre (a cor sozinha não basta no tema escuro). */
p a,
li > span a,
.cfb-hint a,
.cfb-sub a {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

code,
pre,
.cfb-mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

svg.cfb-ico {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.cfb-ico--b24 {
  stroke-width: 2.4;
}

svg.cfb-ico--b3 {
  stroke-width: 3;
}

.cfb-hidden {
  display: none !important;
}

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

.cfb-full-width {
  width: 100%;
}

/* Alvo de toque de pelo menos 44 px nos controles que desenham menos que isso: o ::after
 * transparente estende a área clicável sem mudar o desenho. */
.cfb-outline,
.cfb-icon-button,
.cfb-chip,
.cfb-ghost,
.cfb-link-button,
.cfb-button,
.cfb-seg button,
.cfb-topnav a,
.cfb-tabs a,
.cfb-close {
  position: relative;
}

.cfb-outline::after,
.cfb-icon-button::after,
.cfb-chip::after,
.cfb-ghost::after,
.cfb-link-button::after,
.cfb-button::after,
.cfb-seg button::after,
.cfb-topnav a::after,
.cfb-tabs a::after,
.cfb-close::after {
  content: "";
  position: absolute;
  top: min(0px, calc((100% - 44px) / 2));
  bottom: min(0px, calc((100% - 44px) / 2));
  left: min(0px, calc((100% - 44px) / 2));
  right: min(0px, calc((100% - 44px) / 2));
}

/* ---------- Marca ---------- */

.cfb-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  text-decoration: none;
  color: var(--fg);
}

.cfb-brand:hover {
  color: var(--fg);
  text-decoration: none;
}

.cfb-brand img {
  width: 26px;
  height: 26px;
}

.cfb-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.cfb-brand-box {
  color: var(--gold);
}

/* ---------- Telas de entrada (sem barra superior) ---------- */

.cfb-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cfb-auth-header {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
}

.cfb-auth-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cfb-auth-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 88px;
}

.cfb-auth-main--top {
  align-items: flex-start;
  padding-top: 16px;
}

.cfb-auth-col {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cfb-auth-col--440 {
  max-width: 460px;
}

.cfb-auth-col--480 {
  max-width: 500px;
}

.cfb-auth-col--560 {
  max-width: 580px;
}

.cfb-auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.cfb-auth-head--left {
  align-items: stretch;
  text-align: left;
  gap: 8px;
}

.cfb-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 28%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfb-auth-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 500;
}

.cfb-auth-foot {
  margin: 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

.cfb-auth-foot a {
  font-weight: 600;
}

/* ---------- Barra superior (vidro) e página do app ---------- */

.cfb-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cfb-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.cfb-topbar-inner {
  max-width: 1164px;
  min-height: 52px;
  margin: 0 auto;
  padding: 4px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cfb-topbar .cfb-brand-name {
  font-size: 17px;
}

.cfb-topbar .cfb-brand img {
  width: 24px;
  height: 24px;
}

.cfb-topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-grow: 1;
  min-height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cfb-topnav a {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.cfb-topnav a:hover {
  color: var(--fg);
  text-decoration: none;
}

.cfb-topnav a[aria-current="page"] {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--fg);
  font-weight: 600;
}

.cfb-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cfb-topbar-actions .cfb-outline {
  height: 32px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
  border-color: var(--border);
}

/* Avatar: círculo desenhado de 32 px dentro de um alvo de 44 px. */
.cfb-avatar {
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--g1);
  background-origin: content-box;
  background-clip: content-box;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.cfb-avatar::-webkit-details-marker {
  display: none;
}

.cfb-menu {
  position: relative;
}

.cfb-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cfb-menu-who {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.cfb-menu-who strong {
  font-size: 15px;
}

.cfb-menu-who span {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.cfb-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}

.cfb-menu-item:hover {
  background: var(--hover);
  color: var(--fg);
  text-decoration: none;
}

.cfb-menu-panel form {
  margin: 0;
}

.cfb-page {
  flex-grow: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 22px 72px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cfb-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.cfb-stack--24 {
  gap: 24px;
}

.cfb-stack--16 {
  gap: 16px;
}

.cfb-page--tight {
  padding: 32px 22px 96px;
  gap: 24px;
}

.cfb-page--narrow {
  max-width: 780px;
}

.cfb-footer {
  margin-top: auto;
}

.cfb-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 22px 32px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Tipografia ---------- */

.cfb-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.cfb-h1--hero {
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.cfb-h1--28 {
  font-size: 30px;
  letter-spacing: -0.03em;
}

.cfb-h1--30 {
  font-size: 34px;
}

.cfb-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.cfb-h2--16 {
  font-size: 17px;
}

.cfb-h2--17 {
  font-size: 17px;
}

.cfb-h2--xl {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cfb-sub {
  margin: 0;
  font-size: 17px;
  line-height: 1.47;
  color: var(--muted);
}

.cfb-sub--15 {
  font-size: 15px;
}

.cfb-sub--lg {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.cfb-hint {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: -0.005em;
}

.cfb-text-ok {
  color: var(--ok);
}

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

.cfb-text-accent {
  color: var(--accent);
}

/* ---------- Painéis ---------- */

.cfb-panel {
  background: var(--surface);
  border: 0;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cfb-panel--24 {
  padding: 26px;
  gap: 16px;
}

.cfb-panel--20 {
  padding: 22px;
  gap: 14px;
}

.cfb-panel--gap28 {
  gap: 28px;
}

/* ---------- Campos ---------- */

.cfb-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfb-field--10 {
  gap: 10px;
}

.cfb-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.cfb-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.cfb-input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--field);
  color: var(--fg);
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.cfb-input::placeholder,
.cfb-input-group input::placeholder,
.cfb-search input::placeholder,
.cfb-spotlight input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.cfb-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.cfb-input--mono {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0;
}

.cfb-input--code {
  height: 54px;
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.08em;
  text-align: center;
}

textarea.cfb-input {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

select.cfb-input {
  appearance: auto;
}

.cfb-input-group {
  display: flex;
  align-items: center;
  background: var(--field);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.cfb-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.cfb-input-group input {
  flex-grow: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 17px;
  outline: none;
}

.cfb-input-group .cfb-reveal {
  width: 48px;
  height: 46px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfb-input-group .cfb-reveal:hover {
  color: var(--fg);
}

.cfb-otp {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.cfb-otp legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}

.cfb-otp--17 legend {
  font-size: 17px;
}

.cfb-otp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.cfb-otp-grid--fixed {
  grid-template-columns: repeat(6, minmax(0, 54px));
}

.cfb-otp-grid input {
  height: 58px;
  min-width: 0;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--field);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 24px;
  outline: none;
  padding: 0;
}

.cfb-otp-grid input:focus {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.cfb-check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.cfb-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Botões ---------- */

.cfb-button {
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.cfb-button:hover {
  background: var(--primary-hover);
  color: var(--primary-fg);
  text-decoration: none;
}

.cfb-button--48 {
  height: 48px;
  padding: 0 22px;
}

.cfb-button--44 {
  height: 44px;
  padding: 0 20px;
  font-size: 16px;
}

.cfb-button--40 {
  height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

.cfb-button--sm {
  height: 32px;
  padding: 0 14px;
  font-size: 14px;
}

.cfb-button--danger {
  background: var(--danger-btn);
  color: #FFFFFF;
}

.cfb-button--danger:hover {
  background: var(--danger-btn);
  color: #FFFFFF;
  opacity: 0.9;
}

.cfb-outline {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cfb-outline:hover {
  color: var(--fg);
  background: var(--hover);
  text-decoration: none;
}

.cfb-outline--36 {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.cfb-outline--44 {
  height: 44px;
  padding: 0 18px;
}

.cfb-outline--48 {
  height: 48px;
  padding: 0 22px;
  font-size: 16px;
}

.cfb-outline--danger {
  color: var(--danger);
}

.cfb-outline--danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-bg);
}

.cfb-icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s var(--ease);
}

.cfb-icon-button:hover {
  background: var(--hover);
}

.cfb-icon-button--44 {
  width: 44px;
  height: 44px;
}

.cfb-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 3px;
}

.cfb-link-button:hover {
  text-decoration: underline;
}

.cfb-ghost {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.cfb-ghost:hover {
  color: var(--fg);
  background: var(--hover);
}

/* Botão redondo de fechar/ocultar (28 px desenhados, 44 px de alvo). */
.cfb-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cfb-close:hover {
  color: var(--fg);
}

/* ---------- Avisos ---------- */

.cfb-alert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 0;
  background: var(--danger-bg);
  font-size: 15px;
  line-height: 1.5;
}

.cfb-alert strong {
  color: var(--danger);
}

.cfb-alert--ok {
  background: var(--ok-bg);
}

.cfb-warn {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--warn-bg);
  font-size: 14px;
  line-height: 1.5;
}

.cfb-warn-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cfb-warn-row svg {
  color: var(--accent);
  margin-top: 1px;
}

.cfb-note {
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  line-height: 1.5;
}

.cfb-note svg {
  color: var(--muted);
  margin-top: 1px;
}

.cfb-note-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfb-note-text span {
  color: var(--muted);
}

.cfb-note--muted {
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border);
}

.cfb-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: calc(100% - 48px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: 15px;
}

.cfb-toast svg {
  color: var(--ok-inv);
}

/* ---------- Etapas do cadastro ---------- */

.cfb-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  flex-wrap: wrap;
}

.cfb-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.cfb-step[aria-current="step"] {
  color: var(--fg);
  font-weight: 600;
}

.cfb-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.cfb-step[aria-current="step"] .cfb-step-dot {
  border: 0;
  background: var(--primary);
  color: var(--primary-fg);
}

.cfb-step--done .cfb-step-dot {
  border: 0;
  background: var(--ok);
  color: var(--ok-fg);
}

.cfb-step-line {
  flex-grow: 1;
  min-width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--border-strong);
}

.cfb-step-line--done {
  background: var(--ok);
}

.cfb-howto {
  display: flex;
  gap: 16px;
}

.cfb-howto-n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.cfb-howto-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}

.cfb-howto-body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-qr-row {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cfb-qr {
  padding: 12px;
  border-radius: var(--r-xl);
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--border);
  line-height: 0;
}

.cfb-qr svg {
  width: 168px;
  height: 168px;
  display: block;
}

.cfb-qr svg path {
  fill: #14161F;
}

.cfb-manual {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 200px;
  min-width: 0;
}

.cfb-secret-key {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  overflow-wrap: anywhere;
}

.cfb-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Medidor de força da senha mestra */
.cfb-strength {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.cfb-strength span {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cfb-strength[data-nivel="1"] span:nth-child(-n + 1),
.cfb-strength[data-nivel="2"] span:nth-child(-n + 2) {
  background: var(--danger);
  box-shadow: none;
}

.cfb-strength[data-nivel="3"] span:nth-child(-n + 3) {
  background: var(--gold);
  box-shadow: none;
}

.cfb-strength[data-nivel="4"] span {
  background: var(--ok);
  box-shadow: none;
}

.cfb-strength-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.cfb-strength-label[data-nivel="1"],
.cfb-strength-label[data-nivel="2"] {
  color: var(--danger);
}

.cfb-strength-label[data-nivel="3"] {
  color: var(--accent);
}

.cfb-strength-label[data-nivel="4"] {
  color: var(--ok);
}

.cfb-rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.cfb-rules li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cfb-rules li svg {
  color: var(--faint);
}

.cfb-rules li.is-ok svg {
  color: var(--ok);
}

.cfb-rules li.is-bad {
  color: var(--danger);
}

.cfb-rules li.is-bad svg {
  color: var(--danger);
}

/* Códigos de recuperação */
.cfb-codes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cfb-codes {
  margin: 0;
  padding: 22px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 24px;
  border-radius: var(--r-xl);
  background: var(--surface2);
  border: 1px dashed var(--border-strong);
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.04em;
}

.cfb-codes li {
  display: flex;
  gap: 12px;
}

.cfb-codes li span {
  color: var(--muted);
  width: 22px;
  text-align: right;
  flex-shrink: 0;
}

/* ---------- Seus cofres (prancha 23) ---------- */

.cfb-pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.cfb-pagehead--center {
  align-items: center;
}

.cfb-pagehead-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cfb-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cfb-section-head--baseline {
  align-items: baseline;
}

.cfb-home {
  gap: 28px;
}

/* Busca grande, estilo Spotlight. */
.cfb-spotlight {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 18px;
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  cursor: text;
}

.cfb-spotlight:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cfb-spotlight input {
  flex-grow: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 19px;
  letter-spacing: -0.015em;
  outline: none;
}

.cfb-spotlight input::-webkit-search-cancel-button {
  cursor: pointer;
}

.cfb-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border-strong);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}

.cfb-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfb-results-mark {
  width: 36px;
  height: 36px;
  border-radius: 28%;
  font-size: 15px;
}

/* Resumo da conta e primeiros passos, lado a lado. */
.cfb-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

.cfb-status {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 22px 24px;
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--fg);
  text-decoration: none;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

a.cfb-status:hover {
  color: var(--fg);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}

.cfb-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--ok-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cfb-status--warn .cfb-status-icon {
  background: var(--warn-bg);
  color: var(--accent);
}

.cfb-status--neutral .cfb-status-icon {
  background: var(--surface2);
  color: var(--muted);
}

.cfb-status-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  min-width: 0;
}

.cfb-status-text strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cfb-status-text span {
  font-size: 14px;
  color: var(--muted);
}

.cfb-status-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.cfb-status .cfb-chev {
  color: var(--faint);
}

.cfb-status-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 15px;
  white-space: nowrap;
}

/* Anel de progresso dos primeiros passos (r = 18, perímetro 113,1). */
.cfb-ring {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.cfb-ring svg {
  display: block;
  transform: rotate(-90deg);
}

.cfb-ring circle {
  fill: none;
  stroke-width: 5;
}

.cfb-ring-track {
  stroke: var(--surface2);
}

.cfb-ring-arc {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 0 113.1;
}

.cfb-ring[data-feitos="1"] .cfb-ring-arc {
  stroke-dasharray: 37.7 113.1;
}

.cfb-ring[data-feitos="2"] .cfb-ring-arc {
  stroke-dasharray: 75.4 113.1;
}

.cfb-ring[data-feitos="3"] .cfb-ring-arc {
  stroke-dasharray: 113.1 113.1;
}

.cfb-ring-n {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.cfb-firststeps-head span {
  font-size: 14px;
  color: var(--muted);
}

.cfb-firststeps-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfb-progress {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  overflow: hidden;
}

.cfb-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ok);
}

.cfb-progress[data-feitos="1"] span {
  width: 33.3%;
}

.cfb-progress[data-feitos="2"] span {
  width: 66.6%;
}

.cfb-progress[data-feitos="3"] span {
  width: 100%;
}

.cfb-fs-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.cfb-fs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.cfb-fs-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.cfb-fs-title {
  font-size: 15px;
  font-weight: 600;
}

.cfb-fs a {
  font-size: 14px;
  font-weight: 600;
}

.cfb-fs--done {
  border-color: transparent;
  background: var(--surface2);
}

.cfb-fs--done .cfb-fs-tag {
  font-weight: 600;
  color: var(--ok);
}

.cfb-fs--next {
  border-color: var(--accent);
}

.cfb-fs--next .cfb-fs-tag {
  font-weight: 600;
  color: var(--accent);
}

.cfb-invite {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px 24px;
  border-radius: var(--r-2xl);
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.cfb-invite-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cfb-invite-text {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfb-invite-text strong {
  font-size: 17px;
  font-weight: 600;
}

.cfb-invite-text span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-invite-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 18px;
  border-radius: var(--r-lg);
  background: var(--surface2);
}

.cfb-invite-code span {
  font-size: 12px;
  color: var(--muted);
}

.cfb-invite-code strong {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.cfb-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  flex: 0 1 300px;
  min-width: 0;
}

.cfb-search--grow {
  flex: 1 1 280px;
}

.cfb-search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cfb-col-main > .cfb-search,
.cfb-stack > .cfb-search {
  flex: none;
}

.cfb-panel > .cfb-link-button {
  align-self: flex-start;
}

.cfb-toast--erro svg {
  color: var(--danger-inv);
}

.cfb-search input {
  flex-grow: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 16px;
  outline: none;
}

.cfb-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.cfb-vault-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 196px;
  padding: 24px;
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 0;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--fg);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

a.cfb-vault-card:hover {
  color: var(--fg);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.cfb-vault-card--pending {
  background: transparent;
  box-shadow: none;
  border: 2px dashed var(--border-strong);
}

.cfb-vault-card--new {
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  box-shadow: none;
  border: 2px dashed var(--border-strong);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

a.cfb-vault-card--new:hover {
  color: var(--fg);
  box-shadow: none;
  border-color: var(--muted);
}

.cfb-new-plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfb-vault-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cfb-vault-card-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cfb-vault-card-name strong {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.cfb-vault-card-name span {
  font-size: 14px;
  color: var(--muted);
}

.cfb-vault-card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Marca de cofre: "squircle" com degradê. A letra repete o nome ao lado (decorativa). */
.cfb-mark {
  width: 44px;
  height: 44px;
  border-radius: 28%;
  background: var(--g1);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.cfb-mark--lg {
  width: 56px;
  height: 56px;
  font-size: 23px;
}

.cfb-mark--t2 {
  background: var(--g2);
}

.cfb-mark--t3 {
  background: var(--g3);
}

.cfb-mark--t4 {
  background: var(--g4);
}

.cfb-mark--plain {
  background: var(--surface2);
  color: var(--fg);
}

.cfb-mark--wait {
  background: var(--warn-bg);
  color: var(--accent);
}

.cfb-avatars {
  display: flex;
}

.cfb-avatars span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--t1);
  color: #FFFFFF;
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

/* Sobreposição pequena e o primeiro por cima: as duas letras de cada inicial ficam inteiras. */
.cfb-avatars span + span {
  margin-left: -4px;
}

.cfb-avatars span:nth-child(1) {
  background: var(--accent);
  color: var(--accent-fg);
  position: relative;
  z-index: 3;
}

.cfb-avatars span:nth-child(2) {
  background: var(--t4);
  position: relative;
  z-index: 2;
}

.cfb-avatars span:nth-child(3) {
  background: var(--t3);
  position: relative;
  z-index: 1;
}

.cfb-empty {
  padding: 36px 24px;
  border-radius: var(--r-2xl);
  border: 2px dashed var(--border-strong);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.cfb-vault-grid > .cfb-empty {
  grid-column: 1 / -1;
}

.cfb-empty strong {
  color: var(--fg);
  font-size: 19px;
  letter-spacing: -0.02em;
}

/* ---------- Cofre aberto ---------- */

.cfb-crumbs {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.cfb-crumbs a {
  font-weight: 500;
}

.cfb-vault-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.cfb-vault-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cfb-vault-head-text span {
  font-size: 15px;
  color: var(--muted);
}

.cfb-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Abas do cofre: controle segmentado em pílula. */
.cfb-tabs {
  display: flex;
  align-self: flex-start;
  max-width: 100%;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.cfb-tabs a {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.cfb-tabs a:hover {
  color: var(--fg);
  text-decoration: none;
}

.cfb-tabs a[aria-current="page"] {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--fg);
  font-weight: 600;
}

html[data-theme="light"] .cfb-tabs {
  background: rgba(0, 0, 0, 0.05);
}

.cfb-tab-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--border);
  font-size: 12px;
  text-align: center;
}

.cfb-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.cfb-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cfb-chip {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
}

.cfb-chip:hover {
  background: var(--hover);
}

.cfb-chip[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
}

.cfb-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 0;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Lista dentro de um cartão: sem sombra, só o contorno (cartão dentro de cartão pesa). */
.cfb-panel .cfb-rows,
.cfb-dialog .cfb-rows {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: var(--r-lg);
}

.cfb-rows > li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.cfb-rows > li:last-child {
  border-bottom: 0;
}

.cfb-rows > li.cfb-hint,
.cfb-rows > li.cfb-empty {
  min-height: 0;
}

.cfb-rows > li.cfb-empty {
  border: 0;
  border-radius: 0;
  padding: 32px 24px;
  flex-direction: column;
}

.cfb-rows > li.cfb-hint {
  padding: 18px 20px;
}

.cfb-rows--wrap > li {
  flex-wrap: wrap;
}

.cfb-rows--roomy > li {
  gap: 16px;
  padding: 18px 22px;
  flex-wrap: wrap;
}

.cfb-row-mark {
  width: 40px;
  height: 40px;
  border-radius: 28%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0;
  flex-shrink: 0;
}

.cfb-row-mark--accent {
  color: var(--accent);
}

.cfb-row-mark--muted {
  color: var(--muted);
}

.cfb-row-mark--ok {
  color: var(--ok);
}

.cfb-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--fg);
}

a.cfb-row-main {
  min-height: 44px;
  justify-content: center;
}

.cfb-row-main:hover {
  color: var(--fg);
  text-decoration: none;
}

a.cfb-row-main:hover .cfb-row-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cfb-row-main--220 {
  flex: 1 1 220px;
}

.cfb-row-main--260 {
  flex: 1 1 260px;
}

.cfb-row-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfb-row-title--mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
  font-size: 16px;
}

.cfb-row-title--secret {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.cfb-row-sub {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfb-row-sub--13 {
  font-size: 13px;
}

.cfb-dots {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.cfb-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--surface2);
  color: var(--muted);
  white-space: nowrap;
}

.cfb-pill--ok {
  color: var(--ok);
  background: var(--ok-bg);
}

.cfb-pill--danger {
  color: var(--danger);
  background: var(--danger-bg);
}

.cfb-pill--sm {
  font-size: 12px;
  padding: 3px 9px;
}

.cfb-two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.cfb-col-main {
  flex: 2 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cfb-col-main--560 {
  flex-basis: 560px;
}

.cfb-col-side {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cfb-col-side--300 {
  flex-basis: 300px;
}

.cfb-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.cfb-steps-list li {
  display: flex;
  gap: 10px;
}

.cfb-steps-list li > span:first-child {
  color: var(--accent);
  font-weight: 700;
}

.cfb-steps-list code {
  font-size: 13px;
}

.cfb-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface2);
  border: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: auto;
}

.cfb-rows > li.cfb-rows-stack {
  flex-direction: column;
  align-items: stretch;
}

.cfb-rows-line {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cfb-menu > summary {
  list-style: none;
}

.cfb-menu > summary::-webkit-details-marker {
  display: none;
}

.cfb-menu .cfb-confirm {
  min-width: 260px;
}

.cfb-input--num {
  width: 96px;
  height: 40px;
}

/* ---------- Item ---------- */

.cfb-fields {
  flex: 2 1 520px;
  min-width: 0;
  background: var(--surface);
  border: 0;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cfb-fieldrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.cfb-fieldrow:last-child {
  border-bottom: 0;
}

.cfb-fieldrow--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.cfb-fieldrow-body {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfb-fieldrow-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.cfb-fieldrow-value {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.cfb-fieldrow-value--secret {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.12em;
}

.cfb-fieldrow-value--revealed {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0;
}

.cfb-fieldrow-value--note {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.cfb-totp-code {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.cfb-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.cfb-countdown svg circle {
  fill: none;
  stroke-width: 3;
}

.cfb-countdown .cfb-cd-track {
  stroke: var(--border-strong);
}

.cfb-countdown .cfb-cd-arc {
  stroke: var(--ok);
}

.cfb-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cfb-timeline li {
  display: flex;
  gap: 12px;
}

.cfb-timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.cfb-timeline li:first-child .cfb-timeline-dot {
  background: var(--gold);
}

.cfb-timeline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  min-width: 0;
}

.cfb-timeline-text strong {
  font-weight: 600;
}

.cfb-timeline-text span {
  color: var(--muted);
}

.cfb-version {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface2);
  font-size: 14px;
}

.cfb-version-value {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

/* ---------- Novo cofre ---------- */

.cfb-choices {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  min-width: 0;
}

.cfb-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: var(--r-2xl);
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.2s var(--ease);
}

.cfb-choice:has(input:checked) {
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--accent);
}

.cfb-choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.cfb-choice-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cfb-choice-top input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.cfb-choice strong {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cfb-choice span {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-choice .cfb-mark {
  color: #FFFFFF;
}

.cfb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Acessos de sistemas ---------- */

.cfb-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-xl);
  border: 1px solid var(--danger);
  background: var(--surface);
  width: 100%;
}

.cfb-confirm-title {
  font-size: 17px;
  font-weight: 600;
}

.cfb-confirm ul {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-confirm li + li {
  margin-top: 6px;
}

.cfb-rows > li.is-confirming {
  background: var(--danger-bg);
}

.cfb-done-tag {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ok);
}

.cfb-token-box {
  flex: 1 1 360px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface2);
  border: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
}

/* ---------- Rodada 4: conta, diálogo de identidade, pessoas, configurações, item ---------- */

.cfb-page--640 {
  max-width: 660px;
}

.cfb-stack--6 {
  gap: 6px;
}

.cfb-stack--10 {
  gap: 10px;
}

.cfb-stack--14 {
  gap: 14px;
}

.cfb-panel--gap24 {
  gap: 24px;
}

.cfb-h1--26 {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.cfb-strong {
  font-weight: 600;
}

.cfb-hint--fg {
  color: var(--fg);
}

.cfb-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cfb-split-text {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cfb-fp {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  display: inline-block;
  overflow-wrap: anywhere;
}

.cfb-fp b {
  color: var(--accent);
  font-weight: 600;
}

.cfb-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
  color: var(--fg);
  white-space: nowrap;
}

.cfb-tag--ok {
  background: var(--ok-bg);
  border: 0;
  color: var(--ok);
}

.cfb-tag--wait {
  background: var(--warn-bg);
  border: 0;
  color: var(--accent);
}

.cfb-pips {
  display: flex;
  gap: 6px;
}

.cfb-pips span {
  flex: 0 1 28px;
  min-width: 10px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cfb-pips[data-restam="1"] span:nth-child(-n + 1),
.cfb-pips[data-restam="2"] span:nth-child(-n + 2),
.cfb-pips[data-restam="3"] span:nth-child(-n + 3) {
  background: var(--danger);
  box-shadow: none;
}

.cfb-pips[data-restam="4"] span:nth-child(-n + 4),
.cfb-pips[data-restam="5"] span:nth-child(-n + 5),
.cfb-pips[data-restam="6"] span:nth-child(-n + 6),
.cfb-pips[data-restam="7"] span:nth-child(-n + 7),
.cfb-pips[data-restam="8"] span:nth-child(-n + 8),
.cfb-pips[data-restam="9"] span:nth-child(-n + 9),
.cfb-pips[data-restam="10"] span {
  background: var(--ok);
  box-shadow: none;
}

/* Controle segmentado (tema, tipo do item, formato do gerador). */
.cfb-seg {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r-md);
  background: var(--surface2);
  box-shadow: inset 0 0 0 1px var(--border);
  flex-wrap: wrap;
}

html[data-theme="light"] .cfb-seg {
  background: rgba(118, 118, 128, 0.12);
  box-shadow: none;
}

.cfb-seg button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.cfb-seg button:hover {
  color: var(--fg);
}

.cfb-seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .cfb-seg button[aria-pressed="true"] {
  background: #636366;
}

.cfb-details summary {
  cursor: pointer;
  min-height: 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
}

.cfb-details[open] summary {
  margin-bottom: 12px;
}

.cfb-check--top {
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
}

.cfb-check--top input {
  margin-top: 2px;
}

.cfb-dialog {
  width: calc(100% - 32px);
  max-width: 480px;
  padding: 0;
  border: 0;
  border-radius: var(--r-3xl);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] .cfb-dialog,
:root:not([data-theme]) .cfb-dialog {
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}

.cfb-dialog::backdrop {
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cfb-dialog-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cfb-input-group .cfb-reveal-text {
  border: 0;
  margin-right: 6px;
  color: var(--muted);
}

.cfb-input-group > input.cfb-input-plain {
  flex-grow: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 17px;
  outline: none;
}

.cfb-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  color: #FFFFFF;
  background: var(--t1);
  flex-shrink: 0;
}

.cfb-avatar-sm--t2 {
  background: var(--t2);
}

.cfb-avatar-sm--t3 {
  background: var(--t3);
}

.cfb-avatar-sm--t4 {
  background: var(--t4);
}

.cfb-avatar-sm--me {
  background: var(--accent);
  color: var(--accent-fg);
}

.cfb-avatar-sm--wait {
  background: var(--surface2);
  color: var(--muted);
}

.cfb-note-warn {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--warn-bg);
  border: 0;
  font-size: 14px;
  line-height: 1.5;
}

.cfb-note-warn svg {
  color: var(--accent);
  margin-top: 1px;
}

.cfb-form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.cfb-form-row > .cfb-field {
  flex: 1 1 220px;
  min-width: 0;
}

.cfb-form-row > .cfb-field--4 {
  flex: 0 0 120px;
}

.cfb-rows > li.is-danger {
  background: var(--danger-bg);
}

.cfb-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cfb-kv-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cfb-activity-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.cfb-gen {
  border: 0;
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface2);
}

html[data-theme="dark"] .cfb-gen {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cfb-gen input[type="range"] {
  flex: 1 1 200px;
  accent-color: var(--accent);
}

.cfb-gen-bar {
  flex: 0 0 140px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
  overflow: hidden;
}

.cfb-gen-bar span {
  display: block;
  height: 100%;
  width: 0;
}

.cfb-gen-bar[data-nivel="1"] span,
.cfb-gen-bar[data-nivel="2"] span {
  width: 40%;
  background: var(--danger);
}

.cfb-gen-bar[data-nivel="3"] span {
  width: 70%;
  background: var(--gold);
}

.cfb-gen-bar[data-nivel="4"] span {
  width: 100%;
  background: var(--ok);
}

.cfb-lacre {
  box-shadow: var(--shadow-sm), inset 0 0 0 2px var(--danger);
}

.cfb-lacre-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cfb-lacre-head > svg {
  color: var(--danger);
  margin-top: 4px;
}

.cfb-optional {
  color: var(--muted);
  font-weight: 400;
}

.cfb-lacre-rotulo {
  min-width: 48px;
}

.cfb-confirm-inline {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfb-rows > li > .cfb-alert-seal {
  flex-basis: 100%;
}

.cfb-text-muted {
  color: var(--muted);
}

.cfb-inline--nowrap {
  flex-wrap: nowrap;
}

.cfb-inline--nowrap > .cfb-input {
  flex: 1 1 auto;
}

.cfb-icon-button--48 {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.cfb-gen-rotulo {
  min-width: 92px;
}

.cfb-confirm-head {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

/* ---------- Componentes antigos (Conta e segurança e seções provisórias até a rodada 4) ---------- */

.cfb-card {
  background: var(--surface);
  border: 0;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.cfb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.cfb-section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cfb-card-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.cfb-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cfb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.cfb-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cfb-list-item {
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cfb-mono-box {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface2);
  border: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cfb-muted-sm {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cfb-select,
.cfb-textarea {
  width: 100%;
  min-width: 0;
  padding: 0 14px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--field);
  color: var(--fg);
  font-size: 17px;
}

.cfb-textarea {
  height: auto;
  padding: 12px 14px;
}

.cfb-input-mono {
  font-family: var(--font-mono);
}

.cfb-row > .cfb-input {
  flex: 1 1 200px;
  width: auto;
}

.cfb-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.cfb-btn-primary {
  border: 0;
  background: var(--primary);
  color: var(--primary-fg);
}

.cfb-btn-primary:hover {
  color: var(--primary-fg);
  background: var(--primary-hover);
}

.cfb-btn-ghost:hover {
  background: var(--hover);
  color: var(--fg);
}

.cfb-btn-danger {
  color: var(--danger);
}

.cfb-btn-danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.cfb-btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.cfb-alert-seal {
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 0;
  background: var(--danger-bg);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cfb-alert-seal strong {
  color: var(--danger);
}

.cfb-alert-ok {
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 0;
  background: var(--ok-bg);
  font-size: 15px;
  line-height: 1.5;
}

.cfb-badge {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--surface2);
  color: var(--muted);
}

.cfb-badge-danger {
  color: var(--danger);
  background: var(--danger-bg);
}

.cfb-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ---------- Página inicial pública (prancha 22) ---------- */

.cfb-lp {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--fg);
}

.cfb-skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 15px;
}

.cfb-skip:focus {
  top: 12px;
}

.cfb-lp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.cfb-lp-nav-in {
  max-width: 1068px;
  min-height: 52px;
  margin: 0 auto;
  padding: 4px 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.cfb-lp-nav .cfb-brand-name {
  font-size: 17px;
}

.cfb-lp-nav .cfb-brand img {
  width: 24px;
  height: 24px;
}

.cfb-lp-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-grow: 1;
  font-size: 13px;
}

.cfb-lp-links a,
.cfb-lp-entrar {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  opacity: 0.8;
  font-size: 13px;
  text-decoration: none;
}

.cfb-lp-links a:hover,
.cfb-lp-entrar:hover {
  opacity: 1;
  text-decoration: none;
}

.cfb-lp-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.cfb-lp-wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
}

.cfb-lp-hero {
  padding: 110px 22px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cfb-lp-eyebrow {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}

.cfb-lp-display {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 7.6vw, 80px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.cfb-lp-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.cfb-lp-lede {
  margin: 0;
  max-width: 660px;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.38;
  color: var(--muted);
  letter-spacing: -0.015em;
}

.cfb-lp-hero .cfb-lp-lede {
  margin-top: 22px;
}

.cfb-lp-ctas {
  display: flex;
  gap: 18px 26px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.cfb-button--lp {
  height: 48px;
  padding: 0 26px;
  font-size: 17px;
}

.cfb-lp-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 19px;
}

.cfb-lp-more svg {
  width: 11px;
  height: 11px;
}

/* Janela do produto (decorativa, só HTML e CSS). */
.cfb-lp-window-wrap {
  position: relative;
  max-width: 1004px;
  margin: 72px auto 0;
  padding: 0 22px;
}

.cfb-lp-glow {
  position: absolute;
  inset: 40px 80px -30px;
  background: radial-gradient(ellipse at center, rgba(212, 167, 44, 0.30), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.cfb-lp-window {
  position: relative;
  background: var(--bg-alt);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: left;
  user-select: none;
}

.cfb-lp-window-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.cfb-lp-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF5F57;
  flex-shrink: 0;
}

.cfb-lp-light--2 {
  background: #FEBC2E;
}

.cfb-lp-light--3 {
  background: #28C840;
}

.cfb-lp-url {
  flex-grow: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-right: 52px;
}

.cfb-lp-window-body {
  padding: 36px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cfb-lp-window-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.cfb-lp-hi {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.cfb-lp-hi-sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.cfb-lp-fake-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.cfb-lp-fake-search {
  height: 44px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.cfb-lp-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cfb-lp-tile {
  background: var(--surface);
  border-radius: var(--r-2xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.cfb-lp-tile .cfb-mark {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.cfb-lp-tile-text {
  min-width: 0;
}

.cfb-lp-tile-text strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cfb-lp-tile-text span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* Seções */
.cfb-lp-sec {
  padding: 120px 0;
  scroll-margin-top: 52px;
}

.cfb-lp-sec--alt {
  background: var(--bg-alt);
}

.cfb-lp-sec--first {
  margin-top: 120px;
}

.cfb-lp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.cfb-lp-intro {
  margin-bottom: 56px;
}

.cfb-lp-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cfb-lp-card {
  background: var(--surface);
  border-radius: var(--r-3xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-height: 260px;
  min-width: 0;
}

.cfb-lp-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cfb-lp-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.47;
  color: var(--muted);
}

.cfb-lp-span2 {
  grid-column: span 2;
}

.cfb-lp-foot {
  margin-top: auto;
}

.cfb-lp-flow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cfb-lp-chip {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--surface2);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfb-lp-chip--muted {
  color: var(--muted);
}

.cfb-lp-arrow {
  color: var(--gold);
  flex-shrink: 0;
}

.cfb-lp-otp {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.cfb-lp-otp span,
.cfb-lp-fp-dim {
  color: var(--muted);
}

.cfb-lp-fp {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0;
  color: var(--muted);
}

.cfb-lp-fp b {
  color: var(--gold);
  font-weight: 600;
  font-size: 22px;
}

/* Tile "Para sistemas": sempre escuro, nos dois temas. */
.cfb-lp-card--dark {
  background: #0B0B0C;
  color: #F5F5F7;
}

html[data-theme="dark"] .cfb-lp-card--dark,
:root:not([data-theme]) .cfb-lp-card--dark {
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border);
}

.cfb-lp-card--dark p {
  color: #A1A1A6;
}

.cfb-lp-code {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--r-2xl);
  background: #1C1C1E;
  color: #F5F5F7;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: auto;
  white-space: pre;
}

.cfb-lp-code:focus-visible {
  outline-color: #E3B341;
}

.cfb-lp-k {
  color: #FF7AB2;
}

.cfb-lp-s {
  color: #FC6A5D;
}

.cfb-lp-f {
  color: #67B7A4;
}

.cfb-lp-c {
  color: #8E9AA6;
}

/* O que o servidor vê */
.cfb-lp-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.cfb-lp-card--flat {
  background: var(--bg-alt);
  box-shadow: none;
  min-height: 0;
}

html[data-theme="light"] .cfb-lp-card--flat {
  background: #F5F5F7;
}

.cfb-lp-card--flat h3 {
  font-size: 22px;
}

.cfb-lp-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.cfb-lp-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 19px;
  letter-spacing: -0.015em;
}

.cfb-lp-list li:last-child {
  border-bottom: 0;
}

.cfb-lp-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--ok);
  color: #FFFFFF;
}

.cfb-lp-dot--no {
  background: var(--surface2);
  color: var(--muted);
}

html[data-theme="light"] .cfb-lp-dot--no {
  background: #FFFFFF;
}

.cfb-lp-threat {
  margin: 40px 0 0;
  text-align: center;
  font-size: 17px;
}

.cfb-lp-threat a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  text-decoration: none;
}

.cfb-lp-threat a:hover {
  text-decoration: underline;
}

.cfb-lp-cta .cfb-lp-lede {
  max-width: 560px;
}

.cfb-lp-cta .cfb-lp-ctas {
  margin-top: 16px;
}

.cfb-lp-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.cfb-lp-footer-in {
  padding-top: 20px;
  padding-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.cfb-lp-footer-links {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
}

.cfb-lp-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}

.cfb-lp-footer-links a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* ---------- Movimento ---------- */

@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}

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

  a.cfb-vault-card:hover {
    transform: none;
  }
}

/* ---------- Telas médias ---------- */

@media (max-width: 900px) {
  .cfb-lp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cfb-lp-bento .cfb-lp-span2 {
    grid-column: 1 / -1;
  }

  .cfb-lp-links {
    display: none;
  }

  .cfb-lp-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Telas estreitas ---------- */

@media (max-width: 640px) {
  .cfb-auth-header {
    padding: 12px 16px;
  }

  .cfb-topbar-inner {
    padding: 4px 16px;
    gap: 4px 12px;
  }

  .cfb-topnav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .cfb-topbar-actions {
    margin-left: auto;
  }

  .cfb-page {
    padding: 28px 16px 64px;
    gap: 24px;
  }

  .cfb-page--tight {
    padding: 20px 16px 88px;
  }

  .cfb-footer-inner {
    padding: 8px 16px 28px;
    flex-direction: column;
    gap: 2px;
  }

  .cfb-footer-sep {
    display: none;
  }

  .cfb-panel {
    padding: 22px;
  }

  .cfb-panel--20 {
    padding: 20px;
  }

  .cfb-dialog-body {
    padding: 24px;
  }

  .cfb-h1 {
    font-size: 32px;
  }

  .cfb-h1--hero {
    font-size: 36px;
  }

  .cfb-h1--30 {
    font-size: 28px;
  }

  .cfb-h1--28 {
    font-size: 26px;
  }

  .cfb-h1--26 {
    font-size: 24px;
  }

  .cfb-h2--xl {
    font-size: 24px;
  }

  .cfb-sub--lg {
    font-size: 17px;
  }

  .cfb-otp-grid--fixed {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .cfb-rows > li {
    padding: 12px 14px;
    gap: 10px;
  }

  .cfb-rows > li .cfb-outline span.cfb-hide-sm {
    display: none;
  }

  .cfb-toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    max-width: none;
  }

  .cfb-search {
    flex-basis: 100%;
  }

  .cfb-spotlight {
    height: 52px;
    padding: 0 16px;
  }

  .cfb-spotlight input {
    font-size: 17px;
  }

  .cfb-spotlight .cfb-kbd {
    display: none;
  }

  .cfb-status {
    padding: 18px;
    gap: 14px;
  }

  .cfb-vault-card {
    min-height: 0;
    padding: 20px;
  }

  .cfb-vault-card--new {
    min-height: 120px;
  }

  /* Quatro abas (cofre para sistemas) não cabem numa pílula de 390 px: quebram em duas linhas. */
  .cfb-tabs {
    flex-wrap: wrap;
    border-radius: var(--r-xl);
  }

  .cfb-tabs a {
    padding: 0 13px;
  }

  /* Página inicial */
  .cfb-lp-nav-in {
    padding: 4px 16px;
    gap: 12px;
  }

  .cfb-lp-nav-actions {
    gap: 12px;
  }

  .cfb-lp-hero {
    padding: 64px 16px 0;
  }

  .cfb-lp-eyebrow {
    font-size: 15px;
  }

  .cfb-lp-wrap {
    padding: 0 16px;
  }

  .cfb-lp-window-wrap {
    margin-top: 48px;
    padding: 0 16px;
  }

  .cfb-lp-glow {
    inset: 20px 10px -20px;
  }

  .cfb-lp-url {
    margin-right: 0;
  }

  .cfb-lp-window-body {
    padding: 22px 18px 24px;
    gap: 16px;
  }

  .cfb-lp-hi {
    font-size: 22px;
  }

  .cfb-lp-tiles {
    gap: 10px;
  }

  .cfb-lp-tile {
    padding: 14px;
    gap: 10px;
    border-radius: var(--r-xl);
  }

  .cfb-lp-tile .cfb-mark {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .cfb-lp-tile-text strong {
    font-size: 15px;
  }

  .cfb-lp-sec {
    padding: 80px 0;
  }

  .cfb-lp-sec--first {
    margin-top: 80px;
  }

  .cfb-lp-intro {
    margin-bottom: 40px;
  }

  .cfb-lp-bento,
  .cfb-lp-duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .cfb-lp-card {
    padding: 26px;
    min-height: 0;
    border-radius: var(--r-2xl);
  }

  .cfb-lp-card h3 {
    font-size: 24px;
  }

  .cfb-lp-otp {
    font-size: 36px;
  }

  .cfb-lp-code {
    font-size: 13px;
    padding: 16px;
  }

  .cfb-lp-list li {
    font-size: 17px;
  }
}

/* ---------- Impressão (códigos de recuperação) ---------- */

/* ---------- Extensão do navegador (prancha 32) ---------- */

.cfb-ext-lede {
  max-width: 760px;
}

.cfb-ext-escolha {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cfb-panel.cfb-ext-card {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 40px;
}

.cfb-panel.cfb-ext-card.cfb-hidden {
  display: none;
}

.cfb-ext-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.cfb-ext-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface2);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfb-ext-off {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.cfb-ext-passos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: cfb-passo;
}

.cfb-ext-passos li {
  display: flex;
  gap: 14px;
  font-size: 16px;
  line-height: 1.55;
  counter-increment: cfb-passo;
}

.cfb-ext-passos li::before {
  content: counter(cfb-passo);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfb-ext-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 30px;
  padding: 2px 4px 2px 10px;
  border-radius: 8px;
  background: var(--surface2);
  vertical-align: middle;
  box-sizing: border-box;
}

.cfb-ext-code code {
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.cfb-ext-copy {
  flex-shrink: 0;
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.cfb-ext-nota {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.cfb-ext-nota--centro {
  text-align: center;
}

@media (max-width: 760px) {
  .cfb-panel.cfb-ext-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
  }
}

@media print {
  .cfb-topbar,
  .cfb-footer,
  .cfb-auth-header,
  .cfb-no-print,
  .cfb-steps,
  .cfb-toast {
    display: none !important;
  }

  body.cfb-body {
    background: #FFFFFF;
    color: #000000;
  }

  .cfb-panel,
  .cfb-codes {
    border: 1px solid #999999;
    box-shadow: none;
    background: #FFFFFF;
  }
}
