/* Sytemap Leads, built on the Sytemap brand tokens */
:root {
  --blue: #2583f4;
  --lime: #a1c349;
  --navy: #071b39;
  --navy-2: #0e2747;
  --green-text: #52760d;
  --ink: #071b39;
  --muted: #526176;
  --panel: #f1f5fa;
  --hairline: #dfe6ef;
  --field: #b4c0d3;
  --white: #ffffff;
  --danger: #b42318;
  --wa-bg: #eef5dd;
  --mail-bg: #e8f1fe;
  --mail-text: #1f5fbf;
  --r: 8px;
  --r-sm: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--panel); font-size: 15px; line-height: 1.45;
}
a { color: var(--ink); }
a:hover { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side {
  flex: 1 1 248px; max-width: 100%; background: var(--white); border-right: 1px solid var(--hairline);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 24px;
}
.side .logo { width: 140px; height: auto; display: block; margin: 4px 6px 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r);
  text-decoration: none; font-weight: 600;
}
.nav a svg { flex: none; }
.nav a.on { background: var(--navy); color: var(--white); }
.nav a .badge { margin-left: auto; }
.side-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 0 12px 4px; }
.side-lists { display: flex; flex-direction: column; gap: 2px; }
.side-lists a {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: var(--r);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.side-lists a.on { background: var(--panel); box-shadow: inset 0 0 0 1px var(--field); }
.side-lists .n { margin-left: auto; color: var(--muted); font-size: 13px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.status-card { border: 1px solid var(--hairline); border-radius: var(--r); padding: 14px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.status-card strong { color: var(--ink); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.me { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 0 6px; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 22px; }

/* Bits */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .t { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.sq { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.card { background: var(--white); border-radius: var(--r); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.card.flush { padding: 0; gap: 0; }
.card.dark { background: var(--navy); color: var(--white); }
.card.dark .muted, .card.dark .small { color: #b4c0d3; }
.card.dark a { color: var(--white); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--hairline); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { background: var(--white); border-radius: var(--r); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 30px; font-weight: 800; line-height: 1.1; }
.kpi .l { font-size: 14px; font-weight: 600; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.col-1 { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-2 { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: var(--r-sm);
  background: var(--panel); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--lime); color: var(--navy); font-size: 12px; font-weight: 800; }
.eyebrow-lime { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--lime); text-transform: uppercase; }
hr.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* Buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid var(--navy); background: var(--navy); color: var(--white);
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--white); background: #0e2747; }
.btn.ghost { background: var(--white); color: var(--navy); }
.btn.ghost:hover { background: var(--panel); color: var(--navy); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.btn.lime:hover { background: #b2d15f; color: var(--navy); }
.btn.line-light { background: transparent; border-color: #b4c0d3; color: var(--white); }
.btn.danger { background: var(--white); border-color: var(--danger); color: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.icon { width: 44px; padding: 0; }
.btn.dashed { background: var(--white); color: var(--navy); border: 1px dashed var(--field); font-weight: 600; }
.pill {
  min-height: 40px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--field); background: var(--white);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.pill.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
label.f > span.h { font-weight: 400; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number],
input[type=datetime-local], input[type=time], input[type=url], select, textarea {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r); background: var(--white);
  font-size: 15px; width: 100%;
}
textarea { padding: 10px 12px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .pill:focus-visible, a:focus-visible { outline: 3px solid rgba(37,131,244,.45); outline-offset: 1px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 12px; white-space: nowrap; }
table.t td { padding: 12px; border-top: 1px solid var(--hairline); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 22px; }
table.t th:last-child, table.t td:last-child { padding-right: 22px; }
table.t .name { font-weight: 700; font-size: 15px; text-decoration: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--muted); }

/* Flash */
.flash { padding: 12px 16px; border-radius: var(--r); font-size: 14px; font-weight: 600; }
.flash.ok { background: var(--wa-bg); color: #2f4a06; }
.flash.err { background: #fde8e6; color: var(--danger); }
.flash.info { background: var(--mail-bg); color: #164a96; }

/* Conversation */
.thread { list-style: none; margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 14px; max-height: 640px; overflow-y: auto; }
.thread li { display: flex; flex-direction: column; }
.thread .ev { align-self: center; font-size: 13px; color: var(--muted); text-align: center; max-width: 90%; }
.bubble { max-width: 78%; padding: 11px 15px; border-radius: var(--r); }
.bubble.out { align-self: flex-end; }
.bubble.in { align-self: flex-start; background: var(--panel); }
.bubble.wa.out { background: var(--wa-bg); }
.bubble.mail.out { background: var(--mail-bg); border: 1px solid #c9dcf7; }
.bubble .who { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.bubble.wa .who { color: var(--green-text); }
.bubble.mail .who { color: var(--mail-text); }
.bubble .body { white-space: pre-line; overflow-wrap: anywhere; }
.bubble .meta { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; justify-content: space-between; gap: 12px; }
.bubble .meta .fail { color: var(--danger); font-weight: 700; }
.composer { border-top: 1px solid var(--hairline); padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
[hidden] { display: none !important; }

/* Lists / steps */
.list-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--white); border-radius: var(--r); border: 2px solid transparent; text-decoration: none; }
.list-card.on { border-color: var(--navy); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: flex; gap: 16px; }
.step .rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 44px; }
.step .rail .b { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.step .rail .line { flex: 1; width: 2px; background: var(--hairline); min-height: 14px; }
.step .content { flex: 1; min-width: 0; padding-bottom: 18px; }
.b-whatsapp { background: var(--wa-bg); color: var(--green-text); }
.b-email { background: var(--mail-bg); color: var(--mail-text); }
.b-task { background: var(--panel); color: var(--navy); }
details.edit > summary { cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; display: inline-flex; min-height: 32px; align-items: center; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit[open] > summary { margin-bottom: 10px; }
.step-form { background: var(--panel); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }

/* Plan progress */
.plan-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plan-steps li { display: flex; gap: 12px; align-items: flex-start; }
.plan-steps .pd { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid #b4c0d3; }
.plan-steps .pd.done { background: var(--lime); border-color: var(--lime); }
.plan-steps .pd.next { background: var(--blue); border-color: var(--blue); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--navy); }
.login { width: 100%; max-width: 400px; background: var(--white); border-radius: var(--r); padding: 32px; display: flex; flex-direction: column; gap: 18px; }

.toggle { position: relative; display: inline-flex; width: 52px; height: 30px; flex: none; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle span { width: 100%; height: 100%; border-radius: 15px; background: var(--field); transition: background .15s; display: block; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.toggle input:checked + span { background: var(--green-text); }
.toggle input:checked + span::after { transform: translateX(22px); }
.toggle input:focus-visible + span { outline: 3px solid rgba(37,131,244,.45); }

code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--panel); padding: 2px 6px; border-radius: var(--r-sm); overflow-wrap: anywhere; }

.mobile-only { display: none !important; }
@media (max-width: 900px) {
  .side { flex-basis: 100%; padding: 12px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .side .logo { width: 120px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav a { white-space: nowrap; padding: 0 12px; }
  .lists-block, .side-foot { display: none; }
  .mobile-only { display: flex !important; }
}
@media (max-width: 700px) {
  .main { padding: 20px 16px 40px; }
  h1 { font-size: 28px; }
  .bubble { max-width: 92%; }
}
