/* 农业客户 360 经营中心 — 工作台抽屉内布局 */
#drawerContent.wb-classic-drawer {
  max-width: min(920px, 96vw);
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#drawerContent.wb-cust-360-drawer {
  max-width: min(1280px, 96vw);
  width: min(1280px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.mobile-customer-detail {
  box-sizing: border-box;
}
.wb-cust-360 {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  font-size: 13px;
}
.wb-cust-360 .drawer-title {
  flex-shrink: 0;
  margin: 0;
  padding: 16px 16px 10px;
  border-bottom: 1px solid #e8efe8;
}
.wb-c360-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}
.wb-c360-aside {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid #e8efe8;
  background: linear-gradient(180deg, #f7fbf8 0%, #f0f7f2 100%);
  padding: 12px 12px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.wb-c360-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wb-c360-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #e8efe8;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  flex-shrink: 0;
  background: #fafdfb;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 8;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.wb-c360-tabs::-webkit-scrollbar {
  display: none;
  height: 0;
}
.wb-c360-tab {
  border: 1px solid #d4e8d8;
  background: #fff;
  color: #3d5a45;
  padding: 10px 14px;
  min-height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  scroll-snap-align: start;
  box-sizing: border-box;
  align-items: center;
  display: inline-flex;
}
.wb-c360-tab.active {
  background: linear-gradient(135deg, #14532d, #1f7a4a);
  color: #fff;
  border-color: transparent;
}
.wb-c360-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px));
}
.wb-c360-more-subtabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 10px;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.wb-c360-more-subtabs::-webkit-scrollbar {
  display: none;
  height: 0;
}
.wb-c360-more-subtab {
  border: 1px solid #d4e8d8;
  background: #f6faf7;
  color: #3d5a45;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.wb-c360-more-subtab.active {
  background: #e8f5ec;
  border-color: #1f7a4a;
  color: #14532d;
}
.wb-c360-mobile-topbar {
  display: none;
  flex-shrink: 0;
  padding: 10px 12px 8px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid #e8efe8;
  background: #fafdfb;
}
.wb-c360-mobile-toprow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.wb-c360-mobile-title b {
  font-size: 17px;
  color: #1a4d2e;
  display: block;
  word-break: break-word;
}
.wb-c360-mobile-type {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #666;
  background: #eef5f0;
  padding: 2px 8px;
  border-radius: 8px;
}
.wb-c360-mobile-close {
  flex-shrink: 0;
}
.wb-c360-mobile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wb-c360-mobile-actions .btn {
  flex: 1 1 calc(33% - 6px);
  min-width: 0;
  justify-content: center;
}
.wb-c360-panel {
  display: none;
  animation: wbC360Fade 0.2s ease;
}
.wb-c360-panel.active {
  display: block;
}
@keyframes wbC360Fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.wb-c360-aside h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
  color: #1a4d2e;
  line-height: 1.35;
  word-break: break-word;
}
.wb-c360-aside .wb-c360-meta {
  font-size: 12px;
  color: #5a6b5f;
  line-height: 1.55;
  margin-bottom: 10px;
}
.wb-c360-kpi-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0;
}
.wb-c360-kpi-mini b {
  display: block;
  font-size: 14px;
  color: #14532d;
}
.wb-c360-kpi-mini span {
  font-size: 10px;
  color: #888;
}
.wb-c360-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.wb-c360-actions .btn:first-child {
  grid-column: 1 / -1;
}
.wb-c360-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 8px 6px;
  font-size: 12px;
}
.wb-c360-scorebar {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d4e8d8;
  font-size: 12px;
}
.wb-c360-scorebar .n {
  font-size: 22px;
  font-weight: 900;
  color: #c9962a;
}
.wb-c360-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.wb-c360-card {
  background: #f9fbf9;
  border: 1px solid #e0ebe3;
  border-radius: 10px;
  padding: 10px;
}
.wb-c360-card b {
  display: block;
  font-size: 15px;
  color: #1a4d2e;
}
.wb-c360-card span {
  font-size: 11px;
  color: #888;
}
.wb-c360-timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}
.wb-c360-tl-item {
  border-left: 3px solid #2d6e47;
  padding: 10px 12px 10px 14px;
  margin-bottom: 8px;
  background: #fafdfb;
  border-radius: 0 10px 10px 0;
  border: 1px solid #edf3ef;
  border-left-width: 3px;
  font-size: 12px;
  box-sizing: border-box;
  width: 100%;
}
.wb-c360-tl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.wb-c360-tl-title {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  color: #1a4d2e;
  line-height: 1.45;
  word-break: break-word;
}
.wb-c360-tl-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  align-items: center;
}
.wb-c360-tl-summary {
  margin-top: 6px;
  color: #555;
  line-height: 1.55;
  word-break: break-word;
}
.wb-c360-tl-item .t {
  font-weight: 800;
  color: #1a4d2e;
}
.wb-c360-tl-item .d {
  color: #888;
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.5;
  word-break: break-word;
}
.wb-c360-mobile-bar {
  display: none;
}
@media (max-width: 900px) {
  #drawerContent.wb-cust-360-drawer {
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }
  .wb-cust-360 {
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }
  .wb-cust-drawer.wb-cust-360 {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .wb-cust-360 > .drawer-title {
    display: none;
  }
  .wb-c360-mobile-topbar {
    display: block;
  }
  .wb-c360-layout {
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
  }
  .wb-cust-360 .drawer-title {
    flex-direction: column;
    align-items: stretch;
  }
  .wb-cust-360 .drawer-title-toolbar {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    padding: 0 12px 8px;
    box-sizing: border-box;
  }
  .wb-cust-360 .drawer-title-toolbar .btn-sm,
  .wb-cust-360 .drawer-title-toolbar summary.btn-sm {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    justify-content: center;
  }
  .wb-c360-aside {
    display: none;
  }
  .wb-c360-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .wb-c360-tabs {
    padding: 10px 12px;
    margin: 0;
  }
  .wb-c360-panels {
    padding: 12px 12px 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .wb-c360-panels .report-grid {
    grid-template-columns: 1fr !important;
  }
  .wb-c360-mobile-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e8efe8;
    background: #fff;
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
  }
  .wb-c360-mobile-bar::-webkit-scrollbar {
    display: none;
  }
  .wb-c360-mobile-bar .btn {
    flex: 0 0 auto;
    min-width: 64px;
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
  }
  .wb-c360-timeline-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .wb-c360-timeline-filters .fi {
    width: 100%;
    max-width: none !important;
  }
  .wb-c360-tl-head {
    flex-direction: column;
    align-items: stretch;
  }
  .wb-c360-tl-actions {
    justify-content: flex-end;
    margin-top: 6px;
  }
  .wb-c360-tab.active {
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(20, 83, 45, 0.25);
  }
}

