/* ═════════════════════════════════════════════════════════════════════════════
   js/install-ops-v2.css — WIP-UI-INSTALL-OPS-01
   Final Sign Off + Installation Schedule visual rebuild.
   Classes namespaced .iop-* (install-ops) so they don't collide with existing
   jobs/install markup. Pulses + animations gated by prefers-reduced-motion.
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
  --iop-ok-fg: #15803D;
  --iop-ok-bg: #DCFCE7;
  --iop-ok-light: #22C55E;
  --iop-ok-deep: #166534;
  --iop-due-fg: #DC2626;
  --iop-due-bg: #FEE2E2;
  --iop-due-light: #EF4444;
  --iop-due-deep: #991B1B;
  --iop-warn-fg: #D97706;
  --iop-warn-bg: #FEF3C7;
  --iop-warn-light: #F59E0B;
  --iop-warn-deep: #92400E;
  --iop-info-fg: #1D4ED8;
  --iop-info-bg: #DBEAFE;
  --iop-info-light: #3B82F6;
  --iop-purple: #7C3AED;
  --iop-purple-bg: #F3E8FF;
  --iop-purple-light: #A855F7;
}

@keyframes iop-pulse-urgent-red {
  0%, 100% { box-shadow: inset 3px 0 0 0 var(--iop-due-fg),    0 0 0 0 rgba(220,38,38,.4); }
  50%      { box-shadow: inset 3px 0 0 0 var(--iop-due-light), 0 0 0 5px rgba(220,38,38,0); }
}
@keyframes iop-pulse-warn-yellow {
  0%, 100% { box-shadow: inset 3px 0 0 0 var(--iop-warn-fg),    0 0 0 0 rgba(217,119,6,.3); }
  50%      { box-shadow: inset 3px 0 0 0 var(--iop-warn-light), 0 0 0 4px rgba(217,119,6,0); }
}
@keyframes iop-pulse-dot-red    { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
@keyframes iop-pulse-dot-yellow { 0%,100% { box-shadow: 0 0 0 0 rgba(217,119,6,.5); } 50% { box-shadow: 0 0 0 5px rgba(217,119,6,0); } }
@keyframes iop-pulse-risk-red   { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); } 50% { box-shadow: 0 0 0 5px rgba(220,38,38,0); } }
@media (prefers-reduced-motion: reduce) {
  .iop-page .fso-row.pulse-urgent, .iop-page .fso-row.pulse-warn,
  .iop-page .age-pulse-dot, .iop-page .crew-chip.over,
  .iop-page .job-card.at-risk, .iop-page .status-dot.pulse-red,
  .iop-page .now-line::before, .iop-page .now-line {
    animation: none !important;
  }
}

/* ─── Page chassis ─────────────────────────────────────────────────── */
.iop-page { padding: 4px 0 32px; font-family: 'Archivo', system-ui, sans-serif; }

