.delivery-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#print-list {
    background: var(--green);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    min-height: 42px;
    padding: 0 16px;
}

#print-list:hover {
    opacity: .92;
}

#print-list:disabled,
#copy-row:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.delivery-tab {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
  min-height: 46px;
  padding: 0 12px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.delivery-tab:hover {
  border-color: #9ab3a8;
  box-shadow: 0 8px 20px rgb(20 38 31 / 7%);
  transform: translateY(-1px);
}

.delivery-tab.is-active {
  background: linear-gradient(180deg, var(--green), var(--green-strong));
  border-color: var(--green);
  box-shadow: 0 10px 24px rgb(10 100 87 / 16%);
  color: #fff;
}

.delivery-date-form {
  background: linear-gradient(180deg, #fff, var(--paper-soft));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.delivery-date-form label {
  display: grid;
  gap: 6px;
}

.delivery-date-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.delivery-date-form input {
  background: #fff;
  border: 1px solid #bac8c0;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgb(20 38 31 / 5%);
  min-height: 44px;
  padding: 0 10px;
}

.delivery-date-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgb(10 100 87 / 10%);
  outline: 0;
}

.delivery-date-form button {
  border: 0;
  cursor: pointer;
  width: 100%;
}

.delivery-date-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.delivery-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-summary .party-panel {
  background: linear-gradient(180deg, #fff, #f9fbfa);
}

.delivery-summary .party-panel:nth-child(2) h3::before {
  background: #5c86b8;
}

.delivery-summary .party-panel:nth-child(3) h3::before {
  background: var(--green);
}

.delivery-table {
  margin-top: 18px;
}

.delivery-table table {
  min-width: 760px;
}

.copy-status {
  color: var(--muted);
  margin: 0;
  min-height: 1.9em;
}

#delivery-print-list {
  display: none;
}

@media (max-width: 1020px) {
  .delivery-summary,
  .delivery-tabs {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 10mm;
    size: landscape;
  }

  html,
  body {
    background: #fff;
    overflow: visible;
  }

  .workspace {
    margin: 0;
    width: 100%;
  }

  .topbar,
  .status-strip,
  .dashboard {
    display: none !important;
  }

  #delivery-print-list {
    display: block;
  }

  .print-list-head {
    align-items: end;
    border-bottom: 1px solid #999;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .print-list-head h1,
  .print-list-head p {
    margin: 0;
  }

  .print-list-head p {
    margin-top: 4px;
  }

  .print-list-section {
    break-before: page;
  }

  .print-list-section:first-of-type {
    break-before: auto;
  }

  .print-list-section h2 {
    font-size: 14px;
    margin: 10px 0 6px;
  }

  #delivery-print-list table {
    border-collapse: collapse;
    font-size: 7px;
    min-width: 0;
    table-layout: auto;
  }

  #delivery-print-list th,
  #delivery-print-list td {
    border: 1px solid #aaa;
    overflow-wrap: anywhere;
    padding: 4px 3px;
  }

  #delivery-print-list thead th {
    background: #eee;
    position: static;
  }

  #delivery-print-list tr {
    break-inside: avoid;
  }
}
