/* ===================== Sponzza — Apple-style glass panel ===================== */
#sponzza-launcher, #sponzza-panel, #sponzza-panel * { box-sizing: border-box; }
#sponzza-panel, #sponzza-launcher {
  position: fixed; top: 50%; right: 0; transform: translateY(-50%);
  z-index: 2147483646; border: none; cursor: pointer; color: #9333EA;
  display: flex; align-items: center; gap: 8px; padding: 11px 14px 11px 13px;
  border-radius: 16px 0 0 16px; font-size: 14px; font-weight: 700; letter-spacing: -0.2px;
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: -2px 6px 26px rgba(0,0,0,0.16), inset 0 0 0 0.5px rgba(255,255,255,0.7);
  transition: transform .25s cubic-bezier(.32,.72,0,1), box-shadow .25s ease, padding .2s ease;
}
#sponzza-launcher:hover { transform: translateY(-50%) translateX(-2px); box-shadow: -4px 8px 30px rgba(10,132,255,0.26); }
#sponzza-launcher:active { transform: translateY(-50%) scale(0.98); }
#sponzza-launcher .spz-l-icon { display:flex; }
#sponzza-launcher .spz-l-text { color:#1d1d1f; }
#sponzza-launcher svg { width: 18px; height: 18px; }
#sponzza-launcher .spz-dot {
  position: absolute; top: 7px; right: 9px; width: 9px; height: 9px; border-radius: 50%;
  background: #34C759; box-shadow: 0 0 0 2px rgba(255,255,255,0.85);
}
#sponzza-launcher.spz-hidden { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(40px); }

/* ---- Floating glass panel ---- */
#sponzza-panel {
  position: fixed; top: 14px; right: 14px; bottom: 14px; width: 384px; max-width: calc(100vw - 28px);
  z-index: 2147483647; border-radius: 26px; overflow: hidden;
  background: rgba(248,248,250,0.74);
  -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%);
  box-shadow: 0 24px 70px rgba(0,0,0,0.24), inset 0 0 0 0.5px rgba(255,255,255,0.55);
  color: #1d1d1f; display: flex; flex-direction: column;
  opacity: 0; transform: translateX(24px) scale(0.98); pointer-events: none;
  transition: opacity .34s cubic-bezier(.32,.72,0,1), transform .34s cubic-bezier(.32,.72,0,1);
}
#sponzza-panel.spz-open { opacity: 1; transform: translateX(0) scale(1); pointer-events: auto; }