/* ─── HERO ─────────────────────────────────────────────────────────── */
.iop-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 20px; padding-bottom: 18px;
  border-bottom: 1px solid var(--s200, #E7E5E4); flex-wrap: wrap;
}
.iop-hero-l { display: flex; flex-direction: column; gap: 6px; }
.iop-hero-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--s500, #78716C);
}
.iop-hero-title {
  font-size: 36px; font-weight: 900; letter-spacing: -0.04em;
  color: var(--ink, #0A0A0A); line-height: 1;
}
.iop-hero-sub {
  font-size: 15px; font-weight: 700; color: var(--s500, #78716C);
  margin-top: 4px; letter-spacing: -0.005em;
}
.iop-hero-sub b { color: var(--ink, #0A0A0A); font-weight: 900; }
.iop-hero-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.iop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap;
  cursor: pointer; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.iop-btn-w {
  background: #fff; color: var(--s700, #44403C);
  border-color: var(--s200, #E7E5E4); box-shadow: var(--shadow-rest);
}
.iop-btn-w:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.iop-btn-d { background: var(--ink, #0A0A0A); color: #fff; border-color: var(--ink, #0A0A0A); }
.iop-btn-d:hover { background: var(--s900, #1C1917); }
.iop-btn-r {
  background: var(--red, #C41230); color: #fff; border-color: var(--red, #C41230);
  box-shadow: 0 1px 2px rgba(196,18,48,.2), 0 4px 12px -4px rgba(196,18,48,.4);
}
.iop-btn-r:hover { background: var(--red-dark, #A60F28); }
.iop-btn-ok { background: var(--iop-ok-fg); color: #fff; border-color: var(--iop-ok-fg); }
.iop-btn-ok:hover { background: var(--iop-ok-deep); }

/* ─── FSO KPI band (4 cards) ───────────────────────────────────────── */
.iop-kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 18px;
}
@media (max-width: 1100px) { .iop-kpi-row { grid-template-columns: repeat(2, 1fr); } }
.iop-kpi-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1400px) { .iop-kpi-row.cols-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .iop-kpi-row.cols-5 { grid-template-columns: repeat(2, 1fr); } }

.iop-kpi {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 12px; padding: 14px 16px;
  box-shadow: var(--shadow-rest);
  transition: all 180ms cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.iop-kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); border-color: var(--s300, #D6D3D1); }
.iop-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.iop-kpi.awaiting::before  { background: var(--iop-due-fg); }
.iop-kpi.inprogress::before { background: var(--iop-warn-fg); }
.iop-kpi.signed::before    { background: var(--iop-ok-fg); }
.iop-kpi.value::before     { background: var(--ink, #0A0A0A); }
.iop-kpi.revenue::before   { background: var(--red, #C41230); }
.iop-kpi.frames::before    { background: var(--iop-info-fg); }
.iop-kpi.jobs::before      { background: var(--iop-purple); }
.iop-kpi.hours::before     { background: var(--iop-ok-fg); }
.iop-kpi.zip::before       { background: var(--iop-warn-fg); }

.iop-kpi-eyebrow {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--s500, #78716C);
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
}
.iop-kpi-num {
  font-size: 28px; font-weight: 900; letter-spacing: -0.035em;
  line-height: 1; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 5px;
}
.iop-kpi-num .unit { font-size: 12px; font-weight: 700; color: var(--s500, #78716C); }
.iop-kpi.awaiting  .iop-kpi-num { color: var(--iop-due-fg); }
.iop-kpi.inprogress .iop-kpi-num { color: var(--iop-warn-fg); }
.iop-kpi.signed    .iop-kpi-num { color: var(--iop-ok-fg); }
.iop-kpi.value     .iop-kpi-num { color: var(--ink, #0A0A0A); }
.iop-kpi.revenue   .iop-kpi-num { color: var(--red, #C41230); }
.iop-kpi.frames    .iop-kpi-num { color: var(--iop-info-fg); }
.iop-kpi.jobs      .iop-kpi-num { color: var(--iop-purple); }
.iop-kpi.hours     .iop-kpi-num { color: var(--iop-ok-fg); }
.iop-kpi.zip       .iop-kpi-num { color: var(--iop-warn-fg); }
.iop-kpi-bar {
  height: 4px; background: var(--s100, #F5F5F4); border-radius: 3px;
  overflow: hidden; margin-top: 9px;
}
.iop-kpi-bar-fill { height: 100%; border-radius: 3px; }
.iop-kpi.revenue .iop-kpi-bar-fill { background: linear-gradient(90deg, var(--red, #C41230), var(--red-dark, #A60F28)); }
.iop-kpi.frames  .iop-kpi-bar-fill { background: linear-gradient(90deg, var(--iop-info-light), var(--iop-info-fg)); }
.iop-kpi.jobs    .iop-kpi-bar-fill { background: linear-gradient(90deg, var(--iop-purple-light), var(--iop-purple)); }
.iop-kpi.hours   .iop-kpi-bar-fill { background: linear-gradient(90deg, var(--iop-ok-light), var(--iop-ok-fg)); }
.iop-kpi.zip     .iop-kpi-bar-fill { background: linear-gradient(90deg, var(--iop-warn-light), var(--iop-warn-fg)); }
.iop-kpi-foot {
  font-size: 10.5px; color: var(--s500, #78716C); font-weight: 700;
  margin-top: 6px;
}
.iop-kpi-foot b { color: var(--ink, #0A0A0A); font-weight: 800; }

/* ─── FSO toolbar (filter chips + search) ───────────────────────────── */
.iop-toolbar {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 11px; padding: 8px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 16px;
  box-shadow: var(--shadow-rest);
}
.iop-tb-l { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; min-width: 0; }
.iop-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 8px;
  font-size: 11.5px; font-weight: 700;
  color: var(--s700, #44403C); background: var(--s50, #FAFAF9);
  border: 1px solid var(--s100, #F5F5F4); cursor: pointer;
  font-family: inherit; letter-spacing: -0.005em;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-chip:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.iop-chip.on { background: var(--ink, #0A0A0A); color: #fff; border-color: var(--ink, #0A0A0A); }
.iop-chip .c {
  font-size: 9.5px; font-weight: 800; padding: 1px 5px;
  border-radius: 4px; background: rgba(0,0,0,.06);
  color: var(--s600, #57534E); margin-left: 2px;
}
.iop-chip.on .c { background: rgba(255,255,255,.18); color: #fff; }
.iop-chip.urgent .c { background: var(--iop-due-bg); color: var(--iop-due-fg); }
.iop-chip.urgent.on .c { background: rgba(255,255,255,.25); color: #fff; }
.iop-chip.warn .c { background: var(--iop-warn-bg); color: var(--iop-warn-fg); }
.iop-chip.warn.on .c { background: rgba(255,255,255,.25); color: #fff; }
.iop-tb-divider { width: 1px; height: 20px; background: var(--s200, #E7E5E4); }
.iop-search-mini {
  position: relative; flex: 1; max-width: 280px; min-width: 160px;
}
.iop-search-mini input {
  width: 100%; padding: 6px 12px 6px 12px;
  background: var(--s50, #FAFAF9); border: 1px solid var(--s100, #F5F5F4);
  border-radius: 8px; font-size: 12px; font-family: inherit;
}
.iop-search-mini input:focus {
  outline: none; background: #fff;
  border-color: var(--ink, #0A0A0A);
}

/* ─── FSO Section cards ─────────────────────────────────────────────── */
.iop-section {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-rest); margin-bottom: 14px;
}
.iop-section-h {
  padding: 11px 18px; border-bottom: 1px solid var(--s100, #F5F5F4);
  display: flex; align-items: center; gap: 10px;
  justify-content: space-between;
}
.iop-section-h.awaiting {
  background: linear-gradient(90deg, var(--iop-due-bg) 0%, rgba(254,226,226,.4) 100%);
  border-bottom-color: rgba(220,38,38,.15);
}
.iop-section-h.inprogress {
  background: linear-gradient(90deg, var(--iop-warn-bg) 0%, rgba(254,243,199,.4) 100%);
  border-bottom-color: rgba(217,119,6,.15);
}
.iop-section-h.signed {
  background: linear-gradient(90deg, var(--iop-ok-bg) 0%, rgba(220,252,231,.4) 100%);
  border-bottom-color: rgba(21,128,61,.15);
}
.iop-section-h-l { display: flex; align-items: center; gap: 10px; }
.iop-section-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.iop-section-icon.urgent { background: var(--iop-due-fg); }
.iop-section-icon.warn   { background: var(--iop-warn-fg); }
.iop-section-icon.ok     { background: var(--iop-ok-fg); }
.iop-section-icon svg { width: 14px; height: 14px; }
.iop-section-title {
  font-size: 13px; font-weight: 800; color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em;
}
.iop-section-title .c {
  font-weight: 800; font-size: 11px; padding: 1px 7px;
  border-radius: 5px; margin-left: 6px; letter-spacing: 0.02em;
}
.iop-section-h.awaiting   .iop-section-title .c { background: var(--iop-due-fg); color: #fff; }
.iop-section-h.inprogress .iop-section-title .c { background: var(--iop-warn-fg); color: #fff; }
.iop-section-h.signed     .iop-section-title .c { background: var(--iop-ok-fg); color: #fff; }
.iop-section-sub {
  font-size: 11px; color: var(--s500, #78716C); font-weight: 700; margin-top: 2px;
}

/* ─── FSO table ─────────────────────────────────────────────────────── */
.iop-fso-table { width: 100%; border-collapse: collapse; }
.iop-fso-table th {
  background: var(--s50, #FAFAF9); padding: 9px 14px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--s500, #78716C);
  text-align: left; border-bottom: 1px solid var(--s200, #E7E5E4);
}
.iop-fso-table th.r { text-align: right; }
.iop-fso-table th.c { text-align: center; }
.iop-fso-table td {
  padding: 10px 14px; font-size: 12.5px;
  border-bottom: 1px solid var(--s100, #F5F5F4); vertical-align: middle;
}
.iop-fso-table td.r {
  text-align: right; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--ink, #0A0A0A);
}
.iop-fso-table td.c { text-align: center; }
.iop-fso-table tr:last-child td { border-bottom: none; }

.fso-row { transition: background 180ms cubic-bezier(.4,0,.2,1); position: relative; }
.fso-row:hover { background: var(--s50, #FAFAF9); }
.fso-row.pulse-urgent {
  background: linear-gradient(90deg, rgba(220,38,38,.06) 0%, transparent 70%);
  animation: iop-pulse-urgent-red 1.8s ease-in-out infinite;
}
.fso-row.pulse-warn {
  background: linear-gradient(90deg, rgba(217,119,6,.06) 0%, transparent 70%);
  animation: iop-pulse-warn-yellow 2s ease-in-out infinite;
}

.iop-client-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.iop-client-av {
  width: 30px; height: 30px; border-radius: 8px; color: #fff;
  font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.02em; flex-shrink: 0;
}
.iop-client-av.c1 { background: linear-gradient(135deg, #7C3AED, #A855F7); }
.iop-client-av.c2 { background: linear-gradient(135deg, var(--iop-info-fg), #3B82F6); }
.iop-client-av.c3 { background: linear-gradient(135deg, var(--iop-ok-fg), #16A34A); }
.iop-client-av.c4 { background: linear-gradient(135deg, #D97706, #F59E0B); }
.iop-client-av.c5 { background: linear-gradient(135deg, var(--red, #C41230), var(--red-dark, #A60F28)); }
.iop-client-mid { display: flex; flex-direction: column; min-width: 0; }
.iop-client-name {
  font-size: 12.5px; font-weight: 700; color: var(--ink, #0A0A0A);
  letter-spacing: -0.005em; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.iop-client-loc {
  font-size: 10.5px; color: var(--s500, #78716C);
  font-weight: 600; margin-top: 1px;
  display: flex; align-items: center; gap: 4px;
}
.iop-branch-pill {
  padding: 1px 5px; background: var(--s100, #F5F5F4);
  color: var(--s700, #44403C); border-radius: 3px;
  font-weight: 800; letter-spacing: 0.02em; font-size: 9.5px;
}

.iop-job-num {
  color: var(--iop-info-fg); font-weight: 800;
  cursor: pointer; font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.iop-job-num:hover { text-decoration: underline; }

.iop-pay-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 5px;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.iop-pay-pill.cod      { background: var(--iop-info-bg); color: var(--iop-info-fg); }
.iop-pay-pill.paid     { background: var(--iop-ok-bg); color: var(--iop-ok-fg); }
.iop-pay-pill.deposit  { background: var(--iop-purple-bg); color: var(--iop-purple); }

.iop-age-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}
.iop-age-tag .age-pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.iop-age-tag.urgent { color: var(--iop-due-fg); }
.iop-age-tag.urgent .age-pulse-dot { background: var(--iop-due-fg); animation: iop-pulse-dot-red 1.4s ease-in-out infinite; }
.iop-age-tag.warn { color: var(--iop-warn-fg); }
.iop-age-tag.warn .age-pulse-dot { background: var(--iop-warn-fg); animation: iop-pulse-dot-yellow 1.6s ease-in-out infinite; }
.iop-age-tag.ok { color: var(--iop-ok-fg); }
.iop-age-tag.ok .age-pulse-dot { background: var(--iop-ok-fg); }

.iop-frames-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 5px; font-size: 11px;
  font-weight: 800; background: var(--s100, #F5F5F4);
  color: var(--s700, #44403C);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em; min-width: 30px;
}

.iop-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 5px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.iop-status-pill .dot { width: 5px; height: 5px; border-radius: 50%; }
.iop-status-pill.cm-awaiting {
  background: var(--iop-warn-bg); color: var(--iop-warn-deep);
  border: 1px solid rgba(217,119,6,.18);
}
.iop-status-pill.cm-awaiting .dot {
  background: var(--iop-warn-fg);
  animation: iop-pulse-dot-yellow 1.6s ease-in-out infinite;
}
.iop-status-pill.check-measure { background: var(--iop-info-bg); color: var(--iop-info-fg); }
.iop-status-pill.check-measure .dot { background: var(--iop-info-fg); }
.iop-status-pill.standard, .iop-status-pill.complete { background: var(--iop-ok-bg); color: var(--iop-ok-fg); }
.iop-status-pill.standard .dot, .iop-status-pill.complete .dot { background: var(--iop-ok-fg); }

.iop-row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.iop-cad-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; font-size: 11px; font-weight: 700;
  color: var(--s700, #44403C); background: #fff;
  border: 1px solid var(--s200, #E7E5E4); border-radius: 7px;
  cursor: pointer; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-cad-btn:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.iop-cad-btn svg { width: 11px; height: 11px; }
.iop-open-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; font-size: 11px; font-weight: 800;
  color: #fff; background: var(--red, #C41230);
  border: 1px solid var(--red, #C41230); border-radius: 7px;
  cursor: pointer; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-open-btn:hover { background: var(--red-dark, #A60F28); transform: translateY(-1px); }
.iop-open-btn svg { width: 11px; height: 11px; transition: transform 180ms; }
.iop-open-btn:hover svg { transform: translateX(2px); }

/* ─── Install Schedule: crew strip ──────────────────────────────────── */
.iop-crew-strip {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 12px; padding: 10px 14px;
  margin-bottom: 14px; box-shadow: var(--shadow-rest);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.iop-crew-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--s500, #78716C); flex-shrink: 0;
}
.iop-crew-list { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.iop-crew-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--s50, #FAFAF9);
  border: 1px solid var(--s200, #E7E5E4); border-radius: 10px;
  cursor: pointer; min-width: 180px; position: relative;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-crew-chip:hover { border-color: var(--ink, #0A0A0A); background: #fff; }
.iop-crew-av {
  width: 30px; height: 30px; border-radius: 8px; color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.02em; flex-shrink: 0; position: relative;
}
.iop-crew-av.c1 { background: linear-gradient(135deg, var(--red, #C41230), var(--red-dark, #A60F28)); }
.iop-crew-av.c2 { background: linear-gradient(135deg, var(--iop-info-fg), var(--iop-info-light)); }
.iop-crew-av.c3 { background: linear-gradient(135deg, var(--iop-ok-fg), var(--iop-ok-light)); }
.iop-crew-av.c4 { background: linear-gradient(135deg, var(--iop-purple), var(--iop-purple-light)); }
.iop-crew-av.c5 { background: linear-gradient(135deg, var(--iop-warn-fg), var(--iop-warn-light)); }
.iop-crew-av .status-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff;
}
.iop-crew-av .status-dot.active { background: var(--iop-ok-fg); }
.iop-crew-av .status-dot.leave  { background: var(--s400, #A8A29E); }
.iop-crew-av .status-dot.over,
.iop-crew-av .status-dot.sick {
  background: var(--iop-due-fg);
  animation: iop-pulse-dot-red 1.4s ease-in-out infinite;
}
.iop-crew-mid { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.iop-crew-name {
  font-size: 12.5px; font-weight: 800; color: var(--ink, #0A0A0A);
  letter-spacing: -0.005em; line-height: 1.2;
}
.iop-crew-stats {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--s500, #78716C);
  font-weight: 700; margin-top: 2px;
}
.iop-crew-stats b { color: var(--ink, #0A0A0A); font-weight: 800; font-variant-numeric: tabular-nums; }
.iop-crew-cap-bar {
  flex: 1; min-width: 60px; max-width: 80px;
  height: 5px; background: var(--s200, #E7E5E4);
  border-radius: 3px; overflow: hidden; margin-left: 8px;
}
.iop-crew-cap-fill { height: 100%; border-radius: 3px; transition: width 600ms cubic-bezier(.4,0,.2,1); }
.iop-crew-chip.empty .iop-crew-cap-fill { background: var(--s300, #D6D3D1); }
.iop-crew-chip.under .iop-crew-cap-fill { background: var(--iop-info-light); }
.iop-crew-chip.good  .iop-crew-cap-fill { background: var(--iop-ok-fg); }
.iop-crew-chip.high  .iop-crew-cap-fill { background: var(--iop-warn-fg); }
.iop-crew-chip.over  .iop-crew-cap-fill { background: var(--iop-due-fg); }
.iop-crew-chip.over {
  border-color: rgba(220,38,38,.3);
  animation: iop-pulse-risk-red 2s ease-in-out infinite;
}
.iop-crew-add {
  padding: 8px 14px; background: #fff;
  border: 1px dashed var(--s300, #D6D3D1); border-radius: 10px;
  font-size: 12px; font-weight: 700; color: var(--s500, #78716C);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-crew-add:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); background: var(--s50, #FAFAF9); }
.iop-crew-manage {
  padding: 8px 12px; background: var(--ink, #0A0A0A); color: #fff;
  border-radius: 9px; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; font-family: inherit; border: none;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-crew-manage:hover { background: var(--s900, #1C1917); }

/* ─── Install Schedule: nav row (view toggle + period + day tabs) ──── */
.iop-nav-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 12px; padding: 8px 12px;
  box-shadow: var(--shadow-rest);
}
.iop-view-toggle {
  display: inline-flex; background: var(--s50, #FAFAF9);
  border: 1px solid var(--s200, #E7E5E4); border-radius: 9px;
  padding: 3px; gap: 2px;
}
.iop-view-tab {
  padding: 6px 12px; font-size: 11.5px; font-weight: 700;
  color: var(--s500, #78716C); border-radius: 6px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  border: none; background: none; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-view-tab:hover { color: var(--ink, #0A0A0A); }
.iop-view-tab.on { background: var(--ink, #0A0A0A); color: #fff; box-shadow: 0 1px 2px rgba(10,10,10,.15); }
.iop-nav-divider { width: 1px; height: 24px; background: var(--s200, #E7E5E4); }
.iop-period-nav { display: inline-flex; align-items: center; gap: 4px; }
.iop-period-btn {
  padding: 6px 12px; font-size: 11.5px; font-weight: 700;
  color: var(--s700, #44403C); background: var(--s50, #FAFAF9);
  border: 1px solid var(--s200, #E7E5E4); border-radius: 8px;
  cursor: pointer; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-period-btn:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.iop-period-btn.on { background: var(--red, #C41230); color: #fff; border-color: var(--red, #C41230); box-shadow: 0 1px 2px rgba(196,18,48,.2); }
.iop-period-arrow {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--s200, #E7E5E4); background: #fff;
  color: var(--s500, #78716C);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-period-arrow:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.iop-period-label {
  font-size: 13px; font-weight: 800; color: var(--ink, #0A0A0A);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  padding: 0 8px;
}
.iop-day-tabs {
  display: inline-flex; gap: 4px; flex: 1; justify-content: flex-end;
}
.iop-day-tab {
  padding: 6px 10px; font-size: 11px; font-weight: 700;
  color: var(--s500, #78716C); border-radius: 7px;
  cursor: pointer; display: inline-flex; flex-direction: column;
  align-items: center; gap: 1px;
  background: var(--s50, #FAFAF9); border: 1px solid transparent;
  min-width: 42px; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-day-tab:hover { border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.iop-day-tab .dow {
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
}
.iop-day-tab .dn {
  font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.iop-day-tab.on { background: var(--ink, #0A0A0A); color: #fff; border-color: var(--ink, #0A0A0A); }
.iop-day-tab.on .dow { color: rgba(255,255,255,.65); }
.iop-day-tab.today { position: relative; }
.iop-day-tab.today::after {
  content: ''; position: absolute; bottom: 3px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--red, #C41230);
}
.iop-day-tab.today.on::after { background: #fff; }

/* ─── Install Schedule: grid ─────────────────────────────────────────── */
.iop-grid-wrap {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 14px; box-shadow: var(--shadow-rest);
}
.iop-grid-h {
  display: flex; border-bottom: 1px solid var(--s200, #E7E5E4);
  background: var(--s50, #FAFAF9); position: relative;
}
.iop-grid-h-installer {
  width: 170px; flex-shrink: 0; padding: 9px 14px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--s500, #78716C);
  display: flex; align-items: center;
  border-right: 1px solid var(--s200, #E7E5E4);
}
.iop-grid-h-days { flex: 1; display: flex; overflow-x: auto; min-width: 0; }
.iop-grid-h-day {
  flex: 1; min-width: 380px; display: flex; flex-direction: column;
  border-right: 1px solid var(--s100, #F5F5F4);
}
.iop-grid-h-day:last-child { border-right: none; }
.iop-grid-h-day-title {
  padding: 7px 14px; font-size: 11.5px; font-weight: 800;
  color: var(--ink, #0A0A0A); letter-spacing: -0.005em;
  background: var(--s100, #F5F5F4);
  border-bottom: 1px solid var(--s200, #E7E5E4);
  display: flex; align-items: center; justify-content: space-between;
}
.iop-grid-h-day-title.today {
  background: linear-gradient(90deg, rgba(196,18,48,.08), rgba(196,18,48,.02));
  color: var(--red, #C41230);
}
.iop-grid-h-day-title .day-stat {
  font-size: 9.5px; font-weight: 700; color: var(--s500, #78716C);
  letter-spacing: -0.005em;
}
.iop-grid-h-day-title.today .day-stat { color: var(--red, #C41230); }
.iop-grid-h-hours { display: flex; padding: 0; }
.iop-grid-h-hour {
  flex: 1; text-align: center; padding: 5px 0;
  font-size: 9.5px; font-weight: 700;
  color: var(--s400, #A8A29E); letter-spacing: 0.02em;
  border-right: 1px solid var(--s100, #F5F5F4);
}
.iop-grid-h-hour:last-child { border-right: none; }

.iop-grid-body { display: flex; min-height: 240px; }
.iop-grid-installer-col {
  width: 170px; flex-shrink: 0; background: var(--s50, #FAFAF9);
  border-right: 1px solid var(--s200, #E7E5E4);
  display: flex; flex-direction: column;
}
.iop-grid-installer-row {
  padding: 14px; border-bottom: 1px solid var(--s100, #F5F5F4);
  display: flex; align-items: center; gap: 9px; height: 74px;
}
.iop-grid-installer-row:last-child { border-bottom: none; }
.iop-installer-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.iop-installer-name {
  font-size: 12.5px; font-weight: 800; color: var(--ink, #0A0A0A);
  letter-spacing: -0.005em; line-height: 1.2;
}
.iop-installer-stat {
  font-size: 10px; color: var(--s500, #78716C);
  font-weight: 700; margin-top: 2px;
}
.iop-installer-stat b { color: var(--ink, #0A0A0A); font-weight: 800; font-variant-numeric: tabular-nums; }
.iop-installer-cap {
  margin-top: 5px; height: 4px; background: var(--s200, #E7E5E4);
  border-radius: 3px; overflow: hidden; width: 100%; max-width: 100px;
}
.iop-installer-cap-fill { height: 100%; border-radius: 3px; transition: width 600ms cubic-bezier(.4,0,.2,1); }
.iop-installer-cap-fill.empty { width: 0; }
.iop-installer-cap-fill.under { background: var(--iop-info-light); }
.iop-installer-cap-fill.good  { background: var(--iop-ok-fg); }
.iop-installer-cap-fill.high  { background: var(--iop-warn-fg); }
.iop-installer-cap-fill.over  { background: var(--iop-due-fg); }

.iop-grid-days-col { flex: 1; overflow-x: auto; min-width: 0; }
.iop-grid-day {
  flex: 1; min-width: 380px; border-right: 1px solid var(--s100, #F5F5F4);
  display: flex; flex-direction: column; position: relative;
}
.iop-grid-day:last-child { border-right: none; }
.iop-grid-day.today-col {
  background: linear-gradient(180deg, rgba(196,18,48,.02) 0%, transparent 30%);
}
.iop-grid-cell-row {
  display: flex; height: 74px;
  border-bottom: 1px solid var(--s100, #F5F5F4);
  position: relative;
}
.iop-grid-cell-row:last-child { border-bottom: none; }
.iop-grid-cell {
  flex: 1; border-right: 1px solid var(--s100, #F5F5F4);
  position: relative; cursor: pointer;
  transition: background 180ms cubic-bezier(.4,0,.2,1);
}
.iop-grid-cell:last-child { border-right: none; }
.iop-grid-cell:hover { background: rgba(196,18,48,.04); }
.iop-grid-cell.empty::before {
  content: '+'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px; color: var(--s300, #D6D3D1);
  font-weight: 300; opacity: 0;
  transition: opacity 180ms cubic-bezier(.4,0,.2,1);
}
.iop-grid-cell.empty:hover::before { opacity: 1; }
.iop-now-line {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--red, #C41230);
  box-shadow: 0 0 4px rgba(196,18,48,.4);
  z-index: 5; pointer-events: none;
}
.iop-now-line::before {
  content: ''; position: absolute; top: -3px; left: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red, #C41230);
  box-shadow: 0 0 0 2px #fff;
}

/* ─── Install Schedule: job cards in grid ───────────────────────────── */
.iop-job-card {
  position: absolute; top: 6px; bottom: 6px;
  border-radius: 7px; padding: 6px 9px; color: #fff;
  cursor: grab; transition: all 180ms cubic-bezier(.4,0,.2,1);
  overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  font-size: 10.5px; box-shadow: 0 2px 6px -2px rgba(0,0,0,.2);
  z-index: 3;
}
.iop-job-card:hover { transform: translateY(-1px); box-shadow: 0 6px 12px -2px rgba(0,0,0,.25); z-index: 4; }
.iop-job-card.green  { background: linear-gradient(135deg, var(--iop-ok-fg), var(--iop-ok-deep)); }
.iop-job-card.blue   { background: linear-gradient(135deg, var(--iop-info-fg), #1E40AF); }
.iop-job-card.purple { background: linear-gradient(135deg, var(--iop-purple), #6D28D9); }
.iop-job-card.amber  { background: linear-gradient(135deg, var(--iop-warn-fg), var(--iop-warn-deep)); }
.iop-job-card.at-risk { animation: iop-pulse-risk-red 1.8s ease-in-out infinite; }
.iop-job-card.at-risk::before {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px rgba(220,38,38,.6);
}
.iop-job-card .jc-job   { font-size: 11.5px; font-weight: 900; letter-spacing: -0.005em; line-height: 1; }
.iop-job-card .jc-client { font-size: 10px; font-weight: 700; line-height: 1.2; opacity: .95; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iop-job-card .jc-loc   { font-size: 9px; font-weight: 600; line-height: 1.2; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iop-job-card .jc-foot  { font-size: 9.5px; font-weight: 700; margin-top: auto; display: flex; align-items: center; gap: 6px; opacity: .95; }
.iop-job-card .jc-foot .sep { opacity: .5; }

/* ─── Install Schedule: Smart Recommendations panel ─────────────────── */
.iop-recs-panel {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 14px; box-shadow: var(--shadow-rest);
}
.iop-recs-h {
  padding: 11px 18px;
  background: linear-gradient(90deg, var(--pale-red, #FBF3F4) 0%, rgba(251,243,244,.4) 100%);
  border-bottom: 1px solid var(--s200, #E7E5E4);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.iop-recs-h-l { display: flex; align-items: center; gap: 10px; }
.iop-recs-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--red, #C41230), var(--red-dark, #A60F28));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.iop-recs-icon svg { width: 16px; height: 16px; }
.iop-recs-title {
  font-size: 14px; font-weight: 900; color: var(--ink, #0A0A0A);
  letter-spacing: -0.015em; line-height: 1.1;
}
.iop-recs-sub {
  font-size: 10.5px; color: var(--s500, #78716C);
  font-weight: 700; margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.iop-recs-sub .source {
  padding: 1px 6px; background: var(--ink, #0A0A0A); color: #fff;
  border-radius: 4px; font-size: 8.5px;
  letter-spacing: 0.08em; font-weight: 800;
}
.iop-recs-count {
  padding: 3px 8px; background: var(--red, #C41230); color: #fff;
  border-radius: 6px; font-size: 10.5px;
  font-weight: 800; letter-spacing: 0.02em;
}
.iop-recs-body { padding: 8px; }
.iop-rec-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--s200, #E7E5E4);
  background: var(--s50, #FAFAF9); margin-bottom: 6px;
  cursor: pointer;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-rec-item:last-child { margin-bottom: 0; }
.iop-rec-item:hover {
  border-color: var(--ink, #0A0A0A); background: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-rest);
}
.iop-rec-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.iop-rec-item.priority-high .iop-rec-icon { background: linear-gradient(135deg, var(--iop-due-fg), var(--iop-due-deep)); }
.iop-rec-item.priority-med  .iop-rec-icon { background: linear-gradient(135deg, var(--iop-warn-fg), var(--iop-warn-deep)); }
.iop-rec-item.priority-low  .iop-rec-icon { background: linear-gradient(135deg, var(--iop-info-fg), #1E40AF); }
.iop-rec-icon svg { width: 14px; height: 14px; }
.iop-rec-mid { flex: 1; min-width: 0; }
.iop-rec-title {
  font-size: 13px; font-weight: 800; color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em; line-height: 1.2;
  display: flex; align-items: center; gap: 6px;
}
.iop-rec-title .delta {
  font-size: 10.5px; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.iop-rec-item.priority-high .delta { background: var(--iop-due-bg); color: var(--iop-due-fg); }
.iop-rec-item.priority-med  .delta { background: var(--iop-warn-bg); color: var(--iop-warn-fg); }
.iop-rec-item.priority-low  .delta { background: var(--iop-info-bg); color: var(--iop-info-fg); }
.iop-rec-sub {
  font-size: 11px; color: var(--s500, #78716C);
  font-weight: 600; margin-top: 3px;
  letter-spacing: -0.005em; line-height: 1.3;
}
.iop-rec-sub b { color: var(--ink, #0A0A0A); font-weight: 800; }
.iop-rec-action {
  padding: 6px 11px; background: #fff;
  border: 1px solid var(--s200, #E7E5E4); border-radius: 7px;
  font-size: 11px; font-weight: 800; color: var(--ink, #0A0A0A);
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0; font-family: inherit;
  transition: all 180ms cubic-bezier(.4,0,.2,1);
}
.iop-rec-action:hover { border-color: var(--ink, #0A0A0A); background: var(--ink, #0A0A0A); color: #fff; }

/* ─── Install Schedule: Unscheduled strip ────────────────────────── */
.iop-unsched {
  background: #fff; border: 1px solid var(--s200, #E7E5E4);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-rest);
}
.iop-unsched-h {
  padding: 11px 18px;
  border-bottom: 1px solid var(--s100, #F5F5F4);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--s50, #FAFAF9);
}
.iop-unsched-h-l { display: flex; align-items: center; gap: 10px; }
.iop-unsched-h-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--s200, #E7E5E4); color: var(--s600, #57534E);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.iop-unsched-h-icon svg { width: 14px; height: 14px; }
.iop-unsched-h-title {
  font-size: 13px; font-weight: 800; color: var(--ink, #0A0A0A);
  letter-spacing: -0.01em;
}
.iop-unsched-h-title .c {
  font-weight: 800; font-size: 11px;
  padding: 1px 7px; border-radius: 5px;
  background: var(--iop-ok-bg); color: var(--iop-ok-fg);
  margin-left: 6px; letter-spacing: 0.02em;
}
.iop-unsched-h-sub {
  font-size: 10.5px; color: var(--s500, #78716C);
  font-weight: 700; margin-top: 2px;
}
.iop-unsched-body {
  padding: 14px; display: flex; align-items: center; justify-content: center;
  min-height: 80px; color: var(--s500, #78716C);
  font-size: 12px; font-weight: 700; gap: 8px;
}
.iop-unsched-body .check-ico { width: 18px; height: 18px; color: var(--iop-ok-fg); }
.iop-unsched-body b { color: var(--iop-ok-fg); font-weight: 800; }

/* ─── Install Schedule: week-view stacked day cell ─────────────────────── */
.iop-week-cell { height: 100%; padding: 5px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; position: relative; }
.iop-week-job {
  border-radius: 6px; padding: 4px 7px; color: #fff; cursor: pointer; flex: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform 150ms cubic-bezier(.4,0,.2,1);
}
.iop-week-job:hover { transform: translateY(-1px); }
.iop-week-job.green  { background: linear-gradient(135deg, var(--iop-ok-fg,#15803D), var(--iop-ok-deep,#166534)); }
.iop-week-job.blue   { background: linear-gradient(135deg, var(--iop-info-fg,#2563EB), #1E40AF); }
.iop-week-job.purple { background: linear-gradient(135deg, var(--iop-purple,#7C3AED), #6D28D9); }
.iop-week-job.amber  { background: linear-gradient(135deg, var(--iop-warn-fg,#D97706), var(--iop-warn-deep,#B45309)); }
.iop-week-job.at-risk { animation: iop-pulse-risk-red 1.8s ease-in-out infinite; background: linear-gradient(135deg,#DC2626,#991B1B); }
.iop-week-job .wj-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; }
.iop-week-job .wj-top b { font-weight: 900; }
.iop-week-job .wj-top span { font-size: 9px; opacity: .9; font-weight: 700; }
.iop-week-job .wj-client { font-size: 9.5px; font-weight: 600; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iop-week-add {
  margin-top: auto; align-self: stretch; border: 1px dashed var(--s300,#D6D3D1);
  background: transparent; color: var(--s400,#A8A29E); border-radius: 6px;
  font-size: 14px; font-weight: 400; line-height: 1; padding: 3px 0; cursor: pointer;
  opacity: 0; transition: opacity 160ms, border-color 160ms, color 160ms, background 160ms;
}
.iop-grid-cell-row:hover .iop-week-add { opacity: 1; }
.iop-week-add:hover { border-color: var(--red,#C41230); color: var(--red,#C41230); background: rgba(196,18,48,.04); }

/* ─── Install Schedule: "Book a slot" modal ────────────────────────────── */
.iop-sm-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(10,10,10,.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 16px 16px; animation: iop-sm-fade 160ms ease-out;
}
@keyframes iop-sm-fade { from { opacity: 0; } to { opacity: 1; } }
.iop-sm-panel {
  width: 100%; max-width: 560px; max-height: 82vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.4); animation: iop-sm-rise 220ms cubic-bezier(.16,1,.3,1);
}
@keyframes iop-sm-rise { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.iop-sm-head { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--s100,#F5F5F4); }
.iop-sm-head-pulse { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--red,#C41230); animation: iop-sm-pulse 1.8s ease-in-out infinite; }
@keyframes iop-sm-pulse { 0% { box-shadow: 0 0 0 0 rgba(196,18,48,.5); } 70% { box-shadow: 0 0 0 8px rgba(196,18,48,0); } 100% { box-shadow: 0 0 0 0 rgba(196,18,48,0); } }
.iop-sm-head-txt { flex: 1; min-width: 0; }
.iop-sm-eyebrow { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--red,#C41230); }
.iop-sm-title { font-size: 19px; font-weight: 900; letter-spacing: -.01em; color: var(--ink,#0A0A0A); line-height: 1.1; margin-top: 2px; }
.iop-sm-ctx { font-size: 12px; font-weight: 700; color: var(--s500,#78716C); margin-top: 3px; }
.iop-sm-x { border: none; background: var(--s100,#F5F5F4); color: var(--s500,#78716C); width: 30px; height: 30px; border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; flex: none; transition: background 150ms, color 150ms; }
.iop-sm-x:hover { background: var(--s200,#E7E5E4); color: var(--ink,#0A0A0A); }
.iop-sm-tabs { display: flex; gap: 6px; padding: 12px 18px 0; }
.iop-sm-tab { border: none; background: transparent; padding: 7px 14px; border-radius: 8px 8px 0 0; font-size: 12.5px; font-weight: 800; color: var(--s500,#78716C); cursor: pointer; border-bottom: 2px solid transparent; }
.iop-sm-tab.on { color: var(--red,#C41230); border-bottom-color: var(--red,#C41230); background: rgba(196,18,48,.05); }
.iop-sm-search { display: flex; align-items: center; gap: 8px; margin: 12px 18px 4px; padding: 9px 12px; background: var(--s50,#FAFAF9); border: 1px solid var(--s200,#E7E5E4); border-radius: 10px; color: var(--s400,#A8A29E); }
.iop-sm-search input { flex: 1; border: none; background: transparent; outline: none; font-size: 13px; font-weight: 600; color: var(--ink,#0A0A0A); }
.iop-sm-rows { flex: 1; overflow-y: auto; padding: 6px 12px 8px; min-height: 120px; }
.iop-sm-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; border-bottom: 1px solid var(--s100,#F5F5F4); transition: background 140ms; }
.iop-sm-row:hover { background: var(--s50,#FAFAF9); }
.iop-sm-row-main { flex: 1; min-width: 0; }
.iop-sm-row-num { font-size: 13px; font-weight: 900; color: var(--ink,#0A0A0A); display: flex; align-items: center; gap: 6px; }
.iop-sm-row-client { font-size: 12px; font-weight: 700; color: var(--s600,#57534E); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iop-sm-row-meta { font-size: 10.5px; font-weight: 600; color: var(--s400,#A8A29E); margin-top: 1px; }
.iop-sm-pill { font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; letter-spacing: .03em; }
.iop-sm-pill.svc { background: rgba(124,58,237,.12); color: var(--iop-purple,#7C3AED); }
.iop-sm-book { flex: none; display: inline-flex; align-items: center; gap: 5px; border: none; background: var(--red,#C41230); color: #fff; cursor: pointer; padding: 7px 13px; border-radius: 8px; font-size: 12px; font-weight: 800; box-shadow: 0 2px 6px -1px rgba(196,18,48,.4); transition: transform 140ms, box-shadow 140ms; }
.iop-sm-book:hover { transform: translateY(-1px); box-shadow: 0 5px 12px -2px rgba(196,18,48,.5); }
.iop-sm-empty { padding: 36px 16px; text-align: center; color: var(--s400,#A8A29E); font-size: 12.5px; font-weight: 600; }
.iop-sm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--s100,#F5F5F4); background: var(--s50,#FAFAF9); }
.iop-sm-foot-hint { font-size: 11px; font-weight: 600; color: var(--s500,#78716C); }
.iop-sm-cancel { border: 1px solid var(--s200,#E7E5E4); background: #fff; color: var(--s600,#57534E); padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; }
.iop-sm-cancel:hover { background: var(--s100,#F5F5F4); }

/* ─── Book-a-slot modal: browse rows + two-step config ─────────────────── */
.iop-sm-row { cursor: pointer; }
.iop-sm-row-chev { color: var(--s300,#D6D3D1); flex: none; }
.iop-sm-row:hover .iop-sm-row-chev { color: var(--red,#C41230); }
.iop-sm-pill.booked { background: rgba(37,99,235,.12); color: var(--iop-info-fg,#2563EB); }
.iop-sm-cfg { flex: 1; overflow-y: auto; padding: 8px 18px 4px; }
.iop-sm-back { display: inline-flex; align-items: center; gap: 5px; border: none; background: transparent; color: var(--s500,#78716C); font-size: 12px; font-weight: 800; cursor: pointer; padding: 4px 0 10px; }
.iop-sm-back:hover { color: var(--red,#C41230); }
.iop-sm-summary { background: var(--s50,#FAFAF9); border: 1px solid var(--s200,#E7E5E4); border-radius: 12px; padding: 10px 12px; }
.iop-sm-sum-row { display: flex; gap: 10px; padding: 4px 0; font-size: 12px; }
.iop-sm-sum-row span { width: 92px; flex: none; color: var(--s500,#78716C); font-weight: 700; }
.iop-sm-sum-row b { color: var(--ink,#0A0A0A); font-weight: 700; }
.iop-sm-ai { margin-top: 10px; }
.iop-sm-ai-btn { width: 100%; border: 1px dashed var(--red,#C41230); background: rgba(196,18,48,.04); color: var(--red,#C41230); border-radius: 10px; padding: 9px; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.iop-sm-ai-btn:hover { background: rgba(196,18,48,.08); }
.iop-sm-ai-loading { font-size: 12.5px; font-weight: 700; color: var(--red,#C41230); padding: 10px; }
.iop-sm-ai-txt { font-size: 12px; line-height: 1.5; color: var(--s700,#44403C); background: #fff; border: 1px solid var(--s200,#E7E5E4); border-radius: 10px; padding: 12px; max-height: 200px; overflow-y: auto; }
.iop-sm-field { margin-top: 14px; }
.iop-sm-flabel { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--s400,#A8A29E); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.iop-sm-count { font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--red,#C41230); }
.iop-sm-crew-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 6px; }
.iop-sm-crew { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--s200,#E7E5E4); border-radius: 9px; cursor: pointer; transition: border-color 140ms, background 140ms; }
.iop-sm-crew:hover { border-color: var(--s300,#D6D3D1); }
.iop-sm-crew.on { border-color: var(--red,#C41230); background: rgba(196,18,48,.04); }
.iop-sm-crew input { accent-color: var(--red,#C41230); width: 15px; height: 15px; flex: none; cursor: pointer; }
.iop-sm-crew-av { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 9.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.iop-sm-crew-name { font-size: 12px; font-weight: 700; color: var(--ink,#0A0A0A); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iop-sm-crew-name span { color: var(--s400,#A8A29E); font-weight: 600; }
.iop-sm-time-field { margin-top: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.iop-sm-time-field > div { flex: 1; min-width: 150px; }
.iop-sm-chips { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.iop-sm-chip { border: 1px solid var(--s200,#E7E5E4); background: #fff; border-radius: 7px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; color: var(--s600,#57534E); cursor: pointer; }
.iop-sm-chip.on, .iop-sm-chip:hover { border-color: var(--red,#C41230); color: var(--red,#C41230); background: rgba(196,18,48,.04); }
.iop-sm-cfg input[type="time"], .iop-sm-cfg input[type="number"] { width: 100%; padding: 8px 10px; border: 1px solid var(--s200,#E7E5E4); border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--ink,#0A0A0A); outline: none; }
.iop-sm-cfg input[type="time"]:focus, .iop-sm-cfg input[type="number"]:focus { border-color: var(--red,#C41230); }
.iop-sm-rec { font-size: 10.5px; font-weight: 700; color: var(--s400,#A8A29E); margin-top: 5px; }
.iop-sm-confirm { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--red,#C41230); color: #fff; cursor: pointer; padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 800; box-shadow: 0 3px 10px -2px rgba(196,18,48,.45); transition: transform 140ms, box-shadow 140ms; }
.iop-sm-confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -2px rgba(196,18,48,.55); }

/* ─── Auto Schedule review modal ───────────────────────────────────────── */
.iop-auto-panel { max-width: 680px; }
.iop-auto-targets { padding: 12px 18px 4px; }
.iop-auto-tlabel { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--s400,#A8A29E); margin-bottom: 8px; }
.iop-auto-tlabel span { font-weight: 600; text-transform: none; letter-spacing: 0; }
.iop-auto-tgrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 10px; }
.iop-auto-tcard { background: var(--s50,#FAFAF9); border: 1px solid var(--s200,#E7E5E4); border-radius: 10px; padding: 9px 11px; }
.iop-auto-tbranch { font-size: 12px; font-weight: 800; color: var(--ink,#0A0A0A); }
.iop-auto-tbar { height: 7px; border-radius: 4px; background: var(--s200,#E7E5E4); overflow: hidden; display: flex; margin: 6px 0; }
.iop-auto-tbar .seg { height: 100%; }
.iop-auto-tbar .seg.cur { background: var(--s400,#A8A29E); }
.iop-auto-tbar .seg.prop { background: var(--red,#C41230); }
.iop-auto-tnums { font-size: 10.5px; font-weight: 700; color: var(--s500,#78716C); }
.iop-auto-tnums b { color: var(--ink,#0A0A0A); }
.iop-auto-tadd { color: var(--red,#C41230); font-weight: 800; }
.iop-auto-rows { padding: 6px 12px 8px; }
.iop-auto-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 8px; border-bottom: 1px solid var(--s100,#F5F5F4); transition: opacity 140ms; }
.iop-auto-row.off { opacity: .45; }
.iop-auto-check { flex: none; padding-top: 2px; }
.iop-auto-check input { width: 16px; height: 16px; accent-color: var(--red,#C41230); cursor: pointer; }
.iop-auto-main { flex: 1; min-width: 0; }
.iop-auto-toprow { font-size: 13px; color: var(--ink,#0A0A0A); }
.iop-auto-toprow b { font-weight: 900; }
.iop-auto-client { font-weight: 700; }
.iop-auto-sub { color: var(--s400,#A8A29E); font-weight: 600; }
.iop-auto-when { font-size: 11.5px; font-weight: 700; color: var(--s600,#57534E); margin-top: 3px; }
.iop-auto-why { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.iop-auto-chip { font-size: 10px; font-weight: 700; color: var(--s600,#57534E); background: var(--s100,#F5F5F4); border-radius: 999px; padding: 2px 8px; }
.iop-auto-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.iop-auto-val { font-size: 13px; font-weight: 900; color: var(--ink,#0A0A0A); }
.iop-auto-call { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--s200,#E7E5E4); background: #fff; color: var(--ink,#0A0A0A); border-radius: 7px; padding: 5px 10px; font-size: 11px; font-weight: 800; cursor: pointer; }
.iop-auto-call:hover { border-color: var(--red,#C41230); color: var(--red,#C41230); background: rgba(196,18,48,.04); }

/* booking modal: installer vehicle chip + delivery line */
.iop-sm-crew-van { color: var(--iop-ok-fg,#15803D); font-weight: 700; }
.iop-sm-delivery { margin-top: 12px; font-size: 11.5px; font-weight: 700; color: var(--s600,#57534E); background: var(--s50,#FAFAF9); border: 1px solid var(--s200,#E7E5E4); border-radius: 9px; padding: 8px 10px; }
.iop-sm-delivery-warn { color: #b91c1c; }

/* ─── Coloured time-breakdown bar on day cards + legend + roll-over ─────── */
.iop-job-card.seg { background: none !important; padding: 0; }
.iop-job-card .jc-bg { position: absolute; inset: 0; display: flex; border-radius: 7px; overflow: hidden; }
.iop-job-card .jc-bg span { height: 100%; transition: filter .15s; }
.iop-job-card .jc-bg span:hover { filter: brightness(1.12); }
.iop-job-card .jc-fg { position: relative; z-index: 1; height: 100%; padding: 6px 9px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.seg-deliver { background: #eab308; }   /* yellow — pickup / delivery */
.seg-install { background: #16a34a; }   /* green — install */
.seg-tip     { background: #dc2626; }   /* red — tip run */
.iop-job-card.overflows { outline: 1px dashed rgba(255,255,255,.75); outline-offset: -2px; }
/* Continuation block (2nd+ working day of a multi-day job) — dashed left edge. */
.iop-job-card.continues { border-left: 3px dashed rgba(255,255,255,.85); }
.jc-rollover { margin-left: auto; font-weight: 800; color: #fff; background: rgba(0,0,0,.28); border-radius: 4px; padding: 0 5px; font-size: 9px; }
.jc-cont { margin-left: 5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.28); border-radius: 4px; padding: 0 5px; font-size: 8.5px; vertical-align: middle; }
/* Week-view continuation block + multi-day badge. */
.iop-week-job.continues { border-left: 3px dashed rgba(255,255,255,.85); opacity: .92; }
.iop-week-job .wj-day { font-weight: 900; background: rgba(0,0,0,.26); border-radius: 3px; padding: 0 4px; font-size: 8.5px; }
.iop-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--s100,#F5F5F4); font-size: 11px; font-weight: 700; color: var(--s600,#57534E); }
.iop-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.iop-legend-sw { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }
.iop-legend-note { margin-left: auto; font-weight: 600; color: var(--s400,#A8A29E); }
.iop-sm-fit { margin-top: 12px; font-size: 12px; font-weight: 700; border-radius: 9px; padding: 9px 11px; }
.iop-sm-fit.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.iop-sm-fit.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* AI crew recommendation in the booking modal */
.iop-sm-aicrew { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.iop-sm-aicrew-ok { font-size: 11.5px; font-weight: 700; color: var(--iop-purple,#7C3AED); flex: 1; min-width: 0; }
.iop-sm-aicrew-load { font-size: 11.5px; font-weight: 700; color: var(--red,#C41230); flex: 1; }
.iop-sm-aicrew-warn { font-size: 11.5px; font-weight: 700; color: #b45309; flex: 1; }
.iop-sm-aicrew-hint { font-size: 11px; font-weight: 600; color: var(--s400,#A8A29E); flex: 1; }
.iop-sm-aicrew-btn { flex: none; border: 1px solid var(--iop-purple,#7C3AED); background: rgba(124,58,237,.06); color: var(--iop-purple,#7C3AED); border-radius: 7px; padding: 5px 10px; font-size: 11px; font-weight: 800; cursor: pointer; }
.iop-sm-aicrew-btn:hover { background: rgba(124,58,237,.12); }
.iop-sm-aiauto { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--iop-purple,#7C3AED); background: rgba(124,58,237,.06); color: var(--iop-purple,#7C3AED); padding: 9px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.iop-sm-aiauto:hover { background: rgba(124,58,237,.12); }

/* ── Installer Teams + per-installer filter (2026-06-11) ─────────────────────
   Team header rows in the schedule grid. .iop-grid-team-row (installer column)
   and .iop-grid-team-spacer (every day column) MUST keep equal heights so the
   two columns stay row-aligned. */
.iop-grid-team-row {
  height: 30px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 10px; background: #f3f1ee; border-bottom: 1px solid #e7e5e4;
}
.iop-grid-team-name { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #57534e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iop-grid-team-meta { font-size: 10px; color: #a8a29e; white-space: nowrap; }
.iop-grid-team-spacer { height: 30px; box-sizing: border-box; background: #f3f1ee; border-bottom: 1px solid #e7e5e4; }

.iop-sched-filter {
  font-family: inherit; font-size: 12px; font-weight: 600; color: #374151;
  padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
  max-width: 200px; cursor: pointer;
}
.iop-sched-filter-clear {
  font-family: inherit; font-size: 11px; font-weight: 700; color: #b91c1c;
  padding: 6px 10px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; cursor: pointer;
}
.iop-crew-chip.filter-on { outline: 2px solid #c41230; outline-offset: 1px; }
