/* Monarcha /demo — mesma identidade do aplicativo 10.1.5. */
:root { --demo-header-height: 65px; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--demo-header-height) + 84px); }
body.monarcha-demo { min-width: 0; }
.demo-header {
  position: sticky; top: 0; z-index: 220;
  background: var(--v2-topbar-bg,rgba(20,23,28,.97));
  border-bottom: 1px solid var(--border); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.demo-header-inner {
  max-width: 1440px; margin: auto; min-height: 64px; padding: 10px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.demo-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--gold-ink); white-space: nowrap; }
.demo-brand-name { font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.demo-brand .crown-logo { width: 28px; height: 30px; }
.demo-brand small { font: 600 8px/1.5 var(--font); letter-spacing: 1px; border: 1px solid var(--border-gold); border-radius: 4px; padding: 3px 5px; }
.demo-header-links { display: flex; align-items: center; gap: 20px; min-width: 0; }
.demo-back { font-size: 11px; color: var(--muted); text-decoration: none; }
.demo-back:hover { color: var(--gold-ink); }
.btn-cta-primary, a.btn-cta-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #CF932D; color: #211706; border: 1px solid #CF932D; border-radius: 9px;
  font: 600 14px/1.4 var(--font); padding: 15px 24px; min-height: 48px;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow-gold);
  transition: filter .2s, transform .2s;
}
.btn-cta-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-cta-primary:disabled { cursor: progress; opacity: .7; }
.demo-signup { min-height: 44px !important; padding: 10px 15px !important; font-size: 11px !important; white-space: nowrap; gap: 5px !important; }
.demo-toolbar { display: flex; align-items: center; gap: 6px; }
.demo-mode-label { font-size: 10px; color: var(--muted); margin-right: 8px; white-space: nowrap; }
.demo-tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; min-width: 44px; padding: 8px 11px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font: 500 11px/1.4 var(--font); cursor: pointer; white-space: nowrap;
}
.demo-tool:hover { border-color: var(--gold); color: var(--gold-ink); background: var(--v2-warning-bg); }
.demo-tool .v2-icon { width: 16px; height: 16px; }
.demo-active .demo-back { display: none; }
.demo-active .app-shell { min-height: calc(100dvh - var(--demo-header-height)); }
.demo-active .app-sidebar { top: var(--demo-header-height); height: calc(100dvh - var(--demo-header-height)); }
.demo-active .v2-topbar { top: var(--demo-header-height); padding-top: 0; }
.demo-active .bottom-nav-spacer { display: none; }
#syncStatusBadge, .perfil-exclusao-section { display: none !important; }

