/*
 * LeadGen.tools UI kit (v2) for the app pages: Home, My campaigns, a campaign, Replies, My email, Team…
 * Loaded by core.php on every page. Independent of the purged Tailwind build: everything is prefixed .lg-
 * Same language as the landing, the simulator and the aMember pages: ink borders, hard offset shadows, lime accent,
 * Space Grotesk headings + Inter text. Wide screens get real layouts (main + aside); phones get stacked cards.
 *
 * Building blocks: .lg-page (container) · .lg-phead (page header: eyebrow, title, sub, actions) · .lg-layout
 * (main + .lg-aside) · .lg-card (+ .lg-card-h header row) · .lg-tiles/.lg-tile (numbers) · .lg-rows/.lg-row (lists)
 * · .lg-btn · .lg-chip · .lg-filters (scrollable pills) · .lg-empty.
 */
:root { --lg-ink: #111; --lg-lime: #a3e635; --lg-lime-soft: #ecfccb; --lg-paper: #f7f7f2; }

/* the canvas: warm paper with a faint dot grid (same as the landing) */
body.bg-neutral-50, body { background-color: var(--lg-paper) !important;
  background-image: radial-gradient(#dcdcd2 1px, transparent 1.2px); background-size: 22px 22px; background-attachment: fixed; }

.lg-page { --ink: #111; --lime: #a3e635; --lime-soft: #ecfccb; --muted: #5f6368; --line: #e7e7e2; --hot: #fde68a; --paper: #fafaf7;
  --display: 'Space Grotesk', Inter, system-ui, sans-serif;
  max-width: 1360px; margin: 0 auto; padding: 4px 28px 72px; color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
.lg-page * { box-sizing: border-box; }
.lg-page h1, .lg-page h2, .lg-page h3, .lg-h1, .lg-tile b, .lg-hero h1 { font-family: var(--display); }
.lg-h1 { font-size: 34px; font-weight: 700; letter-spacing: -1px; margin: 0 0 4px; line-height: 1.1; }
.lg-sub { color: var(--muted); margin: 0 0 18px; font-size: 15.5px; }
.lg-muted { color: var(--muted); }

/* page header: eyebrow / title / sub on the left, actions on the right */
.lg-phead { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin: 6px 0 22px; }
.lg-phead .t { flex: 1 1 420px; min-width: 0; }
.lg-phead .lg-sub { margin: 6px 0 0; }
.lg-phead .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3f3f3a; margin-bottom: 8px; text-decoration: none !important; }
a.lg-eyebrow:hover { color: #111; }

/* two-column layout: main + aside (stacks under 1180px) */
.lg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.lg-layout > * { min-width: 0; } /* long rows / scrolling pills never widen the page */
.lg-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
.lg-aside .lg-card { margin-bottom: 0; }

/* cards */
.lg-card { background: #fff; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 0 var(--ink); padding: 18px 20px; margin-bottom: 20px; }
.lg-card h2 { font-size: 18px; font-weight: 700; letter-spacing: -.2px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.lg-card h2 .lg-link { margin-left: auto; font-size: 13px; font-family: Inter, sans-serif; }
.lg-card-h { display: flex; align-items: center; gap: 10px; margin: -18px -20px 14px; padding: 12px 20px; border-bottom: 2px solid var(--ink); background: var(--paper); border-radius: 14px 14px 0 0; }
.lg-card-h h2 { margin: 0; }
.lg-card.flat { box-shadow: none; }
.lg-card.lime { background: var(--lime-soft); } .lg-card.ink { background: var(--ink); color: #fff; }
.lg-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 2px; }
.lg-link:hover { text-decoration-color: var(--ink); }

/* buttons */
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--ink); border-radius: 10px; padding: 9px 16px;
  font: 700 14px Inter, system-ui, sans-serif; background: var(--lime); color: var(--ink) !important; text-decoration: none !important; box-shadow: 3px 3px 0 0 var(--ink);
  cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .12s; }
.lg-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 0 var(--ink); }
.lg-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--ink); }
.lg-btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: 2px 2px 0 0 var(--ink); }
.lg-btn.white { background: #fff; } .lg-btn.dark { background: var(--ink); color: #fff !important; } .lg-btn.sm { padding: 5px 11px; font-size: 12.5px; box-shadow: 2px 2px 0 0 var(--ink); }
.lg-btn.lg { padding: 13px 22px; font-size: 16px; }
.lg-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; background: #fff; white-space: nowrap; }
.lg-chip.hot { background: var(--hot); } .lg-chip.lime { background: var(--lime-soft); } .lg-chip.gray { background: #eee; border-color: #bbb; color: #555; }
.lg-chip.ink { background: var(--ink); color: var(--lime); }

/* hero with the one main action */
.lg-hero { background: #fff; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 7px 7px 0 0 var(--ink); padding: 30px 30px 26px; margin: 6px 0 22px; position: relative; overflow: hidden; }
.lg-hero::after { content: ''; position: absolute; right: -50px; top: -60px; width: 230px; height: 230px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); z-index: 0; }
.lg-hero::before { content: ''; position: absolute; right: 120px; bottom: -40px; width: 90px; height: 90px; background: var(--hot); border: 2px solid var(--ink); transform: rotate(18deg); z-index: 0; border-radius: 14px; }
.lg-hero > * { position: relative; z-index: 1; }
.lg-hero h1 { font-size: 38px; font-weight: 700; letter-spacing: -1.2px; margin: 0 0 16px; max-width: 780px; line-height: 1.08; }
.lg-ask { display: flex; gap: 10px; max-width: 860px; }
.lg-ask input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 14px 16px; font-size: 17px; background: #fff; outline: none; box-shadow: 3px 3px 0 0 var(--ink); }
.lg-ask input:focus { box-shadow: 4px 4px 0 0 var(--lime), 4px 4px 0 2px var(--ink); }
.lg-ask .lg-btn { font-size: 16px; padding: 12px 22px; }
.lg-examples { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.lg-examples span { border: 1.5px dashed #999; border-radius: 999px; padding: 3px 11px; cursor: pointer; background: #fff; }
.lg-examples span:hover { border-color: var(--ink); border-style: solid; background: var(--lime-soft); }

/* first steps */
.lg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lg-step { border: 2px solid var(--ink); border-radius: 12px; padding: 13px; background: #fff; display: flex; gap: 10px; align-items: flex-start; }
.lg-step .n { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.lg-step.done { background: #f0fdf4; border-color: #16a34a; } .lg-step.done .n { background: #16a34a; border-color: #16a34a; color: #fff; }
.lg-step.now { background: var(--lime-soft); box-shadow: 3px 3px 0 0 var(--ink); } .lg-step.now .n { background: var(--lime); }
.lg-step b { display: block; font-size: 14px; } .lg-step span { font-size: 12.5px; color: var(--muted); }
.lg-step .lg-btn { margin-top: 8px; }

/* numbers */
.lg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.lg-tile { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px 12px; text-decoration: none !important; color: var(--ink) !important; display: block; box-shadow: 3px 3px 0 0 var(--ink); transition: transform .12s, box-shadow .12s; }
a.lg-tile:hover { box-shadow: 5px 5px 0 0 var(--ink); transform: translate(-2px, -2px); }
.lg-tile b { display: block; font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -1px; margin-bottom: 6px; }
.lg-tile span { font-size: 12.5px; color: #4b4b46; font-weight: 700; }
.lg-tile .ic { position: absolute; right: 12px; top: 12px; font-size: 16px; opacity: .8; }
.lg-tile.hot { background: var(--hot); } .lg-tile.lime { background: var(--lime-soft); } .lg-tile.ink { background: var(--ink); color: #fff !important; } .lg-tile.ink span { color: #cfcfc6; }

/* lists */
.lg-rows { display: flex; flex-direction: column; }
.lg-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1.5px solid var(--line); }
.lg-row:first-child { border-top: 0; }
.lg-row .main { flex: 1; min-width: 0; }
.lg-row .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.lg-row .main span { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-row time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lg-row.click { cursor: pointer; border-radius: 10px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.lg-row.click:hover { background: var(--lime-soft); }
.lg-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; background: #bbb; border: 1.5px solid rgba(0,0,0,.15); }
.lg-dot.on { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; animation: lgPulse 2s infinite; } .lg-dot.draft { background: #f59e0b; } .lg-dot.paused { background: #9ca3af; }
@keyframes lgPulse { 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, .12); } }
.lg-bar { height: 8px; border-radius: 99px; background: #eee; overflow: hidden; margin-top: 6px; max-width: 280px; border: 1.5px solid #ddd; }
.lg-bar i { display: block; height: 100%; background: var(--lime); border-right: 1.5px solid var(--ink); }

.lg-empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.lg-empty b { display: block; color: var(--ink); font: 700 18px var(--display); margin-bottom: 4px; }
.lg-empty .lg-btn { margin-top: 12px; }
.lg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lg-foot { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* filters / tabs: pills that scroll sideways on small screens */
.lg-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.lg-filters button { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 13px; font: 700 13px Inter, system-ui, sans-serif; background: #fff; cursor: pointer; white-space: nowrap; transition: transform .1s; }
.lg-filters button:hover { transform: translateY(-1px); }
.lg-filters button.on { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 0 var(--lime); }
.lg-reply { border-top: 1.5px solid var(--line); padding: 14px 0; }
.lg-reply:first-child { border-top: 0; }
.lg-reply .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-reply .top b { font-size: 15px; }
.lg-reply .top time { margin-left: auto; font-size: 12px; color: var(--muted); }
.lg-reply .sum { margin: 6px 0 0; font-size: 14px; }
.lg-reply .snip { margin: 6px 0 0; font-size: 13.5px; color: #333; background: #fafaf7; border-left: 3px solid var(--lime); padding: 8px 10px; border-radius: 6px; white-space: pre-wrap; }
.lg-reply .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .lg-layout { grid-template-columns: 1fr; }
  .lg-aside { position: static; }
}
@media (max-width: 900px) {
  .lg-page { padding: 0 18px 60px; }
  .lg-two, .lg-steps { grid-template-columns: 1fr; }
  .lg-hero h1 { font-size: 30px; }
}
@media (max-width: 640px) {
  .lg-page { padding: 0 14px 56px; font-size: 14.5px; }
  .lg-h1 { font-size: 26px; letter-spacing: -.6px; }
  .lg-hero { padding: 22px 18px 20px; border-radius: 18px; box-shadow: 5px 5px 0 0 var(--ink); }
  .lg-hero::after { width: 140px; height: 140px; right: -60px; top: -60px; } .lg-hero::before { display: none; }
  .lg-hero h1 { font-size: 25px; letter-spacing: -.6px; }
  .lg-ask { flex-direction: column; }
  .lg-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lg-tile b { font-size: 26px; }
  .lg-card { padding: 16px 14px; border-radius: 14px; box-shadow: 4px 4px 0 0 var(--ink); }
  .lg-card-h { margin: -16px -14px 12px; padding: 11px 14px; border-radius: 12px 12px 0 0; }
  .lg-phead { align-items: stretch; }
  .lg-phead .acts { width: 100%; }
  .lg-phead .acts .lg-btn { flex: 1 1 auto; }
  /* pills scroll sideways instead of wrapping into many lines */
  .lg-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: -14px; padding-right: 14px; scrollbar-width: none; }
  .lg-filters::-webkit-scrollbar { display: none; }
  .lg-row { flex-wrap: wrap; }
}

/* simplified sidebar */
.lg-nav-label { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #6b7280; padding: 12px 16px 2px; }
.lg-nav-badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; display: none; align-items: center; justify-content: center; padding: 0 6px; }
.lg-nav-sep { border-top: 1.5px dashed #c8c8c2; margin: 4px 8px; list-style: none; }
.lg-nav-muted { color: #555; }
.lg-nav-strong { font-weight: 700; }
.lg-nav-cta { background: #a3e635 !important; border-color: #111 !important; font-weight: 800; box-shadow: 2px 2px 0 0 #111; }
#sidebar { background-color: #fbfbf7 !important; }
#sidebar a.active { box-shadow: 3px 3px 0 0 #111; font-weight: 700; }

/* credits in the sidebar */
.lg-credits { margin: -8px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 2px solid #111; border-radius: 12px; background: #ecfccb; padding: 8px 12px; font-size: 14px; box-shadow: 3px 3px 0 0 #111; }
.lg-credits b { font-size: 17px; font-family: 'Space Grotesk', Inter, sans-serif; }
.lg-credits a { font-size: 12px; font-weight: 800; color: #111; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.lg-credits.low { background: #fef3c7; }
.lg-ws { margin: 10px 16px 0; border: 2px solid #111; border-radius: 12px; background: #fff; padding: 7px 10px; font-size: 12px; }
.lg-ws label { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; font-size: 10.5px; }
.lg-ws select { width: 100%; border: 0; background: transparent; font-weight: 800; font-size: 14px; padding: 2px 0; cursor: pointer; outline: none; }
.lg-ws small { display: block; color: #6b7280; }
.lg-ws.team { background: #eff6ff; border-color: #2563eb; box-shadow: 2px 2px 0 0 #2563eb; }
