/* SmartLeadGen — shared design system.
   Carried forward on purpose from the existing app.py Streamlit build
   (same palette, same type pairing, same "ping" mark) so the product
   keeps one visual identity across the migration, not two. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --ink: #10151F;
  --off-white: #F7F6F3;
  --teal: #0E7C6B;
  --teal-deep: #0A5A4D;
  --amber: #E8A33D;
  --line: #E4E1DA;
  --text-soft: #5B6472;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(16, 21, 31, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--off-white);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; margin: 0; }

.slg-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal) 0%, var(--ink) 130%);
  color: white; margin-bottom: 24px;
}
.slg-ping { width: 14px; height: 14px; border-radius: 50%; background: var(--amber); position: relative; flex-shrink: 0; }
.slg-ping::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--amber); opacity: 0.6; animation: slg-pulse 1.8s ease-out infinite;
}
@keyframes slg-pulse { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(2.2); opacity: 0; } }
.slg-title { font-size: 1.3rem; font-weight: 700; margin: 0; }
.slg-subtitle { font-size: 0.82rem; opacity: 0.88; margin: 2px 0 0; }
.slg-header-spacer { flex: 1; }
.slg-header-meta { font-size: 0.82rem; opacity: 0.9; text-align: right; }
.slg-header-meta button {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3);
  color: white; border-radius: 8px; padding: 4px 10px; font-size: 0.78rem; cursor: pointer; margin-top: 4px;
}

.slg-shell { max-width: 960px; margin: 32px auto; padding: 0 20px 60px; }
.slg-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.slg-card h2 { font-size: 1.05rem; margin-bottom: 4px; }
.slg-card-hint { color: var(--text-soft); font-size: 0.86rem; margin: 0 0 16px; }

label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 0.92rem; margin-bottom: 14px; background: var(--off-white);
}
textarea { resize: vertical; min-height: 60px; }
.slg-row { display: grid; gap: 14px; }
.slg-row-2 { grid-template-columns: 1fr 1fr; }
.slg-row-3 { grid-template-columns: 2fr 2fr 1fr; }
@media (max-width: 640px) { .slg-row-2, .slg-row-3 { grid-template-columns: 1fr; } }

button.slg-btn {
  background: var(--teal); color: white; border: none; border-radius: 8px;
  padding: 11px 20px; font-weight: 600; font-size: 0.92rem; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: background 0.15s ease;
}
button.slg-btn:hover { background: var(--teal-deep); }
button.slg-btn:disabled { background: #A9B2AE; cursor: not-allowed; }
button.slg-btn-ghost {
  background: transparent; color: var(--teal); border: 1px solid var(--teal);
}
button.slg-btn-ghost:hover { background: rgba(14,124,107,0.08); }

.slg-check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.slg-check input { width: auto; margin: 0; }
.slg-check label { margin: 0; font-weight: 500; }

.slg-provider-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 640px) { .slg-provider-choice { grid-template-columns: 1fr; } }
.slg-provider-opt {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer;
  font-size: 0.84rem; transition: border-color 0.15s ease;
}
.slg-provider-opt strong { display: block; font-family: 'Space Grotesk', sans-serif; margin-bottom: 3px; }
.slg-provider-opt span { color: var(--text-soft); font-size: 0.78rem; }
.slg-provider-opt.selected { border-color: var(--teal); background: rgba(14,124,107,0.06); }

.slg-progress-track { background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; margin: 10px 0; }
.slg-progress-fill { background: var(--teal); height: 100%; width: 0%; transition: width 0.3s ease; }
.slg-progress-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-soft); font-family: 'JetBrains Mono', monospace; }

.slg-banner { border-radius: 10px; padding: 12px 16px; font-size: 0.86rem; margin-bottom: 14px; }
.slg-banner-warn { background: #FCEBD5; color: #7A4A0E; border: 1px solid #E8A33D66; }
.slg-banner-error { background: #FBE7E4; color: #8C2E1E; border: 1px solid #D9634F66; }
.slg-banner-ok { background: #E4F3EF; color: #0A5A4D; border: 1px solid #0E7C6B44; }

.slg-badge-high { background:#FCEBD5; color:#9A5B10; padding:2px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; }
.slg-badge-medium { background:#E8EEF7; color:#3D5A80; padding:2px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; }
.slg-badge-low { background:#EEF1F4; color:#6B7684; padding:2px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; }

table.slg-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
table.slg-table th { text-align: left; color: var(--text-soft); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.slg-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.slg-table-wrap { overflow-x: auto; }

.slg-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 640px) { .slg-metrics { grid-template-columns: repeat(2, 1fr); } }
.slg-metric { background: var(--off-white); border-radius: 10px; padding: 12px 14px; }
.slg-metric b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; }
.slg-metric span { font-size: 0.76rem; color: var(--text-soft); }

.slg-auth-shell { max-width: 400px; margin: 60px auto; padding: 0 20px; }
.slg-link-row { text-align: center; font-size: 0.86rem; margin-top: 6px; color: var(--text-soft); }
.slg-link-row a { color: var(--teal); font-weight: 600; text-decoration: none; cursor: pointer; }

.slg-footer { text-align: center; font-size: 0.78rem; color: var(--text-soft); margin-top: 30px; }

.slg-getting-started {
  background: rgba(232,163,61,0.14); border: 1px solid rgba(232,163,61,0.45);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: 0.86rem;
}
.slg-getting-started strong { display: block; margin-bottom: 6px; font-family: 'Space Grotesk', sans-serif; }
.slg-getting-started ol { margin: 0; padding-left: 20px; }
.slg-getting-started li { margin-bottom: 4px; }

details.slg-why { margin: 6px 0 4px; font-size: 0.86rem; }
details.slg-why summary { cursor: pointer; font-weight: 600; color: var(--teal); }
details.slg-why summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
details.slg-why p { color: var(--text-soft); margin: 8px 0; line-height: 1.5; }

.slg-getkey-link { font-size: 0.8rem; color: var(--text-soft); margin: -8px 0 12px; }
.slg-getkey-link a { color: var(--teal); font-weight: 600; text-decoration: none; }
.slg-getkey-link a:hover { text-decoration: underline; }

.slg-star-row { display: flex; gap: 6px; margin-bottom: 14px; }
.slg-star-row button { background: none; border: none; font-size: 1.6rem; color: var(--line); cursor: pointer; padding: 0; line-height: 1; }
.slg-star-row button.selected, .slg-star-row button:hover, .slg-star-row button:hover ~ button { color: var(--amber); }

/* ===================== Site chrome (public pages) ===================== */

