﻿:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #687386;
  --line: #dce3ee;
  --blue: #0069ff;
  --blue-dark: #0954c9;
  --green: #11945a;
  --amber: #a96c00;
  --red: #c43b3b;
  --shadow: 0 16px 40px rgba(35, 57, 95, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(18px, 4vw, 44px);
  background: #0e1728;
  color: #fff;
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  font-size: 24px;
}

.topbar p {
  margin-top: 4px;
  color: #bfcbdd;
}

.layout {
  width: min(1320px, calc(100vw - 32px));
  margin: 24px auto 44px;
}

.service-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.service-tab {
  min-height: 38px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 18px;
  font-weight: 900;
}

.service-tab.active {
  background: var(--blue);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.bottom-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel h2,
.panel h1 {
  margin: 0;
}

.panel h2 {
  font-size: 19px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px 20px;
}

.status-panel strong {
  font-size: 18px;
}

.form-grid,
.supply-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.supply-form {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.edit-grid > label {
  grid-column: span 2;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.14);
}

.check-line {
  flex-direction: row;
  align-items: center;
  min-height: 42px;
  color: var(--text);
  font-weight: 600;
}

.check-line input {
  width: 18px;
  height: 18px;
}

.wide {
  grid-column: 1 / -1;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.items-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #f8fbff;
}

.items-list,
.edit-items-list {
  display: grid;
  gap: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 118px auto;
  gap: 10px;
  align-items: end;
}

.supply-product-search {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.supply-product-matches {
  display: grid;
  gap: 6px;
}

.qty-field input {
  text-align: center;
}

.add-item-button {
  justify-self: start;
}

.remove-item {
  align-self: end;
  white-space: nowrap;
}

.inline-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.warehouse-search {
  margin-bottom: 12px;
}

.warehouse-search input {
  height: 52px;
  font-size: 16px;
}

.stock-search {
  margin: 12px 0;
}

.warehouse-matches {
  display: grid;
  gap: 8px;
}

.product-match {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcff;
  color: var(--text);
  text-align: left;
}

.product-match span,
.selected-product span,
.stock-main span,
.stock-main small,
.inventory-card span,
.inventory-card small,
.muted-text {
  color: var(--muted);
}

.product-match.selected {
  border-color: var(--green);
  background: #ecfbf3;
}

.product-match.compact {
  padding: 9px 10px;
  text-align: left;
}

.product-match.compact span {
  font-size: 12px;
}

.selected-inline {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding: 2px 0;
}

.empty.compact {
  padding: 10px;
  font-size: 13px;
}

.inventory-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #f8fbff;
}

.selected-product {
  display: grid;
  gap: 4px;
  align-self: center;
}

.stock-table {
  display: grid;
  gap: 10px;
}

.stock-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.stock-main,
.stock-cluster,
.inventory-card {
  display: grid;
  gap: 4px;
}

.stock-main {
  align-content: start;
  align-self: start;
}

.stock-local-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 304px;
  max-width: 100%;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #f2f7ff;
}

.stock-local-title {
  display: grid;
  grid-column: 1 / -1;
  gap: 2px;
  align-self: center;
}

.stock-local-form input {
  min-width: 0;
  height: 40px;
}

.stock-local-form button {
  width: max-content;
  max-width: 100%;
  min-height: 40px;
}

.stock-update,
.stock-printed {
  align-self: end;
}

.read-only::before {
  content: "Режим просмотра";
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.user-form,
.user-card {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.users-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.user-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.user-title {
  display: grid;
  gap: 3px;
}

.user-title span {
  color: var(--muted);
  font-size: 12px;
}

.user-actions {
  display: flex;
  gap: 8px;
}

.stock-clusters {
  display: grid;
  gap: 8px;
}

.stock-cluster {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f7ff;
}

.stock-cluster span {
  color: var(--muted);
  font-size: 13px;
}

.inventory-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.day-report {
  display: grid;
  gap: 10px;
}

.day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.day-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  font-weight: 800;
}

.day-card summary span {
  color: var(--muted);
  font-size: 13px;
}

.day-items {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.day-items > div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f7ff;
}

.day-items span,
.day-items small {
  color: var(--muted);
}

.inventory-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.inventory-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.inventory-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px auto;
  gap: 10px;
  align-items: end;
}

.labels-print-block {
  margin-top: 18px;
}

.labels-print-block h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.labels-list {
  display: grid;
  gap: 8px;
}

.label-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.label-task > div {
  display: grid;
  gap: 3px;
}

.label-task span,
.printed-mark {
  color: var(--muted);
}

.label-task.printed {
  opacity: 0.62;
}

.label-task.printed strong,
.label-task.printed span,
.label-task.printed b {
  text-decoration: line-through;
}

.primary,
.secondary,
.ghost,
.danger {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.primary:hover {
  background: var(--blue-dark);
}

.secondary {
  background: #e9f1ff;
  color: var(--blue-dark);
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.danger {
  border: 1px solid #ffd4d4;
  background: #fff1f1;
  color: var(--red);
}

.danger:hover {
  border-color: var(--red);
  background: #ffe6e6;
}

.action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.warehouse-list {
  display: grid;
  gap: 12px;
  max-height: 210px;
  overflow: auto;
  padding-right: 4px;
}

.cluster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  padding-right: 4px;
}

.cluster-choice {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcff;
  color: var(--text);
  padding: 8px 12px;
  text-align: left;
}

.cluster-choice:hover,
.cluster-choice.selected {
  border-color: var(--blue);
  background: #eaf2ff;
  color: var(--blue-dark);
}

.cluster-row {
  display: grid;
  gap: 7px;
}

.cluster-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf4ff;
  color: #123a7a;
}

.cluster-head span {
  min-width: 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-dark);
  padding: 3px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.warehouse-row {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcff;
  color: var(--text);
  text-align: left;
}

.warehouse-row:hover {
  border-color: var(--blue);
  background: #f2f7ff;
}

.warehouse-row.selected {
  border-color: var(--green);
  background: #ecfbf3;
}

.warehouse-row span {
  color: var(--muted);
  font-size: 13px;
}

.cards {
  display: grid;
  gap: 12px;
}

.supply-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.card-top,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-top strong {
  display: block;
  font-size: 16px;
}

.card-top span {
  color: var(--muted);
  font-size: 13px;
}

.pill {
  border-radius: 999px;
  padding: 5px 10px;
  background: #e9eef7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pill.monitoring {
  background: #e9f1ff;
  color: var(--blue-dark);
}

