:root {
  --bg: #f3f5f8; --surface: #ffffff; --surface2: #f8f9fb; --text: #18222f; --muted: #5a6779; --faint: #8794a6;
  --border: #e1e6ed; --border2: #cfd7e2; --accent: #1f4e8c; --accent-soft: #e6eef9;
  --ok: #2b9a6b; --warn: #e0a100; --pend: #8a9bb0; --na: #cdd4de; --bad: #d64545;
  --ok-soft: #e3f4ec; --warn-soft: #fdf3d6; --bad-soft: #fbe6e6; --pend-soft: #eaeef3;
  --shadow: 0 1px 2px rgba(20,30,50,.06), 0 4px 14px rgba(20,30,50,.05);
  --grid: #e8ecf1; --weekend: rgba(120,135,160,.07); --today: #d64545;
  --radius: 12px; --topbar-h: 62px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0f1520; --surface: #172030; --surface2: #1c2738; --text: #e8edf4; --muted: #a2afc1; --faint: #75849a;
  --border: #263449; --border2: #34455e; --accent: #6ea8ff; --accent-soft: #1d2d47;
  --ok: #3fc08b; --warn: #f0b72f; --pend: #7f90a8; --na: #3b4a60; --bad: #ff6b6b;
  --ok-soft: #153a2e; --warn-soft: #3d3313; --bad-soft: #402024; --pend-soft: #222f43;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --grid: #243246; --weekend: rgba(150,170,200,.06); --today: #ff6b6b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center; gap: 22px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; flex: none; }
.logo-slot { width: 168px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 8px; overflow: hidden; }
.logo-slot.empty { border: 1.5px dashed var(--border2); background: var(--surface2); }
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-ph { font-size: 11px; letter-spacing: .18em; color: var(--faint); font-weight: 600; }
.logo-slot:not(.empty) .logo-ph { display: none; }
.brand-text { display: flex; flex-direction: column; border-left: 1px solid var(--border); padding-left: 12px; }
.brand-text strong { font-size: 14px; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: 11.5px; }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a { position: relative; padding: 8px 13px; border-radius: 8px; color: var(--muted); font-weight: 550; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.nav a:hover { background: var(--surface2); color: var(--text); }
.nav a.on { color: var(--accent); background: var(--accent-soft); }
.nav .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.nav .sep { width: 1px; background: var(--border); margin: 8px 6px; }
.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.cut { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.cut input { font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; line-height: 1; color: var(--muted); }
.icon-btn:hover { background: var(--surface2); color: var(--text); }

/* ---------- Layout ---------- */
.view { max-width: 1480px; margin: 0 auto; padding: 22px 24px 60px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 24px; letter-spacing: -.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 1px solid var(--border2); background: var(--surface); border-radius: 9px; padding: 7px 13px; font-weight: 550; color: var(--text); display: inline-flex; align-items: center; gap: 7px; }
.btn:hover { background: var(--surface2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #0b1220; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-areas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }
.card { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.card h3 { font-size: 14.5px; letter-spacing: -.005em; }
.card .sub { color: var(--muted); font-size: 12.5px; margin: 3px 0 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 650; margin: 26px 0 10px; }

/* Filtros activos */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 32px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid transparent; border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 12.5px; font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; padding: 0 4px; font-size: 14px; line-height: 1; }
.hint { color: var(--faint); font-size: 12.5px; }

/* ---------- KPI ---------- */
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.kpi .val { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.kpi .val small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi .note { font-size: 12px; color: var(--muted); }
.kpi.bad .val { color: var(--bad); } .kpi.warn .val { color: var(--warn); } .kpi.ok .val { color: var(--ok); }
.mini-bar { height: 6px; border-radius: 4px; background: var(--pend-soft); overflow: hidden; margin-top: 6px; display: flex; }
.mini-bar i { display: block; height: 100%; }

/* ---------- Tarjetas de área ---------- */
.area-card { border-top: 4px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.area-card .top { display: flex; justify-content: space-between; align-items: center; }
.area-card h3 { font-size: 17px; color: var(--text); }
.dates { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.dates .arrow { color: var(--faint); }
.dates.none { color: var(--faint); font-weight: 500; font-style: italic; }
.area-card dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: 12.5px; }
.area-card dt { color: var(--muted); } .area-card dd { margin: 0; text-align: right; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: #9a6f00; }
:root[data-theme="dark"] .badge.warn { color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.pend { background: var(--pend-soft); color: var(--muted); } .badge.na { background: var(--pend-soft); color: var(--faint); }
.badge.plain::before { display: none; }

/* ---------- Timeline por área (dashboard) ---------- */
.tl { position: relative; padding: 0 0 4px 108px; }
.tl-axis { position: relative; height: 26px; border-bottom: 1px solid var(--border2); }
.tl-axis span { position: absolute; top: 4px; font-size: 11.5px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.tl-axis span::after { content: ""; position: absolute; left: 50%; top: 19px; height: 5px; border-left: 1px solid var(--border2); }
.tl-row { position: relative; height: 54px; border-bottom: 1px dashed var(--border); cursor: pointer; }
.tl-row:hover { background: var(--surface2); }
.tl-row .nm { position: absolute; left: -108px; width: 100px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; font-weight: 650; }
.tl-row .nm small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.tl-bar { position: absolute; top: 17px; height: 20px; border-radius: 10px; background: var(--c); opacity: .22; }
.tl-bar.solid { opacity: .9; }
.tl-mk { position: absolute; top: 21px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); border-radius: 2px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.tl-lines { position: absolute; inset: 26px 0 0 108px; pointer-events: none; }
.tl-lines i { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--grid); }
.tl-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--today); z-index: 3; pointer-events: none; }
.tl-today b { position: absolute; top: -2px; transform: translateX(-50%); background: var(--today); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.dm { transform: rotate(45deg); border-radius: 2px; }

/* ---------- Gráficas ---------- */
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 22; cursor: pointer; transition: opacity .15s, stroke-width .15s; }
.donut circle:hover { stroke-width: 26; }
.donut .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut .c b { font-size: 28px; letter-spacing: -.03em; } .donut .c span { font-size: 11.5px; color: var(--muted); }
.dl { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.dl button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: 7px; text-align: left; }
.dl button:hover, .dl button.sel { background: var(--surface2); }
.dl button.sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dl i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dl b { margin-left: auto; font-variant-numeric: tabular-nums; }
.dim { opacity: .35; }
.hrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 54px; gap: 10px; align-items: center; padding: 5px 0; }
.hrow .lb { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .vl { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hbar { display: flex; height: 18px; border-radius: 5px; overflow: hidden; background: var(--pend-soft); }
.hbar > i { display: block; height: 100%; cursor: pointer; transition: filter .15s; min-width: 0; }
.hbar > i:hover { filter: brightness(1.12); }
.hrow.sel .lb { color: var(--accent); }
.heat { min-width: 680px; width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.heat th { font-size: 10.5px; font-weight: 650; color: var(--muted); text-align: center; padding: 2px 0 6px; line-height: 1.15; vertical-align: bottom; }
.heat th.r { text-align: left; width: 86px; font-size: 12.5px; color: var(--text); vertical-align: middle; }
.heat td { height: 40px; text-align: center; border-radius: 7px; font-size: 12px; font-weight: 650; cursor: pointer; background: var(--surface2); color: var(--faint); border: 1px solid transparent; }
.heat td.has:hover { border-color: var(--accent); }
.heat td.sel { box-shadow: 0 0 0 2px var(--accent); }
.heat td small { display: block; font-weight: 500; font-size: 10px; opacity: .85; }
.cols { display: flex; align-items: flex-end; gap: 8px; height: 178px; padding: 0 2px; border-bottom: 1px solid var(--border2); position: relative; }
.col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.col .stack { width: 70%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 0 0; overflow: hidden; }
.col .stack i { display: block; width: 100%; }
.col .n { font-size: 11px; font-weight: 650; margin-bottom: 3px; color: var(--muted); }
.col.cur .n { color: var(--today); }
.col-lbl { display: flex; gap: 8px; padding: 6px 2px 0; }
.col-lbl span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); min-width: 0; line-height: 1.2; }
.col-lbl span.cur { color: var(--today); font-weight: 700; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; }
.li { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 6px; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface2); }
.li .bar { align-self: stretch; border-radius: 3px; background: var(--c, var(--pend)); }
.li .t { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-size: 12px; color: var(--muted); }
.li .r { text-align: right; font-size: 12px; white-space: nowrap; }
.li .r b { display: block; font-size: 13px; }
.insight { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.insight:last-child { border-bottom: 0; }
.insight .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.insight.bad .ic { background: var(--bad-soft); color: var(--bad); } .insight.warn .ic { background: var(--warn-soft); color: #9a6f00; }
:root[data-theme="dark"] .insight.warn .ic { color: var(--warn); }
.insight.info .ic { background: var(--accent-soft); color: var(--accent); } .insight.ok .ic { background: var(--ok-soft); color: var(--ok); }
.insight h4 { font-size: 13.5px; } .insight p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.insight details summary { cursor: pointer; color: var(--accent); font-size: 12px; margin-top: 4px; }
.insight ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.risk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.risk-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 4px 6px 8px; font-weight: 650; }
.risk-table td { padding: 8px 6px; border-top: 1px solid var(--border); }
.risk-table tr.clk { cursor: pointer; } .risk-table tr.clk:hover { background: var(--surface2); }
.dot-c { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* ---------- Tablas de detalle ---------- */
.tools-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tools-row input[type=search] { font: inherit; padding: 6px 10px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 220px; }
.tbl-wrap { overflow: auto; max-height: 560px; border: 1px solid var(--border); border-radius: 10px; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 12.8px; }
.tbl th { position: sticky; top: 0; background: var(--surface2); text-align: left; padding: 8px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border2); white-space: nowrap; cursor: pointer; user-select: none; z-index: 1; }
.tbl th.asc::after { content: " ▲"; font-size: 8px; } .tbl th.desc::after { content: " ▼"; font-size: 8px; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr.row:hover td { background: var(--surface2); cursor: pointer; }
.tbl td.nw { white-space: nowrap; }
.tbl td.wrap { min-width: 240px; max-width: 420px; }
.tbl .ac { display: inline-block; width: 4px; height: 14px; border-radius: 2px; margin-right: 7px; vertical-align: -2px; }
.tbl tr.lvl-1 td:nth-child(2), .tbl tr.lvl-2 td:nth-child(2) { padding-left: 24px; }
.late { color: var(--bad); font-weight: 650; }

/* ---------- Gantt ---------- */
.gantt { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.g-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface2); }
.seg { display: inline-flex; border: 1px solid var(--border2); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; } .seg button.on { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .seg button.on { color: #0b1220; }
.g-scroll { overflow: auto; max-height: 68vh; position: relative; background: var(--surface); }
.g-inner { position: relative; }
.g-row { display: flex; height: 34px; border-bottom: 1px solid var(--grid); }
.g-row.grp { background: var(--surface2); height: 36px; }
.g-row.grp.l0 { height: 38px; }
.g-row:hover .g-left, .g-row:hover { background-color: var(--accent-soft); }
.g-row.grp:hover .g-left { background: var(--accent-soft); }
.g-left { position: sticky; left: 0; z-index: 4; width: var(--lw); flex: none; background: var(--surface); display: grid; grid-template-columns: 1fr 128px 96px; align-items: center; gap: 6px; padding: 0 10px; border-right: 1px solid var(--border2); font-size: 12.5px; overflow: hidden; }
.g-row.grp .g-left { background: var(--surface2); font-weight: 650; }
.g-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.g-name span.tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-name .no { color: var(--faint); font-size: 11px; flex: none; min-width: 24px; font-variant-numeric: tabular-nums; }
.tw { border: 0; background: none; width: 18px; height: 18px; padding: 0; color: var(--muted); font-size: 10px; flex: none; border-radius: 4px; }
.tw:hover { background: var(--border); }
.g-resp { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-time { position: relative; flex: none; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; height: 50px; background: var(--surface); border-bottom: 1px solid var(--border2); }
.g-head .g-left { z-index: 7; background: var(--surface2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.g-head .g-time { background: var(--surface); }
.g-m { position: absolute; top: 0; height: 24px; border-left: 1px solid var(--border2); padding: 4px 6px; font-size: 11.5px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; }
.g-d { position: absolute; top: 24px; height: 26px; border-left: 1px solid var(--grid); font-size: 10.5px; color: var(--muted); padding: 5px 0 0 3px; white-space: nowrap; overflow: hidden; }
.g-d.we { color: var(--faint); }
.g-grid { position: absolute; top: 50px; bottom: 0; left: var(--lw); right: 0; pointer-events: none; z-index: 1; }
.g-grid i { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--grid); }
.g-grid i.we { background: var(--weekend); border: 0; }
.g-grid i.td { border-left: 2px solid var(--today); z-index: 2; }
.g-grid i.td::before { content: "Hoy"; position: absolute; top: 0; left: -1px; transform: translateX(-50%); background: var(--today); color: #fff; font-size: 10px; font-style: normal; padding: 0 5px; border-radius: 0 0 4px 4px; }
.gb { position: absolute; top: 8px; height: 18px; border-radius: 5px; background: var(--c); cursor: pointer; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.15); overflow: hidden; }
.gb.late { box-shadow: 0 0 0 2px var(--bad); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 5px, transparent 5px 10px); }
.gb .lb { position: absolute; left: 6px; top: 0; line-height: 18px; font-size: 10.5px; color: #fff; font-weight: 650; white-space: nowrap; text-shadow: 0 0 2px rgba(0,0,0,.25); }
.gb.warnc .lb { color: #3b2a00; text-shadow: none; }
.gm { position: absolute; top: 9px; width: 16px; height: 16px; margin-left: -8px; transform: rotate(45deg); border-radius: 3px; background: var(--c); cursor: pointer; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.gm.late { box-shadow: 0 0 0 2px var(--bad); }
.gs { position: absolute; top: 12px; height: 10px; z-index: 2; cursor: pointer; background: color-mix(in srgb, var(--c) 28%, transparent); border: 1.5px solid var(--c); border-radius: 3px; overflow: hidden; }
.gs i { display: block; height: 100%; background: var(--c); opacity: .85; }
.gs.l0 { top: 11px; height: 14px; }
.nodate { position: sticky; left: calc(var(--lw) + 12px); display: inline-block; margin-top: 8px; font-size: 11.5px; font-style: italic; color: var(--faint); white-space: nowrap; }
.g-empty { padding: 24px; color: var(--muted); }

/* ---------- Drawer / tooltip ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); border-left: 1px solid var(--border2); box-shadow: -10px 0 40px rgba(0,0,0,.18); transform: translateX(105%); transition: transform .22s ease; z-index: 90; overflow: auto; padding: 22px 22px 40px; }
.drawer.open { transform: none; }
.drawer .x { position: absolute; top: 14px; right: 14px; }
.drawer h2 { font-size: 18px; margin: 8px 30px 4px 0; letter-spacing: -.01em; }
.drawer .kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 16px 0; font-size: 13px; }
.drawer .kv dt { color: var(--muted); } .drawer .kv dd { margin: 0; font-weight: 550; }
.drawer .box { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.drawer .box h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 4px; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: #131c2b; color: #f1f5fa; padding: 8px 11px; border-radius: 9px; font-size: 12.3px; line-height: 1.4; max-width: 320px; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; transition: opacity .1s; }
.tip.on { opacity: 1; }
.tip b { display: block; margin-bottom: 2px; } .tip .m { color: #aebbd0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.note-box { font-size: 12.8px; color: var(--muted); }
.note-box details { margin: 6px 0; } .note-box summary { cursor: pointer; font-weight: 650; color: var(--text); }
.note-box table { border-collapse: collapse; margin: 8px 0; } .note-box td, .note-box th { border: 1px solid var(--border); padding: 3px 9px; text-align: left; font-size: 12px; }

/* ---------- Footer fijo (mismo estilo que Jetour) ---------- */
.site-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 80; background: var(--surface); border-top: 1px solid var(--border); padding: 10px 24px; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .875rem; }
.site-footer-copy, .site-footer-made { color: var(--faint); font-size: .875rem; }
.site-footer-heart { color: #D01F1F; font-style: normal; }
.site-footer-brand-link, .site-footer-brand-link:visited { color: inherit; font-weight: 700; text-decoration: none; border-bottom: 1px dotted currentColor; }
.site-footer-brand-link:hover { text-decoration: underline; }
body { padding-bottom: 46px; }
.g-scroll { max-height: calc(100vh - 220px); min-height: 360px; }
@media (max-width: 560px) { .site-footer { padding: 8px 12px; } .site-footer-inner { justify-content: center; text-align: center; } body { padding-bottom: 70px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .topbar { overflow: hidden; } .logo-slot { width: 96px; } .g-2, .g-3 { grid-template-columns: 1fr; } .topbar { gap: 10px; padding: 0 12px; } .brand-text, .cut { display: none; } .logo-slot { width: 120px; } .view { padding: 16px 12px 40px; } }
@media (max-width: 560px) { .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-areas { grid-template-columns: 1fr; } }

/* ---------- Impresión ---------- */
@page { size: A4 landscape; margin: 10mm; }
@media print {
  .site-footer { position: static; } body { background: #fff; padding-bottom: 0; } :root { --shadow: none; }
  .topbar { position: static; } .tools, .nav, .actions, .tools-row, .g-bar, .filters .hint, .drawer, .tip, .btn { display: none !important; }
  .view { max-width: none; padding: 0; } .card, .gantt { break-inside: avoid; box-shadow: none; }
  .g-scroll, .tbl-wrap { max-height: none; overflow: visible; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
