/* CRM 模块配色统一 — build:20260705 */
:root {
  --crm-brand: #e8334a;
  --crm-brand-dark: #c62828;
  --crm-accent: #409eff;
  --crm-text: #303133;
  --crm-text-secondary: #606266;
  --crm-border: #ebebf2;
  --crm-bg: #f5f7fa;
  --crm-card: #ffffff;
}

.app-wrapper {
  background: var(--crm-bg) !important;
}

.app-wrapper .nav-container,
.app-wrapper .nav-container .inner-nav,
.navbar-inner {
  background: var(--crm-card) !important;
  border-bottom: 1px solid var(--crm-border) !important;
}

.el-aside,
.sidebar-aside,
.inner-sidebar {
  background: var(--crm-card) !important;
  border-right: 1px solid var(--crm-border) !important;
}

.el-menu-item.is-active,
.el-menu-item.is-active i {
  color: var(--crm-brand) !important;
}

.el-menu-item.is-active {
  background: rgba(232, 51, 74, 0.06) !important;
}

.el-submenu.is-active > .el-submenu__title,
.el-submenu.is-active > .el-submenu__title i {
  color: var(--crm-brand) !important;
}

.main-container .el-card,
.main-container .box-card,
.home-card,
.dashboard-card {
  border-color: var(--crm-border) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

.main-container .el-button--primary {
  background-color: var(--crm-brand) !important;
  border-color: var(--crm-brand) !important;
}

.main-container .el-button--primary:hover,
.main-container .el-button--primary:focus {
  background-color: var(--crm-brand-dark) !important;
  border-color: var(--crm-brand-dark) !important;
}

#crm-header-force {
  background: var(--crm-card) !important;
  border-bottom: 1px solid var(--crm-border) !important;
}

#crm-header-force .crm-force-user-btn {
  color: var(--crm-text) !important;
}

#crm-header-force .crm-force-lang-btn {
  color: var(--crm-text-secondary) !important;
}

#crm-header-force .crm-force-logout {
  color: var(--crm-accent) !important;
}

html.crm-verify-page .app-wrapper .nav-container,
html.crm-verify-page #crm-header-force {
  display: none !important;
}

html.crm-verify-page #app {
  visibility: visible !important;
  opacity: 1 !important;
}

html.crm-verify-page .el-step__content,
html.crm-verify-page .el-form,
html.crm-verify-page .el-button {
  pointer-events: auto !important;
}

.navbar-inner .user-col .uername .el-dropdown-link {
  color: var(--crm-text) !important;
}

.navbar-inner .user-col .lang .el-dropdown-link {
  color: var(--crm-text-secondary) !important;
}

