/* MOLDE — Motor generador
   La cáscara del estudio va en oscuro; la plataforma generada se previsualiza
   en claro, con el color de marca del cliente. El contraste es intencional:
   se ve como una fundición sacando una pieza. */

:root {
  --ink: #0A0E1A;
  --panel: #111729;
  --panel-2: #161E33;
  --line: #232C45;
  --line-soft: #1B2338;
  --text: #E8ECF5;
  --muted: #8B97B5;
  --dim: #5D6889;
  --accent: #FF6B35;
  --accent-soft: rgba(255, 107, 53, .14);
  --amber: #FFB800;
  --green: #35D07F;
  --red: #FF5A52;
  --radius: 14px;
  --brand: #FF6B35;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .35; }
svg { width: 1em; height: 1em; display: block; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2A3452; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Barra superior ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  background: rgba(10, 14, 26, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.logo { display: flex; align-items: center; gap: 9px; flex: none; }
.logo-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #0A0E1A; font-size: 17px;
}
.logo-txt { font-weight: 700; letter-spacing: 3px; font-size: 15px; }

.logo-txt em { font-style: normal; color: var(--accent); margin-left: 1px; }

.steps { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; }
.steps li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  font-size: 13px; color: var(--dim); white-space: nowrap;
}
.steps li b {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--line); color: var(--muted);
  font-size: 11px; font-weight: 600;
}
.steps li b svg { width: 12px; height: 12px; stroke-width: 3; }
.steps li.on { color: var(--text); background: var(--panel-2); }
.steps li.on b { background: var(--accent); color: #0A0E1A; }
.steps li.done { color: var(--muted); cursor: pointer; }
.steps li.done b { background: var(--green); color: #0A0E1A; }
.steps li.done:hover { color: var(--text); }

/* ---------- Botones ---------- */

.primary, .ghost {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  transition: transform .12s, background .15s, border-color .15s;
}
.primary { background: var(--accent); color: #12060B; }
.primary:hover:not(:disabled) { transform: translateY(-1px); background: #FF7F4F; }
.primary svg { width: 16px; height: 16px; }
.ghost { border: 1px solid var(--line); color: var(--muted); }
.ghost:hover { border-color: var(--dim); color: var(--text); }
.sm { padding: 8px 14px; font-size: 13px; }
.full { width: 100%; justify-content: center; }

/* ---------- Contenedor ---------- */

.wrap { max-width: 900px; margin: 0 auto; padding: 44px 24px 120px; }
.pane.wide { max-width: none; }
.wrap:has(.wide) { max-width: 1180px; }

.pane-head { margin-bottom: 34px; }
.pane-head.row { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.pane-head h1 { margin: 0 0 10px; font-size: 32px; font-weight: 600; letter-spacing: -.6px; }
.pane-head p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 640px; }
.pane-head b { color: var(--text); font-weight: 600; }
.head-actions { display: flex; gap: 10px; margin-left: auto; }

.pane-foot {
  display: flex; align-items: center; gap: 14px;
  margin-top: 42px; padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.pane-foot .primary { margin-left: auto; }
.foot-note { color: var(--dim); font-size: 13px; }

.sec-title { margin: 40px 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.sec-title.muted { color: var(--dim); }

/* ---------- Campos ---------- */

.field { margin-bottom: 32px; }
.field > label {
  display: block; margin-bottom: 12px;
  font-size: 14px; font-weight: 500;
}
.field > label em { color: var(--dim); font-style: normal; font-weight: 400; font-size: 13px; margin-left: 8px; }

textarea, input[type=text] {
  width: 100%; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; resize: vertical; line-height: 1.6;
}
textarea:focus, input[type=text]:focus { outline: none; border-color: var(--accent); }
textarea::placeholder, input::placeholder { color: var(--dim); }

/* Sectores */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sector {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; transition: border-color .15s, background .15s;
}
.sector i { font-size: 22px; color: var(--dim); margin-bottom: 6px; }
.sector b { font-size: 14px; font-weight: 500; }
.sector small { font-size: 11.5px; color: var(--dim); }
.sector:hover { border-color: var(--dim); }
.sector.on { border-color: var(--accent); background: var(--accent-soft); }
.sector.on i { color: var(--accent); }

/* Chips de dolores */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 15px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
  transition: all .15s;
}
.chip i { font-size: 13px; color: var(--accent); }
.chip:hover { border-color: var(--dim); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

/* Segmented */
.segmented { display: inline-flex; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; gap: 3px; flex-wrap: wrap; }
.segmented button { padding: 9px 16px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.segmented button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.segmented.sm button { padding: 6px 13px; font-size: 12.5px; }

/* ---------- Paso 2 · Bloques ---------- */

.summary-bar {
  display: flex; align-items: center; gap: 34px; flex-wrap: wrap;
  padding: 18px 22px; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.summary-bar > div { display: flex; flex-direction: column; gap: 2px; }
.summary-bar span { font-size: 11.5px; color: var(--dim); letter-spacing: .4px; }
.summary-bar b { font-size: 16px; font-weight: 600; }
.summary-bar .grow { flex: 1; }
.summary-bar .saving { font-size: 12.5px; color: var(--dim); text-decoration: line-through; }

.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }

.bcard {
  display: flex; flex-direction: column;
  padding: 18px; text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
}
.bcard:hover { border-color: var(--dim); transform: translateY(-1px); }
.bcard.on { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--panel); }
.bcard.locked { cursor: default; }
.bcard.locked:hover { transform: none; }

.bcard header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.bcard header i { font-size: 19px; color: var(--dim); flex: none; margin-top: 2px; }
.bcard.on header i { color: var(--accent); }
.bcard header b { display: block; font-size: 15px; font-weight: 600; }
.bcard header small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.bcard .tick {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 12px; color: #12060B; margin-left: auto;
}
.bcard.on .tick { background: var(--accent); border-color: var(--accent); }
.bcard .tick svg { width: 12px; height: 12px; stroke-width: 3.2; }

.bcard .why { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.bcard .reasons { margin: 0 0 12px; padding: 0 0 0 14px; list-style: none; }
.bcard .reasons li {
  position: relative; font-size: 12px; color: var(--dim);
  line-height: 1.55; margin-bottom: 3px;
}
.bcard .reasons li::before {
  content: ''; position: absolute; left: -13px; top: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.bcard footer {
  display: flex; align-items: center; gap: 10px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--dim);
}
.bcard .proven { display: inline-flex; align-items: center; gap: 5px; }
.bcard .proven svg { width: 11px; height: 11px; color: var(--green); stroke-width: 3; }
.bcard .wk { margin-left: auto; }

/* ---------- Paso 3 ---------- */

.swatches { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 9px; background: var(--c); border: 2px solid transparent; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--ink) inset; }
input[type=color] {
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--line);
  border-radius: 9px; background: var(--panel); cursor: pointer;
}

.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.role {
  position: relative; text-align: left; padding: 16px 16px 16px 44px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.role .tick {
  position: absolute; left: 14px; top: 16px;
  width: 19px; height: 19px; border-radius: 6px;
  border: 1px solid var(--line); display: grid; place-items: center; color: #12060B;
}
.role .tick svg { width: 11px; height: 11px; stroke-width: 3.2; }
.role.on { border-color: var(--accent); background: var(--accent-soft); }
.role.on .tick { background: var(--accent); border-color: var(--accent); }
.role b { display: block; font-size: 14px; font-weight: 600; }
.role small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }

/* ---------- Paso 4 · Preview ---------- */

.preview-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13px; color: var(--muted);
}
.preview-bar .grow { flex: 1; }
.preview-bar .hint { font-size: 12px; color: var(--dim); }

.frame {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  background: #F4F6FA;
}
.empty-shell { padding: 60px; text-align: center; color: #7A85A3; font-size: 14px; }

/* --- Plataforma generada (tema claro) --- */

.shell { display: flex; min-height: 620px; color: #1E2742; }

.side {
  width: 218px; flex: none;
  background: #141A2B; color: #fff;
  display: flex; flex-direction: column; padding: 18px 12px;
}
.side-logo {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 10px 20px; font-weight: 600; font-size: 15px;
}
.side-logo .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); flex: none; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 8px;
  font-size: 13px; color: #9AA5C4; text-align: left; width: 100%;
}
.nav-item i { font-size: 16px; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.on { background: var(--brand); color: #fff; }
.side-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08);
}
.side-foot .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--brand); display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.side-foot b { display: block; font-size: 12.5px; }
.side-foot small { display: block; font-size: 11px; color: #7A85A3; }

.main { flex: 1; background: #F4F6FA; min-width: 0; }
.mhead {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px; background: #fff; border-bottom: 1px solid #E3E6ED;
}
.mhead h2 { margin: 0; font-size: 17px; font-weight: 600; }
.mhead-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.searchbox {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 8px; background: #F4F6FA;
  font-size: 12.5px; color: #8A93AC;
}
.searchbox svg { width: 14px; height: 14px; }
.bellbox { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #F4F6FA; color: #8A93AC; font-size: 15px; }

.mbody { padding: 22px 24px 30px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 15px 16px; }
.kpi span { display: block; font-size: 11.5px; color: #8A93AC; margin-bottom: 6px; }
.kpi b { display: block; font-size: 23px; font-weight: 600; letter-spacing: -.5px; }
.kpi em { display: block; font-style: normal; font-size: 11.5px; margin-top: 4px; }
.kpi em.up { color: #2E9E5B; }
.kpi em.down { color: #C4453C; }

/* Paneles */
.panels { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.panel { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 18px; }
.panel.full { margin-top: 12px; }
.panel h3 { margin: 0 0 16px; font-size: 13px; font-weight: 600; color: #3E4A6B; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; }
.bars.tall { height: 180px; }
.bars span { flex: 1; background: var(--brand); opacity: .28; border-radius: 4px 4px 0 0; }
.bars span.hi { opacity: .85; }
.bars span:last-child { opacity: .85; }
.axis { display: flex; gap: 6px; margin-top: 8px; }
.axis span { flex: 1; text-align: center; font-size: 10.5px; color: #A2ABC2; }

.minilist { list-style: none; margin: 0; padding: 0; }
.minilist li {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 0; border-bottom: 1px solid #F0F2F7;
  font-size: 13px; color: #3E4A6B;
}
.minilist li:last-child { border: 0; }
.minilist b { font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.dot.green { background: #2E9E5B; }
.dot.amber { background: #D9962B; }
.dot.red { background: #C4453C; }

/* Tabla */
.tbl-wrap { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; overflow: hidden; }
.tbl-tools { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #F0F2F7; }
.tbl-tools .grow { flex: 1; }
.pill { padding: 5px 12px; border-radius: 999px; font-size: 12px; color: #8A93AC; background: #F4F6FA; }
.pill.on { background: var(--brand); color: #fff; }
.btn-mini { padding: 6px 13px; border-radius: 7px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 500; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 11px 16px; background: #FAFBFD;
  font-size: 11px; font-weight: 600; color: #8A93AC;
  letter-spacing: .5px; text-transform: uppercase;
  border-bottom: 1px solid #EDEFF4;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid #F3F5F9; color: #3E4A6B; }
.tbl tr:last-child td { border: 0; }
.tbl tr:hover td { background: #FAFBFD; }

.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.tag.green { background: #EAF6EF; color: #2E9E5B; }
.tag.amber { background: #FBF3E3; color: #B37B1D; }
.tag.red   { background: #FAEAE9; color: #C4453C; }

/* Split genérico */
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; align-items: start; }
.sidelist { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 16px; }
.sidelist h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #3E4A6B; }
.stop {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 8px; border-radius: 8px; border-bottom: 1px solid #F3F5F9;
}
.stop:last-of-type { border: 0; }
.stop.on { background: #F4F6FA; }
.stop .num {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.stop div { flex: 1; min-width: 0; }
.stop b { display: block; font-size: 13px; font-weight: 500; }
.stop small { display: block; font-size: 11.5px; color: #8A93AC; margin-top: 1px; }
.note { margin: 12px 0 0; font-size: 11.5px; color: #8A93AC; line-height: 1.6; }

/* POS */
.pos { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; align-items: start; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pos-item {
  padding: 20px 12px; background: #fff; border: 1px solid #E3E6ED;
  border-radius: 12px; text-align: center;
}
.pos-item b { display: block; font-size: 13px; font-weight: 500; }
.pos-item span { display: block; font-size: 15px; font-weight: 600; color: var(--brand); margin-top: 6px; }
.pos-ticket { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 18px; }
.pos-ticket h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #3E4A6B; }
.pos-ticket ul { list-style: none; margin: 0 0 14px; padding: 0; }
.pos-ticket li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F3F5F9; font-size: 13px; }
.pos-total { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; }
.pos-total b { font-size: 20px; font-weight: 600; }
.pos-pay { width: 100%; padding: 13px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; }

/* Tablero kanban */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: start; }
.board .col { background: #EEF1F6; border-radius: 12px; padding: 12px; }
.board h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 11px; font-size: 12px; font-weight: 600; color: #5C6785; }
.board h3 span { padding: 1px 7px; border-radius: 999px; background: #fff; font-size: 11px; }
.tkt { background: #fff; border-radius: 9px; padding: 12px; margin-bottom: 8px; border: 1px solid #E3E6ED; }
.tkt b { display: block; font-size: 13px; font-weight: 500; }
.tkt small { display: block; font-size: 11.5px; color: #8A93AC; margin-top: 2px; }
.tkt footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tkt .who { font-size: 11px; color: #8A93AC; }
.tkt .tag { margin-left: auto; }

/* Mapa */
.mapbox {
  position: relative; min-height: 380px; border-radius: 12px;
  border: 1px solid #E3E6ED; overflow: hidden;
  background:
    linear-gradient(#E7EBF2 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, #E7EBF2 1px, transparent 1px) 0 0 / 44px 100%,
    #F7F9FC;
}
.mk { position: absolute; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.mk.k0 { background: #2E9E5B; }
.mk.k1 { background: #D9962B; }
.mk.k2 { background: #C4453C; }
.map-legend {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; background: #fff;
  font-size: 11.5px; color: #5C6785; box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
.map-legend .dot { margin-left: 6px; }
.map-legend .dot:first-child { margin-left: 0; }

/* Checklist */
.checklist { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 18px; }
.checklist h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #3E4A6B; }
.chk {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid #F3F5F9; font-size: 13px; color: #3E4A6B;
}
.chk:last-child { border: 0; }
.chk > span {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  border: 1.5px solid #D5DAE6; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.chk > span svg { width: 12px; height: 12px; stroke-width: 3.2; }
.chk.ok > span { background: #2E9E5B; border-color: #2E9E5B; color: #fff; }
.chk.bad > span { background: #C4453C; border-color: #C4453C; color: #fff; }
.nc { padding: 12px 0; border-bottom: 1px solid #F3F5F9; }
.nc b { display: block; font-size: 13px; font-weight: 500; margin: 6px 0 2px; }
.nc small { font-size: 11.5px; color: #8A93AC; }
.evidence { margin-top: 14px; }
.evidence span { display: block; font-size: 11.5px; color: #8A93AC; margin-bottom: 8px; }
.evidence { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph { width: 52px; height: 52px; border-radius: 8px; background: linear-gradient(135deg, #E7EBF2, #D9DEEA); }

/* Trazabilidad */
.trace { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.trace-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.trace-head b { font-size: 18px; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 12px; width: 2px; background: #E7EBF2; }
.timeline li { position: relative; display: flex; align-items: center; gap: 16px; padding: 10px 0 10px 32px; }
.timeline .mark {
  position: absolute; left: 6px; top: 16px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand); border: 2.5px solid #fff; box-shadow: 0 0 0 2px #E7EBF2;
}
.timeline b { display: block; font-size: 13px; font-weight: 600; }
.timeline small { display: block; font-size: 12px; color: #8A93AC; margin-top: 1px; }
.timeline em { margin-left: auto; font-style: normal; font-size: 12px; color: #8A93AC; }

/* Calendario */
.cal { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 14px; overflow-x: auto; }
.cal-head, .cal-row { display: grid; grid-template-columns: 56px repeat(5, 1fr); gap: 6px; }
.cal-head { margin-bottom: 8px; }
.cal-head span { font-size: 11.5px; font-weight: 600; color: #8A93AC; text-align: center; }
.cal-row { margin-bottom: 6px; }
.hr { font-size: 11px; color: #A2ABC2; display: grid; place-items: center; }
.slot { min-height: 46px; border-radius: 8px; background: #F7F9FC; border: 1px dashed #E7EBF2; }
.slot.busy {
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, #fff);
  padding: 7px 9px;
}
.slot.busy b { display: block; font-size: 11.5px; font-weight: 600; color: #2E3852; }
.slot.busy small { display: block; font-size: 10.5px; color: #7A85A3; }

/* Documentos */
.docbox { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 18px; }
.docbox h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #3E4A6B; }
.docgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.doc { padding: 16px 12px; border: 1px solid #E7EBF2; border-radius: 10px; text-align: center; }
.doc i { font-size: 22px; color: var(--brand); display: grid; place-items: center; margin-bottom: 9px; }
.doc b { display: block; font-size: 12.5px; font-weight: 500; }
.doc small { display: block; font-size: 11px; color: #8A93AC; margin-top: 3px; }

/* Cotizador */
.quotebox { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 20px; }
.quotebox h3 { margin: 0 0 16px; font-size: 13px; font-weight: 600; color: #3E4A6B; }
.qrow { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid #F3F5F9; font-size: 13px; }
.qrow span { color: #8A93AC; }
.qrow b { font-weight: 500; }
.qrow.warn b { color: #B37B1D; }
.qrow.total { border-bottom: 0; padding-top: 16px; font-size: 15px; }
.qrow.total b { font-size: 21px; font-weight: 600; }
.qmargin { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid #F3F5F9; font-size: 12.5px; color: #8A93AC; }
.mbar { flex: 1; height: 7px; border-radius: 4px; background: #EEF1F6; overflow: hidden; }
.mbar i { display: block; height: 100%; background: #2E9E5B; }
.qmargin b { color: #2E9E5B; }

/* Portal */
.portal-hero { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.portal-hero b { display: block; font-size: 18px; font-weight: 600; }
.portal-hero small { display: block; font-size: 12.5px; color: #8A93AC; margin-top: 3px; }

/* Campo */
.fieldview { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.phone {
  border-radius: 24px; overflow: hidden; background: #fff;
  border: 8px solid #141A2B; box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}
.phone-top { background: #141A2B; padding: 0 10px 10px; }
.offline {
  display: block; text-align: center; padding: 6px;
  border-radius: 7px; background: rgba(255, 184, 0, .16);
  color: #FFB800; font-size: 11px;
}
.phone-body { padding: 16px; }
.phone-body h4 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.fld { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F3F5F9; font-size: 12.5px; }
.fld span { color: #8A93AC; }
.photos { display: flex; gap: 8px; margin: 14px 0; }
.photos .ph { width: 48px; height: 48px; }
.photos .plus {
  display: grid; place-items: center; color: #8A93AC;
  background: #F7F9FC; border: 1px dashed #D5DAE6; font-size: 18px;
}
.phone-cta { width: 100%; padding: 12px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; }

/* Alertas */
.feed { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 6px 18px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #F3F5F9; }
.alert:last-child { border: 0; }
.alert div { flex: 1; min-width: 0; }
.alert b { display: block; font-size: 13px; font-weight: 500; }
.alert small { display: block; font-size: 11.5px; color: #8A93AC; margin-top: 2px; }
.alert em { font-style: normal; font-size: 11.5px; color: #A2ABC2; white-space: nowrap; }

/* Reportes */
.repgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.rep { background: #fff; border: 1px solid #E3E6ED; border-radius: 12px; padding: 18px; }
.rep i { font-size: 20px; color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.rep b { display: block; font-size: 13.5px; font-weight: 600; }
.rep small { display: block; font-size: 11.5px; color: #8A93AC; margin: 3px 0 12px; }

/* ---------- Panel de cotización (estudio) ---------- */

.quote-panel {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px;
  margin-top: 22px;
}
.qp-main, .qp-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.qp-main h3 { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.qp-blocks { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.qb {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--panel-2); font-size: 12.5px; color: var(--muted);
}
.qb i { font-size: 13px; color: var(--accent); }
.qp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.qp-grid span { display: block; font-size: 11.5px; color: var(--dim); margin-bottom: 4px; }
.qp-grid b { font-size: 19px; font-weight: 600; }
.qp-grid .strike { color: var(--dim); text-decoration: line-through; font-weight: 400; }
.qp-note { margin: 18px 0 0; font-size: 12px; color: var(--dim); line-height: 1.6; }

.qp-side { display: flex; flex-direction: column; gap: 12px; }
.qp-kind { font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.qp-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.qp-price small { font-size: 12.5px; color: var(--muted); }
.qp-price b { font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.qp-side ul { list-style: none; margin: 6px 0 auto; padding: 14px 0 0; border-top: 1px solid var(--line-soft); }
.qp-side li { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; color: var(--muted); }
.qp-side li svg { width: 13px; height: 13px; color: var(--green); stroke-width: 3; flex: none; }

/* ---------- Captura del prospecto ---------- */

.lead-panel {
  margin-top: 14px; padding: 28px;
  background: linear-gradient(165deg, var(--accent-soft), transparent 58%), var(--panel);
  border: 1px solid rgba(255, 107, 53, .36); border-radius: var(--radius);
}
.hp { position: absolute; left: -9999px; opacity: 0; }

.lead-head { margin-bottom: 20px; }
.lead-head h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.lead-head p { margin: 0; max-width: 620px; font-size: 14px; line-height: 1.7; color: var(--muted); }

.lead-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lead-fields label { display: flex; flex-direction: column; gap: 6px; }
.lead-fields span { font-size: 12px; color: var(--muted); }
.lead-fields input {
  padding: 12px 14px; border-radius: 10px;
  background: var(--ink); border: 1px solid var(--line);
}
.lead-fields input:focus { outline: none; border-color: var(--accent); }
.lead-fields input::placeholder { color: var(--dim); }

.lead-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.lead-foot small { flex: 1; min-width: 240px; font-size: 11.5px; line-height: 1.6; color: var(--dim); }
.lead-foot a { color: var(--muted); text-decoration: underline; }
.lead-foot a:hover { color: var(--text); }

.lead-error {
  margin: 16px 0 0; padding: 11px 14px; border-radius: 9px;
  background: rgba(255, 90, 82, .12); border: 1px solid rgba(255, 90, 82, .3);
  font-size: 13px; color: #FF8B85;
}
.lead-fallback { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.lead-fallback a { color: var(--accent); text-decoration: underline; }

.lead-panel.done { display: flex; align-items: center; gap: 16px; }
.lead-panel.done > i {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #08210F; font-size: 20px;
}
.lead-panel.done > i svg { stroke-width: 3.2; }
.lead-panel.done b { display: block; font-size: 17px; font-weight: 600; }
.lead-panel.done small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Responsivo ---------- */

@media (max-width: 1000px) {
  .panels, .split, .pos, .fieldview, .quote-panel { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, 1fr); }
  .pos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  /* flex:0 0 100% (no width) para que sí fuerce el salto de línea */
  .steps { order: 3; flex: 0 0 100%; overflow-x: auto; padding-bottom: 2px; }
  .ghost.sm { margin-left: auto; }
  .steps li { font-size: 12px; padding: 5px 10px 5px 5px; }
  .wrap { padding: 26px 16px 80px; }
  .pane-head h1 { font-size: 25px; }
  .frame { border-radius: 12px; }
  .shell { flex-direction: column; min-height: 0; }
  .side { width: 100%; padding: 12px; }
  .side nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .nav-item { white-space: nowrap; width: auto; }
  .side-foot { display: none; }
  .mbody { padding: 16px; }
  .board { grid-template-columns: 1fr; }
  .repgrid, .docgrid { grid-template-columns: 1fr 1fr; }
  .lead-panel { padding: 20px; }
  .lead-fields { grid-template-columns: 1fr; }
  .cal { font-size: 11px; }
  .head-actions { margin-left: 0; }
}
