/* Parrilla (como la de Circet, reunión del 23/11), duraciones aprendidas y llamada del hueco urgente */
.cuerpo.v-parrilla, .cuerpo.v-duraciones { overflow: auto; gap: 10px; }
.cuerpo.v-parrilla > *, .cuerpo.v-duraciones > * { flex: none; }
.pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.dias { display: flex; background: var(--panel); border: 1px solid var(--linea); border-radius: 11px; padding: 3px; box-shadow: var(--sombra); }
.dias a { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--txt2); cursor: pointer; transition: background .15s, color .15s; }
.dias a.on { background: var(--teal); color: #fff; }
.pf { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.pf > span { color: var(--txt3); margin-right: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; font-size: 10.5px; }
.pf a { padding: 4px 10px; border-radius: 20px; border: 1px solid var(--linea2); background: var(--panel); color: var(--txt2); cursor: pointer; white-space: nowrap; transition: border-color .15s; }
.pf a:hover { border-color: var(--teal); }
.pf a.on { background: var(--teal-s); border-color: var(--teal); color: var(--teal2); font-weight: 600; }
.fuentes { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--txt3); }
.fuentes span { padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.7); border: 1px solid var(--linea); }
.fuentes b { color: var(--txt2); font-weight: 600; margin-right: 6px; }
.palertas { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.pa { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.pa i { grid-row: span 2; font-style: normal; font-weight: 800; font-size: 14px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.pa b { font-size: 19px; line-height: 1; }
.pa span { font-size: 11.5px; color: var(--txt3); line-height: 1.2; }
.pa.rojo i { background: var(--rojo-s); color: var(--rojo); }
.pa.amber i { background: var(--amber-s); color: var(--amber); }
.pa.violeta i { background: var(--violeta-s); color: var(--violeta); }
.pa.azul i { background: #ddf3f5; color: #237d86; }
.pa.rosa i { background: #fbe3f0; color: #b2427c; }
.pa.cero { opacity: .55; box-shadow: none; }
.pa.cero i { background: var(--panel2); color: var(--txt3); }
.pgrid-t { padding: 10px 12px; overflow-x: auto; }
.pgrid { display: flex; flex-direction: column; font-size: 11px; min-width: 1120px; }
.pfila { margin-top: 0; display: grid; grid-template-columns: 158px 54px 34px 72px repeat(14, minmax(58px, 1fr)); gap: 2px; margin-bottom: 2px; align-items: stretch; }
.pfila > div { padding: 5px 3px; border-radius: 5px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.pfila.cab > div { color: var(--txt3); font-weight: 600; font-size: 10.5px; justify-content: center; }
.pfila.cab .pn { justify-content: flex-start; }
.pfila.cab .ahora-h { background: var(--teal); color: #fff; }
.pfila.prov > div { background: #13202e; color: #fff; font-weight: 700; }
.pfila.gest > div { background: #e2e8ee; color: var(--txt); font-weight: 600; }
.pfila.total > div { background: #13202e; color: #fff; font-weight: 700; margin-top: 4px; }
.pfila.prov > div:empty, .pfila.gest > div:empty, .pfila.total > div:empty { background: transparent; }
.pc.sub { justify-content: center; font-size: 10.5px; }
.pn { flex-direction: column; align-items: flex-start !important; justify-content: center; line-height: 1.15; }
.pfila.tec .pn { cursor: pointer; background: var(--panel2); }
.pfila.tec .pn b { font-size: 12px; }
.pfila.tec .pn span { font-size: 10px; color: var(--txt3); }
.pfila.tec.sel .pn { background: var(--teal-s); box-shadow: inset 3px 0 0 var(--teal); }
.ag { justify-content: center; font-weight: 700; font-size: 10px; background: #e3f5ec; color: #1f6b4f; }
.ag.sinctrl { background: #fff4d6; color: #8a5a00; }
.ag.desc { background: #e7e9ec; color: var(--txt3); }
.sd { justify-content: center; font-weight: 700; background: #e3f5ec; color: #1f6b4f; }
.sd.mas { background: #fde5c8; color: #9a5a12; }
.pt { justify-content: flex-end; font-weight: 700; background: var(--panel2); }
.pt.ok { background: #d8f0e3; color: #17603f; }
.pt.sobre { background: #1f6b4f; color: #fff; }
.pt.media { background: #fdedd3; color: #9a5a12; }
.pt.baja { background: #fadcdb; color: #b23431; }
.pc { justify-content: center; gap: 3px; font-size: 10px; letter-spacing: -.2px; position: relative; overflow: visible !important; transition: transform .12s, box-shadow .12s; }
.pc[data-psel] { cursor: pointer; }
.pc[data-psel]:hover { transform: translateY(-1px); box-shadow: 0 3px 8px -3px rgba(16,32,48,.35); z-index: 1; }
.pc > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc .ics { position: absolute; top: -5px; right: -2px; font-style: normal; font-weight: 800; font-size: 9px; line-height: 1; padding: 2px 4px; border-radius: 6px; background: #13202e; color: #fff; z-index: 2; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pc.k-prev { background: #fff; border: 1px solid var(--linea2); }
.pc.k-curso { background: #d6efdf; color: #17603f; font-weight: 600; }
.pc.k-cerrado { background: #1f6b4f; color: #fff; }
.pc.k-rojo { background: var(--rojo); color: #fff; font-weight: 600; }
.pc.k-riesgo { box-shadow: inset 0 0 0 2px var(--violeta); background: var(--violeta-s); color: #3c35a8; font-weight: 700; }
.pc.k-rec { background: #d4f0f3; color: #1d6f78; }
.pc.k-canc { background: #fde68a; color: #b23431; font-weight: 700; }
.pc.k-dev { background: #dfe3e8; color: #6b7785; }
.pc.k-cubre-p { background: #eef8f1; }
.pc.k-cubre-c { background: #dcebe3; }
.pc.k-hueco { background: #f9dcec; }
.pc.k-hueco.k-pasado { background: #fbeef5; }
.pc.k-inc { background: #7a52c7; color: #fff; font-size: 10px; }
.pc.k-sobre-inc { box-shadow: inset 0 0 0 2px #7a52c7; }
.pc.k-fuera { background: repeating-linear-gradient(135deg, #dde2e7 0 3px, #eef1f4 3px 6px); color: var(--txt3); }
.pc.selc { outline: 2px solid var(--teal); outline-offset: 1px; }
.pley { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 11px; color: var(--txt3); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--linea); }
.pley span { display: flex; align-items: center; gap: 5px; }
.pley .pc { width: 16px; height: 11px; padding: 0; display: inline-block; border-radius: 3px; }
.pley .simb { margin-left: auto; }
.pdet { padding: 12px 14px; }
.pdet-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.pdet-cab h3 { margin: 0; }
.pdet-cab h3 a { font-size: 11px; color: var(--teal2); cursor: pointer; margin-left: 6px; font-weight: 500; }
.pres { display: flex; flex-wrap: wrap; gap: 5px; }
.r { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--linea2); color: var(--txt2); white-space: nowrap; }
a.r { cursor: pointer; }
a.r b { margin-left: 3px; }
a.r.on { outline: 2px solid var(--teal); }
.r.ok { background: #d8f0e3; border-color: #b6e0c8; color: #17603f; }
.r.rojo { background: var(--rojo-s); border-color: #efb3b1; color: #b23431; }
.r.curso { background: #e6f5ec; color: #17603f; }
.r.azul { background: #d4f0f3; border-color: #a9dfe5; color: #1d6f78; }
.r.amar { background: #fdf3c4; border-color: #f2dc7a; color: #8a5a00; }
.r.gris { background: #e7e9ec; color: #6b7785; }
.ptabla { font-size: 11.5px; max-height: 300px; overflow: auto; }
.ptr { display: grid; grid-template-columns: 150px 110px 110px 84px 150px 50px 44px 52px 76px minmax(200px, 1fr); gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--linea); align-items: center; }
.ptr.cab { color: var(--txt3); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.ptr .mono { font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.ptr .notas { color: var(--txt2); }

/* duraciones aprendidas */
.dur-v { display: grid; grid-template-columns: 330px 1fr; gap: 14px; align-items: start; }
.cnd { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--linea); margin-bottom: 6px; cursor: pointer; font-weight: 500; transition: background .15s, border-color .15s; }
.cnd i { width: 30px; height: 17px; border-radius: 9px; background: #d3dce5; position: relative; flex: none; transition: background .18s; }
.cnd i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.cnd.on { border-color: #bfe6e0; background: var(--teal-s); }
.cnd.on i { background: var(--teal); }
.cnd.on i::after { transform: translateX(13px); }
.cnd.fijo { cursor: default; }
.cnd em { margin-left: auto; font-size: 10.5px; color: var(--txt3); font-style: normal; }
.nota-cnd { font-size: 12px; color: var(--txt2); margin: 10px 0; }
.nota-cnd b { font-size: 18px; color: var(--teal2); margin-right: 3px; }
.aviso-cnd { font-size: 12px; line-height: 1.45; padding: 10px 12px; border-radius: 10px; background: var(--amber-s); border: 1px solid #f0c48f; color: #7a4a12; margin-top: 8px; }
.aviso-cnd.gris { background: var(--panel2); border-color: var(--linea); color: var(--txt2); }
.dur-cab, .dur-f { display: grid; grid-template-columns: 1fr 240px 80px 70px 80px; gap: 12px; align-items: center; }
.dur-cab { font-size: 10.5px; color: var(--txt3); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; padding-bottom: 6px; border-bottom: 1px solid var(--linea); }
.dur-f { padding: 8px 0; border-bottom: 1px solid var(--linea); font-size: 12.5px; }
.dur-f .comb { color: var(--txt); font-weight: 500; }
.barras2 { display: flex; flex-direction: column; gap: 3px; }
.barras2 i, .barras2 em { display: block; height: 6px; border-radius: 3px; }
.barras2 i { background: #cfd9e3; }
.barras2 em { background: var(--teal); }
.barras2 small { font-size: 11px; color: var(--txt3); }
.dur-f .mas { color: var(--rojo); }
.dur-f .menos { color: var(--teal2); }
.dur-f .usa { font-size: 11px; font-weight: 700; color: var(--teal2); }
.dur-f.poca { color: var(--txt3); }
.dur-f.poca .usa { color: var(--txt3); }

/* hueco urgente: llamada al cliente */
.opc span small { display: block; font-size: 10.5px; color: var(--txt3); }
.opc.no { opacity: .55; }
.sin-ai { font-size: 11.5px; color: var(--txt3); margin-top: 6px; }
.llamada { border: 1px solid var(--linea); border-radius: 12px; padding: 10px; margin: 8px 0; background: var(--panel2); }
.ll-cab { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; color: var(--teal2); }
.ll-cab span { margin-left: auto; color: var(--txt3); font-size: 11.5px; }

/* mejoras sobre la parrilla de Circet: bloques en el tiempo, alertas que filtran, grupos plegables */
.pfila { column-gap: 0 !important; }
.pfila > div { margin: 0 1px; }
.pgrid-t { overflow: visible; }
.pfila.cab { position: sticky; top: -1px; z-index: 5; background: var(--panel); padding-top: 4px; }
.pgrid-op { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 8px; }
.filtro-al { font-size: 12px; color: var(--violeta); font-weight: 600; }
.filtro-al a { color: var(--teal2); cursor: pointer; text-decoration: underline; }
a.pa { cursor: pointer; text-decoration: none; color: inherit; transition: transform .15s cubic-bezier(.2,.8,.2,1), box-shadow .15s, border-color .15s; }
a.pa[data-pf]:hover { transform: translateY(-1px); border-color: var(--linea2); }
a.pa[data-pf]:active { transform: scale(.98); }
a.pa.on { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-s), var(--sombra); }
.pa.cero { cursor: default; }
.pfila.gest .pn { cursor: pointer; flex-direction: row !important; align-items: center !important; justify-content: flex-start; gap: 6px; }
.flecha { display: inline-block; font-size: 11px; color: var(--txt3); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.flecha.pleg { transform: rotate(-90deg); }
.aviso-g { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--rojo); border-radius: 8px; padding: 0 6px; margin-left: auto; }
.pnum { justify-content: center; font-size: 10px; color: var(--txt3); }
.pfila.prov .pnum, .pfila.total .pnum { color: #b8c4d0; background: #13202e; }
.pfila.gest .pc.sub[style] { background: rgba(15, 158, 142, calc(var(--calor) * .55)); color: var(--txt); }
.pt { flex-direction: column; align-items: flex-end !important; justify-content: center !important; gap: 3px; }
.pt .obj { display: block; width: 100%; height: 3px; border-radius: 2px; background: rgba(16,32,48,.12); overflow: hidden; }
.pt .obj em { display: block; height: 100%; background: currentColor; opacity: .7; }
.pfila.tec.bl { min-height: 40px; }
.carril { grid-column: 5 / -1; position: relative !important; padding: 0 !important; margin: 0 1px !important; background: #fbfcfd; border: 1px solid var(--linea); overflow: visible !important; min-height: 38px; }
.carril .hl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--linea); }
.bnd { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; overflow: hidden; }
.bnd span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.b-fuera { background: repeating-linear-gradient(135deg, #dde2e7 0 3px, #eef1f4 3px 6px); color: var(--txt3); }
.b-comida { background: repeating-linear-gradient(135deg, #e8ecf0 0 3px, #f6f8fa 3px 6px); }
.b-inc { background: #7a52c7; color: #fff; font-weight: 600; }
.b-hueco { background: #fbe1ef; border: 1px dashed #d77aa9; color: #a83d72; font-weight: 600; border-radius: 4px; top: 3px; bottom: 3px; }
.blq { position: absolute; display: flex; align-items: center; gap: 4px; padding: 0 5px; border-radius: 5px; font-size: 10px; cursor: pointer; box-sizing: border-box; border: 1px solid rgba(255,255,255,.7); white-space: nowrap; transition: transform .12s, box-shadow .12s; }
.blq > span { overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.blq:hover { z-index: 6; box-shadow: 0 4px 12px -4px rgba(16,32,48,.45); }
.blq .ics { position: absolute; top: -6px; right: -3px; font-style: normal; font-weight: 800; font-size: 9px; line-height: 1; padding: 2px 4px; border-radius: 6px; background: #13202e; color: #fff; z-index: 2; }
.blq.k-prev { background: #fff; border-color: var(--linea2); }
.blq.k-curso { background: #d6efdf; color: #17603f; }
.blq.k-cerrado { background: #1f6b4f; color: #fff; }
.blq.k-rojo { background: var(--rojo); color: #fff; }
.blq.k-riesgo { background: var(--violeta-s); color: #3c35a8; box-shadow: inset 0 0 0 2px var(--violeta); }
.blq.k-rec { background: #d4f0f3; color: #1d6f78; }
.blq.k-canc { background: #fde68a; color: #b23431; text-decoration: line-through; }
.blq.k-dev { background: #dfe3e8; color: #6b7785; }
.blq.selc { outline: 2px solid var(--teal); outline-offset: 1px; }
.ficha { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; padding: 10px 12px; border-radius: 10px; background: #13202e; color: #fff; font-size: 11.5px; line-height: 1.45; box-shadow: 0 10px 30px -8px rgba(0,0,0,.45); z-index: 20; white-space: normal; flex-direction: column; gap: 2px; text-decoration: none; }
.blq:hover .ficha { display: flex; animation: ficha-in .14s cubic-bezier(.2,.8,.2,1); }
.ficha b { font-size: 12px; } .ficha .al { color: #ffd0cf; margin-top: 4px; } .ficha .id { color: #8fa2b5; font-family: ui-monospace, Consolas, monospace; margin-top: 2px; }
@keyframes ficha-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.ahora-l { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--teal); box-shadow: 0 0 0 2px rgba(15,158,142,.18); z-index: 4; border-radius: 1px; }
@media (prefers-reduced-motion: reduce) { .blq:hover .ficha { animation: none; } .flecha, a.pa { transition: none; } }

@media (max-width: 1300px) { .dur-v { grid-template-columns: 1fr; } }
