.logistic-team {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.team-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}
.team-tabs button {
  min-height: 50px;
  flex: 1 1 9.25rem;
  color: var(--muted);
  font-size: .9375rem;
  border-color: transparent;
  background: transparent;
}
.team-tabs button[aria-selected=true] {
  border-color: var(--coral-line);
  color: var(--alert);
  background: var(--coral-wash);
  box-shadow: inset 0 -3px var(--brand);
}
.team-tabs button:hover, .team-segment button:hover {
  color: var(--navy);
  background: var(--canvas);
}
.team-panel {
  min-width: 0;
  padding: clamp(14px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}
.team-panel-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.team-panel-title h2 {
  font-size: 1.35rem;
  letter-spacing: -.025em;
}
.team-panel-title button, .team-dialog button {
  min-height: 44px;
}
.team-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.team-list > button:not(.team-row) {
  justify-self: start;
  margin-top: 8px;
}
.team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 14px;
  text-align: left;
  min-height: 62px;
  padding: 9px 13px;
}
.team-row:hover {
  border-color: var(--strong-border);
  background: var(--canvas);
}
.team-row-main {
  display: grid;
  gap: 3px;
}
.team-row-main strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.35;
}
.team-row-main small {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.4;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.team-row-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 5px;
}
.team-row-arrow {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1;
}
.team-chip {
  width: fit-content;
  flex: 0 0 auto;
  align-self: flex-start;
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  color: var(--navy);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
}
.team-chip:is([data-status=rejected], [data-status=returned], [data-status=urgent], [data-status=high]) {
  border-color: var(--coral-line);
  background: var(--coral-wash);
  color: var(--alert);
}
.team-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}
.team-segment button {
  min-height: 44px;
  padding: 7px 11px;
  font-size: .875rem;
}
.team-segment button[aria-pressed=true] {
  border-color: var(--strong-border);
  background: var(--panel);
  color: var(--navy);
}
.team-empty {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.team-notice {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  background: var(--panel);
  font-size: .88rem;
}
.team-notice.is-error, .team-form-error {
  border-color: var(--coral-line);
  border-left-color: var(--brand);
  background: var(--coral-wash);
  color: var(--alert);
}
.team-dialog {
  width: min(38rem, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--strong-border);
  border-top: 3px solid var(--brand);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 15px 50px var(--petrol-shadow);
}
.team-dialog::backdrop {
  background: var(--backdrop);
}
.team-dialog-title {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.team-dialog-title h2 {
  overflow-wrap: anywhere;
  font-size: 1.11rem;
}
.team-dialog-body, .team-form {
  display: grid;
  gap: 13px;
}
.team-dialog-body {
  padding: 16px;
}
.team-form :is(input, select, textarea) {
  min-height: 42px;
  min-width: 0;
}
.team-form textarea {
  width: 100%;
  padding: .65rem .72rem;
  border: 1px solid var(--paper-border);
  border-radius: 3px;
  outline-offset: 3px;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  line-height: 1.45;
}
.team-form textarea:focus-visible { outline: 3px solid var(--focus); }
.team-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.team-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}
.team-dialog-actions:empty, .team-proof:empty {
  display: none;
}
.team-stock-lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.team-muted, .team-form-error {
  font-size: .82rem;
}
.team-muted {
  color: var(--muted);
}
.team-form-error {
  padding: 8px 11px;
  border-left: 3px solid var(--brand);
}
.team-details {
  display: grid;
  gap: 0;
  margin: 0;
}
.team-details > div {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: .87rem;
}
.team-details dt {
  color: var(--muted);
  line-height: 1.45;
}
.team-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
  white-space: pre-wrap;
}
.team-proof img {
  display: block;
  max-width: 100%;
  max-height: 16rem;
  border-radius: 2px;
  object-fit: contain;
}
.team-message-body {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
@media (max-width: 540px) {
  .team-tabs button {
    flex: 1 1 auto;
    padding: 6px 8px;
    font-size: .875rem;
  }
  .team-panel-title button {
    width: 100%;
  }
  .team-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .team-dialog-actions button {
    flex: 1 1 auto;
  }
  .team-row {
    gap: 8px;
    padding: 8px 10px;
  }
  .team-row-arrow {
    display: none;
  }
  .team-row-status {
    max-width: 7rem;
  }
}

.team-chip[data-status="approved"] {
  border-color: var(--success-line);
  background: var(--success-wash);
  color: var(--success);
}
.team-chip:is([data-status="pending"], [data-status="submitted"]) {
  border-color: var(--warning-line);
  background: var(--warning-wash);
  color: var(--warning);
}
@media (max-width: 760px) {
  .team-tabs { gap: 3px; padding: 4px; }
  .team-tabs button { min-height: 48px; }
  .team-panel { padding: 16px; }
  .team-panel-title h2 { font-size: 1.25rem; }
  .team-form :is(input, select, textarea) { font-size: 1rem; }
}
