:root{
  --bg:#0b1220;
  --panel:#0f1a2c;
  --card:#111f36;
  --bg-rgb:11,18,32;
  --panel-rgb:15,26,44;
  --panel-deep-rgb:13,22,38;
  --card-rgb:17,31,54;
  --muted:rgba(255,255,255,.65);
  --text:rgba(255,255,255,.92);
  --border:rgba(255,255,255,.10);
  --border2:rgba(255,255,255,.14);
  --shadow: 0 10px 24px rgba(0,0,0,.35);
  --accent:#6ee7ff;
  --accent-rgb:110,231,255;

  --danger:#ff5c5c;

  --ok:#71ff7a;
  --ok-rgb:113,255,122;

  --cat-cast:#ffb020;
  --cat-props:#56f0c2;
  --cat-wardrobe:#bfa7ff;
  --cat-art:#5aa8ff;
  --cat-makeup:#ff7bc6;
  --cat-sound:#71ff7a;
  --cat-sfx:#ff6a3d;
  --cat-vfx:#ffd65a;
  --cat-vehicles:#6bdcff;
  --cat-animals:#9cff6b;
  --cat-extras:#c9c9c9;
}

html[data-theme="pink"]{
  /* JYP — Violeta suave (más vivo) */
  --bg:#131020;
  --panel:#1d1830;
  --card:#241d3b;

  --bg-rgb:19,16,32;
  --panel-rgb:29,24,48;
  --panel-deep-rgb:23,19,40;
  --card-rgb:36,29,59;

  --text:#f4f2fb;
  --muted:#c1bbd3;

  --border:rgba(255,255,255,.08);
  --border2:rgba(255,255,255,.14);
  --shadow:rgba(0,0,0,.45);

  --accent:#a98bff;
  --accent-rgb:169,139,255;

  --danger:#ff6fb0;

  --ok:#a7d7ce;
  --ok-rgb:167,215,206;
}

.projectSwitch{
  margin-top:10px;
  padding:8px 10px;
  font-weight:700;
  font-size:12px;
}

.projectActions{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:8px;
  margin-top:8px;
}

.syncMeta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
}

.syncMeta span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#syncPill{
  color:var(--text);
  font-weight:900;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1000px 700px at 12% 10%, rgba(var(--accent-rgb),.12), transparent 55%),
              radial-gradient(900px 600px at 85% 85%, rgba(191,167,255,.10), transparent 60%),
              var(--bg);
  color:var(--text);
}

.shell{
  height:100%;
  display:grid;
  grid-template-columns: 280px 1fr;
}

/* ===================== Sidebar colapsable + íconos ===================== */
.brandTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.projPill{
  display:none;
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(var(--accent-rgb), .14);
  color: var(--text);
  font-weight:950;
  letter-spacing:.02em;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
}

.navBtn{
  display:flex;
  align-items:center;
  gap:10px;
}
.navIco{
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  background: rgba(255,255,255,.02);
  flex:0 0 auto;
}
.navLbl{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.shell.navCollapsed{ grid-template-columns: 86px 1fr; }
.shell.navCollapsed .sidebar{ padding:12px 10px; }
.shell.navCollapsed .brand{ padding:12px 10px; }
.shell.navCollapsed .titleInput,
.shell.navCollapsed .projectSwitch,
.shell.navCollapsed .projectActions,
.shell.navCollapsed .syncMeta,
.shell.navCollapsed .sub{ display:none; }
.shell.navCollapsed .projPill{ display:flex; }
.shell.navCollapsed #btnNavCollapse{ display:none; }

.shell.navCollapsed .navBtn{ justify-content:center; padding:10px 8px; }
.shell.navCollapsed .navLbl{ display:none; }
.shell.navCollapsed .navIco{ width:44px; height:44px; border-radius:16px; font-size:18px; }

.sidebar{
  padding:14px;
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(var(--panel-rgb),.92), rgba(var(--panel-deep-rgb),.92));
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:0;
}

.brand{
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(255,255,255,.03);
}

/* ======= Permisos (modo lector / editor) ======= */
.authBar{
  margin-top:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(255,255,255,.02);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.authRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.authStatus{
  font-weight:900;
  font-size:12px;
  letter-spacing:.02em;
}
body.readOnly .authStatus{ opacity:.95; }
body:not(.readOnly) .authStatus{ opacity:.95; }

.modeBanner{
  position:fixed;
  right:12px;
  bottom:12px;
  z-index:9999;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(var(--panel-rgb), .88);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  font-size:12px;
  font-weight:900;
  color:var(--text);
}
.modeBanner.hidden{ display:none !important; }
.titleInput{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:18px;
  font-weight:900;
}
.sub{ margin-top:8px; font-size:12px; color:var(--muted); }

.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.navBottom{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.navBtn{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.navBtn:hover{ border-color:var(--border2); }
.navBtn.active{ border-color: rgba(var(--accent-rgb),.45); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.10) inset; }
.navBtn.bottom{ text-align:center; }

.pillRow{ display:flex; gap:8px; }
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  background:rgba(255,255,255,.03);
}
.pill.muted{ color:var(--muted); }

.main{
  padding:14px;
  min-height:0;
  overflow:hidden;
  position:relative;
}

.view{
  height:100%;
  overflow:auto;
  padding-right:4px;
}
.hidden{ display:none !important; }

.screenOnly{ display:block; }
.printOnly{ display:none; }


.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-bottom:14px;
}
.span2{ grid-column: 1 / -1; }
@media screen and (max-width:1200px){
  .shell{ grid-template-columns: 240px 1fr; }
  .grid2{ grid-template-columns: 1fr; }
}

.card{
  border:1px solid var(--border);
  background: rgba(var(--card-rgb),.88);
  border-radius:18px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.cardHeader{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.cardTitle{ margin:0; font-size:16px; letter-spacing:.6px; font-weight:950; line-height:1.15; text-transform:uppercase; }
.cardTitle .keepcase{ text-transform:none; letter-spacing:0; font-weight:inherit; }

/* Crew expand details */
.crewAreaCell{ display:flex; align-items:center; gap:10px; }
.crewExpander{
  width:28px;
  height:28px;
  padding:0;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.crewDetailRow td{
  padding:10px 12px;
  background: rgba(255,255,255,.02);
  border-top: 1px solid var(--border);
}
.crewDetailBox{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  border-radius: 14px;
  padding: 10px;
}
.crewDayPills{ display:flex; flex-wrap:wrap; gap:8px; }
.crewDayPills .pill{ background: rgba(255,255,255,.04); }
.cardContent{ padding:14px; }

.row{ display:flex; }
.gap{ gap:10px; }
.grow{ flex:1; }
.alignEnd{ align-items:flex-end; }

.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
label{ font-size:12px; color:var(--muted); }

/* ===================== Breakdown: Editor en grilla ===================== */
.gridEditor{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.gridEditor .field{ margin-bottom:0; }
@media screen and (max-width:980px){
  .gridEditor{ grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width:620px){
  .gridEditor{ grid-template-columns: 1fr; }
}

.input, .textarea, select{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
}
.input:focus,.textarea:focus,select:focus{
  border-color: rgba(var(--accent-rgb),.45);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.10);
}
select option{
  background:var(--panel);
  color:var(--text);
}

/* Compact selects */
.input.compact{
  width: 160px;
  flex: 0 0 160px;
}
@media screen and (max-width:1200px){
  .input.compact{ width: 140px; flex-basis:140px; }
}

.textarea{
  min-height:160px;
  resize:vertical;
}
.textarea.smallArea{ min-height:90px; }

.btn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
}
.btn:hover{ border-color:var(--border2); }
.btn.primary{ border-color: rgba(var(--accent-rgb),.55); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.08) inset; }
.btn.danger{ border-color: rgba(255,92,92,.55); }
.btn.icon{ width:36px; height:36px; padding:0; display:flex; align-items:center; justify-content:center; border-radius:12px; }

.muted{ color:var(--muted); }
.small{ font-size:12px; }
.spacer{ height:12px; }

.tableWrap{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:auto;
  max-height:520px;
}
.table{
  width:100%;
  border-collapse:collapse;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  font-size:13px;
}
.table th{
  color:var(--muted);
  font-weight:800;
  text-align:left;
  background: rgba(0,0,0,.18);
  position:sticky;
  top:0;
}
tr.selected td{ background: rgba(var(--accent-rgb),.10); }
tr.groupRow td{
  background: rgba(var(--accent-rgb),.08);
  font-weight:900;
  color:rgba(255,255,255,.85);
}

.toast{
  position:absolute;
  top:16px;
  right:16px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.45);
  z-index:50;
}

.hoverTip{
  position:fixed;
  max-width:440px;
  max-height:70vh;
  overflow:auto;
  z-index:90;
  border:1px solid var(--border);
  background: rgba(0,0,0,.55);
  border-radius:14px;
  padding:12px;
  backdrop-filter: blur(10px);
}
.hoverTip .t{ font-weight:900; margin-bottom:6px; }
.hoverTip .m{ color:var(--muted); font-size:12px; }
.hoverTip .grp{ margin-top:10px; }
.hoverTip .grpTitle{ font-weight:900; margin-bottom:6px; font-size:12px; }

.catBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:900;
}
.dot{
  width:10px; height:10px;
  border-radius:999px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.25);
}

/* Collapsible cards */
.collapsible .cardHeader{ user-select:none; }
.collapsible.collapsed .cardContent{ display:none; }
.collapsible.collapsed .cardHeader{ border-bottom:none; }

/* ===================== FIX 1: Plan de Rodaje sin scroll de hoja ===================== */
#view-shooting{ overflow-y:auto; overflow-x:hidden; } /* la hoja scrollea hasta el final del Detalle */
.shootingLayout{
  min-height:0;
  display:grid;
  grid-template-columns: clamp(280px, 26vw, 360px) minmax(0, 1fr);
  gap:14px;
  align-items:start;
}
.shootingLayout.noBank{ grid-template-columns: 1fr !important; }
.shootingLayout > .col{
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:14px; /* ✅ separación real entre tarjetas */

  min-width:0;
}




/* --- constrain shooting cards width --- */
#daysBoardCard, #dayDetailCard{ width:100%; max-width:100%; }
#daysBoardWrap{ width:100%; }
#view-shooting .cardContent{ min-width:0; }
/* Banco pegado arriba (mientras la hoja scrollea) */
#bankCol{
  position: sticky;
  top: 0;
  align-self: start;
}
/* Banco: altura fija (1 pantalla) y scrollea solo adentro */
.bankCard{
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  min-height: 340px;
  display:flex;
  flex-direction:column;
}
.bankCard .cardContent{
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
.bankList{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
  flex:1 1 auto;
  min-height:0;
  padding-right:4px;
  overflow-y:auto;
  overflow-x:hidden;
}

/* Tablero: scroll propio, altura fija (no max-height “a veces sí a veces no”) */
#daysBoardCard{ flex:0 0 auto; }
.daysBoardWrap{
  height: clamp(220px, 38vh, 520px);
  max-width: 100%;
  min-width: 0;
  overflow: auto; /* ✅ scroll independiente (incluye lateral) */
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  padding:10px 12px 8px;
  scrollbar-gutter: stable both-edges;
}
.daysBoard{
  display:flex;
  gap:12px;
  min-height: 240px;
  width: max-content; /* permite scroll horizontal interno */
}

/* Detalle: sin scroll interno (la hoja scrollea y se ve completo) */
#dayDetailCard{ flex:0 0 auto; }
#dayDetailCard .cardContent{ overflow: visible; }

.dayCol{
  width:320px;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  flex: 0 0 auto;
  background: rgba(255,255,255,.02);
}

.dayCol.selected{
  border-color: rgba(var(--accent-rgb),.55);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.35);
}

.dayHeader{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap:8px;
  cursor:pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
}
.dayHeader .t{ font-weight:900; }
.dayHeader .m{ color:var(--muted); font-size:12px; margin-top:4px; }

.dropZone{
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height: 180px;
  background: rgba(0,0,0,.12);
}
.dropZone.over{ outline:2px dashed rgba(var(--accent-rgb),.55); outline-offset:-6px; }

.dayDetail3col{
  display:grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap:14px;
  align-items:start;
}
.dayDetail3col .col{ min-width:0; }


/* Input fecha DD/MM/AAAA (mantiene date picker oculto) */
.dateDual{ position:relative; display:flex; align-items:center; gap:8px; }
.dateDual #day_date_display{ flex:1 1 auto; font-size:18px; font-weight:900; }
.dateDual .datePickBtn{ flex:0 0 auto; padding:6px 10px; position:relative; z-index:1; }
.dateDual .hiddenDate{
  /* queda encima del botón 📅 para que el click sea "real" sobre el input date */
  position:absolute;
  right:0;
  top:0;
  left:auto;
  width:42px;
  height:38px;
  opacity:0.01;
  pointer-events:auto;
  z-index:2;
  cursor:pointer;
}