.pill.slot_found {
  background: #fff3d9;
  color: var(--amber);
}

.pill.booked {
  background: #dcf8ea;
  color: var(--green);
}

.pill.error {
  background: #ffe6e6;
  color: var(--red);
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 14px 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
}

.slot-line {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7e8;
  color: #734b00;
  font-weight: 700;
}

.trace-line {
  margin: 8px 0 14px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #eef5ff;
  color: #24466f;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.error-note {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--red);
  font-weight: 700;
}

.logs {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.log-row {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.log-row span {
  color: var(--muted);
  font-size: 12px;
}

.empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: #0e1728;
  color: #fff;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--red);
}

.login-body {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0, 105, 255, 0.16), rgba(17, 148, 90, 0.12)),
    var(--bg);
}

.login-shell {
  width: min(420px, calc(100vw - 32px));
}

.login-panel {
  padding: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.login-panel h1 {
  margin: 18px 0 6px;
}

.login-panel p {
  margin: 0 0 20px;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 14px;
}

.error-line {
  min-height: 20px;
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 900px) {
  .grid,
  .bottom-grid,
  .status-panel,
  .form-grid,
  .supply-form,
  .edit-grid,
  .item-row,
  .inventory-form,
  .inventory-edit-form,
  .stock-local-form,
  .user-form,
  .user-card,
  .label-task,
  .stock-row,
  dl {
    grid-template-columns: 1fr;
  }

  .service-nav {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .service-tab {
    flex: 1;
  }

  .warehouse-hero {
    padding: 14px;
  }

  .inventory-form input {
    height: 56px;
    font-size: 18px;
  }

  .span-2,
  .span-3,
  .span-4,
  .edit-grid > label {
    grid-column: 1 / -1;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Embedded recommendation styles: keeps the warehouse UI reliable in long-lived tabs. */
.warehouse-header-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 260px; }
.warehouse-header-actions button { justify-content: center; width: 100%; }
.recommendation-period { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; margin: 14px 0; padding: 12px; border: 1px solid #d9e2ef; border-radius: 6px; background: #f7f9fc; }
.recommendation-period label { flex: 0 0 96px; width: 96px; margin: 0; }
.recommendation-period input { width: 96px; min-width: 0; }
.recommendation-period #loadClusterSalesBtn { flex: 0 0 auto; width: auto; min-height: 42px; white-space: nowrap; }
.recommendation-period .muted-text { flex: 1 1 260px; padding: 0 0 9px; }
.recommendation-progress { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 14px; color: #0d6efd; background: #eef5ff; border: 1px solid #b9d3ff; border-radius: 6px; }
.recommendation-progress i { animation: recommendation-spin 1s linear infinite; }
@keyframes recommendation-spin { to { transform: rotate(360deg); } }
.cluster-recommendation { display: flex !important; flex-wrap: wrap; gap: 6px 16px; margin-top: 7px; padding: 7px 9px; color: #164e35 !important; background: #ecfdf3; border-left: 3px solid #22a06b; }
.recommendation-clusters { display: grid; gap: 10px; }
.recommendation-cluster { border: 1px solid #d9e2ef; border-radius: 6px; overflow: hidden; background: #fff; }
.recommendation-cluster summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; cursor: pointer; list-style: none; background: #f5f8fc; }
.recommendation-cluster summary::-webkit-details-marker { display: none; }
.recommendation-cluster summary span { display: flex; flex-direction: column; gap: 3px; }
.recommendation-cluster summary small { color: #64748b; }
.recommendation-cluster[open] summary i { transform: rotate(180deg); }
.recommendation-table-head, .recommendation-product { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(120px, 1fr)); gap: 12px; align-items: center; }
.recommendation-table-head { padding: 9px 14px; color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid #e5ebf3; }
.recommendation-product { padding: 11px 14px; border-bottom: 1px solid #edf1f6; }
.recommendation-product > div { display: flex; flex-direction: column; min-width: 0; }
.recommendation-product-name span, .recommendation-product small { color: #64748b; }
.recommendation-number b { color: #067647; font-size: 18px; }
.recommendation-cluster-footer { display: flex; justify-content: flex-end; padding: 12px 14px; background: #fafbfd; }
.recommendation-cluster-footer button { display: inline-flex; align-items: center; gap: 7px; }

@media (max-width: 760px) {
  #warehouseStockSection .panel-head { align-items: stretch; }
  .warehouse-header-actions { min-width: 0; width: 100%; }
  .recommendation-period { align-items: end; flex-direction: row; }
  .recommendation-period label { flex-basis: 86px; width: 86px; }
  .recommendation-period input { width: 86px; }
  .recommendation-period #loadClusterSalesBtn { flex: 1 1 auto; }
  .recommendation-period .muted-text { flex-basis: 100%; padding: 2px 0 0; }
  .recommendation-table-head { display: none; }
  .recommendation-product { grid-template-columns: repeat(3, 1fr); }
  .recommendation-product-name { grid-column: 1 / -1; }
  .recommendation-product > div:not(.recommendation-product-name) { padding: 8px; background: #f7f9fc; border-radius: 5px; }
  .recommendation-cluster-footer button { width: 100%; justify-content: center; }
}


.stock-product-recommendation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 2px 0;
  padding: 7px 9px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f4f8ff;
  color: #38536a;
  font-size: 13px;
}
.stock-product-recommendation-summary > span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #38536a;
}
/* Metric hierarchy for warehouse and recommendation rows. */
.stock-cluster-heading { display: flex; flex-direction: column; gap: 7px; }
.stock-metric-list { display: flex !important; flex-wrap: wrap; gap: 6px 14px; color: #53657d; font-size: 13px; font-weight: 400; }
.stock-metric-list > span { display: inline-flex !important; align-items: baseline; gap: 5px; }
.metric-value { font-variant-numeric: tabular-nums; font-weight: 600; color: #7b8798; }
.metric-value.is-positive { font-weight: 800; color: #102a43; }
.metric-value.recommendation.is-positive { color: #067647; }
.cluster-recommendation { display: flex !important; flex-wrap: wrap; gap: 7px 18px; margin-top: 9px; padding: 9px 11px; color: #38536a !important; background: #ecfdf3; border-left: 3px solid #22a06b; border-radius: 0 5px 5px 0; }
.cluster-recommendation > span { display: inline-flex !important; align-items: baseline; gap: 6px; white-space: nowrap; }
.cluster-recommendation small { color: #627d73; }
.stock-warehouse-row { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; margin-top: 8px; border-top: 1px solid #dfe7f1; }
.stock-warehouse-row > span:first-child { color: #53657d; font-size: 12px; font-weight: 600; }
@media (max-width: 760px) {
  .stock-metric-list { gap: 6px 10px; }
  .cluster-recommendation { align-items: stretch; flex-direction: column; }
}


/* Stronger hierarchy for the cluster recommendation view. */
.recommendation-cluster summary > span { display: flex; flex-direction: column; gap: 6px; }
.recommendation-cluster summary small { display: flex; flex-flow: row wrap; gap: 6px 18px; align-items: baseline; }
.recommendation-cluster summary small > span { display: inline-flex; flex-direction: row; gap: 6px; align-items: baseline; }
.recommendation-product { row-gap: 9px; }
.recommendation-product-name { gap: 5px; }
.recommendation-sales, .recommendation-stock, .recommendation-number { gap: 5px; }
.recommendation-sales > span { color: #64748b; font-size: 12px; }
.recommendation-stock-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
.recommendation-stock-grid > span { display: inline-flex !important; gap: 5px; align-items: baseline; color: #53657d; font-size: 12px; }
.recommendation-number .metric-value { font-size: 19px; }
@media (max-width: 760px) {
  .recommendation-product { gap: 10px; padding: 14px 12px; }
  .recommendation-product > div:not(.recommendation-product-name) { gap: 6px; }
  .recommendation-stock-grid { grid-template-columns: 1fr; }
}



/* Cluster supply recommendation table. */
.recommendation-clusters { display: grid; gap: 16px; }
.cluster-recommendation-card { overflow: hidden; border: 1px solid #d7e0eb; border-radius: 7px; background: #fff; box-shadow: 0 2px 8px rgba(26, 54, 93, .05); }
.cluster-recommendation-card > summary { display: flex; align-items: center; padding: 17px 18px; cursor: pointer; list-style: none; background: #f5f8fc; border-bottom: 1px solid transparent; }
.cluster-recommendation-card > summary::-webkit-details-marker { display: none; }
.cluster-recommendation-card[open] > summary { border-bottom-color: #dfe7f1; }
.cluster-summary-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cluster-title-line { display: inline-flex; align-items: center; gap: 10px; }
.cluster-title-line strong { color: #102a43; font-size: 19px; line-height: 1.2; }
.cluster-title-line i { color: #63758b; font-size: 14px; transition: transform .18s ease; }
.cluster-recommendation-card[open] .cluster-title-line i { transform: rotate(180deg); }
.cluster-summary-metrics { display: flex; flex-wrap: wrap; gap: 7px 20px; color: #62758a; font-size: 13px; }
.cluster-summary-metrics > span { display: inline-flex; align-items: baseline; gap: 6px; }
.cluster-recommendation-body { padding: 16px 18px 18px; }
.cluster-recommendation-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cluster-recommendation-actions button { display: inline-flex; align-items: center; gap: 7px; }
.cluster-recommendation-actions > span { color: #62758a; font-size: 13px; }
.cluster-table-scroll { overflow-x: auto; border: 1px solid #e1e8f0; border-radius: 6px; }
.cluster-supply-table { width: 100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; }
.cluster-supply-table th { padding: 10px 12px; color: #53657d; font-size: 11px; font-weight: 800; letter-spacing: 0; text-align: left; text-transform: uppercase; background: #f6f8fb; border-bottom: 1px solid #dfe7f1; }
.cluster-supply-table th:nth-child(1) { width: 30%; }
.cluster-supply-table th:nth-child(2) { width: 13%; }
.cluster-supply-table th:nth-child(3) { width: 15%; }
.cluster-supply-table th:nth-child(4) { width: 13%; }
.cluster-supply-table th:nth-child(5) { width: 17%; }
.cluster-supply-table th:nth-child(6) { width: 12%; }
.cluster-supply-table td { padding: 12px; vertical-align: top; color: #243b53; border-bottom: 1px solid #e8edf3; }
.cluster-supply-table tbody tr:last-child td { border-bottom: 0; }
.cluster-supply-table tbody tr:hover { background: #f8fbff; }
.cluster-supply-table td > b, .cluster-supply-table td > span { display: block; }
.cluster-supply-table td small { display: block; margin-top: 4px; color: #718096; line-height: 1.35; }
.cluster-supply-table td[data-label="Ожидается"] > span { display: flex; align-items: baseline; gap: 5px; margin-bottom: 4px; font-size: 12px; }
.sku-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.supply-recommendation-value .metric-value { color: #067647; font-size: 21px; }
.cluster-no-supply { display: flex; align-items: center; gap: 9px; padding: 14px; color: #317157; background: #f1faf5; border: 1px solid #cfe9da; border-radius: 6px; }
@media (max-width: 760px) {
  .cluster-recommendation-card > summary { padding: 14px; }
  .cluster-title-line strong { font-size: 17px; }
  .cluster-recommendation-body { padding: 12px; }
  .cluster-recommendation-actions { align-items: stretch; flex-direction: column; }
  .cluster-recommendation-actions button { justify-content: center; width: 100%; }
  .cluster-table-scroll { overflow: visible; border: 0; }
  .cluster-supply-table { min-width: 0; table-layout: auto; }
  .cluster-supply-table thead { display: none; }
  .cluster-supply-table, .cluster-supply-table tbody, .cluster-supply-table tr, .cluster-supply-table td { display: block; width: 100%; }
  .cluster-supply-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; margin-bottom: 10px; border: 1px solid #dfe7f1; border-radius: 6px; background: #fff; }
  .cluster-supply-table td { display: flex; flex-direction: column; padding: 8px; border: 0; background: #f7f9fc; border-radius: 5px; }
  .cluster-supply-table td:first-child { grid-column: 1 / -1; background: transparent; padding: 0 0 6px; }
  .cluster-supply-table td::before { content: attr(data-label); margin-bottom: 4px; color: #718096; font-size: 10px; font-weight: 800; text-transform: uppercase; }
}

.warehouse-cluster-sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0 12px;
}

.warehouse-cluster-sort[hidden] {
  display: none;
}

.warehouse-cluster-sort > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.warehouse-cluster-sort-buttons {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f8fc;
}

.warehouse-cluster-sort-buttons button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 7px 11px;
  color: var(--muted);
  background: transparent;
}

.warehouse-cluster-sort-buttons button.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 1px 3px rgba(13, 110, 253, 0.22);
}

@media (max-width: 760px) {
  .warehouse-cluster-sort {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .warehouse-cluster-sort-buttons,
  .warehouse-cluster-sort-buttons button {
    flex: 1;
  }

  .warehouse-cluster-sort-buttons button {
    justify-content: center;
    min-width: 0;
  }
}
.warehouse-period-actions {
  display: flex;
  flex: 1 1 600px;
  gap: 6px;
  min-width: 0;
}

.warehouse-period-actions button {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  justify-content: center;
  padding: 7px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.warehouse-period-actions button i {
  flex: 0 0 auto;
  font-size: 15px;
}

.warehouse-period-actions .spin {
  animation: recommendation-spin 1s linear infinite;
}

@media (max-width: 760px) {
  .warehouse-period-actions {
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .warehouse-period-actions button {
    flex-basis: calc(50% - 3px);
    font-size: 12px;
    padding-inline: 8px;
  }
}
.cluster-recommendation.estimated {
  color: #714600 !important;
  background: #fff7df;
  border-left-color: #e5a200;
}

.recommendation-basis {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 800;
}

.recommendation-basis.actual {
  color: #087443;
}

.recommendation-basis.estimated {
  color: #a25d00;
}

.cluster-supply-table tr.estimated-recommendation td {
  background: #fffaf0;
}

.supply-recommendation-value.estimated .metric-value {
  color: #a25d00;
}

.supply-recommendation-value small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-weight: 600;
}
.recommendation-days-saved {
  min-height: 14px;
  color: #087443;
  font-size: 11px;
  font-weight: 700;
}
/* Collapsible Ozon clusters in warehouse product cards. */
.stock-cluster {
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe7f1;
  background: #f5f8fc;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.stock-cluster[open] {
  border-color: #b9cef0;
  box-shadow: 0 5px 16px rgba(30, 64, 175, 0.08);
}

.stock-cluster-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 160ms ease;
}

.stock-cluster-summary::-webkit-details-marker {
  display: none;
}

.stock-cluster-summary:hover {
  background: #edf4ff;
}

.stock-cluster[open] > .stock-cluster-summary {
  background: #eef5ff;
  border-bottom: 1px solid #d8e4f4;
}

.stock-cluster-summary .stock-cluster-heading {
  flex: 1;
  min-width: 0;
}

.stock-cluster-toggle {
  display: grid !important;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #bad0f3;
  border-radius: 50%;
  color: #0d6efd !important;
  background: #fff;
  box-shadow: 0 3px 9px rgba(13, 110, 253, 0.13);
}

.stock-cluster-toggle i {
  font-size: 18px;
  transition: transform 180ms ease;
}

.stock-cluster[open] .stock-cluster-toggle i {
  transform: rotate(180deg);
}

.stock-cluster-body {
  padding: 0 12px 12px;
}

.warehouse-cluster-sort-buttons .warehouse-cluster-view-button {
  justify-content: center;
  width: 38px;
  min-width: 38px;
  padding: 7px;
  margin-left: 4px;
  color: #0d6efd;
  background: #fff;
  border: 1px solid #c9d8ee;
}

.warehouse-cluster-sort-buttons .warehouse-cluster-view-button:hover {
  color: #fff;
  background: #0d6efd;
  border-color: #0d6efd;
}

@media (max-width: 760px) {
  .warehouse-cluster-sort-buttons {
    width: 100%;
  }

  .warehouse-cluster-sort-buttons button:not(.warehouse-cluster-view-button) {
    flex: 1 1 auto;
  }

  .warehouse-cluster-sort-buttons .warehouse-cluster-view-button {
    flex: 0 0 38px;
  }

  .stock-cluster-summary {
    min-height: 66px;
    padding: 10px 11px;
  }

  .stock-cluster-toggle {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }
}
/* Per-cluster supply horizon controls. */
.cluster-period-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d9e5f3;
  border-radius: 7px;
  background: #f5f8fc;
}

.cluster-period-field {
  display: flex;
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.cluster-period-field label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #52637a;
  font-size: 12px;
  font-weight: 800;
}

.cluster-period-field input {
  width: 104px;
  min-height: 40px;
  padding: 7px 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cluster-period-field small {
  padding-bottom: 11px;
  color: #63758c;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cluster-period-buttons {
  display: inline-flex;
  gap: 7px;
}

.cluster-period-buttons .icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
}

/* Keep the global period and its actions level and predictable. */
.recommendation-period {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.recommendation-period .muted-text {
  grid-column: 1 / -1;
  padding: 0;
}

.warehouse-period-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.warehouse-period-actions button {
  width: 100%;
}

.recommendation-days-saved {
  display: none;
}

@media (max-width: 760px) {
  .recommendation-period {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .warehouse-period-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .cluster-period-toolbar {
    align-items: stretch;
  }

  .cluster-period-field {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .cluster-period-field small {
    padding: 0;
    white-space: normal;
  }

  .cluster-period-buttons {
    align-items: end;
  }
}
/* Mobile width guard and product-level cluster toggle. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-wrapper,
.app-main,
.app-content,
.app-content .container-fluid,
.layout,
.panel,
.stock-table,
.stock-row,
.stock-main,
.stock-clusters,
.cluster-table-scroll {
  min-width: 0;
  max-width: 100%;
}

img,
input,
select,
textarea,
button {
  max-width: 100%;
}

.stock-product-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stock-product-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stock-product-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid #bad0f3;
  border-radius: 50%;
  color: #0d6efd;
  background: #fff;
  box-shadow: 0 3px 9px rgba(13, 110, 253, .13);
}

.stock-product-toggle i { transition: transform 180ms ease; }
.stock-row.clusters-open .stock-product-toggle i { transform: rotate(180deg); }
.stock-clusters[hidden] { display: none; }
.stock-cluster > .stock-cluster-heading { padding: 12px 12px 8px; }
.stock-cluster > .stock-cluster-body { padding-top: 0; }

.product-period-control {
  display: flex;
  align-items: end;
  gap: 5px;
  margin-top: 9px;
}

.product-period-control label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #53657d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-period-control input {
  width: 78px;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 800;
}

.product-period-control .icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.product-period-note { color: #66788f !important; }

@media (max-width: 760px) {
  .app-content .container-fluid { padding-inline: 8px; }
  .layout { width: 100%; }
  .panel { padding: 12px; }
  .panel-head { gap: 8px; }
  .panel-head h2 { font-size: 18px; }
  button { min-width: 0; font-size: 12.5px; white-space: normal; }
  label { min-width: 0; }
  input, select { width: 100%; min-width: 0; }
  .stock-row { gap: 10px; padding: 10px; }
  .stock-product-toggle { flex-basis: 38px; width: 38px; height: 38px; min-height: 38px; }
  .stock-main > small { font-size: 12px; overflow-wrap: anywhere; }
  .stock-local-form { width: 100%; }
  .stock-local-form button { width: 100%; }
  .cluster-table-scroll,
  .table-responsive { overflow-x: visible; }
  .cluster-supply-table { min-width: 0 !important; }
  .warehouse-cluster-sort-buttons { min-width: 0; }
  .warehouse-cluster-sort-buttons button { padding-inline: 7px; font-size: 11px; }
  .warehouse-product-controls { min-width: 0; }
  .product-period-control { flex-wrap: wrap; }

  .prepared-shipment-table,
  .prepared-shipment-table tbody,
  .prepared-shipment-table tr,
  .prepared-shipment-table td {
    display: block;
    width: 100%;
  }
  .prepared-shipment-table thead { display: none; }
  .prepared-shipment-table tr { margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
  .prepared-shipment-table td { padding: 5px 0; border: 0; overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
  .cluster-supply-table tr { grid-template-columns: 1fr; }
  .cluster-supply-table td:first-child { grid-column: 1; }
  .warehouse-period-actions { grid-template-columns: 1fr 1fr; }
  .warehouse-period-actions button { font-size: 11px; padding: 6px; }
  .cluster-period-toolbar { padding: 10px; }
  .cluster-period-field input { width: 88px; }
  .cluster-period-buttons .icon-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
}
.warehouse-cluster-sort {
  justify-content: space-between;
}

.warehouse-zero-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.warehouse-zero-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.warehouse-cluster-sort-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.warehouse-cluster-sort-panel > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .warehouse-cluster-sort {
    align-items: stretch;
  }

  .warehouse-zero-toggle {
    justify-content: flex-start;
    white-space: normal;
  }

  .warehouse-cluster-sort-panel {
    align-items: stretch;
    flex-direction: column;
  }
}
.local-inventory-panel {
  margin: 10px 0 14px;
  overflow: hidden;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fff;
}

.local-inventory-panel > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: #f6f9fd;
}

.local-inventory-panel > summary::-webkit-details-marker { display: none; }
.local-inventory-panel > summary span { font-weight: 900; }
.local-inventory-panel > summary b { margin-left: auto; color: #0b5ed7; font-size: 13px; }
.local-inventory-panel > summary i { color: #63758b; transition: transform .18s ease; }
.local-inventory-panel[open] > summary i { transform: rotate(180deg); }
.local-inventory-table { padding: 10px 12px 12px; }
.local-inventory-table table { width: 100%; border-collapse: collapse; }
.local-inventory-table th { padding: 8px 10px; color: #53657d; font-size: 11px; font-weight: 800; text-align: left; text-transform: uppercase; border-bottom: 1px solid #e3eaf3; }
.local-inventory-table td { padding: 10px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.local-inventory-table tr:last-child td { border-bottom: 0; }
.local-inventory-table td:first-child { width: 65%; }
.local-inventory-table td b,
.local-inventory-table td small { display: block; }
.local-inventory-table td small { margin-top: 3px; color: var(--muted); }
.local-inventory-table td strong { color: #0b5ed7; font-size: 16px; }

@media (max-width: 760px) {
  .local-inventory-panel > summary { padding: 10px 12px; }
  .local-inventory-table { padding: 8px; }
  .local-inventory-table table,
  .local-inventory-table tbody,
  .local-inventory-table tr,
  .local-inventory-table td { display: block; width: 100%; }
  .local-inventory-table thead { display: none; }
  .local-inventory-table tr { padding: 10px; border-bottom: 1px solid #e3eaf3; }
  .local-inventory-table tr:last-child { border-bottom: 0; }
  .local-inventory-table td { padding: 3px 0; border: 0; }
}
.backup-panel .panel-head {
  margin-bottom: 12px;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.backup-actions button {
  min-width: 150px;
}

.backup-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .backup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .backup-actions button {
    min-width: 0;
    width: 100%;
    padding-inline: 10px;
  }
}
/* Manual seasonality controls in supply recommendations. */
.seasonality-control {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #f1d69a;
  border-radius: 7px;
  background: #fffaf0;
}

.seasonality-control.active {
  border-color: #e2ad3b;
  background: #fff6dd;
}

.seasonality-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 7px;
  align-items: end;
}

.seasonality-control label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #8a5a00;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.seasonality-control input,
.seasonality-control select,
.seasonality-control textarea {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 700;
}

.seasonality-control textarea {
  resize: vertical;
  min-height: 58px;
  line-height: 1.35;
  text-transform: none;
}

.seasonality-text-label {
  grid-column: 1 / -1;
}

.seasonality-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.seasonality-control .icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.seasonality-link {
  color: #a15c00;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.seasonality-link:hover { text-decoration: underline; }

.seasonality-status {
  color: #8a5a00;
  font-weight: 800;
}

@media (max-width: 760px) {
  .seasonality-grid { grid-template-columns: 1fr; }
  .seasonality-actions { align-items: stretch; }
  .seasonality-link { padding-top: 8px; }
}


/* Compact seasonality block inside the product card. */
.stock-product-seasonality {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.stock-product-seasonality .seasonality-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
}

.stock-product-seasonality .seasonality-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

.stock-product-seasonality .seasonality-control input,
.stock-product-seasonality .seasonality-control select,
.stock-product-seasonality .seasonality-control textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.stock-product-seasonality .seasonality-control textarea {
  min-height: 70px;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.stock-product-seasonality .seasonality-actions {
  gap: 6px;
}

.stock-product-seasonality .seasonality-status {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.stock-product-total-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stock-product-total-metrics span {
  min-width: 0;
  white-space: nowrap;
}

.stock-product-seasonality .seasonality-control {
  width: 304px;
  max-width: 100%;
  border-color: #d7e0eb;
  background: #f5f8fc;
}

.stock-product-seasonality .seasonality-control.active {
  border-color: #b9d3ff;
  background: #eef5ff;
}

.stock-product-seasonality .seasonality-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d5e1f1;
  border-radius: 6px;
  background: #fff;
  color: #0d6efd;
  font-size: 12px;
  font-weight: 900;
}

.update-status {
  display: none;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f5f8ff;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.update-status.visible {
  display: block;
}

.update-status.success {
  border-color: #9fd7b7;
  background: #eaf8ef;
  color: #08713a;
}

.update-status.error {
  border-color: #ffc4c4;
  background: #fff1f1;
  color: var(--red);
}

.update-status.info {
  border-color: #bdd5ff;
  background: #edf5ff;
  color: var(--blue);
}

.prepared-check-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.preparation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
  margin: 10px 0;
}
.preparation-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.preparation-card-head h3 {
  margin: 2px 0 0;
}
@media (max-width: 640px) {
  .prepared-check-bar button { width: 100%; }
  .preparation-card { padding: 10px; }
}

.prepared-status-filter {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.prepared-status-filter > span {
  font-weight: 800;
  color: var(--muted);
}
.prepared-status-filter label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
.prepared-status-filter input {
  width: 16px;
  height: 16px;
}
@media (max-width: 640px) {
  .prepared-status-filter { align-items: flex-start; }
  .prepared-status-filter label { width: 100%; }
}

.prepared-shipment-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.prepared-shipment-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.prepared-shipment-table td {
  padding: 12px 10px;
  background: #f8fbff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.prepared-shipment-table td:first-child { border-left: 1px solid var(--line); border-radius: 8px 0 0 8px; }
.prepared-shipment-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.status-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f7f2;
  color: #087356;
  font-weight: 800;
  white-space: nowrap;
}
.prepared-quantity-edit {
  display: flex;
  align-items: center;
  gap: 6px;
}
.prepared-quantity-edit input {
  width: 84px;
  min-width: 84px;
}
.prepared-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.prepared-row-actions button {
  padding: 9px 11px;
}
@media (max-width: 760px) {
  .prepared-row-actions button { width: 100%; }
}


/* Local/non-local sales split and supply advice. */
.recommendation-sales-split {
  display: block !important;
  margin-top: 6px;
  color: #53657d;
}
.recommendation-sales-split .metric-value {
  font-size: 13px;
}
.recommendation-advice {
  display: flex !important;
  align-items: flex-start !important;
  gap: 7px !important;
  flex-basis: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  white-space: normal !important;
  color: #7a4b00 !important;
  background: #fff7df;
  border: 1px solid #f0d58d;
  border-radius: 6px;
  line-height: 1.35;
}
.recommendation-advice i {
  flex: 0 0 auto;
  margin-top: 2px;
}
.supply-recommendation-value .table-advice {
  margin-top: 8px;
  color: #7a4b00;
}

.prepared-cluster-name {
  display: block;
  margin-top: 4px;
  color: #63758b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.collapsible-panel {
  display: block;
}
.collapsible-panel > .panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.collapsible-panel > .panel-summary::-webkit-details-marker {
  display: none;
}
.collapsible-panel > .panel-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}
.collapsible-panel > .panel-summary i {
  color: #63758b;
  transition: transform .18s ease;
}
.collapsible-panel[open] > .panel-summary i {
  transform: rotate(180deg);
}
.panel-collapsible-body {
  margin-top: 14px;
}
@media (max-width: 640px) {
  .collapsible-panel > .panel-summary strong { font-size: 18px; }
}


/* Clear recommendation toolbar: data action separate from view switch. */
.recommendation-period {
  display: grid !important;
  grid-template-columns: 96px minmax(190px, 240px) minmax(220px, 1fr) !important;
  align-items: end !important;
  gap: 10px 12px !important;
  margin: 14px 0 !important;
  padding: 12px !important;
  border: 1px solid #d9e2ef !important;
  border-radius: 8px !important;
  background: #f7f9fc !important;
}
.recommendation-days-field,
.recommendation-period label {
  margin: 0 !important;
  width: 96px !important;
  min-width: 0 !important;
}
.recommendation-days-field input,
.recommendation-period input {
  width: 96px !important;
  min-width: 0 !important;
}
.recommendation-load-sales {
  width: 100% !important;
  min-height: 42px !important;
  justify-content: center !important;
  white-space: nowrap !important;
}
.recommendation-view-switch {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
}
.recommendation-view-switch > span {
  padding: 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.recommendation-view-switch button {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  justify-content: center;
  border-radius: 6px;
  white-space: nowrap;
}
.recommendation-view-switch button.active {
  color: #fff;
  background: #0d6efd;
  border-color: #0d6efd;
  box-shadow: 0 4px 10px rgba(13, 110, 253, .18);
}
.recommendation-period .muted-text {
  grid-column: 1 / -1 !important;
  padding: 0 !important;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .recommendation-period {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  .recommendation-days-field,
  .recommendation-period label {
    width: 82px !important;
  }
  .recommendation-days-field input,
  .recommendation-period input {
    width: 82px !important;
    min-height: 40px;
  }
  .recommendation-load-sales {
    min-height: 40px !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
  }
  .recommendation-view-switch {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .recommendation-view-switch > span {
    grid-column: 1 / -1;
    padding: 2px 4px 0;
  }
  .recommendation-view-switch button {
    min-height: 38px;
    padding: 8px;
    font-size: 13px;
  }
  .recommendation-view-switch button span,
  .recommendation-load-sales span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 390px) {
  .recommendation-load-sales span { font-size: 12px; }
  .recommendation-view-switch button { font-size: 12px; }
}


/* Purchase recommendation for China lead time. */
.stock-product-recommendation-summary .purchase-recommendation {
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 900;
}
.stock-product-recommendation-summary .purchase-recommendation.need-buy {
  color: #8a3b00;
  background: #fff1d6;
}
.stock-product-recommendation-summary .purchase-recommendation.enough-stock {
  color: #087356;
  background: #e8f7f2;
}
.purchase-recommendation-note {
  flex-basis: 100%;
  color: #53657d;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .stock-product-recommendation-summary {
    width: 100%;
    gap: 6px;
  }
  .stock-product-recommendation-summary > span {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .purchase-recommendation-note {
    font-size: 12px;
  }
}

/* Profile planning settings. */
.profile-settings-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 14px 18px;
  align-items: end;
}

.profile-settings-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.profile-settings-grid input {
  width: 100%;
}

.profile-settings-grid .backup-note {
  margin: 0;
}

@media (max-width: 700px) {
  .profile-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Prepared shipment period filter. */
.prepared-days-filter {
  min-width: 130px;
}

.prepared-days-filter input {
  width: 64px;
  min-height: 34px;
  padding: 6px 8px;
}

@media (max-width: 640px) {
  .prepared-days-filter {
    width: 100%;
    justify-content: space-between;
  }
}

/* Warehouse product filters. */
.warehouse-product-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
  gap: 10px 12px;
  align-items: end;
}

.archive-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  white-space: nowrap;
  font-weight: 800;
}

.archive-toggle input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px !important;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

@media (max-width: 760px) {
  .warehouse-product-controls {
    grid-template-columns: 1fr;
  }

  .archive-toggle {
    min-height: 34px;
    justify-self: start;
  }
}


.slot-move-panel { margin-top: 16px; overflow: hidden; }
.slot-move-controls { display: grid; grid-template-columns: 140px 170px 170px; gap: 12px; align-items: end; max-width: 540px; }
.slot-move-list { display: grid; gap: 10px; margin-top: 14px; }
.slot-move-card { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(240px, 1fr) minmax(360px, 1.15fr); gap: 14px; align-items: center; padding: 14px; border: 1px solid #d7e3f4; border-radius: 10px; background: #f8fbff; overflow: hidden; }
.slot-move-main { display: grid; gap: 5px; min-width: 0; }
.slot-move-main strong, .slot-move-items { min-width: 0; overflow-wrap: anywhere; }
.slot-move-main small, .slot-move-items { color: #52647a; }
.slot-move-items { line-height: 1.45; }
.slot-move-monitor-state { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; background: #eaf2ff; color: #075ed6; font-weight: 800; font-size: 12px; }
.slot-move-monitor-state.moved { background: #e8f9ef; color: #08733d; }
.slot-move-monitor-state.stopped { background: #eef2f7; color: #64748b; }
.slot-move-actions { display: grid; grid-template-columns: 128px 86px 86px 96px auto; gap: 8px; align-items: end; min-width: 0; }
.slot-move-actions label { margin: 0; font-size: 12px; color: #52647a; min-width: 0; }
.slot-move-actions input { min-height: 40px; padding: 8px 10px; }
.slot-move-actions button { min-height: 40px; white-space: nowrap; padding-left: 10px; padding-right: 10px; min-width: 0; }
.slot-move-result { grid-column: 1 / -1; padding: 8px 10px; border-radius: 8px; background: #fff7e6; color: #915f00; font-weight: 700; }
.slot-move-result.ok { background: #e8f9ef; color: #08733d; }
@media (max-width: 1180px) { .slot-move-card { grid-template-columns: 1fr; } .slot-move-actions { grid-template-columns: 128px 86px 86px 96px auto; } }
@media (max-width: 700px) { .slot-move-controls, .slot-move-actions { grid-template-columns: 1fr; max-width: none; } .slot-move-actions button { width: 100%; } }


/* Warehouse help and safer wrapping for long recommendation explanations. */
.warehouse-help {
  margin: 10px 0 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fbff;
}
.warehouse-help > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  color: #38536a;
  font-weight: 900;
  list-style: none;
}
.warehouse-help > summary::-webkit-details-marker { display: none; }
.warehouse-help > summary .bi-chevron-down {
  margin-left: auto;
  color: #64748b;
  transition: transform .18s ease;
}
.warehouse-help[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.warehouse-help-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 0 12px 12px;
  color: #53657d;
  font-size: 13px;
  line-height: 1.45;
}
.warehouse-help-body p { margin: 0; }
.cluster-recommendation {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.cluster-recommendation > span {
  min-width: 0;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.recommendation-basis,
.recommendation-advice {
  flex: 1 1 100%;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.stock-summary > strong,
.stock-summary > span,
.stock-product-total-metrics > span,
.stock-metric-list > span {
  cursor: help;
}
@media (max-width: 760px) {
  .warehouse-help-body { grid-template-columns: 1fr; }
  .cluster-recommendation {
    gap: 6px;
    padding: 8px;
    font-size: 12px;
  }
}
/* Compact prepared shipments and recommendation action. */
.recommendation-load-sales {
  font-size: 13px !important;
  padding-inline: 10px !important;
  letter-spacing: 0 !important;
}
.recommendation-load-sales span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.prepared-shipment-table {
  border-spacing: 0 5px;
  font-size: 13px;
}
.prepared-shipment-table th {
  padding: 5px 8px;
  font-size: 11px;
}
.prepared-shipment-table td {
  padding: 8px 8px;
}
.status-pill {
  max-width: 180px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.15;
  white-space: normal;
}
.prepared-quantity-edit input {
  width: 70px;
  min-width: 70px;
  height: 34px;
}
.prepared-row-actions {
  gap: 6px;
}
.prepared-row-actions button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .recommendation-load-sales { font-size: 12px !important; }
  .status-pill { max-width: 100%; }
}
/* Recommendation state colors: separate action-needed from no-supply-needed. */
.cluster-recommendation.actual,
.cluster-recommendation.estimated {
  background: #f4f8ff !important;
  border-left-color: #8fb8ff !important;
  color: #38536a !important;
}
.cluster-recommendation.needs-supply {
  background: #eef5ff !important;
  border-left-color: #0d6efd !important;
  color: #173b75 !important;
}
.cluster-recommendation.needs-supply .recommendation-basis {
  color: #0b5ed7 !important;
}
.cluster-recommendation.estimated-supply {
  background: #fff7df !important;
  border-left-color: #e5a200 !important;
  color: #714600 !important;
}
.cluster-recommendation.estimated-supply .recommendation-basis {
  color: #a25d00 !important;
}
.cluster-recommendation.no-supply {
  background: #f1faf5 !important;
  border-left-color: #22a06b !important;
  color: #315c48 !important;
}
.cluster-recommendation.no-supply .recommendation-basis {
  color: #087443 !important;
}
.cluster-recommendation.has-incoming {
  background: #f7f9fc !important;
  border-left-color: #94a3b8 !important;
  color: #475569 !important;
}
.cluster-recommendation.has-incoming .recommendation-basis {
  color: #475569 !important;
}
.cluster-recommendation.no-supply .recommendation-advice,
.cluster-recommendation.has-incoming .recommendation-advice {
  color: #315c48 !important;
  background: rgba(255,255,255,.62) !important;
  border-color: #cfe9da !important;
}
.cluster-recommendation.needs-supply .recommendation-advice {
  color: #17437a !important;
  background: #f8fbff !important;
  border-color: #b9d3ff !important;
}
/* Prepared shipments layout fixes. */
.prepared-product-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
.prepared-product-cell strong {
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.local-inventory-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid #f3c6c6;
  border-radius: 999px;
  background: #fff1f1;
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.prepared-cluster-cell {
  min-width: 120px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .prepared-cluster-cell { min-width: 0; }
  .local-inventory-badge { border-radius: 7px; }
}

/* Large recommendation amount badge inside warehouse cluster cards. */
.cluster-recommendation {
  position: relative;
  padding-right: 104px !important;
  min-height: 82px;
}
.recommendation-featured {
  position: absolute;
  top: 9px;
  right: 10px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  min-height: 58px;
  padding: 7px 6px;
  border: 1px solid rgba(6, 118, 71, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 18px rgba(16, 42, 67, .08);
  color: #067647;
}
.recommendation-featured strong {
  font-size: 34px;
  font-weight: 900;
  line-height: .95;
  font-variant-numeric: tabular-nums;
}
.recommendation-featured small {
  margin-top: 5px;
  color: inherit !important;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.cluster-recommendation.estimated-supply .recommendation-featured {
  border-color: rgba(180, 83, 9, .22);
  color: #b45309;
}
.cluster-recommendation.no-supply .recommendation-featured,
.cluster-recommendation.has-incoming .recommendation-featured {
  border-color: #d8e2ee;
  color: #718096;
  background: #f8fafc;
  box-shadow: none;
}
@media (max-width: 760px) {
  .cluster-recommendation {
    padding-right: 11px !important;
    min-height: 0;
  }
  .recommendation-featured {
    position: static;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    min-height: 0;
    order: -1;
  }
  .recommendation-featured strong { font-size: 26px; }
}

/* Cluster-level incoming stock that Ozon does not bind to a specific warehouse. */
.cluster-only-incoming {
  border: 1px dashed #b7c7dc;
  border-radius: 7px;
  padding: 8px 10px;
  background: #f6f9fd;
}
.cluster-only-incoming > span:first-child {
  color: #23466f;
  font-weight: 900;
}

.seasonality-link.ozon-search-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #005bd1;
  border-color: #cfe0f7;
  background: #f7fbff;
}

.stock-product-seasonality .seasonality-link.ozon-search-link span {
  white-space: nowrap;
}

/* Editable supply quantities in cluster XLSX recommendations. */
.cluster-recommendation-global-actions {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 12px;
}

.cluster-recommendation-global-actions .ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding-inline: 13px;
}

.supply-recommendation-value.editable {
  min-width: 118px;
}

.supply-quantity-edit {
  display: grid;
  gap: 4px;
  max-width: 104px;
  margin: 0 0 5px;
  color: #53657d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.supply-quantity-edit input {
  width: 104px;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid #b8c9df;
  border-radius: 7px;
  background: #fff;
  color: #067647;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.supply-quantity-edit input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
  outline: none;
}

@media (max-width: 760px) {
  .cluster-recommendation-global-actions { justify-content: stretch; }
  .cluster-recommendation-global-actions .ghost { width: 100%; justify-content: center; }
  .supply-quantity-edit,
  .supply-quantity-edit input { max-width: 100%; width: 100%; }
}

.product-recommend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 4px;
  padding: 6px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #0f3f83;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.product-recommend-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.supply-recommendation-value.excluded {
  background: #f8fafc !important;
  color: #64748b;
}

.supply-recommendation-value.excluded .table-advice {
  color: #64748b;
}

.supply-quantity-edit input:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .product-recommend-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* Compact recommendation view switch: keep it out of the narrow period column. */
.recommendation-period .recommendation-view-switch {
  grid-column: 1 / -1 !important;
  justify-self: start !important;
  display: inline-grid !important;
  grid-template-columns: auto auto auto !important;
  align-items: center !important;
  gap: 4px !important;
  width: auto !important;
  max-width: 100% !important;
  padding: 3px !important;
  border: 1px solid #cfe0f5 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.recommendation-period .recommendation-view-switch > span {
  display: inline-flex !important;
  align-items: center !important;
  height: 34px !important;
  padding: 0 10px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  background: #f8fbff !important;
  border-radius: 6px !important;
}

.recommendation-period .recommendation-view-switch button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: auto !important;
  min-width: 104px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.recommendation-period .recommendation-view-switch button i {
  flex: 0 0 auto !important;
  font-size: 14px !important;
}

.recommendation-period .recommendation-view-switch button.active {
  color: #fff !important;
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  box-shadow: 0 5px 12px rgba(13, 110, 253, .18) !important;
}

@media (max-width: 520px) {
  .recommendation-period .recommendation-view-switch {
    justify-self: stretch !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .recommendation-period .recommendation-view-switch > span {
    grid-column: 1 / -1 !important;
    justify-content: center !important;
    height: 26px !important;
  }

  .recommendation-period .recommendation-view-switch button {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 12px !important;
    padding: 0 8px !important;
  }
}

.warehouse-tools-panel {
  margin: 10px 0 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #fbfdff;
}

.warehouse-tools-panel > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  cursor: pointer;
  color: #38536a;
  font-weight: 900;
  list-style: none;
}

.warehouse-tools-panel > summary::-webkit-details-marker {
  display: none;
}

.warehouse-tools-panel > summary .bi-chevron-down {
  margin-left: auto;
  color: #64748b;
  transition: transform .18s ease;
}

.warehouse-tools-panel[open] > summary .bi-chevron-down {
  transform: rotate(180deg);
}

.warehouse-tools-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.warehouse-tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.warehouse-tools-panel .prepared-check-bar {
  margin: 0;
}

@media (max-width: 640px) {
  .warehouse-tool-row > button,
  .warehouse-tools-panel .prepared-check-bar > button {
    width: 100%;
  }

  .warehouse-tools-body {
    padding: 0 10px 10px;
  }
}

.recommendation-refresh-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 920px;
  padding: 9px 11px;
  color: #315076;
  background: #eef6ff;
  border: 1px solid #cfe3ff;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.35;
}

.recommendation-refresh-note i {
  flex: 0 0 auto;
  color: #0d6efd;
  margin-top: 1px;
}

.recommendation-refresh-note b {
  color: #10233f;
}

@media (max-width: 640px) {
  .recommendation-refresh-note {
    font-size: 12px;
    padding: 8px 9px;
  }
}
