/* Cara Core PDV Desktop (Rust + Tauri) — components */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(14px, 3vw, 20px);
  box-shadow: var(--shadow-card);
}
.card h2 { margin: 0 0 8px; font-size: clamp(1.125rem, 3vw, 1.25rem); color: var(--brand); }
.card h3 { margin: 16px 0 8px; font-size: 15px; color: var(--brand); }
.card h3:first-of-type { margin-top: 0; }
.section-subtitle {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.card p, .card li { font-size: 14px; line-height: 1.6; }
.card ul, .card ol { padding-left: 20px; }

.card:has(table.trace) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.exec-summary {
  background: linear-gradient(135deg, #eef4fb 0%, #f8fbff 100%);
  border: 1px solid #b8caf7;
}
.exec-lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.55;
}
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.exec-kpi {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}
.exec-kpi strong {
  display: block;
  font-size: 20px;
  color: var(--brand);
  margin-bottom: 6px;
}
.exec-kpi span { font-size: 12px; color: var(--muted); line-height: 1.45; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hub-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(14px, 3vw, 18px);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  display: block;
  min-height: 44px;
}
@media (hover: hover) and (pointer: fine) {
  .hub-card:hover {
    border-color: var(--brand-2);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
  }
}
.hub-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--brand); }
.hub-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hub-card .hub-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 12px; background: #fff; display: inline-block; }
.status-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status-concluido { background: #e7f7ea; border-color: #9cd2a8; color: #1c6b31; }
.status-em-andamento { background: #fff6e5; border-color: #e7c27f; color: #8a5600; }
.status-validacao { background: #eaf1ff; border-color: #b8caf7; color: #1f4c9c; }
.status-nao-iniciado { background: #eef1f5; border-color: #ccd4df; color: #445264; }
.status-bloqueado { background: #fdecea; border-color: #e8b4b0; color: #8b1a1a; }

.diagram-caption {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--brand-2);
  background: #eef4fb;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.diagram-caption strong { color: var(--brand); }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stack-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fafcfe;
}
.stack-item strong { display: block; color: var(--brand); font-size: 14px; margin-bottom: 6px; }
.stack-item span { font-size: 12px; color: var(--muted); line-height: 1.45; }

.trace {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}
.trace th, .trace td {
  border: 1px solid var(--line);
  padding: clamp(8px, 2vw, 10px);
  text-align: left;
  vertical-align: top;
}
.trace th { background: #eef4fb; color: var(--brand); }

.slo-ok { color: #1c6b31; font-weight: 700; }
.slo-warn { color: #8a5600; font-weight: 700; }
.slo-pending { color: #445264; font-weight: 700; }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pillar {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}
.pillar h3 { margin: 0 0 8px; font-size: 14px; color: var(--brand); }
.pillar p, .pillar ul { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

.brand-quote {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand-2);
  background: #eef4fb;
  font-size: 15px;
  font-style: italic;
  color: var(--brand);
}

.cta-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef4fb 0%, #fff 100%);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.cta-box p { margin: 0; font-size: 14px; flex: 1; min-width: 200px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  min-height: var(--nav-link-min-h);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary:hover { background: var(--brand-2); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  min-height: var(--nav-link-min-h);
  background: #fff;
  color: var(--brand);
  text-decoration: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  text-align: center;
}
.btn-secondary:hover { background: #eef4fb; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 1rem;
}
.download-option {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  background: #fff;
}
.download-option h3 { margin: 0 0 6px; font-size: 15px; }
.download-option p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.download-option a { width: 100%; box-sizing: border-box; }
@media (max-width: 900px) {
  .download-grid { grid-template-columns: 1fr; }
}

.proof-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.proof-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.proof-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.proof-item-head strong { font-size: 14px; color: var(--ink); }
.proof-item-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.proof-item-date { display: block; margin-top: 8px; font-size: 11px; color: var(--muted-2, #6b7c8f); }

.er-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfeff;
  padding: 8px;
}
.er-diagram { width: 100%; min-width: min(720px, 100%); height: auto; display: block; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-meta {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-top: 12px;
}
.footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 6px;
}
.ext-link { color: var(--brand-2); word-break: break-word; }

.notice {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 16px;
}
.notice-info {
  background: #f0f7ff;
  border: 1px solid #c5daf0;
  color: var(--ink);
}
.notice-warn {
  background: #fffbf0;
  border: 1px solid #e8d4a8;
  color: var(--ink);
}
.notice strong { display: block; margin-bottom: 4px; font-size: 14px; }
.notice a { color: var(--brand-2); }

/* Tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  .exec-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 639px) {
  .exec-kpi-grid,
  .stack-grid,
  .hub-grid,
  .pillars-grid,
  .two-col { grid-template-columns: 1fr; }

  .cta-box {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-box p { min-width: 0; }
  .cta-box .btn-primary,
  .cta-box .btn-secondary {
    width: 100%;
  }

  .proof-item-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .trace { min-width: 480px; font-size: 12px; }
}

@media (max-width: 980px) {
  .pillars-grid, .two-col { grid-template-columns: 1fr; }
}
