:root {
  --bg: #0A090E;
  --surface: #131119;
  --surface-2: #1B1823;
  --surface-3: #242030;
  --line: #2B2737;
  --line-strong: #3A3548;
  --text: #F6F2EC;
  --muted: #A6A1B4;
  --faint: #6F6A7E;
  --lime: #DFFF5F;
  --lime-ink: #151A00;
  --violet: #9B6BFF;
  --plum: #5E0B7A;
  --teal: #3AA7A0;
  --blue: #3B82F6;
  --danger: #FF7A7A;
  --warn: #FFC857;
  --ok: #7BE0A6;
  --meta: #7B8CFF;
  --google: #FFB44C;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Marca ---------- */
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 50%; background: #000; border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font: 700 21px/1 var(--serif); letter-spacing: -1.5px; padding: 0 2px 3px 0; white-space: nowrap;
}
.logo-mark b { color: var(--lime); font-weight: 700; }
.logo-word { font: 500 22px/1 var(--serif); letter-spacing: -.3px; }
.logo-word b { color: var(--lime); font-weight: 500; }
.logo-sub { display: block; font: 400 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(94, 11, 122, .22), transparent 40%), var(--surface);
  display: flex; flex-direction: column; gap: 26px;
}
.side .logo { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 450; text-decoration: none; position: relative;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--surface-3); color: var(--text); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lime); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font: 500 clamp(28px, 3.2vw, 38px)/1.1 var(--serif); margin: 0; letter-spacing: -.5px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Componentes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; font-weight: 500; white-space: nowrap;
  text-decoration: none !important; color: var(--text); transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--surface-3); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn.primary:hover { background: #EBFF8F; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.sm { padding: 5px 11px; font-size: 13.5px; }
.btn.danger { color: var(--danger); }
.btn.wa { background: #1F3B2C; border-color: #2E5C43; color: #BFF5D5; }
.btn.wa:hover { background: #26493A; }
.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 50%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card h2 .spacer, .card h3 .spacer { flex: 1; }
.card h2 > svg { width: 15px; height: 15px; color: var(--lime); }
.grid { display: grid; gap: 16px; }
.grid > *, .agenda-layout > *, .stack > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.kpi { position: relative; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 13.5px; }
.kpi .value { font: 500 30px/1.15 var(--serif); margin-top: 6px; letter-spacing: -.5px; }
.kpi .sub { color: var(--faint); font-size: 13px; margin-top: 4px; }
.kpi.accent { background: radial-gradient(120% 140% at 100% 0%, rgba(223, 255, 95, .16), transparent 55%), var(--surface); border-color: #3C4320; }
.kpi.accent .value { color: var(--lime); }
.kpi.alert .value { color: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge.lime { background: rgba(223, 255, 95, .14); color: var(--lime); }
.badge.ok { background: rgba(123, 224, 166, .13); color: var(--ok); }
.badge.warn { background: rgba(255, 200, 87, .13); color: var(--warn); }
.badge.danger { background: rgba(255, 122, 122, .14); color: var(--danger); }
.badge.violet { background: rgba(155, 107, 255, .16); color: #C7AEFF; }
.badge.meta { background: rgba(123, 140, 255, .15); color: #AEB8FF; }
.badge.google { background: rgba(255, 180, 76, .14); color: var(--google); }
.badge.count { background: var(--lime); color: var(--lime-ink); min-width: 20px; justify-content: center; padding: 1px 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amount { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.link { cursor: pointer; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
.row.link:hover { background: var(--surface-2); }
a.row { color: inherit; text-decoration: none !important; }
a.row > svg { color: var(--faint); }
.date-chip { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--surface-2); padding: 5px 0; line-height: 1.1; }
.date-chip b { display: block; font: 600 18px/1.1 var(--serif); }
.date-chip span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.date-chip.today { background: var(--lime); color: var(--lime-ink); }
.date-chip.today span { color: var(--lime-ink); }
.empty { color: var(--faint); padding: 18px 0 6px; text-align: center; font-size: 14px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; color: var(--muted); font-size: 14px; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.search { flex: 1; min-width: 180px; max-width: 320px; }

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t td.r, .t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.t tbody tr.link { cursor: pointer; }
.t tbody tr.link:hover td { background: var(--surface-2); }
.t .actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field small { color: var(--faint); font-size: 12.5px; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--bg);
  outline: none; transition: border-color .15s;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lime); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { accent-color: var(--lime); width: 16px; height: 16px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { cursor: pointer; }
.days input { display: none; }
.days span { display: inline-block; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 13.5px; }
.days input:checked + span { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label input { display: none; }
.swatches label span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches label input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }

/* ---------- Modal y avisos ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 4, 8, .72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 1000; animation: fade .15s; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal-head h2 { margin: 0; font: 500 24px/1.2 var(--serif); }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 22px 20px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 500; z-index: 1100; box-shadow: var(--shadow); animation: pop .2s; }
.toast.err { background: var(--danger); }
.note { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--muted); font-size: 14px; }
.note b { color: var(--text); font-weight: 500; }

/* ---------- Gráficos ---------- */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--sans); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .val { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Clientes ---------- */
.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.client-card { cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, transform .15s; }
.client-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.client-card .top { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 600 17px/1 var(--serif); color: #111; flex: none; }
.client-card .name { font-weight: 500; font-size: 16px; line-height: 1.25; }
.client-card .facts { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 11px; }
.client-card .facts b { display: block; color: var(--text); font-weight: 500; font-size: 15px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 26px; border-radius: 18px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 14px; font-size: 14px; }

/* ---------- Agenda ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal .dow { background: var(--surface); text-align: center; padding: 8px 0; font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.cal .day { background: var(--surface); min-height: 108px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day:hover { background: var(--surface-2); }
.cal .day.out { background: #0F0D14; color: var(--faint); }
.cal .day .n { font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .n { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--violet); }
.ev { font-size: 12px; padding: 2px 6px; border-radius: 5px; background: rgba(155, 107, 255, .2); color: #DCCBFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--violet); }
.ev.pend { background: rgba(255, 200, 87, .14); color: #FFE2A3; border-color: var(--warn); }
.ev.pay { background: rgba(223, 255, 95, .1); color: var(--lime); border-color: var(--lime); }
.ev.done { opacity: .5; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font: 500 24px/1 var(--serif); text-transform: capitalize; min-width: 190px; }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 6px 6px 6px 12px; font-size: 13.5px; }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lime); }

/* ---------- WhatsApp ---------- */
.wa-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); height: 620px; }
.wa-list { border-right: 1px solid var(--line); overflow-y: auto; }
.wa-item { display: flex; gap: 11px; padding: 13px 14px; cursor: pointer; border-bottom: 1px solid var(--line); align-items: flex-start; }
.wa-item:hover { background: var(--surface-2); }
.wa-item.on { background: var(--surface-3); }
.wa-item .grow { flex: 1; min-width: 0; }
.wa-item .who { display: flex; justify-content: space-between; gap: 6px; font-weight: 500; }
.wa-item .who small { color: var(--faint); font-weight: 400; font-size: 12px; white-space: nowrap; }
.wa-item .last { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-av { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 600; flex: none; color: var(--muted); }
.wa-thread { display: flex; flex-direction: column; min-width: 0; }
.wa-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wa-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background:
  radial-gradient(circle at 20% 10%, rgba(94, 11, 122, .16), transparent 40%), radial-gradient(circle at 90% 90%, rgba(58, 167, 160, .1), transparent 40%), var(--bg); }
.bubble { max-width: 78%; padding: 8px 12px 6px; border-radius: 12px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.in { background: var(--surface-3); align-self: flex-start; border-top-left-radius: 4px; }
.bubble.out { background: #20452F; align-self: flex-end; border-top-right-radius: 4px; }
.bubble .time { display: block; text-align: right; font-size: 11px; color: var(--faint); margin-top: 2px; }
.bubble.out .time { color: #8FC5A5; }
.bubble .bot { font-size: 11px; color: var(--lime); margin-bottom: 2px; display: block; letter-spacing: .04em; }
.wa-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.wa-compose textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; }
.faq-item { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 0; }
.sim-out { margin-top: 12px; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.steps b { color: var(--text); font-weight: 500; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.status-line .dot { width: 9px; height: 9px; }

/* ---------- Catálogo ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.app-card { padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.app-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.app-cover { height: 150px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 16px 18px; }
.app-cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 120% at 100% 0%, var(--ac) 0%, transparent 60%), linear-gradient(135deg, #1B0A24, #0B1C2A); opacity: .95; }
.app-cover::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent); }
.app-cover .glyph { position: relative; z-index: 1; font: 600 54px/1 var(--serif); color: var(--text); letter-spacing: -2px; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.app-cover .badge { position: absolute; top: 14px; right: 14px; z-index: 1; backdrop-filter: blur(6px); }
.app-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .app-body h3 { margin: 0; font: 500 22px/1.2 var(--serif); letter-spacing: -.2px; text-transform: none; color: var(--text); display: block; }
.app-body p { margin: 0; color: var(--muted); font-size: 14px; }
.app-body .foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 13px; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--lime), var(--violet), var(--teal)); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 22px; cursor: pointer; }
.tl-item::before { content: ''; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ac, var(--lime)); box-shadow: 0 0 0 4px var(--bg); }
.tl-item .when { font-size: 12.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.tl-item h3 { margin: 2px 0 4px; font: 500 20px/1.25 var(--serif); }
.tl-item p { margin: 0; color: var(--muted); font-size: 14px; }
.feature-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.feature-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.feature-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); margin-top: 8px; flex: none; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(60% 60% at 15% 15%, rgba(155, 107, 255, .35), transparent 60%), radial-gradient(50% 60% at 90% 90%, rgba(11, 79, 179, .35), transparent 60%), radial-gradient(40% 40% at 70% 40%, rgba(58, 167, 160, .2), transparent 60%), var(--bg); }
.login form { width: min(380px, 100%); background: rgba(19, 17, 25, .82); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); border-radius: 22px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login .logo { justify-content: center; margin-bottom: 8px; }
.login .err { color: var(--danger); font-size: 14px; min-height: 20px; }

/* ---------- Móvil ---------- */
.mobile-bar { display: none; }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agenda-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 500; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(10, 9, 14, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 500; display: flex; overflow-x: auto; background: rgba(19, 17, 25, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-nav a { flex: 1 0 auto; min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 6px 4px; border-radius: 10px; text-decoration: none; position: relative; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a.on { color: var(--lime); }
  .mobile-nav .badge { position: absolute; top: 0; right: 8px; font-size: 10px; }
  .main { padding: 20px 16px 110px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .form { grid-template-columns: 1fr; }
  .wa-layout { grid-template-columns: 1fr; height: auto; }
  .wa-list { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wa-msgs { min-height: 360px; }
  .cal .day { min-height: 64px; padding: 4px; }
  .cal .ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; }
  .faq-item { grid-template-columns: 1fr; }
  .wa-thread-head > .grow { flex-basis: calc(100% - 52px); }
  .mobile-nav a { min-width: 60px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
@media (min-width: 861px) { .mobile-nav { display: none; } }
@media (max-width: 480px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi .value { font-size: 23px; } .card { padding: 15px; } .table-wrap { margin: 0 -15px; padding: 0 15px; } }

/* ---------- Posibles clientes ---------- */
.tabs { scrollbar-width: none; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--muted); text-decoration: none !important; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-color: var(--lime); }
.prio { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 600; flex: none; vertical-align: -5px; margin-right: 4px; }
.prio-A { background: var(--lime); color: var(--lime-ink); }
.prio-B { background: rgba(255, 200, 87, .2); color: var(--warn); }
.prio-C { background: var(--surface-3); color: var(--muted); }
.day-picker { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.week { display: flex; flex-direction: column; gap: 6px; }
.week > span { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.day-chip { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 6px 12px; min-width: 70px; }
.day-chip small { font-size: 11px; opacity: .7; }
.day-chip.done:not(.on) { border-color: rgba(123, 224, 166, .5); color: var(--ok); }
.route-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.route-layout > * { min-width: 0; }
.route-title::first-letter { text-transform: uppercase; }
.route-title { margin: 0 0 6px; font: 500 18px/1.35 var(--serif); }
.route-sum { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.legs { display: flex; gap: 6px; flex-wrap: wrap; }
.steps-box { margin-top: 12px; font-size: 14px; color: var(--muted); }
.steps-box summary { cursor: pointer; color: var(--text); }
.steps-box p { margin: 8px 0 0; line-height: 1.7; }
.steps-box b { color: var(--lime); }
.map-card { padding: 0; overflow: hidden; }
.lead-map { height: 380px; background: var(--surface-2); }
.leaflet-container { font-family: var(--sans); background: #111; }
.lead-map .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
.pin { display: grid; place-items: center; border-radius: 50%; font: 600 11px/1 var(--sans); border: 2px solid #0A090E; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.pin.pA { background: #DFFF5F; color: #151A00; }
.pin.pB { background: #FFC857; color: #2A1D00; }
.pin.pC { background: #A6A1B4; color: #111; }
.pin.done { background: #7BE0A6; color: #062414; opacity: .75; }
.stop { gap: 10px; }
.stop.is-done .title { color: var(--muted); }
.stop-n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; color: var(--muted); }
.stop.is-done .stop-n { background: rgba(123, 224, 166, .18); color: var(--ok); }
.result-select { width: 150px; flex: none; padding: 6px 8px; font-size: 13px; }
.lead-sel { width: auto; max-width: 220px; padding: 8px 10px; font-size: 14px; }
.sub-cell { color: var(--faint); font-size: 12.5px; }
.faint { color: var(--faint); font-size: 13px; }
.lead-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.lead-head .spacer { flex: 1; }
.opener { margin: 0; padding: 14px 16px; border-left: 3px solid var(--lime); background: rgba(223, 255, 95, .06); border-radius: 0 10px 10px 0; font: 400 17px/1.5 var(--serif); }
.opener small { display: block; font: 500 11.5px/1 var(--sans); color: var(--lime); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.hours { display: flex; flex-direction: column; font-size: 13.5px; }
.hours b { display: inline-block; width: 34px; font-weight: 500; color: var(--muted); }
.section-label { font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 6px 0 12px; }
.script-card p { margin: 0; font-size: 15px; line-height: 1.55; }
.script-card.objection { border-color: rgba(155, 107, 255, .35); }
@media (max-width: 1100px) { .route-layout { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .lead-map { height: 300px; }
  .stop { flex-wrap: wrap; }
  .stop .grow { flex-basis: calc(100% - 40px); }
  .result-select { width: calc(100% - 36px); margin-left: 36px; }
  .lead-sel { max-width: none; flex: 1 1 45%; }
}
