@font-face { font-family: "Oswald"; font-weight: 400; font-display: swap; src: url("/fonts/oswald-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 500; font-display: swap; src: url("/fonts/oswald-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 600; font-display: swap; src: url("/fonts/oswald-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 700; font-display: swap; src: url("/fonts/oswald-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/inter-latin-700-normal.woff2") format("woff2"); }
/* Identidad Ardek (alineada con ardek.com.co): naranja #f15a24, gris #efefef, negro #111111; titulos en Oswald */
:root {
  --bg: #f3f2f0; --panel: #ffffff; --text: #111111; --muted: #5d5f64; --line: #e3e1dd; --r: 18px;
  --brand: #f15a24; --brand-ink: #111111; --link: #c74616;
  --head: rgba(255,255,255,.92); --head-ink: #111111;
  --ok: #1e8e4f; --warn: #946000; --bad: #c0392b; --pause: #6b7280;
  --ok-bg: #e4f4ea; --warn-bg: #fbf0dc; --bad-bg: #fbe5e2; --pause-bg: #eceef1;
  --bar: #e3e1dd; --bar-fill: #f15a24; --today: #111111;
  --display: "Oswald", Impact, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616; --panel: #1f1f1f; --text: #efefef; --muted: #a8a8a8; --line: #333333;
    --brand: #f15a24; --brand-ink: #111111; --link: #ff8a5c;
    --head: rgba(11,11,11,.92); --head-ink: #efefef;
    --ok: #55c487; --warn: #e0b04f; --bad: #ef7b6e; --pause: #9aa6b5;
    --ok-bg: #173325; --warn-bg: #3a2f16; --bad-bg: #3b1d19; --pause-bg: #2a2a2a;
    --bar: #3a3a3a; --today: #efefef;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Inter", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, select, input, textarea { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: border-color .25s, background .25s, box-shadow .25s; }
button:hover { border-color: var(--brand); }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-family: var(--display); font-weight: 600; letter-spacing: .3px; }
button.primary:hover { background: #ff7340; border-color: #ff7340; box-shadow: 0 8px 20px #f15a2444; }
button.danger { color: var(--bad); }
button.small { padding: 3px 8px; font-size: 13px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, th:focus-visible, tr:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--panel); width: 100%; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
label > input, label > select { margin-top: 4px; color: var(--text); }
a { color: var(--link); }
h1, h2, h3, .card .n, nav.main a, .tabs a, th { font-family: var(--display); }
h2, h3 { line-height: 1.1; }

/* Barra superior y navegación */
header.top { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 20px; background: var(--head); color: var(--head-ink); border-bottom: 1px solid var(--line); border-top: 3px solid; border-image: linear-gradient(90deg, #f15a24, #ff8a4c) 1; backdrop-filter: saturate(1.4) blur(14px); position: sticky; top: 0; z-index: 5; }
header.top .brand { margin: 0; display: flex; align-items: center; }
header.top .brand img { height: 40px; width: auto; display: block; }
nav.main { display: flex; gap: 6px; flex-wrap: wrap; }
nav.main a { position: relative; text-decoration: none; color: var(--head-ink); padding: 6px 2px; margin: 0 10px; font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
nav.main a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.22,.8,.24,1); }
nav.main a:hover::after, nav.main a[aria-current="page"]::after { transform: scaleX(1); }
nav.main a[aria-current="page"] { color: var(--link); }
.userbox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.userbox .who { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-bottom: 2px solid transparent; font-weight: 600; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 2px #1111110a; padding: 12px 14px; }
.card .n { font-size: 26px; font-weight: 650; }
.card .l { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { max-width: 320px; }
.toolbar select { max-width: 200px; }
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
th.sortable { cursor: pointer; user-select: none; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-atencion { background: var(--warn-bg); color: var(--warn); }
.b-critico { background: var(--bad-bg); color: var(--bad); }
.b-pausado, .b-cerrado { background: var(--pause-bg); color: var(--pause); }
.meter { position: relative; width: 120px; height: 10px; border-radius: 6px; background: var(--bar); display: inline-block; vertical-align: middle; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--bar-fill); }
.meter > b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--today); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.mb { margin-bottom: 12px; }
h2 { margin: 6px 0 4px; font-size: 22px; }
h3 { margin: 22px 0 8px; font-size: 16px; }

.gantt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.gantt svg { display: block; }
.gantt text { fill: var(--text); font-size: 12px; }
.gantt .axis { fill: var(--muted); font-size: 11px; }
.gantt .grid { stroke: var(--line); stroke-width: 1; }
.gantt .track { fill: var(--bar); }
.gantt .done { fill: var(--bar-fill); }
.gantt .todayline { stroke: var(--today); stroke-width: 2; stroke-dasharray: 4 3; }
.gantt text.todaytxt { fill: var(--today); font-size: 11px; }
.gantt .ms { fill: var(--text); }

dialog { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); padding: 18px 20px; width: min(480px, 94vw); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
dialog h3 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; z-index: 20; max-width: 90vw; }
.printonly { display: none; }

/* Acceso */
.authwrap { min-height: 70vh; display: grid; place-items: center; }
.authcard { width: min(400px, 94vw); padding: 24px; }
.authcard h2 { margin-top: 0; }
.err { color: var(--bad); min-height: 1.4em; margin: 4px 0 10px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; margin: -4px 0 10px; }

/* Ofertas y secciones en construcción */
.bigbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 8px; }
.bigbtn { display: block; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: 0 1px 2px #1111110a; transition: transform .45s cubic-bezier(.22,.8,.24,1), border-color .45s, box-shadow .45s; }
.bigbtn:hover { transform: translateY(-4px); border-color: #f3c3b0; box-shadow: 0 14px 34px #1111111a; }
.bigbtn strong { display: block; font-family: var(--display); font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.bigbtn span { color: var(--muted); font-size: 14px; }
.soon { background: var(--panel); border: 1px dashed var(--line); border-radius: 14px; padding: 22px; max-width: 720px; }
.soon ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.linkbox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; margin: 8px 0; }

@media print {
  body { background: #fff; color: #000; }
  .noprint, header.top { display: none !important; }
  .printonly { display: block; }
  main { max-width: none; padding: 0; }
  .gantt, .tablewrap, .card { border-color: #bbb; }
}

/* Predimensionamiento */
.predim { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .predim { grid-template-columns: 1fr; } }

header.top button { background: transparent; color: var(--head-ink); border-color: var(--line); }
header.top button:hover { border-color: var(--brand); }
.card .n { font-weight: 600; }

/* Dashboards */
.dashgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin: 16px 0; align-items: stretch; }
@media (max-width: 520px) { .dashgrid { grid-template-columns: 1fr; } }
.chart h3 { margin: 0 0 2px; font-size: 18px; }
.chart .hint { margin: 0 0 12px; }
.card .n.tone-bad { color: var(--bad); }
.card .n.tone-warn { color: var(--warn); }
.card .n.tone-ok { color: var(--ok); }
.stack { display: flex; gap: 2px; height: 22px; margin: 6px 0 12px; }
.stack i { display: block; min-width: 4px; border-radius: 4px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hbars { display: grid; gap: 10px; }
.hrow { display: grid; grid-template-columns: minmax(80px, 30%) 1fr 128px; gap: 10px; align-items: center; font-size: 13px; }
.hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv { color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.track { position: relative; height: 14px; background: var(--bar); border-radius: 4px; }
.track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.track .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 1px; }
.colwrap { overflow-x: auto; }
.colchart { width: 100%; height: auto; min-width: 320px; display: block; }
.colchart .axis { stroke: var(--line); stroke-width: 1; }
.colchart text { fill: var(--muted); font-size: 11px; font-family: "Inter", Arial, sans-serif; }
.colchart text.val { fill: var(--text); font-weight: 600; }
details.tableview { margin-top: 12px; font-size: 13px; }
details.tableview summary { cursor: pointer; color: var(--muted); }
details.tableview .tablewrap { margin-top: 8px; }
.bigbtns.compact { margin: 0 0 14px; }
.bigbtns.compact .bigbtn { padding: 14px 18px; }
.bigbtns.compact .bigbtn strong { font-size: 18px; margin-bottom: 2px; }
.b-offer-borrador { background: var(--pause-bg); color: var(--pause); }
.b-offer-enviada, .b-offer-negociacion { background: #fde8de; color: #a53a0f; }
.b-offer-ganada { background: var(--ok-bg); color: var(--ok); }
.b-offer-perdida { background: var(--bad-bg); color: var(--bad); }
@media (prefers-color-scheme: dark) { .b-offer-enviada, .b-offer-negociacion { background: #3a2216; color: #ff8a5c; } }
td .row { flex-wrap: nowrap; }

/* Ofertar: oferta en elaboracion */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
.btnlink { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; background: var(--panel); font-weight: 500; }
.btnlink:hover { border-color: var(--brand); }
.btnlink.small { padding: 3px 10px; font-size: 13px; }
.offergrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; margin-top: 16px; }
.offergrid > div > .card { margin-bottom: 16px; }
@media (max-width: 1000px) { .offergrid { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 12px; display: grid; gap: 12px; }
@media (max-width: 1000px) { .sticky { position: static; } }
table.bom { min-width: 1020px; }
table.bom td { padding: 4px; vertical-align: middle; }
table.bom td:first-child input { min-width: 150px; }
table.bom input { padding: 5px 8px; min-width: 70px; }
table.bom input.num { width: 92px; text-align: right; }
table.bom td:nth-child(2) input { min-width: 220px; }
table.bom td.r, .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.srow { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.srow.tot { font-size: 17px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.srow.bad b { color: var(--bad); }
.warns { margin: 0; padding-left: 18px; font-size: 13px; color: var(--warn); }
.warns:empty::after { content: 'Sin alertas.'; color: var(--muted); margin-left: -18px; }
.checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; column-gap: 6px; font-size: 14px; }
.checks li small { grid-column: 2; }
.checks li.done .mk { color: var(--ok); font-weight: 700; }
.sr { position: absolute; left: -9999px; }
label.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
label.check input { width: auto; }
textarea { resize: vertical; }

/* Propuesta */
.proposal { background: #fff; color: #111; max-width: 820px; margin: 0 auto; padding: 36px 44px; border: 1px solid var(--line); border-radius: var(--r); }
.proposal h2.ptitle { font-family: var(--display); color: #c74616; margin: 18px 0 8px; }
.proposal h3.ph { font-family: var(--display); font-size: 17px; margin: 22px 0 6px; border-bottom: 2px solid #f15a24; padding-bottom: 3px; }
.phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.plogo { height: 38px; }
.pmeta { text-align: right; font-size: 13px; }
.wm { margin-top: 6px; color: #c0392b; border: 2px solid #c0392b; display: inline-block; padding: 1px 10px; font-weight: 700; letter-spacing: .1em; }
.ptable { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.ptable th { background: #f15a24; color: #fff; text-align: left; padding: 5px 8px; }
.ptable th.r { text-align: right; }
.ptable td { padding: 4px 8px; border-bottom: 1px solid #e3e1dd; }
.ptable.totals { width: 60%; margin-left: auto; }
.ptable.totals tr.tot td { font-weight: 700; border-top: 2px solid #111; }
.proposal .pre { white-space: pre-wrap; }
.pfoot { margin-top: 28px; padding-top: 8px; border-top: 1px solid #e3e1dd; font-size: 12px; color: #5d5f64; }
@media print { .proposal { border: 0; padding: 0; max-width: none; } .ptable th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } h3.ph { break-after: avoid; } .ptable { break-inside: avoid; } }

/* Registros / lecciones */
.records { display: grid; gap: 10px; }
.rec { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 10px 14px; background: var(--panel); }
.rec p { margin: 2px 0 8px; }
.rec small { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.rec-incidente { border-left-color: var(--bad); }
.rec-requisito { border-left-color: var(--warn); }
.rec-reunion, .rec-nota { border-left-color: var(--pause); }
.badge.b-rec { background: var(--pause-bg); color: var(--ink); }
.pre { white-space: pre-wrap; }

/* Finanzas y compras */
.pbar { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.pbar > i { display: block; height: 8px; border-radius: 5px; background: var(--bar-fill); max-width: 70px; flex: 0 0 auto; }
.pbar > b { font-weight: 600; font-variant-numeric: tabular-nums; font-size: .85rem; }
.b-st-borrador, .b-st-cancelada, .b-st-anulada, .b-st-rechazada { background: var(--pause-bg); color: var(--pause); }
.b-st-solicitada, .b-st-emitida, .b-st-aprobada, .b-st-en_compra, .b-st-parcial { background: var(--warn-bg, #fff4d6); color: var(--warn, #7a5200); }
.b-st-pagada, .b-st-recibida { background: var(--ok-bg, #e1f4e6); color: var(--ok, #1d6b34); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.card.bad .n { color: var(--bad, #b3261e); }

/* Contraseña con ojo */
.pwbox { position: relative; display: block; margin-top: 4px; }
.pwbox > input { margin-top: 0; padding-right: 44px; }
.pweye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; padding: 0; border: 0; background: transparent; border-radius: 10px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pweye:hover { color: var(--text); }
.pweye[aria-pressed="true"] { color: var(--link); }
.ptable.kv th { width: 38%; background: transparent; color: #111; font-weight: 600; text-align: left; border-bottom: 1px solid #e3e1dd; }

/* Inventario */
.picklist { max-height: 46vh; overflow: auto; margin: 10px 0; display: grid; gap: 6px; }
.pickrow { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 8px 12px; cursor: pointer; }
.pickrow:hover, .pickrow:focus-visible { border-color: var(--brand); }
label.inline { display: inline-flex; align-items: center; gap: 6px; }
label.inline input { width: auto; margin: 0; }
.signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.signs .line { border-top: 1px solid #111; margin-bottom: 4px; }
.ptable.kv tr.tot th,.ptable.kv tr.tot td{font-weight:700;border-top:2px solid #111}

/* Espacio de trabajo (Proyectos, Ofertas, Compras): menu a la izquierda y herramientas arriba */
.wsside, .wstools { display: none; }
.wscol { min-width: 0; }
body.has-ws .ws { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 62px); }
body.has-ws .wsside { display: block; background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 62px; align-self: start; height: calc(100vh - 62px); overflow-y: auto; }
body.has-ws .wstools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 62px; z-index: 4; }
body.has-ws main { max-width: none; }
.wsttl { font-size: 20px; margin: 0 8px 12px; }
.wssub { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 8px 6px; font-family: var(--display); }
.wsside nav { display: flex; flex-direction: column; gap: 2px; }
.wsside nav a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; border-left: 3px solid transparent; }
.wsside nav a:hover { background: var(--bg); }
.wsside nav a[aria-current="page"] { background: var(--bg); border-left-color: var(--brand); color: var(--link); font-weight: 600; }
/* Las pestanas de cada pantalla ya estan en el menu lateral. */
body.has-ws .tabs { display: none; }
@media (max-width: 800px) {
  body.has-ws .ws { display: block; }
  body.has-ws .wsside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  body.has-ws .wsttl, body.has-ws .wssub { display: none; }
  .wsside nav { flex-direction: row; overflow-x: auto; }
  .wsside nav a { white-space: nowrap; }
  body.has-ws .wstools { position: static; padding: 8px 12px; }
  .wstools .wsend { margin-left: 0; }
}
@media print { .wsside, .wstools { display: none !important; } body.has-ws .ws { display: block; } }
tr[hidden] { display: none; }
.center { text-align: center; margin: 14px 0 0; }
input.otp { font-size: 22px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }

.wscrumb { display: none; }
body.has-ws .wscrumb { display: flex; gap: 8px; align-items: center; padding: 10px 20px 0; font-size: 13px; color: var(--muted); }
.wscrumb a { color: var(--link); text-decoration: none; font-weight: 600; }
.wstools input[type=search] { flex: 1 1 220px; max-width: 340px; margin: 0 0 0 auto; }
.wsmenu { position: relative; }
.wsmenu summary { list-style: none; cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .03em; user-select: none; }
.wsmenu summary::-webkit-details-marker { display: none; }
.wsmenu summary::after { content: " ▾"; font-size: 11px; }
.wsmenu[open] summary, .wsmenu summary:hover { border-color: var(--brand); }
.wsmenu.pri summary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.wspop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px #1111111f; padding: 6px; z-index: 6; display: flex; flex-direction: column; }
.wspop a, .wspop button { display: block; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; color: var(--text); text-decoration: none; font: 500 14px/1.3 inherit; cursor: pointer; margin: 0; }
.wspop a:hover, .wspop button:hover { background: var(--bg); }
.wsrecent a { display: flex; flex-direction: column; gap: 1px; }
.wsrecent small { color: var(--muted); font-size: 12px; font-weight: 400; }
.wsside nav.wsrecent a { display: flex; flex-direction: column; gap: 1px; }

/* Oferta: espacio de trabajo con plantilla */
.offerws { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .offerws { grid-template-columns: 1fr; } }
.offerpanel > .card { margin-bottom: 16px; }
.offerdoc { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 6px; max-height: calc(100vh - 24px); overflow: auto; }
@media (max-width: 1100px) { .offerdoc { position: static; max-height: none; } }
.offerdoc .dochead { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.docsec { text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; display: grid; gap: 4px; }
.docsec.done { border-left-color: var(--ok); }
.docsec.on { background: var(--sel, #eef4ff); outline: 2px solid var(--brand); }
.docsec .docn { font-weight: 600; }
.docsec p, .docsec ul { margin: 0; font-size: 13px; }
.docsec ul { padding-left: 18px; }
.docsec .pre { white-space: pre-wrap; }

/* Flujo de trabajo (tablero) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.bcol { background: var(--card-alt, rgba(127,127,127,.06)); border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 8px; align-content: start; min-width: 240px; }
.bcol h3 { margin: 0; font-size: 15px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 6px; padding: 8px 10px; display: grid; gap: 4px; font-size: 13px; }
.fcard.h-atencion { border-left-color: var(--warn); }
.fcard.h-critico { border-left-color: var(--bad); }
.fcard.h-pausado, .fcard.h-cerrado { border-left-color: var(--pause, var(--line)); }
.fcard .ftitle { font-weight: 600; font-size: 14px; }
.fwho.none { color: var(--warn); font-weight: 600; }

/* Flujo de trabajo estilo tablero */
.mgroup { margin-bottom: 18px; }
.mghead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.mghead h3 { margin: 0; font-size: 17px; color: inherit; }
.mtable { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; }
.mtable th, .mtable td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.mtoggle { border: 0; background: transparent; cursor: pointer; font-size: 14px; padding: 2px 6px; color: inherit; }
.mcode { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted, #6b7280); }
.mpill, .mpillsel { color: #fff; border-radius: 4px; padding: 4px 10px; font-size: 12px; font-weight: 600; border: 0; min-width: 96px; text-align: center; }
.mpillsel option { color: #000; background: #fff; }
.mwho { max-width: 170px; }
.mtl { position: relative; min-width: 150px; height: 22px; background: var(--pause-bg, #eceef1); border-radius: 11px; overflow: hidden; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.mtl-fill { position: absolute; left: 0; top: 0; bottom: 0; opacity: .55; }
.mtl span { position: relative; color: var(--text, #111); }
.mprog { position: relative; min-width: 80px; height: 18px; background: var(--pause-bg, #eceef1); border-radius: 3px; overflow: hidden; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.mprog div { position: absolute; left: 0; top: 0; bottom: 0; background: #00c875; opacity: .6; }
.mprog span { position: relative; }
.msub td { background: var(--card-alt, rgba(127,127,127,.06)); font-size: 12px; }
.madd input { min-width: 240px; }

/* Panel de herramientas de oferta */
.tooltabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tooltabs button { flex: 1; padding: 6px 8px; font-size: 13px; border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 6px; cursor: pointer; }
.tooltabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.offerdoc h4 { margin: 10px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }
.bigtot { display: grid; gap: 2px; padding: 6px 0; } .bigtot b { font-size: 26px; }
.marginbar { position: relative; height: 10px; background: var(--pause-bg, #eceef1); border-radius: 5px; margin: 4px 0 8px; }
.marginbar div { height: 100%; background: var(--ok); border-radius: 5px; } .marginbar.low div { background: var(--bad); }
.marginbar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text, #111); }
.pv { border-top: 1px solid var(--line); padding-top: 4px; } .pv p, .pv ul { margin: 2px 0; font-size: 13px; } .pv ul { padding-left: 18px; }
.pvhead { display: grid; gap: 2px; }
.catbox { display: grid; gap: 8px; }
.offerdoc .pickrow { text-align: left; width: 100%; }
.warnbtn { border-color: var(--warn); }

/* Proyecto: pestañas, fases y estados de actividad */
.phasebar { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.phasebar button { padding: 6px 14px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.phasebar button.on { color: #fff; font-weight: 600; }
.fcard.st-hecha { border-left-color: #00c875; } .fcard.st-en_curso { border-left-color: #fdab3d; } .fcard.st-bloqueada { border-left-color: #e2445c; } .fcard.st-pendiente { border-left-color: #a8adb7; }
.gantt .done.st-hecha { fill: #00c875; } .gantt .done.st-bloqueada { fill: #e2445c; } .gantt .done.st-en_curso { fill: #fdab3d; }
tr.bad td { color: var(--bad); }
.report .gantt { overflow-x: auto; }
@media print { .report { break-inside: avoid; } }
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 16px; flex-wrap: wrap; }
.ptabs a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-bottom: 2px solid transparent; font-weight: 600; }
.ptabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }

/* Cronograma tipo MS Project */
.sched input[type=text], .sched input[type=number], .sched input[type=date] { padding: 3px 5px; font-size: 12px; }
.sched .wname { min-width: 190px; } .sched .wnum { width: 58px; } .sched .wpred { width: 96px; } .sched .wresp { width: 110px; }
.sched tr.critrow td:nth-child(2) input { border-color: var(--bad); }
.sched td, .sched th { padding: 4px 6px; white-space: nowrap; }
.gantt .track.critbar { stroke: var(--bad); stroke-width: 2; } .gantt .ms.critbar { stroke: var(--bad); stroke-width: 2; }
.gantt .ms.msdone { fill: #00c875; }
.gantt .basebar { fill: #8a93a3; opacity: .8; }
.gantt .dep { stroke: #6b7280; stroke-width: 1; } .gantt .deparrow { fill: #6b7280; }
.sc-plan { stroke: #3b6fe0; stroke-width: 2.2; } .sc-base { stroke: #8a93a3; stroke-width: 2; stroke-dasharray: 5 4; } .sc-real { stroke: #00a86b; stroke-width: 2.6; }
.sclegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin-top: 4px; }
.lg::before { content: ''; display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: middle; }
.lg.plan::before { background: #3b6fe0; } .lg.base::before { background: #8a93a3; } .lg.real::before { background: #00a86b; } .lg.crit::before { background: var(--bad); height: 5px; }

/* Calculadora de predimensionamiento */
.predim.calc { grid-template-columns: minmax(300px, 400px) 1fr; }
.pform { position: sticky; top: 8px; max-height: calc(100vh - 150px); overflow: auto; }
@media (max-width: 800px) { .pform { position: static; max-height: none; } }
.psec { border-top: 1px solid var(--line); padding: 6px 0; } .psec:first-of-type { border-top: 0; }
.psec > summary { cursor: pointer; font-weight: 700; padding: 4px 0; font-family: var(--display); }
.psec[open] > summary { margin-bottom: 6px; }
.prbox p { margin: 4px 0; }

/* Curva S con proporcion fija; el Gantt escala; globo de resumen */
.scsvg { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; }
.scsvg .schit:hover { fill: rgba(241, 90, 36, .08); }
.ganttfit { display: block; width: 100%; height: auto; }
.gantt .gridm { stroke: var(--line); stroke-width: 1; opacity: .45; }
.gantt .weekend { fill: var(--line); opacity: .25; }
.gantt .rowhit:hover { fill: rgba(241, 90, 36, .07); }
.gantt text.nmdone { fill: var(--muted); text-decoration: line-through; }
.gantt-ctl { margin: 6px 0; align-items: center; gap: 8px; flex-wrap: wrap; }
.gantt-ctl button.on { background: var(--brand); color: #fff; }
.tip { position: fixed; z-index: 1000; max-width: 340px; padding: 8px 10px; background: #1f2430; color: #fff; border-radius: 8px; font-size: 12.5px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.28); pointer-events: none; }
.tip[hidden] { display: none; }
.tip strong { display: block; margin-bottom: 3px; }
.report .scsvg { max-width: 600px; }
.report .repgantt .gantt { overflow: visible; }
@media print { .tip { display: none; } .report .repgantt { break-inside: avoid; } .report .scsvg { max-width: 560px; } }

/* Documentos imprimibles (actas, OT, fichas): al imprimir solo se ve #printdoc */
.printdoc { display: none; }
.psign { display: flex; gap: 48px; margin-top: 64px; }
.psign > div { flex: 1; text-align: center; font-size: 13px; }
.psign .line { border-top: 1px solid #111; margin-bottom: 6px; }
@media print { body.printing-doc > *:not(#printdoc) { display: none !important; } body.printing-doc #printdoc { display: block; border: 0; padding: 0; max-width: none; } }

/* Flujo tipo Monday: grupos de colores con tabla de columnas */
.tf-group { margin: 0 0 18px; }
.tf-ghead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.tf-gname { font-family: var(--display); font-size: 17px; }
.tf-chev { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 0 4px; }
.tf-segs { display: flex; width: 120px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); }
.tf-segs i { display: block; }
.tf-gtools { margin-left: auto; display: flex; gap: 4px; }
.tf-body .tablewrap { border-left: 5px solid var(--gc); }
table.tf td { vertical-align: middle; }
table.tf .tf-name { white-space: nowrap; min-width: 240px; }
table.tf .tf-name .muted { margin-right: 6px; font-size: 12px; }
table.tf input.wname { width: 220px; }
.tf-dates { display: flex; align-items: center; gap: 4px; }
.tf-dates input { width: 132px; }
.tf-prog { display: flex; align-items: center; gap: 6px; }
.tf-bar { width: 70px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tf-bar i { display: block; height: 100%; }
.tf-add { padding: 6px 0 0 5px; }
.tf-add input { width: 100%; max-width: 420px; border-style: dashed; }
.tf-bar2 { margin: 6px 0 12px; }
.tf-bar2 button.on { background: var(--brand); color: #fff; }
.tf-colmenu { position: relative; }
.tf-colmenu summary { cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.tf-colbox { position: absolute; right: 0; z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; min-width: 190px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.nowrap { white-space: nowrap; }

table.tf { table-layout: fixed; min-width: 0; width: max-content; }
table.tf th, table.tf td { padding: 5px 8px; }
table.tf input, table.tf select { height: 32px; padding: 3px 8px; font-size: 13px; width: 100%; box-sizing: border-box; }
table.tf .tf-name { white-space: nowrap; display: table-cell; }
table.tf .tf-name input { width: calc(100% - 34px); }
table.tf input.wnum { width: 58px; }
.tf-dates input { width: 122px; }
.tf-prog input { flex: none; }

/* Calculadora simplificada: ayuda por casilla, avanzado plegable, tutorial */
.hashelp { cursor: help; }
label.hashelp { text-decoration: underline dotted var(--muted); text-decoration-thickness: 1px; text-underline-offset: 3px; }
label.hashelp input, label.hashelp select { text-decoration: none; }
.padv { margin-top: 12px; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; }
.padv > summary { font-weight: 600; cursor: pointer; padding: 6px 0; }
.padv .psec { margin-left: 4px; }
.pbtns { margin-top: 14px; justify-content: space-between; }
details.psec.bad > summary { color: var(--bad); }
dialog.tutorial { max-width: 780px; width: calc(100% - 32px); max-height: 88vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); padding: 20px 24px; }
dialog.tutorial::backdrop { background: rgba(0, 0, 0, .45); }
dialog.tutorial h3 { margin: 18px 0 6px; border-bottom: 2px solid var(--brand); padding-bottom: 3px; }
dialog.tutorial li { margin: 4px 0; }
dialog.tutorial details { margin: 6px 0; }
dialog.tutorial summary { cursor: pointer; font-weight: 600; }

/* ---- Inicio (launcher de modulos) ---- */
.home { max-width: 980px; margin: 0 auto; padding: 18px 4px 40px; }
.home-hi { font-size: 30px; margin: 8px 0 2px; }
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 22px; }
.apptile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); box-shadow: 0 1px 2px #1111110a; transition: transform .2s, box-shadow .2s, border-color .2s; }
.apptile:hover, .apptile:focus-visible { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 10px 24px #11111122; }
.apptile-ico { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 16px; margin-bottom: 6px; }
.apptile-t { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: .02em; }
.apptile-d { color: var(--muted); font-size: 13px; line-height: 1.35; }
.apptile-ro { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--muted); background: var(--pause-bg); border-radius: 999px; padding: 1px 8px; }
nav.main a.homelink { font-weight: 700; }
.backbtn { margin-left: 6px; }
@media (max-width: 640px) { .appgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .home-hi { font-size: 24px; } }
.indtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.indtabs a { text-decoration: none; color: var(--text); padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--panel); }
.indtabs a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.modsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 8px; }
.modsum .card h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.modsum dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.modsum dt { color: var(--muted); } .modsum dd { margin: 0; font-weight: 600; text-align: right; }
.modsum .more { display: inline-block; margin-top: 10px; font-size: 13px; }

/* ---- Lista desplegable con busqueda ---- */
.combo { position: relative; display: block; }
.combo > input { padding-right: 34px; }
.combo-arrow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 2px 8px; font-size: 14px; color: var(--muted); border-radius: 8px; }
.combo-panel { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px #11111133; max-height: 260px; overflow-y: auto; }
.combo-panel[hidden] { display: none; }
.combo-hint { position: sticky; top: 0; background: var(--panel); padding: 7px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.combo-opt { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; cursor: pointer; font-size: 14px; color: var(--text); }
.combo-opt small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.combo-opt:hover, .combo-opt.on { background: var(--pause-bg); }
.combo-none { padding: 9px 12px; font-size: 13px; color: var(--muted); }
.combo-x { margin-left: 8px; border: 0; background: transparent; color: var(--muted); padding: 0 6px; border-radius: 6px; font-size: 16px; line-height: 1; }
.combo-x:hover { color: var(--bad); background: var(--bad-bg); }

/* ---- Listas acumulables de la oferta ---- */
.listed-rows { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; counter-reset: li; }
.listed-rows li { display: flex; gap: 8px; align-items: flex-start; counter-increment: li; }
.listed-rows li::before { content: counter(li) "."; min-width: 22px; color: var(--muted); padding-top: 9px; text-align: right; font-size: 13px; }
.listed-rows textarea { flex: 1; min-height: 38px; resize: vertical; }
.listed-btns { display: flex; gap: 4px; padding-top: 4px; }
.listed-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.listed-add .combo { flex: 1 1 320px; }
.ms-rows { display: grid; gap: 8px; margin-bottom: 6px; }
.ms-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; align-items: center; }
.hint.bad { color: var(--bad); }
.autoexcl { margin: 8px 0 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.autoexcl ul { margin: 4px 0 0 18px; padding: 0; }
tr.zero td input { background: var(--warn-bg); }
.tplgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.tplcard { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; background: var(--panel); margin: 0; color: var(--text); }
.tplcard.on { border-color: var(--brand); box-shadow: 0 0 0 2px #f15a2433; }
.tplcard input { width: auto; margin-right: 6px; }
.tplcard small { display: block; color: var(--muted); margin-top: 2px; }
.seclist { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 14px; }
.seclist label.check { margin: 0; }
details.blk { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin-bottom: 8px; }
details.blk summary { cursor: pointer; font-weight: 600; }
details.blk textarea { margin-top: 8px; }

/* ---- Propuesta con portada, indice y secciones ---- */
.proposal.doc { max-width: 860px; padding: 0; border: 0; background: transparent; }
.proposal.doc .psec { background: #fff; color: #111; padding: 36px 44px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r); }
.proposal.doc h3.ph { display: flex; align-items: baseline; gap: 10px; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 14px; }
.proposal.doc .ix { color: #f15a24; font-family: var(--display); font-weight: 600; }
.proposal .psub { font-family: var(--display); font-size: 15px; margin: 16px 0 4px; color: #c74616; }
.proposal .pnote { font-size: 12.5px; color: #5d5f64; }
.proposal .pdate { text-align: right; }
.proposal tr.secrow td { background: #f3f2f0; font-weight: 600; }
.proposal .pbanner { background: #111; color: #fff; border-radius: 14px; padding: 16px 22px; margin: 6px 0 14px; display: grid; gap: 2px; }
.proposal .pbanner b { font-family: var(--display); font-size: 32px; color: #f15a24; }
.proposal .pindex { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 16px; }
.proposal .pindex li { display: flex; gap: 14px; border-bottom: 1px solid #e3e1dd; padding: 4px 0; }
.proposal .cover { min-height: 920px; display: flex; flex-direction: column; justify-content: space-between; position: relative; border-top: 10px solid #f15a24; }
.proposal .plogo.big { height: 56px; align-self: flex-start; }
.proposal .cv-k { letter-spacing: .25em; color: #f15a24; font-weight: 700; }
.proposal .cv-t { font-family: var(--display); font-size: 44px; line-height: 1.1; margin: 6px 0 14px; }
.proposal .cv-d { font-size: 17px; color: #444; max-width: 560px; }
.proposal .cv-code { display: inline-block; margin-top: 8px; font-family: var(--display); font-size: 26px; color: #c74616; }
.proposal .cv-foot { display: flex; justify-content: space-between; border-top: 2px solid #111; padding-top: 10px; font-size: 14px; }
.proposal .fline { display: flex; gap: 8px; align-items: flex-end; margin: 12px 0; }
.proposal .fl { flex: 1; border-bottom: 1px solid #111; min-height: 18px; }
.proposal .sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 60px; }
.proposal .sigl { border-bottom: 1px solid #111; height: 50px; margin-bottom: 4px; }
label.inl { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
label.inl select { width: auto; }
@media print {
  .proposal.doc .psec { border: 0; border-radius: 0; padding: 0; margin: 0; break-before: page; }
  .proposal.doc .psec:first-child { break-before: auto; }
  .proposal .cover { min-height: 96vh; }
  .proposal .pbanner, .proposal tr.secrow td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .proposal tr, .proposal .sigs { break-inside: avoid; }
}

/* ---- Hojas de la propuesta: misma proporcion (A4), encabezado y pie como las ofertas CTS ---- */
.proposal.doc .psec { display: flex; flex-direction: column; aspect-ratio: 210 / 297; padding: 28px 40px 18px; }
.proposal.doc .psec.cover { padding: 36px 44px; }
.sechead { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 3px solid #f15a24; padding-bottom: 8px; margin-bottom: 18px; }
.sechead .plogo { height: 34px; width: auto; }
.sechead .sht { text-align: right; display: grid; }
.sechead .sht b { font-family: var(--display); letter-spacing: .08em; color: #c74616; font-size: 15px; }
.sechead .sht small { color: #5d5f64; }
.secbody { flex: 1 1 auto; font-size: 13.5px; line-height: 1.5; }
.secfoot { margin-top: 18px; padding: 6px 0 0; border-top: 1px solid #e3e1dd; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: #5d5f64; }
.proposal .tw { overflow-x: auto; max-width: 100%; }
.proposal table { max-width: 100%; }
.proposal .ptable.otec td { vertical-align: top; border: 1px solid #e3e1dd; font-size: 12px; }
.proposal .ptable.otec small { display: block; color: #c74616; font-weight: 700; }
.proposal .ptable.otec b, .proposal .ptable.otec span { display: block; }
.proposal .ptable.eq td, .proposal .ptable.eq th { font-size: 12.5px; }
.proposal .pnum { padding-left: 22px; }
.proposal .pnum li { margin: 4px 0; }
.proposal .psign { margin-top: 18px; }
.proposal .frow { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: end; margin: 8px 0; }
.proposal .fk { color: #5d5f64; font-size: 13px; }
.proposal .fv { border-bottom: 1px solid #111; min-height: 22px; padding: 0 2px; font-weight: 600; word-break: break-word; }
.proposal .sigs { margin-top: 34px; }
.proposal .sigs > div { font-size: 12.5px; }
.proposal .cover { aspect-ratio: 210 / 297; }
@media (max-width: 760px) {
  .proposal.doc .psec, .proposal .cover { aspect-ratio: auto; padding: 16px 14px 12px; border-radius: 12px; }
  .proposal .cover { min-height: 70vh; }
  .proposal .cv-t { font-size: 28px; }
  .proposal .frow { grid-template-columns: 1fr; gap: 0; }
  .proposal .sigs { grid-template-columns: 1fr; gap: 24px; }
  .proposal .pbanner b { font-size: 24px; }
  .secbody { font-size: 14px; }
}
@media print {
  @page { size: A4; margin: 14mm 14mm 14mm; }
  .proposal.doc .psec { aspect-ratio: auto; min-height: 262mm; padding: 0; }
  .proposal .cover { min-height: 262mm; }
  .sechead { margin-bottom: 12px; }
  .proposal .tw { overflow: visible; }
}

/* ---- Celular y tablet ---- */
@media (max-width: 900px) {
  header.top { padding: 8px 12px; gap: 8px; }
  header.top .brand img { height: 32px; }
  nav.main { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 0; padding-bottom: 2px; scrollbar-width: none; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { white-space: nowrap; margin: 0 8px; font-size: 13px; }
  .userbox { margin-left: auto; }
  .userbox .who { display: none; }
  main { padding-left: 12px; padding-right: 12px; }
  .wsrecent, .wsrecent + *, .wssub { display: none !important; }
  body.has-ws .wsside .wsrecent { display: none; }
  dialog { max-height: 92vh; overflow: auto; }
  .grid2 { grid-template-columns: 1fr; }
  .row.spread { flex-wrap: wrap; gap: 8px; }
  .wstools #wsSearch { flex: 1 1 100%; min-width: 0; width: 100%; }
  .tablewrap, .tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .combo-panel { max-height: 40vh; }
}
@media (pointer: coarse), (max-width: 900px) {
  button, .btnlink, select, input:not([type=checkbox]):not([type=radio]) { min-height: 40px; }
  button.small { min-height: 34px; padding: 5px 12px; }
  input, select, textarea { font-size: 16px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ms-row { grid-template-columns: 1fr 70px auto; }
  .listed-rows li::before { display: none; }
  .listed-add .combo { flex-basis: 100%; }
  .home { padding-top: 8px; }
  h2 { font-size: 22px; }
}
@media (max-width: 900px) {
  body.has-ws .wstools { position: relative; }
  .wsmenu { position: static; }
  .wspop { position: absolute; left: 12px; right: 12px; width: auto; max-width: none; z-index: 30; }
  .row { flex-wrap: wrap; }
  .predim { grid-template-columns: minmax(0, 1fr); }
  .predim > * { min-width: 0; }
  label.inl { flex: 1 1 100%; }
  label.inl select { width: 100%; }
}
.wsmenu:not([open]) > .wspop { display: none; }
@media (max-width: 900px) { html, body { overflow-x: clip; } .proposal .cv-t { overflow-wrap: anywhere; } .proposal .cover > * { min-width: 0; max-width: 100%; } }
/* Portada con imagen (como la oferta El Tigre) */
.proposal.doc .psec.cover-img { padding: 0; border-top: 0; position: relative; overflow: hidden; background: #1c2128; color: #fff; justify-content: space-between; }
.cover-img .cv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-img .cv-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #11151cd9 0%, #11151c99 40%, #11151cb3 100%); }
.cover-img > * { position: relative; }
.cover-img .cv-bg, .cover-img .cv-shade { position: absolute; }
.cover-img .cv-logo { align-self: flex-end; width: 46%; max-width: 360px; margin: 9% 7% 0 0; height: auto; }
.cover-img .cv-low { padding-bottom: 5%; }
.cover-img .cv-k { font-family: var(--display); font-size: clamp(30px, 6.2vw, 52px); letter-spacing: 0; color: #fff; margin: 0 0 10px 5%; }
.cover-img .cv-band { background: #f15a24; padding: 14px 5%; }
.cover-img .cv-t { font-family: var(--display); font-size: clamp(20px, 4vw, 34px); color: #fff; margin: 0; font-weight: 500; }
.cover-img .cv-d { color: #fff; font-size: clamp(12px, 2vw, 16px); margin: 16px 5% 0; max-width: none; }
.cover-img .cv-foot { display: flex; justify-content: space-between; align-items: flex-end; border: 0; padding: 0 5%; margin-top: 7%; font-size: 11px; color: #ddd; }
.cover-img .cv-mark { width: 12%; max-width: 90px; height: auto; }
.cover-img .wm { z-index: 2; }
@media print { .proposal.doc .psec.cover-img { padding: 0; } .cover-img .cv-shade, .cover-img .cv-band { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* Capacitacion y flujo de ofertas */
.courselayout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; margin: 14px 0; align-items: start; }
.lessonlist { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.lessonlist a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.lessonlist a[aria-current="page"], .lessonlist a:hover { background: var(--bg); font-weight: 600; }
.lesson { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 8px; }
.rolesel { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.apptile .mprog { width: 100%; }
td.r { text-align: right; }
@media (max-width: 760px) { .courselayout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .predim.calc { grid-template-columns: minmax(0, 1fr); } .soon { max-width: 100%; box-sizing: border-box; } .predim.calc > * { min-width: 0; max-width: 100%; } }
@media (max-width: 900px) { body.has-ws .wstools { position: static; top: auto; } .wstools #wsSearch { max-width: none; margin: 0; } }
/* Arrastrar tarjetas y busqueda de listas */
.fcard { background: var(--panel); color: var(--text); touch-action: pan-x pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; cursor: grab; }
.fcard.dragging { opacity: .35; }
.dragghost { box-shadow: 0 14px 30px #0006; transform: rotate(2deg); opacity: .95; cursor: grabbing; }
body.is-dragging { cursor: grabbing; }
.bcol.dropok { outline: 2px dashed var(--brand); outline-offset: -2px; background: color-mix(in srgb, var(--brand) 10%, transparent); }
.listsearch { flex: 1 1 240px; max-width: 420px; margin: 0; }
section.card > .listsearch { display: block; width: 100%; max-width: none; margin: 8px 0; }
/* Resumenes de modulo: cadena del ciclo y tarjetas de etapa */
.chain { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.chainstep { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; text-decoration: none; }
.chainstep i { font-style: normal; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); }
.chainstep.on { color: var(--text); border-color: var(--brand); font-weight: 600; }
.chainstep.on i { background: var(--brand); color: #fff; }
.chainstep.off { opacity: .45; }
a.chainstep:hover { border-color: var(--brand); }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 10px 0 16px; }
.stage { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--r); background: var(--panel); text-decoration: none; color: var(--text); }
.stage b { font-family: var(--display); font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; }
.stage span { color: var(--muted); font-size: 14px; }
.stage small { color: var(--muted); font-size: 12px; }
.stage.warn { border-left-color: #fdab3d; } .stage.bad { border-left-color: #e2445c; } .stage.ok { border-left-color: #00c875; }
a.stage:hover { box-shadow: 0 6px 18px #0002; }
a.card.on { outline: 2px solid var(--brand); }
a.card { text-decoration: none; color: inherit; }
@media (max-width: 760px) { .dashgrid { grid-template-columns: minmax(0, 1fr) !important; } .dashgrid > * { min-width: 0; } }
/* Talento humano */
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-family: var(--display); }
.peoplegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0; }
.person { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); text-decoration: none; color: var(--text); min-width: 0; }
.person > div { min-width: 0; overflow-wrap: anywhere; }
.person:hover { border-color: var(--brand); } .person.off { opacity: .6; }
.orgtree, .orgtree ul { list-style: none; padding-left: 22px; margin: 4px 0; border-left: 1px dashed var(--line); } .orgtree { border-left: 0; padding-left: 0; }
.orgtree li { margin: 6px 0; }
.hrrow { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.hrmain { min-width: 0; overflow-wrap: anywhere; } .hract { display: flex; gap: 6px; flex: none; }
.ptable.kv th { text-align: left; width: 38%; vertical-align: top; } .ptable.kv td { overflow-wrap: anywhere; }
@media (max-width: 760px) { .hrrow { flex-direction: column; } #app .tabs { overflow-x: auto; white-space: nowrap; } }
/* Panel de herramientas de oferta: texto oscuro/contrastado */
.offerdoc { color: var(--text); } .offerdoc .muted, .offerdoc h4 { color: var(--muted); }
.offerdoc button.on, .offerdoc .tooltabs .on { color: #fff; }
@media (max-width: 760px) {
  table.utable, table.utable tbody { display: block; width: 100%; } table.utable thead { display: none; }
  table.utable tr { display: grid; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); }
  table.utable td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; } table.utable td select { width: 100%; }
}
