:root {
  --bg: #e2e2e2;
  --surface: #fff;
  --surface-raised: #f8f8f8;
  --border: rgba(0,0,0,.08);
  --border-hover: rgba(0,0,0,.18);
  --text: #1a1a1a;
  --muted: #555;
  --quiet: #777;
  --accent: #c9ac77;
  --accent-dark: #a88a61;
  --green: #13795b;
  --red: #b42318;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-width: 320px; margin: 0; padding-bottom: calc(82px + var(--safe-bottom)); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shell { width: 100%; max-width: 760px; margin: 0 auto; }
.header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: rgba(248,248,248,.94); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; }
.brand img, .brand svg { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.header-actions { display: flex; gap: 7px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 35px; height: 35px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); }
.icon-btn:hover { border-color: var(--border-hover); }
.badge { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border: 2px solid var(--surface); border-radius: 999px; color: #fff; background: #ef4444; font-size: 9px; font-weight: 800; }

.content { padding: 20px; }
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(25px, 5vw, 36px); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 5px; font-size: 20px; line-height: 1.1; letter-spacing: -.035em; }
h3 { margin-bottom: 5px; font-size: 15px; line-height: 1.2; }
p { line-height: 1.45; }
.sub { margin-bottom: 20px; color: var(--muted); font-size: 13px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.section-title { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-action { padding: 0; border: 0; color: var(--accent-dark); background: none; font-size: 12px; font-weight: 800; }

.profile { display: flex; align-items: center; gap: 13px; padding: 6px 0 20px; }
.profile-avatar { width: 56px; height: 56px; flex: 0 0 auto; border: 2px solid var(--border); border-radius: 50%; object-fit: cover; }
.profile h2 { margin: 0 0 4px; font-size: 19px; }
.profile p { margin: 0; color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { position: relative; padding: 14px 10px; border: 1px solid var(--border); border-radius: 20px; text-align: center; background: var(--surface); }
.stat-value { font-size: 22px; font-weight: 850; letter-spacing: -.05em; }
.stat-label { margin-top: 3px; color: var(--quiet); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.card { margin-bottom: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.04); }
.listing-card { overflow: hidden; padding: 0; transition: .2s ease; }
.listing-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.listing-media { position: relative; height: 190px; overflow: hidden; background: #222; }
.listing-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-badge { position: absolute; top: 11px; left: 11px; padding: 6px 9px; border-radius: 999px; color: #fff; background: rgba(0,0,0,.65); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.listing-body { padding: 14px 15px 15px; }
.listing-title { margin: 0 0 5px; font-size: 16px; font-weight: 800; }
.listing-meta { margin: 0 0 12px; color: var(--quiet); font-size: 12px; line-height: 1.4; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.chip, .button { min-height: 34px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); background: var(--surface-raised); font-size: 12px; font-weight: 750; }
.chip:hover, .button:hover { border-color: var(--border-hover); }
.chip.primary, .button.primary { border-color: var(--text); color: #fff; background: var(--text); }
.chip.accent, .button.accent { border-color: var(--accent); color: #fff; background: var(--accent-dark); }
.button.full { width: 100%; }

.hero { overflow: hidden; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.hero-media { position: relative; height: 250px; background: #222; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.hero-copy { position: absolute; right: 16px; bottom: 15px; left: 16px; color: #fff; }
.hero-copy h2 { margin: 0 0 4px; font-size: 23px; }
.hero-copy p { margin: 0; color: rgba(255,255,255,.8); font-size: 12px; }
.hero-body { padding: 15px; }
.customer-video { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: #111; }
.customer-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #111; }
.customer-video-copy { padding: 14px 15px 16px; color: #fff; background: #1a1a1a; }
.customer-video-copy h2 { margin-bottom: 4px; color: #fff; font-size: 20px; }
.customer-video-copy p { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 16px 0 4px; padding: 5px; border-radius: 15px; background: rgba(255,255,255,.55); }
.tab { display: grid; place-items: center; min-height: 32px; padding: 7px 4px; border: 0; border-radius: 11px; color: var(--quiet); background: transparent; font-size: 11px; font-weight: 800; text-decoration: none; }
.tab.active, .tab:hover { color: var(--text); background: var(--surface); box-shadow: 0 3px 10px rgba(0,0,0,.05); }
.view { display: none; }
.view.active { display: block; }
.offer-card { padding: 17px; border: 1px solid rgba(201,172,119,.45); border-radius: 20px; background: #fbf7ef; }
.offer-card h2 { margin-bottom: 7px; }
.offer-card p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.offer-points { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.offer-points li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 12px; line-height: 1.4; }
.offer-points li::before { content: "✓"; color: var(--accent-dark); font-weight: 900; }
.bundle-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.bundle-toggle .chip.active { color: #fff; background: var(--text); }
.bundle-card { position: relative; }
.bundle-card.featured { border-color: rgba(201,172,119,.72); box-shadow: 0 8px 25px rgba(201,172,119,.15); }
.bundle-card .bundle-badge { position: absolute; top: 13px; right: 13px; padding: 5px 8px; border-radius: 999px; color: #fff; background: var(--accent-dark); font-size: 9px; font-weight: 850; }
.bundle-card h3 { padding-right: 80px; }
.bundle-price { margin: 9px 0 5px; font-size: 26px; font-weight: 900; letter-spacing: -.05em; }
.bundle-price small { color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.bundle-card p { color: var(--muted); font-size: 12px; }
.account-actions { display: grid; gap: 8px; }
.account-actions .button { text-align: left; }
.danger-button { border-color: #efb6b1; color: var(--red); background: #fff7f6; }
.price { color: var(--accent-dark); font-size: 22px; font-weight: 900; }
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 13px 0; }
.detail { padding: 11px 7px; border-radius: 14px; text-align: center; background: var(--surface-raised); }
.detail strong { display: block; font-size: 14px; }
.detail span { display: block; margin-top: 3px; color: var(--quiet); font-size: 10px; }
.agent-row { display: flex; align-items: center; gap: 10px; }
.agent-row img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.agent-copy { flex: 1; }
.agent-copy strong, .agent-copy span { display: block; }
.agent-copy strong { font-size: 13px; }
.agent-copy span { margin-top: 2px; color: var(--quiet); font-size: 11px; }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric { padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.metric strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.metric span { display: block; margin-top: 3px; color: var(--quiet); font-size: 11px; }
.copy-card { padding: 16px; border: 1px solid rgba(201,172,119,.35); border-radius: 18px; background: #fbf7ef; }
.copy-card p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.copy-card h3 { margin-bottom: 7px; font-size: 18px; }
.content-list { display: grid; gap: 9px; }
.listing-carousel { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.listing-carousel::-webkit-scrollbar { display: none; }
.carousel-card { min-width: 238px; overflow: hidden; padding: 0; scroll-snap-align: start; }
.carousel-card img { width: 100%; height: 126px; object-fit: cover; }
.carousel-card-body { padding: 12px; }
.carousel-card h3 { margin-bottom: 4px; }
.carousel-card p { margin-bottom: 9px; color: var(--quiet); font-size: 11px; line-height: 1.35; }
.selected-listing { border-color: rgba(19,121,91,.45); background: #f3fbf7; }
.distribution-links { display: flex; flex-wrap: wrap; gap: 7px; }
.distribution-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 750; }
.distribution-link svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
.content-item { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.content-item b { display: block; margin-bottom: 2px; font-size: 12px; }
.content-item span { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.bullet { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--accent-dark); font-size: 11px; font-weight: 900; }

.form-card label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.form-card input, .form-card textarea, .form-card select { width: 100%; margin-bottom: 13px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 13px; outline: none; background: var(--surface-raised); font-size: 13px; }
.form-card textarea { min-height: 100px; resize: vertical; }
.form-card input:focus, .form-card textarea:focus, .form-card select:focus { border-color: var(--accent-dark); }
.json-preview { overflow: auto; max-height: 300px; margin: 12px 0 0; padding: 13px; border-radius: 14px; color: #f2f5f3; background: #202523; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

.lead-card { display: flex; align-items: center; gap: 11px; }
.lead-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--accent-dark); font-size: 13px; font-weight: 800; }
.lead-main { min-width: 0; flex: 1; }
.lead-main strong, .lead-main span { display: block; }
.lead-main strong { font-size: 14px; }
.lead-main span { overflow: hidden; margin-top: 2px; color: var(--quiet); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 13px 0; }
.status-track span { padding: 7px 3px; border-radius: 9px; color: var(--quiet); background: var(--surface-raised); font-size: 9px; font-weight: 800; text-align: center; }
.status-track span.complete { color: #166534; background: #dcfce7; }
.status.new { color: #166534; background: #dcfce7; }
.status.review { color: #92400e; background: #fef3c7; }
.status.blocked { color: var(--red); background: #fee4e2; }
.policy { padding: 12px; border: 1px solid #f0d6d2; border-radius: 15px; color: #7a271a; background: #fff7f6; font-size: 12px; line-height: 1.45; }
.policy strong { display: block; margin-bottom: 3px; }

.dashboard-empty { padding: 28px 18px; border: 1px dashed var(--border-hover); border-radius: 20px; text-align: center; background: rgba(255,255,255,.45); }
.dashboard-empty h3 { margin-bottom: 5px; font-size: 16px; }
.dashboard-empty p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.campaign-row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 9px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.campaign-row:last-child { border-bottom: 0; }
.campaign-name strong, .campaign-name span { display: block; }
.campaign-name strong { font-size: 13px; }
.campaign-name span { margin-top: 3px; color: var(--quiet); font-size: 11px; }
.campaign-metric strong, .campaign-metric span { display: block; text-align: right; }
.campaign-metric strong { font-size: 15px; }
.campaign-metric span { margin-top: 2px; color: var(--quiet); font-size: 9px; }

.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 100; display: flex; align-items: center; justify-content: space-around; padding: 9px 0 calc(9px + var(--safe-bottom)); border-top: 1px solid var(--border); background: rgba(248,248,248,.95); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 8px; border: 0; color: var(--quiet); background: none; font-size: 10px; font-weight: 750; }
.nav-item.active, .nav-item:hover { color: var(--text); }
.nav-icon { font-size: 19px; line-height: 1; }
.toast { position: fixed; bottom: calc(92px + var(--safe-bottom)); left: 50%; z-index: 200; max-width: 90vw; padding: 10px 15px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }

@media (min-width: 700px) {
  body { padding: 20px 20px calc(100px + var(--safe-bottom)); }
  .header { border: 1px solid var(--border); border-radius: 20px 20px 0 0; }
  .shell { border-radius: 20px; }
  .bottom-nav { right: 20px; left: 20px; max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-radius: 20px 20px 0 0; }
  .toast { bottom: 105px; }
}
