/* Plataforma de reportes — Control Bus */
:root { --marca: #0f5560; --marca-osc: #0a3f48; --marca-claro: #e3f0f1; --acento: #1f9d8a; --fondo: #eef2f3; --panel: #fff; --linea: #dde5e7; --texto: #1c2b2e; --suave: #5f7478; --mal: #b3261e; --mal-fondo: #fbe4e2; --aviso: #8a5a00; --aviso-fondo: #fdf0d2; --ok: #1c7c54; --sombra: 0 1px 2px rgba(16,40,45,.08), 0 4px 14px rgba(16,40,45,.06); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--texto); background: var(--fondo); }
button, input, select { font: inherit; color: inherit; } button { cursor: pointer; }
.oculto { display: none !important; }
.suave { color: var(--suave); }

/* ingreso */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--marca-osc), var(--marca) 55%, #167a73); }
.login-caja { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 30px 28px 24px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.marca { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.marca-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--marca); display: grid; place-items: center; flex: none; }
.marca-ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.marca b { display: block; font-size: 20px; } .marca span { color: var(--suave); font-size: 12.5px; }
.campo { margin-bottom: 14px; } .campo label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; color: #2d4247; }
.entrada { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #c8d3d6; border-radius: 8px; background: #fff; outline: none; }
.entrada:focus { border-color: var(--marca); box-shadow: 0 0 0 3px rgba(15,85,96,.15); }
.btn { height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid #c8d3d6; background: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:hover { background: #f4f8f8; } .btn-pri { background: var(--marca); border-color: var(--marca); color: #fff; } .btn-pri:hover { background: var(--marca-osc); }
.error { background: var(--mal-fondo); color: var(--mal); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
.pie-login { margin-top: 14px; text-align: center; color: var(--suave); font-size: 12px; }

/* estructura */
.barra { background: var(--marca); color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 22px; position: sticky; top: 0; z-index: 30; }
.barra .marca-ico { background: rgba(255,255,255,.14); width: 36px; height: 36px; } .barra .marca-ico svg { width: 22px; height: 22px; }
.barra h1 { font-size: 18px; margin: 0; } .barra .sub { font-size: 12px; color: #bcd6da; }
.barra .espacio { flex: 1; } .barra .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; height: 34px; } .barra .btn:hover { background: rgba(255,255,255,.22); }
.filtros { background: #fff; border-bottom: 1px solid var(--linea); padding: 12px 22px; position: sticky; top: 58px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.filtros .grupo { display: flex; flex-direction: column; gap: 3px; } .filtros label.t { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--suave); }
.filtros input[type=date] { height: 34px; width: 140px; }
.rapidos { display: flex; gap: 6px; } .rapidos button { height: 34px; padding: 0 10px; border: 1px solid #c8d3d6; background: #fff; border-radius: 8px; font-size: 12.5px; font-weight: 600; } .rapidos button.act { background: var(--marca); border-color: var(--marca); color: #fff; }
.ms { position: relative; } .ms > button { height: 34px; min-width: 150px; max-width: 220px; padding: 0 28px 0 10px; border: 1px solid #c8d3d6; background: #fff; border-radius: 8px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.ms > button::after { content: "▾"; position: absolute; right: 10px; top: 7px; color: var(--suave); } .ms.con > button { border-color: var(--marca); background: var(--marca-claro); font-weight: 600; }
.ms .panel { position: absolute; top: 38px; left: 0; width: 320px; max-width: 86vw; background: #fff; border: 1px solid var(--linea); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 40; padding: 8px; display: none; }
.ms.abierto .panel { display: block; } .ms .panel input[type=search] { width: 100%; height: 32px; border: 1px solid #c8d3d6; border-radius: 6px; padding: 0 8px; margin-bottom: 6px; }
.ms .lista { max-height: 250px; overflow: auto; } .ms .lista label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; } .ms .lista label:hover { background: #f1f5f6; }
.ms .lista input { accent-color: var(--marca); } .ms .lista .n { margin-left: auto; color: var(--suave); font-size: 11.5px; }
.ms .acc { display: flex; justify-content: space-between; margin-top: 6px; } .ms .acc button { border: 0; background: none; color: var(--marca); font-weight: 600; padding: 4px 6px; }
.activos { padding: 8px 22px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 8px; }
.chip { background: var(--marca-claro); color: var(--marca); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.chip button { border: 0; background: rgba(15,85,96,.15); color: var(--marca); width: 18px; height: 18px; border-radius: 50%; line-height: 16px; padding: 0; font-weight: 700; }
.contenido { padding: 14px 22px 30px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border-radius: 12px; box-shadow: var(--sombra); padding: 12px 14px; border-left: 4px solid var(--acento); }
.kpibar { display: flex; flex-wrap: wrap; background: #fff; border-radius: 12px; box-shadow: var(--sombra); margin-bottom: 14px; } .kb { flex: 1 1 130px; text-align: center; padding: 12px 8px; border-right: 1px solid var(--linea); } .kb:last-child { border-right: 0; }
.amp { border: 1px solid #c8d3d6; background: #fff; color: var(--marca); width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; padding: 0; flex: none; } .amp:hover { background: var(--marca-claro); }
.velo-amp { position: fixed; inset: 0; background: rgba(8,28,32,.55); z-index: 70; display: grid; place-items: center; padding: 16px; } .ventana-amp { background: #fff; border-radius: 14px; width: min(1400px, 96vw); max-height: 94vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.cab-amp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--linea); } .cab-amp h2 { margin: 0; font-size: 17px; } .cuerpo-amp { overflow: auto; padding: 12px 18px 18px; } .scroll-amp { overflow-x: auto; }
.numsem { display: inline-flex; align-items: center; gap: 6px; background: #e9f0f1; border-radius: 9px; padding: 3px 10px; height: 36px; font-size: 12.5px; font-weight: 600; color: #46676d; } .numsem input { width: 54px; height: 28px; border: 1px solid #c9d8da; border-radius: 6px; text-align: center; font: inherit; font-weight: 700; color: var(--marca); background: #fff; }
.exp { position: relative; } .exp-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: #16343a; border-radius: 10px; box-shadow: 0 8px 28px rgba(16,40,45,.28); min-width: 250px; padding: 6px; z-index: 80; } .exp-menu[hidden] { display: none; }
.exp-t { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #46676d; } .exp-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 7px; font: inherit; color: inherit; cursor: pointer; } .exp-menu button:hover { background: #eef3f4; }
.mu { font-size: 12.5px; } .mu thead th { background: var(--marca); color: #fff; text-transform: none; letter-spacing: 0; text-align: center; padding: 6px 7px; } .mu thead th.lado { background: var(--marca-osc); text-align: left; } .mu td { text-align: center; padding: 6px 7px; white-space: nowrap; } .mu tr.tot td, .mu tr.tot th { font-weight: 700; background: #f3f7f8; } .mu tbody th.lado { font-size: 12px; }
.tarjeta .kpibar { box-shadow: none; border: 1px solid var(--linea); margin: 8px 0 0; } .aviso-s { background: var(--aviso-fondo); color: var(--aviso); border: 1px solid #f0dca6; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-top: 8px; }
.entrada.buscar { width: 260px; max-width: 100%; height: 34px; } .rutas { font-size: 12.5px; } .rutas th[data-s] { cursor: pointer; white-space: normal; vertical-align: bottom; } .rutas td { white-space: nowrap; } .rutas td.l, .rutas th.l { text-align: left; } .rutas th.lado { position: sticky; left: 0; background: #f8fafa; z-index: 1; } .rutas tbody th.lado { background: #fff; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--texto); cursor: default; border-bottom: 1px solid #eaf0f1; padding: 8px 10px; } .rutas td.mal { color: var(--mal); font-weight: 600; } .nd { color: #9bb0b3; }
#detalle { overflow-x: auto; } #detalle td, #detalle th { white-space: nowrap; } #detalle td:nth-child(2) { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.matriz { min-width: 0; font-size: 13px; } .matriz th { cursor: default; text-align: center; background: #f8fafa; } .matriz th.mesh { cursor: pointer; background: var(--marca); color: #fff; letter-spacing: 0; text-transform: none; font-size: 12.5px; } .matriz th.mesh:hover { background: var(--marca-osc); }
.matriz th.sub { font-size: 11px; color: var(--suave); text-transform: none; letter-spacing: 0; } .matriz th.lado { text-align: left; position: sticky; left: 0; background: #f8fafa; z-index: 1; white-space: nowrap; } .matriz th.tot { background: var(--marca-osc); color: #fff; } .matriz td.mal { color: #b3261e; font-weight: 600; } .matriz td.n { white-space: nowrap; }
.kb b { display: block; font-size: 20px; line-height: 1.2; white-space: nowrap; } .kb small { color: var(--suave); font-size: 11.5px; } .kb.alerta b { color: #b3261e; }
.c3 { grid-column: span 3; } .c5 { grid-column: span 5; } .graf.alto { height: 420px; } .graf.muy-alto { height: 650px; } .segmento .et { align-self: center; padding: 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--suave); }
@media (max-width: 1100px) { .c3, .c5 { grid-column: span 12; } }
.cab-vista { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; } .cab-vista h2 { margin: 0; }
.segmento { display: inline-flex; background: #e9f0f1; border-radius: 9px; padding: 3px; gap: 2px; } .segmento button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px; color: #46676d; } .segmento button.act { background: #fff; color: var(--marca); box-shadow: 0 1px 3px rgba(16,40,45,.18); }
.kpi.alerta { border-left-color: #c0504d; } .kpi.alerta b { color: #b3261e; }
.pag { display: flex; align-items: center; gap: 8px; padding: 10px 4px 2px; color: var(--suave); font-size: 13px; } .pag .espacio { flex: 1; } .btn[disabled] { opacity: .5; cursor: not-allowed; }
.kpi small { display: block; color: var(--suave); font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; } .kpi b { font-size: 24px; line-height: 1.2; } .kpi span { display: block; color: var(--suave); font-size: 11.5px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.tarjeta { background: #fff; border-radius: 12px; box-shadow: var(--sombra); padding: 12px 14px 10px; min-width: 0; }
.tarjeta h2 { font-size: 14px; margin: 0 0 2px; } .tarjeta .nota { color: var(--suave); font-size: 11.5px; margin-bottom: 4px; }
.c4 { grid-column: span 4; } .c6 { grid-column: span 6; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.graf { width: 100%; height: 300px; }
table.tabla { width: 100%; border-collapse: collapse; } .tabla th { text-align: left; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--suave); padding: 8px 10px; border-bottom: 1px solid var(--linea); background: #f8fafa; cursor: pointer; white-space: nowrap; user-select: none; }
.tabla th.n, .tabla td.n { text-align: right; } .tabla td { padding: 8px 10px; border-bottom: 1px solid #eaf0f1; } .tabla tr.fila:hover td { background: #f4fafa; cursor: pointer; } .tabla tr.sel td { background: var(--marca-claro); }
.tabla-caja { overflow-x: auto; }
.barra-tabla { height: 6px; background: #e8eef0; border-radius: 3px; overflow: hidden; min-width: 70px; } .barra-tabla i { display: block; height: 100%; background: var(--acento); }
.aviso { background: var(--aviso-fondo); color: var(--aviso); padding: 8px 22px; font-size: 12.5px; border-bottom: 1px solid #f0dca6; }
.vacio { text-align: center; color: var(--suave); padding: 40px 10px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #12343a; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: var(--sombra); }
/* menú lateral por segmentos */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; } .principal { min-width: 0; }
.lateral { background: #0b3f4a; color: #cfe3e6; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.lat-cab { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; color: #fff; } .lat-cab .marca-ico { background: rgba(255,255,255,.14); width: 38px; height: 38px; flex: none; } .lat-cab b { display: block; font-size: 15px; line-height: 1.2; } .lat-cab span { font-size: 11.5px; color: #8fb3b9; }
.lat-sec { padding: 12px 16px 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #8fb3b9; }
.seg-t { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; color: #fff; font: inherit; font-weight: 600; text-align: left; background: rgba(255,255,255,.07); border: 0; cursor: pointer; } .seg-t:hover { background: rgba(255,255,255,.12); }
.seg-t .flecha { margin-left: auto; width: 15px !important; height: 15px !important; transition: transform .15s; } .seg.abierto > .seg-t .flecha { transform: rotate(90deg); } .seg:not(.abierto) .seg-sub { display: none; } .seg-t svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg-sub { padding: 4px 0 8px; background: rgba(0,0,0,.14); } .seg-sub a { display: flex; align-items: center; padding: 8px 16px 8px 44px; color: #cfe3e6; font-size: 13.5px; cursor: pointer; text-decoration: none; } .seg-sub a:hover { background: rgba(255,255,255,.06); }
.seg-sub a.act { background: #12606d; color: #fff; box-shadow: inset 3px 0 0 #6fd6c6; font-weight: 600; } .seg-sub .pronto { margin-left: auto; font-size: 10px; background: rgba(255,255,255,.14); border-radius: 99px; padding: 1px 7px; color: #bcd6da; }
.lat-nota { margin: 14px 16px; padding: 10px 12px; border: 1px dashed rgba(255,255,255,.25); border-radius: 8px; font-size: 12px; color: #8fb3b9; }
#bMenu { display: none; padding: 0 10px; } .fondo-lat { display: none; }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 50; transform: translateX(-100%); transition: transform .2s; } .shell.menu-abierto .lateral { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); } .fondo-lat { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45; } .shell.menu-abierto .fondo-lat { display: block; } #bMenu { display: inline-flex; } .barra h1 { font-size: 15px; } }
@media (max-width: 1100px) { .c4, .c6, .c8 { grid-column: span 12; } }
@media (max-width: 700px) { .barra, .filtros, .activos, .contenido, .aviso { padding-left: 12px; padding-right: 12px; } .filtros { position: static; } .ms > button { min-width: 130px; } .kpi b { font-size: 20px; } .graf { height: 260px; } }
.quien { color: #cfe3e6; font-size: 13px; font-weight: 600; margin-right: 4px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .quien { display: none; } }
.sync { color: #cfe3e6; font-size: 12px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 5px 11px; white-space: nowrap; margin-right: 6px; cursor: help; } .sync b { color: #fff; font-weight: 600; }
.sync-login { margin-top: 10px; text-align: center; font-size: 12.5px; color: #46676d; line-height: 1.5; } .sync-login b { color: #0f5560; font-size: 14px; }
@media (max-width: 700px) { .sync { font-size: 11px; padding: 4px 8px; } }
.controlesP { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .controlesP label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--suave); display: flex; flex-direction: column; gap: 3px; } .controlesP .entrada { height: 34px; width: auto; min-width: 140px; } .controlesP select.entrada { min-width: 190px; }
.oculto-vacio:empty { display: none; } .tarjeta .aviso-s { margin: 0 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; } .pill { border: 1px solid #cfdcde; background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--texto); } .pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; } .pill.act { background: var(--marca-claro); border-color: var(--marca); font-weight: 600; } .pill.limpia { background: #f3f6f6; border-style: dashed; }
.bd { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.unidadesP tbody tr { cursor: pointer; } .unidadesP th { white-space: normal; vertical-align: bottom; } .unidadesP td.mal { color: var(--mal); font-weight: 600; }
.unidadesP tfoot td { font-weight: 700; background: #f3f7f8; border-top: 2px solid var(--linea); }

.ctlv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 8px; } .ctlv .segmento { flex-wrap: wrap; }

.chev { display: inline-block; width: 18px; color: #0f5560; font-weight: 700; cursor: pointer; user-select: none; } .chev:hover { color: #1f9d8a; } tr.subv td { background: #f4f9fa; font-size: 12.5px; } tr.subv td:first-child { padding-left: 30px; } tr.subv.sel td { background: #e1f0f2; }

.matrizAus td.dia { font-size: 12.5px; white-space: nowrap; } .matrizAus th.dia { white-space: nowrap; }
.ctlP .nota { margin-top: 10px; } .controlesP .numsem { text-transform: none; letter-spacing: 0; }

/* ===== Reportes de Cosecha ===== */
.tcos th, .tcos td { white-space: nowrap; } .tcos th.g { text-align: center; background: #e4eef0; } .tcos tr.sub td { font-weight: 700; background: #eef5f6; } .tcos tr.sub2 td { font-weight: 600; background: #f6fafb; } .tcos tr.tot td { font-weight: 700; background: #f3f7f8; border-top: 2px solid var(--linea); }
.tcos td.c-rojo { color: #b3261e; font-weight: 700; } .tcos td.c-amar { color: #a66d00; font-weight: 700; } .tcos td.c-verde { color: #1c7c54; font-weight: 700; } .tcos .rk { display: inline-block; min-width: 22px; text-align: right; color: #6b8a90; font-size: 11px; margin-right: 4px; }
.cos-act { margin-top: 8px; font-size: 12.5px; color: #46676d; } .nota-pie { padding: 6px 4px; }
.mx td.mx-et, .mx th.mx-et { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 210px; text-align: left; } .mx thead th.mx-et { background: #e4eef0; } .mx td.tot { font-weight: 700; background: #f3f7f8; } .tcos th.g { text-align: center; background: #e4eef0; border-left: 1px solid #fff; }
.slicer-lista { display: flex; flex-direction: column; gap: 4px; } .slicer-lista .et { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--suave); } .slicer-lista .lista-f { max-height: 118px; overflow: auto; border: 1px solid #c8d3d6; border-radius: 8px; padding: 6px 10px; background: #fff; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2px 10px; } .slicer-lista label { font-size: 12.5px; display: flex; gap: 6px; align-items: center; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--tinta, #16343a); flex-direction: row; }

/* ===== Reportes de Cosecha: colores del Power BI (encabezados índigo #20124D, filas azul claro #DAE8F4, totales azul marino #283A5C, líneas #1F4E78) ===== */
.tabla.tcos thead th, .tabla.tcos th.g { background: #20124D; color: #fff; font-weight: 600; text-align: center; border-left: 1px solid #1F4E78; border-bottom: 1px solid #1F4E78; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.tabla.tcos thead th.l, .tabla.tcos thead th.mx-et { text-align: left; }
.tabla.tcos td { border-left: 1px solid #1F4E78; border-bottom: 1px solid #e2e9f2; } .tabla.tcos td.l, .tabla.tcos td.mx-et { background: #DAE8F4; color: #0b1a2b; font-weight: 700; font-size: 12.5px; }
.tabla.tcos tr.tot td, .tabla.tcos td.tot { background: #283A5C; color: #fff; font-weight: 700; border-top: 0; } .tabla.tcos tr.sub td { background: #c9dcee; color: #0b1a2b; font-weight: 700; } .tabla.tcos tr.sub td.l { background: #b9d0e8; }
.tabla.tcos tr.f-lima td.mx-et, .tabla.tcos tr.f-lima td.tot { background: #EFF75D; color: #1b2a00; } .tabla.tcos tr.f-azul td.mx-et, .tabla.tcos tr.f-azul td.tot { background: #C6E2FC; color: #0b2a4a; } .tabla.tcos tr.f-gris td.mx-et, .tabla.tcos tr.f-gris td.tot { background: #E6E6E6; color: #222; }
.tabla.tcos td.c-rojo, .kb.c-rojo { background: #A20D0D !important; color: #fff !important; font-weight: 700; } .tabla.tcos td.c-amar, .kb.c-amar { background: #a38600 !important; color: #fff !important; font-weight: 700; } .tabla.tcos td.c-verde, .kb.c-verde { background: #02903B !important; color: #fff !important; font-weight: 700; }
.kb.c-rojo b, .kb.c-rojo small, .kb.c-amar b, .kb.c-amar small, .kb.c-verde b, .kb.c-verde small { color: #fff !important; }
.kpi-cos .kb { background: #F3F3F3; border: 1px solid #20124D; border-radius: 8px; } .kpi-cos .kb b { color: #20124D; }
#sFundos button.act, #sVal button.act { background: #20124D; color: #fff; } .ctlP h2 { color: #20124D; letter-spacing: .3px; }
/* Cosecha: las columnas se ajustan solas al contenido (más angostas si los datos son chicos; si no caben, la tabla se desplaza) */
.tabla.tcos { width: max-content; min-width: 0; max-width: none; } .tabla.tcos th, .tabla.tcos td { padding-left: 12px; padding-right: 12px; } .tabla.tcos td.n { min-width: 56px; } .mx td.mx-et, .mx th.mx-et { min-width: 0; }

/* agrupadores de reportes dentro de un segmento (p. ej. Cosecha → Reporte de Supervisores) */
.grp-t { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 16px 9px 30px; background: transparent; border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 13px; text-align: left; cursor: pointer; letter-spacing: .2px; } .grp-t:hover { background: rgba(255,255,255,.06); }
.grp-t .flecha { margin-left: auto; width: 13px; height: 13px; transition: transform .15s; } .grp.abierto > .grp-t .flecha { transform: rotate(90deg); } .grp:not(.abierto) .grp-sub { display: none; } .grp-sub a { padding-left: 52px !important; }

/* ampliar en Cosecha: la ventana ocupa toda la pantalla */
.velo-amp.completo { padding: 8px; } .velo-amp.completo .ventana-amp { width: 99vw; height: 97vh; max-height: none; } .velo-amp.completo .cuerpo-amp { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; } .velo-amp.completo .graf-amp { flex: 1; min-height: 300px; width: 100%; }
.velo-amp.completo .tabla-amp { flex: 1; min-height: 0; overflow: auto; } .velo-amp.completo .tabla-amp .tabla-caja { overflow: visible; } .velo-amp.completo .tabla-amp .tabla.tcos th, .velo-amp.completo .tabla-amp .tabla.tcos td { font-size: 14px; padding: 10px 14px; } .velo-amp.completo .tabla-amp .tabla.tcos thead th { position: sticky; top: 0; z-index: 2; }
.cab-vista:has(> .amp-cos) > h2 { flex: 1 1 auto; } .amp-cos { margin-left: 4px; }

/* subtotal por fundo en las matrices de ratios */
.mx td.sub, .mx th.sub { background: #E3EDF7; font-weight: 700; border-left: 2px solid #1F4E78; border-right: 2px solid #1F4E78; } .mx th.sub { color: #1b2a44; }

/* la fila Kg Exportables de las matrices va completa en amarillo (subtotales incluidos) */
.tabla.tcos.mx tr.f-lima td { background: #EFF75D !important; color: #1b2a00 !important; }
.tabla.tcos.mx tr.f-azul td { background: #C6E2FC !important; color: #0b2a4a !important; } .tabla.tcos.mx tr.f-gris td { background: #E6E6E6 !important; color: #222 !important; }

/* listas con casillas dentro de los controles de una página: las etiquetas no heredan el estilo de los rótulos de los controles */
.controlesP .ms .lista label { flex-direction: row; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; color: var(--texto, inherit); gap: 8px; } .controlesP .ms .lista label .n { margin-left: auto; }

/* tablas por ruta de Control operativo: muchas filas, se desplazan dentro de su cuadro y el encabezado queda fijo */
.tabla-caja.alta { max-height: 560px; overflow: auto; } .tabla-caja.alta .mu thead th { position: sticky; z-index: 3; } .tabla-caja.alta .mu thead tr:first-child th { top: 0; } .tabla-caja.alta .mu thead tr:nth-child(2) th { top: 28px; } .tabla-caja.alta .mu thead th.lado { z-index: 4; } .mu tr.fila th.lado { cursor: pointer; } .mu tr.sel th.lado { background: #e3f0f1; box-shadow: inset 3px 0 0 #1f9d8a; }

/* Proyección de cierre: un cuadro por fundo con sus totales arriba */
.cf-tot { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; } .cf-b { background: #20124D; color: #fff; border-radius: 8px; padding: 4px 12px; text-align: center; min-width: 92px; } .cf-b small { display: block; font-size: 10px; opacity: .8; text-transform: uppercase; letter-spacing: .3px; } .cf-b b { font-size: 15px; }

/* Kg/Jr acumulado: filtro de fecha desplegable, encabezado compacto y tablas ordenadas */
.grupo-f { display: flex; flex-direction: column; gap: 3px; } .et-f { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--suave); } .grupo-f .ms > button { min-width: 170px; height: 34px; }
.tabla-caja.alta .tabla.tcos thead th { position: sticky; top: 0; z-index: 3; } .tabla-caja.alta .tabla.tcos tr.tot td { position: sticky; bottom: 0; z-index: 2; }
.tarjeta.arriba { align-self: start; }

/* Calidad Campo: barra de título azul de cada página y títulos de gráfico como en el Power BI */
.cal-titulo { background: #094780; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .3px; padding: 18px 22px; border-radius: 12px; margin-bottom: 12px; } .cal-h2 { color: #094780; font-size: 13px; letter-spacing: .2px; }

.cal-card { border: 1px solid #1B2E59; border-radius: 4px; } .cal-filtros { margin-bottom: 8px; }

.rango-sem { display: flex; align-items: center; gap: 6px; } .rango-sem select { height: 34px; min-width: 84px; } .rango-sem span { color: var(--suave); font-size: 12px; }

/* ===== Calidad Campo: presentación profesional ===== */
.cal-titulo { background: linear-gradient(120deg, #083a6b 0%, #0b5fae 100%); box-shadow: 0 6px 18px rgba(9,71,128,.25); border: 0; letter-spacing: .6px; display: flex; align-items: center; gap: 12px; } .cal-titulo::before { content: ""; width: 8px; height: 26px; border-radius: 4px; background: #41A4FF; }
.cal-kpis { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; } .cal-kpi { flex: 1 1 150px; background: #fff; border: 1px solid #d6e2ef; border-left: 4px solid #0b5fae; border-radius: 12px; padding: 10px 14px; box-shadow: 0 3px 10px rgba(9,71,128,.07); } .cal-kpi b { display: block; font-size: 19px; color: #083a6b; } .cal-kpi span { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #6b7c93; }
.cal-card { border: 1px solid #d6e2ef; border-radius: 14px; box-shadow: 0 4px 16px rgba(9,71,128,.08); background: #fff; }
.cal-card .cab-vista { align-items: center; gap: 10px; } .cal-h2 { color: #083a6b; font-size: 14px; letter-spacing: .3px; flex: 1 1 auto; }
.cal-tools { display: flex; gap: 6px; margin-left: auto; } .cal-tools button { display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 9px; justify-content: center; border: 1px solid #c8d8ea; background: #f4f8fc; color: #0b5fae; border-radius: 9px; font-weight: 700; font-size: 12px; cursor: pointer; transition: background .15s, transform .1s; } .cal-tools button:hover { background: #e3effb; transform: translateY(-1px); } .cal-tools button:active { transform: none; }
.cal-tools-amp .btn { height: 32px; }
.cal-filtros, .cal-card .controlesP, .ctlP .controlesP { background: linear-gradient(180deg, #f7fafe, #eef4fb); border: 1px solid #dbe6f2; border-radius: 12px; padding: 10px 12px; gap: 12px; }
.cal-card .ms > button, .ctlP .ms > button { border-radius: 999px; border-color: #c8d8ea; background: #fff; font-weight: 600; color: #1B2E59; transition: box-shadow .15s, border-color .15s; } .cal-card .ms > button:hover, .ctlP .ms > button:hover { border-color: #0b5fae; box-shadow: 0 0 0 3px rgba(11,95,174,.12); }
.cal-card .ms.con > button, .ctlP .ms.con > button { background: #0b5fae; border-color: #0b5fae; color: #fff; } .cal-card .ms.con > button::after, .ctlP .ms.con > button::after { color: #fff; }
.cal-card .ms .panel { border-radius: 12px; box-shadow: 0 14px 36px rgba(9,71,128,.22); }
.cal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 2px 12px; min-height: 26px; } .cal-chip { display: inline-flex; align-items: center; gap: 4px; background: #e3effb; color: #083a6b; border: 1px solid #bcd6f0; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12px; font-weight: 600; } .cal-chip button { border: 0; background: #0b5fae; color: #fff; width: 18px; height: 18px; border-radius: 50%; line-height: 16px; cursor: pointer; font-size: 13px; padding: 0; }
.cal-limpia { border: 0; background: transparent; color: #0b5fae; font-weight: 700; font-size: 12px; cursor: pointer; text-decoration: underline; } .cal-sinfiltro { font-size: 12px; color: #8a9bb0; }
.rango-sem .atajo { height: 28px; border: 1px solid #c8d8ea; background: #fff; color: #0b5fae; border-radius: 999px; padding: 0 10px; font-weight: 700; font-size: 11px; cursor: pointer; } .rango-sem .atajo:hover { background: #e3effb; }
.cal-amp .ventana-amp { background: #fff; } .cal-amp .cab-amp { background: linear-gradient(120deg, #083a6b, #0b5fae); color: #fff; border-radius: 12px 12px 0 0; } .cal-amp .cab-amp h2 { color: #fff; } .cal-amp .cal-tools button { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; } .cal-amp .cal-tools button:hover { background: rgba(255,255,255,.28); }
.velo-amp.completo .graf-amp-tira { flex: 0 0 120px; min-height: 100px; }

/* ===== Calidad Campo: matrices de defectos (MP y Descarte) ===== */
.cal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; } .cal-grid .tarjeta { margin: 0; min-width: 0; } @media (max-width: 1100px) { .cal-grid { grid-template-columns: minmax(0, 1fr); } }
.cal-h2-chico { font-size: 12px; font-weight: 600; color: #6b7c93; }
.mx-wrap { overflow: auto; max-height: 560px; border: 1px solid #d6e2ef; border-radius: 10px; } .mx-amp .mx-wrap { max-height: none; height: 100%; }
.mx { border-collapse: separate; border-spacing: 0; font-size: 11.5px; width: max-content; min-width: 100%; }
.mx th, .mx td { padding: 3px 7px; height: 24px; white-space: nowrap; border-right: 1px solid #e3ebf4; border-bottom: 1px solid #eef3f8; text-align: right; box-sizing: border-box; }
.mx th.mx-h { position: sticky; top: 0; z-index: 3; background: #09114F; color: #fff; font-weight: 700; text-align: center; } .mx th.mx-t, .mx th.mx-d, .mx th.mx-tot { z-index: 5; }
.mx .mx-t { position: sticky; left: 0; min-width: 74px; max-width: 74px; text-align: left; background: #fff; z-index: 2; font-weight: 700; color: #09114F; } .mx .mx-d { position: sticky; left: 74px; min-width: 190px; max-width: 190px; text-align: left; background: #fff; z-index: 2; overflow: hidden; text-overflow: ellipsis; } .mx .mx-tot { position: sticky; left: 264px; min-width: 64px; text-align: right; z-index: 2; font-weight: 700; color: #09114F; border-right: 2px solid #b8c7d9; }
.mx td.mx-gris { background: #C0C0C0; } .mx td.mx-c { color: #06376D; } .mx td.mx-c.rojo { color: #F40012; font-weight: 700; }
.mx tr.mx-sub td { background: #E6E6E6; color: #09114F; font-weight: 700; } .mx tr.mx-sub td.mx-c { color: #09114F; } .mx tr.mx-gt td { background: #D2D2D2; color: #09114F; font-weight: 800; border-top: 2px solid #09114F; }
.mx tr:hover td:not([style]) { filter: brightness(.97); }
.mx-nota { margin-top: 6px; font-size: 11.5px; color: #8a9bb0; }
.mx-card .cab-vista { align-items: center; }

/* ===== Calidad Campo: matrices que caben en pantalla y letra más grande ===== */
.cal-grid { grid-template-columns: minmax(0, 1fr) !important; }
.mx-card .mx-host { width: 100%; }
.mx-wrap { max-height: none; overflow: visible; border: 0; }
.mx { table-layout: fixed; width: 100%; font-size: 12.5px; border-collapse: separate; border-spacing: 0; border: 1px solid #d6e2ef; border-radius: 8px; }
.mx th, .mx td { height: 27px; padding: 3px 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx th.mx-h { position: static; font-size: 12px; } .mx .mx-t, .mx .mx-d, .mx .mx-tot { position: static; min-width: 0; max-width: none; }
.mx .mx-d { padding-left: 8px; } .mx .mx-t { padding-left: 8px; }
.mx-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 8px; font-size: 13px; color: #1B2E59; } .mx-pager button { height: 30px; padding: 0 12px; border: 1px solid #c8d8ea; background: #f4f8fc; color: #0b5fae; border-radius: 9px; font-weight: 700; cursor: pointer; } .mx-pager button:hover { background: #e3effb; }
.mx-amp { overflow: auto; }
.graf { min-height: 360px; }

.mx th.mx-h { white-space: normal; word-break: break-all; line-height: 1.15; height: auto; font-size: 11.5px; padding: 4px 2px; }
.mx td.mx-c, .mx td.mx-tot { font-size: 12px; padding: 3px 1px; text-align: center; }

/* letra de los números más grande */
.mx { font-size: 13.5px; } .mx th.mx-h { font-size: 12.5px; } .mx td.mx-c, .mx td.mx-tot { font-size: 13.5px; } .mx th, .mx td { height: 29px; }
.cal-h2 { font-size: 16px; } .cal-kpi b { font-size: 22px; }

/* ===== Reporte General de Cosecha ===== */
/* Reporte General de Cosecha · Proyeccion Campaña: misma distribución que el informe (panel de filtros a la izquierda, dos matrices, velocímetro y barras a la derecha) */
.cg-bi { display: grid; grid-template-columns: minmax(auto, 886fr) minmax(auto, 964fr) minmax(230px, 428fr); gap: 12px; align-items: start; overflow-x: auto; font-size: 10.5px; }
.cg-m { min-width: min-content; border: 1px solid #1B2E59; border-radius: 4px; overflow: hidden; background: #fff; }
.cg-der { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cg-card { background: #fff; border: 1px solid #1B2E59; border-radius: 4px; padding: 8px 6px 4px; min-width: 0; }
.cg-tit { font-weight: 700; font-size: 14px; padding: 2px 6px 4px; } .cg-tit-c { text-align: center; color: #000; } .cg-tit-a { color: #12239e; }
.cg-wrap { background: #fff; }
.cg-tabla { border-collapse: collapse; width: 100%; font-size: inherit; color: #252423; table-layout: auto; }
.cg-tabla th.cg-h { background: #094780; color: #fff; font-weight: 700; text-align: center; padding: 4px 4px; line-height: 1.25; position: sticky; top: 0; z-index: 1; } .cg-tabla th.cg-e { text-align: left; min-width: 7.5em; }
.cg-tabla td { padding: 2px 5px; text-align: right; white-space: nowrap; border: 0; line-height: 1.55; } .cg-tabla td.cg-e { text-align: left; }
.cg-tabla .cg-n0, .cg-tabla tr.cg-emp td { font-weight: 700; } .cg-tabla .cg-n1 { padding-left: 1.4em; } .cg-tabla .cg-n2 { padding-left: 3.4em; } .cg-tabla tr.cg-fun td { font-weight: 400; } .cg-tabla tr.cg-emp td, .cg-tabla tr.cg-fun td, .cg-tabla tr.cg-mod td { border-bottom: 1px solid #f0f0f0; }
.cg-x { cursor: pointer; margin-right: .4em; color: #555; user-select: none; }
.cg-tabla tr.cg-tot td { background: #D0E4F7; font-weight: 700; position: sticky; bottom: 0; } .cg-tabla td.cg-pct { background: #D8ECFF; } .cg-tabla tr.cg-tot td.cg-pct { background: #D0E4F7; }
/* Reporte General de Cosecha · Proyeccion_Version_Semana */
#calCuerpo > .cg-card { margin-bottom: 12px; }
.cg-fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; } .cg-fila2 .cg-card, .cg-fila3 > .cg-card, .cg-col-k .cg-card { margin: 0; }
.cg-kpi { text-align: center; } .cg-tit-k { color: #12239e; text-align: center; font-size: 15px; }
.cg-kpis { display: flex; justify-content: space-around; gap: 10px; padding: 4px 4px 10px; } .cg-kpis > div { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cg-kpis span { font-size: 13px; font-weight: 700; color: #094780; } .cg-kpis b { font-size: clamp(20px, 2.1vw, 34px); color: #000; font-weight: 700; line-height: 1.25; }
.cg-fila3 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .8fr) minmax(280px, 1fr); gap: 12px; margin-bottom: 12px; align-items: stretch; } .cg-col-k { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cg-fila3 .cg-m { max-height: 330px; overflow: auto; font-size: 12px; } @media (max-width: 1100px) { .cg-fila2, .cg-fila3 { grid-template-columns: minmax(0, 1fr); } }
.cg-seg { display: flex; } .cg-seg button { border: 1px solid #c8d3d6; background: #fff; padding: 0 14px; height: 34px; font-weight: 700; cursor: pointer; color: #1B2E59; } .cg-seg button:first-child { border-radius: 8px 0 0 8px; } .cg-seg button:last-child { border-radius: 0 8px 8px 0; } .cg-seg button.sel { background: #094780; color: #fff; border-color: #094780; }

/* misma altura para tarjetas, velocímetro y matriz de hectáreas; el velocímetro ocupa el espacio disponible y la matriz hace scroll por dentro */
.cg-gcard { display: flex; flex-direction: column; min-height: 270px; } .cg-gcard .graf { flex: 1; min-height: 0; height: auto; }
.cg-mpiv { position: relative; min-height: 270px; overflow: hidden; padding: 0; } .cg-fila3 .cg-mpiv { max-height: none; } .cg-pivscroll { position: absolute; inset: 0; overflow: auto; }

/* Proyeccion_Version_Semana: tarjetas sin título (valor arriba, nombre debajo), velocímetro/matriz con sombra, gráficos sin recuadro, matriz con encabezado blanco como el informe */
.cg-kpi { border: 0; box-shadow: 0 2px 9px rgba(0,0,0,.22); text-align: left; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.cg-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; } .cg-kpis > div { align-items: flex-start; }
.cg-kpis b { font-size: clamp(22px, 1.9vw, 30px); font-weight: 600; color: #252423; line-height: 1.15; } .cg-kpis span { font-size: 13px; font-weight: 700; color: #094780; margin-top: 2px; } .cg-kpis span.neg { color: #000; }
.cg-gcard, .cg-mpiv { border: 0; box-shadow: 0 2px 9px rgba(0,0,0,.22); } .cg-gcard .cg-tit { font-size: 12px; text-align: center; }
.cg-mpiv .cg-tabla th.cg-h { background: #fff; color: #252423; border-bottom: 1px solid #ccc; } .cg-mpiv .cg-tabla td.cg-c { font-weight: 700; } .cg-mpiv .cg-tabla td { border-bottom: 1px solid #f0f0f0; } .cg-mpiv .cg-tabla tr.cg-tot td { background: #fff; border-top: 1px solid #999; }
.cg-bare { border: 0; background: transparent; padding: 0; } .cg-tit-big { font-size: 20px; padding: 4px 0 2px; }

.cg-fila3 { grid-template-columns: minmax(0, 1.3fr) minmax(200px, .9fr) minmax(240px, 1.1fr); } .cg-col-k .cg-kpi { height: 100%; box-sizing: border-box; }

/* Proyeccion_Hexasemanal: matrices semana › fecha */
.cg-bare2 { border: 0; background: #fff; padding: 0; margin-bottom: 12px; box-shadow: 0 2px 9px rgba(0,0,0,.18); }
.cg-hwrap { overflow: auto; max-height: 560px; }
.cg-hx { width: auto; min-width: 100%; font-size: 12px; font-family: Arial, sans-serif; } .cg-hx th.cg-h { padding: 4px 8px; font-size: 13px; position: sticky; z-index: 2; top: 0; } .cg-hx thead tr:nth-child(2) th.cg-h { top: 25px; } .cg-hx th.cg-ht { color: #fff; }
.cg-hx td { padding: 2px 8px; border-bottom: 1px solid #ececec; } .cg-hx td.cg-c { font-weight: 700; min-width: 86px; } .cg-hx td.cg-tc { color: #12239E; } .cg-hx td.cg-sh { background: #E6E6E6; }
.cg-hx td.cg-e { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; font-size: 11px; color: #000; white-space: nowrap; min-width: 120px; } .cg-hx td.cg-mn { font-size: 11px; color: #333; white-space: nowrap; font-weight: 400; text-align: left; }
.cg-hx .cg-n1 { padding-left: 22px !important; } .cg-hx .cg-n2 { padding-left: 40px !important; } .cg-hx tr.cg-tot td { background: #D0E4F7; border-top: 2px solid #094780; position: static; } .cg-hx tr.cg-tot td.cg-e { position: sticky; }

.cg-hx th.cg-semh { text-align: right; font-weight: 400; white-space: nowrap; } .cg-hx .cg-xc, .cg-hx .cg-x { cursor: pointer; user-select: none; font-weight: 400; margin: 0 4px; } .cg-hx td.cg-e .cg-x { color: #555; }
.cg-hx th.cg-gth { background: #094780; } .cg-hx td.cg-gt { background: #fff; color: #000; font-weight: 700; min-width: 86px; } .cg-hx td.cg-sh { background: #E6E6E6; }
.cg-hx tr.cg-tot td { background: #D6E6F5; border-top: 0; } .cg-hx tr.cg-tot td.cg-gt { background: #fff; } .cg-hx tr.cg-tot td.cg-e { background: #D6E6F5; } .cg-hx tr.cg-tot td.cg-mn { background: #D6E6F5; }
.cg-hx td.cg-mn { font-weight: 700; color: #000; }

/* matriz escalonada: una columna por nivel; solo la primera queda fija al desplazar */
.cg-hx td.cg-e { position: static; min-width: 56px; } .cg-hx td.cg-l0 { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 120px; } .cg-hx tr.cg-tot td.cg-l0 { background: #D6E6F5; } .cg-hx td.cg-e .cg-tl { font-weight: 700; }
.cg-hx td.cg-e .cg-x { margin-left: 0; }

/* R_Balance de Kg */
.cg-bal-fila { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 12px; margin-bottom: 12px; align-items: stretch; } .cg-bal-fila .cg-card { margin: 0; }
.cg-k2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .cg-k2 b { text-align: left; }
.cg-mpiv2 { padding: 0; overflow: hidden; } .cg-tb { font-size: 15px; } .cg-tb th.cg-h { background: #12239e; font-size: 15px; padding: 8px; } .cg-tb td { text-align: center; padding: 6px 8px; } .cg-tb td.cg-e { text-align: center; } .cg-tb tr.cg-tot td { background: #D0E4F7; font-weight: 700; }
@media (max-width: 1000px) { .cg-bal-fila { grid-template-columns: minmax(0, 1fr); } }

/* R_Balance de Kg: tabla zebra, tarjeta centrada y tabla de datos bajo las columnas */
.cg-tb tbody tr:nth-child(even) td { background: #EBEBEB; } .cg-tb tbody tr.cg-tot td { background: #D0E4F7 !important; } .cg-tb th.cg-h { white-space: normal; line-height: 1.2; } .cg-tb td, .cg-tb th { border-right: 1px solid #d8d8d8; } .cg-tb td:last-child, .cg-tb th:last-child { border-right: 0; }
.cg-k2 > div { align-items: center !important; } .cg-k2 b { text-align: center; font-size: clamp(26px, 2.4vw, 38px); font-weight: 500; }
.cg-balw { overflow-x: auto; background: #fff; border: 1px solid #ddd; } .cg-balin { background: #fff; }
.cg-baltab { border-collapse: collapse; table-layout: fixed; font-size: 12px; } .cg-baltab td { border: 1px solid #333; padding: 3px 2px; text-align: center; white-space: nowrap; color: #000; } .cg-baltab td.cg-bl { text-align: left; padding-left: 8px; font-weight: 400; } .cg-baltab td.cg-bl i { display: inline-block; width: 18px; height: 11px; margin-right: 8px; vertical-align: middle; } .cg-baltab tr.cg-bs td { font-weight: 400; border-top: 1px solid #333; }

/* interacción cruzada estilo Power BI: filas clicables, selección resaltada y el resto atenuado */
.cg-clic { cursor: pointer; } .cg-clic:hover td { background: #fff6d5 !important; } .cg-tb tr.cg-selr td { background: #FFE9A6 !important; font-weight: 700; } .cg-tb tr.cg-dim td { opacity: .45; }
.cg-baltab td.cg-selc { background: #FFE9A6; font-weight: 700; }
.cg-selhint { font-size: 12px; color: #46676d; margin: -2px 0 8px; }

/* interacción cruzada en las matrices hexasemanales */
.cg-hx .cg-lab { cursor: pointer; } .cg-hx .cg-lab:hover { text-decoration: underline; } .cg-hx th.cg-clic { cursor: pointer; } .cg-hx th.cg-clic:hover { background: #0d5aa3; } .cg-hx th.cg-selh { background: #b98700 !important; }
.cg-hx tr.cg-selr td { background: #FFE9A6 !important; } .cg-hx tr.cg-dim td { opacity: .45; }

/* interacción cruzada: matrices de Proyeccion Campaña */
.cg-bi .cg-tabla tr.cg-clic { cursor: pointer; } .cg-bi .cg-tabla tr.cg-selr td { background: #FFE9A6 !important; } .cg-bi .cg-tabla tr.cg-dim td { opacity: .5; } .cg-bi .cg-tabla tr.cg-clic:hover td { background: #fff6d5; }

/* R_Fruta Caída */
.cg-fc-fila { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; } .cg-fc-peq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; } .cg-fc-fila .cg-card, .cg-fc-peq .cg-card { margin: 0; min-width: 0; }
@media (max-width: 1100px) { .cg-fc-fila { grid-template-columns: minmax(0, 1fr); } .cg-fc-peq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* R_Fruta Caída: misma estructura que el informe (áreas a la izquierda, 2×2 de columnas apiladas a la derecha, empresa-módulo abajo) */
.cg-fc-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; } .cg-fc-izq { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .cg-fc-der { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.cg-fcard { background: #fff; border: 0; box-shadow: 0 2px 9px rgba(0,0,0,.18); border-radius: 2px; padding: 6px 8px 2px; min-width: 0; } .cg-fc-top .cg-fcard, .cg-fc-fila .cg-fcard { margin: 0; }
.cg-tit-fc { font-size: 12px; padding: 0 0 2px; color: #12239E; } .cg-sub { font-size: 12px; font-weight: 700; color: #1A237E; margin-bottom: 2px; }
.cg-leg { display: flex; gap: 14px; align-items: center; font-size: 11px; color: #333; margin-bottom: 2px; } .cg-leg b { font-weight: 700; color: #333; } .cg-leg span { display: inline-flex; align-items: center; gap: 4px; } .cg-leg i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.cg-fc-fila { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) !important; }
@media (max-width: 1100px) { .cg-fc-top { grid-template-columns: minmax(0, 1fr); } .cg-fc-der { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* R_Peso Baya */
.cg-pb-top { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; } .cg-pb-der { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .cg-pb-fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; margin-bottom: 12px; }
.cg-pb-top .cg-fcard, .cg-pb-fila .cg-fcard { margin: 0; } @media (max-width: 1100px) { .cg-pb-top, .cg-pb-fila { grid-template-columns: minmax(0, 1fr); } }

.cg-legc { cursor: pointer; padding: 1px 4px; border-radius: 3px; } .cg-legc:hover { background: #eef4fb; } .cg-legsel { background: #FFE9A6; font-weight: 700; }

/* R_Peso Jarra */
.cg-jr-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; } .cg-jr-fila { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; } .cg-fcard + .cg-fcard { margin-top: 0; } #calCuerpo > .cg-fcard { margin-bottom: 12px; }
.cg-jr-top .cg-fcard, .cg-jr-fila .cg-fcard { margin: 0; } @media (max-width: 1100px) { .cg-jr-top, .cg-jr-fila { grid-template-columns: minmax(0, 1fr); } }

/* Rendimiento_Fundo */
.cg-fila3b { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; } .cg-fila3b .cg-kpi { margin: 0; } @media (max-width: 1100px) { .cg-fila3b { grid-template-columns: minmax(0, 1fr); } }

/* Rendimiento_Fundo: tres gráficos apilados a la izquierda y tarjetas + barras por fundo a la derecha (como el informe) */
.cg-re-top{display:grid;grid-template-columns:minmax(0,3.2fr) minmax(260px,1fr);gap:12px;margin-bottom:12px}
.cg-re-izq{padding:6px 8px}
.cg-re-der{display:flex;flex-direction:column;gap:12px;min-width:0}
@media (max-width:900px){.cg-re-top{grid-template-columns:minmax(0,1fr)}}

/* Reporte General de Costos */
.cg-co-tarj{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}
.cg-co-fila1{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1.4fr);gap:12px;margin-bottom:12px}
.cg-co-fila2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:12px}
@media (max-width:1100px){.cg-co-fila1,.cg-co-fila2,.cg-co-tarj{grid-template-columns:minmax(0,1fr)}}

/* Detalle Costo: matriz de costo por kg */
.cg-dt-top{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,3fr);gap:12px;margin-bottom:12px}
.cg-dt-kpi{align-self:stretch;display:flex;align-items:center}
.cg-dt-kpi .cg-kpis{flex-wrap:wrap;gap:14px 22px}
.cg-dt-card{padding:0;overflow:hidden}
.cg-dt-ayuda{padding:10px 14px;font-size:12px;color:#55607a;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;border-bottom:1px solid #e6eaf2}
.dt-leg{padding:2px 8px;border-radius:10px;font-weight:600;font-size:11px}
.dt-leg.dt-mal{background:#fde8e8;color:#b42318}.dt-leg.dt-bien{background:#e3f6ea;color:#067647}
.cg-dt-wrap{overflow:auto;max-height:68vh}
.cg-dt{border-collapse:separate;border-spacing:0;font-size:12.5px;min-width:100%;font-variant-numeric:tabular-nums}
.cg-dt thead th{position:sticky;top:0;z-index:3;background:linear-gradient(180deg,#0f4c81,#0b3a66);color:#fff;padding:8px 10px;text-align:center;font-weight:700;white-space:nowrap;border-right:1px solid rgba(255,255,255,.12)}
.cg-dt thead th.dt-nom{left:0;z-index:5;text-align:left;min-width:300px}
.cg-dt .dt-nom{position:sticky;left:0;z-index:2;background:#fff;text-align:left;font-weight:700;color:#0b2a4a;border-bottom:1px solid #e6eaf2;border-right:1px solid #e6eaf2;white-space:nowrap}
.cg-dt .dt-med{position:sticky;left:300px;z-index:2;background:#f4f7fb;color:#3a4560;font-weight:600;text-align:left;padding:4px 10px;white-space:nowrap;border-bottom:1px solid #eef1f6;border-right:1px solid #dfe5ef;min-width:130px}
.cg-dt thead th.dt-med{left:300px;z-index:5}
.cg-dt td{padding:4px 10px;text-align:right;border-bottom:1px solid #eef1f6;white-space:nowrap}
.cg-dt tr.dt-p td{border-bottom:1px solid #d7deea;color:#6a7690}
.cg-dt td.dt-e{font-weight:700;color:#0b2a4a}
.cg-dt td.dt-mal{background:#fde8e8;color:#b42318}.cg-dt td.dt-bien{background:#e3f6ea;color:#067647}
.cg-dt td.dt-tot,.cg-dt th.dt-tot{border-left:2px solid #0f4c81;background-clip:padding-box}
.cg-dt tr.dt-n0 .dt-nom,.cg-dt tr.dt-n0 td{background-color:#e8f0fb}
.cg-dt tr.dt-n0 .dt-med{background:#dbe7f7}
.cg-dt tr.dt-n1 .dt-nom{background:#f1f5fb}
.cg-dt tr.dt-n3 .dt-nom{font-weight:500;color:#3a4560}
.cg-dt tr.dt-sel .dt-nom{box-shadow:inset 4px 0 0 #E66C37}
.cg-dt tbody tr:hover td{filter:brightness(.97)}
.dt-tg{width:20px;height:20px;border:1px solid #b9c6dc;background:#fff;border-radius:5px;color:#0f4c81;font-weight:800;line-height:1;cursor:pointer;margin-right:8px;padding:0}
.dt-tg.dt-vacio{display:inline-block;border:0;background:none;cursor:default}
.dt-txt{cursor:pointer}.dt-txt:hover{text-decoration:underline}
@media (max-width:1000px){.cg-dt-top{grid-template-columns:minmax(0,1fr)}}

/* Proyección Campaña: las dos matrices siempre al mismo nivel (misma altura de encabezado y de fila) */
.cg-bi .cg-tabla thead th.cg-h { height: 60px; box-sizing: border-box; vertical-align: middle; white-space: normal; overflow: hidden; }
.cg-bi .cg-tabla tbody td { height: 21px; box-sizing: border-box; line-height: 1.3; }
.cg-bi .cg-tabla tbody tr.cg-tot td { height: 24px; }

/* Herramientas de cada gráfico (ampliar / imagen / Excel) y descarga de la tabla de Data_Proyeccion_Version_Semana */
.cg-conherr{position:relative}
.cg-tools{position:absolute;top:4px;right:6px;z-index:6;margin:0;opacity:.5;transition:opacity .15s}
.cg-conherr:hover .cg-tools,.cg-tools:focus-within{opacity:1}
.cg-tools button{height:26px;min-width:26px;padding:0 6px}
.cg-toast{position:fixed;left:50%;bottom:22px;transform:translateX(-50%) translateY(20px);background:#0b2a4a;color:#fff;padding:10px 18px;border-radius:10px;font-size:13px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.3);opacity:0;pointer-events:none;transition:all .25s;z-index:90}
.cg-toast.ver{opacity:1;transform:translateX(-50%) translateY(0)}
.cg-dv-cab{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 8px 8px}
.cg-dv-tabla{max-height:70vh;overflow:auto}
.cg-dv-tabla .cg-tabla thead th{position:sticky;top:0;z-index:2}

/* Hexasemanal: cada cuadro se ajusta al tamaño de sus datos */
.cg-bare2 { width: fit-content; max-width: 100%; }
.cg-hx { min-width: 0; }
.cg-hx th.cg-clic .cg-xc { margin: 0 6px 0 0; }

/* Ejes movibles y ampliado con zoom */
.cal-amp .ventana-amp { position: relative; }
.cg-ejes { position: absolute; top: 40px; right: 6px; z-index: 12; background: #fff; border: 1px solid #c8d8ea; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.25); padding: 10px 12px; min-width: 300px; max-width: min(520px, 94vw); font-size: 12px; }
.cg-ejes-amp { top: 58px; right: 18px; }
.cg-ejes-t { font-weight: 700; color: #0b2a4a; margin-bottom: 8px; }
.cg-ejes-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid #eef1f6; }
.cg-ejes-n { color: #3a4560; font-weight: 600; }
.cg-ejes-b { display: inline-flex; gap: 4px; flex: none; }
.cg-ejes-b button { height: 28px; min-width: 30px; border: 1px solid #c8d8ea; background: #f4f8fc; color: #0b5fae; border-radius: 8px; font-weight: 800; cursor: pointer; }
.cg-ejes-b button:hover { background: #e3eefb; }

/* pie de cada hoja: bases de datos y su última modificación (pequeño) */
.cg-fuentes { margin-top: 3px; font-size: 11px; color: #6a7f84; display: flex; flex-wrap: wrap; gap: 2px 14px; line-height: 1.5; }
.cg-fuentes .cg-fu b { font-weight: 600; color: #46676d; }

.cg-dv-tabla { position: relative; overflow: auto; max-height: 70vh; }
.cg-m.cg-dv-card { overflow: visible; }

/* Menú lateral plegable (pantalla completa), pantalla de inicio vacía y carga por demanda */
#bMenu { display: inline-flex; align-items: center; }
.shell.lat-oculto { grid-template-columns: minmax(0, 1fr); } .shell.lat-oculto .lateral { display: none; }
@media (max-width: 900px) { .shell.lat-oculto { grid-template-columns: 1fr; } }
.inicio-vacio { padding: 40px 16px; text-align: center; color: #7a8f94; font-size: 15px; }
.cargando-rep { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 16px; color: #46676d; font-weight: 600; }
.cargando-rep .spin { width: 22px; height: 22px; border: 3px solid #cfe3e6; border-top-color: #0b3f4a; border-radius: 50%; animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* botón «Ampliar» agregado a las tarjetas que no lo traían */
.amp-gen { border: 1px solid #c8d3d6; background: #fff; color: var(--marca); width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; padding: 0; flex: none; cursor: pointer; margin-left: auto; } .amp-gen:hover { background: var(--marca-claro); }
.amp-rel { position: relative; } .amp-flot { position: absolute; top: 8px; right: 8px; z-index: 5; }
.velo-amp.completo .tabla-amp { flex: 1; min-height: 0; overflow: auto; } .velo-amp.completo .tabla-amp table { font-size: 13px; } .velo-amp.completo .tabla-amp thead th { position: sticky; top: 0; z-index: 2; }

/* Comparativo anual */
.var-mal { color: #b42318; font-weight: 700; } .var-bien { color: #067647; font-weight: 700; }

.velo-amp.completo .tabla-amp table { font-size: 14px; } .velo-amp.completo .tabla-amp td, .velo-amp.completo .tabla-amp th { padding-top: 8px; padding-bottom: 8px; }

/* Comparativo anual · «¿Qué explica el cambio?» */
#cmpExplica .grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
@media (max-width:1100px){#cmpExplica .grid2{grid-template-columns:minmax(0,1fr)}}
#cmpExplica .lectura{margin:6px 0 12px;padding-left:20px;font-size:13px;line-height:1.55;color:#17424a}
#cmpExplica .lectura li{margin:3px 0}
#cmpExplica .fila-esc td{background:#fff8e1;border-top:2px solid #e0a100}
#cmpExplica .tabla-caja{overflow-x:auto}
#cmpExplica td.n,#cmpExplica th.n{white-space:nowrap}
#cmpUniTabla .fila-n0 td{font-weight:800;color:#0a3f48;background:#f3f8f9}
#cmpUniTabla .fila-n1 td{font-weight:700}
#cmpUniTabla .fila-n2 td{color:#4a666c}
#cmpUniTabla .tg{display:inline-block;width:12px;color:#0f5560}
#cmpUniTabla tr.abre:hover td{background:#e6f0f2}
#cmp3cTabla .fila-n0 td{font-weight:800;color:#0a3f48;background:#f3f8f9}#cmp3cTabla .fila-n1 td{color:#4a666c}#cmp3cTabla .tg{display:inline-block;width:12px;color:#0f5560}#cmp3cTabla tr.abre:hover td{background:#e6f0f2}#cmp3cTabla td.n,#cmp3cTabla th.n{white-space:nowrap}
