/* styles/ptpp.css
   Estilos SOLO para la vista PP/PT (limpio, sin duplicados)
*/

:root{
  --blue:#2f5597;
  --line:#c7cdd8;
  --cell:#ffffff;
  --cellAlt:#f7faff;
  --current:#dbe8ff;
  --shadow:0 12px 30px rgba(0,0,0,.18);
}

/* Toolbar */
.planeacion-toolbar{
  background:#fff;
  border:1px solid #d6deef;
  border-radius:8px;
  padding:10px 12px;
  margin-bottom:10px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}
.toolbar-left{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.week-info{
  font-weight:800;
  color:#163e86;
}
.hint{
  color:#444;
  font-size:13px;
}

/* Table wrapper */
.table-wrap{
  background:#fff;
  border:1px solid #d6deef;
  border-radius:8px;
  overflow:auto;
  max-height:520px;
  cursor:grab;
}
.table-wrap.dragging{ cursor:grabbing; }

/* Excel table */
.excel-table{
  border-collapse:separate;
  border-spacing:0;
  width:max-content;
  min-width:100%;
  table-layout:fixed;
  font-size:14px;
}
.excel-table th,
.excel-table td{
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:8px 10px;
  background:var(--cell);
  white-space:nowrap;
  text-align:center;
  vertical-align:middle;
}

/* Header rows */
.excel-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:var(--blue);
  color:#fff;
  font-weight:800;
}
.excel-table thead tr:nth-child(2) th{
  background:#4e7cbc;
  font-weight:800;
}

/* Sticky left SKU column */
.sticky{ position:sticky; z-index:4; }
.sticky-0{ left:0; z-index:6; }

/* Column sizing */
.col-sku{ min-width:280px; text-align:left !important; font-weight:900; }
.col-sub{ min-width:90px; }
.group{ background:var(--blue); color:#fff; }

.sep-right{
  border-right:3px solid #000 !important;
}

/* Current week highlight */
.is-current-week{
  background:var(--current) !important;
}

/* Row zebra */
.excel-table tbody tr:nth-child(even) td{
  background:var(--cellAlt);
}

/* Special cells */
.pedido-cell{ font-weight:900; color:#000; }
.restante-cell{ font-weight:900; }
.enviado-cell{ font-weight:800; }

.clickable{
  cursor:pointer;
  user-select:none;
}
.clickable:hover{
  outline:2px solid rgba(47,85,151,.25);
  outline-offset:-2px;
}

/* Avance cell layout */
.avance-cell{ padding:6px 8px; }
.avance-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:900;
}
.dot{
  width:12px;
  height:12px;
  border-radius:50%;
  display:inline-block;
  border:1px solid rgba(0,0,0,.25);
}
.dot.green{ background:#2e7d32; }
.dot.yellow{ background:#f6c000; }
.dot.red{ background:#d32f2f; }
.dot.gray{ background:#9aa4b2; }

/* ===== Modals ===== */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9999;
}
.modal-backdrop.open{ display:flex; }

.modal{
  width:min(780px, 95vw);
  max-height:90vh;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}
.modal.wide{
  width:min(980px, 96vw);
}

.modal-head{
  background:var(--blue);
  color:#fff;
  padding:12px 14px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.modal-head h3{
  margin:0;
  font-size:18px;
  font-weight:900;
}
.modal-sub{
  font-size:13px;
  opacity:.95;
  margin-top:4px;
}
.modal-x{
  background:transparent;
  border:none;
  color:#fff;
  font-size:22px;
  cursor:pointer;
  padding:6px 10px;
  border-radius:10px;
}
.modal-x:hover{ background:rgba(255,255,255,.15); }

.modal-body{
  padding:14px;
  overflow:auto;
  background:#fff;
}
.modal-actions{
  padding:12px 14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top:1px solid #e3e8f3;
  background:#fafbff;
}
.btn{
  padding:10px 14px;
  border-radius:10px;
  border:1px solid #cfd7ea;
  background:#fff;
  font-weight:800;
  cursor:pointer;
}
.btn:hover{ background:#f2f6ff; }
.btn.primary{
  background:var(--blue);
  border-color:var(--blue);
  color:#fff;
}
.btn.primary:hover{ background:#24457c; }

/* Daily grid */
.daily-grid{
  display:grid;
  grid-template-columns: 120px 1fr 1fr;
  gap:10px 12px;
  align-items:center;
}
.daily-grid .hdr{
  font-weight:900;
  color:#173a7a;
  padding-bottom:6px;
  border-bottom:1px solid #e2e8f3;
}
.daily-grid input{
  width:100%;
  padding:8px 10px;
  border:1px solid #cfd7ea;
  border-radius:8px;
  font-size:14px;
}

/* Ship totals + grid */
.ship-totals{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  padding:10px 12px;
  background:#f7faff;
  border:1px solid #e1e8f6;
  border-radius:10px;
  margin-bottom:12px;
  font-size:14px;
}
.ship-grid{
  display:grid;
  grid-template-columns: 180px 1fr 160px 120px;
  gap:10px 12px;
  align-items:center;
}
.ship-grid .hdr{
  font-weight:900;
  color:#173a7a;
  padding-bottom:6px;
  border-bottom:1px solid #e2e8f3;
}
.ship-grid input{
  width:100%;
  padding:8px 10px;
  border:1px solid #cfd7ea;
  border-radius:8px;
  font-size:14px;
}
.ship-grid .mini{
  font-size:12px;
  color:#666;
  margin-top:4px;
}
