.deliveries-page .header-controls {
  align-items: center;
}

.deliveries-groups .ip-group__models {
  margin-top: 16px;
}

.deliveries-groups [data-role="delivery-list"] > .delivery-card {
  display: none !important;
}

.delivery-wb-settings {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.delivery-wb-settings:hover {
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.deliveries-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.deliveries-summary {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(34, 197, 94, 0.08)),
    #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.deliveries-summary__empty {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.deliveries-summary__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.deliveries-summary__title {
  display: grid;
  gap: 4px;
}

.deliveries-summary__title h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.deliveries-summary__title p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.deliveries-summary__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 8px;
  min-width: min(100%, 370px);
}

.deliveries-summary__stat {
  padding: 9px 10px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.deliveries-summary__stat strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.deliveries-summary__stat span {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.deliveries-summary__grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 12px;
  align-items: start;
}

.deliveries-summary-panel {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.deliveries-summary-panel__title {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.deliveries-summary-list {
  display: grid;
  gap: 9px;
}

.deliveries-summary-item {
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.deliveries-summary-item:hover {
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.deliveries-summary-item__main {
  min-width: 0;
}

.deliveries-summary-item__main strong,
.deliveries-summary-item__main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deliveries-summary-item__main strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
}

.deliveries-summary-item__main span {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.deliveries-summary-item__date {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.delivery-market-logo {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
}

.delivery-market-logo img {
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  display: block;
}

.delivery-market-badge--wb { background: #8b5cf6; }
.delivery-market-badge--ozon { background: #0b63f6; }
.delivery-market-badge--yandex { background: #ef4444; }
.delivery-market-badge--mvideo { background: #dc2626; }
.delivery-market-badge--magnitmarket { background: #f59e0b; }
.delivery-market-badge--sportmaster { background: #16a34a; }
.delivery-market-badge--default { background: #64748b; }

.deliveries-month-chart {
  display: grid;
  gap: 9px;
}

.deliveries-month-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}

.deliveries-month-row__label {
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.deliveries-month-row__track {
  height: 24px;
  border-radius: 8px;
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.85);
}

.deliveries-month-row__segment {
  min-width: 8px;
  height: 100%;
  display: block;
}

.deliveries-month-row__count {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.deliveries-summary-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deliveries-summary-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.deliveries-summary-legend .delivery-market-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.deliveries-summary-legend .delivery-market-logo img {
  max-width: 18px;
  max-height: 18px;
}

.deliveries-summary-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

@media (max-width: 1100px) {
  .deliveries-summary__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .deliveries-summary {
    padding: 12px;
  }

  .deliveries-summary__stats {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .deliveries-summary-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .deliveries-summary-item__date {
    grid-column: 2;
    justify-self: start;
  }

  .deliveries-month-row {
    grid-template-columns: 78px minmax(0, 1fr) 28px;
  }
}

.deliveries-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.delivery-calendar-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.delivery-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.delivery-calendar-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.delivery-calendar-legend__dot--planned {
  background: #16a34a;
}

.delivery-calendar-legend__dot--formed {
  background: #2563eb;
}

.delivery-calendar-legend__dot--shipped {
  background: #dc2626;
}

.deliveries-add-delivery {
  background: #0ea5e9;
  color: #ffffff;
}

.deliveries-add-delivery:hover {
  background: #0284c7;
}

.deliveries-group-toolbar {
  margin: 14px 0 12px;
  justify-content: space-between;
}

.delivery-calendar {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  overflow-x: auto;
}

.delivery-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.delivery-calendar__nav {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.delivery-calendar__nav:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.delivery-calendar__header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-size: 15px;
}

.delivery-calendar__months {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  min-width: 1010px;
}

.delivery-calendar__month {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: #f8fafc;
}

.delivery-calendar__month h5 {
  margin: 0 0 10px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.delivery-calendar__weekdays,
.delivery-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(32px, 46px));
  justify-content: center;
  gap: 5px;
}

.delivery-calendar__weekdays {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.delivery-calendar__day {
  min-height: 38px;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #f8fafc;
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  line-height: 1;
}

.delivery-calendar__day:disabled {
  cursor: default;
}

.delivery-calendar__day:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.delivery-calendar__day--blank {
  visibility: hidden;
}

.delivery-calendar__day--planned {
  border-color: #22c55e;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}

.delivery-calendar__day--formed {
  border-color: #3b82f6;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

.delivery-calendar__day--shipped {
  border-color: #ef4444;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.delivery-calendar__day--planned.delivery-calendar__day--formed {
  background: linear-gradient(135deg, #dcfce7 0 50%, #dbeafe 50% 100%);
  border-color: #0ea5e9;
}

.delivery-calendar__day--planned.delivery-calendar__day--shipped {
  background: linear-gradient(135deg, #fee2e2 0 50%, #dcfce7 50% 100%);
  border-color: #f59e0b;
}

.delivery-calendar__day--formed.delivery-calendar__day--shipped {
  background: linear-gradient(135deg, #fee2e2 0 50%, #dbeafe 50% 100%);
  border-color: #8b5cf6;
}

.delivery-calendar__day--planned.delivery-calendar__day--formed.delivery-calendar__day--shipped {
  background: linear-gradient(135deg, #fee2e2 0 34%, #dbeafe 34% 67%, #dcfce7 67% 100%);
  border-color: #8b5cf6;
}

.delivery-calendar__markers {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
}

.delivery-calendar__marker {
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.delivery-calendar__marker--planned {
  background: #16a34a;
}

.delivery-calendar__marker--formed {
  background: #2563eb;
}

.delivery-calendar__marker--shipped {
  background: #dc2626;
}

.delivery-card {
  border-radius: 12px;
}

.delivery-card .ip-card__header {
  align-items: flex-start;
}

.delivery-card .ip-card__header h3 {
  margin: 0;
  gap: 8px;
}

.delivery-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-status--saved {
  background: #dcfce7;
  color: #166534;
}

.delivery-status--shipped {
  background: #fee2e2;
  color: #991b1b;
}

.delivery-form-grid {
  display: grid;
  grid-template-columns: 190px 190px minmax(260px, 1fr);
  gap: 12px;
}

.delivery-card--wb .delivery-form-grid {
  grid-template-columns: 190px 190px 190px minmax(260px, 1fr);
}

.delivery-field[hidden] {
  display: none !important;
}

.delivery-field--date .form-control,
.delivery-field--number .form-control,
.delivery-field--wb-type .form-control {
  max-width: 190px;
}

.delivery-field {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.delivery-field .form-control {
  width: 100%;
}

.delivery-field--shipped {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #991b1b;
  cursor: pointer;
  user-select: none;
}

.delivery-field--shipped input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #dc2626;
}

.delivery-field--shipped:has(input:checked) {
  border-color: #ef4444;
  background: #fee2e2;
}

.delivery-products {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: #f8fafc;
}

.delivery-products__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.delivery-products__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.delivery-products__header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-size: 15px;
}

.delivery-products__total {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #075985;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-product-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.2fr) minmax(90px, 0.35fr) 38px;
  gap: 8px;
  align-items: center;
}

.delivery-product-row .form-control {
  min-width: 0;
  width: 100%;
}

.delivery-products__empty {
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.delivery-products__table,
.delivery-picker__table {
  overflow-x: auto;
}

.delivery-products__table table,
.delivery-picker__table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.delivery-products__table th,
.delivery-products__table td,
.delivery-picker__table th,
.delivery-picker__table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
  vertical-align: middle;
}

.delivery-products__table th,
.delivery-picker__table th {
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-products__name {
  min-width: 220px;
}

.delivery-products__select-col {
  width: 72px;
  text-align: center;
}

.delivery-products__reserve-toggle {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.delivery-products__reserve-check {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.delivery-products__reserve-toggle span {
  width: 20px;
  height: 20px;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.delivery-products__reserve-toggle:hover span {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.delivery-products__reserve-check:checked + span {
  background: #0ea5e9;
  border-color: #0284c7;
}

.delivery-products__reserve-check:checked + span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.delivery-products__reserve-check:focus-visible + span {
  outline: 2px solid rgba(14, 165, 233, 0.55);
  outline-offset: 2px;
}

.delivery-products__qty {
  width: 90px;
  min-width: 90px;
}

.delivery-products__qty-stock {
  display: grid;
  grid-template-columns: 90px max-content;
  align-items: center;
  gap: 8px;
}

.delivery-products__qty-stock span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-product-reserve-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.delivery-product-reserve-status--pending {
  background: #fef3c7;
  color: #92400e;
}

.delivery-product-reserve-status--reserved {
  background: #dcfce7;
  color: #166534;
}

.delivery-status-filter {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.delivery-status-filter i {
  font-size: 11px;
  color: #0ea5e9;
}

.delivery-status-filter small {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
}

.delivery-products__filtered-empty {
  padding: 16px;
  color: #64748b;
  font-weight: 700;
  text-align: center;
}

.delivery-add-product {
  background: #0ea5e9;
  color: #ffffff;
}

.delivery-add-product:hover {
  background: #0284c7;
}

.delivery-upload-excel {
  background: #6366f1;
  color: #ffffff;
}

.delivery-upload-excel:hover {
  background: #4f46e5;
}

.delivery-download-template {
  background: #16a34a;
  color: #ffffff;
}

.delivery-download-template:hover {
  background: #15803d;
}

.delivery-export-excel {
  background: #6366f1;
  color: #ffffff;
}

.delivery-export-excel:hover {
  background: #4f46e5;
}

.delivery-reserve-delivery {
  background: #0f766e;
  color: #ffffff;
}

.delivery-reserve-delivery:hover {
  background: #115e59;
}

.delivery-reserve-delivery--active {
  background: #b45309;
}

.delivery-reserve-delivery--active:hover {
  background: #92400e;
}

.delivery-delete-delivery {
  background: #dc2626;
  color: #ffffff;
}

.delivery-delete-delivery:hover {
  background: #b91c1c;
}

.delivery-import-status {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.delivery-import-status ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.delivery-import-status__actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.delivery-import-status--success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.delivery-import-status--error {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.delivery-reserve-progress {
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
}

.delivery-reserve-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.delivery-reserve-progress__header strong {
  color: #0f172a;
}

.delivery-reserve-progress__track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
}

.delivery-reserve-progress__track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  transition: width 0.18s ease;
}

.delivery-reserve-progress__message {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}

.delivery-reserve-progress--done {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.delivery-reserve-progress--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.delivery-remove-product {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
}

.delivery-remove-product:hover {
  background: #dc2626;
}

.delivery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.delivery-actions .btn {
  width: 140px;
  height: 36px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.15;
}

.delivery-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
}

.delivery-modal[aria-hidden="false"] {
  display: block;
}

.delivery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.delivery-modal__dialog {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.delivery-modal__dialog--details {
  width: min(1120px, calc(100vw - 32px));
}

.delivery-modal__dialog--wide {
  width: min(1180px, calc(100vw - 32px));
}

.delivery-modal__body > .delivery-card {
  margin: 0;
  box-shadow: none;
}

.delivery-day-details {
  display: grid;
  gap: 14px;
}

.delivery-day-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
}

.delivery-day-summary strong {
  color: #0f172a;
  font-size: 15px;
}

.delivery-day-summary span {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.delivery-day-tabs-nav {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr) 0;
  align-items: center;
  gap: 0;
  padding: 10px 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.delivery-day-tabs-nav--scrollable {
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
}

.delivery-day-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  scroll-behavior: smooth;
}

.delivery-day-tabs-nav__button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 7px;
  background: #ffffff;
  color: #0369a1;
  cursor: pointer;
}

.delivery-day-tabs-nav__button:hover:not(:disabled),
.delivery-day-tabs-nav__button:focus-visible:not(:disabled) {
  background: #e0f2fe;
  color: #075985;
}

.delivery-day-tabs-nav__button:disabled {
  opacity: 0.38;
  cursor: default;
}

.delivery-day-tabs-nav:not(.delivery-day-tabs-nav--scrollable) .delivery-day-tabs-nav__button {
  visibility: hidden;
}

.delivery-day-tabs__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 7px;
  background: #ffffff;
  color: #0369a1;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.delivery-day-tabs__item:hover,
.delivery-day-tabs__item:focus {
  background: #e0f2fe;
  color: #075985;
}

.delivery-day-tabs__item--active {
  background: #0ea5e9;
  border-color: #0284c7;
  color: #ffffff;
}

.delivery-day-tabs__item--active:hover,
.delivery-day-tabs__item--active:focus {
  background: #0284c7;
  color: #ffffff;
}

.delivery-day-section {
  scroll-margin-top: 62px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.delivery-day-section[hidden] {
  display: none;
}

.delivery-day-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.delivery-day-section__header h4 {
  margin: 0;
  color: #1e293b;
  font-size: 15px;
}

.delivery-day-section__header span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-day-section > .delivery-card {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.delivery-day-section .delivery-status {
  display: none;
}

.delivery-modal__header,
.delivery-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.delivery-modal__footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  border-bottom: 0;
}

.delivery-modal__header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-size: 18px;
}

.delivery-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.delivery-modal__body {
  padding: 16px 18px;
  overflow: auto;
}

.delivery-picker__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.delivery-wb-packaging-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.delivery-wb-packaging-select {
  min-width: 150px;
}

.delivery-picker__search {
  max-width: 420px;
}

.delivery-picker__count {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .delivery-calendar__months {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    min-width: 940px;
  }

  .delivery-product-row {
    grid-template-columns: 1fr;
  }

  .delivery-form-grid {
    grid-template-columns: 170px 170px minmax(220px, 1fr);
    min-width: 590px;
    overflow-x: auto;
  }

  .delivery-card--wb .delivery-form-grid {
    grid-template-columns: 170px 170px 170px minmax(220px, 1fr);
    min-width: 760px;
  }

  .deliveries-toolbar,
  .deliveries-add-delivery,
  .delivery-products__actions,
  .delivery-products__actions .btn {
    width: 100%;
  }

  .delivery-field--date .form-control,
  .delivery-field--number .form-control,
  .delivery-field--wb-type .form-control {
    max-width: none;
  }

  .delivery-remove-product {
    width: 100%;
  }

  .delivery-products__qty-stock {
    grid-template-columns: 1fr;
  }

  .delivery-actions {
    justify-content: stretch;
  }

  .delivery-actions .btn {
    width: 100%;
  }

  .delivery-picker__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-wb-packaging-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-picker__search {
    max-width: none;
  }

  .delivery-day-summary,
  .delivery-day-section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-day-summary span,
  .delivery-day-section__header span {
    white-space: normal;
  }
}
