:root {
  --bg: #0e0e0e;
  --bg-deep: #0b0b0b;
  --panel: #161616;
  --panel2: #1b1b1b;
  --line: rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .05);
  --text: #f2f2f0;
  --muted: #a9a9a3;
  --faint: #78786f;
  --acc: #6fcf97;
  --acc2: #a9e5c0;
  --brand: #0e7a4a;
  --brand-d: #0b6b3f;
  --red: #ef5a50;
  --amber: #e8c547;
  --blue: #60a5fa;
  --orange: #ff8b60;
  --r-card: 16px;
  --r: 12px;
  --r-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg-deep);
  background-image: radial-gradient(1400px 420px at 60% -12%, rgba(14, 122, 74, .14), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(111, 207, 151, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.acc { color: var(--acc); }
.red { color: var(--red); }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 18px 14px;
  background: #050505;
  box-shadow: inset -1px 0 0 var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 2px 16px; }
.brand-logo { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 30%, #1a9a5f 0%, #0e7a4a 55%, #09502f 100%); border: 1.5px solid #6fffaa;
  box-shadow: 0 0 0 3px rgba(93, 255, 157, .08), 0 0 12px rgba(93, 255, 157, .45), 0 0 26px rgba(93, 255, 157, .18); }
.brand-logo img { display: block; width: 46px; height: 46px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.side-search { width: auto; margin: 0 2px 12px; }
.side-search input[type=search] { width: 100%; background: rgba(255, 255, 255, .03); border-radius: 12px; padding: 9px 40px 9px 34px; font-size: 13px; }
.side-search .k { display: grid; color: var(--faint); }
.side-search .search-results { width: 100%; }
.brand-t { flex: 1; display: flex; flex-direction: column; justify-content: center; line-height: 1.02; }
.brand-t span { display: block; font-size: 28.6px; font-weight: 500; color: #7dffb3; letter-spacing: -.5px; text-shadow: 0 0 10px rgba(93, 255, 157, .55); }
.brand-t b { display: block; font-size: 30.9px; font-weight: 800; letter-spacing: -.8px; color: #f4fff8; }
.ws-switch { margin: 0 4px 10px; }
.ws-switch select { width: 100%; }
.nav-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; color: var(--muted);
  border: .8px solid transparent; font-weight: 500;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .035); text-decoration: none; }
.nav a.on {
  color: var(--acc2);
  background: linear-gradient(115deg, rgba(111, 207, 151, .16), rgba(111, 207, 151, 0));
  border-color: rgba(111, 207, 151, .32);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .ico svg { display: block; }
.nav a { padding: 9px 12px; font-size: 14.5px; }
.nav .ico { width: 18px; display: grid; place-items: center; opacity: .85; }
.nav .count { margin-left: auto; font-size: 11px; color: var(--faint); }
.side-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #062012; background: var(--acc); flex: 0 0 auto; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 11px; color: var(--faint); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 28px;
  background: rgba(11, 11, 11, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.crumbs { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--text); font-weight: 500; }
.topbar .spacer { flex: 1; }
.search { position: relative; width: min(340px, 34vw); }
.search input[type=search] { width: 100%; padding-left: 32px; padding-right: 40px; }
.search .k { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; }
.search .kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); max-height: 360px; overflow-y: auto; padding: 6px; }
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.sel { background: rgba(111, 207, 151, .1); text-decoration: none; }
.search-results small { color: var(--faint); margin-left: 6px; }
.bell { position: relative; }
.bell .dot { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.notif {
  position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-height: 480px; overflow-y: auto;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 20px 50px rgba(0, 0, 0, .55); padding: 10px; z-index: 40;
}
.notif h4 { margin: 6px 8px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.notif .item { display: flex; gap: 10px; padding: 9px 8px; border-radius: 9px; cursor: pointer; }
.notif .item:hover { background: rgba(255, 255, 255, .04); }
.notif .item p { margin: 0; font-size: 13px; }
.notif .item small { color: var(--faint); }
.notif .empty { padding: 18px; text-align: center; color: var(--faint); }

.impersonate {
  display: flex; align-items: center; gap: 12px; padding: 8px 28px;
  background: linear-gradient(90deg, rgba(232, 197, 71, .18), rgba(232, 197, 71, .06));
  border-bottom: 1px solid rgba(232, 197, 71, .35);
  color: #f3dc8a; font-size: 13px;
}
.impersonate b { color: #fff3c4; }
.impersonate .btn { margin-left: auto; }

.content { padding: 28px 28px 80px; max-width: 1360px; width: 100%; }

/* ---------- Títulos ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .tt { flex: 1; min-width: 260px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 600; margin: 0 0 6px; }
h1 { font-size: 32px; font-weight: 600; letter-spacing: -.96px; line-height: 1.1; margin: 0; }
h1 em, h2 em { font-style: normal; color: var(--acc); }
.page-head p.sub { margin: 8px 0 0; color: var(--muted); }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.3px; margin: 0 0 4px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; }
.section-title .line { flex: 1; height: 1px; background: var(--line-soft); }

/* ---------- Tarjetas ---------- */
.card {
  background: rgba(255, 255, 255, .043);
  border: .8px solid rgba(255, 255, 255, .11);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .34);
  padding: 18px;
}
.card.hl {
  background: rgba(111, 207, 151, .08);
  border-color: rgba(111, 207, 151, .32);
  box-shadow: 0 4px 18px rgba(111, 207, 151, .1);
}
.card.click { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.click:hover { border-color: rgba(111, 207, 151, .4); transform: translateY(-1px); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.card-head .r { margin-left: auto; }
.grid { display: grid; gap: 14px; }
.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)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.kpi .lab { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 600; letter-spacing: -.6px; margin-top: 4px; }
.kpi .delta { font-size: 12px; color: var(--acc); }
.kpi .delta.neg { color: var(--red); }
.kpi .hint { font-size: 11px; color: var(--faint); }

/* ---------- Controles ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 8px 14px; border-radius: var(--r); cursor: pointer; white-space: nowrap;
  background: rgba(255, 255, 255, .05); border: .8px solid var(--line); color: var(--text); font-weight: 500; font-size: 13px;
}
.btn:hover { border-color: rgba(255, 255, 255, .22); text-decoration: none; }
.btn.pri {
  background: linear-gradient(120deg, #d6f2e0, #a3dfba);
  color: #0f2a1b; border-color: transparent; font-weight: 600;
  box-shadow: 0 6px 20px rgba(111, 207, 151, .16);
}
.btn.pri:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 9px; }
.btn.icon { padding: 7px 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=number], input[type=url], input[type=search], select, textarea {
  background: rgba(0, 0, 0, .25); border: .8px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 11px; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: rgba(111, 207, 151, .55); box-shadow: 0 0 0 3px rgba(111, 207, 151, .12); }
textarea { resize: vertical; min-height: 70px; width: 100%; }
select option { background: #161616; }
input[type=checkbox] { accent-color: var(--acc); width: 16px; height: 16px; cursor: pointer; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea { color: var(--text); font-size: 14px; }
.form { display: grid; gap: 12px; }
.form.two { grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.seg { display: inline-flex; background: rgba(0, 0, 0, .25); border: .8px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.seg button.on { background: rgba(111, 207, 151, .16); color: var(--acc2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 9px 12px; cursor: pointer; font-weight: 500; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--acc); }

/* ---------- Tags y chips ---------- */
.tag { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: .8px solid rgba(111, 207, 151, .4); color: var(--acc2); border-radius: 4px; padding: 2px 6px; line-height: 1.3; white-space: nowrap; }
.tag.gray { border-color: var(--line); color: var(--muted); }
.tag.red { border-color: rgba(239, 90, 80, .5); color: #ff8f86; }
.tag.amber { border-color: rgba(232, 197, 71, .5); color: var(--amber); }
.tag.blue { border-color: rgba(96, 165, 250, .5); color: var(--blue); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.chip.valentino { background: rgba(111, 207, 151, .15); color: #4ade80; }
.chip.cliente { background: rgba(96, 165, 250, .15); color: #60a5fa; }
.chip.agustin { background: rgba(232, 197, 71, .18); color: #e8c547; }
.chip.editor { background: rgba(255, 139, 96, .17); color: #ff8b60; }
.chip.equipo { background: rgba(154, 154, 147, .18); color: #c4c4bc; }
.chip.content { background: rgba(167, 139, 250, .16); color: #b9a5ff; }
.chip.call { background: rgba(244, 114, 182, .16); color: #f68cc6; }
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.status { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--muted); white-space: nowrap; }
.status.s-Publicado, .status.s-done { background: rgba(111, 207, 151, .14); color: var(--acc); }
.status.s-Editado { background: rgba(134, 239, 172, .1); color: var(--acc2); }
.status.s-En\ edición, .status.s-doing { background: rgba(255, 139, 96, .14); color: var(--orange); }
.status.s-Grabado { background: rgba(96, 165, 250, .14); color: var(--blue); }
.status.s-Guion { background: rgba(232, 197, 71, .14); color: var(--amber); }
.status.s-late { background: rgba(239, 90, 80, .16); color: #ff8f86; }

/* ---------- Progreso ---------- */
.bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--acc)); }
.bar.thin { height: 5px; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--acc) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); }
.ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 600; font-size: 13px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); border: .8px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .025); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 500; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(0, 0, 0, .15); }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: rgba(111, 207, 151, .04); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.done td { opacity: .55; }
table.t tr.done td .txt { text-decoration: line-through; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(60% 45% at 50% 18%, rgba(46, 125, 84, .16), transparent 70%), radial-gradient(80% 60% at 50% 100%, rgba(20, 60, 40, .12), transparent 70%), #050706; }
.login-card { width: min(500px, 100%); padding: 44px 40px 40px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(22, 30, 26, .92), rgba(12, 14, 13, .94)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04); }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-brand .brand-logo { width: 84px; height: 84px; }
.login-brand .brand-logo img { width: 60px; height: 60px; }
.login-brand b { font-size: 26px; font-weight: 800; letter-spacing: -.6px; color: #a9e5c0; }
.login-brand b span { color: #f4fff8; }
.login-sub { text-align: center; color: var(--muted); margin: 18px 0 30px; font-size: 15px; }
.login .form { gap: 18px; }
.login .f { font-size: 13.5px; color: var(--muted); }
.login input { height: 52px; border-radius: 10px; font-size: 15px; background: #1d2622; border-color: rgba(255, 255, 255, .1); }
.login input:focus { border-color: rgba(111, 207, 151, .55); box-shadow: 0 0 0 3px rgba(111, 207, 151, .12); }
.login-btn { height: 54px; justify-content: center; font-size: 15.5px; border-radius: 12px; margin-top: 4px; box-shadow: 0 8px 26px rgba(111, 207, 151, .18); }
.err { color: #ff8f86; font-size: 13px; min-height: 18px; }

/* ---------- Recorrido ---------- */
.road-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 8px; border-radius: 7px; border: .8px solid transparent; }
.legend span.on { border-color: var(--line); background: rgba(255, 255, 255, .04); color: var(--text); }
.road { position: relative; padding-left: 64px; }
.road::before { content: ''; position: absolute; left: 22px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(to bottom, var(--brand), var(--line) 92%); }
.stage { position: relative; margin-bottom: 18px; }
.stage .dotn {
  position: absolute; left: -64px; top: 16px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--line); display: grid; place-items: center;
  font-weight: 800; color: var(--faint);
}
.stage.cur .dotn { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 0 6px rgba(111, 207, 151, .09); }
.stage.past .dotn { border-color: var(--brand); color: var(--acc2); background: rgba(14, 122, 74, .25); }
.stage .card { padding: 22px 24px; }
.stage .s-tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); font-weight: 700; }
.stage .s-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.stage .s-head .l { flex: 1; min-width: 240px; }
.stage .s-head h2 { font-size: 21px; margin: 4px 0 6px; }
.stage .lede { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.stage .dates { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.acts { border-top: 1px solid var(--line-soft); }
.act { display: grid; grid-template-columns: 24px 64px 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.act .d { font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 1px; }
.act .d small { display: block; font-size: 10.5px; color: var(--muted); }
.act p { margin: 0 0 5px; font-size: 13.5px; }
.act .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.act .deliv { font-size: 12px; color: var(--faint); }
.act.done p { text-decoration: line-through; color: var(--faint); }
.act .when { font-size: 11px; white-space: nowrap; padding-top: 2px; }
.closebar { margin-top: 14px; padding: 11px 15px; background: rgba(14, 122, 74, .14); border: 1px solid var(--brand); border-radius: 10px; font-size: 12.5px; color: var(--acc); font-weight: 700; }
.pins { display: flex; flex-wrap: wrap; gap: 20px 18px; margin-top: 22px; }
.pin { position: relative; flex: 1 1 180px; max-width: 240px; padding: 18px 14px 14px; background: #f3d94a; border-radius: 3px; transform: rotate(-1.6deg); box-shadow: 0 10px 16px rgba(0, 0, 0, .35); }
.pin:nth-child(2n) { transform: rotate(1.3deg); background: #f7e37a; }
.pin::before { content: ''; position: absolute; left: 50%; top: -9px; width: 15px; height: 15px; border-radius: 50%; background: #e23b2e; transform: translateX(-50%); box-shadow: 0 3px 4px rgba(0, 0, 0, .45); }
.pin p { margin: 0; font-size: 12.5px; color: #3a3209; font-weight: 600; line-height: 1.45; }
.pin .x { position: absolute; right: 4px; top: 2px; background: none; border: 0; color: #6b5d12; cursor: pointer; font-size: 14px; }
.pin.add { background: transparent; border: 1.5px dashed rgba(243, 217, 74, .5); box-shadow: none; transform: none; cursor: pointer; color: #f3d94a; display: grid; place-items: center; min-height: 60px; }
.pin.add::before { display: none; }

/* ---------- Calendario ---------- */
.cal-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-tools .month { font-size: 18px; font-weight: 600; min-width: 170px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 9px; border-radius: 8px; border: .8px solid var(--line); cursor: pointer; color: var(--muted); user-select: none; }
.filters label.on { color: var(--text); background: rgba(255, 255, 255, .05); }
.filters input { display: none; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: .8px solid rgba(255, 255, 255, .1); border-radius: var(--r-card); overflow: hidden; background: rgba(255, 255, 255, .02); }
.cal .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 9px 10px; background: rgba(0, 0, 0, .2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: rgba(0, 0, 0, .18); }
.cal .day.out .n { opacity: .4; }
.cal .day .n { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.cal .day .n .pd { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.cal .day.today { background: rgba(111, 207, 151, .05); }
.cal .day.today .n b { background: var(--acc); color: #052313; border-radius: 6px; padding: 0 6px; }
.cal .day.drop { outline: 2px dashed rgba(111, 207, 151, .5); outline-offset: -3px; }
.ev { font-size: 11.5px; padding: 3px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; background: rgba(255, 255, 255, .04); }
.ev:hover { background: rgba(255, 255, 255, .09); }
.ev.done { opacity: .5; text-decoration: line-through; }
.ev.late { background: rgba(239, 90, 80, .12); }
.ev .h { opacity: .75; font-family: var(--mono); font-size: 10px; margin-right: 4px; }
.more { font-size: 11px; color: var(--faint); cursor: pointer; padding: 0 4px; }
.list-day { margin-bottom: 14px; }
.list-day h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 500; text-transform: capitalize; }
.list-day h4.today { color: var(--acc); }
.list-ev { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: .8px solid var(--line-soft); margin-bottom: 5px; cursor: pointer; }
.list-ev:hover { border-color: var(--line); }
.list-ev .t { flex: 1; min-width: 0; }
.unscheduled { margin-top: 16px; }

/* ---------- Drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); z-index: 60;
  background: linear-gradient(180deg, #181818, #111111); border-left: 1px solid var(--line);
  box-shadow: -30px 0 60px rgba(0, 0, 0, .5); overflow-y: auto; animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 16px 22px; background: rgba(24, 24, 24, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.drawer-head input.title { flex: 1; font-size: 18px; font-weight: 600; background: transparent; border-color: transparent; padding: 6px 8px; }
.drawer-head input.title:focus { border-color: var(--line); box-shadow: none; }
.drawer-body { padding: 18px 22px 60px; }
.props { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; align-items: center; margin-bottom: 20px; }
.props > span { font-size: 12px; color: var(--faint); }
.props input, .props select { width: 100%; }
.props input[type=checkbox] { width: 16px; flex: 0 0 auto; }
.props label.row { flex-wrap: nowrap; font-size: 13px; color: var(--muted); }
.block { margin-bottom: 12px; }
.block .bh { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); margin-bottom: 5px; }
.block .bh small { color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: 0; }
.consolidated { font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; background: rgba(0, 0, 0, .3); border: .8px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; color: var(--acc2); min-height: 60px; }
.utm { font-family: var(--mono); font-size: 12px; word-break: break-all; background: rgba(0, 0, 0, .3); border: .8px dashed rgba(111, 207, 151, .35); border-radius: var(--r-sm); padding: 9px 12px; color: var(--acc2); }
.modal {
  position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: linear-gradient(180deg, #1b1b1b, #131313); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); padding: 22px;
}
.modal.wide { width: min(780px, calc(100vw - 32px)); }
.modal h2 { margin-bottom: 4px; }
.modal .sub { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; background: #1f1f1f; border: 1px solid rgba(111, 207, 151, .4); color: var(--acc2); padding: 10px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; animation: up .2s ease-out; }
@keyframes up { from { transform: translate(-50%, 10px); opacity: 0; } }

/* ---------- Documentos ---------- */
.doc-card { min-height: 150px; display: flex; flex-direction: column; }
.doc-card .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: rgba(111, 207, 151, .1); color: var(--acc); margin-bottom: 12px; }
.doc-card p { color: var(--muted); font-size: 13px; margin: 4px 0 12px; flex: 1; }
.doc-card .foot { font-size: 11px; color: var(--faint); display: flex; justify-content: space-between; }
.editor-wrap { max-width: 860px; }
.doc-editor {
  min-height: 60vh; outline: none; padding: 28px 34px; font-size: 15px; line-height: 1.7;
}
.doc-editor h2 { font-size: 20px; margin: 24px 0 8px; }
.doc-editor h2:first-child { margin-top: 0; }
.doc-editor table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; font-size: 14px; }
.doc-editor th, .doc-editor td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; min-width: 60px; }
.doc-editor th { background: rgba(255, 255, 255, .04); font-weight: 600; }
.doc-editor blockquote { border-left: 3px solid var(--acc); margin: 8px 0; padding: 4px 14px; color: var(--muted); }
.doc-editor:empty::before { content: attr(data-ph); color: var(--faint); }
.toolbar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; position: sticky; top: 57px; background: rgba(24, 24, 24, .95); z-index: 3; border-radius: var(--r-card) var(--r-card) 0 0; }
.toolbar button { background: transparent; border: 0; color: var(--muted); padding: 5px 9px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.toolbar button:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.saved { font-size: 12px; color: var(--faint); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kcol { background: rgba(255, 255, 255, .025); border: .8px solid var(--line-soft); border-radius: var(--r-card); padding: 10px; min-height: 300px; }
.kcol.drop { border-color: rgba(111, 207, 151, .5); }
.kcol h3 { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; margin: 0; }
.kcol h3 .faint { font-weight: 400; }
.kcard { background: var(--panel2); border: .8px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; }
.kcard p { margin: 0 0 8px; font-size: 13px; }
.kcard .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--faint); }

/* ---------- Charts ---------- */
.chart svg { width: 100%; height: auto; display: block; }
.chart .gridl { stroke: rgba(255, 255, 255, .06); }
.chart text { fill: var(--faint); font-size: 10px; font-family: var(--font); }
.chart rect.b { fill: var(--brand); }
.chart rect.b:hover, .chart rect.b.top { fill: var(--acc); }
.chart path.l { fill: none; stroke: var(--acc); stroke-width: 2; }
.chart path.a { fill: url(#gArea); }
.tip { position: fixed; z-index: 90; pointer-events: none; background: #111111; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
.hbar { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.hbar .lab { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }
.funnel-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.funnel-step:last-child { border-bottom: 0; }
.funnel-step .lab { flex: 1; color: var(--muted); font-size: 13px; }
.funnel-step .val { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.rank:last-child { border-bottom: 0; }
.rank .pos { font-family: var(--mono); color: var(--faint); width: 20px; }
.rank .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.rank .v { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Llamadas ---------- */
.call-card .num { font-family: var(--mono); font-size: 12px; color: var(--acc); }
.call-card h3 { font-size: 16px; margin: 4px 0 8px; }
.call-card ul { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 13px; }
.call-card .when { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.call-card.done { opacity: .7; }

/* ---------- IA ---------- */
.ai { display: grid; grid-template-columns: 250px 1fr; gap: 16px; height: calc(100vh - 190px); min-height: 520px; }
.ai-side { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.ai-side .conv { padding: 9px 11px; border-radius: 10px; cursor: pointer; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; border: .8px solid transparent; }
.ai-side .conv:hover { background: rgba(255, 255, 255, .04); }
.ai-side .conv.on { color: var(--text); border-color: rgba(111, 207, 151, .3); background: rgba(111, 207, 151, .07); }
.ai-side .conv span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-side .conv button { opacity: 0; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 0 3px; }
.ai-side .conv:hover button { opacity: 1; }
.ai-main { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 22px; }
.ai-input { border-top: 1px solid var(--line-soft); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.ai-input textarea { min-height: 46px; max-height: 200px; }
.msg { max-width: 82%; margin-bottom: 14px; padding: 11px 15px; border-radius: 14px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.msg.user { margin-left: auto; background: rgba(111, 207, 151, .12); border: .8px solid rgba(111, 207, 151, .25); }
.msg.assistant { background: rgba(255, 255, 255, .04); border: .8px solid var(--line); }
.msg.err { border-color: rgba(239, 90, 80, .5); color: #ffb3ad; }
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.agent .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(111, 207, 151, .12); color: var(--acc); margin-bottom: 10px; }
.agent h3 { margin: 0 0 4px; }
.agent p { margin: 0; font-size: 12.5px; color: var(--muted); }
.notice { padding: 11px 14px; border-radius: 12px; font-size: 13px; background: rgba(232, 197, 71, .08); border: .8px solid rgba(232, 197, 71, .3); color: #efd98a; }
.notice.green { background: rgba(111, 207, 151, .07); border-color: rgba(111, 207, 151, .3); color: var(--acc2); }

/* ---------- Clientes ---------- */
.client-name { display: flex; align-items: center; gap: 10px; }
.client-name .lg { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; background: rgba(111, 207, 151, .12); color: var(--acc); font-size: 13px; }
.client-name b { display: block; }
.client-name small { color: var(--faint); }
.spark { width: 120px; height: 34px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

/* ---------- Responsive ---------- */
.menu-btn { display: none; }
@media (max-width: 1100px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .road-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 70; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 20px 16px 80px; }
  .topbar { padding: 10px 16px; }
  .impersonate { padding: 8px 16px; flex-wrap: wrap; font-size: 12px; }
  .impersonate .btn { margin-left: 0; }
  .page-head .row { width: 100%; }
  .cal-tools .month { min-width: 0; font-size: 16px; }
  .table-wrap { max-width: calc(100vw - 32px); }
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .topbar .search { display: none; }
  .kanban { grid-template-columns: 1fr; }
  .ai { grid-template-columns: 1fr; height: auto; }
  .ai-side { max-height: 160px; }
  .ai-main { height: 70vh; }
  .props { grid-template-columns: 1fr; }
  .form.two { grid-template-columns: 1fr; }
  .act { grid-template-columns: 24px 54px 1fr; }
  .act .when { grid-column: 3; }
  .road { padding-left: 0; }
  .road::before, .stage .dotn { display: none; }
  .cal .day { min-height: 80px; }
  .ev { font-size: 10px; }
  h1 { font-size: 26px; }
}

/* ---------- Calendario: semana ---------- */
.cal.week .day { min-height: 420px; gap: 5px; }
.cal.week .ev { white-space: normal; font-size: 12px; padding: 5px 7px; line-height: 1.35; }
.cal.week .dow { text-transform: capitalize; }
.cal.week .dow.acc { color: var(--acc); }
.cal.week .pd { font-family: var(--mono); font-size: 10px; color: var(--faint); text-transform: none; }
.wd-m { display: none; }
@media (max-width: 860px) { .cal.week { grid-template-columns: 1fr; } .cal.week .dow { display: none; } .cal.week .day { min-height: 60px; } .wd-m { display: block; font-size: 12px; color: var(--muted); text-transform: capitalize; } }

/* ---------- Ficha: notas y botón flotante de IA ---------- */
.notes-editor { min-height: 140px; padding: 14px 18px; font-size: 14px; }
.fab-wrap { position: fixed; right: 26px; bottom: 26px; z-index: 66; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab { width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; font-size: 20px; color: #052313; background: linear-gradient(120deg, var(--acc2), var(--acc)); box-shadow: 0 10px 30px rgba(111, 207, 151, .35); }
.fab:hover { filter: brightness(1.06); }
.fab-menu { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); display: flex; flex-direction: column; min-width: 250px; }
.fab-menu button { text-align: left; background: none; border: 0; color: var(--text); padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.fab-menu button:hover { background: rgba(111, 207, 151, .1); }

/* ---------- Recorrido: mapa ---------- */
.map-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.map-bar .btn { margin-left: auto; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.map-wrap { position: relative; border-radius: 20px; overflow: hidden; border: .8px solid rgba(255, 255, 255, .12); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); background: #1b6638; }
.map-scroll { overflow-x: auto; }
.map-svg { display: block; width: 100%; height: auto; font-family: var(--font); user-select: none; }
.mpin { cursor: pointer; }
.mpin .pin-body { transition: transform .18s; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); }
.mpin:hover .pin-body { transform: scale(1.12); }
.mpin.sel .pin-body { transform: scale(1.32); filter: drop-shadow(0 0 7px rgba(255, 255, 255, .85)); }
.mpin.dim { opacity: .28; }
.mpin .pulse { transform-box: fill-box; transform-origin: center; animation: mpulse 1.6s ease-out infinite; }
@keyframes mpulse { from { transform: scale(.8); opacity: .95; } to { transform: scale(2); opacity: 0; } }
.hoy { pointer-events: none; }
.map-panel { position: sticky; top: 80px; }
.map-title { font-size: 19px; line-height: 1.3; margin: 10px 0 10px; }
.map-deliv { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: .8px solid var(--line-soft); margin-bottom: 12px; font-size: 13px; }
.map-deliv .faint { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.btn.big { padding: 12px 16px; font-size: 14px; }
.map-pins { margin-top: 16px; gap: 16px; }
.map-pins .pin { max-width: none; flex-basis: 100%; padding: 14px 12px 10px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 105%; transform: rotate(720deg) translateX(40px); opacity: .9; } }
@media (max-width: 1100px) { .map-layout { grid-template-columns: 1fr; } .map-panel { position: static; } }
@media (max-width: 860px) { .map-svg { min-width: 880px; } .map-bar .btn { margin-left: 0; } }
.lane-num { pointer-events: none; letter-spacing: .02em; paint-order: stroke; stroke: rgba(0, 0, 0, .15); stroke-width: 1px; }
.map-wrap { background: #161917; }

/* ---------- Recorrido: pista de césped recta ---------- */
.lane-area { --lx: 150px; --lw: 220px; position: relative; padding-bottom: 40px; border-radius: 20px; border: .8px solid rgba(255, 255, 255, .1);
  background: #131313; }
.lane-track { position: absolute; top: 0; bottom: 0; left: var(--lx); width: var(--lw); border-left: 5px solid #f4f4ef; border-right: 5px solid #f4f4ef; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 40px rgba(0, 0, 0, .55);
  background-color: #2f8a3d; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.3px), radial-gradient(rgba(0, 0, 0, .14) 1px, transparent 1.3px); background-size: 6px 6px, 9px 9px; background-position: 0 0, 3px 4px; }
.lane-track::before, .lane-track::after { content: ''; position: absolute; top: 0; bottom: 0; width: 16px; background: repeating-linear-gradient(to bottom, #f4f4ef 0 4px, transparent 4px 15px); }
.lane-track::before { left: 0; border-right: 3px solid #f4f4ef; }
.lane-track::after { right: 0; border-left: 3px solid #f4f4ef; }
.lane-done { position: absolute; left: 19px; right: 19px; top: 0; height: 0; background: rgba(201, 255, 184, .17); transition: height 1.1s cubic-bezier(.65, 0, .35, 1); }
.lrow { position: relative; z-index: 1; display: grid; grid-template-columns: var(--lx) var(--lw) minmax(0, 1fr); align-items: center; min-height: 58px; }
.lrow.lstep:has(.lcard) { z-index: 4; }
.ll { text-align: right; padding-right: 14px; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); }
.ll small { color: var(--faint); font-size: 11px; }
.lc { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.lstep .lc::after { content: ''; position: absolute; left: 22px; right: 22px; bottom: -1.5px; height: 3px; background: #f4f4ef; opacity: .85; }
.lnum { position: relative; font: 900 30px/1 var(--font); color: #f4f4ef; background: none; border: 0; cursor: pointer; padding: 6px 14px; border-radius: 10px; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); transition: transform .15s; }
.lnum:hover { transform: scale(1.12); }
.lnum i { position: absolute; top: -4px; right: -8px; font-style: normal; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #0b0f0d; display: grid; place-items: center; font-weight: 900; text-shadow: none; }
.lstep.done .lnum { color: rgba(244, 244, 239, .5); }
.lstep.late .lnum { color: #ffc9c4; }
.lstep.sel .lnum { background: rgba(0, 0, 0, .3); box-shadow: 0 0 0 3px var(--c); transform: scale(1.08); }
.lstep.cur .lnum::before { content: ''; position: absolute; inset: -4px; border-radius: 12px; border: 3px solid var(--c); animation: lpulse 1.6s ease-out infinite; }
@keyframes lpulse { from { opacity: .9; transform: scale(.95); } to { opacity: 0; transform: scale(1.35); } }
.lstep.dim { opacity: .3; }
.lr { position: relative; min-width: 0; padding-left: 20px; align-self: stretch; display: flex; align-items: center; }
.lpeek { display: flex; align-items: center; gap: 8px; max-width: 100%; background: none; border: 0; color: var(--muted); cursor: pointer; text-align: left; font-size: 13.5px; padding: 6px 10px; border-radius: 9px; }
.lpeek:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.lpeek .lt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lstep.done .lpeek .lt { text-decoration: line-through; color: var(--faint); }
.lcard { position: absolute; left: 20px; top: 4px; width: min(540px, calc(100% - 28px)); z-index: 5; background: linear-gradient(180deg, #1b1b1b, #131313); border: 1px solid var(--c); border-radius: 16px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); animation: lpop .18s ease-out; }
.lcard::before { content: ''; position: absolute; left: -9px; top: 16px; width: 16px; height: 16px; background: #1b1b1b; border-left: 1px solid var(--c); border-bottom: 1px solid var(--c); transform: rotate(45deg); }
@keyframes lpop { from { opacity: 0; transform: translateX(-8px); } }
.lstage { min-height: 76px; }
.lband { width: calc(100% - 38px); height: 48px; background: var(--c); display: flex; align-items: center; justify-content: center; gap: 10px; color: #0b0f0d; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.lband b { font-size: 22px; }
.lstage .lr { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; font-size: 12px; }
.lstage-t { font-weight: 700; font-size: 14px; color: var(--c); }
.lstart, .lfinish { min-height: 100px; }
.lword { font: 900 34px/1 var(--font); color: #f4f4ef; letter-spacing: .05em; position: relative; }
.lchecker { position: absolute; left: 22px; right: 22px; top: 10px; height: 16px; background: repeating-conic-gradient(#111 0 25%, #f4f4ef 0 50%) 0 0 / 16px 16px; }
.lfinish .lc { flex-direction: column; justify-content: flex-end; gap: 4px; padding-bottom: 8px; }
.ltrophy { font-size: 26px; }
.lclose { min-height: 54px; }
.lclose .lchecker { top: 50%; transform: translateY(-50%); }
.lclose .closebar { margin: 0; font-size: 11.5px; padding: 7px 12px; }
.lpill { background: #0b0f0d; border: 1px solid var(--acc); color: var(--acc); font-weight: 800; font-size: 11px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.lpill.gold { border-color: var(--amber); color: var(--amber); }
.lhoy { background: #f4f4ef; color: #0b0f0d; font-weight: 900; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; margin-bottom: 3px; }
.lane-avatar { position: absolute; left: calc(var(--lx) + 26px); top: 0; z-index: 3; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 3px solid var(--acc); box-shadow: 0 6px 16px rgba(0, 0, 0, .5); display: grid; place-items: center; pointer-events: none; transition: top 1.1s cubic-bezier(.65, 0, .35, 1); }
.lane-avatar img { width: 36px; height: 36px; border-radius: 50%; }
.lane-avatar.hop { animation: hop .28s ease-in-out 4; }
@keyframes hop { 50% { transform: translateY(-6px); } }
@media (max-width: 860px) {
  .lane-area { --lx: 62px; --lw: 112px; }
  .lnum { font-size: 23px; padding: 5px 9px; }
  .ll { padding-right: 8px; font-size: 10.5px; }
  .ll small, .lstage .lr .faint, .lband span { display: none; }
  .lr { padding-left: 10px; }
  .lcard { position: relative; left: 0; top: 0; width: 100%; margin: 6px 0; padding: 14px; }
  .lcard::before { display: none; }
  .lstep:has(.lcard) .lc { align-items: flex-start; padding-top: 10px; }
  .lstep:has(.lcard) .lr { align-items: flex-start; }
  .lword { font-size: 21px; }
  .lane-track::before, .lane-track::after { width: 10px; }
  .lane-done { left: 13px; right: 13px; }
  .lstep .lc::after, .lchecker { left: 14px; right: 14px; }
  .lane-avatar { left: calc(var(--lx) + 14px); width: 32px; height: 32px; border-width: 2px; }
  .lane-avatar img { width: 26px; height: 26px; }
  .lpill { font-size: 9.5px; padding: 3px 6px; }
}

/* ---------- Recorrido: pista en eses ---------- */
.lane-area.snake { padding: 0; }
.snake-inner { position: relative; }
.snake-svg { display: block; width: 100%; height: auto; font-family: var(--font); user-select: none; }
.snum { cursor: pointer; }
.snum text { transition: opacity .15s; }
.snum:hover > circle:first-child { fill: rgba(0, 0, 0, .22); }
.snum.dim { opacity: .3; }
.spulse { transform-box: fill-box; transform-origin: center; animation: mpulse 1.6s ease-out infinite; }
.snake-pop { position: absolute; z-index: 5; width: 380px; transform: translate(40px, -30px); }
.snake-pop.l { transform: translate(calc(-100% - 40px), -30px); }
.snake-pop.up { transform: translate(40px, calc(-100% + 30px)); }
.snake-pop.l.up { transform: translate(calc(-100% - 40px), calc(-100% + 30px)); }
.snake-pop .lcard { position: relative; left: 0; top: 0; width: 100%; }
.snake-pop.l .lcard::before { left: auto; right: -9px; transform: rotate(225deg); }
.snake-pop.up .lcard::before { top: auto; bottom: 16px; }
@media (max-width: 860px) {
  .snake-scroll { overflow-x: auto; }
  .snake-inner { min-width: 780px; }
  .snake-pop, .snake-pop.l, .snake-pop.up, .snake-pop.l.up { position: fixed; left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; transform: none; z-index: 60; max-height: 70vh; overflow-y: auto; }
  .snake-pop .lcard { padding: 14px; }
  .snake-pop .lcard::before { display: none; }
}
.chip.hof { background: rgba(111, 207, 151, .15); color: #4ade80; }

/* ---------- Programa SWH ---------- */
.mod { padding: 0; margin-bottom: 12px; overflow: hidden; }
.mod.complete { border-color: rgba(111, 207, 151, .35); }
.mod-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; }
.mod-head:hover { background: rgba(255, 255, 255, .02); }
.mod-n { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: rgba(111, 207, 151, .12); color: var(--acc); flex: 0 0 auto; }
.mod-t { flex: 1; min-width: 0; }
.mod-t b { display: block; font-size: 15.5px; }
.mod-t small { color: var(--faint); font-size: 12px; }
.mod-p { width: 150px; display: flex; flex-direction: column; gap: 4px; text-align: right; font-size: 11.5px; color: var(--muted); }
.mod-x { font-size: 20px; color: var(--faint); width: 20px; text-align: center; }
.mod-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; padding: 4px 18px 18px; border-top: 1px solid var(--line-soft); }
.mod-classes { padding-top: 12px; }
.mod-side { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.mod-side .card { padding: 14px 16px; }
.cls { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.cls-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; border-radius: 8px; }
.cls-main:hover { background: rgba(255, 255, 255, .04); }
.cls-t { flex: 1; min-width: 0; }
.cls-t b { display: block; font-weight: 600; font-size: 13.5px; }
.cls-t small { display: block; color: var(--faint); font-size: 12px; }
.cls.seen .cls-t b { color: var(--muted); }
.act-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.act-row:last-child { border-bottom: 0; }
.act-row input { margin-top: 2px; flex: 0 0 auto; }
.act-row.done span { color: var(--faint); text-decoration: line-through; }
.lesson-claim { font-size: 16px; color: var(--acc2); margin: 0 0 14px; font-weight: 500; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0a0a0a; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.empty { display: grid; place-items: center; text-align: center; color: var(--faint); }
.video.empty span { font-size: 34px; display: block; }
.video.empty p { margin: 4px 0 0; }
.lesson-text { margin-top: 18px; font-size: 14.5px; line-height: 1.7; }
.lesson-text h3 { font-size: 16px; margin: 22px 0 6px; color: var(--text); }
.lesson-text ul { padding-left: 20px; }
.lesson-text .mono-line { font-family: var(--mono); font-size: 12.5px; background: rgba(255, 255, 255, .04); border-left: 3px solid var(--acc); margin: 0; padding: 4px 10px; }
@media (max-width: 860px) { .mod-body { grid-template-columns: 1fr; } .mod-p { width: 80px; } }
/* Persona corriendo en la pista */
#mapAvatar #runner { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
#mapAvatar .runner-glow { filter: blur(3px); }
.sidebar .side-search { width: auto; }

.kpi .btn { white-space: normal; justify-content: flex-start; text-align: left; line-height: 1.3; }
.mod-head { flex-wrap: wrap; }
@media (max-width: 860px) { .mod-p { width: 100%; order: 3; } .mod-t { flex-basis: calc(100% - 90px); } }
/* Números con la fuente de GoGym (Plus Jakarta Sans) */
:root { --num: 'Plus Jakarta Sans', Inter, sans-serif; --serif: 'Instrument Serif', Georgia, serif; }
.kpi .val, .ring span, .mod-n, .funnel-step .val, .rank .v { font-family: var(--num); font-weight: 700; letter-spacing: -.03em; }
.kpi .val { font-size: 28px; line-height: 1.1; }
.ring span { font-size: 18px; }
.mod-n { font-size: 18px; }
.snake-svg .snum text, .snake-svg .lane-n { font-family: var(--num); font-weight: 800; }

/* Títulos en Instrument Serif, como el asistente de GoGym */
h1, h2, h3, .drawer-head b, .mod-t b, .lesson-claim, .modal h2, .snake-pop h3, .snake-pop b.pop-t {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.01em;
}
h1 { font-size: 52px; letter-spacing: -.02em; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
.drawer-head b { font-size: 22px !important; }
.mod-t b { font-size: 20px; }
.lesson-claim { font-size: 20px; }

/* Inicio (estilo GoGym) */
.ihero { padding: 28px 30px; margin-bottom: 14px; background: radial-gradient(120% 140% at 0 0, rgba(111, 207, 151, .07), transparent 60%), var(--panel); }

.ihero h1 { font-size: 44px; }
.ihero p.muted { margin: 6px 0 0; }
.igrid { gap: 14px; margin-bottom: 14px; }
.ikpi { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px 22px; }
.ikpi .eyebrow { margin: 0 0 6px; color: var(--muted); }
.ikpi .ival { font-family: var(--num); font-weight: 800; font-size: 34px; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 8px; }
.ipill { display: inline-block; font-family: 'Geist Mono', monospace; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: rgba(111, 207, 151, .12); color: var(--acc); }
.ipill.neg { background: rgba(248, 113, 113, .12); color: var(--red); }
.ihint { font-size: 12px; margin-left: 8px; }
.ispark { width: 130px; height: 52px; flex: none; }
.igrid2 { grid-template-columns: 1.3fr 1fr; gap: 14px; }
.isub { margin: 0 0 12px; font-size: 13px; }
.ialert { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.ialert:first-of-type { border-top: 0; }
.ialert b { display: block; font-weight: 600; }
.ialert small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ialert:hover b { color: var(--acc2); }
.iqas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iqa { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line-soft); color: var(--text); font: inherit; font-weight: 600; font-size: 13.5px; text-align: left; cursor: pointer; text-decoration: none; }
.iqa:hover { border-color: rgba(111, 207, 151, .4); background: rgba(111, 207, 151, .06); }
.iqa i { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); flex: none; }
@media (max-width: 860px) { .igrid2, .iqas { grid-template-columns: 1fr; } .ihero h1 { font-size: 34px; } .ikpi .ival { font-size: 28px; } .ispark { width: 96px; } }

/* Juego tipográfico estilo Kaizer: etiquetas en mono, títulos en serif, texto en sans */
.eyebrow, .kpi .lab, table.t th, .ikpi .eyebrow, .ipill, .tag, .status {
  font-family: 'Geist Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: .12em; font-weight: 500;
}
.eyebrow { font-size: 10.5px; }
.kpi .lab, .ikpi .eyebrow { font-size: 10.5px; color: var(--muted); }
.isub { font-size: 13px; color: var(--muted); }
.ihero h1 { font-size: 52px; letter-spacing: -.025em; }
.ialert { padding: 12px 14px; margin-top: 8px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.ialert:first-of-type { border-top: 1px solid var(--line-soft); }
.ialert .ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--acc); }
.ialert .ic.red { color: #ff8f86; border-color: rgba(239, 90, 80, .4); }
.ialert .ic.amber { color: var(--amber); border-color: rgba(232, 197, 71, .4); }
.ialert > span:nth-child(2) { flex: 1; min-width: 0; }
.ialert .go { flex: none; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(111, 207, 151, .4); color: var(--acc2); background: rgba(111, 207, 151, .08); white-space: nowrap; }
.ialert:hover .go { background: rgba(111, 207, 151, .16); }
@media (max-width: 860px) { .ihero h1 { font-size: 38px; } .ialert .go { display: none; } }
.tag.red { background: rgba(239, 90, 80, .14); }
.tag.amber { background: rgba(232, 197, 71, .12); }
.tag.blue { background: rgba(96, 165, 250, .12); }
.tag { font-size: 10px; border-radius: 5px; }
.page-head p.sub, .card h2 + .muted { font-size: 14px; }
.section-title h2 { font-size: 34px; }
h1 em, .section-title h2 em { color: inherit; }
.agent h3 { font-size: 21px; }
.login .err:empty { display: none; }
.login-brand b { white-space: nowrap; }
@media (max-width: 520px) { .login-card { padding: 34px 22px 28px; } .login-brand .brand-logo { width: 72px; height: 72px; } .login-brand .brand-logo img { width: 52px; height: 52px; } }

/* Equipo: Mi plan, Guiones, Notas y tickets */
.plan-block { margin-bottom: 14px; }
.plan-block .card-head h2 { margin: 0; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.plan-block .card-head + .plan-row { border-top: 0; }
.plan-row .pt { flex: 1; min-width: 0; }
.plan-row .pt b { display: block; font-weight: 600; }
.plan-row .pt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.plan-row .pd { min-width: 130px; text-align: right; font-size: 12.5px; }
.tk-row { cursor: pointer; }
.tk-row:hover .pt b { color: var(--acc2); }
.gs-card { display: flex; flex-direction: column; }
.gs-card p { flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nt-composer textarea, #tk-reply { width: 100%; }
.nt-note { margin-bottom: 12px; }
.nt-body { white-space: pre-wrap; margin-top: 12px; line-height: 1.55; }
.nt-note details { margin-top: 10px; }
.tk-msgs { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.tk-msg { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.tk-msg div { margin-top: 4px; white-space: pre-wrap; }
@media (max-width: 860px) { .plan-row { flex-wrap: wrap; } .plan-row .pd { min-width: 0; text-align: left; } }
.gs-gym .avatar { width: 44px; height: 44px; font-size: 15px; }
.team-nav { margin-bottom: 10px; }
.team-nav .nav-label:first-child { margin-top: 0; }
.nav + .team-nav { margin-top: 6px; }