/* ---- Header ---- */
.spz-header { display: flex; align-items: center; gap: 11px; padding: 18px 18px 12px; flex: 0 0 auto; }
.spz-logo { width: 36px; height: 36px; flex: 0 0 auto; display:flex; align-items:center; justify-content:center; }
.spz-logo svg { width:36px; height:36px; }
.spz-brand .spz-name { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; line-height: 1.1; }
.spz-brand .spz-tag { font-size: 11.5px; color: #8e8e93; margin-top: 1px; }
.spz-close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(120,120,128,0.14); color: #6e6e73; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.spz-close:hover { background: rgba(120,120,128,0.24); color: #1d1d1f; }

/* ---- Nav chips ---- */
.spz-nav { display: flex; gap: 7px; overflow-x: auto; padding: 4px 18px 12px; flex: 0 0 auto; scrollbar-width: none; }
.spz-nav::-webkit-scrollbar { display: none; }
.spz-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer;
  padding: 8px 13px; border-radius: 16px; font-size: 13px; font-weight: 600; letter-spacing: -0.1px;
  background: rgba(120,120,128,0.12); color: #3a3a3c; transition: background .18s, color .18s, transform .12s;
}
.spz-chip:active { transform: scale(0.96); }
.spz-chip svg { width: 15px; height: 15px; }
.spz-chip.active { background: #9333EA; color: #fff; box-shadow: 0 4px 12px rgba(147,51,234,0.3); }
.spz-chip .spz-new { background: #34C759; color: #fff; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 7px; }

/* ---- Body ---- */
.spz-body { flex: 1 1 auto; overflow-y: auto; padding: 6px 18px 20px; }
.spz-body::-webkit-scrollbar { width: 0; }

/* ---- Status hero ---- */
.spz-hero { text-align: center; padding: 22px 6px 6px; animation: spz-pop .4s cubic-bezier(.32,.72,0,1); }
.spz-ring {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.spz-ring svg { width: 38px; height: 38px; }
.spz-ring.green { color: #34C759; background: rgba(52,199,89,0.14); box-shadow: 0 0 0 9px rgba(52,199,89,0.07); }
.spz-ring.red   { color: #FF3B30; background: rgba(255,59,48,0.12); box-shadow: 0 0 0 9px rgba(255,59,48,0.06); }
.spz-ring.idle  { color: #8e8e93; background: rgba(120,120,128,0.12); box-shadow: 0 0 0 9px rgba(120,120,128,0.05); }
.spz-headline { font-size: 23px; font-weight: 700; letter-spacing: -0.4px; }
.spz-headline.green { color: #1d8a3f; }
.spz-headline.red { color: #d70015; }
.spz-headline.idle { color: #1d1d1f; }
.spz-company { font-size: 17px; font-weight: 600; color: #1d1d1f; margin-top: 12px; letter-spacing: -0.2px; }
.spz-jobtitle { font-size: 13px; color: #8e8e93; margin-top: 3px; }
.spz-matched { font-size: 12px; color: #8e8e93; margin-top: 6px; }
.spz-matched b { color: #1d1d1f; font-weight: 600; }

.spz-caveat {
  margin-top: 20px; text-align: left; font-size: 13px; line-height: 1.5; color: #3a3a3c;
  background: rgba(120,120,128,0.09); border-radius: 16px; padding: 14px 16px;
  display: flex; gap: 10px;
}
.spz-caveat svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; color: #8e8e93; }

.spz-foot { text-align: center; font-size: 11px; color: #b0b0b5; margin-top: 22px; }

/* ---- Coming soon ---- */
.spz-soon { text-align: center; padding: 56px 18px; animation: spz-pop .4s cubic-bezier(.32,.72,0,1); }
.spz-soon-ic {
  width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 18px; color: #9333EA;
  background: rgba(147,51,234,0.10); display: flex; align-items: center; justify-content: center;
}
.spz-soon-ic svg { width: 30px; height: 30px; }
.spz-soon h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; margin: 0 0 6px; }
.spz-soon p { font-size: 13.5px; color: #8e8e93; line-height: 1.5; margin: 0; }
.spz-soon .spz-pill { display: inline-block; margin-top: 16px; font-size: 11.5px; font-weight: 700; color: #9333EA; background: rgba(147,51,234,0.10); padding: 5px 12px; border-radius: 12px; }

@keyframes spz-pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* ---- Dark mode ---- */
@media (prefers-color-scheme: dark) {
  #sponzza-panel { background: rgba(28,28,30,0.76); color: #f5f5f7; box-shadow: 0 24px 70px rgba(0,0,0,0.5), inset 0 0 0 0.5px rgba(255,255,255,0.1); }
  #sponzza-launcher { background: rgba(44,44,46,0.8); }
  .spz-brand .spz-name { color: #f5f5f7; }
  .spz-close { background: rgba(120,120,128,0.28); color: #aeaeb2; }
  .spz-close:hover { color: #fff; }
  .spz-chip { background: rgba(120,120,128,0.28); color: #d1d1d6; }
  .spz-company, .spz-headline.idle, .spz-soon h3 { color: #f5f5f7; }
  .spz-caveat { color: #d1d1d6; background: rgba(120,120,128,0.18); }
  .spz-matched b { color: #f5f5f7; }
  .spz-headline.green { color: #30d158; }
  .spz-headline.red { color: #ff453a; }
}

/* ---- header icon buttons ---- */
.spz-icon-btn { width:30px; height:30px; border-radius:50%; border:none; cursor:pointer; background:rgba(120,120,128,0.14); color:#6e6e73; display:flex; align-items:center; justify-content:center; }
.spz-icon-btn svg { width:15px; height:15px; }
.spz-icon-btn:hover { background:rgba(120,120,128,0.24); color:#1d1d1f; }
.spz-icon-btn.on { background:rgba(147,51,234,0.14); color:#9333EA; }
.spz-header .spz-close { margin-left:4px; }
.spz-header .spz-icon-btn:not(.spz-close) { margin-left:auto; }

/* ---- buttons ---- */
.spz-btn { border:none; border-radius:12px; padding:11px 16px; font-size:14px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:7px; width:100%; transition:transform .12s, background .15s; }
.spz-btn:active { transform:scale(0.98); }
.spz-btn svg { width:16px; height:16px; }
.spz-btn-primary { background:#9333EA; color:#fff; box-shadow:0 4px 14px rgba(147,51,234,0.3); }
.spz-btn-primary:hover { background:#7E22CE; }
.spz-btn-primary:disabled { opacity:.6; }
.spz-btn-ghost { background:rgba(120,120,128,0.14); color:#1d1d1f; }
.spz-btn-google { background:#fff; color:#1d1d1f; border:1px solid rgba(0,0,0,0.12); }
.spz-btn-google:hover { background:#f7f7f8; }
.spz-g { font-weight:800; color:#4285F4; font-size:16px; }

/* ---- salary ---- */
.spz-spin { animation: spz-spin 1s linear infinite; }
@keyframes spz-spin { to { transform: rotate(360deg); } }
.spz-soc-code { font-size:12px; font-weight:700; color:#9333EA; letter-spacing:.3px; }
.spz-soc-title { font-size:18px; font-weight:700; letter-spacing:-0.3px; margin:2px 0 14px; }
.spz-rate-grid { background:rgba(120,120,128,0.07); border-radius:14px; padding:6px 14px; }
.spz-rate-row { display:flex; justify-content:space-between; align-items:center; padding:9px 0; font-size:13px; border-bottom:1px solid rgba(0,0,0,0.05); }
.spz-rate-row:last-child { border-bottom:none; }
.spz-rate-row .k { color:#6e6e73; }
.spz-rate-row .v { font-weight:600; color:#1d1d1f; }
.spz-rate-row .v em { color:#8e8e93; font-weight:500; font-style:normal; font-size:12px; }
.spz-rate-row.strong .k { color:#1d1d1f; font-weight:600; }
.spz-rate-row.strong .v { color:#9333EA; font-weight:700; }
.spz-toggle { display:flex; gap:9px; align-items:flex-start; font-size:12.5px; color:#3a3a3c; margin:16px 0; cursor:pointer; line-height:1.4; }
.spz-toggle input { margin-top:1px; accent-color:#9333EA; width:16px; height:16px; flex:0 0 auto; }

/* ---- sign-in ---- */
.spz-signin { padding:24px 4px; text-align:center; animation:spz-pop .4s cubic-bezier(.32,.72,0,1); }
.spz-signin .spz-input { width:100%; border:1px solid #d6dbe3; border-radius:12px; padding:12px 14px; font-size:15px; text-align:center; background:#fff; }
.spz-signin .spz-input:focus { outline:none; border-color:#9333EA; }
.spz-or { display:flex; align-items:center; gap:10px; color:#b0b0b5; font-size:12px; margin:16px 0; }
.spz-or::before, .spz-or::after { content:''; flex:1; height:1px; background:rgba(0,0,0,0.08); }
.spz-link { background:none; border:none; color:#9333EA; font-size:13px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:4px; padding:0; }
.spz-link svg { width:14px; height:14px; }
.spz-msg { margin-top:12px; font-size:12.5px; color:#c5221f; }

@media (prefers-color-scheme: dark) {
  .spz-icon-btn { background:rgba(120,120,128,0.28); color:#aeaeb2; }
  .spz-soc-title, .spz-rate-row .v, .spz-rate-row.strong .k { color:#f5f5f7; }
  .spz-btn-ghost { background:rgba(120,120,128,0.28); color:#f5f5f7; }
  .spz-btn-google { background:#1c1c1e; color:#f5f5f7; border-color:rgba(255,255,255,0.15); }
  .spz-rate-grid { background:rgba(120,120,128,0.16); }
  .spz-signin .spz-input { background:#1c1c1e; color:#f5f5f7; border-color:rgba(255,255,255,0.15); }
  .spz-toggle { color:#d1d1d6; }
}


/* ---- Tracker list ---- */
.spz-list { display:flex; flex-direction:column; gap:8px; padding-top:4px; }
.spz-row-item { background:rgba(120,120,128,0.07); border-radius:14px; padding:12px 14px; }
.spz-ri-top { display:flex; align-items:center; gap:8px; }
.spz-ri-co { font-weight:700; font-size:14px; letter-spacing:-0.2px; flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.spz-ri-title { font-size:12.5px; color:#8e8e93; margin-top:3px; }
.spz-tag-green,.spz-tag-red,.spz-tag-blue { font-size:10px; font-weight:800; padding:2px 7px; border-radius:8px; flex:0 0 auto; }
.spz-tag-green { background:rgba(52,199,89,0.16); color:#1d8a3f; }
.spz-tag-red { background:rgba(255,59,48,0.12); color:#c5221f; }
.spz-tag-blue { background:rgba(147,51,234,0.14); color:#9333EA; }
@media (prefers-color-scheme: dark) {
  #sponzza-launcher .spz-l-text { color:#f5f5f7; }
  #sponzza-launcher { background:rgba(44,44,46,0.82); }
  .spz-ri-co { color:#f5f5f7; }
  .spz-row-item { background:rgba(120,120,128,0.16); }
}


/* ---- Brand wordmark ---- */
.spz-name { font-weight: 800; letter-spacing: -0.5px; color: #1d1d1f; }
.spz-zz { background: linear-gradient(100deg,#7C3AED,#C026D3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spz-wordmark { font-size: 30px; font-weight: 800; letter-spacing: -1px; color: #1d1d1f; }

/* ---- Gate / landing ---- */
.spz-gate { text-align:center; padding: 30px 16px 24px; animation: spz-pop .4s cubic-bezier(.32,.72,0,1); }
.spz-gate-logo { width:64px; height:64px; margin:0 auto 14px; }
.spz-gate-logo svg { width:64px; height:64px; }
.spz-gate-tag { font-size:12px; font-weight:700; letter-spacing:3px; text-transform:uppercase; color:#a78bda; margin-top:4px; }

/* ---- Tab grid: all 5 fit, no scrolling ---- */
.spz-nav { display:grid !important; grid-template-columns:repeat(5,1fr); gap:6px; padding:4px 14px 12px; overflow:visible; }
.spz-chip { position:relative; flex-direction:column; gap:5px; padding:9px 2px; border-radius:13px; font-size:9.5px; font-weight:600; letter-spacing:-0.1px; text-align:center; line-height:1; }
.spz-chip svg { width:17px; height:17px; }
.spz-chip span { white-space:nowrap; }
.spz-chip .spz-new { position:absolute; top:-4px; right:-2px; font-size:7px; padding:1px 3px; border-radius:5px; background:#34C759; color:#fff; }
.spz-chip.active { background:linear-gradient(135deg,#7C3AED,#C026D3); box-shadow:0 4px 12px rgba(147,51,234,0.32); }

/* ---- Tracker rows as links w/ date ---- */
.spz-row-item { display:block; text-decoration:none; color:inherit; }
.spz-row-item:hover { background:rgba(147,51,234,0.08); }
.spz-ri-date { font-size:11px; color:#8e8e93; font-weight:600; flex:0 0 auto; }
.spz-ri-title { color:#8e8e93; }

@media (prefers-color-scheme: dark) {
  .spz-name, .spz-wordmark { color:#f5f5f7; }
  .spz-logo rect, .spz-gate-logo rect { /* keep light tile */ }
}

/* ---- Apply toast ---- */
#spz-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 2147483647; padding: 11px 18px; border-radius: 14px; font-size: 13px; font-weight: 600;
  color: #fff; opacity: 0; pointer-events: none; max-width: 80vw; text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 10px 34px rgba(0,0,0,0.28); transition: opacity .25s ease, transform .25s cubic-bezier(.32,.72,0,1);
}
#spz-toast.spz-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
#spz-toast.spz-toast-ok { background: linear-gradient(135deg,#7C3AED,#C026D3); }
#spz-toast.spz-toast-err { background: #c5221f; }

/* ---- Combined analysis: section labels, CV score, strengths/gaps ---- */
.spz-block-label { font-size:11px; font-weight:800; letter-spacing:0.4px; text-transform:uppercase; color:#a78bda; margin:0 0 10px; }
.spz-cv-upsell { background:rgba(147,51,234,0.08); border-radius:14px; padding:16px; text-align:center; font-size:13px; color:#3a3a3c; }
.spz-cv-loading { font-size:13px; color:#8e8e93; display:flex; align-items:center; gap:8px; padding:8px 0; }
.spz-cv-loading svg { width:15px; height:15px; }
.spz-cv-have { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:#1d8a3f; margin-bottom:6px; }
.spz-cv-have svg { width:15px; height:15px; }

.spz-score-wrap { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.spz-score { font-size:34px; font-weight:800; letter-spacing:-1px; line-height:1; }
.spz-score span { font-size:14px; font-weight:600; color:#8e8e93; letter-spacing:0; }
.spz-score-verdict { font-size:14px; font-weight:700; text-transform:capitalize; }
.spz-score-green, .spz-score-verdict.spz-score-green { color:#1d8a3f; }
.spz-score-amber, .spz-score-verdict.spz-score-amber { color:#b06000; }
.spz-score-red, .spz-score-verdict.spz-score-red { color:#c5221f; }

.spz-sg { margin-bottom:12px; }
.spz-sg-h { font-size:11px; font-weight:800; letter-spacing:0.3px; text-transform:uppercase; margin-bottom:5px; }
.spz-sg-pos { color:#1d8a3f; } .spz-sg-neg { color:#c5221f; }
.spz-sg-row { font-size:12.5px; color:#3a3a3c; line-height:1.5; padding:1px 0; }
@media (prefers-color-scheme: dark){ .spz-sg-row,.spz-cv-upsell{color:#d1d1d6;} }

/* ---- Diagnostics ---- */
.spz-diag { white-space:pre-wrap; word-break:break-word; font-size:11px; line-height:1.4; font-family:ui-monospace,Menlo,monospace; background:rgba(120,120,128,0.1); border-radius:10px; padding:10px 12px; margin-top:8px; max-height:200px; overflow:auto; color:#3a3a3c; text-align:left; }
@media (prefers-color-scheme: dark){ .spz-diag{ background:rgba(120,120,128,0.2); color:#d1d1d6; } }

/* ---- SponsorSignal strength badge & meta ---- */
.spz-signal-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.2px;
  padding: 4px 10px; border-radius: 20px; border: 1.5px solid;
  margin: 12px 0 4px;
}
.spz-signal-meta {
  font-size: 11.5px; color: #8e8e93; font-weight: 500;
  margin-bottom: 10px; letter-spacing: -0.1px;
}
@media (prefers-color-scheme: dark) {
  .spz-signal-meta { color: #636366; }
}

/* ---- Tab & panel animations ---- */
#sponzza-panel { transition: opacity .22s cubic-bezier(.32,.72,0,1), transform .22s cubic-bezier(.32,.72,0,1); }
#sponzza-panel:not(.spz-open) { opacity:0; pointer-events:none; transform:translateX(12px) scale(0.98); }
#sponzza-panel.spz-open { opacity:1; transform:none; }

.spz-body { transition: opacity .12s ease; }
.spz-body.spz-fading { opacity:0; }

.spz-tab-content { animation: spz-slide-up .2s cubic-bezier(.32,.72,0,1); }
@keyframes spz-slide-up {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

.spz-loading-block {
  display:flex; align-items:center; gap:8px; color:#8e8e93;
  font-size:13px; padding:10px 0; animation: spz-pulse 1.4s ease-in-out infinite;
}
.spz-loading-block svg { width:15px; height:15px; color:#9333EA; }
@keyframes spz-pulse { 0%,100%{opacity:.6} 50%{opacity:1} }

/* ---- Tab chip refinements ---- */
.spz-chip { transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.spz-chip:active { transform: scale(0.95); }

/* ---- Tracker v2: status rows ---- */
.spz-tlist { display:flex; flex-direction:column; gap:10px; padding:2px 0 4px; }

.spz-trow { background:rgba(120,120,128,0.07); border-radius:16px; padding:13px 14px; }
.spz-trow-co { font-weight:700; font-size:14px; color:#1d1d1f; text-decoration:none; letter-spacing:-0.2px; }
.spz-trow-co:hover { text-decoration:underline; color:#9333EA; }
.spz-trow-role { font-size:12.5px; color:#8e8e93; margin-top:2px; }
.spz-trow-date { font-size:11px; color:#aeaeb2; margin-top:2px; font-weight:600; }

.spz-url-input {
  width:100%; box-sizing:border-box; margin:10px 0 8px;
  background:rgba(120,120,128,0.1); border:none; border-radius:9px;
  padding:7px 10px; font-size:12px; color:#3a3a3c; outline:none;
  font-family:inherit; transition:background .15s;
}
.spz-url-input:focus { background:rgba(147,51,234,0.1); }
.spz-url-input::placeholder { color:#aeaeb2; }

.spz-trow-togs { display:flex; gap:6px; flex-wrap:wrap; }
.spz-tog {
  font-size:11px; font-weight:700; padding:5px 11px; border-radius:20px;
  border:1.5px solid rgba(120,120,128,0.25); background:transparent;
  color:#8e8e93; cursor:pointer; transition:all .15s ease;
}
.spz-tog:hover { border-color:rgba(147,51,234,0.4); color:#7C3AED; }
.spz-tog.spz-tog-on { background:rgba(52,199,89,0.14); border-color:rgba(52,199,89,0.4); color:#1d8a3f; }
.spz-tog:active { transform:scale(0.95); }

.spz-btn-excel {
  width:100%; margin-top:14px; background:rgba(52,199,89,0.1);
  color:#1d8a3f; border:1.5px solid rgba(52,199,89,0.3);
  display:flex; align-items:center; justify-content:center; gap:7px;
  font-weight:700; font-size:13px; padding:12px; border-radius:14px;
  cursor:pointer; transition:background .15s;
}
.spz-btn-excel:hover { background:rgba(52,199,89,0.2); }
.spz-btn-excel svg { width:15px; height:15px; }

@media (prefers-color-scheme: dark) {
  .spz-trow { background:rgba(120,120,128,0.14); }
  .spz-trow-co { color:#f5f5f7; }
  .spz-url-input { color:#d1d1d6; background:rgba(120,120,128,0.2); }
}