#site-header { position: sticky; top: 0; z-index: 40; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-header-inner { max-width: 1080px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; }
.site-logo { display: flex; align-items: center; gap: 8px; color: white; text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; }
.slg-ping-sm { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); position: relative; flex-shrink: 0; }
.slg-ping-sm::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--amber); opacity: 0.6; animation: slg-pulse 1.8s ease-out infinite; }
.site-nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; margin-left: auto; }
.site-nav-collapsible { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav-links { display: flex; gap: 20px; }
.site-nav-links a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.site-nav-links a:hover, .site-nav-links a.active { color: var(--amber); }
.site-header-actions { display: flex; align-items: center; gap: 10px; }
.site-link-btn { color: white; text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.site-cta-btn { background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.86rem; padding: 8px 16px; border-radius: 8px; }
.site-header-actions a.active { text-decoration: underline; }

@media (max-width: 760px) {
  .site-nav-toggle { display: block; }
  .site-nav-collapsible {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); flex-direction: column; align-items: stretch;
    padding: 16px 20px 20px; gap: 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .site-nav-collapsible.open { display: flex; }
  .site-nav-links { flex-direction: column; gap: 14px; }
  .site-header-actions { flex-direction: column; align-items: stretch; }
  .site-cta-btn, .site-link-btn { text-align: center; padding: 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; }
}

#site-footer { background: var(--ink); color: rgba(255,255,255,0.75); margin-top: 60px; }
.site-footer-inner { max-width: 1080px; margin: 0 auto; padding: 40px 20px 20px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer-brand { max-width: 280px; }
.site-footer-brand strong { color: white; font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; }
.site-footer-brand p { font-size: 0.84rem; margin-top: 6px; }
.site-footer-cols { display: flex; gap: 40px; flex-wrap: wrap; }
.site-footer-cols > div { display: flex; flex-direction: column; gap: 8px; min-width: 110px; }
.site-footer-heading { color: white; font-weight: 600; font-size: 0.82rem; margin-bottom: 4px; }
.site-footer-cols a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.84rem; }
.site-footer-cols a:hover { color: var(--amber); }
.site-footer-copy { text-align: center; font-size: 0.78rem; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.site-footer-copy a { color: rgba(255,255,255,0.7); }
.site-footer-gear { opacity: 0.35; text-decoration: none; margin-left: 10px; }
.site-footer-gear:hover { opacity: 0.7; }

/* ===================== Homepage ===================== */

.home-hero { background: linear-gradient(160deg, var(--ink) 0%, var(--teal-deep) 130%); color: white; padding: 64px 20px 80px; text-align: center; }
.home-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); padding: 5px 14px; border-radius: 999px; font-size: 0.8rem; margin-bottom: 20px; }
.home-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); max-width: 720px; margin: 0 auto 16px; line-height: 1.15; }
.home-hero p { max-width: 560px; margin: 0 auto 28px; opacity: 0.9; font-size: 1.05rem; }
.home-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.home-cta-primary { background: var(--amber); color: var(--ink); padding: 13px 26px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.home-cta-secondary { border: 1px solid rgba(255,255,255,0.4); color: white; padding: 13px 26px; border-radius: 8px; font-weight: 600; text-decoration: none; }

.home-section { max-width: 1080px; margin: 0 auto; padding: 64px 20px; }
.home-section h2 { font-size: 1.7rem; text-align: center; margin-bottom: 10px; }
.home-section-sub { text-align: center; color: var(--text-soft); max-width: 560px; margin: 0 auto 40px; }

.home-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .home-steps, .home-pricing-grid, .home-audience { grid-template-columns: 1fr !important; } }
.home-step { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.home-step-num { font-family: 'JetBrains Mono', monospace; color: var(--teal); font-size: 0.8rem; font-weight: 600; }
.home-step h3 { margin: 8px 0; font-size: 1.05rem; }
.home-step p { color: var(--text-soft); font-size: 0.9rem; margin: 0; }

.home-audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.home-audience-card { background: var(--off-white); border-radius: 12px; padding: 20px; text-align: center; }
.home-audience-card strong { display: block; font-family: 'Space Grotesk', sans-serif; margin-bottom: 6px; }
.home-audience-card span { font-size: 0.86rem; color: var(--text-soft); }

.home-pricing { background: var(--off-white); }
.home-pricing-grid { display: grid; grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
.home-pricing-card { background: white; border: 2px solid var(--teal); border-radius: var(--radius); padding: 32px; text-align: center; }
.home-pricing-card .price { font-family: 'Space Grotesk', sans-serif; font-size: 2.6rem; font-weight: 700; margin: 10px 0; }
.home-pricing-card .price span { font-size: 1rem; color: var(--text-soft); font-weight: 400; }
.home-pricing-note { font-size: 0.86rem; color: var(--text-soft); margin-top: 14px; }
.home-pricing-alt { font-size: 0.85rem; color: var(--text-soft); margin: -6px 0 8px; }

.payment-panel { max-width: 760px; margin: 40px auto 0; padding-top: 32px; border-top: 1px solid rgba(0,0,0,0.08); }
.payment-panel h3 { display: flex; align-items: center; }
.payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.payment-card { background: white; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius); padding: 16px; }
.payment-card-label { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.payment-value { font-size: 1rem; letter-spacing: 0.5px; color: var(--text-soft); margin-bottom: 10px; }
.payment-copy-btn { border: 1px solid var(--teal); background: none; color: var(--teal); border-radius: 6px; padding: 6px 12px; font-weight: 600; cursor: pointer; font-size: 0.86rem; }
.payment-copy-btn.copied { background: var(--teal); color: white; }
.payment-guide { font-size: 0.82rem; color: var(--text-soft); margin: 8px 0 0; }
@media (max-width: 600px) { .payment-grid { grid-template-columns: 1fr; } }

.home-review { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 640px; margin: 0 auto; }
.home-review p { font-style: italic; color: var(--ink); }
.home-review-who { color: var(--text-soft); font-size: 0.86rem; margin-top: 10px; }

.home-faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.home-faq-item summary { cursor: pointer; font-weight: 600; }
.home-faq-item p { color: var(--text-soft); margin: 10px 0 0; }

/* ===================== Support chatbot widget ===================== */

.slg-chat-bubble {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%; border: none;
  background: var(--teal); color: white; font-size: 1.4rem; cursor: pointer;
  box-shadow: var(--shadow);
}
.slg-chat-panel {
  position: fixed; bottom: 84px; right: 20px; z-index: 60;
  width: min(340px, calc(100vw - 40px)); max-height: 460px;
  background: white; border-radius: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
}
.slg-chat-head { background: var(--ink); color: white; padding: 14px 16px; position: relative; }
.slg-chat-head strong { display: block; font-family: 'Space Grotesk', sans-serif; }
.slg-chat-head span { font-size: 0.76rem; opacity: 0.8; }
.slg-chat-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: white; cursor: pointer; font-size: 1rem; }
.slg-chat-whatsapp { display: inline-block; margin-top: 8px; background: #25D366; color: #04150C; text-decoration: none; font-size: 0.78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.slg-chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.slg-chat-msg { font-size: 0.86rem; padding: 9px 12px; border-radius: 10px; max-width: 85%; line-height: 1.4; }
.slg-chat-msg-bot { background: var(--off-white); align-self: flex-start; }
.slg-chat-msg-user { background: var(--teal); color: white; align-self: flex-end; }
.slg-chat-form { display: flex; border-top: 1px solid var(--line); }
.slg-chat-form input { flex: 1; border: none; padding: 12px; font-size: 0.86rem; margin: 0; border-radius: 0; background: white; }
.slg-chat-form button { border: none; background: var(--teal); color: white; padding: 0 16px; font-weight: 600; cursor: pointer; }

/* ===================== Simple content pages ===================== */
.content-page { max-width: 720px; margin: 0 auto; padding: 48px 20px 64px; }
.content-page h1 { font-size: 1.9rem; margin-bottom: 6px; }
.content-page .content-updated { color: var(--text-soft); font-size: 0.82rem; margin-bottom: 32px; }
.content-page h2 { font-size: 1.15rem; margin: 30px 0 10px; }
.content-page p, .content-page li { color: #333; line-height: 1.65; font-size: 0.95rem; }
.content-page ul { padding-left: 20px; }
.content-page a { color: var(--teal); }

@media (prefers-reduced-motion: reduce) {
  .slg-ping::after { animation: none; }
  button.slg-btn, .slg-progress-fill { transition: none; }
}
