/* ERP 首页 — iOS-inspired minimal */
.view-erp-home {
  max-width: none;
  padding: 0;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.view-erp-home.active {
  display: flex !important;
  flex-direction: column;
}

.erp-loading-overlay {
  position: fixed;
  inset: 0;
  background: #f5f5f7;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.erp-loading-overlay.hidden {
  display: none;
}

.erp-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.erp-spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid rgba(0, 122, 255, 0.15);
  border-top-color: #007aff;
  border-radius: 50%;
  animation: erp-spin 0.85s linear infinite;
  margin-bottom: 14px;
}

@keyframes erp-spin {
  to { transform: rotate(360deg); }
}

.erp-loading-text {
  font-size: 16px;
  color: #1c1c1e;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.erp-loading-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #8e8e93;
}

.erp-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-top: var(--sat, env(safe-area-inset-top, 0px));
  padding-bottom: calc(56px + var(--sab, env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
}

.erp-main-content.hidden {
  display: none;
}

/* 顶部问候 */
.erp-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 12px 16px 10px;
  padding: 22px 20px;
  min-height: 112px;
  background: #fff;
  border-radius: 20px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  flex-shrink: 0;
}

.erp-avatar-btn {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(145deg, #5e9cff 0%, #007aff 100%);
}

.erp-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.erp-avatar-letter {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.erp-hero-body {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
}

.erp-hero-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.erp-hero-date {
  font-size: 13px;
  color: #8e8e93;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.erp-hero-role-badge {
  font-size: 11px;
  font-weight: 600;
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.erp-hero-greeting-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.erp-hero-greeting {
  font-size: 15px;
  font-weight: 500;
  color: #636366;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.erp-hero-name {
  font-size: 22px;
  font-weight: 700;
  color: #1c1c1e;
  line-height: 1.35;
  letter-spacing: -0.03em;
  word-break: break-all;
}

.erp-hero-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: stretch;
  padding: 4px 0;
}

.erp-icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #f2f2f7;
  color: #007aff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.erp-icon-btn svg {
  width: 22px;
  height: 22px;
}

.erp-icon-btn:active {
  opacity: 0.65;
}

.erp-notify-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.erp-notify-badge[hidden] {
  display: none;
}

.erp-guest-tip {
  margin: 0 16px 8px;
  padding: 12px 14px;
  background: #fff9ed;
  color: #b45309;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  border: 0.5px solid rgba(180, 83, 9, 0.12);
}

.erp-register-notify {
  margin: 0 16px 12px;
}

.erp-register-notify.hidden {
  display: none;
}

.erp-register-notify-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff9500 0%, #ff6b00 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 149, 0, 0.28);
  text-align: left;
}

