/* The Tech Pad — Shopify integration overlay styles (LIGHT theme)
   Reuses app primitives (.page-card, .section-heading, .eyebrow,
   .ghost, .primary) so the page blends with the bundle.
   NOTE: the app surface is a WHITE .page-card — the previous white-alpha
   (rgba(255,255,255,…)) palette was designed for a dark surface and
   rendered inputs/tabs/buttons invisible. All values are light-theme. */

.ttp-shopify { max-width: none; }

.ttp-sh-status { margin: 12px 0; padding: 10px 14px; border-radius: 10px; background: #f3f6f4; border: 1px solid #e2e9e5; font-size: 14px; color: #2f443d; }
.ttp-sh-status.error { background: #fdeceb; border-color: #f2c4c0; color: #b3382b; }
.ttp-sh-status.ok { background: #e8f7ef; border-color: #bfe5cf; color: #0f7a58; }

.ttp-sh-muted { color: #74827c; font-size: 13px; margin: 10px 0; }
.ttp-sh-input {
  background: #fff; border: 1px solid #c3d2cb; border-radius: 10px; color: #14231e;
  padding: 10px 12px; font-size: 14px; width: 100%;
  box-sizing: border-box; margin: 6px 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ttp-sh-input::placeholder { color: #93a19b; }
.ttp-sh-input:focus { outline: none; border-color: #128c7e; box-shadow: 0 0 0 3px rgba(18,140,126,.16); }
.ttp-sh-input.ttp-sh-inline { width: 90px; display: inline-block; margin: 0 6px; }
.ttp-sh-input.ttp-sh-tpl { max-width: 340px; min-width: 220px; margin: 0; }
select.ttp-sh-input { cursor: pointer; }

.ttp-sh-tabs { display: flex; gap: 6px; margin: 16px 0 4px; flex-wrap: wrap; }
.ttp-sh-tab {
  background: #f1f5f3; border: 1px solid transparent; color: #33504a;
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ttp-sh-tab.active { background: #0d2b22; border-color: #0d2b22; color: #fff; }
.ttp-sh-tab:hover { background: #e2eae6; }

.ttp-sh-body { margin-top: 12px; }

.ttp-sh-conn { border: 1px solid #dfe6e2; border-radius: 14px; padding: 16px; margin: 10px 0; background: #fafcfb; }
.ttp-sh-conn-shop { font-size: 17px; font-weight: 700; color: #14231e; }
.ttp-sh-conn-meta { color: #74827c; font-size: 13px; margin-top: 4px; }

.ttp-sh-settings { border: 1px solid #dfe6e2; border-radius: 14px; padding: 14px 16px; margin: 10px 0; background: #fafcfb; }
.ttp-sh-settings-title { font-weight: 600; margin-bottom: 8px; color: #1a4437; }
.ttp-sh-settings label { display: block; font-size: 13px; color: #5a6b64; margin: 8px 0; }
.ttp-sh-settings button { margin-top: 8px; }

.ttp-sh-danger { color: #b3382b; border-color: rgba(179,56,43,.45); margin-top: 12px; background: #fff; }
.ttp-sh-danger:hover { background: #fdeceb; }

/* Flows */
.ttp-sh-flow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef2f0; flex-wrap: wrap; }
.ttp-sh-flow-label { flex: 1; min-width: 180px; font-size: 14px; color: #2f443d; }
.ttp-sh-flow input[type="checkbox"] { width: 18px; height: 18px; accent-color: #128c7e; }

/* 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 #dfe6e2; border-radius: 14px; padding: 12px 14px; background: #fafcfb; }
.ttp-sh-kpi-value { font-size: 22px; font-weight: 800; color: #14231e; }
.ttp-sh-kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #74827c; margin-top: 2px; }
.ttp-sh-kpi-sub { font-size: 12px; color: #8a9791; margin-top: 2px; }

.ttp-sh-subhead { margin: 18px 0 8px; font-size: 15px; font-weight: 600; color: #1a4437; }
.ttp-sh-funnel-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ttp-sh-funnel-label { width: 90px; font-size: 13px; color: #5c6d66; }
.ttp-sh-funnel-track { flex: 1; background: #eef2f0; 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; color: #2f443d; }

.ttp-sh-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.ttp-sh-table th { text-align: left; color: #74827c; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid #dfe6e2; }
.ttp-sh-table td { padding: 8px 10px; border-bottom: 1px solid #eef2f0; color: #2f443d; }
.ttp-sh-status-failed, .ttp-sh-status-dead { color: #b3382b; }
.ttp-sh-status-recovered, .ttp-sh-status-processed { color: #0f7a58; }
.ttp-sh-status-skipped { color: #b7791f; }

.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: #f6f9f7; border: 1px solid #e8eeea; border-radius: 8px; font-size: 13px; color: #2f443d; }
.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: #fff; border: 1px solid #c3d2cb; border-radius: 10px; color: #14231e; padding: 8px 12px; margin: 8px 0; }

/* Connect flow: store input + button on one row (desktop) */
.ttp-sh-connect-row { display: flex; gap: 10px; align-items: stretch; margin: 10px 0 4px; }
.ttp-sh-connect-row .ttp-sh-input { flex: 1; margin: 0; }
.ttp-sh-connect-row .primary { width: auto; margin: 0; white-space: nowrap; }

/* 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; }
  .ttp-sh-connect-row { flex-direction: column; }
  .ttp-sh-connect-row .primary { width: 100%; }
}
