/* Broadband Orders and Number Ports share one provisioning workspace. */
.number-ports-page {
  --provisioning-pink: var(--sh-red, #c83f5c);
  --provisioning-yellow: #d89522;
  --provisioning-mint: var(--sh-forest, #007d69);
  --provisioning-blue: #2f7ca3;
  --provisioning-navy: var(--sh-ink, #152a42);
  --provisioning-border: var(--sh-line, rgba(115, 143, 166, .18));
  --provisioning-muted: var(--sh-muted, #52677f);
  --provisioning-shadow: none;
  box-sizing: border-box;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  color: var(--sh-ink);
  background: transparent;
  font: 400 14px/1.45 var(--sh-font);
}

.number-ports-page *,
.number-ports-page *::before,
.number-ports-page *::after { box-sizing: border-box; }

.number-ports-page :is(button, input, select, textarea) { font: inherit; }

.number-ports-page .module-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.number-ports-page .module-title-row .eyebrow { display: none; }

.number-ports-page .module-title-row h1 {
  margin: 0;
  color: var(--sh-ink);
  font: 600 28px/1.2 var(--sh-font);
  letter-spacing: -.035em;
}

.number-ports-page .module-title-row p {
  margin: 5px 0 0;
  color: var(--sh-muted);
  font-size: 13px;
  line-height: 1.5;
}

.number-ports-page .button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  color: #fff;
  background: var(--sh-forest);
  border: 1px solid var(--sh-forest);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 500;
  transition: background .16s ease, border-color .16s ease;
}

.number-ports-page .button-primary:hover { background: #104a35; border-color: #104a35; transform: none; box-shadow: none; }

.number-ports-page .planner-toolbar {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(320px, auto);
  align-items: center;
  gap: 14px;
  min-height: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 8px 24px rgba(54, 87, 108, .04);
  backdrop-filter: blur(16px) saturate(120%);
}

.number-ports-page .planner-toolbar > strong {
  justify-self: center;
  margin: 0;
  color: var(--sh-ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.number-ports-page .week-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  padding: 3px;
  border: 1px solid var(--sh-line);
  border-radius: 10px;
  background: rgba(237, 248, 250, .72);
}

.number-ports-page .week-controls button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  color: var(--sh-muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
}

.number-ports-page .week-controls button:hover { color: var(--sh-forest); background: var(--sh-hover); }
.number-ports-page .week-controls button:nth-child(2) { color: var(--sh-forest); background: var(--sh-surface); box-shadow: 0 1px 2px rgba(32, 59, 32, .06); }

.number-ports-page .planner-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.number-ports-page .dashboard-filter-chip {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--sh-forest);
  background: var(--sh-selected);
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.number-ports-page .compact-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(380px, 28vw);
  height: 40px;
  padding: 0 10px;
  color: var(--sh-muted);
  background: rgba(255, 255, 255, .76);
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  box-shadow: none;
}

.number-ports-page .compact-search input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  color: var(--sh-ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.number-ports-page .planner-tools input[type="date"] {
  min-width: 142px;
  height: 40px;
  padding: 8px 10px;
  color: var(--sh-ink);
  background: rgba(255, 255, 255, .76);
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
}

.number-ports-page :is(button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--sh-focus);
  outline-offset: 3px;
}

.number-ports-page .provisioning-week-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 2px 1px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.number-ports-page .provisioning-week-summary > strong {
  margin: 0 4px 0 0;
  color: var(--sh-ink);
  font-size: 13px;
  font-weight: 600;
}

.number-ports-page .provisioning-summary-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 4px 9px;
  color: var(--sh-muted);
  background: rgba(255, 255, 255, .54);
  border: 1px solid var(--sh-line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}

.number-ports-page .provisioning-summary-pill--total { color: var(--sh-ink); background: rgba(255, 255, 255, .66); }
.number-ports-page .provisioning-summary-pill--scheduled { color: #286886; background: #eaf5fa; border-color: #d2e8f1; }
.number-ports-page :is(.provisioning-summary-pill--completed, .provisioning-summary-pill--attention.is-clear) { color: var(--sh-forest); background: var(--sh-selected); border-color: #c5dfd8; }
.number-ports-page .provisioning-summary-pill--attention.is-warning { color: #8a5a08; background: #fff5e5; border-color: #efdcb5; }

.number-ports-page .ports-diary {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 0;
  min-width: 0;
  min-height: 330px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(255, 255, 255, .46);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(54, 87, 108, .04);
  backdrop-filter: blur(16px) saturate(118%);
  scrollbar-width: thin;
}

.number-ports-page .diary-day {
  min-width: 210px;
  background: rgba(255, 255, 255, .22);
  border: 0;
  border-right: 1px solid var(--sh-line);
}

.number-ports-page .diary-day:last-child { border-right: 0; }
.number-ports-page .diary-day--today { background: rgba(215, 238, 232, .24); box-shadow: inset 0 2px 0 var(--sh-forest); }

.number-ports-page .diary-day > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--sh-ink);
  background: rgba(248, 252, 255, .48);
  border-bottom: 1px solid var(--sh-line);
}

.number-ports-page .diary-day > header > div { display: contents; }
.number-ports-page .diary-day > header span { grid-column: 1; overflow: hidden; color: var(--sh-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.number-ports-page .diary-day > header strong { grid-column: 2; color: var(--sh-ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.number-ports-page .diary-day > header small { grid-column: 3; color: var(--sh-muted); font-size: 12px; font-weight: 400; }
.number-ports-page .diary-day--today > header { background: rgba(215, 238, 232, .46); }
.number-ports-page .diary-day--today > header strong { display: inline-grid; place-items: center; min-width: 25px; height: 24px; padding: 0 6px; color: var(--sh-forest); background: var(--sh-selected); border: 1px solid #c5dfd8; border-radius: 6px; font-size: 12px; }
.number-ports-page .diary-day--today > header::after { grid-column: 4; justify-self: end; margin-left: 6px; padding: 3px 6px; color: var(--sh-forest); background: var(--sh-selected); border: 0; border-radius: 5px; content: "Today"; font-size: 9px; font-weight: 600; letter-spacing: 0; text-transform: none; }

.number-ports-page .diary-day-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 280px;
  padding: 10px;
}

.number-ports-page .port-card {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 92px;
  padding: 11px 12px;
  color: var(--sh-ink);
  text-align: left;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--sh-line);
  border-left: 3px solid #7c9db0;
  border-radius: 10px;
  box-shadow: none;
  transform: none;
  transition: background .16s ease, border-color .16s ease;
}

.number-ports-page .port-card:hover,
.number-ports-page .port-card:focus-visible { background: rgba(255, 255, 255, .92); border-color: #bed1c8; border-left-color: var(--sh-forest); box-shadow: none; transform: none; }
.number-ports-page :is(.port-card--completed, .port-card--live) { border-left-color: var(--sh-forest); background: linear-gradient(90deg, rgba(215, 238, 232, .56), rgba(255, 255, 255, .72) 34%); }
.number-ports-page :is(.port-card--delayed, .port-card--awaiting_provider) { border-left-color: #d89522; background: linear-gradient(90deg, rgba(255, 245, 229, .82), rgba(255, 255, 255, .72) 36%); }
.number-ports-page :is(.port-card--failed, .port-card--cancelled) { border-left-color: var(--sh-red); background: linear-gradient(90deg, rgba(255, 240, 239, .82), rgba(255, 255, 255, .72) 36%); }

.number-ports-page .port-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.number-ports-page .port-card-head strong { display: -webkit-box; overflow: hidden; color: var(--sh-ink); font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.number-ports-page .port-card .status-pill { align-self: start; justify-self: end; min-width: 0; margin: 0; padding: 3px 7px; border: 0; border-radius: 5px; font-size: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.number-ports-page :is(.status-pill--scheduled, .status-pill--in_progress, .status-pill--ordered) { color: #286886; background: #eaf5fa; }
.number-ports-page :is(.status-pill--completed, .status-pill--live) { color: var(--sh-forest); background: var(--sh-selected); }
.number-ports-page :is(.status-pill--delayed, .status-pill--awaiting_provider) { color: #8a5a08; background: #fff5e5; }
.number-ports-page :is(.status-pill--failed, .status-pill--cancelled) { color: var(--sh-red); background: #fff0ef; }

.number-ports-page .port-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  color: #286886;
  background: #eaf5fa;
  border: 0;
  border-radius: 6px;
  font: 600 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.number-ports-page .port-number svg,
.number-ports-page .port-card > small svg { color: #2f7ca3; }
.number-ports-page .port-card > small { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--sh-muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
.number-ports-page .broadband-card-service { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; }
.number-ports-page .broadband-type-chip { padding: 3px 7px; color: var(--sh-forest); background: var(--sh-selected); border: 0; border-radius: 6px; font-size: 10px; font-weight: 600; }
.number-ports-page .broadband-card-service small { color: var(--sh-muted); font-size: 11px; font-weight: 400; }
.number-ports-page .engineer-badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; margin: 0; padding: 4px 7px; border: 0; border-radius: 6px; font-size: 10px; font-weight: 600; }
.number-ports-page .engineer-badge--assigned { color: #286886; background: #eaf5fa; }
.number-ports-page .engineer-badge--needed { color: #8a5a08; background: #fff5e5; }
.number-ports-page .engineer-badge--not-needed { color: var(--sh-forest); background: var(--sh-selected); }

.number-ports-page .diary-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 9px;
  color: #748798;
  background: rgba(255, 255, 255, .28);
  border: 1px dashed rgba(115, 143, 166, .24);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 400;
}

.number-ports-page .diary-empty svg { width: 15px; height: 15px; color: #8aa1af; }
.number-ports-page .day-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 34px; padding: 7px; color: var(--sh-muted); background: rgba(255, 255, 255, .3); border: 1px dashed rgba(115, 143, 166, .28); border-radius: 9px; box-shadow: none; font-size: 12px; font-weight: 500; }
.number-ports-page .day-add:hover { color: var(--sh-forest); background: var(--sh-hover); border-color: #a9c9bf; box-shadow: none; }
.number-ports-page .diary-day.is-drop-target .diary-day-body { background: rgba(215, 238, 232, .32); box-shadow: inset 0 0 0 2px var(--sh-forest); }

@media (max-width: 1180px) {
  .number-ports-page .planner-toolbar { grid-template-columns: auto 1fr; }
  .number-ports-page .planner-toolbar > strong { justify-self: end; }
  .number-ports-page .planner-tools { grid-column: 1 / -1; }
  .number-ports-page .compact-search { flex: 1 1 240px; width: auto; }
}

@media (max-width: 700px) {
  .number-ports-page { gap: 12px; }
  .number-ports-page .module-title-row { align-items: flex-start; flex-direction: column; }
  .number-ports-page .module-title-row h1 { font-size: 25px; }
  .number-ports-page .planner-toolbar { grid-template-columns: 1fr; padding: 10px; }
  .number-ports-page .planner-toolbar > strong { justify-self: start; }
  .number-ports-page .planner-tools { grid-column: auto; align-items: stretch; flex-direction: column; }
  .number-ports-page .compact-search,
  .number-ports-page .planner-tools input[type="date"] { width: 100%; }
}
