/* ==========================================================
   Mukrank — single stylesheet (loaded after Bootstrap 5.3)
   Palette: petrol (trust), saffron (the top spot), WhatsApp green (action)
   ========================================================== */
:root {
  --ink: #12292D;
  --muted: #5B6D70;
  --bg: #F3F6F5;
  --surface: #FFFFFF;
  --line: #D9E2E0;
  --petrol: #0D5C63;
  --petrol-dark: #083F45;
  --petrol-soft: #E3EFEE;
  --saffron: #E39B2D;
  --saffron-dark: #B9761A;
  --saffron-soft: #FCF1DE;
  --wa: #1A9A55;
  --wa-dark: #137A42;
  --danger: #C2412D;

  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-link-color: var(--petrol);
  --bs-link-color-rgb: 13, 92, 99;
  --bs-link-hover-color: var(--petrol-dark);
  --bs-border-color: var(--line);
  --bs-primary: var(--petrol);
  --bs-primary-rgb: 13, 92, 99;
}

body { font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.narrow { max-width: 640px; }
.narrow-wide { max-width: 900px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: var(--radius-sm); padding: .6rem 1.1rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.05rem; }
.btn-sm { padding: .3rem .7rem; }
.btn-primary { --bs-btn-bg: var(--petrol); --bs-btn-border-color: var(--petrol); --bs-btn-hover-bg: var(--petrol-dark); --bs-btn-hover-border-color: var(--petrol-dark); --bs-btn-active-bg: var(--petrol-dark); --bs-btn-disabled-bg: var(--petrol); }
.btn-outline-primary { --bs-btn-color: var(--petrol); --bs-btn-border-color: var(--petrol); --bs-btn-hover-bg: var(--petrol); --bs-btn-hover-border-color: var(--petrol); --bs-btn-active-bg: var(--petrol-dark); }
.btn-accent { background: var(--saffron); border: 1px solid var(--saffron); color: #2A1A04; }
.btn-accent:hover, .btn-accent:focus { background: var(--saffron-dark); border-color: var(--saffron-dark); color: #fff; }
.btn-wa { background: var(--wa); border: 1px solid var(--wa); color: #fff; }
.btn-wa:hover, .btn-wa:focus { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; }
.btn-outline-ink { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline-ink:hover { background: var(--ink); color: #fff; }
.btn-link-ink { color: var(--petrol); text-decoration: underline; padding-left: .4rem; padding-right: .4rem; }

/* ---------- Header / footer ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .navbar { padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--petrol); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1rem;
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-tag { font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .55rem; }
.navbar .btn-accent { padding: .5rem 1rem; }
.navbar .nav-link { color: var(--muted); font-weight: 500; }
.navbar .nav-link.active, .navbar .nav-link:hover { color: var(--petrol); }
.navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--saffron); }
.site-main { min-height: 60vh; }
.site-footer { background: var(--petrol-dark); color: #CFE0DE; padding: 2.5rem 0 1.5rem; margin-top: 3rem; }
.layout-admin .site-footer, .layout-advertiser .site-footer { background: transparent; color: var(--muted); padding: 1.5rem 0; margin-top: 1rem; }
.footer-brand { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.15rem; margin-bottom: .4rem; }
.footer-note { max-width: 52ch; font-size: .92rem; }
.footer-links a { color: #fff; margin-left: 1.2rem; display: inline-block; margin-bottom: .4rem; }
.footer-links a:first-child { margin-left: 0; }
.footer-copy { font-size: .85rem; margin: 1.5rem 0 0; opacity: .75; }

/* ---------- Public: hero ---------- */
.listing-hero, .home-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2rem; }
.home-hero { padding: 3.5rem 0 3rem; }
.hero-title { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 800; max-width: 22ch; letter-spacing: -0.03em; }
.home-hero .hero-title { max-width: 24ch; }
.hero-intro { font-size: 1.12rem; color: var(--muted); max-width: 60ch; margin: .8rem 0 0; }
.hero-meta { color: var(--muted); font-size: .92rem; margin: .8rem 0 0; }

/* ---------- Public: listings ---------- */
.listing-layout { padding-top: 2rem; padding-bottom: 1rem; }
.sponsored-note { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.listing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.listing {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem 1.2rem .6rem;
}
.listing-rank {
  font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 1;
  color: var(--petrol-soft); -webkit-text-stroke: 1.5px var(--petrol); text-align: center; padding-top: .15rem;
}
.listing:first-child { border-color: var(--saffron); box-shadow: 0 0 0 1px var(--saffron) inset; }
.listing:first-child .listing-rank { color: var(--saffron); -webkit-text-stroke: 0; }
.listing-head { display: flex; align-items: center; gap: .8rem; }
.listing-logo { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: contain; border: 1px solid var(--line); background: #fff; flex: none; }
.listing-initials { display: inline-grid; place-items: center; background: var(--petrol-soft); color: var(--petrol); font-family: var(--font-display); font-weight: 800; }
.listing-name { font-size: 1.25rem; margin: 0; }
.verified { font-size: .82rem; color: var(--wa-dark); font-weight: 600; }
.verified::before { content: ''; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--wa); margin-right: .35rem; vertical-align: .05rem; }
.listing-desc { color: var(--muted); margin: .7rem 0 .9rem; max-width: 62ch; }
.listing-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 2rem; }
.empty-state h2 { font-size: 1.3rem; }

.page-content { margin-top: 2.5rem; max-width: 70ch; }
.page-content h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
.page-content h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }

/* ---------- Public: quote form ---------- */
.quote-card {
  position: sticky; top: 1rem;
  background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem;
  border: 1px solid var(--line); border-top: 6px solid var(--saffron);
}
.quote-title { font-size: 1.45rem; font-weight: 800; margin-bottom: .4rem; }
.quote-sub { color: var(--muted); font-size: .95rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-label { font-weight: 600; font-size: .93rem; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--petrol); box-shadow: 0 0 0 .2rem rgba(13, 92, 99, .18); }
.form-check-input:checked { background-color: var(--petrol); border-color: var(--petrol); }

/* ---------- Home ---------- */
.cat-group { margin-top: 2.5rem; }
.cat-title { font-size: 1.4rem; margin-bottom: .8rem; }
.cat-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .6rem; }
.cat-links a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; }
.cat-links a:hover { border-color: var(--petrol); }
.cat-links small { color: var(--muted); font-weight: 500; white-space: nowrap; }
.for-business { margin-top: 3rem; padding: 2rem; border-radius: var(--radius-lg); background: var(--petrol); color: #E6F1F0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.for-business h2 { color: #fff; font-size: 1.6rem; }
.for-business p { max-width: 60ch; margin: 0; }

.thanks .lead { max-width: 52ch; }
.steps { padding-left: 1.2rem; margin: 1.5rem 0; }
.steps li { margin-bottom: .5rem; }

/* ---------- Lead page (advertiser link) ---------- */
.lead-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; }
.lead-page { color: var(--muted); font-size: .9rem; margin-bottom: .8rem; }
.countdown { display: flex; align-items: baseline; gap: .7rem; margin-bottom: .6rem; }
.countdown-time { font-family: var(--font-display); font-weight: 800; font-size: clamp(3.2rem, 12vw, 4.8rem); line-height: 1; color: var(--petrol); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.countdown-label { color: var(--muted); }
.countdown.is-urgent .countdown-time { color: var(--danger); }
.countdown.is-expired .countdown-time { color: var(--muted); text-decoration: line-through; }
.countdown-sm .countdown-time { font-size: 1.6rem; }
.lead-details { margin: 1.2rem 0 1.4rem; border-top: 1px solid var(--line); }
.lead-details > div { display: grid; grid-template-columns: 9rem 1fr; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.lead-details dt { color: var(--muted); font-weight: 500; }
.lead-details dd { margin: 0; font-weight: 600; }

/* ---------- App (admin + advertiser) ---------- */
.page-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.panel-alert { border-left: 4px solid var(--danger); }
.auth-wrap { max-width: 420px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.stat-gold { border-color: var(--saffron); }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: 1.65rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label, .cpl-row .stat-label { color: var(--muted); font-size: .85rem; line-height: 1.3; }
.stat-gold { background: var(--saffron-soft); }
.stat-gold .stat-num { color: var(--saffron-dark); }
.stat-alert .stat-num { color: var(--danger); }
.chart-box { position: relative; height: 260px; }
.mini-stats { margin: 0 0 1rem; }
.mini-stats > div { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.mini-stats dt { font-weight: 500; color: var(--muted); }
.mini-stats dd { margin: 0; font-weight: 700; text-align: right; }
.cpl-row { display: flex; flex-wrap: wrap; gap: 2rem; }
.cpl-row > div { display: flex; flex-direction: column; }
.cpl-num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1.1; }
.open-leads { background: var(--saffron-soft); border: 1px solid var(--saffron); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1.2rem; }
.open-lead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); border-radius: var(--radius-sm); padding: .7rem .9rem; margin-top: .5rem; color: var(--ink); text-decoration: none; }
.open-lead:hover { outline: 2px solid var(--saffron); }
.check-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.check-chip { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; background: var(--surface); cursor: pointer; }
.check-chip:has(input:checked) { border-color: var(--petrol); background: var(--petrol-soft); }
.share-preview { background: var(--petrol-soft); border-radius: var(--radius-sm); padding: .7rem .9rem; font-weight: 600; }
.resend-box { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.lead-cards { display: grid; gap: .8rem; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav-pills .nav-link { color: var(--muted); }
.nav-pills .nav-link.active { background: var(--petrol); }
.progress-bar { background: var(--petrol); }

/* ---------- Homepage ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
.home-hero { padding: 4rem 0 4.5rem; }
.is-home .hero-title { font-size: clamp(2.3rem, 5vw, 3.9rem); max-width: 16ch; line-height: 1.03; }
.is-home .hero-intro { margin-top: 1.3rem; }
.is-home .site-footer { margin-top: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.home-hero .hero-meta { margin-top: 1.2rem; }

.hero-demo { position: relative; max-width: 460px; margin-left: auto; }
.demo-alert {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.5rem; box-shadow: 0 24px 48px -28px rgba(8, 63, 69, .45);
  border-top: 6px solid var(--saffron); position: relative; z-index: 2;
}
.demo-kicker { font-weight: 700; color: var(--saffron-dark); margin: 0 0 .2rem; font-size: .92rem; }
.demo-job { font-weight: 600; margin: 0 0 1rem; }
.demo-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.demo-timer { font-family: var(--font-display); font-weight: 800; font-size: 4rem; line-height: 1; color: var(--petrol); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.demo-slots { color: var(--muted); font-size: .92rem; }
.demo-btn { pointer-events: none; }
.demo-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: -1rem 1.2rem 0; padding: 1.8rem 1rem 1rem;
  background: var(--petrol); color: #CFE0DE; border-radius: 0 0 var(--radius-lg) var(--radius-lg); position: relative; z-index: 1;
}
.demo-stats dt { font-weight: 500; font-size: .78rem; line-height: 1.25; }
.demo-stats dd { margin: .2rem 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: #fff; }
.demo-caption { text-align: right; font-size: .8rem; color: var(--muted); margin: .5rem 1.2rem 0; }

.home-section { padding: 4.5rem 0; }
.home-section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 1rem; max-width: 24ch; }
.section-intro { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.fine-print { color: var(--muted); font-size: .85rem; max-width: 80ch; }

.how-steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem 2.5rem; }
.how-steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.how-steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--petrol); margin-bottom: .6rem; }
.how-steps li:last-child { border-top-color: var(--saffron); }
.how-steps li:last-child::before { color: var(--saffron-dark); }
.how-steps h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.how-steps p { color: var(--muted); margin: 0; }

.lead-types { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.5rem; }
.lead-type { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; background: var(--bg); }
.lead-type h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.lead-type p { margin: 0; color: var(--muted); }
.lead-type-accent { background: var(--saffron-soft); border-color: var(--saffron); }

.example-table { margin: 1.5rem 0 .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.example-table table { margin: 0; min-width: 560px; }
.example-table th, .example-table td { padding: .9rem 1rem; }
.example-table thead th { font-size: .9rem; color: var(--ink); font-weight: 700; background: var(--petrol-soft); }
.example-table thead th:last-child, .example-table td:last-child { background: rgba(227, 155, 45, .08); }
.example-table tbody th { font-weight: 600; color: var(--muted); font-size: .95rem; }
.example-table .row-strong td, .example-table .row-strong th { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.example-table .row-strong td:last-child { color: var(--saffron-dark); }

.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; margin: 1.5rem 0 0; }
.feature-list > div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.feature-list dt { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: .25rem; }
.feature-list dd { margin: 0; color: var(--muted); }

.benefit-list { list-style: none; padding: 0; margin: 0; }
.benefit-list li { padding: 1rem 0 1rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.benefit-list li::before { content: ''; position: absolute; left: 0; top: 1.45rem; width: .9rem; height: .9rem; border-radius: 50%; background: var(--wa); }

.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { font-weight: 700; font-size: 1.08rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--petrol); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); margin: .6rem 0 0; max-width: 70ch; }

.book-section { background: var(--petrol); color: #DCEAE8; }
.book-section .section-title { color: #fff; }
.book-section .section-intro { color: #CFE0DE; }
.book-points { list-style: none; padding: 0; margin: 1.5rem 0; }
.book-points li { padding: .35rem 0 .35rem 1.6rem; position: relative; }
.book-points li::before { content: ''; position: absolute; left: 0; top: .85rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--saffron); }
.book-card { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 1.8rem; }
.book-done h3 { font-size: 1.5rem; }

.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; }
.crumbs a { color: var(--muted); }
.footer-head { color: #fff; font-weight: 700; margin-bottom: .5rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .35rem; }
.footer-list a { color: #CFE0DE; }
.footer-list a:hover { color: #fff; }
.stat-link { color: inherit; text-decoration: none; }
.stat-link:hover { border-color: var(--petrol); }
.panel-focus { outline: 3px solid var(--saffron); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .quote-card { position: static; }
  .hero-demo { margin: 0 auto; }
  .lead-types, .feature-list { grid-template-columns: 1fr; }
  .home-section { padding: 3.2rem 0; }
}
@media (max-width: 575.98px) {
  .listing { grid-template-columns: 2.6rem 1fr; padding: 1rem 1rem 1rem .4rem; gap: .6rem; }
  .listing-rank { font-size: 2rem; }
  .listing-actions .btn { flex: 1 1 auto; }
  .lead-details > div { grid-template-columns: 1fr; gap: 0; }
  .footer-links a { margin: 0 1rem .4rem 0; }
  .demo-timer { font-size: 3.2rem; }
  .demo-stats { margin: -1rem .6rem 0; }
  .demo-stats dd { font-size: 1.1rem; }
  .book-card { padding: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
