:root {
  --tp25p-bg: #0b1020;
  --tp25p-card: #ffffff;
  --tp25p-text: #111827;
  --tp25p-muted: #6b7280;
  --tp25p-border: #e5e7eb;
  --tp25p-orange: #fb5a05;
  --tp25p-green: #16a34a;
  --tp25p-blue: #0284c7;
  --tp25p-red: #dc2626;
  --tp25p-yellow: #f59e0b;
}

#tpPedidoPublico25P {
  width: min(920px, calc(100% - 24px));
  margin: 18px auto;
  color: var(--tp25p-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tp25p-shell {
  border: 1px solid var(--tp25p-border);
  background: var(--tp25p-card);
  border-radius: 26px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .14);
  overflow: hidden;
}

.tp25p-head {
  padding: 18px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 55%);
  border-bottom: 1px solid var(--tp25p-border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.tp25p-kicker {
  margin: 0 0 5px;
  color: var(--tp25p-orange);
  font-weight: 900;
  letter-spacing: .08em;
  font-size: 12px;
}

.tp25p-head h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}

.tp25p-head p {
  margin: 8px 0 0;
  color: var(--tp25p-muted);
  line-height: 1.45;
}

.tp25p-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--tp25p-border);
  background: #f9fafb;
  font-weight: 900;
  white-space: nowrap;
}

.tp25p-badge.ok { color: var(--tp25p-green); border-color: #bbf7d0; background: #f0fdf4; }
.tp25p-badge.warn { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.tp25p-badge.info { color: var(--tp25p-blue); border-color: #bae6fd; background: #f0f9ff; }
.tp25p-badge.danger { color: var(--tp25p-red); border-color: #fecaca; background: #fef2f2; }

.tp25p-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.tp25p-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tp25p-card {
  border: 1px solid var(--tp25p-border);
  border-radius: 20px;
  padding: 14px;
  background: #fff;
}

.tp25p-card small {
  display: block;
  color: var(--tp25p-muted);
  margin-bottom: 4px;
}

.tp25p-card strong {
  display: block;
  font-size: 18px;
  word-break: break-word;
}

.tp25p-timeline {
  display: grid;
  gap: 10px;
}

.tp25p-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  opacity: .55;
}

.tp25p-step.done,
.tp25p-step.current {
  opacity: 1;
}

.tp25p-dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid var(--tp25p-border);
}

.tp25p-step.done .tp25p-dot {
  background: var(--tp25p-green);
  border-color: var(--tp25p-green);
  color: white;
}

.tp25p-step.current .tp25p-dot {
  background: var(--tp25p-orange);
  border-color: var(--tp25p-orange);
  color: white;
}

.tp25p-step strong {
  display: block;
  margin-bottom: 3px;
}

.tp25p-step span {
  display: block;
  color: var(--tp25p-muted);
  line-height: 1.4;
}

.tp25p-alert {
  border: 1px solid #fecaca;
  color: #991b1b;
  background: #fef2f2;
  border-radius: 18px;
  padding: 14px;
  line-height: 1.45;
}

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

.tp25p-btn {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--tp25p-border);
  background: #fff;
  color: var(--tp25p-text);
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp25p-btn.primary {
  background: var(--tp25p-orange);
  border-color: var(--tp25p-orange);
  color: #fff;
}

.tp25p-btn.info {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #075985;
}

.tp25p-section-title {
  margin: 0 0 10px;
  font-size: 21px;
}

.tp25p-items {
  display: grid;
  gap: 8px;
}

.tp25p-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--tp25p-border);
  padding-bottom: 8px;
}

.tp25p-empty {
  border: 1px dashed var(--tp25p-border);
  border-radius: 18px;
  padding: 14px;
  color: var(--tp25p-muted);
}

.tp25p-chat {
  display: none;
  border-top: 1px solid var(--tp25p-border);
  padding-top: 14px;
}

.tp25p-chat.open {
  display: block;
}

.tp25p-chat-box {
  height: min(360px, 52vh);
  overflow: auto;
  border: 1px solid var(--tp25p-border);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #f9fafb;
}

.tp25p-msg {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--tp25p-border);
  background: white;
}

.tp25p-msg.loja {
  margin-right: auto;
  border-color: #fed7aa;
  background: #fff7ed;
}

.tp25p-msg.cliente {
  margin-left: auto;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tp25p-msg small {
  display: block;
  color: var(--tp25p-muted);
  margin-top: 5px;
}

.tp25p-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.tp25p-form input,
.tp25p-form textarea,
.tp25p-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--tp25p-border);
  border-radius: 14px;
  padding: 0 12px;
  font: inherit;
}

.tp25p-form textarea {
  padding-top: 10px;
  min-height: 80px;
  resize: vertical;
}

.tp25p-rating {
  display: none;
  border-top: 1px solid var(--tp25p-border);
  padding-top: 14px;
}

.tp25p-rating.open {
  display: block;
}

.tp25p-stars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tp25p-star {
  min-width: 42px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--tp25p-border);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.tp25p-star.active {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

@media (max-width: 720px) {
  .tp25p-head { display: grid; }
  .tp25p-grid { grid-template-columns: 1fr; }
  .tp25p-form { grid-template-columns: 1fr; }
  .tp25p-actions .tp25p-btn { flex: 1 1 auto; }
}
/* TOPERTO_PEDIDO_PUBLICO_25P2_FORCE */
body.tp25p-force #pedidoPublicoApp > *:not(#tpPedidoPublico25P),
body.tp25p-force #pedidoApp > *:not(#tpPedidoPublico25P),
body.tp25p-force #acompanhamentoPedido > *:not(#tpPedidoPublico25P),
body.tp25p-force #orderTracking > *:not(#tpPedidoPublico25P) {
  display: none !important;
}

body.tp25p-force #tpPedidoPublico25P {
  display: block !important;
  position: relative;
  z-index: 20;
}

.tp25p-debug-status {
  margin-top: 8px;
  color: var(--tp25p-muted);
  font-size: 12px;
}
/* TOPERTO_PEDIDO_25P4_CHAT */
@keyframes tp25p4ChatPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(251, 90, 5, 0);
  }

  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 5px rgba(251, 90, 5, .18);
  }
}

.tp25p-chat-alert-btn {
  animation: tp25p4ChatPulse .85s infinite;
  border-color: rgba(251, 90, 5, .75) !important;
  background: #fff7ed !important;
  color: #c2410c !important;
}