/* La mesa (inicio), las decisiones, el modo foco y el alta de una empresa. */

.mesa { flex: 1 1 0; min-width: 0; overflow-y: auto; display: flex; justify-content: center; padding: 16px 32px 96px 16px; }
.mesa-col { flex: 1; min-width: 0; max-width: 860px; display: flex; flex-direction: column; gap: 20px; }
.fecha { color: var(--muted); font-size: var(--t-ui); }
.resumen { margin-top: -8px; font-family: var(--f-serif); font-size: 22px; line-height: 1.45; text-wrap: pretty; max-width: 760px; }
.resumen:focus { outline: 0; }
.progresos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px 32px; }

/* —— Tareas: cada movimiento, emparejado con su propuesta ———————————————————— */
.tareas { display: flex; flex-direction: column; gap: 8px; }
.tarea { background: var(--surface); border-radius: var(--r-block); padding: 14px 16px 14px 20px; display: grid; grid-template-columns: minmax(0, 1.15fr) 18px minmax(0, 1fr) 112px auto; column-gap: 16px; align-items: center; }
.tarea-abre { grid-column: 1 / span 3; display: grid; grid-template-columns: subgrid; align-items: center; text-decoration: none; color: inherit; border-radius: var(--r-field); }
.tarea-abre:hover { color: inherit; }
.tarea-abre:hover .m-q { text-decoration: underline; text-underline-offset: 3px; }
.mov, .prop { display: flex; flex-direction: column; min-width: 0; }
.enl { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.enl:hover { color: var(--ink3); }
.prop-fac { display: flex; flex-direction: column; gap: 8px; }
.opciones-caja { display: flex; flex-direction: column; gap: 14px; }
.m-q { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-t { color: var(--muted); font-size: var(--t-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.par { color: var(--muted); }
.p-q { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarea > .imp { text-align: right; }
.tarea-fin { display: flex; align-items: center; gap: 8px; justify-self: end; }
.tarea-fac .par { width: 18px; height: 18px; }
.espera { margin-top: 12px; }
.tarea-espera { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.t-det { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px 32px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.t-lado { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.t-acc { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* —— Decisiones: una pregunta con sus opciones dentro ———————————————————————— */
.decision { background: var(--surface); border-radius: var(--r-block); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.d-cab { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.d-cab .m-q { white-space: normal; }
.d-cab .imp { margin-left: auto; }
.d-preg { font-family: var(--f-serif); font-size: 18px; line-height: 1.45; }
.opciones { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.opcion { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-field); background: var(--soft); cursor: pointer; }
.opcion:hover { background: var(--row-hover); }
.opcion input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.opcion:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.opcion span { flex: 1; }
.pista { font-size: var(--t-ui); color: var(--muted); }
.borrador { background: var(--soft); border-radius: var(--r-field); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.borrador q { quotes: '«' '»'; font-family: var(--f-serif); font-size: 15px; }
.desglose { width: 100%; max-width: 420px; }
.desglose td { padding: 6px 0; }
.desglose .n { text-align: right; white-space: nowrap; }
.desglose tr:last-child td { border-top: 1px solid var(--line); font-weight: 600; }

/* —— Carril derecho ——————————————————————————————————————— */
.carril { flex: none; width: 300px; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 28px; padding: 16px 24px 112px 4px; }
.c-tit { margin: 0 0 8px; font-size: var(--t-meta); font-weight: 400; color: var(--muted); }
.ctas li { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ctas .total { border-bottom: 0; font-weight: 700; }
.c-s { margin-left: auto; font-weight: 600; white-space: nowrap; }
.total .c-s { font-weight: 700; }
.avisos { display: flex; flex-direction: column; gap: 12px; }
.faltas { display: flex; flex-direction: column; gap: 8px; }
.faltas li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink2); font-size: var(--t-ui); }
.faltas .ic { color: var(--muted); margin-top: 2px; }
.faltas .hecho .ic { color: var(--ok); }
.con-chat .carril { display: none; }

/* —— Modo foco: lo pendiente, de uno en uno ————————————————————————————— */
.foco { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
.foco-top { flex: none; display: flex; align-items: center; gap: 16px; padding: 12px 24px; }
.foco-cuenta { margin: 0 auto; display: flex; align-items: center; gap: 12px; min-width: min(360px, 60vw); }
.foco-cuenta .medida-caja { flex: 1; }
.foco-n { font-weight: 600; white-space: nowrap; }
.foco-cuerpo { flex: 1; min-height: 0; overflow-y: auto; display: flex; justify-content: center; padding: 16px 24px 24px; }
.foco-ficha { width: 100%; max-width: 1040px; align-self: flex-start; background: var(--surface); border-radius: var(--r-card); padding: 32px 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 28px 48px; font-size: 15px; }
.foco-lado { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.foco-rot { font-size: var(--t-ui); color: var(--muted); }
.foco-q { font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.foco-imp { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.foco-imp.entra { color: var(--ok); }
.foco-ficha .banco { font-size: 13.4px; }
.foco-ficha .decision { padding: 0; background: transparent; }
.foco-pie { flex: none; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 24px 20px; }
.foco-despues { color: var(--muted); font-size: var(--t-ui); }
.foco-teclas { margin-left: auto; color: var(--muted); font-size: var(--t-ui); display: flex; gap: 14px; flex-wrap: wrap; }
.al-dia { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: 48px 0; }

/* —— Alta de una empresa ————————————————————————————————————— */
.pasos { display: flex; flex-direction: column; gap: 8px; }
.paso { background: var(--surface); border-radius: var(--r-block); padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.paso-n { width: 28px; height: 28px; flex: none; border-radius: var(--r-pill); background: var(--row-hover); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: var(--t-ui); }
.paso.hecho .paso-n { background: var(--ok-soft); color: var(--ok); }
.paso-x { flex: 1; min-width: 0; }
.paso-x p:last-child { color: var(--muted); font-size: var(--t-ui); }

@media (max-width: 900px) {
  .mesa { overflow: visible; padding: 8px 16px 16px; }
  .resumen { font-size: 19px; }
  .tarea { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 14px 16px; }
  .tarea-abre { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: 1 1 100%; min-width: 0; }
  .par { display: none; }
  .tarea > .imp { margin-right: auto; text-align: left; }
  .t-det { flex: 1 1 100%; margin-top: 6px; }
  .carril { width: 100%; overflow: visible; padding: 8px 16px 112px; }
  .con-chat .carril { display: flex; }
  .foco { height: auto; min-height: 100dvh; }
  .foco-ficha { padding: 20px; }
  .foco-teclas { display: none; }
}
