/* ─── shared.css — subconjunto de style.css usado pelo Guia e pela Vitrine ───
   Gerado a partir de cobertura de CSS real (Chrome DevTools CSS.getRuleUsage,
   16 páginas do Guia + Vitrine com todos os estados forçados, claro e escuro)
   em 2026-09-22 — ver ADR novo em ARCHITECTURE_DECISIONS.md.
   ─────────────────────────────────────────────────────────────────────── */

:root {
  --blue:             #0D1B3D;
  --green:            #16A34A;
  --green-light-bg:   #DCFCE7;
  --green-light-text: #15803D;
  --bg:               #F1F3F5;
  --text:             #111827;
  --muted:            #566074;
  --card:             #ffffff;
  --line:             #E5E7EB;
  --func-bg:          #F3F4F6;
  --danger:           #B42318;
  --radius:           24px;
  --shadow:           0 8px 32px rgba(13, 27, 61, 0.08);
}
* { box-sizing: border-box; }

/* Foco visível pro teclado (a11y) — só aparece em navegação por teclado,
   nunca em toque/clique de mouse (:focus-visible já filtra isso). */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
body {
  display: flex;
  justify-content: center;
}
.app {
  width: 100%;
  max-width: 430px;
  min-height: auto;
  background: var(--card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.main {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}
.actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.primary,
.secondary {
  width: 100%;
  border: 0;
  border-radius: 16px;
  font-weight: 750;
  font-size: 16px;
  padding: 17px 18px;
  cursor: pointer;
  transition: transform 0.08s;
}
.primary {
  background: linear-gradient(135deg, var(--green), #10B981);
  color: white;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}
.secondary {
  background: #EEF2FF;
  color: var(--blue);
}
.primary:active,
.secondary:active { transform: scale(0.98); }
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}
.footer {
  padding: 8px 22px 20px;
  text-align: center;
}
.qr-wrap {
  display: grid;
  place-items: center;
  margin: 16px 0;
}
.qr-box {
  background: white;
  border: 3px solid var(--green);
  border-radius: 14px;
  padding: 14px;
  width: min(100% - 44px, 290px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.qr-box canvas, .qr-box img {
  width: 100% !important;
  height: 100% !important;
}
.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 14px;
  font-size: 16px;
  outline: none;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
}
.field textarea {
  resize: vertical;
  min-height: 70px;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}
.error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 61, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  z-index: 5;
}
.sheet.open { display: flex; }
.sheet-panel {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border-radius: 28px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.sheet-head h2 {
  font-size: 20px;
  margin: 0;
  color: var(--blue);
}
.close-btn {
  border: 0;
  background: var(--func-bg);
  color: var(--text);
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.hidden { display: none !important; }
.pin-success-body  { padding: 20px 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pin-success-icon  { width: 56px; height: 56px; border-radius: 50%; background: var(--green-light-bg); display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--green); }
.pin-success-title { font-size: 18px; font-weight: 500; color: var(--text); margin: 0; }
.pin-success-sub    { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.6; margin: 0; }
.guide-body { min-height: 100vh; background: var(--bg); color: var(--text); }
.guide-shell { width: min(100%, 760px); margin: 0 auto; padding: 18px 18px 28px; }
.guide-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.guide-logo { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.03em; }
.guide-logo span { color: var(--green); }
.guide-back { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.guide-hero { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 28px 22px; box-shadow: var(--shadow); }
.guide-kicker { color: var(--green); font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.guide-hero h1 { font-size: clamp(34px, 10vw, 56px); line-height: .95; letter-spacing: -0.07em; margin: 0 0 14px; }
.guide-hero p { color: var(--muted); font-size: 17px; line-height: 1.45; margin: 0 0 20px; }
.guide-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 16px; background: var(--green); color: white; text-decoration: none; font-weight: 800; box-shadow: 0 12px 30px rgba(31, 178, 90, .22); }
.guide-section { margin-top: 26px; }
.guide-section h2 { font-size: 24px; line-height: 1.1; letter-spacing: -0.045em; margin: 0 0 12px; }
.guide-section-sub { color: var(--muted); margin: -4px 0 14px; line-height: 1.45; }
.steps { display: grid; grid-template-columns: 1fr; gap: 10px; }
.step-card, .feature-card, .faq-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.step-num { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 999px; background: rgba(31, 178, 90, .12); color: var(--green); font-weight: 900; margin-bottom: 8px; }
.step-card strong, .feature-card strong { display: block; margin-bottom: 4px; }
.step-card p, .feature-card p, .faq-card p { margin: 0; color: var(--muted); line-height: 1.42; font-size: 14px; }
.story-list { display: flex; flex-direction: column; gap: 12px; }
.story-card { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; text-decoration: none; color: var(--text); box-shadow: 0 10px 28px rgba(12, 20, 32, .06); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.story-card:hover { transform: translateY(-1px); border-color: rgba(14, 165, 91, .35); box-shadow: 0 14px 34px rgba(12, 20, 32, .09); }
.story-emoji { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: rgba(31, 178, 90, .12); font-size: 22px; }
.story-copy { min-width: 0; }
.story-copy h3 { margin: 0 0 5px; font-size: 19px; letter-spacing: -0.035em; }
.story-copy strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 14px; }
.story-copy p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.story-link { color: var(--green); font-weight: 800; font-size: 14px; }
.features { display: grid; grid-template-columns: 1fr; gap: 10px; }
.feature-icon { font-size: 20px; margin-bottom: 6px; }
.faq-list { display: grid; gap: 10px; }
.faq-card h3 { margin: 0 0 6px; font-size: 16px; }
.guide-footer { margin-top: 30px; padding: 20px 0 4px; text-align: center; color: var(--muted); font-size: 12px; }
.guide-footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
.case-hero { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 24px 20px; box-shadow: var(--shadow); }
.case-kicker { color: var(--green); font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.case-hero h1 { font-size: clamp(32px, 9vw, 52px); line-height: .98; letter-spacing: -0.065em; margin: 0 0 12px; }
.case-lead { color: var(--muted); font-size: 17px; line-height: 1.48; margin: 0 0 18px; }
.case-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.case-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 16px; background: var(--func-bg); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 800; }
.case-storyboard { margin-top: 18px; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 10px 28px rgba(12, 20, 32, .06); }
.case-storyboard img { display: block; width: 100%; height: auto; }
.case-content { display: grid; gap: 12px; margin-top: 20px; }
.case-block { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.case-block.wide { grid-column: 1 / -1; }
.case-block h2, .case-block h3 { margin: 0 0 8px; letter-spacing: -0.035em; }
.case-block h2 { font-size: 22px; }
.case-block p { margin: 0; color: var(--muted); line-height: 1.5; }
.case-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.55; }
.case-list li + li { margin-top: 6px; }
.case-next { display: grid; gap: 10px; margin-top: 20px; }
.case-next-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; color: var(--text); text-decoration: none; }
.case-next-card strong { display: block; margin-bottom: 4px; }
.case-next-card span { color: var(--green); font-weight: 800; font-size: 14px; }
.install-section { margin-top: 22px; }
.install-h { font-size: 22px; letter-spacing: -0.035em; margin: 0 0 6px; color: var(--text); }
.install-note { color: var(--muted); line-height: 1.5; margin: 0 0 14px; font-size: 14px; }
.install-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
}
.install-text { display: flex; gap: 12px; align-items: flex-start; }
.install-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-text h3 { margin: 2px 0 4px; font-size: 16px; letter-spacing: -0.02em; color: var(--text); }
.install-text p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.install-fig { margin: 0; text-align: center; }
.install-fig svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  color: var(--muted);
}
.install-fig figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.install-tip { margin: 12px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 22px;
}
.product-card {
  position: relative;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.08s;
}
.product-card:not(.product-card-edit-mode):active { transform: scale(0.97); }
.product-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--func-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}
.product-photo-fallback {
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
}
.product-qty-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  border: 0;
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(13, 27, 61, 0.25);
  cursor: pointer;
}
.product-name {
  font-size: 14px;
  font-weight: 650;
  color: var(--blue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-description {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.product-price {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.vitrine-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 22px;
}
.vitrine-footer {
  position: sticky;
  bottom: 0;
  margin: 18px 22px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.vitrine-footer-label {
  font-size: 11px;
  color: var(--muted);
}
.vitrine-footer-total {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
}
.vitrine-footer-total small {
  font-size: 14px;
  margin-right: 2px;
}
.vitrine-generate-btn {
  width: auto;
  padding: 13px 20px;
}
.qr-wrap {
  position: relative;
}
.vo-state {
  text-align: center;
  color: var(--muted);
  padding: 80px 24px;
  font-size: 14px;
  line-height: 1.5;
}
.vo-state h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--blue);
  margin: 0 0 10px;
}
.vo-state a {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 650;
  color: var(--blue);
}
.vo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 22px 6px;
}
.vo-header-name {
  font-weight: 700;
  color: var(--blue);
  font-size: 15px;
}
.vo-header-sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}
.vo-summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin: 0 22px 18px;
}
.vo-summary-head {
  background: var(--green-light-bg);
  color: var(--green-light-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 8px 14px;
}
.vo-summary-body {
  padding: 6px 14px 10px;
}
.vo-summary-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}
.vo-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}
.vo-summary-total strong:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}
.vo-summary-total strong:last-child {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
}
.vo-summary-total-pad { padding: 0 14px 10px; }
.vo-qr-actions { margin: 0 22px; }
.vo-order-number {
  font-size: 12px;
  color: var(--muted);
  margin: -6px 0 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue:             #E2EBFF;
    --green:            #4ADE80;
    --green-light-bg:   rgba(74, 222, 128, 0.10);
    --green-light-text: #4ADE80;
    --bg:               #0F1117;
    --text:             #F0F6FC;
    --muted:            #7A8599;
    --card:             #1A1F2E;
    --line:             #2A3145;
    --func-bg:          #252D3D;
    --danger:           #F87171;
    --shadow:           0 8px 32px rgba(0, 0, 0, 0.50);
  }
  .secondary { background: #1E2A4A; }
}
