/* Cursive PD Tracker — analytics product styles */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a; background: #f6f8fa; -webkit-font-smoothing: antialiased;
}
a { color: #1f6feb; text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: #64748b; }
.muted-small { color: #94a3b8; font-size: 11px; }

/* Topbar — matches /leads01/ exactly */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid #eaecf0;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-box { width: 50px; height: 50px; background: #1f6feb; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-box svg { display: block; }
.brand-wordmark { font-family: 'Dancing Script', cursive; font-size: 46px; color: #1f6feb; font-weight: 700; letter-spacing: -1px; line-height: 0.9; }
.brand-wordmark sup { font-family: system-ui, sans-serif; font-size: 0.22em; opacity: 0.5; font-weight: 400; margin-left: 1px; vertical-align: super; }
.nav-sub { font-size: 12px; color: #667085; margin-top: 2px; }
.tracker-badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #1f6feb 0%, #1858d6 100%);
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.4px;
  margin-left: 8px; vertical-align: middle;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.email-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; background: #f0f6ff; color: #1d4ed8;
  border: 1px solid #c7d9f7; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.scraper-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
.scraper-status.online { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.scraper-status.offline { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.scraper-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.scraper-status.online .dot { background: #047857; animation: pulse 2s infinite; }
.scraper-status.offline .dot { background: #92400e; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.btn-ghost { background: transparent; border: 1px solid #e5e7eb; padding: 6px 12px; border-radius: 8px; font-size: 12px; color: #475467; cursor: pointer; }
.btn-ghost:hover { background: #f9fafb; }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - 75px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; box-shadow: 0 6px 28px rgba(16,24,40,.07); padding: 32px; }
.auth-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.auth-card .lede { margin: 0 0 20px; color: #64748b; font-size: 14px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; color: #344054; margin: 14px 0 6px; }
.auth-card input { width: 100%; padding: 11px 13px; font-size: 15px; border: 1px solid #d0d5dd; border-radius: 9px; outline: none; transition: border-color .15s; }
.auth-card input:focus { border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31,111,235,.15); }
.btn-primary {
  width: 100%; margin-top: 18px; padding: 12px 16px; font-size: 15px;
  font-weight: 700; color: #fff; background: #1f6feb; border: none;
  border-radius: 10px; cursor: pointer; transition: background .15s;
}
.btn-primary:hover { background: #1858d6; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-link { background: transparent; border: none; color: #1f6feb; font-size: 13px; cursor: pointer; padding: 8px 0; }
.btn-link:hover { text-decoration: underline; }
.error {
  margin-top: 12px; padding: 10px 13px;
  background: #fef2f2; color: #991b1b;
  border: 1px solid #fecaca; border-radius: 8px;
  font-size: 13px;
}
.success {
  margin-top: 12px; padding: 10px 13px;
  background: #ecfdf5; color: #047857;
  border: 1px solid #a7f3d0; border-radius: 8px;
  font-size: 13px;
}
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: #64748b; }
.auth-foot a { font-weight: 600; }
.legal-line { margin-top: 16px; text-align: center; color: #94a3b8; font-size: 11px; line-height: 1.5; }

/* OTP input row */
.otp-row { display: flex; gap: 8px; margin-top: 12px; }
.otp-row input {
  flex: 1; text-align: center; font-size: 24px; font-weight: 700;
  letter-spacing: 2px; padding: 14px 0;
}

/* Dashboard */
.dash { max-width: 1400px; margin: 0 auto; padding: 22px 20px 60px; }
.dash-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.dash-head h1 { margin: 0; font-size: 24px; font-weight: 700; }
.dash-head .subtitle { color: #64748b; font-size: 14px; margin-top: 2px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi {
  background: #fff; border-radius: 10px; padding: 9px 14px;
  border: 1px solid #eaecf0;
}
.kpi .label { color: #94a3b8; font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.4px; }
.kpi .value { font-size: 22px; font-weight: 800; color: #0f172a; margin-top: 2px; line-height: 1; }
.kpi .meta { color: #94a3b8; font-size: 10px; margin-top: 2px; }

.trial-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid #fcd34d; gap: 12px; flex-wrap: wrap;
}
.trial-banner .text { color: #78350f; font-weight: 600; font-size: 14px; }
.trial-banner .btn-upgrade {
  background: #92400e; color: #fff; border: none; padding: 8px 16px;
  border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px;
}

.btn { padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.btn-primary-sm { background: #1f6feb; color: #fff; }
.btn-primary-sm:hover { background: #1858d6; }
.btn-outline { background: #fff; color: #344054; border-color: #d0d5dd; }
.btn-outline:hover { background: #f9fafb; }

/* Products table */
.empty {
  text-align: center; padding: 50px 20px; color: #64748b;
  font-size: 14px; background: #fff; border-radius: 12px;
}
.empty .big { font-size: 18px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }
.empty .btn { margin-top: 14px; display: inline-block; }

.table-scroll { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(16,24,40,.04); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th {
  text-align: left; padding: 11px 14px; font-size: 11px; color: #98a2b3;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700;
  background: #f9fafb; border-bottom: 1px solid #eaecf0;
}
table.data tbody td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.data tbody tr:hover { background: #f9fafb; }
table.data tbody tr:last-child td { border-bottom: none; }
.platform-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.platform-tag.amazon { background: #fef3c7; color: #92400e; }
.platform-tag.flipkart { background: #dbeafe; color: #1e3a8a; }
.platform-tag.meesho { background: #fce7f3; color: #831843; }
.platform-tag.myntra { background: #fed7aa; color: #7c2d12; }
.platform-tag.firstcry { background: #d1fae5; color: #064e3b; }
.rating-cell { font-weight: 700; }
.price-cell { font-weight: 700; color: #047857; }
.url-cell a { font-size: 11px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.ok { background: #047857; }
.status-dot.pending { background: #f59e0b; }
.status-dot.fail { background: #dc2626; }

/* Upload page */
.upload-card {
  background: #fff; border-radius: 16px; padding: 28px;
  max-width: 720px; margin: 24px auto;
  box-shadow: 0 6px 28px rgba(16,24,40,.07);
}
.upload-step { margin-bottom: 24px; }
.upload-step h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.dropzone {
  border: 2px dashed #c7d9f7; border-radius: 12px; padding: 40px;
  text-align: center; cursor: pointer; transition: all .15s;
  background: #f0f6ff;
}
.dropzone:hover, .dropzone.dragover { border-color: #1f6feb; background: #e0eaff; }
.dropzone .big { font-size: 16px; font-weight: 600; color: #1f6feb; margin-bottom: 6px; }
.dropzone .small { color: #64748b; font-size: 13px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 14px; }
.preview-table th, .preview-table td { padding: 6px 10px; border: 1px solid #eaecf0; text-align: left; }
.preview-table th { background: #f9fafb; font-weight: 700; color: #475467; }

/* Install extension page */
.install-card { background: #fff; border-radius: 16px; padding: 32px; max-width: 720px; margin: 24px auto; box-shadow: 0 6px 28px rgba(16,24,40,.07); }
.install-step { display: flex; gap: 14px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid #eaecf0; }
.install-step:last-child { border-bottom: none; }
.install-num { width: 32px; height: 32px; border-radius: 50%; background: #1f6feb; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.install-body h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.install-body p { margin: 4px 0; color: #475467; font-size: 14px; }
.install-body code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.dl-btn {
  display: inline-block; margin-top: 8px; padding: 12px 22px;
  background: #1f6feb; color: #fff; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.dl-btn:hover { background: #1858d6; text-decoration: none; }

/* Mobile */
@media (max-width: 700px) {
  .topbar { padding: 10px 14px; }
  .brand-wordmark { font-size: 34px; }
  .brand-box { width: 40px; height: 40px; border-radius: 10px; }
  .email-chip, .scraper-status { display: none; }
  table.data { font-size: 12px; }
  table.data thead th, table.data tbody td { padding: 8px 9px; }
  .dash { padding: 16px 12px 50px; }
  .auth-card { padding: 22px; }
  .upload-card, .install-card { padding: 20px; margin: 14px; }
}

/* ===== Cursive hover-card standard (PD Tracker) ===== */
.btn-primary,
.btn-primary-sm,
.btn-outline,
.btn-ghost,
.dl-btn,
.plan-card,
.recharge-btn,
.balance-card,
.tx-card,
.auth-card,
.install-card,
.upload-card {
  transition: transform .18s ease, box-shadow .18s ease,
              background .15s, color .15s, border-color .15s;
}
.btn-primary:hover,
.btn-primary-sm:hover,
.btn-outline:hover,
.btn-ghost:hover,
.dl-btn:hover,
.plan-card:hover,
.recharge-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(15,23,42,.12);
}
.btn-primary:active,
.btn-primary-sm:active,
.btn-outline:active,
.btn-ghost:active,
.dl-btn:active,
.plan-card:active,
.recharge-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15,23,42,.08);
}
/* Table rows keep their existing flat background-only hover (lifting rows looks broken) */


/* Brand link in the topbar should never underline on hover */
.topbar .brand,
.topbar .brand:hover,
.topbar .brand:focus,
.topbar .brand *,
.topbar .brand:hover *,
.topbar .brand:focus * {
  text-decoration: none !important;
  border-bottom: none !important;
}


/* Install-extension button: alternates white ↔ blue to draw the eye */
@keyframes installPulse {
  0%, 49%   { background: #fff;     color: #1f6feb; border-color: #1f6feb; box-shadow: 0 0 0 0 rgba(31,111,235,.55); }
  50%, 100% { background: #1f6feb;  color: #fff;     border-color: #1f6feb; box-shadow: 0 0 0 6px rgba(31,111,235,.10); }
}
.btn-install-pulse {
  animation: installPulse 1.2s ease-in-out infinite;
  border: 2px solid #1f6feb !important;
  font-weight: 700 !important;
  position: relative;
}
.btn-install-pulse::after {
  content: "MANDATORY";
  position: absolute;
  top: -8px; right: -6px;
  background: #dc2626; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px;
  letter-spacing: .4px;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .btn-install-pulse { animation: none; background: #1f6feb; color: #fff; }
}