.wb-cost-chip {
  display: inline-block;
  margin: 0 8px 6px 0;
  padding: 4px 10px;
  background: #f0f7f2;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e0ebe3;
}
.wb-cost-table-wrap {
  -webkit-overflow-scrolling: touch;
}

.wb-archive-preview {
  padding: 4px 2px 16px;
  color: #233328;
}
.wb-archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce8e0;
  background: #f7fbf8;
  border-radius: 8px;
  margin-bottom: 12px;
}
.wb-archive-head b {
  display: block;
  color: #14532d;
  font-size: 18px;
  line-height: 1.35;
}
.wb-archive-head span {
  display: block;
  margin-top: 4px;
  color: #607066;
  font-size: 12px;
}
.wb-archive-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.wb-archive-kpi {
  min-width: 0;
  border: 1px solid #e2ece5;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
}
.wb-archive-kpi b {
  display: block;
  color: #14532d;
  font-size: 16px;
  line-height: 1.3;
  word-break: break-word;
}
.wb-archive-kpi span {
  display: block;
  margin-top: 4px;
  color: #7a8e82;
  font-size: 11px;
}
.wb-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e8efe8;
  background: #fafdfb;
  border-radius: 8px;
  margin-bottom: 12px;
}
.wb-archive-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.wb-archive-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid #e8efe8;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.wb-archive-section b {
  color: #2f4f3b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-archive-section span {
  color: #7a8e82;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .wb-archive-kpis,
  .wb-archive-sections {
    grid-template-columns: 1fr;
  }
  .wb-archive-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}