.erp-register-notify-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.erp-register-notify-text {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.erp-register-notify-arrow {
  font-size: 18px;
  opacity: 0.9;
  flex-shrink: 0;
}

.erp-reimburse-notify .erp-register-notify-btn {
  background: linear-gradient(145deg, #c17f3a 0%, #a66a2e 100%);
  box-shadow: 0 4px 14px rgba(193, 127, 58, 0.28);
}

.erp-menu-item {
  position: relative;
}

.erp-menu-badge {
  display: inline-block;
  margin-left: 4px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

.erp-tab-panel {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  /* 给日历下方备注留出可滚到底的空间 */
  padding-bottom: 24px;
}

.erp-tab-panel.hidden {
  display: none;
}

/* 区块标题 */
.erp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.erp-section-head.mine-head {
  padding-top: 8px;
}

#erpMineSectionTitle {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.erp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #8e8e93;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.erp-text-btn {
  border: none;
  background: transparent;
  color: #007aff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}

.erp-text-btn:active {
  opacity: 0.6;
}

/* 通知 */
.erp-notify-section {
  margin: 0 16px 4px;
}

.erp-notify-section.hidden {
  display: none;
}

.erp-notify-list {
  background: #fff;
  border-radius: 14px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.erp-notify-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: none;
  background: #fff;
  cursor: pointer;
  text-align: left;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.erp-notify-item:last-child {
  border-bottom: none;
}

.erp-notify-item:active {
  background: #f9f9fb;
}

.erp-notify-item.unread {
  background: rgba(0, 122, 255, 0.06);
}

.erp-notify-dot {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.erp-notify-dot.new_clue {
  background: linear-gradient(145deg, #34c759, #30b350);
}

.erp-notify-dot.inspection_accepted {
  background: #fff4e5;
  color: #ff9500;
}

.erp-notify-dot.inspection_started {
  background: linear-gradient(145deg, #007aff, #0066d6);
}

.erp-notify-dot.inspection_completed {
  background: rgba(52, 199, 89, 0.14);
  color: #248a3d;
}

.erp-notify-dot.inspection_rejected {
  background: #fff4e5;
  color: #ff9500;
}

.erp-notify-dot.inspection_reject_request {
  background: #fff4e5;
  color: #c93400;
}

.erp-notify-dot.new_inspection_order {
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
}

.erp-notify-dot.inspection_reassigned_away {
  background: rgba(255, 149, 0, 0.14);
  color: #ff9500;
}

.erp-notify-empty {
  padding: 28px 16px;
  text-align: center;
  color: #aeaeb2;
  font-size: 14px;
}

.erp-notify-dot.registration_pending {
  background: linear-gradient(145deg, #ff9500, #e68600);
}

.erp-notify-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.erp-notify-title {
  font-size: 15px;
  font-weight: 600;
  color: #1c1c1e;
  letter-spacing: -0.02em;
}

.erp-notify-desc {
  font-size: 13px;
  color: #636366;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-notify-time {
  flex-shrink: 0;
  font-size: 11px;
  color: #aeaeb2;
  margin-top: 2px;
}

/* 销售仪表盘 */
.erp-sales-dashboard {
  padding-bottom: 8px;
}

.erp-sales-dashboard.hidden {
  display: none;
}

#erpSalesPerfSummary.hidden {
  display: none !important;
}

/* 业绩概览：整卡三列，只读数据 */
.erp-metrics-panel {
  display: flex;
  align-items: stretch;
  margin: 0 16px;
  background: #fff;
  border-radius: 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.erp-metric-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 8px 22px;
  min-height: 96px;
}

.erp-metric-divider {
  width: 0.5px;
  background: rgba(0, 0, 0, 0.08);
  margin: 18px 0;
  flex-shrink: 0;
}

.erp-metric-num {
  font-size: 34px;
  font-weight: 700;
  color: #1c1c1e;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.erp-metric-label {
  margin-top: 10px;
  font-size: 13px;
  color: #636366;
  font-weight: 500;
  text-align: center;
}

.erp-cycle-caption {
  text-align: center;
  font-size: 11px;
  color: #aeaeb2;
  padding: 4px 16px 12px;
}

.erp-cycle-caption.hidden {
  display: none;
}

.erp-perf-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 16px 12px;
}

.erp-perf-hero-cell {
  background: #fff;
  border-radius: 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 108px;
  box-sizing: border-box;
}

.erp-perf-hero-cell.primary {
  justify-content: center;
}

.erp-perf-hero-cell.salary {
  border: none;
  background: linear-gradient(145deg, #007aff 0%, #0051d5 100%);
  color: #fff;
  cursor: default;
}

.erp-perf-hero-cell.salary.salary-revealed {
  cursor: pointer;
}

.erp-perf-hero-num {
  font-size: 36px;
  font-weight: 700;
  color: #1c1c1e;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.erp-perf-hero-label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1c1c1e;
}

.erp-perf-hero-hint {
  margin-top: 6px;
  font-size: 10px;
  color: #aeaeb2;
  line-height: 1.3;
}

.erp-perf-hero-cell.salary .erp-perf-hero-hint,
.erp-perf-hero-cell.salary .erp-salary-label {
  color: rgba(255, 255, 255, 0.82);
}

.erp-salary-label {
  font-size: 12px;
  font-weight: 600;
}

.erp-salary-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 36px;
}

.erp-salary-symbol {
  font-size: 16px;
  font-weight: 700;
}

.erp-salary-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.erp-salary-arrow {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.85;
}

.erp-salary-eye {
  border: none;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 0;
  margin-left: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.erp-salary-eye:active {
  opacity: 0.82;
  transform: scale(0.96);
}

.erp-salary-eye.revealed {
  background: rgba(255, 255, 255, 0.38);
}

.erp-salary-num.masked {
  letter-spacing: 0.12em;
}

.erp-salary-formula {
  font-size: 11px;
  color: #636366;
  margin-bottom: 8px;
  line-height: 1.4;
}

.erp-salary-formula.estimated {
  color: #ff9500;
}

.erp-salary-detail {
  margin: 0 16px 12px;
  background: #fff;
  border-radius: 14px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.erp-salary-detail.hidden {
  display: none;
}

.erp-salary-section {
  padding: 12px 14px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.erp-salary-section:last-child {
  border-bottom: none;
}

.erp-salary-section.base {
  background: #f9f9fb;
}

.erp-salary-section.sourcing {
  background: #fffaf5;
}

.erp-salary-section.inspection {
  background: #f5fff8;
}

.erp-salary-section.commission-detail {
  background: #f7fbff;
}

.erp-salary-fold-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0 6px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.erp-salary-fold-btn .erp-salary-tag {
  margin-bottom: 0;
}

.erp-salary-fold-label {
  font-size: 12px;
  font-weight: 600;
  color: #007aff;
  flex-shrink: 0;
}

.erp-salary-row-item.section-head {
  font-weight: 700;
  color: #1c1c1e;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 0.5px dashed rgba(0, 0, 0, 0.06);
}

.erp-salary-row-item.section-head:first-of-type,
.erp-salary-tag + .erp-salary-row-item.section-head {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}

.erp-salary-row-item.sub.muted {
  color: #aeaeb2;
}

.erp-salary-row-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
}

.erp-salary-row-item.sub {
  padding-left: 10px;
  font-size: 12px;
  color: #636366;
}

.erp-salary-row-item.work-points {
  font-weight: 600;
  color: #007aff;
}

.erp-salary-row-item.work-points.reached {
  color: #34c759;
}

.erp-salary-row-item.reward {
  color: #ff9500;
  font-weight: 600;
}

.erp-salary-row-item.total {
  font-weight: 700;
  padding-top: 8px;
  border-top: 0.5px dashed rgba(0, 0, 0, 0.08);
  margin-top: 4px;
}

.erp-salary-tag {
  font-size: 11px;
  font-weight: 700;
  color: #8e8e93;
  margin-bottom: 6px;
}

.erp-salary-empty {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: #aeaeb2;
}

.erp-salary-scheme-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0 12px;
  margin-bottom: 4px;
  border: none;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #007AFF;
  text-align: left;
}

.erp-salary-scheme-link.standalone {
  margin: 0 16px 12px;
  padding: 14px 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.erp-mine-salary-section {
  margin-bottom: 4px;
}

.erp-mine-salary-section.hidden {
  display: none;
}

.erp-mine-salary-head {
  padding-top: 0;
}

.erp-mine-salary-card {
  margin: 0 16px;
  width: calc(100% - 32px);
  box-sizing: border-box;
}

.erp-mine-salary-section .erp-salary-detail {
  margin-top: 0;
}

.erp-inspector-scheme-wrap.hidden {
  display: none;
}

.erp-salary-scheme-arrow {
  font-size: 16px;
  color: #C7C7CC;
  font-weight: 400;
}

/* 线索跟进：独立区块，可点击 */
.erp-pipeline-head {
  padding-top: 18px;
}

.erp-pipeline-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 4px;
}

.erp-pipeline-row.erp-sales-metric-row {
  grid-template-columns: repeat(2, 1fr);
}

.erp-pipeline-row.erp-sales-metric-row .erp-pipeline-card.on {
  background: #e8f1ff;
  box-shadow: inset 0 0 0 1.5px #007aff;
}

.erp-pipeline-row.erp-sales-metric-row .erp-pipeline-label {
  font-size: 12px;
  text-align: center;
  line-height: 1.25;
}

.erp-sales-metric-detail {
  padding: 0 16px 12px;
}

.erp-sales-metric-detail.hidden {
  display: none !important;
}

.erp-sales-metric-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.erp-sales-metric-empty {
  padding: 20px 12px;
  text-align: center;
  color: #8e8e93;
  font-size: 13px;
  background: #fff;
  border-radius: 14px;
}

.erp-sales-metric-card {
  width: 100%;
  border: none;
  text-align: left;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.erp-sales-metric-card:active {
  background: #f2f2f7;
}

.erp-sales-metric-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
}

.erp-sales-metric-status {
  color: #007aff;
  font-weight: 600;
}

.erp-sales-metric-type {
  padding: 1px 6px;
  border-radius: 6px;
  background: #f2f2f7;
  color: #636366;
}

.erp-sales-metric-type.sourcing { background: #fff3e0; color: #ff9500; }
.erp-sales-metric-type.inspection { background: #e8f8ee; color: #34c759; }
.erp-sales-metric-type.consulting { background: #eee8ff; color: #5856d6; }

.erp-sales-metric-time {
  margin-left: auto;
  color: #8e8e93;
}

.erp-sales-metric-name {
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1e;
  margin-bottom: 4px;
}

.erp-sales-metric-line {
  font-size: 12px;
  color: #636366;
  margin-top: 2px;
}

.erp-sales-metric-foot {
  margin-top: 8px;
  font-size: 12px;
  color: #007aff;
  font-weight: 600;
}

.erp-pipeline-card {
  border: none;
  background: #fff;
  border-radius: 14px;
  padding: 18px 10px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease, transform 0.1s ease;
}

.erp-pipeline-card:active {
  background: #f2f2f7;
  transform: scale(0.98);
}

.erp-pipeline-num {
  font-size: 28px;
  font-weight: 700;
  color: #007aff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.erp-pipeline-label {
  margin-top: 8px;
  font-size: 13px;
  color: #1c1c1e;
  font-weight: 600;
}

/* 工作台菜单 */
.erp-menu-section.hidden {
  display: none;
}

.erp-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
  box-sizing: border-box;
}

.erp-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 8px;
  border: none;
  border-radius: 14px;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  cursor: pointer;
  min-height: 64px;
}

.erp-menu-item:active {
  background: #f2f2f7;
}

.erp-menu-text {
  font-size: 14px;
  color: #1c1c1e;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.erp-menu-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #aeaeb2;
  font-size: 14px;
  padding: 24px 16px;
}

.erp-menu-coming {
  font-size: 16px;
  color: #8e8e93;
  padding: 36px 16px;
  letter-spacing: 0.02em;
}

/* 我的 */
.erp-mine-grid {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.erp-mine-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: #fff;
  border-radius: 14px;
  padding: 15px 16px;
  cursor: pointer;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  text-align: left;
}

.erp-mine-item:active {
  background: #f2f2f7;
}

.erp-mine-version {
  margin: 8px 16px 28px;
  padding: 12px 8px 4px;
  text-align: center;
  font-size: 12px;
  color: #8e8e93;
  letter-spacing: 0.02em;
}

.erp-mine-icon {
  font-size: 18px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.erp-mine-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #1c1c1e;
  letter-spacing: -0.02em;
}

.erp-mine-arrow {
  color: #c7c7cc;
  font-size: 16px;
  font-weight: 300;
}

/* 底部 Tab */
.erp-bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  padding-bottom: var(--sab, env(safe-area-inset-bottom, 0px));
  z-index: 15;
}

.erp-tab-indicator {
  display: none;
}

.erp-bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 0 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #8e8e93;
  transition: color 0.15s ease;
}

.erp-bottom-tab.active {
  color: #007aff;
}

.erp-tab-svg {
  display: block;
}

.erp-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* 验车师首页：任务工作台嵌入 */
.erp-main-content.inspector-home .erp-hero-card {
  margin-bottom: 8px;
  min-height: 96px;
  padding: 16px 18px;
}

.erp-main-content.inspector-home .erp-avatar-btn {
  width: 56px;
  height: 56px;
}

.erp-main-content.inspector-home .erp-hero-name {
  font-size: 20px;
}

.erp-inspector-workbench {
  margin-bottom: 8px;
}

.erp-inspector-workbench.hidden {
  display: none;
}

.erp-inspector-month-stats {
  margin-bottom: 8px;
}

.erp-inspector-month-stats .erp-pipeline-card.on {
  background: #e8f1ff;
  box-shadow: inset 0 0 0 1.5px #007aff;
}

.erp-inspector-month-stats .erp-pipeline-label {
  font-size: 12px;
  text-align: center;
  line-height: 1.25;
}

.erp-workbench-sticky {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f5f5f7;
  padding-bottom: 4px;
}

.erp-workbench-head {
  padding-bottom: 4px;
}

.erp-inspector-workbench .ih-tab-bar {
  margin: 0 16px 8px;
}

.erp-workbench-filter {
  margin: 0 16px 8px;
}

.erp-workbench-list {
  padding: 0 16px 16px;
}

.ih-schedule-section {
  margin: 8px 16px 28px;
  padding: 12px 12px 16px;
  background: #fff;
  border-radius: 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  /* 覆盖通用 .erp-schedule-section 的左右 padding，避免双层缩进 */
  box-sizing: border-box;
}

.erp-inspector-workbench .ih-schedule-section.erp-schedule-section {
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 16px;
}

.ih-schedule-section .erp-schedule-grid {
  min-height: 280px;
}

.ih-schedule-section .erp-schedule-day-detail {
  min-height: 52px;
}

/* 验车师首页底部留出底栏高度，避免内容被裁切 */
.erp-main-content.inspector-home #erpPanelHome {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.ih-schedule-section .erp-schedule-event {
  width: 100%;
  border: none;
  text-align: left;
  cursor: pointer;
}

.ih-schedule-section .erp-schedule-event-meta {
  margin-left: auto;
  font-size: 11px;
  color: #8e8e93;
}

.ih-schedule-section .erp-schedule-event.pure .erp-schedule-event-tag,
.ih-schedule-section .erp-schedule-event.inspection .erp-schedule-event-tag {
  background: #34c759;
}

.erp-inspector-workbench .ih-tab {
  font-size: 12px;
  padding: 9px 4px;
}

/* 淘车师：本月转化率 */
.erp-sales-conversion {
  margin: 0 16px 12px;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.erp-conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.erp-sales-conversion.collapsed .erp-conv-head {
  margin-bottom: 0;
}

.erp-conv-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.erp-conv-sub { font-size: 12px; color: #8e8e93; }

.erp-conv-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.erp-conv-toggle::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #8e8e93;
  transition: transform 0.2s ease;
}

.erp-sales-conversion.collapsed .erp-conv-toggle::before {
  transform: rotate(180deg);
}

.erp-conv-body { display: block; }

.erp-sales-conversion.collapsed .erp-conv-body {
  display: none;
}

.erp-conv-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.erp-conv-main-num {
  font-size: 32px;
  font-weight: 800;
  color: #007aff;
  line-height: 1;
}

.erp-conv-main-label {
  display: block;
  font-size: 12px;
  color: #636366;
  margin-top: 4px;
}

.erp-conv-base { font-size: 13px; color: #636366; }

.erp-conv-rows { display: flex; flex-direction: column; gap: 8px; }

.erp-conv-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #1c1c1e;
}

.erp-conv-name { display: flex; align-items: center; gap: 6px; }

.erp-conv-name .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.erp-conv-name .dot.sourcing { background: #ff9500; }
.erp-conv-name .dot.inspection { background: #34c759; }
.erp-conv-name .dot.consulting { background: #5856d6; }

.erp-conv-val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 时间安排日历 */
.erp-menu-section.sales-schedule-mode .erp-menu-grid.hidden { display: none; }

.erp-schedule-section.hidden,
.erp-menu-grid.hidden,
.erp-sales-conversion.hidden {
  display: none !important;
}

.erp-schedule-section { padding: 0 16px 28px; }

.erp-schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.erp-schedule-month { font-size: 16px; font-weight: 700; }

.erp-schedule-legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #636366;
  margin-bottom: 10px;
}

.erp-schedule-legend span { display: flex; align-items: center; gap: 4px; }

.erp-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.erp-cal-weekday {
  text-align: center;
  font-size: 11px;
  color: #8e8e93;
  padding: 4px 0;
}

.erp-cal-cell {
  border: none;
  background: #f9f9fb;
  border-radius: 10px;
  min-height: 44px;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.erp-cal-cell.empty { background: transparent; cursor: default; }

.erp-cal-cell.today { box-shadow: inset 0 0 0 1.5px #007aff; }

.erp-cal-cell.selected { background: #e8f2ff; }

.erp-cal-day { font-size: 13px; font-weight: 600; color: #1c1c1e; }

.erp-cal-dots { display: flex; gap: 2px; margin-top: 2px; min-height: 6px; }

.erp-cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.erp-cal-dot.inspection { background: #34c759; }
.erp-cal-dot.sourcing { background: #ff9500; }
.erp-cal-dot.custom { background: #8e8e93; }

.erp-schedule-day-detail {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}

.erp-schedule-day-title { font-weight: 700; margin-bottom: 8px; }

.erp-schedule-event {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #f2f2f7;
  border-radius: 10px;
  margin-bottom: 6px;
}

.erp-schedule-event-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #007aff;
  color: #fff;
}

.erp-schedule-event.inspection .erp-schedule-event-tag { background: #34c759; }
.erp-schedule-event.sourcing .erp-schedule-event-tag { background: #ff9500; }

.erp-schedule-mark-box { margin-top: 10px; }
.erp-schedule-mark-box label { font-size: 12px; color: #636366; }
.erp-schedule-mark-box input {
  width: 100%;
  margin: 6px 0 8px;
  padding: 10px;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
}

.erp-schedule-mark-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.erp-schedule-mark-actions .btn { flex: 1; min-width: 80px; }

.erp-schedule-hint, .erp-schedule-empty {
  font-size: 13px;
  color: #8e8e93;
  padding: 8px 0;
}

/* 验车师明日提醒 */
.erp-reminder-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  padding: 20px;
}

.erp-reminder-modal[hidden] { display: none !important; }

.erp-reminder-sheet {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 18px;
  max-height: 80vh;
  overflow-y: auto;
}

.erp-reminder-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.erp-reminder-date { font-size: 13px; color: #8e8e93; margin-bottom: 12px; }

.erp-reminder-item {
  background: #f2f2f7;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.erp-reminder-car { font-weight: 700; margin-bottom: 4px; }
.erp-reminder-meta { font-size: 12px; color: #636366; line-height: 1.5; }

.erp-reminder-ok { width: 100%; margin-top: 12px; }
.finance-calendar-mask { position: fixed; left: 0; right: 0; z-index: 10040; display: flex; align-items: flex-end; overflow: hidden; background: rgba(0,0,0,.48); }
.finance-calendar-sheet { width: 100%; max-height: min(88vh, 100%); overflow: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #f7f7fa; overscroll-behavior: contain; }
body.app-keyboard-open .finance-calendar-sheet { max-height: 100%; padding-bottom: 18px; }
.finance-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 21px; }
.finance-calendar-head button, .finance-calendar-item button { border: 0; background: #eceef3; border-radius: 10px; padding: 8px 12px; }
.finance-calendar-form { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: #fff; }
.finance-calendar-form input, .finance-calendar-form textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #dddfe5; border-radius: 10px; font: inherit; }
.finance-calendar-form textarea { min-height: 70px; resize: vertical; }
.finance-calendar-form [data-add] { border: 0; border-radius: 11px; padding: 12px; background: #1677ff; color: #fff; font-weight: 700; }
.finance-calendar-date-btn { width: 100%; padding: 12px; border: 1px solid #dddfe5; border-radius: 10px; text-align: left; background: #f7f8fb; color: #222; font: inherit; }
.finance-calendar-picker-host.hidden { display: none; }
.finance-picker { padding: 10px; border: 1px solid #e5e7ec; border-radius: 14px; background: #fafbfc; }
.finance-picker-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.finance-picker-month button { width: 36px; height: 32px; border: 0; border-radius: 9px; background: #e9edf5; color: #1677ff; font-size: 22px; }
.finance-picker-week, .finance-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.finance-picker-week { margin-bottom: 4px; color: #8b8e96; font-size: 12px; }
.finance-cal-day { aspect-ratio: 1; border: 0; border-radius: 9px; background: transparent; color: #222; }
.finance-cal-day.on { background: #1677ff; color: #fff; font-weight: 700; }
.finance-picker-time { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; align-items: center; gap: 8px; margin-top: 10px; }
.finance-picker-time select { padding: 10px; border: 1px solid #dfe2e8; border-radius: 10px; background: #fff; color: #222; font: inherit; }
.finance-calendar-item.due { border-left: 4px solid #ff9500; }
.finance-calendar-list { display: grid; gap: 10px; margin-top: 12px; }
.finance-calendar-item { display: flex; justify-content: space-between; gap: 10px; padding: 13px; border-radius: 14px; background: #fff; }
.finance-calendar-item small, .finance-calendar-item p { display: block; margin: 4px 0 0; color: #777; }
.finance-calendar-item button { align-self: center; color: #e33; }
.finance-calendar-empty { padding: 24px; text-align: center; color: #999; }