@media screen and (max-width:1200px){
  .dayDetail3col{ grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 980px){
  .dayDetail3col{ grid-template-columns: 1fr; }
}

.dayDetail4col{
  display:grid;
  grid-template-columns: 1.05fr 1fr 0.9fr 1.1fr;
  gap:14px;
  align-items:start;
}
.dayDetail4col .col{ min-width:0; }
@media screen and (max-width:1200px){
  .dayDetail4col{ grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 980px){
  .dayDetail4col{ grid-template-columns: 1fr; }
}



/* Call Diario: hero + horarios individuales */
.heroBlock{
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px;
  background: rgba(255,255,255,.03);
  margin-bottom:12px;
}
.heroBlock .field{ margin-bottom:10px; }
.heroBlock .field:last-child{ margin-bottom:0; }
.heroBlock label{ font-size:12px; letter-spacing:.02em; opacity:.85; }
#day_date, #day_call{ font-size:18px; font-weight:900; padding:10px 12px; }
#day_call{ text-align:center; }

.callGroupBox{
  border:1px solid var(--border);
  border-radius:18px;
  padding:10px 12px;
  background: rgba(255,255,255,.02);
  margin-bottom:10px;
}
.callGroupRow{
  display:flex;
  align-items:center;
  gap:8px;
}
.callGroupRow .lbl{ font-weight:900; opacity:.92; min-width:78px; }

.callPeopleList{ display:flex; flex-direction:column; gap:8px; }

/* Call Diario: stack de horarios (CALL / PU / RTS) */
.callPersonCard{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  background: rgba(255,255,255,.02);
}
.callPersonCard .nameRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.callPersonCard .nameRow .left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.callPersonCard .nameRow .title{ font-weight:900; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.callPersonCard .meta{ font-size:12px; color: var(--muted); margin-top:2px; font-weight:800; letter-spacing:.01em; }
.callPersonCard .dot{ width:10px; height:10px; border-radius:999px; flex:0 0 auto; }

.timeStack{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:8px;
}
.timeLine{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.timeLine .k{
  font-size:12px;
  color: var(--muted);
  font-weight:900;
  letter-spacing:.02em;
  width:46px;
  flex:0 0 auto;
}
.timeLine .timeInput{ width:120px; }

.callExtrasRow{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  margin-top:10px;
}
.callExtrasRow .callExtraLine{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  width:100%;
  justify-content:space-between;
}
.callExtrasRow .callExtraLine .left{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.callExtrasRow .callExtraLine .right{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-left:auto;
  justify-content:flex-end;
}
.callExtrasRow .miniLbl{ font-size:12px; color: var(--muted); font-weight:900; letter-spacing:.02em; margin-right:2px; }

.crewTimeStack{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.crewTimeStack .timeLine{ width:100%; justify-content:flex-end; }
.crewTimeStack .timeLine .k{ width:46px; text-align:right; }
.callPersonRow{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  background: rgba(255,255,255,.02);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.callPersonRow .left{ display:flex; align-items:center; gap:10px; min-width:0; }
.callPersonRow .title{ font-weight:900; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.callPersonRow .dot{ width:10px; height:10px; border-radius:999px; flex:0 0 auto; }
.callPersonRow .right{ display:flex; flex-direction:column; align-items:flex-end; }

.callPersonRow.override{
  border-color: rgba(255, 208, 0, .55);
  background: rgba(255, 208, 0, .06);
}

.timeInput{ width:110px; padding:6px 10px; height:34px; border-radius:12px; }
.btn.ghost{ background: rgba(255,255,255,.02); }
.btn.toggleOn{
  border-color: rgba(58, 220, 126, .65);
  background: rgba(58, 220, 126, .08);
  box-shadow: 0 0 0 2px rgba(58, 220, 126, .12) inset;
}
.btn.small{ padding:6px 10px; border-radius:12px; font-size:12px; height:34px; }
.btn.icon.small{ width:34px; height:34px; border-radius:12px; padding:0; display:flex; align-items:center; justify-content:center; }
.timeDiffDay{ background: rgba(255, 208, 0, .18) !important; border-color: rgba(255, 208, 0, .55) !important; }
.timeDiffArea{ background: rgba(255, 92, 92, .18) !important; border-color: rgba(255, 92, 92, .55) !important; }
.callBadge{ font-size:11px; padding:4px 8px; border-radius:999px; border:1px solid var(--border); background: rgba(255,255,255,.03); color: var(--muted); white-space:nowrap; }
.callBadge.ok{ border-color: rgba(var(--ok-rgb),.55); color: rgba(var(--ok-rgb),.95); background: rgba(var(--ok-rgb),.06); }
.callBadge.off{ border-color: rgba(255,92,92,.45); }

.crewAreaHeaderRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.crewAreaHeaderRow .areaName{ font-weight:900; }
.crewAreaHeaderRow .areaCallCtl{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.crewAreaHeaderRow .areaCallCtl .timeInput{ width:110px; }

.crewPickItem .right{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.crewPickItem .right .timeInput{ width:120px; }
.crewPickItem .right input[disabled]{ opacity:.45; }

@media screen and (max-width: 520px){
  .callGroupRow{ flex-wrap:wrap; }
  .callGroupRow .lbl{ min-width:100%; }
  .timeInput{ width:100%; }
  .crewPickItem{ flex-direction:column; align-items:stretch; }
  .crewPickItem .right{ flex-direction:column; align-items:stretch; gap:6px; }
  .crewPickItem .right .timeInput{ width:100%; }
  .callPersonRow{ flex-direction:column; align-items:stretch; }
  .callPersonRow .right{ align-items:stretch; width:100%; }
}
.colTitle{ font-weight:900; opacity:.92; margin-bottom:4px; }

/* Call Diario: header meta + escenas del día */
.titleBlock{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.dayHeaderMeta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.metaPill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  white-space:nowrap;
}
.metaPill b{ font-weight:900; }

.daySceneDetailList{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sceneNeedCard{
  border:1px solid var(--border);
  border-radius:18px;
  padding:10px 12px;
  background: rgba(255,255,255,.02);
  cursor:pointer;
}
.sceneNeedCard:hover{ background: rgba(255,255,255,.03); }
.sceneNeedCard .top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.sceneNeedCard .ttl{ font-weight:900; line-height:1.1; }
.sceneNeedCard .meta{ margin-top:4px; font-size:12px; color: var(--muted); }

.sceneNeedCard .chips{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.needChip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.08);
  color: var(--text);
}
.needChip .dot{ width:8px; height:8px; border-radius:999px; background: var(--chip-dot, var(--muted)); }
.needChip .count{ opacity:.7; margin-left:2px; font-weight:800; }

.sceneNeedCard .details{
  margin-top:10px;
  display:none;
  border-top:1px dashed rgba(255,255,255,.12);
  padding-top:10px;
}
.sceneNeedCard.open .details{ display:flex; flex-direction:column; gap:8px; }

.needRow{
  display:grid;
  grid-template-columns: 10px 92px 1fr;
  gap:8px;
  align-items:start;
}
.needRow .dot{ width:8px; height:8px; border-radius:999px; margin-top:4px; }
.needRow .k{ font-size:12px; font-weight:900; opacity:.9; }
.needRow .v{ font-size:12px; color: var(--muted); }

.sceneNeedCard .toggle{ transform: rotate(0deg); transition: transform .15s ease; }
.sceneNeedCard.open .toggle{ transform: rotate(180deg); }

/* Plan de Rodaje: editar detalle del día desde el título */
.dpDayBtn{
  background:none;
  border:0;
  padding:0;
  text-align:left;
  cursor:pointer;
  color: var(--text);
  font-size:1.1rem;
  font-weight:900;
  line-height:1.05;
}
.dpDayBtn:hover{ text-decoration:underline; }
.dpBadges{ display:flex; gap:8px; flex-wrap:wrap; margin-top:0; }

.crewAreaHeader{
  margin-top:8px;
  margin-bottom:6px;
  font-weight:900;
  padding:5px 6px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(var(--accent-rgb),.08);
}

.crewPickItem{
  border:1px solid rgba(255,92,92,.45);
  border-radius:16px;
  padding:10px 12px;
  margin-bottom:10px;
  cursor:pointer;
  background: rgba(255,255,255,.02);
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.crewPickItem .title{ font-weight:900; }
.crewPickItem .meta{ font-size:12px; color:var(--muted); margin-top:4px; }
.crewPickItem .statusDot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(255,92,92,.9);
  margin-top:4px;
  flex:0 0 auto;
}
.crewPickItem.selected{
  border-color: rgba(var(--ok-rgb),.55);
  background: rgba(var(--ok-rgb),.06);
}
.crewPickItem.selected .statusDot{ background: rgba(var(--ok-rgb),.95); }
.crewPickItem .left{ display:flex; gap:10px; }

/* Banco colapsado */
.bankDock{
  order:-1;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:18px;
  height:72px;
  background: rgba(255,255,255,.03);
}
.bankDock.hidden{ display:none; }

.shootingLayout.bankCollapsed{
  grid-template-columns: 64px 1fr;
}
.shootingLayout.bankCollapsed .bankCard{ display:none; }
.shootingLayout.bankCollapsed #bankDock{ display:flex; }

/* Scene cards */
.sceneCard{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  background: rgba(255,255,255,.03);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.sceneCard .title{ font-weight:900; }
.sceneCard .meta{ font-size:12px; color:var(--muted); margin-top:4px; }
.sceneCard .dragHandle{ cursor:grab; color:var(--muted); font-weight:900; }
.sceneCard.assigned{ border-color: rgba(var(--ok-rgb),.55); }
.sceneCard.unassigned{ border-color: rgba(255,92,92,.55); }

.sceneCard.active{ border-color: rgba(var(--accent-rgb),.75); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12) inset; }

/* Plan de rodaje: títulos de escenas un poco más chicos (banco + tablero) */
.bankList .sceneCard .title,
.dropZone .sceneCard .title{
  font-size: 13px;
  line-height: 1.2;
}
.bankList .sceneCard .meta{ font-size:11px; }

/* Botón quitar escena del día (compacto, no altera hover) */
.sceneCard .sceneRemoveBtn{
  width:28px;
  height:28px;
  border-radius:10px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
  border-color: rgba(255,92,92,.45);
  background: rgba(255,255,255,.02);
}
.sceneCard .sceneRemoveBtn:hover{ border-color: rgba(255,92,92,.65); }

/* Detalle del día: equipo técnico más compacto y sin ensanchar columna */
#dayCrewPicker .crewPickItem{
  padding:8px 10px;
  border-radius:14px;
  margin-bottom:8px;
}
#dayCrewPicker .crewPickItem .title{ font-size:13px; }
#dayCrewPicker .crewPickItem .left,
#dayCrewPicker .crewPickItem .left > div{ min-width:0; }
#dayCrewPicker .crewPickItem .meta{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Breakdown elements grid */
.sceneCatRow{
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  background: rgba(255,255,255,.02);
  margin-bottom:10px;
}
.sceneCatHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}
.sceneCatHead .left{ display:flex; align-items:center; gap:10px; }
.sceneCatHead .name{ font-weight:900; }
.sceneCatHead .count{ color:var(--muted); font-size:12px; }
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  border:1px solid var(--border);
  background: rgba(0,0,0,.20);
  padding:7px 10px;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:var(--text);
}
.chip button{
  border:none;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-weight:900;
}


.chip.toggle{ cursor:pointer; user-select:none; }
.chip.toggle.active{ border-color: var(--accent); background: rgba(var(--accent-rgb),.12); }
.chip.toggle.disabled{ cursor:not-allowed; opacity:.45; pointer-events:none; }

/* ===================== FIX 2: Breakdown lista escenas usa el alto disponible ===================== */
#sceneListCard{
  display:flex;
  flex-direction:column;
  min-height:0;
}
#sceneListCard .cardContent{
  display:flex;
  flex-direction:column;
  min-height:0;
  gap:12px;
}
#sceneListCard .tableWrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none;   /* ✅ adiós scroll prematuro */
}

/* ===================== FIX 3: Equipo Técnico usa el alto total (sin max-height 520) ===================== */
#view-crew{ overflow:hidden; }
#crewCard{
  height:100%;
  display:flex;
  flex-direction:column;
  min-height:0;
}
#crewCard .cardContent{
  display:flex;
  flex-direction:column;
  min-height:0;
}
#crewCard .tableWrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none;  /* ✅ adiós scroll antes de tiempo */
}

/* ===================== Cronograma ===================== */
/* --- schedule: bottom horizontal scrollbar --- */
#view-schedule{ overflow:hidden; } /* scrollea adentro del board */
#scheduleCard{
  height:100%;
  display:flex;
  flex-direction:column;
  min-height:0;
}
#scheduleCard .cardContent{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.scheduleContent{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
}

.schedScrollTop{
  display:none;
  height:22px;
  min-height:22px;
  overflow-x:scroll;
  overflow-y:hidden;
  scrollbar-gutter: stable both-edges;
  border:1px solid var(--border);
  border-radius:12px;
  background: rgba(0,0,0,.18);
  order: 2;
}
.schedScrollTopInner{ height:1px; }

.schedWrap{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}

/* Scroll horizontal real (oculto). Lo controlamos con el “dock” de abajo */
.schedBoard{
  display:flex;
  gap:12px;
  width:max-content; /* permite scroll horizontal en el WRAP */
  min-height:0;
  padding:10px 12px 8px;
}

.schedDay{
  width:360px;
  flex:0 0 auto;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.02);
}
.schedHead{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
}
.schedHead .t{ font-weight:900; }
.schedHead .m{ color:var(--muted); font-size:12px; margin-top:4px; }

.schedGrid{
  position:relative;
  background: rgba(0,0,0,.12);
}
.hourLine{
  position:absolute;
  left:56px;
  right:0;
  height:1px;
  background: rgba(255,255,255,.06);
}
.hourLabel{
  position:absolute;
  left:8px;
  width:46px;
  color:var(--muted);
  font-size:11px;
  transform: translateY(-7px);
}