/* 提货记录面板 */
.wb-pickup-panel { margin-top: 4px; }
.wb-pickup-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f3f8ff 0%, #f6fbf8 100%);
  border: 1px solid #cfe8d4;
  border-radius: 12px;
}
.wb-pickup-sync-hint { flex: 1; font-size: 11px; color: #666; min-width: 160px; }
.wb-pickup-kpi-cards { margin-bottom: 14px; }
.wb-pickup-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--green, #1a4d2e);
  margin: 0 0 8px;
}
.wb-pickup-tbl { font-size: 12px; }
.wb-pickup-empty {
  text-align: center;
  padding: 28px 16px;
  background: #fafdfb;
  border: 1px dashed #cfe8d4;
  border-radius: 12px;
}

/* 评分计算原理 */
.wb-c360-score-detail {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #f8fbf9;
  border: 1px solid #d4e8d8;
  border-radius: 12px;
}
.wb-c360-score-detail summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--green, #1a4d2e);
  font-size: 13px;
  margin-bottom: 8px;
}
.wb-score-factors { font-size: 12px; }
.wb-c360-card-level {
  background: linear-gradient(135deg, #e8f5ec 0%, #fff 100%);
  border: 1px solid #a5d6a7;
}

/* 经典详情 — 仅基础信息 + 提货记录 */
.wb-classic-detail {
  max-width: min(920px, 96vw);
}
.wb-classic-detail .wb-classic-layout {
  display: block;
  min-height: 0;
}
.wb-classic-detail .wb-classic-main {
  min-height: 420px;
}
.wb-classic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px !important;
  background: linear-gradient(135deg, #f4faf6 0%, #fff 70%);
  border-bottom: 1px solid #dce8e0;
}
.wb-classic-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.wb-classic-icon {
  font-size: 28px;
  line-height: 1;
}
.wb-classic-name {
  display: block;
  font-size: 18px;
  color: var(--green, #1a4d2e);
}
.wb-classic-sub {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.wb-classic-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wb-classic-tabs {
  padding: 10px 14px;
  background: #fafdfb;
}
.wb-classic-tabs .wb-c360-tab {
  min-width: 120px;
  justify-content: center;
  font-size: 15px;
}
.wb-classic-panels {
  padding: 14px 16px 20px;
}
.wb-classic-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.wb-classic-kpi {
  background: #fff;
  border: 1px solid #dce8e0;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.wb-classic-kpi b {
  display: block;
  font-size: 18px;
  color: var(--green, #1a4d2e);
  line-height: 1.2;
}
.wb-classic-kpi span {
  display: block;
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}
.wb-classic-kpi.warn b { color: #c62828; }
.wb-classic-kpi.ok b { color: #2e7d32; }
.wb-classic-section {
  background: #fff;
  border: 1px solid #e8f0ec;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.wb-classic-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green, #1a4d2e);
}
.wb-classic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.wb-classic-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f4f1;
  font-size: 13px;
}
.wb-classic-row:last-child { border-bottom: none; }
.wb-classic-label {
  color: #888;
  flex-shrink: 0;
}
.wb-classic-value {
  color: #222;
  text-align: right;
  word-break: break-word;
}
.wb-classic-notes {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #444;
  white-space: pre-wrap;
}
.cah-classic-page .cah-detail-tabs button {
  font-size: 14px;
  padding: 9px 18px;
  font-weight: 600;
}
.cah-classic-body .wb-classic-kpi-strip {
  margin-top: 4px;
}
.wb-classic-quickbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: #fafdfb;
  border-bottom: 1px solid #e8efe8;
}
.wb-classic-score-badge {
  color: var(--green, #1a4d2e);
  font-weight: 700;
}
.wb-classic-detail.wb-classic-full {
  max-width: none;
}
@media (max-width: 720px) {
  .wb-c360-cards.wb-classic-kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
  .wb-classic-grid { grid-template-columns: 1fr; }
  .wb-classic-head { flex-wrap: wrap; }
  .wb-classic-head-actions { width: 100%; justify-content: flex-end; }
}
