/* The Tech Pad — Shopify integration overlay styles
   Reuses app primitives (.page-card, .section-heading, .eyebrow,
   .ghost, .primary) so the page blends with the bundle. */

.ttp-shopify { max-width: none; }

.ttp-sh-status { margin: 12px 0; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 14px; }
.ttp-sh-status.error { background: rgba(220,60,60,.12); color: #ff8a8a; }
.ttp-sh-status.ok { background: rgba(37,211,102,.12); color: #6fdc8c; }

.ttp-sh-muted { color: rgba(255,255,255,.55); font-size: 13px; margin: 10px 0; }
.ttp-sh-input {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; color: inherit; padding: 9px 12px; font-size: 14px; width: 100%;
  box-sizing: border-box; margin: 6px 0;
}
.ttp-sh-input.ttp-sh-inline { width: 90px; display: inline-block; margin: 0 6px; }
.ttp-sh-input.ttp-sh-tpl { max-width: 320px; margin: 0; }

.ttp-sh-tabs { display: flex; gap: 6px; margin: 16px 0 4px; flex-wrap: wrap; }
.ttp-sh-tab {
  background: rgba(255,255,255,.06); border: 1px solid transparent; color: inherit;
  padding: 7px 16px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.ttp-sh-tab.active { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); font-weight: 600; }
.ttp-sh-tab:hover { background: rgba(255,255,255,.12); }

.ttp-sh-body { margin-top: 12px; }

.ttp-sh-conn { border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 16px; margin: 10px 0; }
.ttp-sh-conn-shop { font-size: 17px; font-weight: 700; }
.ttp-sh-conn-meta { color: rgba(255,255,255,.6); font-size: 13px; margin-top: 4px; }

.ttp-sh-settings { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.ttp-sh-settings-title { font-weight: 600; margin-bottom: 8px; }
.ttp-sh-settings label { display: block; font-size: 13px; color: rgba(255,255,255,.75); margin: 8px 0; }
.ttp-sh-settings button { margin-top: 8px; }

.ttp-sh-danger { color: #ff8a8a; border-color: rgba(220,60,60,.4); margin-top: 12px; }

/* Flows */
.ttp-sh-flow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.ttp-sh-flow-label { flex: 1; min-width: 180px; font-size: 14px; }
.ttp-sh-flow input[type="checkbox"] { width: 18px; height: 18px; accent-color: #25d366; }

/* KPIs + funnel */
.ttp-sh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.ttp-sh-kpi { border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px; }
.ttp-sh-kpi-value { font-size: 22px; font-weight: 800; }
.ttp-sh-kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.55); margin-top: 2px; }
.ttp-sh-kpi-sub { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; }

.ttp-sh-subhead { margin: 18px 0 8px; font-size: 15px; }
.ttp-sh-funnel-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ttp-sh-funnel-label { width: 90px; font-size: 13px; color: rgba(255,255,255,.7); }
.ttp-sh-funnel-track { flex: 1; background: rgba(255,255,255,.06); border-radius: 999px; height: 18px; overflow: hidden; }
.ttp-sh-funnel-bar { height: 100%; background: linear-gradient(90deg, #25d366, #128c7e); border-radius: 999px; transition: width .3s; }
.ttp-sh-funnel-num { width: 48px; text-align: right; font-weight: 700; font-size: 14px; }

.ttp-sh-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.ttp-sh-table th { text-align: left; color: rgba(255,255,255,.55); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.15); }
.ttp-sh-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.ttp-sh-status-failed, .ttp-sh-status-dead { color: #ff8a8a; }
.ttp-sh-status-recovered, .ttp-sh-status-processed { color: #6fdc8c; }
.ttp-sh-status-skipped { color: #ffcf6f; }

.ttp-sh-failures { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.ttp-sh-failure { display: flex; justify-content: space-between; padding: 6px 10px; background: rgba(255,255,255,.05); border-radius: 8px; font-size: 13px; }
.ttp-sh-failure-count { font-weight: 700; }

.ttp-sh-range { display: flex; gap: 6px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.ttp-sh-org-select { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: inherit; padding: 8px 12px; margin: 8px 0; }

/* Mobile */
@media (max-width: 640px) {
  .ttp-sh-kpis { grid-template-columns: 1fr 1fr; }
  .ttp-sh-table { font-size: 12px; }
  .ttp-sh-table th, .ttp-sh-table td { padding: 6px; }
  .ttp-sh-flow { gap: 8px; }
  .ttp-sh-input.ttp-sh-tpl { max-width: 100%; margin-top: 4px; }
}