/* 认证审核中 overlay build:20260708 */
.crm-audit-pending {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.crm-audit-pending-inner {
  max-width: 420px;
  text-align: center;
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  background: #fff;
  border: 1px solid var(--crm-border);
}
.crm-audit-pending-inner h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  color: var(--crm-text);
}
.crm-audit-pending-inner p {
  margin: 0 0 20px;
  color: var(--crm-text-secondary);
  line-height: 1.6;
  font-size: 14px;
}
.crm-audit-icon { font-size: 48px; }
.crm-audit-home {
  min-width: 140px;
  height: 40px;
  border: none;
  border-radius: 4px;
  background: var(--crm-brand);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
html.crm-audit-active .el-step {
  pointer-events: none;
  opacity: 0.4;
}

.crm-geo-select {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  flex: 0 0 110px !important;
  box-sizing: border-box !important;
}
.crm-geo-region-box {
  width: 360px !important;
  max-width: 360px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
}
.crm-geo-region-box .crm-geo-native-hidden,
.min .crm-geo-native-hidden {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ===== 开户认证上传预览（原生 .max / .m-update 布局） ===== */
.crm-verify-upload-max {
  position: relative !important;
  width: 360px !important;
  height: 220px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}
.crm-verify-upload-max img.crm-upload-preview-img,
.crm-verify-upload-max > img {
  width: 360px !important;
  height: 220px !important;
  max-width: 360px !important;
  max-height: 220px !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  object-fit: contain !important;
  display: block !important;
  background: #fff !important;
  z-index: 2 !important;
  margin: 0 !important;
  cursor: zoom-in !important;
}
.crm-verify-upload-max img[src*="object Object"],
.crm-verify-upload-max img[src*="object%20Object"],
html.crm-verify-route .el-upload img[src*="object Object"],
html.crm-verify-route .el-upload img[src*="object%20Object"],
html.crm-verify-route .m-update img[src*="object Object"],
html.crm-verify-route .m-update img[src*="object%20Object"] {
  display: none !important;
  visibility: hidden !important;
}
.crm-verify-upload-max .m-update {
  width: 360px !important;
  height: 220px !important;
  position: relative !important;
  z-index: 1 !important;
  overflow: hidden !important;
}
.m-update.crm-has-preview {
  background: #f5f5f5 !important;
}
.m-update.crm-has-preview > div:not(.el-upload):not(.el-upload-list) {
  display: none !important;
}
.m-update.crm-has-preview .el-upload {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 220px !important;
  margin: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 3 !important;
  display: block !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}
html.crm-verify-route .content .max,
html.crm-verify-route .max {
  width: 360px !important;
}
html.crm-verify-route .m-update:not(.crm-has-preview) {
  width: 360px !important;
  height: 220px !important;
  background: #eee !important;
  border-radius: 4px !important;
  position: relative !important;
  text-align: center !important;
}
html.crm-verify-route .m-update:not(.crm-has-preview) .el-upload {
  width: 40px !important;
  height: 40px !important;
  min-height: 0 !important;
  margin: 60px auto 0 !important;
  background: #47669a !important;
  border-radius: 50% !important;
  opacity: 1 !important;
  position: static !important;
  display: inline-block !important;
  line-height: 40px !important;
}
html.crm-verify-route .max .el-upload,
html.crm-verify-route .m-update .el-upload {
  pointer-events: auto !important;
  cursor: pointer !important;
}
html.crm-verify-route .content > .el-form > div:nth-child(2):has(.max),
html.crm-verify-route .Identity_certificate .content > .el-form > div:nth-child(2):has(.max) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 20px 40px !important;
  margin-bottom: 8px !important;
}
html.crm-verify-route .Identity_certificate .content .el-form-item:has(.max),
html.crm-verify-route .content .el-form-item:has(.max) {
  overflow: visible !important;
  margin-bottom: 16px !important;
}

/* Step1 基本资料 — 恢复原生三列 flex 布局 */
html.crm-verify-route .Basic_information .content > .el-form {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  padding-right: 52px !important;
  padding-left: 10px !important;
}
html.crm-verify-route .Basic_information .content .el-form-item {
  padding: 10px 0 !important;
  width: auto !important;
  flex: 0 0 auto !important;
}
html.crm-verify-route .Basic_information .myColor .el-input__inner,
html.crm-verify-route .Basic_information .max {
  width: 360px !important;
}
html.crm-verify-route .Basic_information .min,
html.crm-verify-route .Basic_information .crm-geo-region-box {
  width: 360px !important;
  max-width: 360px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 0 !important;
}
html.crm-verify-route .Basic_information .min .crm-geo-select,
html.crm-verify-route .Basic_information .crm-geo-region-box .crm-geo-select {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  flex: 0 0 110px !important;
}
html.crm-verify-route .Basic_information .danger-btn {
  margin: 30px 0 0 100px !important;
  clear: both !important;
  width: 100% !important;
  flex: 0 0 100% !important;
}

/* 底部按钮始终可点击（仅开户认证页） */
html.crm-verify-route .Identity_certificate .footer,
html.crm-verify-route .content .footer {
  position: relative !important;
  z-index: 20 !important;
  clear: both !important;
  margin-top: 24px !important;
  pointer-events: auto !important;
}
html.crm-verify-route .Identity_certificate .footer button,
html.crm-verify-route .content .footer button {
  position: relative !important;
  z-index: 21 !important;
  pointer-events: auto !important;
}

/* Step3 隐私条款勾选（原生 footer-text 缺失时由 crm-verify-submit 注入） */
html.crm-verify-route .crm-privacy-agree-row,
html.crm-verify-route .footer-text.crm-privacy-agree-row {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding: 16px 0 8px 105px !important;
  margin-top: 8px !important;
  clear: both !important;
  position: relative !important;
  z-index: 19 !important;
}
html.crm-verify-route .crm-privacy-label {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  color: #666 !important;
  line-height: 1.6 !important;
}
html.crm-verify-route .crm-privacy-label input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 6px 0 0 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}
html.crm-verify-route .crm-privacy-link {
  color: #47669a !important;
  text-decoration: none !important;
}
html.crm-verify-route .crm-privacy-link:hover {
  color: #409eff !important;
  text-decoration: underline !important;
}
html.crm-verify-route .crm-privacy-agree-row.crm-privacy-highlight {
  outline: 2px solid #e6a23c !important;
  outline-offset: 4px !important;
  border-radius: 4px !important;
  background: #fff8e6 !important;
}
html.crm-verify-route .Information_confirmation .footer-text,
html.crm-verify-route .footer-text {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.crm-upload-preview-img,
.crm-upload-zoomable {
  cursor: zoom-in !important;
}

.m-update.crm-has-preview .el-upload [class*=" el-icon-"],
.m-update.crm-has-preview .el-upload [class^="el-icon-"] {
  display: none !important;
}

/* 非 avatar-uploader 备用上传框 */
.avatar-uploader .el-upload,
.el-upload--picture-card {
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crm-upload-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
}
.crm-upload-lightbox.is-open {
  display: flex;
}
.crm-upload-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.crm-upload-lightbox-body {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 92vh;
  padding: 12px;
}
.crm-upload-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 48px);
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.crm-upload-lightbox-close {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
body.crm-lightbox-open {
  overflow: hidden;
}

.crm-submit-confirm {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100001;
  align-items: center;
  justify-content: center;
}
.crm-submit-confirm.is-open {
  display: flex;
}
.crm-submit-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.crm-submit-confirm-box {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 8px;
  padding: 24px 24px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.crm-submit-confirm-box h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #303133;
}
.crm-submit-confirm-box p {
  margin: 0 0 20px;
  color: #606266;
  line-height: 1.6;
}
.crm-submit-confirm-btns {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.crm-submit-confirm-btns button {
  min-width: 88px;
  height: 36px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #dcdfe6;
}
.crm-btn-cancel {
  background: #fff;
  color: #606266;
}
.crm-btn-confirm {
  background: #e63939;
  border-color: #e63939 !important;
  color: #fff;
}
body.crm-submit-confirm-open {
  overflow: hidden;
}
