/* 文件职责：订单大厅看板布局。 */
.ob-page {
  --ob-surface: #fff;
  --ob-border: #e7e9ee;
  --ob-board-bg: #f4f5f7;
  --ob-text: #1f2937;
  --ob-muted: #98a2b3;

  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(
    100vh - var(--header-height, 64px) - var(--tabbar-height, 42px) - 28px
  );
  min-height: 620px;
  padding: 2px 2px 4px;
  font-size: 13px;
  color: var(--ob-text);
}

.ob-stats {
  display: flex;
  flex-shrink: 0;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px 14px;
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: 12px;
}

.ob-stats-main {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  align-items: flex-end;
}

.ob-stats-actions {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  min-width: 360px;
}

.ob-summary-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 70px;

  &.is-active::after {
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    content: '';
    background: #3f7fe8;
    border-radius: 999px;
  }
}

.ob-summary-label {
  font-size: 12px;
  font-weight: 500;
  color: rgb(0 0 0 / 45%);
}

.ob-summary-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;

  &.is-default {
    color: #344054;
  }

  &.is-pending {
    color: #fa8c16;
  }

  &.is-making {
    color: #3f7fe8;
  }

  &.is-delivering {
    color: #22b55f;
  }

  &.is-muted {
    color: var(--ob-muted);
  }
}

.ob-board {
  display: flex;
  flex: 1;
  gap: 14px;
  min-height: 0;
  padding: 14px 12px 10px;
  overflow-x: auto;
  background: var(--ob-board-bg);
  border: 1px solid var(--ob-border);
  border-radius: 12px;
}

.ob-board::-webkit-scrollbar {
  height: 6px;
}

.ob-board::-webkit-scrollbar-thumb {
  background: #d3d7df;
  border-radius: 3px;
}

.ob-column {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 290px;
  overflow: hidden;
  background: #f2f4f7;
  border: 1px solid #e7e9ee;
  border-radius: 12px;
}

.ob-col-hd {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 12px 12px 8px;
  font-size: 36px;
  font-weight: 700;
  color: #111827;

  &.making,
  &.delivering {
    &::before {
      display: inline-block;
      width: 3px;
      height: 24px;
      margin-right: 4px;
      content: '';
      border-radius: 999px;
    }
  }

  &.making::before {
    background: #3f7fe8;
  }

  &.delivering::before {
    background: #22b55f;
  }

  &.done {
    color: var(--ob-muted);
  }
}

.ob-col-count {
  margin-left: 4px;
  font-weight: 800;
  line-height: 1;
}

.ob-col-count.is-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 20px;
  color: #fff;
  background: #ff7a14;
  border-radius: 999px;
}

.ob-col-count.is-making {
  font-size: 40px;
  color: #3f7fe8;
}

.ob-col-count.is-delivering {
  font-size: 33px;
  color: #22b55f;
}

.ob-col-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 0 8px 10px;
  overflow-y: auto;

  .ant-spin-nested-loading {
    height: 100%;
  }

  .ant-spin-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
  }
}

.ob-col-body::-webkit-scrollbar {
  width: 4px;
}

.ob-col-body::-webkit-scrollbar-thumb {
  background: #d2d8e2;
  border-radius: 2px;
}

.ob-column__empty {
  padding: 34px 0;
  font-size: 13px;
  color: rgb(0 0 0 / 35%);
  text-align: center;
}

.ob-column__placeholder {
  height: 100%;
  background: transparent;
  border: 2px dashed #d6dae2;
  border-radius: 16px;
}

@media (max-width: 1400px) {
  .ob-stats {
    flex-direction: column;
    align-items: stretch;
  }

  .ob-stats-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .ob-column {
    min-width: 260px;
  }
}

@media (max-width: 1024px) {
  .ob-page {
    height: auto;
    min-height: calc(100vh - 90px);
  }

  .ob-summary-value {
    font-size: 28px;
  }

  .ob-col-hd {
    font-size: 30px;
  }

  .ob-col-count.is-making {
    font-size: 34px;
  }

  .ob-col-count.is-delivering {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .ob-stats {
    gap: 10px;
    padding: 10px 12px;
  }

  .ob-stats-main {
    gap: 20px;
  }

  .ob-summary-item {
    min-width: 62px;
  }

  .ob-summary-value {
    font-size: 22px;
  }

  .ob-board {
    padding: 10px;
  }

  .ob-column {
    min-width: 236px;
  }

  .ob-col-hd {
    min-height: 40px;
    font-size: 24px;
  }

  .ob-col-count.is-pending {
    min-width: 22px;
    height: 22px;
    font-size: 14px;
  }

  .ob-col-count.is-making {
    font-size: 27px;
  }

  .ob-col-count.is-delivering {
    font-size: 23px;
  }
}
