/* ======================================================================
   SCHEDULING OPERATIONS CONTROL BOARD
   Phase 1 presentation layer only.
   Preserves existing IDs, controls, backlog list, timeline, and scripts.
   ====================================================================== */

.schedule-container{
  max-width: 100%;
  padding: 24px clamp(16px, 3vw, 32px) 48px;
}

.scheduling-back-link{
  color: #334155;
  font-weight: 750;
  text-decoration: none;
}

.scheduling-back-link:hover{
  color: #1d4ed8;
}

.schedule-control-board{
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92)),
    linear-gradient(135deg, rgba(37,99,235,0.08), rgba(14,165,233,0.05));
  box-shadow: 0 14px 34px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.92);
}

.schedule-board-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.schedule-board-eyebrow{
  margin: 0 0 5px;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-board-header h2{
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.15;
  font-weight: 850;
}

.schedule-board-subtitle{
  max-width: 680px;
  margin: 8px 0 0;
  color: #475569;
  font-size: 0.95rem;
}

.schedule-board-status{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-board-status span{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.16);
  background: rgba(37,99,235,0.08);
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-control-board .schedule-controls{
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.schedule-control-board .left-controls,
.schedule-control-board .right-controls{
  flex-wrap: wrap;
}

.schedule-control-board select,
.schedule-control-board input[type="date"]{
  min-height: 38px;
  border-radius: 10px;
  border-color: rgba(15,23,42,0.12);
}

.schedule-control-board button{
  min-height: 38px;
  border-radius: 10px;
}

.schedule-control-board label{
  padding: 6px 9px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 999px;
  background: rgba(248,250,252,0.92);
  color: #334155;
  font-weight: 750;
}

.schedule-search-row{
  margin-top: 12px;
}

.schedule-search-row #jobSearch{
  min-height: 44px;
  margin: 0 !important;
  border-color: rgba(15,23,42,0.12) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}

.schedule-workspace-grid{
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin: 0;
}

.schedule-workspace-panel{
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(15,23,42,0.09);
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 10px 26px rgba(15,23,42,0.07);
}

.schedule-workspace-panel h3{
  margin-top: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 850;
}

#dispatch-backlog-panel.schedule-workspace-panel{
  position: sticky;
  top: 16px;
}

.schedule-board-section.schedule-workspace-panel{
  overflow: visible;
}

.schedule-board-section .stat-sub{
  margin-top: -4px;
  margin-bottom: 14px;
}

#schedule-list.timeline-container{
  min-width: 0;
}

@media (max-width: 960px){
  .schedule-board-header{
    flex-direction: column;
  }

  .schedule-board-status{
    justify-content: flex-start;
  }

  .schedule-workspace-grid{
    grid-template-columns: 1fr;
  }

  #dispatch-backlog-panel.schedule-workspace-panel{
    position: static;
  }
}

@media (max-width: 640px){
  .schedule-container{
    padding-left: 14px;
    padding-right: 14px;
  }

  .schedule-control-board,
  .schedule-workspace-panel{
    border-radius: 14px;
  }

  .schedule-control-board .schedule-controls{
    align-items: stretch;
  }

  .schedule-control-board .left-controls,
  .schedule-control-board .right-controls{
    width: 100%;
  }

  .schedule-control-board select,
  .schedule-control-board input[type="date"]{
    flex: 1 1 160px;
  }
}


/* 2026-09 scheduling workspace cleanup */
.schedule-workspace-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.dispatch-backlog-panel{
  position:static;
  width:auto;
  max-height:none;
  padding:18px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.07);
}

.backlog-panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

.backlog-panel-heading h3{margin:0;color:#0f172a;font-size:1.05rem}
.backlog-panel-heading p{margin:4px 0 0;color:#64748b;font-size:.875rem}
.backlog-count{
  padding:6px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:.8rem;
  font-weight:800;
  white-space:nowrap;
}

#dispatch-backlog-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
  max-height:260px;
  overflow:auto;
}

.backlog-job{margin:0;min-height:88px}
.schedule-board-section{min-width:0;padding:18px}
.tech-lane{margin-bottom:18px}
.tech-lane-header{position:sticky;top:0;z-index:4}
.tech-lane-jobs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:12px;
  padding:12px;
}
.upcoming-job.job-card{
  min-width:0;
  min-height:210px;
  padding:16px;
}
.job-customer{font-size:1.05rem;line-height:1.3}
.job-card-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.job-crew{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px;color:#64748b;font-size:.78rem}
.crew-chip{padding:4px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-weight:750}
.schedule-control-board #jobSearch{font-size:1rem!important;padding:12px 14px!important}

@media (min-width:1100px){
  .tech-lane-jobs{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:1500px){
  .tech-lane-jobs{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:900px){
  .schedule-container{padding:16px 12px 32px}
  .schedule-board-header,.schedule-controls{align-items:stretch}
  .schedule-control-board .left-controls,.schedule-control-board .right-controls{width:100%}
  .tech-lane-jobs{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .tech-lane-jobs,#dispatch-backlog-list{grid-template-columns:1fr}
  .upcoming-job.job-card{min-height:auto}
  .schedule-board-status{display:none}
}


/* Compact needs-scheduling tray */
.backlog-heading-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.backlog-toggle{min-height:38px;padding:8px 13px;border:1px solid #2563eb;border-radius:10px;background:#2563eb;color:#fff;font-weight:800;cursor:pointer}
.backlog-toggle:hover{background:#1d4ed8}
.dispatch-backlog-panel.is-collapsed{padding:14px 18px}
.dispatch-backlog-panel.is-collapsed .backlog-panel-heading{margin-bottom:0}
.dispatch-backlog-panel.is-collapsed #dispatch-backlog-list{display:none}
#dispatch-backlog-list{max-height:none;overflow:visible;padding:2px;background:transparent}
.backlog-job{border-left:5px solid #2563eb;border-radius:12px;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.08)}
.backlog-card-topline{align-items:flex-start}
.backlog-work-order{margin-top:3px;color:#64748b;font-size:.75rem;font-weight:700}
.backlog-view-link{display:inline-flex;margin-top:10px;color:#1d4ed8;font-size:.82rem;font-weight:800;text-decoration:none}
.backlog-view-link:hover{text-decoration:underline}
@media (max-width:640px){
  .backlog-panel-heading{align-items:flex-start;flex-direction:column}
  .backlog-heading-actions{width:100%;justify-content:space-between}
}

.job-work-order-link{display:inline-flex;align-items:center;justify-content:center;margin-top:12px;min-height:40px;padding:9px 12px;border:1px solid #2563eb;border-radius:9px;background:#eff6ff;color:#1d4ed8;font-weight:850;text-decoration:none}
.job-work-order-link:hover{background:#dbeafe}

.backlog-card-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;flex-wrap:wrap}
.backlog-card-actions .backlog-view-link{margin-top:0}
.backlog-clear-button{border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;color:#334155;padding:7px 10px;font-size:.78rem;font-weight:800;cursor:pointer}
.backlog-clear-button:hover{border-color:#94a3b8;background:#f1f5f9}
.backlog-clear-button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.backlog-clear-button:disabled{cursor:wait;opacity:.65}
