/* CRM detail polish: scoped to business pages and CRM confirmation dialogs. */
body:not(.login-mode) .crm-empty-state { min-height: 210px; padding: 28px 20px; }
body:not(.login-mode) .crm-empty-state > div { max-width: 420px; gap: 12px; line-height: 1.7; }
body:not(.login-mode) .crm-empty-state button { margin-top: 6px; min-height: 44px; padding: 10px 18px; }
body:not(.login-mode) .crm-table-wrap { overscroll-behavior: contain; scroll-padding: 48px 220px 12px 12px; }
body:not(.login-mode) .crm-order-table td[data-label="创建时间"] { font-size: 12px !important; color: #64748b !important; }
body:not(.login-mode) .crm-table-actions button:focus-visible { position: relative; z-index: 4; }
body:not(.login-mode) .crm-order-rejection { font-size: 12px; line-height: 1.7; max-width: 260px; margin-top: 8px; }
#enterpriseView .enterprise-list-panel .panel-title small { display: block; margin-top: 6px; line-height: 1.6; color: #64748b; }
body:not(.login-mode) :is(#enterpriseBatchModal,#enterpriseLeadImportModal,#enterpriseBatchHistoryModal) .modal-panel { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
body:not(.login-mode) :is(#enterpriseBatchModal,#enterpriseLeadImportModal) textarea { line-height: 1.8; font-size: 14px; }
body:not(.login-mode) :is(#enterpriseBatchModal,#enterpriseLeadImportModal) .actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e7eaf0; padding-top: 14px; padding-bottom: 8px; }
body:not(.login-mode) #enterpriseView .enterprise-layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
body:not(.login-mode) #enterpriseView .enterprise-form { padding: 22px; border: 1px solid #e1e7ef; border-radius: 14px; background: #fff; }
#enterpriseView .enterprise-form .fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; }
#enterpriseView .enterprise-form label { min-width: 0; font-size: 13px; line-height: 1.6; }
#enterpriseView .enterprise-form input, #enterpriseView .enterprise-form select { width: 100%; min-height: 42px; }
#enterpriseView .enterprise-form .wide { grid-column: 1/-1; }
#enterpriseView .enterprise-list-panel { min-width: 0; }
#enterpriseView .enterprise-list-panel > .panel-title { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
#enterpriseView .enterprise-list-panel > .panel-title input { min-width: 180px; flex: 1; min-height: 42px; }
body:not(.login-mode) #enterpriseView .enterprise-card { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; padding: 22px; border: 1px solid #e1e7ef; border-radius: 14px; box-shadow: none; background: #fff; }
#enterpriseView .enterprise-rows { display: grid; gap: 16px; }
#enterpriseView .enterprise-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
#enterpriseView .enterprise-card-head strong { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
#enterpriseView .enterprise-card-head .lead-stage { flex-shrink: 0; }
#enterpriseView .enterprise-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 18px 0; padding: 16px; background: #f7f9fc; border-radius: 10px; }
#enterpriseView .enterprise-metrics span { display: grid; align-content: start; gap: 8px; min-width: 0; }
#enterpriseView .enterprise-metrics small { color: #64748b; font-size: 12px; }
#enterpriseView .enterprise-metrics b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.6; }
#enterpriseView .enterprise-contact { font-size: 13px; color: #566478; }
#enterpriseView .enterprise-card .lead-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid #e7eaf0; }
#enterpriseView .lead-actions button { min-height: 42px; border-radius: 8px; }
#enterpriseView .lead-actions button::before { display: none; }
body:not(.login-mode) #enterpriseView [data-enterprise-batch] { background: #2765e8 !important; color: #fff !important; }
#enterpriseView [data-enterprise-delete] { margin-left: auto; }
body:not(.login-mode) #studentsView .entitlement-review-note { font-size: 13px; line-height: 1.65; padding: 8px 10px; background: #fff4f2; border-radius: 8px; max-width: 260px; }
#studentsView .student-pagination { gap: 12px; flex-wrap: wrap; }
#studentsView .student-toolbar :is(input,select,button) { min-height: 44px; }
@media (max-width: 1100px) {
  body:not(.login-mode) #enterpriseView .enterprise-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
  #enterpriseView .enterprise-metrics { grid-template-columns: minmax(0,1fr); }
  #enterpriseView .enterprise-metrics span { grid-template-columns: 90px minmax(0,1fr); align-items: baseline; }
  #enterpriseView .lead-actions button { flex: 1 1 40%; min-height: 44px; }
  #enterpriseView .enterprise-form .fields { grid-template-columns: minmax(0,1fr); }
  #studentRows td[colspan]::before { content: none !important; }
}
body:not(.login-mode) .crm-p0-card { min-height: 0 !important; }
body:not(.login-mode) .crm-table-wrap { min-height: 0 !important; max-height: 65vh; overflow: auto !important; scrollbar-width: auto; }
body:not(.login-mode) .crm-table { table-layout: auto !important; }
body:not(.login-mode) .crm-table td:is([data-label="客户"],[data-label="负责人"]) { min-width: 130px; max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
body:not(.login-mode) .crm-table td[data-label="创建时间"] { min-width: 170px; max-width: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
body:not(.login-mode) .crm-order-table { min-width: 1320px; }
body:not(.login-mode) .crm-table th:last-child { background: #f7f9fc !important; }
body:not(.login-mode) .crm-table td:last-child:not([colspan]) { border-left: 1px solid #e7eaf0; }
body:not(.login-mode) .crm-detail-body { background: #f7f9fc; }
body:not(.login-mode) .crm-detail-section { padding: 20px; background: #fff; border: 1px solid #e7eaf0; border-radius: 12px; margin-bottom: 16px; }
body:not(.login-mode) .crm-overview-grid { gap: 20px 24px; }
body:not(.login-mode) .crm-drawer-head { background: #fff; }
body:not(.login-mode) .crm-detail-actions { background: #f7f9fc; gap: 10px; }
body:not(.login-mode) .crm-detail-actions button { min-height: 40px; }
@media (max-width: 620px) {
  body:not(.login-mode) .crm-table-wrap { max-height: none; overflow: visible !important; }
  body:not(.login-mode) .crm-order-table { min-width: 0; }
  body:not(.login-mode) .crm-table td:is([data-label="客户"],[data-label="负责人"],[data-label="创建时间"]) { min-width: 0; max-width: none; white-space: normal; }
  body:not(.login-mode) .crm-table td:last-child:not([colspan]) { border-left: 0; }
  body:not(.login-mode) .crm-detail-body { padding: 16px 12px 36px; }
}
body:not(.login-mode) main.crm-p0-page > header.crm-p0-header h1 {
  font-size: clamp(26px, 2.2vw, 34px) !important;
  line-height: 1.3;
  letter-spacing: -.025em;
}
body:not(.login-mode) .crm-p0-header p { font-size: 14px; line-height: 1.7; max-width: 64em; }
body:not(.login-mode) .crm-p0-header .page-eyebrow { color: #64748b; font-size: 12px; font-weight: 500; }
body:not(.login-mode) .crm-p0-header-actions button { min-height: 42px; padding: 10px 16px; font-size: 14px; }
body:not(.login-mode) .crm-filterbar { gap: 12px; padding: 18px 20px !important; background: #fff; }
body:not(.login-mode) .crm-filterbar :is(input,select) { min-height: 44px; font-size: 14px; border-color: #d5dce6; border-radius: 10px; }
body:not(.login-mode) .crm-search span { top: 50%; transform: translateY(-50%); pointer-events: none; }
body:not(.login-mode) .crm-table th { font-size: 13px; font-weight: 600; color: #566478; background: #f7f9fc; }
body:not(.login-mode) .crm-table td { font-size: 14px; line-height: 1.6; padding-top: 17px; padding-bottom: 17px; }
body:not(.login-mode) .crm-table td small { font-size: 12px; color: #64748b; }
body:not(.login-mode) .crm-table tbody tr:hover td { background: #f3f7fd; }
body:not(.login-mode) .crm-table-actions { align-items: center; gap: 8px; }
body:not(.login-mode) .crm-table-actions button { min-height: 36px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; }
body:not(.login-mode) .crm-table-actions button:hover { background: #eaf1ff; }
body:not(.login-mode) .crm-table-actions button.danger { color: #b42318 !important; background: #fff2f0 !important; }
body:not(.login-mode) .crm-table-actions button.danger:hover { background: #ffe4df !important; }
body:not(.login-mode) .crm-badge { border-radius: 6px; padding: 4px 9px; line-height: 1.4; font-size: 12px; font-weight: 500; white-space: nowrap; }
body:not(.login-mode) .crm-pagination { min-height: 64px; border-top: 1px solid #e7eaf0; font-size: 13px; }
body:not(.login-mode) .crm-pagination button { min-height: 36px; min-width: 68px; border-radius: 8px; font-size: 13px; }
body:not(.login-mode) .crm-pagination button:disabled { color: #8290a3; background: #f5f7fa; cursor: default; }
body:not(.login-mode) :is(.crm-p0-page,.crm-detail-drawer,#crmLeadLibraryDeleteModal) :is(button,input,select,textarea):focus-visible {
  outline: 3px solid #92b8ff !important; outline-offset: 3px;
}
body:not(.login-mode) #crmLeadLibraryDeleteModal .modal-panel { width: min(480px, calc(100vw - 32px)); border-radius: 16px; padding: 24px; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: 0 24px 80px #17203326; }
#crmLeadLibraryDeleteModal .modal-header { align-items: flex-start; gap: 16px; margin-bottom: 22px; }
#crmLeadLibraryDeleteTitle { display: block; font-size: 20px; line-height: 1.4; color: #172033; }
#crmLeadLibraryDeleteSubject { display: block; margin-top: 10px; font-size: 13px; line-height: 1.8; color: #64748b; }
#crmLeadLibraryDeletePassword { min-height: 46px; border-radius: 9px; }
#crmLeadLibraryDeleteNotice:not(:empty) { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #fff2f0; font-size: 13px; line-height: 1.7; }
#crmLeadLibraryDeleteModal .actions { display: flex; justify-content: flex-end; margin-top: 22px; }
body:not(.login-mode) #crmLeadLibraryDeleteSubmit { background: #b42318 !important; border: 1px solid #b42318 !important; color: white !important; min-height: 44px; border-radius: 9px; padding: 10px 18px; }
body:not(.login-mode) #crmLeadLibraryDeleteSubmit:disabled { opacity: .6; cursor: wait; }
@media (min-width: 621px) {
  body:not(.login-mode) .crm-order-table :is(th:nth-child(4),th:nth-child(5),td:nth-child(4),td:nth-child(5)) { text-align: right; font-variant-numeric: tabular-nums; }
  body:not(.login-mode) .crm-order-table td:first-child b { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
}
@media (max-width: 620px) {
  body:not(.login-mode) .crm-table-actions button { min-height: 44px; }
  body:not(.login-mode) .crm-pagination { flex-wrap: wrap; gap: 10px; padding: 14px; }
  body:not(.login-mode) .crm-pagination button { min-height: 44px; }
  body:not(.login-mode) #crmLeadLibraryDeleteModal .modal-panel { padding: 20px; }
  #crmLeadLibraryDeleteSubmit { width: 100%; }
}
