:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-2: #161616;
  --border: #222222;
  --border-2: #2c2c2c;
  --text: #ededed;
  --muted: #8b8b8b;
  --faint: #5c5c5c;
  --accent: #5170FF;
  --brand: #5170FF;
  --brand-2: #3A52D6;
  --brand-soft: rgba(81,112,255,.14);
  --green: #3ecf8e;
  --red: #f0616d;
  --amber: #f5b14c;
  --blue: #5170FF;
  --violet: #9b7bf7;
  --radius: 12px;
  --sidebar: 64px;
  --sidebar-open: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  width: var(--sidebar);
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 14px 10px;
  transition: width .18s ease;
  overflow: hidden;
}
.sidebar.pinned { width: var(--sidebar-open); box-shadow: 8px 0 30px rgba(0,0,0,.5); }
.brand { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; margin-bottom: 14px; white-space: nowrap; }
.brand-mark {
  flex: 0 0 26px; height: 26px; border-radius: 7px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.brand-name { font-weight: 600; font-size: 15px; opacity: 0; transition: opacity .15s; }
.sidebar.pinned .brand-name { opacity: 1; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nav-group { margin-bottom: 10px; }
.nav-label {
  font-size: 11px; color: var(--faint); padding: 6px 10px; white-space: nowrap;
  opacity: 0; height: 0; padding-top: 0; padding-bottom: 0; transition: opacity .15s;
}
.sidebar.pinned .nav-label { opacity: 1; height: auto; padding-top: 6px; padding-bottom: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 34px; padding: 0 11px; border-radius: 8px;
  color: var(--muted); white-space: nowrap; position: relative;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: #fff; }
.nav-item.active svg { color: var(--brand); }
.nav-item.active::after { content: ""; position: absolute; right: 4px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--brand); }
.nav-item svg { flex: 0 0 18px; }
.nav-item span { opacity: 0; transition: opacity .15s; }
.sidebar.pinned .nav-item span { opacity: 1; }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 10px; }
.sidebar .fold { opacity: 0; transition: opacity .15s; }
.sidebar.pinned .fold { opacity: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; white-space: nowrap; }
.avatar {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted);
}
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.user-chip select { background: transparent; border: 0; color: var(--muted); font-size: 12px; outline: none; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,.85); backdrop-filter: blur(10px);
}
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumb b { color: var(--text); font-weight: 500; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-2); background: transparent;
  display: grid; place-items: center; color: var(--muted); position: relative;
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.dot-badge { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.page { padding: 28px; max-width: 1400px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- primitives ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.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)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border-2); background: var(--panel-2);
  font-size: 13px; color: var(--text); white-space: nowrap;
}
.btn:hover { background: #1d1d1d; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 500; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.danger { color: var(--red); }

.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; border-radius: 6px; font-size: 12px; }
.seg button.on { background: var(--brand); color: #fff; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 9px 10px; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button.on { color: var(--text); border-bottom-color: var(--brand); }

.input, .textarea, .select {
  width: 100%; height: 36px; padding: 0 11px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--border-2); outline: none;
}
.textarea { height: 80px; padding: 9px 11px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.search { position: relative; }
.search input { padding-left: 32px; height: 32px; }
.search svg { position: absolute; left: 10px; top: 8px; color: var(--faint); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px;
  background: var(--panel-2); border: 1px solid var(--border-2); color: var(--muted); white-space: nowrap;
}
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { color: var(--green); background: rgba(62,207,142,.08); border-color: rgba(62,207,142,.22); }
.pill.red { color: var(--red); background: rgba(240,97,109,.08); border-color: rgba(240,97,109,.25); }
.pill.amber { color: var(--amber); background: rgba(245,177,76,.08); border-color: rgba(245,177,76,.25); }
.pill.blue { color: var(--blue); background: rgba(81,112,255,.08); border-color: rgba(81,112,255,.25); }
.pill.violet { color: var(--violet); background: rgba(155,123,247,.08); border-color: rgba(155,123,247,.25); }
.delta { font-size: 11px; padding: 1px 6px; border-radius: 5px; font-weight: 500; }
.delta.up { color: var(--green); background: rgba(62,207,142,.12); }
.delta.down { color: var(--red); background: rgba(240,97,109,.12); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #131313; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.kpi { padding: 16px 18px; border-right: 1px solid var(--border); }
.kpi:last-child { border-right: 0; }
.kpi .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 24px; font-weight: 600; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-card .value { font-size: 26px; font-weight: 600; margin: 6px 0 2px; }
.glow-card { position: relative; overflow: hidden; }
.glow-card::before {
  content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 160px;
  background: radial-gradient(closest-side, var(--glow, rgba(245,177,76,.16)), transparent);
  pointer-events: none;
}

/* ---------- charts ---------- */
.chart { width: 100%; display: block; }
.chart text { fill: var(--faint); font-size: 10.5px; font-family: Inter, sans-serif; }
.chart .grid-line { stroke: #1c1c1c; }
.chart-tip {
  position: fixed; pointer-events: none; z-index: 100;
  background: #1a1a1a; border: 1px solid var(--border-2); border-radius: 7px;
  padding: 6px 9px; font-size: 12px; display: none; white-space: nowrap;
}
.progress { height: 8px; border-radius: 99px; background: #1f1f1f; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- kanban ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.col { flex: 0 0 272px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 10px; }
.col-head .row { gap: 8px; font-size: 13px; font-weight: 500; }
.col-body { min-height: 120px; border-radius: 10px; padding: 2px; transition: background .12s; }
.col-body.over { background: #141414; outline: 1px dashed var(--border-2); }
.kcard {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; margin-bottom: 8px; cursor: grab;
}
.kcard:hover { border-color: var(--border-2); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 500; margin: 6px 0 2px; }
.kcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.add-col { flex: 0 0 200px; height: 80px; border: 1px dashed var(--border-2); border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: transparent; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: 60px repeat(7, minmax(110px,1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.cal.day { grid-template-columns: 60px 1fr; }
.cal > div { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 46px; padding: 4px 6px; font-size: 11.5px; }
.cal .hd { min-height: 54px; padding: 8px; }
.cal .hd .dn { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.cal .hd .dd { font-size: 18px; font-weight: 600; }
.cal .today { background: #151515; }
.cal .hour { color: var(--faint); font-size: 11px; text-align: right; }
.ev { display: block; border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; background: #1c1c1c; border: 1px solid var(--border-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.call { border-left: 2px solid var(--blue); }
.ev.task { border-left: 2px solid var(--amber); }
.ev.meet { border-left: 2px solid var(--green); }
.mini-cal { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; text-align: center; font-size: 12px; }
.mini-cal .dn { color: var(--faint); font-size: 10.5px; }
.mini-cal button { border: 0; background: transparent; color: var(--muted); height: 26px; border-radius: 6px; position: relative; }
.mini-cal button.on { background: var(--brand); color: #fff; }
.mini-cal button.has::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--brand); }

/* ---------- misc components ---------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.list-row + .list-row { margin-top: 8px; }
.quick { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.quick:last-child { border-bottom: 0; }
.quick .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); }
.advice { padding: 11px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); }
.advice + .advice { margin-top: 8px; }
.advice .h { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 13px; }
.advice p { margin: 4px 0 0 22px; font-size: 12px; color: var(--muted); }
.advice .go { margin: 4px 0 0 22px; font-size: 12px; color: var(--text); }
.cover { height: 120px; border-radius: 9px; margin-bottom: 14px; position: relative; overflow: hidden; }
.cover .pill { position: absolute; top: 10px; right: 10px; }
.prog-card { cursor: pointer; transition: border-color .12s; }
.prog-card:hover { border-color: #3a3a3a; }
.meta-row { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 12px; }
.integ { position: relative; overflow: hidden; min-height: 180px; display: flex; flex-direction: column; }
.integ .logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 16px; margin-bottom: 18px; }
.integ .bg-logo { position: absolute; right: -10px; top: -14px; font-size: 90px; font-weight: 800; opacity: .06; pointer-events: none; }
.integ .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }
.switch { width: 34px; height: 20px; border-radius: 99px; background: #2a2a2a; border: 0; position: relative; padding: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(14px); }
.check { width: 16px; height: 16px; accent-color: var(--brand); }
.empty { padding: 40px; text-align: center; color: var(--faint); border: 1px dashed var(--border-2); border-radius: var(--radius); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; outline: 1px solid var(--border-2); padding: 0; }
.swatch.on { border-color: var(--bg); outline: 2px solid var(--text); }
.range { width: 100%; accent-color: #fff; }

/* ---------- client-facing preview ---------- */
.preview-frame { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; }
.client-stage {
  position: relative; min-height: 460px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 40px 24px 70px; background: #06090c; color: #fff;
}
.client-stage.full { min-height: 100vh; }
.client-stage .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.client-stage .shade { position: absolute; inset: 0; background: #000; }
.client-stage .content { position: relative; z-index: 2; max-width: 620px; width: 100%; }
.client-stage .badge { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 99px; margin-bottom: 14px; border: 1px solid; }
.client-stage h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.client-stage .sub { color: rgba(255,255,255,.65); font-size: 13.5px; margin: 8px auto 20px; max-width: 420px; }
.client-stage .cbtn { border: 0; border-radius: 99px; padding: 9px 18px; font-weight: 500; font-size: 13px; margin-top: 20px; }
.video-ph { aspect-ratio: 16/9; border-radius: 12px; background: linear-gradient(135deg,#1d2733,#0c1117); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08); }
.video-ph .play { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: #000; }
.video-ph iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.steps-bar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.steps-bar span { font-size: 11px; padding: 3px 10px; border-radius: 99px; color: rgba(255,255,255,.55); }
.steps-bar span.on { background: rgba(255,255,255,.14); color: #fff; }
.particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.particles i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: rgba(255,255,255,.6); animation: float linear infinite; }
@keyframes float { from { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(-140px); opacity: 0; } }
.contract { text-align: left; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 16px; max-height: 180px; overflow-y: auto; font-size: 12.5px; color: rgba(255,255,255,.75); white-space: pre-line; }
.sig { width: 100%; height: 110px; background: rgba(255,255,255,.95); border-radius: 10px; margin-top: 12px; touch-action: none; cursor: crosshair; display: block; }
.form-ph { background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; padding: 30px; color: rgba(255,255,255,.6); font-size: 13px; }
.ob-form { text-align: left; display: grid; gap: 12px; }
.ob-q span { display: block; font-size: 12.5px; color: rgba(255,255,255,.8); margin-bottom: 5px; }
.ob-q i { color: #f0616d; font-style: normal; }
.ob-q input, .ob-q textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; outline: none; resize: vertical; }
.ob-q input:focus, .ob-q textarea:focus { border-color: rgba(255,255,255,.4); }
.q-row { display: grid; grid-template-columns: 1fr 150px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 640px) { .q-row { grid-template-columns: 1fr auto; } .q-row select { grid-column: 1 / -1; } }
.form-ph iframe { width: 100%; height: 320px; border: 0; border-radius: 8px; background: #fff; }

/* client portal */
.portal { min-height: 100vh; background: #08080a; }
.portal-top { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--border); }
.portal-nav { display: flex; gap: 4px; }
.portal-nav button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 8px; }
.portal-nav button.on { background: var(--panel-2); color: var(--text); }
.lesson { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.lesson:hover { background: var(--panel-2); }
.lesson.on { background: var(--panel-2); }
.lesson .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-2); display: grid; place-items: center; flex: 0 0 auto; }
.lesson .ck.done { background: var(--green); border-color: var(--green); color: #000; }
details.faq { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--panel); }
details.faq + details.faq { margin-top: 8px; }
details.faq summary { cursor: pointer; font-weight: 500; }
details.faq p { color: var(--muted); margin: 8px 0 0; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px; padding: 20px; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(30px); opacity: 0; z-index: 90; background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 99px; font-size: 13px; font-weight: 500; transition: all .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.viewing-as { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 28px; background: rgba(81,112,255,.1); border-bottom: 1px solid rgba(81,112,255,.25); color: #c9d8ff; font-size: 13px; }
.viewing-as .btn { margin-left: auto; }
.login .group-label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 8px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(600px 300px at 50% 0%, #1a1a1a, transparent), var(--bg); }
.login .box { width: 100%; max-width: 380px; }

/* ---------- responsive ---------- */
.menu-btn { display: none !important; }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 820px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .split { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 0; padding: 0; border: 0; }
  .sidebar.pinned { width: var(--sidebar-open); padding: 14px 10px; border-right: 1px solid var(--border); }
  .menu-btn { display: grid !important; }
  .page { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .g4, .kpis { grid-template-columns: 1fr; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--border); }
  .client-stage h2 { font-size: 24px; }
  .row.wrap > .row { flex-wrap: wrap; }
  .search { width: 100% !important; }
  .portal-top { padding: 0 12px; gap: 8px; }
  .portal-nav { overflow-x: auto; }
}

/* ---------- Operator Lab: azul de marca ---------- */
.brand-kpis { background: linear-gradient(135deg, #5170FF 0%, #3A52D6 60%, #2B3FB8 100%); border-color: #5170FF !important; }
.brand-kpis .kpi { border-color: rgba(255,255,255,.1); }
.brand-kpis .kpi .label { color: #e4e9ff; }
.brand-kpis .delta.up { background: rgba(62,207,142,.18); }
.kpi-blue { background: var(--brand-soft); border-color: rgba(81,112,255,.35); }
.red-t { color: var(--red); } .green-t { color: var(--green); } .brand-t { color: #8fa2ff; }
.notice { background: var(--brand-soft); border: 1px solid rgba(81,112,255,.35); color: #c9d3ff; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.modal.wide { max-width: 860px; }
.sec-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8fa2ff; margin: 8px 0 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.calc { min-height: 36px; padding: 8px 11px; border-radius: 8px; border: 1px dashed var(--border-2); font-size: 13px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.calc b { color: var(--text); }
.pay-list .list-row { padding: 9px 12px; }
.leads-table td, .leads-table th { padding: 9px 10px; }
.leads-table tbody tr td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; }
.leads-table thead th:first-child { position: sticky; left: 0; background: var(--panel); z-index: 2; }
tbody tr:hover td:first-child { background: #131313; }

/* embudo de ventas */
.sfunnel { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 26px; align-items: center; }
.sf-stages { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sf-stage { text-align: center; padding: 18px 12% 16px; clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); color: #fff; }
.sf-stage.s4 { clip-path: none; border-radius: 12px; padding: 18px 16px 16px; }
.sf-stage.s0 { background: linear-gradient(180deg, #5170FF, #3A52D6); }
.sf-stage.s1 { background: linear-gradient(180deg, #4560e0, #3348b8); }
.sf-stage.s2 { background: linear-gradient(180deg, #34479f, #283a86); }
.sf-stage.s3 { background: linear-gradient(180deg, #25336f, #1d295c); }
.sf-stage.s4 { background: linear-gradient(180deg, #5170FF, #3A52D6); border: 1px solid #5170FF; }
.sf-l { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 600; }
.sf-v { font-size: 34px; font-weight: 700; line-height: 1.15; margin: 4px 0; }
.sf-p { font-size: 12.5px; color: rgba(255,255,255,.7); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sf-p b { color: #fff; font-weight: 600; }
.sf-rates { display: flex; flex-direction: column; gap: 22px; }
.sf-rv { font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.sf-rv i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }

/* documentos de guiones */
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.doc-title { flex: 1; min-width: 240px; background: transparent; border: 0; font-size: 28px; font-weight: 600; outline: none; letter-spacing: -.01em; }
.doc-title:focus { border-bottom: 1px solid var(--brand); }
.doc-intro { width: 100%; background: transparent; border: 1px dashed var(--border-2); border-radius: 10px; padding: 10px 12px; color: var(--muted); resize: vertical; outline: none; margin-bottom: 10px; }
.flow-legend { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.doc-item { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.doc-it-title { flex: 1; min-width: 200px; background: transparent; border: 0; font-size: 16px; font-weight: 600; outline: none; }
.flow-btn { border: 1px solid var(--border-2); background: transparent; color: var(--muted); border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.flow-btn:hover { color: var(--text); border-color: var(--brand); }
.flow-btn.on { color: #fff; }
.flow-btn.on.gray { background: #3a3a3a; border-color: #3a3a3a; }
.flow-btn.on.violet { background: var(--violet); border-color: var(--violet); }
.flow-btn.on.blue { background: var(--brand); border-color: var(--brand); }
.flow-btn.on.amber { background: #b9832f; border-color: #b9832f; }
.flow-btn.on.green { background: #219a66; border-color: #219a66; }
.doc-text { width: 100%; min-height: 120px; margin-top: 10px; background: #0d0d0f; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; line-height: 1.6; font-size: 14px; resize: vertical; outline: none; overflow: hidden; }
.doc-text:focus { border-color: var(--brand); }
.comments { margin-top: 10px; }
.comment { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 6px; }
.thumb { width: 34px; height: 54px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border-2); }
.thumb.lg { width: 60px; height: 96px; }
.thumb-wrap { position: relative; display: inline-block; }
.thumb-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 13px; line-height: 1; }

/* conexiones API */
.api-list { display: flex; flex-direction: column; gap: 18px; max-width: 980px; }
.api-card { padding: 22px; }
.api-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 22px; }
.dot-st { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot-st.on { background: var(--green); }
details.howto { margin: 16px 0; border: 1px solid var(--border-2); border-radius: 10px; background: var(--panel-2); padding: 12px 14px; }
details.howto summary { cursor: pointer; }
details.howto ol { margin: 10px 0 2px; padding-left: 20px; color: var(--muted); font-size: 13px; }
details.howto li + li { margin-top: 4px; }
.up { text-transform: uppercase; letter-spacing: .1em; font-size: 11px !important; color: var(--muted); }
.api-sub { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: #0e0e10; }
code.hook { display: block; width: 100%; background: var(--panel-2); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: #8fa2ff; overflow-x: auto; }
@media (max-width: 900px) { .sfunnel { grid-template-columns: 1fr; } .sf-rates { display: grid; grid-template-columns: 1fr 1fr; } }

/* ---- Calendario: tipos de evento */
.ev.story { border-left: 2px solid #f472b6; }
.ev.reel { border-left: 2px solid var(--violet); }
.ev.youtube { border-left: 2px solid #ff4d4d; }
.ev.community { border-left: 2px solid #2dd4bf; }
.ev[data-act] { cursor: pointer; }
.ev[data-act]:hover { border-color: #444; }

/* ---- Contenido: Reels, Historias y YouTube */
.type-tabs button { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; }
.seg-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: rgba(255,255,255,.12); font-size: 11px; line-height: 17px; text-align: center; }
.month-pick { display: inline-flex; gap: 4px; }
.month-pick .select { height: 30px; width: auto; padding-right: 26px; font-size: 13px; }
.kpis.kpi-auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pgrid.yt { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pcard { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .12s, transform .12s; display: flex; flex-direction: column; }
.pcard:hover { border-color: var(--brand); transform: translateY(-1px); }
.media { position: relative; overflow: hidden; background: #0d0d0d; }
.media.reel { aspect-ratio: 4 / 5; }
.media.wide { aspect-ratio: 16 / 9; }
.media.reel.big { aspect-ratio: auto; height: 520px; border-radius: 12px; border: 1px solid var(--border); }
.media.wide.big { border-radius: 12px; border: 1px solid var(--border); }
.media-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-crop { position: absolute; top: -56px; left: 0; width: 100%; height: calc(100% + 420px); border: 0; pointer-events: none; background: #fff; }
.ig-full { width: 100%; height: 100%; border: 0; background: #fff; }
.media-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--faint); font-size: 12px; background: radial-gradient(100% 80% at 30% 10%, rgba(81,112,255,.18), transparent 70%), #0f0f0f; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-title { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: -4px; }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.pc-stats div, .seq-stats div, .pd-kpis div { display: flex; flex-direction: column; min-width: 0; }
.pc-stats span, .seq-stats span, .pd-kpis span { font-size: 11px; color: var(--muted); }
.pc-stats b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.seq-list { display: flex; flex-direction: column; gap: 10px; }
.seq-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .12s; }
.seq-row:hover { border-color: var(--brand); }
.seq-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 54px; border-radius: 10px; background: var(--brand-soft); color: #c3ccff; }
.seq-date b { font-size: 20px; line-height: 1; color: #fff; }
.seq-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.seq-thumbs { display: flex; gap: 6px; overflow-x: auto; }
.seq-thumbs img, .seq-thumbs i { flex: none; width: 44px; height: 78px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border-2); }
.seq-thumbs i { border-style: dashed; background: #0f0f0f; }
.seq-stats { display: grid; grid-template-columns: repeat(5, minmax(64px, auto)); gap: 16px; text-align: right; }
.seq-stats div { align-items: flex-end; }
.seq-stats b { font-size: 15px; font-weight: 600; }

.breakdown { margin-top: 22px; }
.breakdown summary { cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; list-style: none; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; }
.breakdown summary::-webkit-details-marker, .doc-item.compact summary::-webkit-details-marker { display: none; }
.breakdown[open] summary { color: var(--text); border-color: var(--brand); }
.doc-item.compact { padding: 0; }
.doc-item.compact summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.doc-item.compact[open] summary svg:last-child { transform: rotate(180deg); }
.doc-item.compact > :not(summary) { margin-left: 16px; margin-right: 16px; }
.doc-item.compact[open] { padding-bottom: 14px; }
.doc-item.compact .doc-text { width: calc(100% - 32px); }

.modal.wide:has(.pd) { max-width: 1020px; }
.pd { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.pd.youtube { grid-template-columns: 340px minmax(0, 1fr); }
.pd.story { grid-template-columns: 200px minmax(0, 1fr); }
.pd.story .media.reel.big { height: 340px; }
.pd-media { position: sticky; top: 0; }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 1px; background: rgba(255,255,255,.1); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background-image: linear-gradient(135deg, #5170FF 0%, #3A52D6 60%, #2B3FB8 100%); }
.pd-kpis div { padding: 12px 14px; }
.pd-kpis span { color: #e4e9ff; }
.pd-kpis b { font-size: 18px; font-weight: 600; margin-top: 4px; }

@media (max-width: 820px) {
  .pd, .pd.youtube, .pd.story { grid-template-columns: 1fr; }
  .pd-media { position: static; }
  .media.reel.big { height: 420px; }
  .seq-row { grid-template-columns: 46px minmax(0, 1fr); }
  .seq-stats { grid-column: 1 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; text-align: left; }
  .seq-stats div { align-items: flex-start; }
}
@media (max-width: 640px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pgrid.yt { grid-template-columns: 1fr; }
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpi-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.doc-item.compact[open] summary b { display: none; }
.doc-item.compact .doc-it-title { margin-top: 0 !important; }

/* ---- Ingresos: 5 indicadores */
.kpis.kpi5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis.kpi5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis.kpi5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Contrato de entrada del cliente */
.sign-page { min-height: 100vh; background: radial-gradient(70% 40% at 50% 0%, rgba(81,112,255,.22), transparent 70%), var(--bg); padding: 48px 16px 80px; }
.sign-back { position: fixed; top: 14px; left: 14px; z-index: 5; display: flex; gap: 8px; align-items: center; }
.sign-wrap { max-width: 780px; margin: 0 auto; }
.sign-head { text-align: center; margin-bottom: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sign-head h1 { font-size: 28px; }
.sign-head p { margin: 0; }
.contract-paper { background: #fbfbf9; color: #1a1a1a; border-radius: 14px; padding: 40px 48px; font: 14.5px/1.65 Georgia, 'Times New Roman', serif; white-space: pre-wrap; max-height: 62vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.ct-fill { font-weight: 700; background: rgba(81,112,255,.14); padding: 0 4px; border-radius: 4px; }
.ct-fill.ct-empty { color: #8a8a8a; font-weight: 400; background: transparent; }
.sign-card { margin-top: 18px; padding: 22px; }
.sign-canvas { width: 100%; height: 170px; background: #fff; border-radius: 10px; display: block; margin-top: 6px; touch-action: none; cursor: crosshair; }
.sign-btn { width: 100%; justify-content: center; margin-top: 16px; height: 44px; font-size: 15px; }
.contract-edit { height: 60vh; font: 13.5px/1.6 Georgia, serif; }
@media (max-width: 640px) { .contract-paper { padding: 24px 20px; font-size: 14px; } .sign-page { padding-top: 60px; } }

/* ---- Marca: logo OL y nombre en Times New Roman negrita #5170FF */
.brand-logo { height: 24px; width: auto; flex: none; margin-left: 2px; }
.brand-name, .brand-word { font-family: 'Times New Roman MT', 'Times New Roman', Times, serif; font-weight: 700; color: #5170FF; letter-spacing: .01em; }
.brand-name { font-size: 18px; }
.brand-word { font-size: 22px; }
.logo-lg { height: 44px; width: auto; }

/* ---- Clientes y acceso */
.client-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.client-card { display: flex; flex-direction: column; }
.client-card .btn.primary { margin-top: auto; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.sync-st { margin-right: 4px; white-space: nowrap; }
#creds-text { font: 13px/1.5 ui-monospace, Menlo, monospace; margin: 12px 0; }
.sign-out { position: fixed; top: 14px; right: 14px; z-index: 5; }
.brand-logo { height: 19px; margin-left: 4px; }
.ct-fill.ct-empty { display: inline-block; min-width: 150px; color: transparent; background: transparent; border-bottom: 1px solid #9a9a9a; line-height: 1.1; }
.res-contract { border-color: rgba(81,112,255,.45); background: var(--brand-soft); }

/* ---- Calendario: vista de mes */
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.mhd { padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .06em; }
.mcell { min-height: 116px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcell:nth-child(7n) { border-right: 0; }
.mcell:hover { background: #141414; }
.mcell.out { background: #0c0c0c; }
.mcell.out .mday { color: var(--faint); }
.mcell .ev { margin: 0; font-size: 11px; }
.mday { align-self: flex-start; border: 0; background: transparent; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; padding: 0; }
.mday:hover { background: var(--panel-2); }
.mcell.today .mday { background: var(--brand); color: #fff; font-weight: 600; }
.mmore { border: 0; background: transparent; color: var(--muted); font-size: 11px; text-align: left; padding: 0 4px; }
.mmore:hover { color: var(--text); }
@media (max-width: 640px) { .mcell { min-height: 74px; padding: 3px; } .mcell .ev { font-size: 9px; padding: 1px 3px; } .mhd { padding: 6px 4px; font-size: 10px; } }

/* ---- Importar leads */
.imp-grid { display: grid; gap: 8px; }
.imp-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 160px; gap: 10px; align-items: center; }
.imp-row .select { height: 32px; }
@media (max-width: 640px) { .imp-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---- Filtro por meses */
.month-sel { width: auto; min-width: 150px; height: 32px; font-size: 13px; padding-right: 28px; }
.month-sel.on { border-color: var(--brand); color: #fff; background-color: var(--brand-soft); }
/* ---- Copia de seguridad */
.backup-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.backup-note.warn { color: #ffd59a; border-color: rgba(245,177,76,.35); background: rgba(245,177,76,.06); }
/* flechas de subida y bajada legibles sobre el azul */
.brand-kpis .delta { color: #fff !important; }
.brand-kpis .delta.up { background: rgba(20,120,80,.55) !important; }
.brand-kpis .delta.down { background: rgba(190,40,60,.6) !important; }

/* ---- Umbrales de color */
.tone-red { color: #ff6b77 !important; }
.tone-amber { color: #ffb347 !important; }
.tone-green { color: #3ee08f !important; }
.brand-kpis .kpi-tone-red, .brand-kpis .kpi-tone-amber, .brand-kpis .kpi-tone-green { padding: 0 8px; border-radius: 8px; display: inline-flex; }
.brand-kpis .kpi-tone-red { background: rgba(190,40,60,.6); }
.brand-kpis .kpi-tone-amber { background: rgba(200,120,20,.6); }
.brand-kpis .kpi-tone-green { background: rgba(20,120,80,.6); }
.sf-rv.tone-red i { background: #ff6b77 !important; } .sf-rv.tone-amber i { background: #ffb347 !important; } .sf-rv.tone-green i { background: #3ee08f !important; }
.vpill { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #1c1c1c; color: var(--muted); font-variant-numeric: tabular-nums; }
.vpill.up { background: rgba(62,207,142,.14); color: #3ee08f; }
.vpill.down { background: rgba(240,97,109,.14); color: #ff6b77; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.up-l { text-transform: uppercase; letter-spacing: .1em; }
.green-t { color: #3ee08f; }

/* ---- Tabla de ventas */
.sales-table td, .sales-table th { padding-top: 13px; padding-bottom: 13px; }
.sales-table td:first-child { font-weight: 500; }

/* ---- Dashboard marketing */
.mk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mk-card { padding: 16px 18px; }
.mk-v { font-size: 28px; font-weight: 600; margin-top: 10px; font-family: ui-monospace, Menlo, monospace; letter-spacing: -.02em; }
.mk-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.mk-big { font-size: 40px; font-weight: 700; color: #3ee08f; font-family: ui-monospace, Menlo, monospace; letter-spacing: -.03em; line-height: 1.05; }
.mk-chart { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.lc { width: 100%; height: auto; display: block; margin-top: 6px; }
.lc .ax { fill: var(--faint); font-size: 10px; } .lc .gl { stroke: #222; }
.lc-cur { fill: none; stroke: #3ee08f; stroke-width: 2.5; } .lc-prev { fill: none; stroke: #777; stroke-width: 1.5; stroke-dasharray: 5 4; }
.lg-cur { display: inline-block; width: 22px; height: 3px; background: #3ee08f; border-radius: 2px; }
.lg-prev { display: inline-block; width: 22px; height: 0; border-top: 2px dashed #777; }
.mk-split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: center; }
.mk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mk-table th { text-align: right; font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; padding: 8px; border-bottom: 1px solid var(--border); }
.mk-table th:first-child, .mk-table td:first-child { text-align: left; }
.mk-table td { text-align: right; padding: 10px 8px; border-bottom: 1px solid #191919; }
.stackbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-top: 14px; background: #1c1c1c; }
.stackbar i { display: block; height: 100%; }
@media (max-width: 1000px) { .mk-row, .mk-split { grid-template-columns: 1fr; } .mk-big { font-size: 32px; } }

/* ---- Bio / Telegram */
.log-table td { padding-top: 6px; padding-bottom: 6px; }
.log-in { height: 30px; width: 90px; font-size: 13px; }

/* ---- Tipos de contenido */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.ch-opt { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14px; }
.ch-opt:hover { border-color: var(--border-2); }

/* ---- Equipo */
.team-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.team-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.team-stats div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.team-stats span { color: var(--muted); }
.team-stats b { font-weight: 600; }

/* ---- Reportes */
.rep-form .sec-label { margin-top: 6px; }
.rep-item summary { align-items: flex-start; }
@media (max-width: 640px) { .mk-table { min-width: 440px; } .mk-big { font-size: 28px; } .mk-v { font-size: 22px; } }

/* desplegables dentro de la tabla de leads */
.cell-sel{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;border-radius:8px;color:inherit;font:inherit;font-size:13px;padding:4px 8px;max-width:160px;cursor:pointer}
.cell-sel:hover,.cell-sel:focus{border-color:var(--border-2);background:var(--panel-2);outline:none}
.cell-sel option{color:#111;background:#fff}
/* reporte del setter por canal */
.rep-ch-table{width:100%;border-collapse:collapse}
.rep-ch-table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);text-align:left;padding:6px 6px;font-weight:600}
.rep-ch-table td{padding:5px 6px;border-top:1px solid var(--border);white-space:nowrap}
.rep-ch-table .input{width:90px;padding:6px 8px}
/* embudos por canal */
.cf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.cf-card{padding:14px}
.cf-row{display:grid;grid-template-columns:64px 1fr 40px 34px;align-items:center;gap:8px;margin:6px 0}
.cf-bar{height:8px;border-radius:6px;background:var(--panel-2);overflow:hidden}
.cf-bar i{display:block;height:100%;border-radius:6px}