/* Entrada e escolha de modo. Tipos, superfícies e botões do app. */
.demo-intro { position: relative; isolation: isolate; max-width: 1100px; margin: auto; padding: 58px 28px 0; text-align: center; }
.demo-hero-glow { position: absolute; z-index: -1; pointer-events: none; top: -60px; left: 15%; width: 70%; height: 500px; background: radial-gradient(ellipse,rgba(207,147,45,.07),transparent 68%); }
.demo-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border-gold); background: var(--v2-warning-bg); border-radius: 6px; color: var(--gold-ink); font-size: 9px; letter-spacing: 1.4px; font-weight: 600; }
.demo-badge i, .demo-local-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; background: var(--gold); flex: 0 0 auto; }
.demo-intro h1 { font-family: var(--v2-serif); color: var(--text); font-size: clamp(36px,4.8vw,58px); line-height: 1.15; letter-spacing: -.04em; font-weight: 700; margin: 24px 0 20px; }
.demo-intro .gradient-text { color: var(--gold-ink); background: none; -webkit-text-fill-color: currentColor; }
.demo-lead { max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.8; }
.demo-proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; color: var(--text-2); font-size: 11px; margin: 22px 0 32px; }
.demo-mode-section { max-width: 760px; margin: auto; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); text-align: left; box-shadow: var(--shadow-md); }
.demo-section-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.demo-step-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border-gold); border-radius: 8px; color: var(--gold-ink); font-size: 11px; flex: 0 0 auto; }
.demo-section-heading h2 { color: var(--text); font-size: 16px; margin: 0 0 4px; font-weight: 600; }
.demo-section-heading p { color: var(--muted); font-size: 11px; }
.demo-mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.demo-mode-card { display: flex; flex-direction: column; text-align: left; min-width: 0; border: 1px solid var(--border-strong); border-radius: 10px; padding: 20px; background: var(--v2-field-bg); color: var(--text); cursor: pointer; }
.demo-mode-card:hover { border-color: var(--gold); }
.demo-mode-card.is-selected { border-color: #CF932D; background: var(--v2-warning-bg); }
.demo-mode-top { display: flex; justify-content: space-between; width: 100%; color: var(--gold-ink); margin-bottom: 13px; }
.demo-mode-top > svg { width: 26px; height: 26px; }
.demo-selection { width: 20px; height: 20px; border: 1px solid var(--border-strong); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.is-selected .demo-selection { background: #CF932D; border-color: #CF932D; color: #211706; }
.demo-mode-card strong { font-size: 19px; font-weight: 600; margin-bottom: 5px; }
.demo-mode-card > span:not(.demo-mode-top) { font-size: 12px; color: var(--muted); line-height: 1.6; }
.demo-mode-card ul { list-style: none; border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px; width: 100%; }
.demo-mode-card li { font-size: 11px; line-height: 1.9; color: var(--text-2); }
.demo-mode-card li::before { content: '·'; margin-right: 7px; color: var(--gold-ink); }
.demo-start-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.demo-start-row > div { display: flex; align-items: center; gap: 12px; }
.demo-start-row p { font-size: 12px; color: var(--text); line-height: 1.7; }
.demo-start-row small { font-size: 10px; color: var(--muted); }
.demo-session-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 10px; color: var(--muted); line-height: 1.7; }
#demoStartError { color: var(--danger); font-size: 12px; line-height: 1.7; }
#demoStartError:empty { display: none; }
.demo-discover { padding: 58px 0; text-align: left; }
.demo-eyebrow { color: var(--gold-ink); font-size: 8px; font-weight: 600; letter-spacing: 1.5px; }
.demo-discover h2, .demo-faq h2 { font-family: var(--v2-serif); color: var(--text); font-size: 30px; margin: 10px 0 26px; letter-spacing: -.025em; line-height: 1.25; }
.demo-discover-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.demo-discover article { border-top: 1px solid var(--border-gold); padding-top: 22px; }
.demo-discover article > span { font-size: 9px; letter-spacing: 1.5px; color: var(--gold-ink); }
.demo-discover h3 { color: var(--text); font-size: 15px; margin: 14px 0 9px; }
.demo-discover p, .demo-faq p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.demo-faq { text-align: left; max-width: 760px; margin: auto; }
.demo-faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.demo-faq summary { font-size: 13px; min-height: 28px; cursor: pointer; color: var(--text-2); }
.demo-faq p { margin-top: 10px; }
.demo-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 48px; border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 10px; }
.demo-footer a { color: var(--gold-ink); text-decoration: none; font-weight: 600; }

/* Guia local, recolhível. Os controles financeiros continuam os mesmos. */
.demo-guide { margin: 0 var(--v2-gutter) 22px; padding: 18px 20px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; }
.demo-guide-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.demo-guide h2 { font-family: var(--v2-serif); color: var(--text); font-size: 20px; margin: 4px 0; letter-spacing: -.025em; }
.demo-guide-heading p { font-size: 11px; color: var(--muted); margin: 0; }
.demo-guide-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.demo-guide-actions button { display: flex; align-items: center; text-align: left; gap: 10px; padding: 11px 12px; min-height: 60px; background: var(--v2-field-bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-family: var(--font); cursor: pointer; min-width: 0; }
.demo-guide-actions button:hover { border-color: var(--gold); }
.demo-guide-actions b { color: var(--gold-ink); font-size: 16px; font-weight: 500; }
.demo-guide-actions span { min-width: 0; }
.demo-guide-actions strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.6; }
.demo-guide-actions small { display: block; font-size: 9px; color: var(--muted); line-height: 1.6; }
.demo-guide-actions i { margin-left: auto; color: var(--gold-ink); font-style: normal; }
.demo-guide-note { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; margin-top: 12px; line-height: 1.7; }
.demo-guide-note > span:last-child { margin-left: auto; }
.demo-guide-note .demo-local-dot { background: var(--success); }
.demo-highlight { outline: 2px solid #CF932D !important; outline-offset: 4px; }
.demo-table-scroll { min-width: 0; max-width: 100%; }
.demo-note { color: var(--muted); font-size: 12px; line-height: 1.7; }
.demo-toast { position: fixed; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%); z-index: 1200; max-width: calc(100vw - 24px); width: max-content; padding: 12px 18px; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-gold); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 12px; }
.demo-active #fabLancamentoRapido, .demo-active #bottomNav { position: fixed; }
.monarcha-demo .linha-fatura-cartao select.status-previsto { background: var(--v2-warning-bg); color: var(--gold-ink); border-color: var(--border-gold); }
.monarcha-demo .linha-fatura-cartao select.status-pago { background: var(--v2-positive-bg); color: var(--success); border-color: var(--v2-positive-border); }
.monarcha-demo .linha-fatura-cartao select.status-nao { background: var(--v2-muted-surface); color: var(--muted); border-color: var(--border); }

/* Tour: cores dos dois temas e destaque acima das respectivas barras. */
.monarcha-demo .tour-card { background: var(--bg-2); border: 1px solid var(--border-gold); border-radius: 14px; color: var(--text); max-height: calc(100dvh - var(--demo-header-height) - 128px); overflow-y: auto; overscroll-behavior: contain; bottom: calc(100px + env(safe-area-inset-bottom,0px)); width: min(420px,calc(100vw - 24px)); }
.monarcha-demo .tour-card[data-high="true"] { bottom: calc(160px + env(safe-area-inset-bottom,0px)); max-height: calc(100dvh - var(--demo-header-height) - 180px); }
.monarcha-demo .tour-card h3 { font-family: var(--v2-serif); font-size: 23px; color: var(--gold-ink); }
.monarcha-demo .tour-card p { color: var(--text-2); font-size: 13px; line-height: 1.75; }
.monarcha-demo :is(.tour-card-step,.tour-btn-skip) { color: var(--muted); }
.monarcha-demo .tour-btn-next { background: #CF932D; color: #211706; border-color: #CF932D; min-height: 44px; }
.monarcha-demo .tour-btn-skip { min-height: 44px; }
.monarcha-demo .tour-card-actions { flex-wrap: wrap; gap: 8px; }
.monarcha-demo .tour-dots { max-width: 100px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.monarcha-demo .tour-dot { background: var(--border-strong); }
.monarcha-demo .tour-dot.is-active { background: #CF932D; }
.monarcha-demo .tour-highlight { outline: 2px solid #CF932D !important; box-shadow: 0 0 0 4px rgba(207,147,45,.13) !important; }
.demo-active .app-sidebar:has(.tour-highlight),
.demo-active .v2-topbar:has(.tour-highlight) { z-index: 9001; }
.demo-active #bottomNav.tour-highlight,
.demo-active #fabLancamentoRapido.tour-highlight { z-index: 9001; }
@media (min-width: 901px) { .monarcha-demo .tour-card { left: calc(50% + var(--sidebar-w)/2); } }