.schedBlock{
  position:absolute;
  left:56px;
  right:10px;
  border:1px solid var(--border);
  border-radius:16px;
  background: rgba(var(--card-rgb),.10);
  padding:10px;
  cursor:grab;
  user-select:none;
  touch-action:none;
  overflow:hidden;
}
.schedBlock .schedContent{
  position:relative;
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding-bottom:18px; /* espacio para el resize bar */
}
.schedBlock .schedNote{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
.schedBlock:active{ cursor:grabbing; }
.schedBlock .title{ font-weight:900; }
.schedBlock .meta{ color:var(--muted); font-size:12px; margin-top:4px; }
.schedNote{ color:var(--muted); font-size:12px; margin-top:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

.schedTitleRow{
  display:flex;
  gap:10px;
  align-items:baseline;
  /* Deja lugar para las pills (ticks) pegadas arriba sin pisar el título */
  margin-top:0px;
}
.schedTime{
  flex:0 0 auto;
  min-width:96px;
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing:.2px;
}
.schedTitleRow .title{
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.schedTicks{
  display:none;
  position:absolute;
  /*
    Pills de categorías (Breakdown) en Plan General:
    - Pegadas al borde superior (suben a la zona del padding)
    - Alineadas a la izquierda
    - Sin superponerse con el título
  */
  /* Dentro del bloque (no negativo) para que no se recorten por overflow:hidden */
  top:2px;
  left:0;
  right:auto;
  display:none !important;
  gap:6px;
  pointer-events:none;
  z-index:3;
}
.schedTicks .tick{
  width:14px;
  height:4px;
  border-radius:4px;
  opacity:.95;
}

.schedBlock .resize{
  position:absolute;
  left:10px;
  right:10px;
  bottom:6px;
  height:10px;
  border-radius:10px;
  background: rgba(var(--accent-rgb),.18);
  cursor:ns-resize;
  touch-action:none;
}

/* ===================== Shotlist ===================== */
#shotlistCard{
  height:100%;
  display:flex;
  flex-direction:column;
  min-height:0;
}
#shotlistCard .cardContent{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}

/* Shotlist: layout 2/3 + 1/3 */
.shotlistLayout{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:12px;
  height:100%;
  min-height:0;
}
.shotlistMain{
  min-width:0;
  overflow:auto;
  min-height:0;
  padding-right:2px;
}
.shotlistSide{
  min-width:0;
  overflow:auto;
  min-height:0;
}
@media (max-width: 980px){
  .shotlistLayout{ grid-template-columns: 1fr; }
  .shotlistSide{ border-top:1px solid var(--border); padding-top:10px; }
}

.shotSceneInfoCard{
  border:1px solid var(--border);
  border-radius:18px;
  background: rgba(0,0,0,.10);
  overflow:hidden;
}
.shotSceneInfoHead{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.shotSceneInfoTitle{ font-weight:950; }
.shotSceneInfoBody{ padding:12px; }
.shotSceneInfoBody .label{ font-size:12px; font-weight:900; color: rgba(255,255,255,.70); text-transform:uppercase; letter-spacing:.06em; }
.shotSceneInfoBody .value{ font-weight:800; margin-top:4px; }
.shotSceneInfoBody .bigText{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius:16px;
  padding:10px 12px;
  white-space:pre-wrap;
}

/* Scene selection + collapse */
.shotSceneBox{ position:relative; }
.shotSceneBox.selected{
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08) inset;
}
.shotSceneHead{ cursor:pointer; }
.shotSceneHeadLeft{ display:flex; gap:10px; align-items:flex-end; }
.shotSceneCaret{
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background: rgba(255,255,255,.06);
  font-weight:950;
}
.shotSceneHeadRight{
  display:flex;
  align-items:flex-end;
  gap:8px;
}
.shotSceneBox.collapsed .shotTableWrap{ display:none; }

/* Shotlist editor-ish controls */
.shotTable .shotAct{ width:46px; text-align:center; }
.shotTable .shotThumbTd{ text-align:center; }
.shotTable .shotDescInput{ width:100%; }


.shotDayKpis{ display:flex; flex-wrap:wrap; gap:8px; }
.shotDayKpis .pill{ background: rgba(255,255,255,.04); }

.shotSceneBox{
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  background: rgba(0,0,0,.12);
  margin-bottom:12px;
}
.shotSceneHead{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-end;
}
.shotSceneHead .t{ font-weight:950; }
.shotSceneHead .m{ color: rgba(255,255,255,.72); font-size:12px; margin-top:4px; font-weight:700; }
.shotSceneHead .warn{ color: rgba(255,92,92,.92); font-weight:900; font-size:12px; }

.shotTableWrap{ padding:12px; }
.shotTable{ width:100%; }
.shotTable td{ vertical-align:top; }
.shotTable .shotNum{ width:46px; color:var(--muted); }
.shotTable .shotTime{ width:78px; font-weight:900; }
.shotTable .shotDur{ width:120px; }
.shotTable .shotChk{ width:44px; }
.shotTable .shotType{ width:220px; }
.shotTable .shotChk input[type=checkbox]{ width:18px; height:18px; }
.shotTable .shotChk{ text-align:center; }
.shotRowDone{ opacity:.65; }

.shotDurSel{ width:100%; }

/* ----- Shotlist: contraste (UI only) ----- */
.shotSceneBox{
  border-color: var(--border2);
  background: rgb(var(--panel-deep-rgb));
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}
.shotSceneHead{
  position:relative;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .14), rgba(255,255,255,.04));
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.shotSceneHead::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background: rgba(var(--accent-rgb), .55);
  opacity:.9;
}
.shotSceneCaret{
  background: rgba(var(--accent-rgb), .10);
  border:1px solid rgba(var(--accent-rgb), .25);
}
.shotTableWrap{
  background: rgba(255,255,255,.02);
}
.shotSceneBox .tableWrap{
  border-color: rgba(255,255,255,.12);
  background: rgba(0,0,0,.14);
}
.shotSceneBox .table th{
  background: rgba(0,0,0,.26);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.shotSceneBox .table td{
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Selected scene: un poco más presente */
.shotSceneBox.selected{
  border-color: rgba(var(--accent-rgb),.55);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.10) inset, 0 10px 18px rgba(0,0,0,.22);
}
.shotSceneBox.selected .shotSceneHead::before{
  background: rgba(var(--accent-rgb), .92);
}
@media print {


/* Print: asegurar contraste (fondo blanco) */
body.gbPrintingShotlist .shotSceneBox{
  background:#fff !important;
  border:1px solid #ddd !important;
  box-shadow:none !important;
}
}

@media print {

body.gbPrintingShotlist .shotSceneHead{
  background:#f6f6f6 !important;
  border-bottom:1px solid #ddd !important;
}
}

@media print {

body.gbPrintingShotlist .shotSceneHead::before{ display:none !important; }
}

@media print {

body.gbPrintingShotlist .shotTableWrap{ background:#fff !important; }
}

@media print {

body.gbPrintingShotlist .tableWrap{ border-color:#ddd !important; background:#fff !important; }
}

@media print {

body.gbPrintingShotlist .table th{ background:#f6f6f6 !important; color:#111 !important; border-bottom:1px solid #ddd !important; }
}

@media print {

body.gbPrintingShotlist .table td{ color:#000 !important; border-bottom:1px solid #ddd !important; }
}


/* ===== Shotlist print (unificado) ===== */
#gbPrintRoot{ display:none; }
@media print {


/* ===== Print (fallback tambiÃ©n en screen para mÃ³viles) ===== */
body.gbPrintingShotlist *{ visibility:hidden !important; }
}

@media print {

body.gbPrintingShotlist #gbPrintRoot,
body.gbPrintingShotlist #gbPrintRoot *{ visibility:visible !important; }
}

@media print {

body.gbPrintingShotlist #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; background:#fff; color:#000; }
}

@media print {


body.gbPrintingCallsheet *{ visibility:hidden !important; }
}

@media print {

body.gbPrintingCallsheet #gbPrintRoot,
body.gbPrintingCallsheet #gbPrintRoot *{ visibility:visible !important; }
}

@media print {

body.gbPrintingCallsheet #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; background:#fff; color:#000; }
}

@media print {


body.gbPrintingElements *{ visibility:hidden !important; }
}

@media print {

body.gbPrintingElements #gbPrintRoot,
body.gbPrintingElements #gbPrintRoot *{ visibility:visible !important; }
}

@media print {

body.gbPrintingElements #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; background:#fff; color:#000; }
}

@media print {


body.gbPrintingShotlist .muted,
body.gbPrintingCallsheet .muted,
body.gbPrintingElements .muted{ color:#333 !important; }
}

@media print {


/* Call Sheet: asegurar contraste aunque el browser ignore @media print */
body.gbPrintingCallsheet #gbPrintRoot,
body.gbPrintingCallsheet #gbPrintRoot *{ color:#000 !important; }
}

@media print {

body.gbPrintingCallsheet .catBlock{ background:#fff !important; border:1px solid #ddd !important; overflow:visible !important; border-radius:0 !important; }
}

@media print {

body.gbPrintingCallsheet .catBlock .hdr{ background:#f6f6f6 !important; border-bottom:1px solid #ddd !important; color:#111 !important; }
}

@media print {

body.gbPrintingCallsheet .kpi{ background:#f6f6f6 !important; border:1px solid #ddd !important; color:#111 !important; }
}

@media print {

body.gbPrintingCallsheet .kpi b{ color:#000 !important; }
}

@media print {


body.gbPrintingCallsheet #gbPrintRoot .callSheetPrintPage{ width:100% !important; max-width:190mm !important; box-sizing:border-box; margin:0 auto !important; }
}

@media print {


body.gbPrintingCallsheet .callTimeTable{ background:#fff !important; border-color:#ddd !important; }
}

@media print {

body.gbPrintingCallsheet .callTimeTable thead{ display: table-header-group !important; }
}

@media print {

body.gbPrintingCallsheet .callTimeTable th{ color:#111 !important; background:#f6f6f6 !important; border-bottom:1px solid #ddd !important; }
}

@media print {

body.gbPrintingCallsheet .callTimeTable td{ color:#000 !important; border-bottom:1px solid #ddd !important; }
}

@media print {


/* Mobile print: todo entra en A4 */
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot{ font-size:10.5pt !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .catBlock .items{ font-size:10.5pt !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable th,
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable td{ padding:5px 6px !important; font-size:10pt !important; line-height:1.15; }
}

@media print {


body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(2),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(2){ width:130px !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(4),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(4),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(5),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(5){ width:64px !important; }
}

@media print {


body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(2),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(2){ width:130px !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(4),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(4){ width:64px !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(5),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(5){ width:64px !important; }
}

@media print {


body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callCrewArea{ border:1px solid #ddd !important; border-radius:12px !important; padding:8px !important; }
}

@media print {


/* ===== Print (fallback también en screen para móviles) ===== */
body.gbPrintingShotlist *{ visibility:hidden !important; }
}

@media print {

body.gbPrintingShotlist #gbPrintRoot,
body.gbPrintingShotlist #gbPrintRoot *{ visibility:visible !important; }
}

@media print {

body.gbPrintingShotlist #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; background:#fff; color:#000; }
}

@media print {


body.gbPrintingCallsheet *{ visibility:hidden !important; }
}

@media print {

body.gbPrintingCallsheet #gbPrintRoot,
body.gbPrintingCallsheet #gbPrintRoot *{ visibility:visible !important; }
}

@media print {

body.gbPrintingCallsheet #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; background:#fff; color:#000; }
}

@media print {


body.gbPrintingElements *{ visibility:hidden !important; }
}

@media print {

body.gbPrintingElements #gbPrintRoot,
body.gbPrintingElements #gbPrintRoot *{ visibility:visible !important; }
}

@media print {

body.gbPrintingElements #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; background:#fff; color:#000; }
}

@media print {


body.gbPrintingShotlist .muted,
body.gbPrintingCallsheet .muted,
body.gbPrintingElements .muted{ color:#333 !important; }
}

@media print {


/* Call Sheet print: asegurar contraste aunque el navegador ignore @media print */
body.gbPrintingCallsheet #gbPrintRoot,
body.gbPrintingCallsheet #gbPrintRoot *{ color:#000 !important; }
}

@media print {

body.gbPrintingCallsheet #gbPrintRoot .muted{ color:#333 !important; }
}

@media print {


body.gbPrintingCallsheet #gbPrintRoot .callSheetPrintPage{
  width:100% !important;
  max-width:190mm !important;
  margin:0 auto !important;
  box-sizing:border-box;
}
}

@media print {


/* Mobile print: ajustar para A4 sin tener que pedirle A3 al teléfono */
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot{ font-size:10.5pt !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .catBlock .items{ font-size:10.5pt !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable th,
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable td{ padding:5px 6px !important; font-size:10pt !important; line-height:1.2; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(2),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(2){ width:130px !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(4),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(4),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast th:nth-child(5),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--cast td:nth-child(5){ width:64px !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(3),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(4),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(4){ width:64px !important; }
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew th:nth-child(5),
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callTimeTable--crew td:nth-child(5){ width:64px !important; }
}

@media print {


/* Mobile print: contenedores por Área de Crew */
body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callCrewArea{
  border:1px solid #ddd !important;
  border-radius:12px !important;
  padding:8px 8px 10px !important;
  margin-top:10px !important;
  break-inside: avoid;
  page-break-inside: avoid;
}
}

@media print {

body.gbPrintMobile.gbPrintingCallsheet #gbPrintRoot .callCrewAreaTitle{ margin-bottom:6px !important; font-weight:900 !important; }
}




.shotPrintHeader{ margin-bottom:12px; }
.shotPrintTitle{ font-weight:950; font-size:18pt; }
.shotPrintSub{ margin-top:2px; font-size:12pt; }
.shotPrintMeta{ margin-top:6px; font-size:11pt; color:var(--muted); }
.shotPrintKpis{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.shotPrintKpis .pill{ background: rgba(0,0,0,.04); border:1px solid #ddd; color:#222; }

@media print{
  /* Cuando imprimimos shotlist, imprimimos solo el root (mismo diseño desde cualquier pestaña) */
  body.gbPrintingShotlist *{ visibility:hidden !important; }
  body.gbPrintingShotlist #gbPrintRoot,
  body.gbPrintingShotlist #gbPrintRoot *{ visibility:visible !important; }
  body.gbPrintingShotlist #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; }

  /* Call Sheet print (unificado) */
  body.gbPrintingCallsheet *{ visibility:hidden !important; }
  body.gbPrintingCallsheet #gbPrintRoot,
  body.gbPrintingCallsheet #gbPrintRoot *{ visibility:visible !important; }
  body.gbPrintingCallsheet #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; }


/* Elementos por escena print (unificado) */
body.gbPrintingElements *{ visibility:hidden !important; }
body.gbPrintingElements #gbPrintRoot,
body.gbPrintingElements #gbPrintRoot *{ visibility:visible !important; }
body.gbPrintingElements #gbPrintRoot{ display:block !important; position:absolute; left:0; top:0; width:100%; padding:0 !important; margin:0 !important; }

body.gbPrintingElements{ background:#fff !important; color:#000 !important; }
body.gbPrintingElements .muted{ color:#333 !important; }

  body.gbPrintingCallsheet{ background:#fff !important; color:#000 !important; }
  body.gbPrintingCallsheet .muted{ color:#333 !important; }

  body.gbPrintingCallsheet .catBlock{ background:#fff !important; border:1px solid #ddd !important; }
  body.gbPrintingCallsheet .catBlock{ overflow:visible !important; border-radius:0 !important; }
  body.gbPrintingCallsheet .catBlock .hdr{ background:#f6f6f6 !important; border-bottom:1px solid #ddd !important; color:#111 !important; }
  body.gbPrintingCallsheet .kpi{ background:#f6f6f6 !important; border:1px solid #ddd !important; color:#111 !important; }

  /* Página de elementos por escena: evitar cortes horizontales */
  body.gbPrintingCallsheet .elementsPrintPage{
    width:100% !important;
    max-width:190mm !important;
    box-sizing:border-box;
    border-radius:0 !important;
    border:0 !important;
    padding:4mm !important;
    overflow:visible !important;
  }
  body.gbPrintingCallsheet .eleScene{ break-inside: avoid; page-break-inside: avoid; }
  body.gbPrintingCallsheet .eleTable tr{ break-inside: avoid; page-break-inside: avoid; }

  
  /* KPIs (numeritos) en negro para contraste */
  body.gbPrintingCallsheet .kpi b{ color:#000 !important; }
/* Arrancar pegado arriba */
  body.gbPrintingCallsheet #gbPrintRoot .catBlock:first-child{ margin-top:0 !important; }

  /* Título (día / call / locación) con más presencia */
  body.gbPrintingCallsheet #gbPrintRoot .callHeader .items > div:nth-child(1),
  body.gbPrintingCallsheet #gbPrintRoot .callHeader .items > div:nth-child(2){
    font-size:13pt !important;
    font-weight:900 !important;
    color:#111 !important;
  }

  /* Crew: sin espacio antes del primer área */
  body.gbPrintingCallsheet #gbPrintRoot .callCrew .items > div:first-child{ margin-top:0 !important; }

  /* Call Sheet: tablas PU / Call / RTS legibles en impresión */
  body.gbPrintingCallsheet .callTimeTable{
    background:#fff !important;
    border-color:#ddd !important;
  }
  body.gbPrintingCallsheet .callTimeTable thead{ display: table-header-group !important; }
  body.gbPrintingCallsheet .callTimeTable th{
    color:#111 !important;
    background:#f6f6f6 !important;
    border-bottom:1px solid #ddd !important;
  }
  body.gbPrintingCallsheet .callTimeTable td{
    color:#000 !important;
    border-bottom:1px solid #ddd !important;
  }
  /* Semáforo de call times (crew / cast) */
  body.gbPrintingCallsheet #gbPrintRoot .callTimeDot{
    display:inline-block;
    width:10px; height:10px;
    border-radius:999px;
    margin-right:6px;
    border:2px solid rgba(0,0,0,.35);
    background: transparent;
    vertical-align:middle;
  }
  body.gbPrintingCallsheet #gbPrintRoot .callTimeDot.green{ border-color:#2ecc71; background: rgba(46,204,113,.18); }
  body.gbPrintingCallsheet #gbPrintRoot .callTimeDot.yellow{ border-color:#f1c40f; background: rgba(241,196,15,.18); }
  body.gbPrintingCallsheet #gbPrintRoot .callTimeDot.red{ border-color:#e74c3c; background: rgba(231,76,60,.18); }

  /* Refuerzo en impresión: borde lateral en celdas con override */
  body.gbPrintingCallsheet #gbPrintRoot .callTimeTable td.time.timeDiffDay{
    border-left:3px solid #f1c40f !important;
  }
  body.gbPrintingCallsheet #gbPrintRoot .callTimeTable td.time.timeDiffArea{
    border-left:3px solid #e74c3c !important;
  }

  /* Extra: hoja de elementos por escena (evitar cortes / overflow) */
  body.gbPrintingCallsheet .elementsPrintPage{
    max-width: 190mm !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border:none !important;
    border-radius:0 !important;
    overflow:visible !important;
    padding:4mm !important;
  }
  body.gbPrintingCallsheet .elementsPrintPage .eleScene{
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body.gbPrintingCallsheet .elementsPrintPage .eleTable tr{
    break-inside: avoid;
    page-break-inside: avoid;
  }



  /* Fondo + contraste */
  body.gbPrintingShotlist{ background:#fff !important; color:#000 !important; }
  body.gbPrintingShotlist .muted{ color:#333 !important; }

  body.gbPrintingShotlist .shotSceneBox{ background:#fff !important; border:1px solid #ddd !important; }
  body.gbPrintingShotlist .shotSceneHead{ background:#f6f6f6 !important; border-bottom:1px solid #ddd !important; }
  body.gbPrintingShotlist .shotSceneHead .m{ color:#111 !important; font-weight:800; }

  /* Filas más petizas */
  body.gbPrintingShotlist .shotTable th,
  body.gbPrintingShotlist .shotTable td{ padding:4px 6px !important; font-size:10pt; line-height:1.2; }

  /* Columnas */
  body.gbPrintingShotlist .shotTable .shotChk{ width:32px !important; }
  body.gbPrintingShotlist .shotTable .shotNum{ width:36px !important; }
  body.gbPrintingShotlist .shotTable .shotTime{ width:70px !important; }
  /* Tipo: -30% aprox vs 220px */
  body.gbPrintingShotlist .shotTable .shotType{ width:150px !important; }
  /* Min: mitad */
  body.gbPrintingShotlist .shotTable .shotDur{ width:60px !important; }

  /* Checkbox más grande en papel */
  body.gbPrintingShotlist .shotTable .shotChk input[type=checkbox]{ width:20px !important; height:20px !important; }
}


/* Reports */
.reportsBoard{
  display:flex;
  gap:12px;
  overflow:auto;
  padding-bottom:6px;
}

/* Mobile: un solo día */
.reportsBoard.singleDay{
  display:block;
}
.reportsBoard.singleDay .reportCol{
  width:100%;
}
.reportCol{
  width:360px;
  flex:0 0 auto;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.02);
}
.reportHead{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}
.reportHead .t{ font-weight:900; }
.reportHead .m{ color:var(--muted); font-size:12px; margin-top:4px; }
.reportBody{ padding:12px; }

.repCrewArea{ margin-top:10px; }
.repCrewAreaT{ font-weight:900; margin-bottom:6px; opacity:.95; }
.repCrewAreaL{ display:flex; flex-direction:column; gap:6px; }

/* Call sheet calendar */
.calGrid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
}
.calCell{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background: rgba(255,255,255,.02);
  cursor:pointer;
  min-height:64px;
}
.calCell:hover{ border-color:var(--border2); }
.calCell.hasShoot{ border-color: rgba(var(--accent-rgb),.40); }
.calCell.selected{ outline:2px solid rgba(var(--accent-rgb),.35); }
@media screen and (min-width: 821px){
  .calCell.selected{
    outline: 3px solid rgba(var(--accent-rgb),.55);
    border-color: rgba(var(--accent-rgb),.65);
    background: rgba(var(--accent-rgb),.14);
    box-shadow: 0 14px 28px rgba(0,0,0,.22), 0 0 0 3px rgba(var(--accent-rgb),.10) inset;
  }
}

.calCell .d{ font-weight:900; }
.calCell .tag{ margin-top:6px; color:var(--muted); font-size:12px; }


/* ===== Breakdown: Guion (versiones) ===== */
.scriptVersionUI{ margin-top:12px; }
.scriptGrid{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:12px;
  align-items:start;
}
@media screen and (max-width: 980px){
  .scriptGrid{ grid-template-columns: 1fr; }
}
.scriptSceneList{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:auto;
  max-height:360px;
  padding:6px;
  background: rgba(0,0,0,.10);
}
.scriptSceneItem{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer;
}
.scriptSceneItem:hover{ border-color: var(--border2); background: rgba(255,255,255,.03); }
.scriptSceneItem.selected{ border-color: rgba(var(--accent-rgb),.55); background: rgba(var(--accent-rgb),.08); }
.scriptSceneItem .n{ width:64px; flex:0 0 64px; font-weight:950; color: rgba(255,255,255,.9); }
.scriptSceneItem .h{ font-weight:850; color: rgba(255,255,255,.92); }
.scriptSceneItem .m{ font-size:12px; color: var(--muted); margin-top:2px; }

.scriptBodyArea{ min-height:190px; max-height:320px; }
.scriptReadView{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background: rgba(0,0,0,.12);
  overflow:auto;
  max-height:420px;
  white-space:pre-wrap;
  line-height:1.35;
  font-size:13px;
}



/* Back-compat: HTML usa scriptWrap/scriptLeft/scriptRight/scriptList */
.scriptWrap{
  display:grid;
  /* +50% ancho del listado de escenas */
  grid-template-columns: 510px 1fr;
  gap:12px;
  align-items:stretch;
  margin-top:12px;
  min-height:600px;
}
@media screen and (max-width: 980px){
  .scriptWrap{ grid-template-columns: 1fr; }
}
.scriptLeft{ min-width:0; display:flex; flex-direction:column; min-height:600px; }
.scriptRight{ min-width:0; display:flex; flex-direction:column; min-height:600px; }
.scriptList{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:auto;
  max-height:none;
  padding:6px;
  background: rgba(0,0,0,.10);
  flex:1 1 auto;
  min-height:0;
}

.scriptRight #scriptSceneBody{
  flex:0 0 auto;
  height:96px; /* ~4 renglones */
  max-height:120px;
  overflow:auto;
  resize:none;
}
.scriptRead{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background: rgba(0,0,0,.12);
  overflow:auto;
  max-height:420px;
  white-space:normal;
  line-height:1.35;
  font-size:13px;
}
.scriptReadScene{
  padding:10px 10px;
  border-radius:14px;
  border:1px solid transparent;
  margin-bottom:10px;
  background: rgba(255,255,255,.02);
  cursor:pointer;
}
.scriptReadScene:hover{ border-color: var(--border2); background: rgba(255,255,255,.03); }
.scriptReadScene.selected{ border-color: rgba(var(--accent-rgb),.55); background: rgba(var(--accent-rgb),.08); }
.scriptReadHead{ font-weight:900; margin-bottom:6px; }
.scriptReadBody{ color: rgba(255,255,255,.86); white-space:pre-wrap; }

.scriptImport, .scriptImportPanel{
  margin-top:10px;
  padding:10px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:16px;
  background: rgba(255,255,255,.02);
}

.scriptImportPanel{ flex:1 1 auto; display:flex; flex-direction:column; gap:8px; }
.scriptImportPanel #scriptImportText{
  flex:1 1 auto;
  width:100%;
  min-height:360px;
  resize:vertical;
}

.hidden{ display:none !important; }

.screenOnly{ display:block; }
.printOnly{ display:none; }


/* ===== Breakdown: Planos ===== */
.shotsWrap{ flex:1 1 auto; min-height:0; overflow:auto; max-height:none; }
.shotsWrap .table th, .shotsWrap .table td{ padding:9px 10px; }
.shotTypeSel{ width:100%; }
.shotDescInput{ width:100%; }

/* Print */


/* ===================== PLAN DE RODAJE (VISTA DIARIA) ===================== */
.dpToolbar{ justify-content:space-between; align-items:center; }

.dayplanHeader{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.dpRight{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  max-width:min(640px, 95vw);
}

.dpActions{ display:flex; justify-content:flex-end; width:100%; }

.dpDayMenu{ position:relative; }
.dpDayMenu summary{ list-style:none; cursor:pointer; }
.dpDayMenu summary::-webkit-details-marker{ display:none; }
.dpDayMenuBtn{ padding:6px 10px; line-height:1; display:inline-flex; align-items:center; justify-content:center; }

.dpDayMenuPop{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  min-width:240px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 38px rgba(0,0,0,.45);
  z-index:60;
}
.dpDayMenuItem{ display:block; }
.dpDayMenuHelp{ margin:6px 0 8px; }
.dpDayMenuSep{ height:1px; background: rgba(255,255,255,.14); margin:8px 0; }

.btn.full{ width:100%; display:flex; align-items:center; justify-content:center; }
.dpTitle{display:flex; flex-direction:column; gap:6px;}
.dpRowLine{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;}
.dayplanHeader .metaPill{font-size:13px; padding:7px 12px;}
.dpProj{
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.dpDay{
  font-size:1.05rem;
  font-weight:700;
}
.dpMeta{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  font-size:.95rem;
}
.dayplanNotes{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.03);
}


.dayMetaEditor{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.03);
}
.dayMetaGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  align-items:start;
}
.dayMetaGrid .field{ margin:0; }
.dayMetaNotes{ grid-column: 1 / -1; }

@media screen and (max-width: 720px){
  .dayMetaGrid{ grid-template-columns: 1fr; }
  .dayMetaNotes{ grid-column:auto; }
}


/* Timeline */
.dpScroller{
  display:grid;
  grid-template-columns: 78px 1fr;
  gap:10px;
  height:min(72vh, 920px);
  overflow:auto;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(0,0,0,.08);
}

.dayplanBody{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:12px;
  align-items:start;
}
.dayplanBody .dayplanInspector{
  margin-top:0;
  max-height:min(72vh, 920px);
  overflow:auto;
}
@media screen and (max-width: 980px){
  .dayplanBody{ grid-template-columns: 1fr; }
  .dayplanBody .dayplanInspector{ margin-top:12px; max-height:none; overflow:visible; }
}

.dpTimeCol{
  position:relative;
  height:var(--dp-day-h, 1728px);
  padding-right:6px;
}
.dpTimeLabel{
  position:absolute;
  left:10px;
  transform:translateY(-50%);
  font-size:12px;
  opacity:.78;
  white-space:nowrap;
}
.dpLane{
  position:relative;
  height:var(--dp-day-h, 1728px);
  border-left:1px solid rgba(255,255,255,.08);
}
.dpLine{
  position:absolute;
  left:0; right:0;
  height:1px;
  background:rgba(255,255,255,.08);
}
.dpLine.hour{ background:rgba(255,255,255,.18); }
.dpLine.half{ background:rgba(255,255,255,.12); }

/* Línea roja de horario en vivo */
.dpNowLine{
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:#ff3b30;
  z-index:9;
  pointer-events:none;
}
.dpNowDot{
  position:absolute;
  left:-5px;
  top:-4px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#ff3b30;
  box-shadow:0 0 0 3px rgba(255,59,48,.18);
}

.dpBlock{
  position:absolute;
  left:10px; right:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 10px 24px rgba(0,0,0,.22);
  padding:8px 10px 12px;
  cursor:grab;
  user-select:none;
  overflow:hidden;
}
.dpBlock:active{ cursor:grabbing; }
.dpBlock.sel{ outline:2px solid rgba(255,255,255,.22); }

.dpBlockTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.dpBlockTime{
  font-size:12px;
  opacity:.85;
  white-space:nowrap;
}
.dpBlockBtns{
  display:flex;
  gap:6px;
  align-items:center;
}

.dpBlockBtns--abs{
  position:absolute;
  top:6px;
  right:8px;
}
.dpMiniBtn{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  color:inherit;
  padding:2px 8px;
  border-radius:10px;
  cursor:pointer;
  line-height:1.2;
}
.dpMiniBtn:hover{ background:rgba(0,0,0,.28); }
.dpBlockTitle{
  margin-top:0;
  padding-right:96px;
  font-weight:900;
  line-height:1.12;
  display:flex;
  gap:8px;
  align-items:baseline;
  font-size:14px;
}
.dpBlockTitle .dpNum{ font-weight:950; opacity:.92; white-space:nowrap; }
.dpBlockTitle .dpSlug{ font-weight:900; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dpBlockTitle .dpTime{
  flex:0 0 auto;
  min-width:96px;
  font-size:12px;
  font-weight:900;
  color:var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing:.2px;
  opacity:.95;
}
.dpBlockMeta{
  margin-top:4px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
gap:6px 10px;
}
@media screen and (max-width:900px){
  .dpBlockMeta{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.dpMetaItem .k{
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.78;
  line-height:1.1;
}
.dpMetaItem .v{
  font-size:13px;
  font-weight:850;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dpBlockSummary{
  margin-top:6px;
  font-size:12px;
  opacity:.86;
  line-height:1.25;
  max-height:3.2em;
  overflow:hidden;
}
.dpBlockDetail{
  margin-top:3px;
  font-size:12px;
  opacity:.86;
  line-height:1.25;
}
.dpResize{
  position:absolute;
  left:0; right:0; bottom:0;
  height:10px;
  cursor:ns-resize;
  border-top:none;
  background:transparent;
}
.dpPalettePop{
  position:absolute;
  top:26px;
  right:8px;
  padding:8px;
  border:1px solid var(--border);
  background:rgba(20,20,20,.96);
  border-radius:12px;
  display:none;
  z-index:20;
}
.dpBlock.showPalette .dpPalettePop{ display:block; }
.dpSwatches{
  display:grid;
  grid-template-columns: repeat(8, 18px);
  gap:8px;
}
.dpSwatchBtn{
  width:18px;
  height:18px;
  border-radius:7px;
  border:1px solid rgba(255,255,255,.18);
  cursor:pointer;
}
.dpSwatchBtn:hover{ transform:scale(1.06); }

.dayplanInspector{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}
.dayplanInspector .dpGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.dayplanInspector .dpGrid .field{ margin:0; }
.dayplanInspector .dpActions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:10px;
}

.dayplanPrintTable{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:9.5pt;
  background:#fff;
  color:#111827;
}
.dayplanPrintTable th, .dayplanPrintTable td{
  border:1px solid #ddd;
  padding:5px 6px;
  vertical-align:top;
}
.dayplanPrintTable .muted{ color:#000; opacity:.75; }
.dayplanPrintTable th{
  background:#f3f4f6;
  color:#111827;
  white-space:normal;
}
.dayplanPrintTable td{ word-break:break-word; }

/* ===== Plan de Rodaje (impresión): columnas angostas + Resumen grande ===== */
/* Ajuste fino de anchos (Tomi): un poco más de aire en Hora/Dur/Nro/I-E/Pág, y más en Momento/Lugar.
   Resumen sigue absorbiendo el ancho restante. */
.dayplanPrintTable col.colHour{ width:46px; } /* +20% */
.dayplanPrintTable col.colDur{ width:52px; }
.dayplanPrintTable col.colNro{ width:34px; }  /* +20% */
.dayplanPrintTable col.colIE{ width:41px; }   /* +20% */
.dayplanPrintTable col.colPag{ width:46px; }  /* +20% */

/* Momento: +25% */
.dayplanPrintTable col.colTod{ width:70px; }

/* Lugar: +30% */
.dayplanPrintTable col.colLoc{ width:104px; }

/* Título: ancho razonable; el resto se lo lleva Resumen */
.dayplanPrintTable col.colTitle{ width:160px; }
.dayplanPrintTable col.colSum{ width:auto; }


.dayplanPrintTable td.cLoc, .dayplanPrintTable td.cTod{
  white-space:normal;
  word-break:break-word;
}
.dayplanPrintTable th{
  white-space:normal;
}

.dayplanPrintTable td.cHour,
.dayplanPrintTable td.cDur,
.dayplanPrintTable td.cNro,
.dayplanPrintTable td.cIE,
.dayplanPrintTable td.cPag{
  padding-left:4px;
  padding-right:4px;
}

.dpClock2{
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.05;
  font-weight:750;
}
.dpClock2 div:last-child{ opacity:.85; }

.dpBlockDur{
  opacity:.85;
  font-weight:650;
  margin-left:6px;
}

.dpDurRow{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.dpDurH{ max-width:96px; }
.dpDurM{ max-width:92px; }

.dpSceneTop{
  font-size:15px;
  margin-bottom:10px;
}
.dpFacts{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-bottom:10px;
}
.dpFact{
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.03);
}
.dpFact .k{
  font-size:11px;
  opacity:.75;
  margin-bottom:4px;
}
.dpFact .v{
  font-weight:800;
}
.dpSceneResText{
  white-space:pre-wrap;
}
.dayplanPrintTable tr.dpPrintNote td{
  font-weight:750;
}
@media print {


body.gbPrintingDayplan{ margin:0 !important; padding:0 !important; background:#fff !important; }
}

@media print {

body.gbPrintingDayplan > *{ display:none !important; }
}

@media print {

body.gbPrintingDayplan #gbPrintRoot{
  display:block !important;
  position:absolute;
  left:0;
  top:0;
  width:100%;
  padding:0 !important;
  margin:0 !important;
  background:#fff;
  color:#111;
  overflow:visible;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
}

@media print {

body.gbPrintingDayplan #gbPrintRoot *{
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
}

@media print {

body.gbPrintingDayplan #gbPrintRoot .catBlock{
  background:#fff !important;
  border:1px solid #ddd !important;
  border-radius:0 !important;
  overflow:visible !important;
}
}

@media print {

body.gbPrintingDayplan #gbPrintRoot .catBlock .hdr{
  background:#f6f6f6 !important;
  border-bottom:1px solid #ddd !important;
  color:#111 !important;
}
}

@media print {

body.gbPrintingDayplan #gbPrintRoot .catBlock .items{
  overflow:visible !important;
}
}


.dayplanTable .dpHandle{
  cursor:grab;
  user-select:none;
  font-size:18px;
  opacity:.75;
}
.dayplanTable .dpRow{
  border-left:8px solid transparent;
}
.dayplanTable .dpSwatch{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:4px;
  border:1px solid rgba(255,255,255,.25);
  margin-right:8px;
  vertical-align:middle;
}
.dayplanTable .dpColorInput{
  width:42px;
  height:28px;
  padding:0;
  border:none;
  background:transparent;
}
.dayplanTable td{
  vertical-align:top;
}
.dayplanTable .dpItem .linkBtn{
  padding:0;
  background:none;
  border:none;
  color:var(--text);
  text-align:left;
}
.dayplanTable .dpItem .linkBtn:hover{
  text-decoration:underline;
}

@media print{
  html, body{ -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .screenOnly{ display:none !important; }
  .printOnly{ display:block !important; }


  /* Plan de Rodaje (tabla de impresión): evitar cortes y repetir encabezado */
  .dayplanPrintTable thead{ display: table-header-group; }
  .dayplanPrintTable tr{ break-inside: avoid; page-break-inside: avoid; }
  body.gbPrintingDayplan .dayplanPrintTable{ page-break-inside:auto; }
  body.gbPrintingDayplan .dayplanPrintTable tbody{ display:table-row-group; }
  body.gbPrintingDayplan .dayplanPrintTable tr{
    break-inside:avoid;
    page-break-inside:avoid;
  }


  /* Plan del día */
  .dayplanNotes{ background:#fff; border:1px solid #ddd; }
  .dayplanTable{ font-size:10.5pt; }
  .dayplanTable .dpHandle,
  .dayplanTable .dpColorInput,
  .dayplanTable .btn{ display:none !important; }
  .dayplanTable .dpSwatch{ border:1px solid #000; }
  .dayplanTable input,
  .dayplanTable textarea,
  .dayplanTable select{
    border:none !important;
    background:transparent !important;
    color:#000 !important;
    box-shadow:none !important;
    padding:0 !important;
    height:auto !important;
  }
  body{ background:#fff; color:#000; }
  .sidebar, .noPrint, #toast, #hoverTip { display:none !important; }
  .mTopbar, .mDayBar, .mDock, .mBackdrop { display:none !important; }
  .shell{ grid-template-columns: 1fr; }

  /* Si alguna columna se oculta (ej: Calendario en Call Sheet), evitamos que el contenido quede “en media página”. */
  .grid2{ grid-template-columns: 1fr !important; }
  .grid2 > *{ grid-column: 1 / -1 !important; width:100% !important; }

  /* Lo mismo para layouts con banco lateral (Call Diario / Plan de Rodaje). */
  .shootingLayout{ grid-template-columns: 1fr !important; }
  .shootingLayout > .col{ grid-column: 1 / -1 !important; width:100% !important; }
  /* Sin dock inferior: usamos sólo la barra superior */
  .mDock{ display:none !important; }

  /* En Reportes (mobile) ocultamos el calendario: ya se elige el día arriba */
  body.mobileDayFocus #callCalCard{ display:none !important; }
  .main{ padding:0; }
  .view{ height:auto; overflow:visible; }
  .card{ box-shadow:none; border:1px solid #ddd; background:#fff; }
  .catBlock{ overflow:visible !important; border-radius:0 !important; }
  .cardHeader{ border-bottom:1px solid #ddd; }
  .muted{ color:#333; }
  .schedBoard, .reportsBoard{ overflow:visible; }

  /* Elementos por escena: que no se corte en papel */
  .elementsPrintPage{
    max-width: 190mm !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border:none !important;
    border-radius:0 !important;
    overflow:visible !important;
    padding:4mm !important;
  }
  .elementsPrintPage .eleScene{ break-inside: avoid; page-break-inside: avoid; }
  .elementsPrintPage .eleTable tr{ break-inside: avoid; page-break-inside: avoid; }
}

/* Plan de Rodaje: cards derecha a ancho disponible */
#daysBoardCard, #dayDetailCard{ width:100%; max-width:100%; min-width:0; }


/* ===== Reportes: Plan de Rodaje (pantalla) ===== */
.dpHdrMetaRow{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; flex-wrap:wrap; }
.dpHdrChips{ display:flex; gap:8px; flex-wrap:wrap; }
.dpChip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border:1px solid var(--border2);
  border-radius:999px;
  background: rgba(var(--panel-rgb), .35);
  font-size:12px;
  color:var(--text);
}

.dayplanPretty{ margin-top:10px; }
.dpPrettyList{ display:flex; flex-direction:column; gap:10px; }

.dpRowCard{
  display:flex;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:16px;
  background: rgba(var(--panel-rgb), .35);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.dpRowTime{
  width:64px;
  flex:0 0 64px;
  text-align:center;
  padding:6px 6px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(var(--panel-deep-rgb), .55);
}
.dpT1{ font-weight:900; font-size:14px; line-height:1.1; }
.dpT2{ color:var(--muted); font-size:12px; margin-top:4px; }

.dpRowBody{ flex:1; min-width:0; }
.dpRowTop{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.dpRowTitle{ display:flex; align-items:center; gap:10px; min-width:0; }
.dpRowTag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border:1px solid var(--border2);
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  color:var(--text);
  white-space:nowrap;
}
.dpRowTitleTxt{
  font-weight:900;
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dpRowBadges{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.dpBadge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border:1px solid var(--border2);
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
  background: rgba(var(--panel-deep-rgb), .35);
  white-space:nowrap;
}

.dpRowMeta{ margin-top:4px; color:var(--muted); font-size:12px; }
.dpRowSum{ margin-top:6px; font-size:13px; color:rgba(255,255,255,.86); line-height:1.25; }




/* ===== Elementos por escena (pantalla) ===== */
.elementsScreenPage{
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px;
  background: rgba(255,255,255,.02);
}
.elementsScreenPage .eleHeader{
  border-bottom:1px solid rgba(255,255,255,.10);
  padding-bottom:10px;
  margin-bottom:12px;
}
.elementsScreenPage .eleTitle{ font-size:1.15rem; font-weight:900; }
.elementsScreenPage .eleSub{ margin-top:2px; color:var(--muted); font-size:13px; }
.elementsScreenPage .eleSub2{ margin-top:8px; color:rgba(255,255,255,.86); font-size:13px; }
.elementsScreenPage .eleCards{ display:flex; flex-direction:column; gap:12px; }

.eleSceneCard{
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px 12px;
  background: rgba(255,255,255,.02);
}
.eleSceneTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.eleSceneLeft{ min-width:0; }
.eleSceneLeft .eleSceneNum{ font-weight:900; }
.eleSceneLeft .eleSceneSlug{ font-weight:800; opacity:.92; margin-top:2px; line-height:1.15; }
.eleSceneStart{ white-space:nowrap; }
.eleSceneCard .metaPill{ background: rgba(var(--panel-rgb), .45); border:1px solid rgba(255,255,255,.10); }

.eleSceneMeta{ margin-top:6px; color:var(--muted); font-size:12px; }

.eleCatsGrid{
  margin-top:10px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
}
@media screen and (max-width: 720px){
  .eleCatsGrid{ grid-template-columns: 1fr; }
}

.eleCatCard{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:8px 10px;
  background: rgba(0,0,0,.10);
}
.eleCatHdr{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  font-size:12px;
}
.eleCatItems{
  margin-top:6px;
  font-size:12px;
  color:rgba(255,255,255,.88);
  line-height:1.25;
  word-break:break-word;
}
.eleCatItems .muted{ color:var(--muted); }

.eleCatLabel{ display:inline-flex; align-items:center; gap:8px; }

/* ===== Impresión: hoja extra de elementos por escena ===== */
.pageBreak{ display:none; }

@media print{
  .pageBreak{ display:block !important; page-break-before:always; break-before:page; }

  .elementsPrintPage{
    max-width:780px;
    margin:0 auto;
    background:#fff;
    color:#111827;
    border:1px solid #ddd;
    border-radius:14px;
    padding:14px 14px;
  }
  .elementsPrintPage .eleHeader{
    border-bottom:1px solid #e5e7eb;
    padding-bottom:10px;
    margin-bottom:12px;
  }
  .elementsPrintPage .eleTitle{ font-size:14pt; font-weight:900; }
  .elementsPrintPage .eleSub{ margin-top:2px; font-size:10.5pt; color:#374151; }
  .elementsPrintPage .eleSub2{ margin-top:6px; font-size:10.5pt; color:#111827; }

  .elementsPrintPage .eleList{ display:flex; flex-direction:column; gap:12px; }

  .elementsPrintPage .eleScene{
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:10px 10px;
  }
  .elementsPrintPage .eleSceneHdr{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
  }
  .elementsPrintPage .eleSceneNum{ font-weight:900; font-size:11pt; }
  .elementsPrintPage .eleSceneSlug{ font-weight:900; font-size:11pt; color:#111827; flex:1; text-align:right; }
  .elementsPrintPage .eleSceneMeta{ margin-top:4px; color:#374151; font-size:10pt; }
  .elementsPrintPage .eleEmpty{ margin-top:8px; color:#6b7280; font-style:italic; font-size:10pt; }

  .elementsPrintPage .eleTable{
    width:100%;
    border-collapse:collapse;
    margin-top:8px;
  }
  .elementsPrintPage .eleTable th{
    width:120px;
    text-align:left;
    font-size:9.5pt;
    padding:5px 6px;
    color:#111827;
    background:#f3f4f6;
    border:1px solid #e5e7eb;
    vertical-align:top;
  }
  .elementsPrintPage .eleTable td{
    font-size:9.5pt;
    padding:5px 6px;
    border:1px solid #e5e7eb;
    color:#111827;
    vertical-align:top;
  }
  .elementsPrintPage .eleRowCast th{ background:#fff7ed; }
}

/* ===================== RESTORE REPORTES & CALLS (v1) ===================== */
.reportHead{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
}
.reportHead .t{ font-weight:900; }
.reportHead .m{ color:var(--muted); font-size:12px; margin-top:4px; }
.reportBody{
  padding:12px;
  overflow:auto;
  flex:1 1 auto;
  min-height:0;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}

/* Reportes: tabs (Plan de Rodaje / Call Sheet / Shotlist) */
.reportTabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}
.reportTabBtn{
  padding:8px 10px;
  border-radius:12px;
}
.reportTabBtn.active{
  border-color: rgba(var(--accent-rgb),.55);
  background: rgba(var(--accent-rgb),.12);
}
.reportPane{ min-height:0; }

.repCrewArea{ margin-top:10px; }
.repCrewAreaT{ font-weight:900; margin-bottom:6px; opacity:.95; }
.repCrewAreaL{ display:flex; flex-direction:column; gap:6px; }

/* Call sheet calendar */
#view-callsheet{ overflow:hidden; }
#view-callsheet .grid2{ height:100%; margin-bottom:0; }
#callCalCard, #callDetailCard{
  height:100%;
  display:flex;
  flex-direction:column;
  min-height:0;
}
#callCalCard .cardContent, #callDetailCard .cardContent{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}

.calGrid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
}
.calCell{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background: rgba(255,255,255,.02);
  cursor:pointer;
  min-height:64px;
  transition: transform .08s ease, border-color .08s ease;
}
.calCell:hover{ border-color:var(--border2); }
.calCell:active{ transform: scale(.99); }
.calCell.hasShoot{ border-color: rgba(var(--accent-rgb),.40); }
.calCell.selected{ outline:2px solid rgba(var(--accent-rgb),.35); }
.calCell .d{ font-weight:900; }
.calCell .tag{ margin-top:6px; color:var(--muted); font-size:12px; }

/* ===================== Reportes + Call Sheets: bloques visuales ===================== */
.catBlock{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  background: rgba(0,0,0,.14);
  margin-top:10px;
}
.catBlock .hdr{
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  border-bottom:1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.catBlock .items{
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
}

.kpiRow{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.kpi{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
}
.kpi b{ color:var(--text); }

/* Call sheet layout (desktop) */
#callSheetDetail{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:12px;
}
#callSheetDetail .catBlock{ margin-top:0; }
#callSheetDetail .callHeader{ grid-column: 1 / -1; }
#callSheetDetail .callCrew{ grid-column: 1 / -1; }
@media screen and (max-width:1200px){
  #callSheetDetail{ grid-template-columns: 1fr; }
}

/* Scrollbars visibles (Chrome/Edge) */
.daysBoardWrap::-webkit-scrollbar,
.bankList::-webkit-scrollbar,
.schedWrap::-webkit-scrollbar,
.reportsBoard::-webkit-scrollbar,
.reportBody::-webkit-scrollbar,
#callCalCard .cardContent::-webkit-scrollbar,
#callDetailCard .cardContent::-webkit-scrollbar,
#sceneEditorCard .cardContent::-webkit-scrollbar{
  height:12px;
  width:12px;
}
.daysBoardWrap::-webkit-scrollbar-thumb,
.bankList::-webkit-scrollbar-thumb,
.schedWrap::-webkit-scrollbar-thumb,
.reportsBoard::-webkit-scrollbar-thumb,
.reportBody::-webkit-scrollbar-thumb,
#callCalCard .cardContent::-webkit-scrollbar-thumb,
#callDetailCard .cardContent::-webkit-scrollbar-thumb,
#sceneEditorCard .cardContent::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius:999px;
  border:3px solid rgba(0,0,0,.18);
}
.daysBoardWrap::-webkit-scrollbar-track,
.bankList::-webkit-scrollbar-track,
.schedWrap::-webkit-scrollbar-track,
.reportsBoard::-webkit-scrollbar-track,
.reportBody::-webkit-scrollbar-track,
#callCalCard .cardContent::-webkit-scrollbar-track,
#callDetailCard .cardContent::-webkit-scrollbar-track,
#sceneEditorCard .cardContent::-webkit-scrollbar-track{
  background: rgba(0,0,0,.12);
}


/* ===== Breakdown: Guion (versiones) ===== */
.scriptVersionUI{ margin-top:12px; }
.scriptGrid{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:12px;
  align-items:start;
}
@media screen and (max-width: 980px){
  .scriptGrid{ grid-template-columns: 1fr; }
}
.scriptSceneList{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:auto;
  max-height:360px;
  padding:6px;
  background: rgba(0,0,0,.10);
}
.scriptSceneItem{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer;
}
.scriptSceneItem:hover{ border-color: var(--border2); background: rgba(255,255,255,.03); }
.scriptSceneItem.selected{ border-color: rgba(var(--accent-rgb),.55); background: rgba(var(--accent-rgb),.08); }
.scriptSceneItem .n{ width:64px; flex:0 0 64px; font-weight:950; color: rgba(255,255,255,.9); }
.scriptSceneItem .h{ font-weight:850; color: rgba(255,255,255,.92); }
.scriptSceneItem .m{ font-size:12px; color: var(--muted); margin-top:2px; }

.scriptBodyArea{ min-height:190px; max-height:320px; }
.scriptReadView{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background: rgba(0,0,0,.12);
  overflow:auto;
  max-height:420px;
  white-space:pre-wrap;
  line-height:1.35;
  font-size:13px;
}

/* ===== Breakdown: Planos ===== */
.shotsWrap{ flex:1 1 auto; min-height:0; overflow:auto; max-height:none; }
.shotsWrap .table th, .shotsWrap .table td{ padding:9px 10px; }
.shotTypeSel{ width:100%; }
.shotDescInput{ width:100%; }

/* Print */
@media print{

  /* Plan del día */
  .dayplanNotes{ background:#fff; border:1px solid #ddd; }
  .dayplanTable{ font-size:10.5pt; }
  .dayplanTable .dpHandle,
  .dayplanTable .dpColorInput,
  .dayplanTable .btn{ display:none !important; }
  .dayplanTable .dpSwatch{ border:1px solid #000; }
  .dayplanTable input,
  .dayplanTable textarea,
  .dayplanTable select{
    border:none !important;
    background:transparent !important;
    color:#000 !important;
    box-shadow:none !important;
    padding:0 !important;
    height:auto !important;
  }
  body{ background:#fff; color:#000; }
  .sidebar, .noPrint, #toast, #hoverTip { display:none !important; }
  .mTopbar, .mDock, .mBackdrop { display:none !important; }
  .shell{ grid-template-columns: 1fr; }
  .main{ padding:0; }
  .view{ height:auto; overflow:visible; }
  .card{ box-shadow:none; border:1px solid #ddd; background:#fff; }
  .cardHeader{ border-bottom:1px solid #ddd; }
  .muted{ color:#333; }
  .schedBoard, .reportsBoard{ overflow:visible; }
}



/* ===================== Mobile chrome + densidad (solo celular) ===================== */
/* Por defecto (desktop): oculto */
.mTopbar, .mDock, .mBackdrop{ display:none; }
.mDayBar{ display:none; }

@media screen and (max-width: 820px){

  /* Layout: sidebar como drawer */
  .shell{ grid-template-columns: 1fr; }
  .main{ padding: calc(var(--mChromeTop, 140px) + 10px) 10px 16px; }

  body.mNoScroll{ overflow:hidden; }

  .sidebar{
    position: fixed;
    top:0;
    bottom:0;
    left:0;
    width: min(86vw, 360px);
    z-index: 60;
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow:auto;
    overscroll-behavior: contain;
  }
  .sidebar.mOpen{ transform: translateX(0); }

  /* Mobile: títulos del menú en mayúsculas */
  .sidebar.mOpen .navBtn{ text-transform: uppercase; letter-spacing: .8px; }


  .mBackdrop{
    display:block;
    position: fixed;
    inset:0;
    z-index: 50;
    background: rgba(0,0,0,.55);
  }

  /* Topbar */
  .mTopbar{
    display:flex;
    position: fixed;
    top:0;
    left:0;
    right:0;
    height:58px;
    z-index: 70;
    gap:10px;
    align-items: center;
    padding:10px 10px 8px;
    background: rgba(var(--panel-rgb),.95);
    border-bottom:1px solid var(--border);
    backdrop-filter: blur(10px);
  }
  .mTopMid{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:0;
  }
  .mProjTitle{
    font-weight: 950;
    letter-spacing: .4px;
    font-size: 13px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mBadges{
    display:flex;
    gap:6px;
    flex-wrap:nowrap;
    overflow:hidden;
  }
  .mBadges .pill{
    padding:5px 8px;
    font-size:11px;
    border-radius: 999px;
  }

  .mProjectSwitch{
    max-width: 42vw;
    padding:7px 10px;
    border-radius:12px;
    border:1px solid var(--border);
    background: rgba(0,0,0,.18);
    color: var(--text);
    outline:none;
    font-size:12px;
  }

  .mIconBtn{
    width:38px;
    height:38px;
    border-radius:14px;
    border:1px solid var(--border);
    background: rgba(255,255,255,.03);
    color: var(--text);
    font-size:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
  }

  /* Dock */
  .mDock{
    display:flex;
    position: fixed;
    left:0;
    right:0;
    bottom:0;
    height:62px;
    z-index: 70;
    gap:8px;
    padding:10px 10px 10px;
    background: rgba(var(--panel-rgb),.95);
    border-top:1px solid var(--border);
    backdrop-filter: blur(10px);
  }

  /* Barra superior de día (selector + accesos rápidos) */
  .mDayBar{
    display:flex;
    flex-direction:column;
    position:fixed;
    top:58px;
    left:0;
    right:0;
    z-index:69;
    padding:8px 10px 10px;
    gap:8px;
    background: rgba(var(--panel-rgb),.95);
    border-bottom:1px solid var(--border);
    backdrop-filter: blur(10px);
  }
  .mDayRow{ display:flex; align-items:center; gap:8px; }
  .mDaySelect{
    flex:1;
    border-radius:14px;
    border:1px solid var(--border);
    background: rgba(255,255,255,.06);
    color:var(--text);
    padding:10px 12px;
    font-weight:900;
    font-size:13px;
    min-width:0;
  }
  .mDayMeta{
    font-size:12px;
    font-weight:900;
    opacity:.85;
    max-width:42vw;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  /* Accesos rápidos: 5 botones en una sola fila */
  .mDayBtns{ display:flex; flex-wrap:nowrap; gap:6px; }
  .mDayBtn{
    flex:1 1 0;
    border-radius:14px;
    border:1px solid rgba(var(--accent-rgb),.22);
    background: rgba(255,255,255,.05);
    color:var(--text);
    padding:10px 0;
    font-weight:950;
    font-size:12px;
    min-width:0;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .mDayBtn.active{
    background: rgba(var(--accent-rgb),.24);
    border-color: rgba(var(--accent-rgb),.55);
  }
  .mDockBtn{
    flex:1 1 0;
    border:1px solid var(--border);
    background: rgba(255,255,255,.03);
    color: var(--text);
    border-radius:16px;
    font-weight:900;
    letter-spacing:.2px;
    font-size:12px;
    padding:10px 0;
  }
  .mDockBtn.active{
    border-color: rgba(var(--accent-rgb),.55);
    background: rgba(var(--accent-rgb),.14);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.10) inset;
  }

  /* ===== Densidad general (solo mobile) ===== */
  .cardHeader{ padding:8px 10px; gap:8px; }
  .cardContent{ padding:8px 10px; }
  .cardTitle{ font-size:14px; }
  .gap{ gap:6px; }
  .spacer{ height:8px; }
  .field{ margin-bottom:8px; }
  .colTitle{ margin-bottom:6px; }

  .input, .textarea, select{
    padding:8px 10px;
    border-radius:12px;
    font-size:13px;
  }
  .btn{
    padding:8px 10px;
    border-radius:12px;
  }
  .btn.icon{
    width:32px;
    height:32px;
    border-radius:10px;
  }

  /* ===== Tablero de Días (más compacto) ===== */
  .dayCol{ width:250px; border-radius:16px; }
  .dayHeader{ padding:7px 8px; }
  .dayHeader .m{ margin-top:3px; font-size:11px; }
  .dropZone{ padding:6px; gap:6px; min-height:120px; }
  .sceneCard{ padding:6px 7px; border-radius:14px; gap:8px; }
  .bankList .sceneCard .title,
  .dropZone .sceneCard .title{
    font-size: 12.5px;
    line-height: 1.15;
  }
  .bankList .sceneCard .meta{ font-size:11px; margin-top:2px; }

  .sceneCard .sceneRemoveBtn{
    width:22px;
    height:22px;
    border-radius:8px;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    line-height:1;
  }

  /* Detalle del día: picker crew menos esponjoso */
  #dayCrewPicker .crewPickItem{
    padding:6px 7px;
    border-radius:12px;
    margin-bottom:6px;
  }

  /* ===== Cronograma (compacto) ===== */
  #scheduleCard .cardHeader{ flex-wrap:wrap; align-items:flex-start; }
  #scheduleCard .cardHeader .row.gap{ flex-wrap:wrap; gap:4px; }
  #scheduleCard .cardHeader label.row.gap{ gap:4px; }
  #schedSearch{ max-width:170px !important; }
  .input.compact{ width:112px; flex:0 0 112px; }

  /* Mobile: sacar textos "Zoom" y "Snap", dejar solo los selects (más compactos) */
  #scheduleCard .cardHeader label.row.gap.small.muted{ font-size:0; gap:0 !important; }
  #scheduleCard .cardHeader label.row.gap.small.muted select{ font-size:12px; }
  #schedZoom{ width:86px !important; flex:0 0 86px !important; }
  #schedSnap{ width:72px !important; flex:0 0 72px !important; }

  /* Mobile: scroll con inercia (como Tablero de Días) */
  .schedWrap, .schedBoard, .schedScrollTop{ -webkit-overflow-scrolling:touch; }

  /* Para que el swipe no se pelee con el drag: dejamos pan y el drag se activa con long-press */
  .schedBlock{ touch-action: pan-x pan-y; -webkit-touch-callout:none; }

  .schedDay{ width:280px; border-radius:16px; }
  .schedHead{ padding:7px 8px; }
  .schedHead .m{ font-size:11px; margin-top:3px; }
  .schedBlock{ padding:8px; border-radius:14px; }
  /* Con menos padding en mobile, subimos menos las pills para que no se recorten */
  .schedTicks{ top:1px; left:0; right:auto; }
  .schedBlock .meta{ font-size:11px; margin-top:4px; }
  .hourLabel{ font-size:10px; }

  /* ===== Call Sheets: calendario en una sola fila (scroll horizontal) ===== */
  #callCalCard .cardContent{ overflow-x:auto; }
  .calGrid{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:8px;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
  }
  .calCell{
    min-width:44px;
    min-height:44px;
    padding:8px;
  }
  .calCell[style*="opacity:0"]{ display:none; }
  .calCell .tag{ display:none; }

  /* ===== Reportes: filtros en una sola línea (scroll horizontal) ===== */
  #reportsFilters.chips{
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:4px;
  }
  #reportsFilters .chip{ flex:0 0 auto; }

  /* ===== Mobile focus 1 día: esconder edición y dejar seguimiento ===== */
  body.mobileDayFocus #dpBankCol,
  body.mobileDayFocus #dpInspectorCol{ display:none !important; }

  body.mobileDayFocus #dayplanSelect,
  body.mobileDayFocus #shotDaySelect{ display:none !important; }

  body.mobileDayFocus #dpDayMetaBtn,
  body.mobileDayFocus #btnAddDayPlanItem,
  body.mobileDayFocus #btnAddDayPlanBreak,
  body.mobileDayFocus #btnClearDayPlan,
  body.mobileDayFocus #btnRecalcDayDurations,
  body.mobileDayFocus #btnToggleBank{ display:none !important; }

  body.mobileDayFocus .dpBlockBtns,
  body.mobileDayFocus .dpPalettePop,
  body.mobileDayFocus .dpResize{ display:none !important; }
  body.mobileDayFocus .dpBlock{ pointer-events:none; cursor:default; }

  body.mobileDayFocus #callCalCard,
  body.mobileDayFocus #reportsTabs{ display:none !important; }

  body.mobileDayFocus #btnShotPrint{ display:none !important; }

  /* Call Sheet en mobile: lectura (inputs como texto) */
  body.mobileDayFocus #callSheetDetailCard .btn{ display:none !important; }
  body.mobileDayFocus #callSheetDetailCard .input,
  body.mobileDayFocus #callSheetDetailCard .textarea,
  body.mobileDayFocus #callSheetDetailCard select{
    pointer-events:none;
    border-color: transparent;
    background: transparent;
    padding: 0;
    border-radius: 0;
  }
}

/* ================== Mobile/desktop tweak v4 ================== */
/* Banco de Escenas: botón de colapsar/expandir más chico (especialmente en celular) */
.bankDock{ height:56px; border-radius:14px; }
.shootingLayout.bankCollapsed{ grid-template-columns: 48px 1fr; }

#btnToggleBank, #btnToggleBankDock{
  width:30px;
  height:30px;
  min-width:30px;
  padding:0;
  font-size:16px;
  line-height:1;
}

@media screen and (max-width: 820px){
  .bankDock{ height:44px; border-radius:12px; }
  /* Mobile: al colapsar el banco, que NO quede la franja vacía.
     El botón pasa a flotar pegado al borde derecho. */
  .shootingLayout.bankCollapsed{ grid-template-columns: 0px 1fr; }
  .shootingLayout.bankCollapsed #bankCol{
    width:0;
    min-width:0;
    overflow:visible;
    pointer-events:none;
  }
  .shootingLayout.bankCollapsed #bankDock{ display:none !important; }

  /* Mobile: el botón para reabrir el banco vuelve al header (al lado del título) */
  .bankToggleSlot{ display:flex; align-items:center; }
  .bankToggleSlot.hidden{ display:none; }

  #daysBoardCard .cardHeader{ justify-content:flex-start; }
  #daysBoardCard .cardHeader .row.gap{ margin-left:auto; }
  #daysBoardCard .bankToggleSlot{ margin-right:6px; }
  #daysBoardCard .bankToggleSlot .btn{ width:30px; height:30px; min-width:30px; padding:0; border-radius:12px; }
  .shootingLayout.bankCollapsed #btnToggleBankDock{
    width:28px;
    height:48px;
    min-width:28px;
    border-radius:14px;
    font-size:16px;
  }

  #btnToggleBank, #btnToggleBankDock{
    width:26px;
    height:26px;
    min-width:26px;
    font-size:14px;
  }
}


/* ================= Desktop typography bump (>= 981px) ================= */
@media screen and (min-width: 981px){
  body{ font-size: 17px; }

  /* más legible lo "chiquito" */
  label,
  .small,
  .sub,
  .sceneCard .meta,
  .crewPickItem .meta,
  .dayHeader .m,
  .reportHead .m,
  .scriptSceneItem .m,
  .calCell .tag,
  .sceneCatHead .count,
  .hoverTip .m,
  .hoverTip .grpTitle{
    font-size: 13px;
  }
  .bankList .sceneCard .meta{ font-size: 12px; }

  .table th, .table td{ font-size: 14px; }
  .projectSwitch{ font-size: 13px; }

  /* pestañas en mayúsculas (sidebar) */
  .navBtn{
    text-transform: uppercase;
    letter-spacing: .8px;
  }
}


@media screen and (min-width: 821px){
  /* Desktop: Reportes con scroll horizontal visible (como Cronograma) */
  #view-reports{ overflow:hidden; }
  #view-reports > .card{
    height:100%;
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  #view-reports > .card .cardContent{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
  }
  #reportsBoard{
    flex:1 1 auto;
    min-height:0;
    overflow-x:auto;
    overflow-y:auto;
    align-items:flex-start;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    padding:10px 12px 8px;
  }
}


/* ===== Plan de Rodaje (pantalla completa) ===== */
#view-dayplan{ overflow:hidden; }
#dayplanCard{ height:100%; display:flex; flex-direction:column; min-height:0; }
#dayplanCard .cardContent{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
#dayplanHead{ flex:0 0 auto; }
.dayplanBody{ flex:1 1 auto; min-height:0; height:100%; align-items:stretch; }
.dpScroller{ height:100% !important; min-height:0; max-height:none !important; overflow:auto; }
.dayplanBody .dayplanInspector{ height:100%; min-height:0; max-height:none !important; overflow:auto; }

/* ===== Plan General: notas/tareas ===== */
.schedBlock.note{
  border-style:dashed;
  background: rgba(255,255,255,.035);
}
.schedBlock.note .resize{
  background: rgba(var(--accent-rgb),.14);
}

/* ===== Print: matar UI mobile sí o sí ===== */
@media print{
  #mTopbar, #mDayBar, #mDock, #mBackdrop, .mTopbar, .mDayBar, .mDock, .mBackdrop, .mDockBtn{ display:none !important; }
  #modeBanner, .modeBanner{ display:none !important; }
}


/* ===================== Plan de Rodaje (vista diaria) + Banco de Escenas ===================== */
#view-dayplan{ overflow-y:auto; overflow-x:hidden; }

#dpBankCol{
  position: sticky;
  top: 0;
  align-self: start;
}

#dayplanLayout.bankCollapsed{
  grid-template-columns: 48px 1fr;
}
#dayplanLayout.bankCollapsed .bankCard{ display:none; }
#dayplanLayout.bankCollapsed #dpBankDock{ display:flex; }

#dpLane.dpDropOver{
  outline: 2px dashed rgba(255,255,255,.22);
  outline-offset: -6px;
}

@media screen and (max-width: 820px){
  #dayplanLayout{ grid-template-columns: 1fr; }
  #dpBankCol{ position: relative; }
  #dpBankDock{ display:none !important; }
  #dayplanLayout.bankCollapsed{ grid-template-columns: 1fr; }
}


/* ===== Print overrides: sin recuadro de tarjetas (Reportes / Plan de Rodaje) ===== */
@media print{
  /* Imprimir solo el contenido útil */
  /* En impresión: el layout de Plan de Rodaje debe ocupar todo el ancho (si el Banco está oculto, el grid auto-colapsa) */
  #dayplanLayout{ grid-template-columns: 1fr !important; }
  #dayplanLayout > .col{ grid-column: 1 / -1 !important; width:100% !important; }
  #dayplanCard, #dayplanPrint{ width:100% !important; max-width:none !important; }
  #dpBankCol{ display:none !important; }

  /* En Plan de Rodaje: esconder la UI de pantalla (encabezado/timeline) y dejar solo la tabla de impresión */
  #dayplanHead, #dayplanCard .spacer, #dayplanCard .dayplanBody{ display:none !important; }
  #dayplanPrint{ display:block !important; }

  /* Sacar el "recuadro" de las tarjetas contenedoras */
  #callDetailCard, #dayplanCard{
    border:none !important;
    box-shadow:none !important;
    background:transparent !important;
  }
  #callDetailCard .cardHeader,
  #dayplanCard .cardHeader{
    display:none !important;
  }
  #callDetailCard .cardContent,
  #dayplanCard .cardContent{
    padding:0 !important;
  }
}


/* Call Sheet: columnas PU / Call / RTS */
.callTimeTable{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  background: rgba(255,255,255,.02);
}
.callTimeTable th,
.callTimeTable td{
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  vertical-align:top;
}
.callTimeTable th{
  font-size:12px;
  color: var(--muted);
  font-weight:950;
  letter-spacing:.02em;
  text-align:left;
}
.callTimeTable tr:last-child td{ border-bottom:none; }
.callTimeTable td.time{
  white-space:nowrap;
  font-variant-numeric: tabular-nums;
}
.callTimeTable td.name{
  font-weight:900;
}
.callTimeTable .mutedCell{ color: var(--muted); }


/* Call Sheet: áreas de Crew */
.callCrewArea{ margin-top:10px; }
.callCrewAreaTitle{ font-weight:900; margin-bottom:6px; }

/* Call Sheet: fila separadora de Área (un solo header para todo Crew) */
.crewAreaRow td{
  background: rgba(255,255,255,.03);
  font-weight:950;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing:.04em;
  font-size:11px;
}
@media print {

body.gbPrintingCallsheet .crewAreaRow td{
  background:#f0f0f0 !important;
  color:#111 !important;
  border-bottom:1px solid #ddd !important;
}
}


/* Call Sheet: Tel (no es hora, puede wrappear) */
.callTimeTable td.tel{
  text-align:center;
  font-variant-numeric: tabular-nums;
  white-space:normal;
  word-break:break-word;
}



/* Call Sheet: columnas alineadas (screen + print) */
.callTimeTable{
  border-collapse: collapse;
  table-layout: fixed;
}
.callTimeTable th.time, .callTimeTable td.time{
  text-align:center;
  white-space:nowrap;
  font-variant-numeric: tabular-nums;
}
.callTimeTable--cast th:nth-child(3), .callTimeTable--cast td:nth-child(3),
.callTimeTable--cast th:nth-child(4), .callTimeTable--cast td:nth-child(4),
.callTimeTable--cast th:nth-child(5), .callTimeTable--cast td:nth-child(5){
  width:78px;
}
.callTimeTable--cast th:nth-child(2), .callTimeTable--cast td:nth-child(2){
  width:160px;
}
.callTimeTable--crew th:nth-child(2), .callTimeTable--crew td:nth-child(2){
  width:160px;
}
.callTimeTable--crew th:nth-child(3), .callTimeTable--crew td:nth-child(3),
.callTimeTable--crew th:nth-child(4), .callTimeTable--crew td:nth-child(4){
  width:78px;
}
.callTimeTable--crew th:nth-child(5), .callTimeTable--crew td:nth-child(5){
  width:78px;
}
@media print {


/* Call Sheet (print): Nombre más angosto para que Rol quede más a la izquierda + Tel 50% más ancho */
body.gbPrintingCallsheet .callTimeTable--cast th:nth-child(1),
body.gbPrintingCallsheet .callTimeTable--cast td:nth-child(1),
body.gbPrintingCallsheet .callTimeTable--crew th:nth-child(1),
body.gbPrintingCallsheet .callTimeTable--crew td:nth-child(1){
  width:190px !important;
}
}

@media print {

body.gbPrintingCallsheet .callTimeTable--crew th:nth-child(5),
body.gbPrintingCallsheet .callTimeTable--crew td:nth-child(5){
  width:117px !important; /* 78px * 1.5 */
}
}



@media screen and screen and (max-width: 420px){
  .mDayBtn{ font-size:11px; padding:9px 0; }
}


/* Call Diario - Notas */
.callNotesBox{
  margin: 10px 0 14px;
}
.callNotesBox .miniLbl{
  font-size:12px;
  color: var(--muted);
  font-weight:900;
  letter-spacing:.02em;
  margin-bottom:6px;
}
#callDayNotes{
  width:100%;
  min-height:72px;
}
body.readOnly #callDayNotes{
  opacity:.75;
  cursor:not-allowed;
}


/* ===================== Plan General (impresión) ===================== */
.pgPrintWrap{
  padding: 8mm;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.pgPrintHeader{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  background: var(--pg-accentSoft, #eaf4ff);
  border:1px solid var(--pg-border, #cfe1f0);
  border-radius:14px;
  border-bottom:2px solid var(--pg-accent, #2d7fb8);
  padding:10px 12px 8px;
  margin-bottom:12px;
}
.pgHeaderLeft{ display:flex; flex-direction:column; gap:2px; }
.pgHeaderRight{ text-align:right; font-size:9.5pt; color:#333; line-height:1.25; }
.pgTitle{ font-size:20pt; font-weight:900; letter-spacing:.3px; }
.pgProject{ font-size:11pt; font-weight:800; color:#111; }
.pgKpis{ font-size:9.5pt; color:#333; }
.pgSub{ font-size:10pt; color:#333; }

.pgGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:start;
}
.pgDayCard{
  border:1px solid var(--pg-border, #cfe1f0);
  border-radius:14px;
  overflow:hidden;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  background:#fff;
  box-shadow: inset 0 3px 0 var(--pg-accent, #2d7fb8);
}
.pgDayHead{
  padding:10px 12px;
  background:var(--pg-head, #f4f9ff);
  border-bottom:1px solid var(--pg-border, #cfe1f0);
}
.pgDayTop{ display:flex; justify-content:space-between; gap:10px; align-items:center; }
.pgDayTitle{ font-weight:900; font-size:11.5pt; line-height:1.1;   color: var(--pg-accentText, #1f4b6e);
}
.pgBadge{
  font-size:9pt;
  border:1px solid var(--pg-border, #cfe1f0);
  padding:2px 8px;
  border-radius:999px;
  background:var(--pg-chip, #eff7ff);
  white-space:nowrap;
}
.pgDayMeta{ margin-top:4px; font-size:9.5pt; color:#333; }
.pgPills{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.pgPill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 9px;
  border:1px solid var(--pg-border, #cfe1f0);
  border-radius:999px;
  background:var(--pg-chip, #eff7ff);
  font-size:9pt;
  white-space:nowrap;
}
.pgPill b{ font-weight:900; }

.pgTable{ width:100%; border-collapse:collapse; }
.pgTable thead{ display: table-header-group; }
.pgTable th{
  text-align:left;
  font-size:8.5pt;
  padding:7px 12px;
  background:var(--pg-head, #f4f9ff);
  border-bottom:1px solid var(--pg-border, #cfe1f0);
  color: var(--pg-accentText, #1f4b6e);
  text-transform:uppercase;
  letter-spacing:.06em;
}
.pgTable td{
  font-size:9.5pt;
  padding:7px 12px;
  border-bottom:1px solid rgba(0,0,0,.08);
  vertical-align:top;
}
.pgTable tbody tr:nth-child(even) td{ background: var(--pg-rowAlt, #fafcff); }
.pgTable tbody tr:nth-child(even) td.pgDur{ background: var(--pg-rowAlt, #fafcff); }
.pgTime{ color: var(--pg-accentText, #1f4b6e); }
.pgTable tr{ break-inside: avoid; page-break-inside: avoid; }
.pgTime{ white-space:nowrap; font-variant-numeric: tabular-nums; }
.pgDur{ text-align:right; white-space:nowrap; font-variant-numeric: tabular-nums; }
.pgRowNote td{ font-style:italic; }
@media print {


body.gbPrintMobile.gbPrintingSchedule .pgGrid{ grid-template-columns: repeat(1, 1fr); }
}

@media print {

body.gbPrintMobile.gbPrintingSchedule .pgTitle{ font-size:16pt; }
}

@media print {

body.gbPrintMobile.gbPrintingSchedule .pgTable th,
body.gbPrintMobile.gbPrintingSchedule .pgTable td{ padding:5px 8px; font-size:9pt; }
}

@media print {


body.gbPrintingSchedule{ margin:0 !important; padding:0 !important; background:#fff !important; }
}

@media print {

body.gbPrintingSchedule > *{ display:none !important; }
}

@media print {

body.gbPrintingSchedule #gbPrintRoot{
  display:block !important;
  position:absolute;
  left:0;
  top:0;
  width:100%;
  padding:0 !important;
  margin:0 !important;
  background:#fff;
  color:#111;
  overflow:visible;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  --pg-accent: #2d7fb8;
  --pg-accentText: #1f4b6e;
  --pg-accentSoft: #eaf4ff;
  --pg-border: #cfe1f0;
  --pg-head: #f4f9ff;
  --pg-chip: #eff7ff;
  --pg-rowAlt: #fafcff;
}
}

@media print {

body.gbPrintingSchedule #gbPrintRoot *{ -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media print {

body.gbPrintingSchedule .muted{ color:#4b5563 !important; }
}

/* Schedule Day Picker */
.btn.iconBtn{
  width:40px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0;
}
.btn.iconBtn.active{
  box-shadow: 0 0 0 2px rgba(255,255,255,.18) inset;
}

dialog.dlg{
  border:1px solid var(--border);
  border-radius:20px;
  padding:0;
  background: rgba(20,20,20,.96);
  color: var(--text);
  width: min(560px, 92vw);
  max-width: 92vw;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
dialog.dlg::backdrop{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.dlgHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
}
.dlgTitle{ font-weight:900; letter-spacing:.2px; }
.schedCalTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px 8px;
}
.schedCalMonth{
  font-weight:900;
  text-align:center;
  flex: 1 1 auto;
}
.schedCalGrid{
  padding:0 14px 10px;
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
}
.schedCalDow{
  font-size:11px;
  color: var(--muted);
  text-align:center;
  padding:4px 0 2px;
  font-weight:800;
  letter-spacing:.4px;
}
.schedCalCell{
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  display:flex;
  align-items:center;
  justify-content:center;
  user-select:none;
  cursor:pointer;
  font-weight:800;
}
.schedCalCell.isEmpty{
  border:1px dashed rgba(255,255,255,.05);
  background: transparent;
  cursor: default;
  opacity:.35;
}
.schedCalCell.isDisabled{
  opacity:.28;
  cursor: default;
}
.schedCalCell.isSelected{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08) inset;
}
.schedCalActions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding:10px 14px 12px;
  border-top:1px solid var(--border);
}
.schedCalHint{
  padding:0 14px 14px;
  font-size:12px;
}

/* Schedule day selection, including undated jornadas. */
#btnSchedDays{width:auto;white-space:nowrap;}
#schedDayPicker{max-height:90vh;overflow-y:auto;}
button.schedCalCell{font:inherit;color:inherit;width:100%;padding:0;}
.schedCalCell[aria-pressed="mixed"]{outline:1px dashed currentColor;}
.schedUndatedDays{border-top:1px solid var(--border);margin-top:14px;padding:12px 14px;}
.schedUndatedDays h3{font-size:14px;margin:0 0 6px;}
.schedUndatedDay{display:flex;align-items:center;gap:10px;padding:9px 4px;cursor:pointer;}
.schedUndatedDay input{width:18px;height:18px;flex-shrink:0;accent-color:#ddd;}
.schedUndatedDay span{overflow-wrap:anywhere;}
/* Printed production documents must win over the shared Studio header styles. */
@media print{
  html:has(body[class*="gbPrinting"]){ background:#fff !important; color-scheme:light; }
  body[class*="gbPrinting"] > :not(#gbPrintRoot){ display:none !important; }
  body.gbPrintingDayplan #gbPrintRoot,
  body.gbPrintingSchedule #gbPrintRoot{ position:static; width:100%; }
  body.gbPrintingDayplan #gbPrintRoot .dpPrintBlock{ border:0 !important; }
  body.gbPrintingDayplan #gbPrintRoot .items{ padding:0 !important; }
  body.gbPrintingSchedule .pgDayCard{ break-inside:auto; page-break-inside:auto; -webkit-column-break-inside:auto; }
  .dpPrintHeader{ margin:0 0 6mm; break-inside:avoid; break-after:avoid; color:#161616; }
  .dpPrintHeading{ display:flex; align-items:flex-end; justify-content:space-between; gap:8mm; padding-bottom:4mm; border-bottom:2px solid #161616; }
  .dpPrintEyebrow{ margin-bottom:2mm; font-size:8pt; font-weight:700; letter-spacing:1.6px; text-transform:uppercase; }
  .dpPrintHeading h1{ margin:0; font-size:21pt; line-height:1.15; font-weight:800; }
  .dpPrintDay{ max-width:45%; text-align:right; font-size:11pt; font-weight:700; line-height:1.4; }
  .dpPrintMeta{ display:grid; grid-template-columns:1fr 2fr 1fr; gap:6mm; padding:3mm 0; border-bottom:1px solid #d1d1d1; }
  .dpPrintMeta span{ display:block; margin-bottom:1mm; color:#555; font-size:8pt; }
  .dpPrintMeta strong{ font-size:10pt; font-weight:700; }
  .dpPrintMeta > :last-child{ text-align:right; }
  body.gbPrintingDayplan .dayplanPrintTable{ font-size:8.5pt; line-height:1.35; }
  body.gbPrintingDayplan .dayplanPrintTable th{ background:#ededed; padding:2mm 1.5mm; font-size:8pt; }
  body.gbPrintingDayplan .dayplanPrintTable td{ padding:2mm 1.5mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colHour{ width:15mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colDur{ width:17mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colNro{ width:11mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colTitle{ width:48mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colIE{ width:10mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colLoc{ width:32mm; }
  body.gbPrintingDayplan .dayplanPrintTable col.colTod{ width:17mm; }
  body.gbPrintingDayplan .dayplanPrintTable td.cNro{ font-size:10pt; font-weight:800; text-align:center; }
  body.gbPrintingDayplan .dayplanPrintTable td.cDur,
  body.gbPrintingDayplan .dayplanPrintTable td.cHour{ white-space:nowrap; }
  body.gbPrintingDayplan .dayplanPrintTable .dpClock2{ line-height:1.25; }
  body.gbPrintingDayplan .dayplanPrintTable td.cSum{ font-size:8pt; }
}

/* Cast actions grow with their labels in narrow cards. */
#castDirectory .cast-details [data-cast-plan],#castDirectory .cast-details [data-cast-pdf]{height:auto;min-height:34px;max-width:100%;white-space:normal;line-height:1.35;}
