:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --line: #dde4ea;
  --border: var(--line);
  --line-strong: #c6d1db;
  --text: #16212b;
  --muted: #64717d;
  --blue: #2563eb;
  --primary: var(--blue);
  --blue-soft: #eaf1ff;
  --green: #0f8f72;
  --green-soft: #e5f7f0;
  --amber: #b7791f;
  --amber-soft: #fff4d6;
  --red: #c2413b;
  --red-soft: #fde8e7;
  --violet: #6d5bd0;
  --shadow: 0 14px 42px rgba(18, 31, 44, 0.12);
  --radius: 8px;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

/* v666: scoped AI refinements follow the confirmed knowledge/review images. */
#aiReviewView .ai-review-shell { gap: 8px; }
#aiReviewView .ai-review-navigation { margin-bottom: 0; }
#aiReviewView .ai-review-navigation .ai-review-tabs { margin: 0; gap: 8px; }
#aiReviewView .ai-review-navigation .backend-register-tab { height: 36px; min-height: 36px; padding: 6px 14px; font-size: 16px; line-height: 20px; }
#aiReviewView .ai-review-utilities .backend-register-tab { padding-inline: 10px; font-size: 14px; }
#aiReviewView .ai-knowledge-workspace { gap: 8px; }
#aiReviewView .ai-knowledge-section-header { padding: 6px 8px; }
#aiReviewView .ai-knowledge-section-tab { height: 36px; min-height: 36px; padding: 6px 10px; font-size: 16px; line-height: 20px; }
#aiReviewView .ai-knowledge-section-manage { height: 36px; min-height: 36px; padding-block: 6px; }
#aiReviewView .ai-knowledge-workspace .ai-knowledge-list-toolbar { padding: 10px 12px; gap: 12px; }
#aiReviewView .ai-knowledge-list-toolbar > label { gap: 4px; }
#aiReviewView .ai-knowledge-list-toolbar > label > span { font-size: 14px; line-height: 18px; }
#aiReviewView .ai-knowledge-list-toolbar input,
#aiReviewView .ai-knowledge-list-toolbar select,
#aiReviewView .ai-knowledge-list-toolbar > button { height: 40px; min-height: 40px; font-size: 16px; line-height: 20px; }
#aiReviewView .ai-knowledge-list-table th { padding: 8px 14px; font-size: 14px; line-height: 18px; }
#aiReviewView .ai-knowledge-list-table td { padding: 6px 14px; font-size: 16px; line-height: 20px; }
#aiReviewView .ai-knowledge-list-table td > small { font-size: 13px; line-height: 20px; }
#aiReviewView .ai-knowledge-list-table .ai-knowledge-row-content { gap: 2px; min-height: 0; }
#aiReviewView .ai-knowledge-row-content :is(strong,span) { font-size: 16px; line-height: 20px; }
#aiReviewView .ai-knowledge-list-footer { min-height: 42px; padding: 5px 14px; }
#aiReviewView .ai-knowledge-list-footer :is(.lead-list-page-number,.lead-list-page-arrow) { height: 30px; min-height: 30px; }
#aiReviewView .ai-knowledge-list-footer .lead-list-page-size-control select { height: 30px; min-height: 30px; padding-block: 4px; }
#aiReviewView .ai-review-department-tabs { gap: 28px; margin-bottom: 8px; }
#aiReviewView .ai-review-department-tabs button { height: 36px; min-height: 36px; padding: 6px 16px; font-size: 16px; line-height: 20px; }
#aiReviewView .ai-review-department-workbench .ai-review-queue { padding: 10px; }
#aiReviewView .ai-review-department-workbench .ai-review-queue-item { gap: 2px; padding: 11px 12px; font-size: 14px; line-height: 1.45; }
#aiReviewView .ai-review-department-workbench .ai-review-queue-title strong { font-size: 16px; }
#aiReviewView .ai-review-department-workbench .ai-suggestion-toolbar { margin-bottom: 8px; }
#aiReviewView .ai-review-department-workbench .ai-review-queue-search { margin-bottom: 8px; }
#aiReviewView .ai-review-department-workbench .ai-review-queue-search input { height: 36px; }
#aiReviewView .ai-review-queue-pagination { min-height: 36px; padding-top: 6px; margin-top: 4px; }
#aiReviewView .ai-review-department-workbench .ai-review-object-head { margin-bottom: 8px; }
#aiReviewView .ai-review-department-workbench .ai-review-recording-strip { padding: 6px 10px; margin-bottom: 6px; }
#aiReviewView .ai-review-department-workbench .ai-review-source-disclosure { margin-top: 0; }
#aiReviewView .ai-review-department-workbench .ai-review-source-disclosure > summary { padding: 3px 8px; font-size: 11px; line-height: 16px; }
#aiReviewView .ai-review-department-workbench .ai-review-item-list { margin-top: 0; }
#aiReviewView .ai-review-department-workbench .ai-item-review { position: relative; padding: 10px 0 18px; }
#aiReviewView .ai-review-department-workbench .ai-item-choices button { height: 30px; min-height: 30px; padding: 4px 9px; line-height: 20px; }
#aiReviewView .ai-review-department-workbench .ai-case-point-compact { margin-top: 6px; font-size: 14px; line-height: 20px; }
#aiReviewView .ai-case-point-compact dl { gap: 3px; }
#aiReviewView .ai-case-point-compact dl > .ai-case-reply { padding: 4px 8px; }
#aiReviewView .ai-case-point-compact .ai-case-point-evidence { margin-top: 0; font-size: 11px; line-height: 16px; }
#aiReviewView .ai-case-point-evidence:not([open]) { height: 0; }
#aiReviewView .ai-case-point-evidence:not([open]) > summary { position: absolute; right: 0; bottom: 1px; font-size: 10px; line-height: 14px; }
#aiReviewView .ai-case-point-evidence[open] { margin-top: 6px; }
#aiReviewView .ai-review-department-workbench .ai-retained-list h4 { margin: 0 0 8px; font-size: 16px; line-height: 22px; }
#aiReviewView .ai-retained-full { margin-top: 8px; font-size: 11px; line-height: 16px; color: var(--muted); }
#aiReviewView .ai-retained-full summary { cursor: pointer; }
#aiReviewView .ai-review-department-workbench .ai-retained-full p { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--text); }
#aiReviewView .ai-review-department-workbench .ai-retained-list .ai-retained-date { display: block; margin-top: 8px; padding: 0; font-size: 11px; background: transparent; color: var(--muted); }
@media (min-width: 1281px) {
  #aiReviewView .ai-review-department-workbench.ai-review-workbench { grid-template-columns: minmax(250px, 24%) minmax(430px, 1fr) minmax(290px, 26%); }
  #aiReviewView .ai-review-department-workbench > :is(.ai-review-queue,.ai-review-editor,.ai-review-preview) { height: calc(100dvh - 260px); min-height: 560px; }
}
.ai-knowledge-workspace .ai-knowledge-list-toolbar { display: grid; grid-template-columns: minmax(220px, 2.1fr) minmax(150px, 1fr) minmax(300px, 1.85fr) auto auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.ai-knowledge-list-toolbar > label { display: grid; gap: 6px; min-width: 0; }
.ai-knowledge-list-toolbar > label > span { font-size: 12px; color: var(--muted); }
.ai-knowledge-list-toolbar input, .ai-knowledge-list-toolbar select { width: 100%; min-width: 0; height: 36px; }
.ai-knowledge-list-toolbar .ai-knowledge-created-filter > div { display: flex; gap: 8px; align-items: center; }
.ai-knowledge-created-filter > div > span { color: var(--muted); font-size: 12px; }
.ai-knowledge-list-toolbar > button { white-space: nowrap; height: 36px; min-width: 128px; }
.ai-knowledge-workspace .ai-knowledge-list-results { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
.ai-knowledge-list-table-wrap { overflow-x: auto; }
.ai-knowledge-list-table { width: 100%; table-layout: fixed; border-collapse: collapse; min-width: 720px; }
.ai-knowledge-list-table th { background: #f8fafc; color: #475569; font-size: 13px; font-weight: 500; text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.ai-knowledge-list-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; vertical-align: middle; }
.ai-knowledge-list-table tr:last-child td { border-bottom: 0; }
.ai-knowledge-list-table :is(th,td):first-child { text-align: center; padding-inline: 10px; }
.ai-knowledge-list-table input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; padding: 0; accent-color: var(--blue); vertical-align: middle; }
.ai-knowledge-list-table td > small { display: block; font-size: 12px; color: var(--muted); }
.ai-knowledge-list-table .ai-knowledge-row-content { display: grid; gap: 4px; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: left; color: var(--text); cursor: pointer; }
.ai-knowledge-row-content strong { font-size: 15px; line-height: 1.5; font-weight: 600; }
.ai-knowledge-row-content span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #536276; font-size: 13px; line-height: 1.5; }
.ai-knowledge-list-table tbody tr:hover { background: #fafcff; }
.ai-knowledge-list-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); gap: 12px; }
.ai-knowledge-list-footer > span { color: var(--muted); font-size: 12px; }
.ai-knowledge-list-footer .compact-pagination { margin: 0; }
.ai-knowledge-reading, .ai-learning-detail { display: grid; gap: 14px; }
.ai-knowledge-reading-meta, .ai-learning-detail header > span { font-size: 12px; color: var(--muted); margin: 0; }
.ai-knowledge-reading-body, .ai-learning-approved-content { line-height: 1.85; overflow-wrap: anywhere; }
.ai-knowledge-reading-manage, .ai-learning-detail footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.ai-knowledge-reading-manage label { display: flex; gap: 8px; align-items: center; }
.ai-knowledge-export-form { display: grid; gap: 14px; }
.ai-knowledge-export-form > label { display: flex; align-items: center; gap: 8px; }
.ai-knowledge-export-form input[type="radio"] { width: 16px; height: 16px; min-height: 16px; }
.ai-knowledge-candidate-compact .ai-knowledge-flow-toolbar { padding: 10px 18px; }
.ai-knowledge-candidate-compact .ai-knowledge-flow-editor { display: flex; flex-direction: column; }
.ai-knowledge-candidate-compact .ai-knowledge-flow-editor > div:first-of-type { flex: 1; }
.ai-knowledge-candidate-compact #aiKnowledgeCurationPoints { display: flex; flex-direction: column; }
.ai-knowledge-candidate-compact .ai-knowledge-curation-point:last-child { flex: 1; display: flex; flex-direction: column; }
.ai-knowledge-candidate-compact .ai-knowledge-curation-point:last-child .ai-knowledge-input { flex: 1; min-height: 180px; }
.ai-knowledge-candidate-compact .ai-knowledge-edit-full > textarea { height: 100%; min-height: 180px; resize: vertical; }
.ai-boss-simple .ai-knowledge-flow-toolbar { padding: 10px 18px; }
.ai-review-department-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 0 0 12px; }
.ai-review-department-tabs button { display: inline-flex; gap: 7px; align-items: center; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 11px 16px; background: transparent; color: var(--muted); font-size: 15px; }
.ai-review-department-tabs button.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.ai-review-department-tabs span { font-size: 11px; border-radius: 4px; padding: 1px 5px; background: var(--blue-soft); color: var(--blue); }
.ai-review-department-workbench.ai-review-workbench { grid-template-columns: minmax(250px, 23%) minmax(430px, 1fr) minmax(290px, 27%); gap: 10px; }
.ai-review-department-workbench > :is(.ai-review-queue,.ai-review-editor,.ai-review-preview) { height: max(560px, calc(100dvh - 315px)); }
.ai-review-department-workbench .ai-review-queue { padding: 12px 10px; }
.ai-review-queue-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.ai-review-queue-pagination .compact-pagination { margin: 0; }
.ai-review-queue-pagination .lead-list-page-size-control { display: none; }
.ai-review-queue-pagination .lead-list-page-number, .ai-review-queue-pagination .lead-list-page-arrow { min-width: 26px; width: 26px; height: 26px; padding: 0; }
.ai-review-recording-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.ai-review-recording-strip audio { height: 34px; flex: 1; min-width: 220px; }
.ai-review-recording-strip small { color: var(--muted); }
.ai-review-department-workbench .ai-item-review { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
.ai-review-department-workbench .ai-item-review-head { gap: 10px; }
.ai-review-department-workbench .ai-item-review-head h4 { font-size: 16px; white-space: normal; }
.ai-review-department-workbench .ai-item-index { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.ai-review-department-workbench .ai-item-choices { border: 0; gap: 5px; border-radius: 0; }
.ai-review-department-workbench .ai-item-choices button { border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; min-height: 32px; font-size: 12px; }
.ai-review-department-workbench .ai-item-choices button.is-selected { color: white; background: var(--blue); border-color: var(--blue); }
.ai-review-department-workbench .ai-item-choices button.is-selected::before { content: none; }
.ai-review-department-workbench .ai-case-point-compact { margin: 8px 0 0 34px; display: block; font-size: 13px; line-height: 1.65; }
.ai-case-point-compact dl { margin: 0; display: grid; gap: 5px; }
.ai-case-point-compact dl > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
.ai-case-point-compact dt { color: #536276; }
.ai-case-point-compact dd { margin: 0; }
.ai-case-point-compact dl > .ai-case-reply { border: 0; border-radius: 4px; padding: 6px 8px; margin: 0 -8px; background: var(--blue-soft); }
.ai-case-point-compact .ai-case-reply dt { color: var(--blue); font-weight: 600; }
.ai-case-point-compact .ai-case-reply dd { display: flex; gap: 8px; align-items: start; }
.ai-case-point-compact .ai-case-reply p { margin: 0; flex: 1; }
.ai-case-point-compact .ai-case-reply button { font-size: 11px; padding: 0; min-height: 0; opacity: .55; }
.ai-case-point-compact .ai-case-point-evidence { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ai-case-point-evidence summary { cursor: pointer; }
.ai-review-department-workbench .ai-review-item-list { gap: 0; margin-top: 6px; }
.ai-review-department-workbench .ai-review-source-disclosure { margin-top: 8px; }
.ai-review-department-workbench .ai-review-source-disclosure > summary { padding: 7px 10px; font-size: 11px; }
.ai-review-department-workbench .ai-retained-list li { border: 1px solid var(--line); border-radius: 7px; padding: 12px 12px 12px 40px; margin-bottom: 12px; background: #fafcff; }
.ai-review-department-workbench .ai-retained-list li::before { top: 12px; left: 8px; }
.ai-review-department-workbench .ai-retained-list p { font-size: 14px; }
.ai-review-department-workbench .ai-item-review-footer { min-height: 58px; padding: 10px 16px; }
.ai-review-department-workbench .ai-review-footer-actions > small { display: none; }
.ai-learning-entry-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ai-learning-entry-line .ai-learning-entry { font-size: 12px; padding: 5px 9px; min-height: 28px; height: auto; }
.ai-learning-status { display: inline-flex; border-radius: 4px; padding: 3px 6px; font-size: 11px; white-space: nowrap; }
.ai-learning-status.is-pending { color: #a96309; background: var(--amber-soft); }
.ai-learning-status.is-learned, .ai-learning-detail .is-learned { color: var(--green); background: var(--green-soft); }
.ai-learning-detail header h3 { margin: 0 0 6px; font-size: 18px; }
.ai-learning-recordings { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; }
.ai-learning-recordings h4 { margin: 0 0 8px; }
.ai-learning-recordings label { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.ai-learning-recordings audio { width: 100%; height: 36px; }
.ai-learning-case-browser { display: grid; gap: 12px; }
.ai-learning-case-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.ai-learning-case { display: grid; gap: 5px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: white; padding: 12px; }
.ai-learning-case small { color: var(--muted); font-size: 12px; }
@media (max-width: 1280px) {
  .ai-knowledge-workspace .ai-knowledge-list-toolbar { grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) auto; }
  .ai-knowledge-list-toolbar .ai-knowledge-created-filter { grid-row: 2; grid-column: 1 / 3; }
  .ai-review-department-workbench.ai-review-workbench { grid-template-columns: 240px minmax(0, 1fr); }
  .ai-review-department-workbench > .ai-review-queue { height: auto; }
  .ai-review-department-workbench > .ai-review-editor { height: auto; max-height: 760px; }
  .ai-review-department-workbench > .ai-review-preview { height: auto; max-height: 360px; }
}
@media (max-width: 760px) {
  .ai-knowledge-workspace .ai-knowledge-list-toolbar { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ai-knowledge-list-toolbar .ai-knowledge-search, .ai-knowledge-list-toolbar .ai-knowledge-created-filter { grid-column: 1 / -1; grid-row: auto; }
  .ai-knowledge-list-footer { flex-wrap: wrap; }
  .ai-review-department-tabs { gap: 0; }
  .ai-review-department-tabs button { flex: 1; padding: 10px 4px; font-size: 13px; }
  .ai-review-department-workbench > :is(.ai-review-queue,.ai-review-editor,.ai-review-preview) { height: auto; }
  .ai-review-department-workbench > .ai-review-queue { max-height: 400px; }
}

/* AI复盘：记录队列、逐项取舍和最终保留预览。沿用 CRM 色彩与全局导航。 */
.ai-review-shell.is-workbench { padding: 0; background: transparent; border: 0; }
.ai-review-navigation { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ai-review-navigation .ai-review-tabs { margin: 0; border: 0; }
.ai-review-navigation .backend-register-tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 12px 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.ai-review-navigation .backend-register-tab.is-active { border-bottom-color: var(--blue); color: var(--blue); background: transparent; }
.ai-review-navigation .backend-register-tab span { font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); }
.ai-review-utilities { display: flex; gap: 4px; }
.ai-review-utilities .backend-register-tab { font-size: 12px; padding: 10px; }
.ai-review-knowledge-steps { display: flex; gap: 8px; margin: 8px 0 16px; }
.ai-review-workbench { display: grid; grid-template-columns: minmax(220px, .95fr) minmax(430px, 1.95fr) minmax(260px, 1fr); gap: 10px; align-items: stretch; }
.ai-review-workbench > * { min-width: 0; }
.ai-review-queue, .ai-review-editor, .ai-review-preview { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); height: max(610px, calc(100dvh - 270px)); }
.ai-review-queue { display: flex; flex-direction: column; padding: 12px; overflow: hidden; }
.ai-review-queue-tools { flex-shrink: 0; }
.ai-review-queue .ai-suggestion-toolbar { display: flex; width: 100%; gap: 0; padding: 0; margin-bottom: 12px; border: 0; background: transparent; }
.ai-review-queue .ai-suggestion-filter { flex: 1; justify-content: center; gap: 4px; font-size: 12px; padding: 9px 3px; border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; white-space: nowrap; }
.ai-review-queue .ai-suggestion-filter.is-active { border-bottom-color: var(--blue); color: var(--blue); background: transparent; }
.ai-review-queue .ai-suggestion-filter span { min-width: auto; height: auto; font-size: 11px; padding: 0 4px; border-radius: 3px; }
.ai-review-queue-search { display: block; margin-bottom: 12px; }
.ai-review-queue-search input { width: 100%; height: 38px; font-size: 12px; padding: 8px 10px; }
.ai-review-queue-list { overflow-y: auto; flex: 1; min-height: 0; }
.ai-review-queue-item { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; padding: 13px 12px; border: 0; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ai-review-queue-item:hover { background: var(--panel-soft); }
.ai-review-queue-item.is-selected { background: var(--blue-soft); border-left-color: var(--blue); border-bottom-color: transparent; border-radius: 5px; }
.ai-review-queue-title { display: flex; align-items: start; justify-content: space-between; gap: 5px; }
.ai-review-queue-title strong { color: var(--text); font-size: 16px; overflow-wrap: anywhere; }
.ai-review-queue-title > span { color: var(--blue); font-size: 11px; background: #e3edff; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.ai-review-queue-item small { font-size: 11px; }
.ai-review-queue-count { margin-top: 12px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.ai-review-editor { padding: 18px; overflow-y: auto; }
.ai-review-object-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ai-review-object-head h3, .ai-review-preview h3 { margin: 0; font-size: 18px; line-height: 1.5; }
.ai-review-object-head p { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.ai-review-step-actions { display: flex; flex-shrink: 0; gap: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.ai-review-step-actions button { border: 0; border-radius: 0; background: white; padding: 6px 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ai-review-step-actions button + button { border-left: 1px solid var(--line); }
.ai-review-source-notice { margin-bottom: 10px; padding: 10px 12px; border: 1px solid #f4d8a6; border-radius: 6px; background: #fffbf1; color: #a65d0c; font-size: 13px; line-height: 1.6; }
.ai-review-source-notice.is-model { background: var(--blue-soft); color: #2951aa; border-color: #cdddff; }
.ai-review-legacy-notice { margin-bottom: 10px; padding: 10px; background: var(--amber-soft); font-size: 12px; line-height: 1.7; color: var(--amber); }
.ai-review-source-disclosure { border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); font-size: 12px; }
.ai-review-source-disclosure > summary { padding: 12px; cursor: pointer; color: var(--muted); }
.ai-review-source-disclosure > div { padding: 0 12px 12px; line-height: 1.7; overflow-wrap: anywhere; }
.ai-review-section-title { margin: 20px 0 12px; }
.ai-review-section-title h3 { margin: 0 0 6px; font-size: 18px; }
.ai-review-section-title p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.ai-review-item-list { display: grid; gap: 10px; }
.ai-item-review { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.ai-item-review-head { display: flex; align-items: center; gap: 8px; }
.ai-item-index { display: inline-flex; width: 25px; height: 25px; border-radius: 50%; justify-content: center; align-items: center; flex-shrink: 0; background: #f0f3f7; color: var(--muted); font-size: 12px; }
.ai-item-review h4 { font-size: 15px; margin: 0; white-space: nowrap; }
.ai-item-choices { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.ai-item-choices button { padding: 7px 9px; font-size: 13px; border: 0; border-radius: 0; background: white; color: var(--muted); white-space: nowrap; min-height: 34px; }
.ai-item-choices button + button { border-left: 1px solid var(--line); }
.ai-item-choices button.is-selected { color: var(--blue); background: var(--blue-soft); font-weight: 600; }
.ai-item-choices button.is-selected::before { content: "✓ "; }
.ai-item-original { margin: 4px 0 0 33px; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.ai-review-inline-field { display: flex; align-items: start; gap: 8px; margin: 8px 0 0 33px; font-size: 12px; color: var(--muted); }
.ai-review-inline-field > span { flex: 0 0 70px; padding-top: 9px; }
.ai-review-inline-field input, .ai-review-inline-field textarea { min-width: 0; flex: 1; width: 100%; font-size: 14px; line-height: 1.6; padding: 7px 9px; }
.ai-review-inline-field textarea { min-height: 46px; height: 46px; resize: vertical; }
.ai-review-edit-reason > summary { margin: 7px 0 0 33px; color: var(--muted); font-size: 11px; cursor: pointer; }
.ai-review-unhandled { display: block; margin: 6px 0 0 33px; color: var(--muted); font-size: 10px; }
.ai-review-supervisor-fields { margin-top: 18px; }
.ai-review-supervisor-fields label { display: grid; gap: 7px; margin-top: 10px; font-size: 12px; }
.ai-review-supervisor-fields textarea { width: 100%; font-size: 12px; min-height: 65px; padding: 8px; }
.ai-review-supervisor-fields summary { cursor: pointer; margin-top: 12px; color: var(--muted); font-size: 11px; }
.ai-review-preview { padding: 18px; overflow-y: auto; }
.ai-review-preview header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-review-preview .status-pill { display: inline-flex; padding: 5px 8px; border-radius: 6px; background: var(--amber-soft); color: #a96309; font-size: 13px; font-weight: 600; line-height: 1.4; }
.ai-review-preview-counts { margin: 14px 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
.ai-retained-list { list-style: none; counter-reset: retained; padding: 0; margin: 0; }
.ai-retained-list li { position: relative; counter-increment: retained; border-top: 1px solid var(--line); padding: 15px 0 15px 35px; }
.ai-retained-list li::before { content: counter(retained); position: absolute; left: 0; top: 15px; width: 25px; height: 25px; border-radius: 7px; background: #f0f3f7; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.ai-retained-list p { margin: 0 0 7px; line-height: 1.65; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-retained-list small { color: var(--blue); padding: 3px 6px; border-radius: 3px; background: var(--blue-soft); font-size: 10px; }
.ai-review-trace-note, .ai-review-preview-empty { margin-top: 20px; color: var(--muted); line-height: 1.8; font-size: 11px; }
.ai-review-preview-empty { border-top: 1px solid var(--line); padding-top: 15px; }
.ai-item-review-footer { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; }
.ai-review-save-state { font-size: 12px; color: var(--muted); }
.ai-review-footer-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 8px; }
.ai-review-footer-actions > button { min-width: 110px; font-size: 12px; height: 36px; }
.ai-review-footer-actions > small { flex-basis: 100%; text-align: right; color: var(--muted); font-size: 10px; }
.ai-review-more { position: relative; }
.ai-review-more summary { border: 1px solid var(--line); border-radius: 5px; padding: 8px 12px; cursor: pointer; font-size: 12px; }
.ai-review-more > div { position: absolute; z-index: 20; bottom: calc(100% + 8px); right: 0; display: grid; gap: 6px; min-width: 195px; padding: 10px; border: 1px solid var(--line); background: white; border-radius: 6px; box-shadow: var(--shadow); }
.ai-review-no-selection { grid-column: 2 / -1; padding: 40px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.ai-review-workbench :is(button, input, textarea, select, summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ai-review-workbench button:disabled { opacity: .5; cursor: not-allowed; }
.ai-review-workbench .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1280px) {
  .ai-review-workbench { grid-template-columns: 220px minmax(0, 1fr); }
  .ai-review-queue { grid-row: 1 / 3; height: auto; }
  .ai-review-editor { height: auto; max-height: 760px; }
  .ai-review-preview { grid-column: 2; height: auto; max-height: 360px; }
}
@media (max-width: 760px) {
  .ai-review-navigation { flex-wrap: wrap; gap: 0; }
  .ai-review-navigation .backend-register-tab { padding: 10px 8px; font-size: 12px; }
  .ai-review-utilities { width: 100%; justify-content: end; }
  .ai-review-utilities .backend-register-tab { font-size: 11px; }
  .ai-review-workbench { display: flex; flex-direction: column; }
  .ai-review-queue { max-height: 270px; }
  .ai-review-queue-item { min-height: 74px; padding: 10px; }
  .ai-review-queue-count { margin-top: 6px; }
  .ai-review-editor, .ai-review-preview { padding: 14px; max-height: none; height: auto; overflow: visible; }
  .ai-review-object-head { flex-direction: column; }
  .ai-review-step-actions { align-self: end; }
  .ai-review-step-actions button { min-height: 40px; }
  .ai-item-review-head { flex-wrap: wrap; }
  .ai-item-choices { width: 100%; margin: 4px 0 0; }
  .ai-item-choices button { flex: 1; min-height: 44px; font-size: 12px; }
  .ai-item-original, .ai-review-unhandled, .ai-review-inline-field { margin-left: 0; }
  .ai-review-inline-field { display: grid; gap: 4px; }
  .ai-review-inline-field > span { padding: 0; }
  .ai-review-inline-field input { min-height: 44px; }
  .ai-review-workbench input, .ai-review-workbench textarea, .ai-review-workbench select { font-size: 16px; }
  .ai-item-review-footer { position: sticky; bottom: 76px; z-index: 10; flex-direction: column; align-items: stretch; padding: 12px; box-shadow: 0 -4px 18px #16212b0a; }
  .ai-review-footer-actions { justify-content: start; }
  .ai-review-footer-actions > button { min-height: 44px; flex: 1; }
  .ai-review-footer-actions > small { text-align: left; }
  .ai-review-more summary { min-height: 44px; display: flex; align-items: center; }
}

@media (max-width: 760px) {
  .hr-payslip-management {
    grid-template-columns: 1fr;
  }

  .hr-payslip-management > aside {
    max-height: 260px;
  }

  .hr-payslip-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-payslip-summary span:nth-child(2) {
    border-right: 0;
  }

  .hr-payslip-summary span:nth-child(-n + 2) {
    border-bottom: 1px solid #e2e8f2;
  }

  .hr-payslip-columns {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .hr-payslip-sheet > header,
  .hr-payslip-sheet > footer {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hr-payslip-confirm > div {
    display: grid;
  }
}

/* 人事薪资：绩效发布、员工确认与异议终审 */
.hr-release-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #cfdcf1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 72%);
  box-shadow: 0 8px 24px rgba(35, 78, 142, 0.06);
}

.hr-release-panel-head,
.hr-release-actions,
.hr-confirm-banner,
.hr-dispute-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hr-release-panel-head > div,
.hr-confirm-banner > div:first-child {
  display: grid;
  gap: 4px;
}

.hr-release-panel-head span,
.hr-release-metrics span,
.hr-confirm-summary span,
.hr-dispute-evidence span,
.hr-dispute-review-result span {
  color: var(--muted);
  font-size: 12px;
}

.hr-release-panel-head strong {
  font-size: 18px;
}

.hr-release-metrics,
.hr-confirm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.hr-release-metrics.is-three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-release-metrics > div,
.hr-confirm-summary > div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.hr-release-metrics > div:last-child,
.hr-confirm-summary > div:last-child {
  border-right: 0;
}

.hr-release-panel > p,
.hr-release-actions > span,
.hr-confirm-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hr-release-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hr-release-actions.is-button-only {
  justify-content: flex-end;
}

.hr-confirm-banner {
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #cfe0fa;
  border-radius: 14px;
  background: #f6f9ff;
}

.hr-confirm-banner > div:last-child {
  min-width: 140px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.hr-confirm-banner > div:last-child span,
.hr-confirm-banner > div:last-child strong {
  display: block;
}

.hr-confirm-banner > div:last-child strong {
  margin-top: 4px;
  color: var(--blue);
  font-size: 22px;
}

.hr-confirm-layout,
.hr-dispute-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.hr-confirm-main,
.hr-dispute-main {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.hr-confirm-employee-only {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.hr-confirm-main.is-employee-view {
  width: 100%;
  box-sizing: border-box;
}

.hr-confirm-table textarea,
.hr-confirm-table input[type="text"] {
  display: block;
  width: 240px;
  box-sizing: border-box;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #fff;
}

.hr-confirm-table textarea {
  min-height: 56px;
  padding: 8px 10px;
  resize: vertical;
}

.hr-confirm-table input[type="text"] {
  margin-top: 6px;
  padding: 8px 10px;
}

.hr-confirm-table input:disabled,
.hr-confirm-table textarea:disabled {
  background: #f6f8fb;
}

.hr-dispute-existing {
  display: grid;
  gap: 4px;
  min-width: 240px;
}

.hr-dispute-existing small {
  color: var(--muted);
}

.hr-confirm-actions {
  border-color: #c9daf7;
  background: #f8fbff;
}

.hr-dispute-item-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.hr-dispute-card {
  border: 1px solid #d8e1ed;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.hr-dispute-card > header {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}

.hr-dispute-card > header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hr-dispute-card > header b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
}

.hr-dispute-card > header span,
.hr-dispute-card > header small {
  display: block;
}

.hr-dispute-card > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.hr-dispute-evidence,
.hr-dispute-review-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 15px;
}

.hr-dispute-evidence > div,
.hr-dispute-review-result > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f9fc;
}

.hr-dispute-evidence strong,
.hr-dispute-review-result strong,
.hr-dispute-review-result small {
  line-height: 1.55;
}

.hr-dispute-review-editor {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(140px, 0.35fr) minmax(260px, 1fr);
  gap: 12px;
  padding: 14px 15px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.hr-dispute-review-editor.is-final {
  background: #fffaf2;
}

.hr-dispute-review-editor label {
  display: grid;
  gap: 6px;
}

.hr-dispute-review-editor label span {
  color: var(--muted);
  font-size: 12px;
}

.hr-dispute-review-editor select,
.hr-dispute-review-editor input,
.hr-dispute-review-editor textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d4ddea;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.hr-dispute-review-editor textarea {
  min-height: 70px;
  resize: vertical;
}

.hr-dispute-empty {
  margin-top: 14px;
  padding: 40px 20px;
  border: 1px dashed #cfd9e7;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.hr-dispute-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.hr-dispute-flow {
  display: grid;
  gap: 16px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid #cad9ee;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7faff 0%, #fff 72%);
}

.hr-dispute-flow-head,
.hr-dispute-flow-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hr-dispute-flow-head {
  justify-content: space-between;
}

.hr-dispute-flow-head > div {
  align-items: baseline;
}

.hr-dispute-flow-head > div > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-dispute-flow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hr-dispute-flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 8px;
  text-align: center;
}

.hr-dispute-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  right: calc(-50% + 20px);
  left: calc(50% + 20px);
  height: 2px;
  background: #dbe3ed;
}

.hr-dispute-flow-step b {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 2px solid #d5dee9;
  border-radius: 50%;
  color: #8794a5;
  background: #fff;
}

.hr-dispute-flow-step > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  justify-items: center;
}

.hr-dispute-flow-step small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.hr-dispute-flow-step.is-done b,
.hr-dispute-flow-step.is-current b {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.hr-dispute-flow-step.is-done:not(:last-child)::after {
  background: #8aacef;
}

.hr-dispute-flow-step.is-current > span > strong {
  color: var(--blue);
}

.hr-dispute-queue-group + .hr-dispute-queue-group {
  border-top: 1px solid var(--line);
}

.hr-dispute-queue-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  color: #4e5f73;
  background: #f7f9fc;
  font-size: 12px;
}

.hr-dispute-queue-title span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  text-align: center;
}

.hr-dispute-queue-empty {
  margin: 0;
  padding: 10px 12px;
  color: #9aa5b3;
  font-size: 12px;
}

.hr-dispute-card-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hr-dispute-item-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.hr-dispute-item-history > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hr-dispute-item-history b {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  color: #8c98a8;
  background: #e8edf3;
  font-size: 11px;
}

.hr-dispute-item-history .is-complete b {
  color: #fff;
  background: var(--green);
}

.hr-dispute-item-history span,
.hr-dispute-item-history strong,
.hr-dispute-item-history small {
  display: block;
}

.hr-dispute-item-history small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1080px) {
  .hr-confirm-layout,
  .hr-dispute-layout {
    grid-template-columns: 1fr;
  }

  .hr-confirm-layout .hr-employee-queue,
  .hr-dispute-layout .hr-employee-queue {
    max-height: 320px;
  }

  .hr-dispute-review-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-dispute-review-editor .is-wide {
    grid-column: 1 / -1;
  }

  .hr-dispute-flow-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hr-dispute-flow-step:not(:last-child)::after {
    top: 30px;
    bottom: -10px;
    left: 14px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .hr-dispute-flow-step {
    flex-direction: row;
    align-items: flex-start;
    padding: 0;
    text-align: left;
  }

  .hr-dispute-flow-step > span {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .hr-release-panel-head,
  .hr-release-actions,
  .hr-confirm-banner,
  .hr-dispute-card > header {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-release-metrics,
  .hr-confirm-summary,
  .hr-dispute-evidence,
  .hr-dispute-review-result,
  .hr-dispute-review-editor,
  .hr-dispute-item-history {
    grid-template-columns: 1fr;
  }

  .hr-dispute-flow-head,
  .hr-dispute-flow-head > div,
  .hr-dispute-card-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-release-metrics > div,
  .hr-confirm-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.recycle-source-attribution-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbdaf8;
  border-radius: 12px;
  background: #f8fbff;
}

.recycle-source-attribution-title,
.recycle-source-attribution-row-head,
.recycle-source-staff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recycle-source-attribution-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recycle-source-attribution-row {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.recycle-source-attribution-row-head > span,
.recycle-source-staff-profit,
.recycle-source-subtotal,
.recycle-source-grand-total {
  color: var(--muted);
  font-size: 12px;
}

.recycle-source-attribution-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.recycle-source-attribution-fields label,
.recycle-source-staff-row label {
  display: grid;
  gap: 4px;
}

.recycle-source-staff-section,
.recycle-source-staff-list {
  display: grid;
  gap: 7px;
}

.recycle-source-staff-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 108px auto minmax(64px, auto);
  align-items: end;
  gap: 7px;
}

.recycle-source-staff-row .text-button {
  min-height: 36px;
}

.recycle-source-staff-profit {
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

.recycle-source-grand-total {
  margin-top: 8px;
  text-align: right;
}

.recycle-source-readonly-list,
.recycle-source-cell,
.recycle-source-profit-breakdown {
  display: grid;
  gap: 4px;
}

.recycle-source-readonly-list > div,
.recycle-source-cell > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recycle-source-readonly-list small,
.recycle-source-cell span,
.recycle-source-profit-breakdown {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 960px) {
  .recycle-source-attribution-list,
  .recycle-source-attribution-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .recycle-source-staff-row {
    grid-template-columns: minmax(0, 1fr) 96px auto;
  }

  .recycle-source-staff-profit {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.hr-followup-detail-layer {
  position: fixed;
  inset: 0;
  z-index: 1500;
}

.hr-followup-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(16, 24, 40, 0.42);
  cursor: default;
}

.hr-followup-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(1180px, calc(100vw - 64px));
  min-width: 720px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f7f9fc;
  box-shadow: -18px 0 44px rgba(16, 24, 40, 0.2);
}

.hr-followup-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid #dfe5ee;
  background: #fff;
}

.hr-followup-drawer-head > div > span {
  color: #3568e8;
  font-size: 12px;
  font-weight: 700;
}

.hr-followup-drawer-head h3 {
  margin: 5px 0 4px;
  color: #172033;
  font-size: 20px;
}

.hr-followup-drawer-head p {
  margin: 0;
  color: #6c7486;
  font-size: 13px;
}

.hr-followup-drawer-head > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #f1f4f9;
  color: #4d576c;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.hr-followup-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px 12px;
}

.hr-followup-summary > div {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e0e6ef;
  border-radius: 10px;
  background: #fff;
}

.hr-followup-summary > div.is-primary {
  border-color: #b8ccff;
  background: linear-gradient(145deg, #edf3ff, #fff);
}

.hr-followup-summary span,
.hr-followup-summary small {
  display: block;
  overflow: hidden;
  color: #70798c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-followup-summary strong {
  display: block;
  margin: 5px 0 2px;
  color: #1c2638;
  font-size: 20px;
}

.hr-followup-summary .is-primary strong {
  color: #285fd8;
}

.hr-followup-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 22px 14px;
}

.hr-followup-type-tabs {
  display: inline-flex;
  align-self: flex-end;
  padding: 3px;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  background: #fff;
}

.hr-followup-type-tabs button {
  padding: 8px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #657086;
  cursor: pointer;
}

.hr-followup-type-tabs button.is-active {
  background: #386deb;
  color: #fff;
  box-shadow: 0 3px 8px rgba(56, 109, 235, 0.2);
}

.hr-followup-toolbar label {
  min-width: 135px;
  display: grid;
  gap: 5px;
  color: #6b7487;
  font-size: 12px;
}

.hr-followup-toolbar label.hr-followup-search {
  min-width: 240px;
  margin-left: auto;
}

.hr-followup-toolbar select,
.hr-followup-toolbar input {
  height: 38px;
  padding: 0 11px;
  border: 1px solid #d9e0eb;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #283246;
}

.hr-followup-toolbar select:focus,
.hr-followup-toolbar input:focus {
  border-color: #6e95f3;
  box-shadow: 0 0 0 3px rgba(56, 109, 235, 0.1);
}

.hr-followup-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  margin: 0 22px;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
  background: #fff;
}

.hr-followup-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.hr-followup-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 10px;
  border-bottom: 1px solid #dfe5ed;
  background: #f5f7fb;
  color: #606a7d;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.hr-followup-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf0f4;
  color: #313b4e;
  vertical-align: middle;
}

.hr-followup-table tbody > tr:not(.hr-followup-expand-row):hover,
.hr-followup-table tbody > tr.is-expanded {
  background: #f7faff;
}

.hr-followup-table td > strong,
.hr-followup-table td > small {
  display: block;
}

.hr-followup-table td > small {
  margin-top: 4px;
  color: #7c8597;
  font-size: 11px;
  white-space: nowrap;
}

.hr-followup-table td.is-success {
  color: #15965b;
  font-weight: 700;
}

.hr-followup-table td.is-warning {
  color: #d77b0a;
  font-weight: 700;
}

.hr-followup-table td.is-danger {
  color: #d84242;
  font-weight: 700;
}

.hr-followup-source {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf3ff;
  color: #3266df;
  font-size: 12px;
  font-weight: 600;
}

.hr-followup-source.public {
  background: #fff1df;
  color: #c16a00;
}

.hr-status-pill.neutral {
  border-color: #d7dde6;
  background: #f1f3f6;
  color: #6e7788;
}

.hr-followup-expand-row td {
  padding: 0;
  background: #f6f9ff;
}

.hr-followup-row-detail {
  padding: 16px 20px 18px 34px;
  border-left: 3px solid #4b7df0;
}

.hr-followup-trace {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.hr-followup-trace > div {
  padding: 10px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #fff;
}

.hr-followup-trace span,
.hr-followup-trace strong {
  display: block;
}

.hr-followup-trace span {
  margin-bottom: 4px;
  color: #7b8496;
  font-size: 11px;
}

.hr-followup-excluded-note,
.hr-followup-transfer-note {
  margin: 8px 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f0f2f6;
  color: #636d7f;
  font-size: 12px;
}

.hr-followup-transfer-note {
  background: #fff5e8;
  color: #9b5d0b;
}

.hr-followup-timeline {
  display: grid;
  gap: 0;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.hr-followup-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 46px;
  padding-bottom: 12px;
}

.hr-followup-timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 13px;
  bottom: -1px;
  left: 5px;
  width: 1px;
  background: #d7deea;
}

.hr-followup-timeline i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #22a86a;
  box-shadow: 0 0 0 1px #22a86a;
}

.hr-followup-timeline i.is-late {
  background: #e78a19;
  box-shadow: 0 0 0 1px #e78a19;
}

.hr-followup-timeline strong {
  color: #303a4d;
  font-size: 12px;
}

.hr-followup-timeline p {
  margin: 4px 0 0;
  color: #6f788a;
  line-height: 1.55;
}

.hr-followup-timeline li > span {
  color: #6c7688;
  font-size: 12px;
}

.hr-followup-timeline li.is-empty {
  grid-template-columns: minmax(0, 1fr);
  padding: 10px 12px;
  border: 1px dashed #d6deea;
  border-radius: 8px;
  background: #fff;
}

.hr-followup-empty {
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 42px 20px;
  color: #7b8495;
}

.hr-followup-empty strong {
  color: #3d4759;
}

.hr-followup-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  border-top: 1px solid #dfe5ed;
  background: #fff;
}

.hr-followup-drawer-foot p {
  margin: 0;
  color: #737d90;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .hr-followup-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hr-followup-drawer {
    width: 100vw;
    min-width: 0;
  }

  .hr-followup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-followup-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-followup-type-tabs {
    align-self: stretch;
    overflow-x: auto;
  }

  .hr-followup-type-tabs button {
    flex: 1;
    white-space: nowrap;
  }

  .hr-followup-toolbar label,
  .hr-followup-toolbar label.hr-followup-search {
    min-width: 0;
    margin-left: 0;
  }

  .hr-followup-trace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-followup-drawer-foot {
    align-items: stretch;
    flex-direction: column;
  }
}

.hr-conversion-detail-layer {
  position: fixed;
  inset: 0;
  z-index: 1500;
}

.hr-conversion-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(16, 24, 40, 0.42);
  cursor: default;
}

.hr-conversion-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(1240px, calc(100vw - 64px));
  min-width: 760px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f7f9fc;
  box-shadow: -18px 0 44px rgba(16, 24, 40, 0.2);
}

.hr-conversion-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid #dfe5ee;
  background: #fff;
}

.hr-conversion-drawer-head > div > span {
  color: #3568e8;
  font-size: 12px;
  font-weight: 700;
}

.hr-conversion-drawer-head h3 {
  margin: 5px 0 4px;
  color: #172033;
  font-size: 20px;
}

.hr-conversion-drawer-head p {
  margin: 0;
  color: #6c7486;
  font-size: 13px;
}

.hr-conversion-drawer-head > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #f1f4f9;
  color: #4d576c;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.hr-conversion-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px 12px;
}

.hr-conversion-summary > div {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e0e6ef;
  border-radius: 10px;
  background: #fff;
}

.hr-conversion-summary > div.is-primary {
  border-color: #b8ccff;
  background: linear-gradient(145deg, #edf3ff, #fff);
}

.hr-conversion-summary span,
.hr-conversion-summary small {
  display: block;
  overflow: hidden;
  color: #70798c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-conversion-summary strong {
  display: block;
  margin: 5px 0 2px;
  color: #1c2638;
  font-size: 20px;
}

.hr-conversion-summary .is-primary strong {
  color: #285fd8;
}

.hr-conversion-formula-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 22px 12px;
  padding: 10px 13px;
  border: 1px solid #dce5f5;
  border-radius: 9px;
  background: #f1f6ff;
}

.hr-conversion-formula-line > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hr-conversion-formula-line > div span {
  color: #6d7890;
  font-size: 11px;
}

.hr-conversion-formula-line > div strong {
  overflow: hidden;
  color: #31415e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-conversion-formula-line > span {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.hr-conversion-formula-line > span.is-valid {
  background: #e8f8ef;
  color: #188a52;
}

.hr-conversion-formula-line > span.is-warning {
  background: #fff0e5;
  color: #c76716;
}

.hr-conversion-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 22px 14px;
}

.hr-conversion-type-tabs {
  display: inline-flex;
  align-self: flex-end;
  padding: 3px;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  background: #fff;
}

.hr-conversion-type-tabs button {
  padding: 8px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #657086;
  cursor: pointer;
}

.hr-conversion-type-tabs button.is-active {
  background: #386deb;
  color: #fff;
  box-shadow: 0 3px 8px rgba(56, 109, 235, 0.2);
}

.hr-conversion-type-tabs.is-fixed button {
  cursor: default;
}

.hr-conversion-toolbar label {
  min-width: 150px;
  display: grid;
  gap: 5px;
  color: #6b7487;
  font-size: 12px;
}

.hr-conversion-toolbar label.hr-conversion-search {
  min-width: 270px;
  margin-left: auto;
}

.hr-conversion-toolbar select,
.hr-conversion-toolbar input {
  height: 38px;
  padding: 0 11px;
  border: 1px solid #d9e0eb;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #283246;
}

.hr-conversion-toolbar select:focus,
.hr-conversion-toolbar input:focus {
  border-color: #6e95f3;
  box-shadow: 0 0 0 3px rgba(56, 109, 235, 0.1);
}

.hr-conversion-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  margin: 0 22px;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
  background: #fff;
}

.hr-conversion-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  font-size: 13px;
}

.hr-conversion-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 10px;
  border-bottom: 1px solid #dfe5ed;
  background: #f5f7fb;
  color: #606a7d;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.hr-conversion-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf0f4;
  color: #313b4e;
  vertical-align: middle;
}

.hr-conversion-table tbody > tr:not(.hr-conversion-expand-row):hover,
.hr-conversion-table tbody > tr.is-expanded {
  background: #f7faff;
}

.hr-conversion-table td > strong,
.hr-conversion-table td > small {
  display: block;
}

.hr-conversion-table td > small {
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  color: #7c8597;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-conversion-source,
.hr-conversion-flag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.hr-conversion-source {
  background: #edf3ff;
  color: #3266df;
}

.hr-conversion-source.public {
  background: #fff1df;
  color: #c16a00;
}

.hr-conversion-flag.yes {
  background: #e8f8ef;
  color: #188a52;
}

.hr-conversion-flag.no {
  background: #f1f3f6;
  color: #727b8c;
}

.hr-conversion-expand-row td {
  padding: 0;
  background: #f6f9ff;
}

.hr-conversion-row-detail {
  padding: 16px 20px 18px 34px;
  border-left: 3px solid #4b7df0;
}

.hr-conversion-trace {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.hr-conversion-trace > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #fff;
}

.hr-conversion-trace span,
.hr-conversion-trace strong {
  display: block;
}

.hr-conversion-trace span {
  margin-bottom: 4px;
  color: #7b8496;
  font-size: 11px;
}

.hr-conversion-trace strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-conversion-transfer-note,
.hr-conversion-anomaly-note {
  margin: 8px 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #fff5e8;
  color: #9b5d0b;
  font-size: 12px;
}

.hr-conversion-anomaly-note {
  background: #ffebeb;
  color: #b63c3c;
}

.hr-conversion-orders {
  margin: 14px 0;
}

.hr-conversion-orders > strong {
  display: block;
  margin-bottom: 8px;
  color: #3b4659;
  font-size: 12px;
}

.hr-conversion-orders ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hr-conversion-orders li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  background: #fff;
}

.hr-conversion-orders li > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hr-conversion-orders li span {
  color: #7a8496;
  font-size: 11px;
}

.hr-conversion-orders li.is-empty {
  color: #697386;
}

.hr-conversion-empty {
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 42px 20px;
  color: #7b8495;
}

.hr-conversion-empty strong {
  color: #3d4759;
}

.hr-conversion-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  border-top: 1px solid #dfe5ed;
  background: #fff;
}

.hr-conversion-drawer-foot p {
  margin: 0;
  color: #737d90;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .hr-conversion-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hr-conversion-drawer {
    width: 100vw;
    min-width: 0;
  }

  .hr-conversion-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-conversion-formula-line,
  .hr-conversion-toolbar,
  .hr-conversion-drawer-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-conversion-type-tabs {
    align-self: stretch;
    overflow-x: auto;
  }

  .hr-conversion-type-tabs button {
    flex: 1;
    white-space: nowrap;
  }

  .hr-conversion-toolbar label,
  .hr-conversion-toolbar label.hr-conversion-search {
    min-width: 0;
    margin-left: 0;
  }

  .hr-conversion-trace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hr-snapshot-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cfdcf5;
  border-radius: 10px;
  background: #f6f9ff;
}

.hr-snapshot-panel.is-empty {
  border-style: dashed;
  background: #fafbfe;
}

.hr-snapshot-panel > p {
  margin: 0;
  color: #707b8f;
  font-size: 12px;
  line-height: 1.6;
}

.hr-snapshot-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-snapshot-panel-head > div {
  display: grid;
  gap: 3px;
}

.hr-snapshot-panel-head > div span {
  color: #71809a;
  font-size: 11px;
}

.hr-snapshot-panel-head > div strong {
  color: #25334e;
}

.hr-snapshot-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.hr-snapshot-meta > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #e0e7f2;
  border-radius: 8px;
  background: #fff;
}

.hr-snapshot-meta span {
  color: #7b8597;
  font-size: 10px;
}

.hr-snapshot-meta strong {
  overflow: hidden;
  color: #364158;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-snapshot-meta strong.is-warning {
  color: #c66a11;
}

.hr-snapshot-history {
  border-top: 1px solid #dce5f2;
  padding-top: 10px;
}

.hr-snapshot-history summary {
  color: #53627c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.hr-snapshot-history ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.hr-snapshot-history li {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 7px;
  background: #fff;
  color: #6d7789;
  font-size: 11px;
}

.hr-snapshot-history li strong {
  color: #3266df;
}

.hr-snapshot-history li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-snapshot-request-form {
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid #dce5f2;
}

.hr-snapshot-request-form label {
  display: grid;
  gap: 5px;
}

.hr-snapshot-request-form label span {
  color: #657187;
  font-size: 11px;
}

.hr-snapshot-request-form textarea {
  min-height: 70px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  color: #2d384c;
  font: inherit;
}

.hr-snapshot-request {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #f0d09e;
  border-radius: 8px;
  background: #fff8ed;
}

.hr-snapshot-request > div:first-child {
  display: grid;
  gap: 4px;
}

.hr-snapshot-request span,
.hr-snapshot-request strong,
.hr-snapshot-request small {
  display: block;
}

.hr-snapshot-request span {
  color: #a76214;
  font-size: 11px;
  font-weight: 700;
}

.hr-snapshot-request strong {
  color: #5d472e;
  font-size: 12px;
}

.hr-snapshot-request small {
  color: #8c765d;
  font-size: 10px;
}

.hr-snapshot-request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 820px) {
  .hr-snapshot-meta {
    grid-template-columns: 1fr;
  }

  .hr-snapshot-request-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.permissions-pending #app,
.login-visible #app {
  visibility: hidden;
  pointer-events: none;
}

.permissions-pending:not(.login-visible) body::before {
  content: "正在加载账号权限...";
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
}

.view-loading-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.initial-data-loading .view.is-active::before {
  content: "";
  display: block;
  min-height: 280px;
  border-radius: 14px;
  background:
    linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%) 0 0 / 200% 72px,
    linear-gradient(#eef2f7 0 0) 0 92px / 100% 44px,
    linear-gradient(#eef2f7 0 0) 0 156px / 100% 124px;
  background-repeat: no-repeat;
  animation: crm-initial-skeleton 1.1s ease-in-out infinite;
}

@keyframes crm-initial-skeleton {
  from { background-position: 100% 0, 0 92px, 0 156px; }
  to { background-position: -100% 0, 0 92px, 0 156px; }
}

.data-refreshing #refreshBtn {
  pointer-events: none;
  animation: crm-refresh-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes crm-refresh-pulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

/* Unified finance workspace */
.finance-workspace {
  padding: 0;
  overflow: hidden;
}

.finance-heading {
  padding: 18px 18px 0;
  border-bottom: 1px solid var(--border);
}

.finance-tabs {
  margin-bottom: -1px;
}

.finance-range-bar,
.finance-filter-bar,
.finance-import-form {
  display: grid;
  gap: 10px;
  align-items: end;
}

.finance-range-bar {
  grid-template-columns: repeat(3, minmax(150px, 190px));
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.finance-filter-bar {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.finance-range-bar label,
.finance-filter-bar label,
.finance-import-form label {
  min-width: 0;
}

.finance-range-bar label > span,
.finance-filter-bar label > span,
.finance-import-form label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.finance-pending-only {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
}

.finance-pending-only input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  flex: 0 0 16px;
}

.finance-pending-only > span {
  margin: 0 !important;
  color: var(--text) !important;
}

.finance-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  border-bottom: 1px solid var(--border);
}

.finance-summary-strip > div {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.finance-summary-strip > div:last-child {
  border-right: 0;
}

.finance-summary-strip span,
.finance-summary-strip strong {
  display: block;
}

.finance-summary-strip span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.finance-summary-strip .is-warning strong {
  color: #b45309;
}

.finance-result-count {
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
}

.finance-table-wrap {
  max-height: 570px;
}

.finance-table {
  min-width: 1120px;
}

.finance-table th,
.finance-table td {
  white-space: nowrap;
}

.finance-table th:nth-last-child(-n + 2),
.finance-table td:nth-last-child(-n + 2) {
  white-space: normal;
}

.finance-table td:nth-last-child(2) {
  min-width: 130px;
}

.finance-table td:last-child {
  min-width: 230px;
}

.finance-table td small,
.finance-table td strong {
  display: block;
}

.finance-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.finance-group-row {
  background: #f8fbff;
}

.finance-group-details summary {
  color: #2457d6;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.finance-group-detail-list {
  display: grid;
  gap: 6px;
  min-width: 520px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.finance-group-detail-list > div {
  display: grid;
  grid-template-columns: 150px 110px 120px minmax(180px, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13px;
}

.finance-import-panel {
  padding: 16px;
}

.finance-import-form {
  grid-template-columns: minmax(140px, 180px) minmax(240px, 1fr) minmax(280px, 1.2fr) auto auto;
}

.finance-import-form-alipay {
  grid-template-columns: minmax(140px, 180px) repeat(2, minmax(280px, 1fr));
  align-items: stretch;
}

.finance-import-form .form-status {
  grid-column: 1 / -1;
}

.finance-import-note {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid #4f6bed;
  background: #f5f7ff;
  color: #46546a;
}

.finance-import-history {
  max-height: 360px;
}

.business-finance-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.business-finance-summary {
  display: grid;
  grid-template-columns: 180px 180px minmax(360px, 1fr);
  align-items: stretch;
  border: 1px solid var(--border);
}

.business-finance-summary > div:not(.business-finance-shortcut) {
  padding: 16px;
  border-right: 1px solid var(--border);
}

.business-finance-summary span,
.business-finance-summary strong,
.business-finance-summary small {
  display: block;
}

.business-finance-summary strong {
  margin: 5px 0;
  font-size: 20px;
}

@media (max-width: 1100px) {
  .finance-filter-bar {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .finance-import-form {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .finance-import-form-alipay {
    grid-template-columns: 1fr;
  }

  .finance-summary-strip {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .business-finance-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .business-finance-summary .business-finance-shortcut {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .finance-range-bar,
  .finance-filter-bar,
  .finance-import-form,
  .finance-summary-strip,
  .business-finance-summary {
    grid-template-columns: 1fr;
  }

  .business-finance-summary .business-finance-shortcut {
    grid-column: auto;
  }

  .business-finance-shortcut {
    align-items: stretch;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 212px 1fr;
}

.sidebar {
  background: #223044;
  color: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 0 6px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f6d365;
  color: #182234;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: #aeb9c7;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: center;
  background: transparent;
  color: #cbd5df;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-attendance-quick {
  display: none;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.main {
  min-width: 0;
  padding: 18px 22px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.top-actions,
.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lead-notification-center {
  position: relative;
}

.lead-notification-button {
  position: relative;
  color: #2444a8;
}

.lead-notification-button.has-unread {
  border-color: #91a8ff;
  background: #eef2ff;
}

.lead-notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}

.lead-notification-panel {
  position: absolute;
  z-index: 95;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(24, 36, 72, 0.2);
}

.lead-notification-panel-head {
  min-height: 60px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.lead-notification-panel-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.lead-notification-panel-head strong {
  font-size: 14px;
}

.lead-notification-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.lead-notification-list {
  max-height: min(460px, calc(100vh - 150px));
  overflow: auto;
}

.lead-notification-item {
  width: 100%;
  min-height: 78px;
  padding: 0;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.lead-notification-open-button {
  width: 100%;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.lead-notification-item:hover {
  background: #f7f9ff;
}

.lead-notification-item.is-unread {
  background: #f3f6ff;
}

.lead-notification-actions {
  padding: 0 14px 12px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lead-notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}

.lead-notification-item.is-unread .lead-notification-dot {
  background: var(--blue);
}

.lead-notification-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lead-notification-copy strong,
.lead-notification-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-notification-copy strong {
  font-size: 13px;
}

.lead-notification-copy span,
.lead-notification-time {
  color: var(--muted);
  font-size: 12px;
}

.lead-notification-time {
  white-space: nowrap;
}

.visit-handoff-cell {
  display: grid;
  gap: 6px;
  align-content: start;
}

.visit-handoff-actions {
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}

.visit-handoff-actions button,
.visit-handoff-actions .text-button {
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

.notification-target-row > td {
  animation: notification-target-highlight 6s ease-out;
  box-shadow: inset 0 2px 0 #f0a100, inset 0 -2px 0 #f0a100;
}

@keyframes notification-target-highlight {
  0%, 65% { background: #fff0ae; }
  100% { background: inherit; }
}

.lead-notification-empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.lead-notification-panel-foot {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.lead-notification-panel-foot span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.lead-notification-panel-foot button:disabled {
  color: #16855b;
  background: #eef9f4;
  border-color: #c7e8d8;
  opacity: 1;
}

.user-switch {
  min-width: 176px;
}

.work-status-switch {
  min-width: 108px;
}

.user-switch select {
  min-height: 36px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  height: 36px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 0 13px;
  white-space: nowrap;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}

.mini-button {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.ghost-button {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.icon-button {
  width: 36px;
  padding: 0;
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
  font-weight: 700;
}

.inline-select {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 0 28px 0 10px;
}

.ecommerce-deposit-link-select {
  width: 72px;
  min-width: 72px;
  font-weight: 600;
}

.ecommerce-deposit-link-select.is-yes {
  border-color: #9fdcc5;
  background: #e8f8f0;
  color: #08775a;
}

.ecommerce-deposit-link-select.is-no {
  background: #f5f7fa;
  color: #536174;
}

.stacked-actions {
  align-items: flex-start;
  flex-direction: column;
}

.muted-row {
  opacity: 0.68;
}

.danger-text {
  color: var(--red);
  font-size: 12px;
}

.fulfillment-table-wrap {
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-tabs {
  margin-bottom: 0;
  overflow-x: auto;
}

.dashboard-tab-panels {
  margin-bottom: 14px;
}

.dashboard-tab-panels > .metric-grid,
.dashboard-tab-panels > .spend-panel,
.dashboard-tab-panels > .profit-panel,
.dashboard-tab-panels > .follow-rule-panel,
.dashboard-tab-panels > .backend-stats-panel,
.dashboard-tab-panels > .ecommerce-dashboard,
.dashboard-tab-panels > .ecommerce-operation-profit {
  min-width: 0;
  margin-bottom: 0;
}

.spend-panel,
.follow-rule-panel,
.ecommerce-dashboard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.profit-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.spend-panel-head,
.follow-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.profit-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.profit-panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.profit-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.profit-panel-actions label {
  min-width: 150px;
}

.spend-panel-head p,
.follow-rule-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.follow-rule-reminder {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.follow-rule-reminder strong {
  color: var(--text);
  font-size: 14px;
}

.follow-rule-reminder p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.profit-panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.spend-panel-body,
.follow-rule-body {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.profit-panel-body {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.conversion-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
}

.conversion-panel-note {
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.5;
}

.conversion-table-wrap {
  overflow-x: auto;
}

.conversion-table {
  min-width: 1320px;
}

.follow-rule-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px 16px 4px;
}

.follow-rule-card {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.follow-rule-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.follow-rule-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 22px;
}

.follow-rule-list,
.follow-overdue-list {
  display: grid;
  gap: 8px;
  padding: 10px 16px 14px;
}

.follow-rule-chip,
.follow-overdue-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.4fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  font-size: 13px;
  text-align: left;
}

.follow-rule-chip {
  grid-template-columns: 1fr;
  align-items: start;
}

.follow-overdue-item {
  width: 100%;
  cursor: pointer;
}

.follow-rule-chip strong,
.follow-overdue-item strong {
  display: block;
  margin-bottom: 4px;
}

.follow-rule-chip small,
.follow-overdue-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.follow-rule-schedule-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.follow-rule-schedule-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.follow-rule-schedule-title span {
  color: var(--muted);
  font-size: 12px;
}

.follow-rule-schedule-grid {
  display: grid;
  gap: 8px;
}

.follow-rule-schedule-row {
  display: grid;
  grid-template-columns: 90px minmax(220px, 1fr) minmax(220px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.follow-rule-schedule-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.follow-rule-schedule-row input {
  width: 82px;
  min-height: 34px;
  padding: 0 8px;
}

.follow-rule-preview {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .follow-rule-schedule-title {
    display: block;
  }

  .follow-rule-schedule-row {
    grid-template-columns: 1fr;
  }
}

/* 后端历史数据导入：独立资料库，不混入现行业务统计。 */
.backend-history-import-panel {
  padding: 0;
  overflow: hidden;
  background: #f7f9fc;
}

.history-import-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.history-import-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.history-import-title h3,
.history-import-title p,
.history-import-match-heading h3,
.history-import-match-panel h4 {
  margin: 0;
}

.history-import-title p {
  margin-top: 5px;
  color: #6b7788;
  font-size: 13px;
}

.history-import-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
}

.history-import-view-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  color: #596678;
  background: transparent;
  cursor: pointer;
}

.history-import-view-tabs button.is-active {
  color: #275ee7;
  background: #edf3ff;
}

.history-import-view-tabs b {
  margin-left: 5px;
}

.history-import-record-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.history-import-record-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 16px;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  background: #fff;
}

.history-import-record-stats span,
.history-import-batch-summary span,
.history-import-record-toolbar label > span {
  color: #6b7788;
  font-size: 12px;
}

.history-import-record-stats strong {
  color: #1f3354;
  font-size: 22px;
}

.history-import-record-card {
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.history-import-record-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(150px, 0.55fr) minmax(220px, 0.9fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #e5ebf3;
}

.history-import-record-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.history-import-record-toolbar select,
.history-import-record-toolbar input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ced8e6;
  border-radius: 8px;
  background: #fff;
}

.history-import-batch-summary {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.6fr 1.6fr;
  gap: 1px;
  margin: 0 12px 12px;
  overflow: hidden;
  border: 1px solid #e1e7f0;
  border-radius: 9px;
  background: #e1e7f0;
}

.history-import-batch-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  background: #f8fafc;
}

.history-import-batch-summary strong {
  overflow: hidden;
  color: #26364e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-import-table-wrap.is-records {
  min-height: 360px;
  border-top: 1px solid #e5ebf3;
}

.history-import-record-table {
  min-width: 1060px;
}

.history-import-record-empty {
  display: grid;
  gap: 8px;
  min-height: 260px;
  align-content: center;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.history-import-record-empty span {
  color: #6b7788;
}

.history-import-owner-field {
  display: grid;
  gap: 6px;
}

.history-import-owner-field span {
  color: #556274;
  font-size: 13px;
}

.history-import-owner-field b {
  color: #dc3545;
}

.history-import-owner-field select,
.history-import-file-strip input,
.history-import-source-card input,
.history-import-source-card select,
.history-import-filters input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ced8e6;
  border-radius: 8px;
  background: #fff;
}

.history-import-file-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px dashed #cad5e5;
  border-radius: 10px;
  color: #6d7889;
  background: #fff;
}

.history-import-file-strip.has-file {
  border-style: solid;
  border-color: #b9cbf6;
  color: #31589f;
  background: #f4f7ff;
}

.history-import-file-strip label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.history-import-file-strip input {
  width: 112px;
  min-height: 32px;
}

.history-import-sheet-map {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.history-import-sheet-map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-import-sheet-map-heading span {
  color: #687589;
  font-size: 13px;
}

.history-import-sheet-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
}

.history-import-sheet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.75fr);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #f8fafc;
}

.history-import-sheet-card.is-matched {
  border-color: #b8dfc8;
  background: #f3fbf6;
}

.history-import-sheet-card.is-unmatched,
.history-import-sheet-card.is-error {
  border-color: #efc0c5;
  background: #fff7f7;
}

.history-import-sheet-card > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.history-import-sheet-card strong,
.history-import-sheet-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-import-sheet-card small {
  color: #687589;
  font-size: 12px;
}

.history-import-sheet-card select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #ced8e6;
  border-radius: 8px;
  background: #fff;
}

.history-import-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.history-import-preview-card,
.history-import-match-panel {
  min-width: 0;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.history-import-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #e5ebf3;
}

.history-import-tabs {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px;
}

.history-import-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #596678;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.history-import-tabs button.is-active {
  color: #275ee7;
  background: #edf3ff;
}

.history-import-tabs b {
  font-size: 12px;
}

.history-import-filters input {
  flex: 1 1 240px;
  max-width: 285px;
}

.history-import-table-wrap {
  min-height: 430px;
  overflow: auto;
}

.history-import-table {
  min-width: 1120px;
}

.history-import-table th,
.history-import-table td {
  padding: 10px;
  vertical-align: top;
}

.history-import-table tbody tr {
  cursor: pointer;
}

.history-import-table tbody tr.is-selected {
  background: #f1f5ff;
  box-shadow: inset 3px 0 #4169e1;
}

.history-import-table td:first-child,
.history-import-table th:first-child {
  width: 42px;
  min-width: 42px;
}

.history-import-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.history-import-status.is-ready { color: #16734a; background: #e8f7ef; }
.history-import-status.is-pending { color: #9a6300; background: #fff3d6; }
.history-import-status.is-duplicate { color: #6b7280; background: #edf0f4; }
.history-import-status.is-error { color: #b42336; background: #fdecef; }

.history-import-row-message {
  max-width: 155px;
  margin-top: 5px;
  white-space: normal;
}

.history-import-pagination,
.history-import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid #e5ebf3;
  color: #667386;
}

.history-import-pagination > div,
.history-import-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-import-match-panel {
  position: sticky;
  top: 12px;
  padding: 15px;
}

.history-import-link-later-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cddcff;
  border-radius: 9px;
  color: #36558b;
  background: #f3f7ff;
}

.history-import-link-later-note span {
  line-height: 1.5;
}

.history-import-match-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5ebf3;
}

.history-import-match-heading span {
  color: #748094;
  font-size: 12px;
}

.history-import-source-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 12px;
  border-radius: 10px;
  background: #f7f9fc;
}

.history-import-source-card label,
.history-import-source-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.history-import-source-card div:last-child {
  grid-column: 1 / -1;
}

.history-import-source-card span,
.history-import-source-card label {
  color: #738094;
  font-size: 12px;
}

.history-import-source-card strong {
  color: #202c3c;
  overflow-wrap: anywhere;
}

.history-import-match-panel h4 {
  margin-bottom: 9px;
  font-size: 14px;
}

.history-match-list {
  display: grid;
  gap: 8px;
}

.history-match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.history-match-card.is-confirmed {
  border-color: #4169e1;
  background: #f1f5ff;
}

.history-match-card span,
.history-match-card small {
  display: block;
}

.history-match-card small {
  margin-top: 4px;
  color: #778398;
}

.history-match-card b {
  color: #2f62db;
}

.history-skip-match {
  width: 100%;
  margin-top: 10px;
}

.history-import-footer {
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.history-import-footer strong {
  color: #202c3c;
}

.history-import-detail-modal {
  display: grid;
  gap: 14px;
}

.history-import-linked-section {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-top: 4px;
}

.history-import-linked-order {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f8faff;
}

.history-import-linked-order > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.history-import-linked-order .is-wide {
  grid-column: 1 / -1;
}

.history-import-linked-order span {
  color: #748094;
  font-size: 12px;
}

.history-import-linked-order strong {
  overflow-wrap: anywhere;
}

.recycle-history-linker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d6e1f2;
  border-radius: 10px;
  background: #f8faff;
}

.recycle-history-linker[hidden] {
  display: none;
}

.recycle-history-linker > label {
  display: grid;
  gap: 6px;
}

.recycle-history-reference-empty,
.recycle-history-reference-selected {
  padding: 10px 12px;
  border: 1px dashed #c9d4e5;
  border-radius: 9px;
  color: #687589;
  background: #fff;
}

.recycle-history-reference-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-style: solid;
  border-color: #9fb9f2;
  color: #202c3c;
  background: #eef4ff;
}

.recycle-history-reference-selected div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recycle-history-reference-selected span {
  color: #4169a8;
  font-size: 12px;
}

.recycle-history-reference-selected strong {
  overflow-wrap: anywhere;
}

.recycle-history-reference-results {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
}

.recycle-history-reference-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.recycle-history-reference-option:hover {
  border-color: #4169e1;
  background: #f1f5ff;
}

.recycle-history-reference-option span {
  color: #667386;
  font-size: 12px;
}

.old-customer-chat-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.old-customer-chat-images[hidden] {
  display: none;
}

.old-customer-evidence-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
  color: #59677c;
  font-size: 12px;
}

.old-customer-evidence-heading strong {
  color: #27354a;
  font-size: 14px;
}

.old-customer-chat-image-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d6e1f2;
  border-radius: 10px;
  background: #fff;
}

.old-customer-chat-image-card label {
  display: grid;
  gap: 8px;
}

.old-customer-chat-image-caption {
  color: #27354a;
  font-weight: 700;
  text-align: center;
}

.old-customer-chat-existing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #687589;
  font-size: 12px;
}

.old-customer-chat-image-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: #687589;
  font-size: 12px;
}

.history-import-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f7f9fc;
}

.history-import-detail-summary > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #42516a;
  background: #fff;
}

.history-import-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #dce4ef;
}

.history-import-detail-item {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 66px;
  padding: 11px 12px;
  background: #fff;
}

.history-import-detail-item.is-wide {
  grid-column: 1 / -1;
}

.history-import-detail-item > span {
  color: #748094;
  font-size: 12px;
}

.history-import-detail-item strong {
  color: #202c3c;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.history-import-detail-item small {
  color: #5370a6;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .history-import-toolbar {
    grid-template-columns: 1fr auto;
  }

  .history-import-main {
    grid-template-columns: 1fr;
  }

  .history-import-record-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-import-batch-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-import-match-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .history-import-shell {
    padding: 10px;
  }

  .history-import-toolbar,
  .history-import-source-card,
  .history-import-sheet-card {
    grid-template-columns: 1fr;
  }

  .history-import-record-stats,
  .history-import-record-toolbar,
  .history-import-batch-summary {
    grid-template-columns: 1fr;
  }

  .history-import-sheet-map-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-import-title,
  .history-import-source-card div:last-child {
    grid-column: auto;
  }

  .history-import-filters,
  .history-import-footer,
  .history-import-file-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .history-import-tabs {
    overflow-x: auto;
  }

  .history-import-filters input {
    max-width: none;
  }

  .history-import-detail-grid {
    grid-template-columns: 1fr;
  }

  .history-import-detail-item.is-wide {
    grid-column: auto;
  }

  .history-import-linked-order {
    grid-template-columns: 1fr;
  }

  .history-import-linked-order .is-wide {
    grid-column: auto;
  }

  .recycle-history-reference-selected {
    align-items: stretch;
    flex-direction: column;
  }

  .old-customer-chat-images {
    grid-template-columns: 1fr;
  }

  .old-customer-evidence-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.follow-transfer-records {
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}

.follow-transfer-batch-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.follow-transfer-filters, .follow-transfer-batch-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.follow-transfer-filters label { display: grid; gap: 6px; }
.follow-transfer-filters input, .follow-transfer-filters select { min-height: 36px; width: 156px; }
.follow-transfer-filters input[type="search"] { width: 180px; }
.follow-transfer-date-filter782 { display: grid; gap: 6px; }
.follow-transfer-date-range782 { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 300px; }
.follow-transfer-date-range782 input[type="date"] { width: 100%; min-width: 0; box-sizing: border-box; }
.follow-transfer-created-at782 { min-width: 164px; white-space: nowrap; }
@media (max-width: 480px) {
  .follow-transfer-date-filter782, .follow-transfer-date-range782 { width: 100%; }
}
.follow-transfer-batch-actions { margin-left: auto; align-items: center; }
.return-item-name + .return-item-name { margin-top: 6px; }
#ecommerceDashboard .ecommerce-dashboard-table tr.is-ecommerce-leader > td { background: #f3edff; }
#ecommerceDashboard .ecommerce-dashboard-table tr.is-ecommerce-leader > td:first-child { color: #504bff; font-weight: 600; }
#frontendProfitPanel .v743-manual-leads { grid-column: auto; }
/* v813: the old-lead/repeat-customer tab alone uses the approved paired tables. */
#frontendProfitPanel .v736-conversion-card.v743-manual-leads h3,
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers h3 { font-size: 22px; }
#frontendProfitPanel .v736-conversion-card.v743-manual-leads .conversion-table th,
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers .conversion-table th { height: 50px; padding: 10px 4px; font-size: 14px; font-weight: 600; box-sizing: border-box; }
#frontendProfitPanel .v736-conversion-card.v743-manual-leads .conversion-table td,
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers .conversion-table td { height: 50px; padding: 10px 4px; font-size: 15px; line-height: 1.4; box-sizing: border-box; }
#frontendProfitPanel .v736-conversion-card.v743-manual-leads .conversion-table th:first-child,
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers .conversion-table th:first-child { width: 50px; }
#frontendProfitPanel .v736-conversion-card.v743-manual-leads .conversion-table th:nth-child(2),
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers .conversion-table th:nth-child(2) { width: 80px; }
#frontendProfitPanel .v736-conversion-card.v743-manual-leads .conversion-table tbody td:last-child,
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers .conversion-table tbody td:last-child { font-weight: 600; }
#frontendProfitPanel .v736-conversion-card.v743-manual-leads .conversion-table .summary-row td,
#frontendProfitPanel .v736-conversion-card.v813-repeat-customers .conversion-table .summary-row td { height: 50px; padding: 10px 4px; }
#frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .profit-panel-actions { justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
#frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .profit-panel-actions label { display: grid; gap: 6px; min-width: 0; }
#frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .profit-panel-actions input { width: 150px; min-height: 40px; box-sizing: border-box; }
#frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .profit-panel-actions button { width: 70px; min-width: 70px; min-height: 40px; padding-inline: 10px; }
@media (min-width: 1440px) {
  #frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head { align-items: flex-end; flex-wrap: wrap; gap: 14px; }
  #frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .frontend-conversion-topline { flex: 1 1 320px; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
  #frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .conversion-tabs { flex-basis: auto; }
  #frontendProfitPanel .profit-panel-head.v736-conversion-head.v813-repeat-customer-head .profit-panel-actions { flex: 0 1 auto; width: auto; margin-left: auto; justify-content: flex-end; }
}
#frontendProfitPanel .profit-panel-head.v736-conversion-head { flex-wrap: wrap; }
#frontendProfitPanel .v736-conversion-head .conversion-tabs { flex-basis: 100%; }

.follow-transfer-batch-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.follow-transfer-select-cell {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.follow-transfer-select-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.follow-transfer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.follow-transfer-head span {
  color: var(--muted);
  font-size: 12px;
}

.follow-transfer-table-wrap {
  max-height: 260px;
  overflow: auto;
}

.follow-transfer-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.empty-state.compact {
  min-height: 58px;
  padding: 14px;
  font-size: 13px;
}

.backend-profit-person { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.backend-profit-person small { color: var(--muted, #64748b); font-size: 12px; font-weight: 400; }
.backend-profit-person .backend-profit-shift { font-weight: 700; }
.metric.backend-profit-card {
  min-height: 108px;
}

.metric.backend-profit-card strong {
  margin-bottom: 10px;
}

.metric-lines {
  display: grid;
  gap: 4px;
}

.metric-lines em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.metric.department-total {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eef5ff;
}

.backend-profit-overview {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
}

.backend-profit-overview-body {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.spend-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1780px;
}

.profit-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1060px;
}

.spend-table th,
.spend-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.profit-table th,
.profit-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.spend-table th {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 600;
}

.spend-table .summary-row td {
  background: #fbfdff;
  border-top: 1px solid var(--line-strong);
  font-weight: 700;
}

.profit-table th {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 600;
}

.ecommerce-dashboard {
  padding: 12px;
}

.ecommerce-operation-profit,
.ecommerce-supplement-panel {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.ecommerce-performance-panel {
  padding: 12px;
}

.ecommerce-performance-table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.ecommerce-performance-filter-toolbar {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.ecommerce-performance-keyword {
  min-width: 180px;
}

.ecommerce-performance-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ecommerce-performance-table {
  min-width: 1160px;
}

.ecommerce-performance-table td {
  vertical-align: top;
}

@media (max-width: 900px) {
  .ecommerce-performance-filter-toolbar {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 560px) {
  .ecommerce-performance-filter-toolbar {
    grid-template-columns: 1fr;
  }
}

.dashboard-tab-panels > .ecommerce-operation-profit {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.section-heading.ecommerce-action-heading {
  justify-content: flex-end;
  padding-top: 16px;
}

.section-heading.ecommerce-action-heading > .section-actions {
  align-self: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 100%;
  margin-left: auto;
}

.ecommerce-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ecommerce-dashboard-head h3 {
  margin: 0;
  font-size: 18px;
}

.ecommerce-dashboard-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ecommerce-dashboard-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ecommerce-dashboard-table {
  min-width: 920px;
}

.ecommerce-operation-profit .ecommerce-dashboard-table {
  min-width: 100%;
  width: max-content;
}

.ecommerce-operation-profit-table th:not(:first-child),
.ecommerce-operation-profit-table td:not(:first-child) {
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}

.ecommerce-operation-profit-table .summary-cell {
  background: var(--panel-soft);
}

.ecommerce-dashboard-table th {
  white-space: nowrap;
}

.ecommerce-dashboard-table th:first-child,
.ecommerce-dashboard-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 120px;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
}

.ecommerce-dashboard-table th:first-child {
  z-index: 3;
  background: var(--panel-soft);
}

.ecommerce-dashboard-table .summary-row td:first-child {
  background: #fbfdff;
}

.ecommerce-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}

.ecommerce-metric {
  min-height: 70px;
}

.supplement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.supplement-head h3 {
  margin: 0;
  font-size: 17px;
}

.supplement-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.supplement-summary span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.supplement-filter-toolbar {
  margin-bottom: 10px;
}

.supplement-filter-toolbar label {
  min-width: 130px;
}

.supplement-table-wrap {
  max-height: 320px;
}

.supplement-table {
  min-width: 1580px;
}

.supplement-payment-proof {
  width: 76px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 5px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.supplement-payment-proof img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
}

.supplement-payment-proof span {
  max-width: 64px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backend-supplement-filter-shell {
  container-type: inline-size;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.backend-supplement-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.backend-supplement-filters {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

.backend-supplement-filters > label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.backend-supplement-filters input,
.backend-supplement-filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 10px;
  font-size: 13px;
}

@container (max-width: 1100px) {
  .backend-supplement-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@container (max-width: 620px) {
  .backend-supplement-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 320px) {
  .backend-supplement-filters { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  #backendSupplementPanel .supplement-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.backend-supplement-table {
  min-width: 2500px;
  table-layout: fixed;
}

.backend-supplement-table th,
.backend-supplement-table td {
  min-width: 0;
  padding: 8px 10px;
  vertical-align: middle;
}

.backend-supplement-table thead th {
  line-height: 1.25;
  white-space: nowrap;
}

.backend-supplement-table tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backend-supplement-table th:nth-child(1),
.backend-supplement-table td:nth-child(1) {
  width: 118px;
}

.backend-supplement-table th:nth-child(2),
.backend-supplement-table td:nth-child(2),
.backend-supplement-table th:nth-child(3),
.backend-supplement-table td:nth-child(3) {
  width: 120px;
}

.backend-supplement-table th:nth-child(4),
.backend-supplement-table td:nth-child(4) {
  width: 140px;
}

.backend-supplement-table th:nth-child(5),
.backend-supplement-table td:nth-child(5),
.backend-supplement-table th:nth-child(6),
.backend-supplement-table td:nth-child(6) {
  width: 190px;
}

.backend-supplement-table th:nth-child(7),
.backend-supplement-table td:nth-child(7) {
  width: 150px;
}

.backend-supplement-table th:nth-child(8),
.backend-supplement-table td:nth-child(8) {
  width: 250px;
}

.backend-supplement-table th:nth-child(9),
.backend-supplement-table td:nth-child(9),
.backend-supplement-table th:nth-child(10),
.backend-supplement-table td:nth-child(10),
.backend-supplement-table th:nth-child(11),
.backend-supplement-table td:nth-child(11) {
  width: 120px;
}

.backend-supplement-table th:nth-child(12),
.backend-supplement-table td:nth-child(12),
.backend-supplement-table th:nth-child(13),
.backend-supplement-table td:nth-child(13) {
  width: 120px;
}

.backend-supplement-table th:nth-child(14),
.backend-supplement-table td:nth-child(14) {
  width: 96px;
}

.backend-supplement-table th:nth-child(15),
.backend-supplement-table td:nth-child(15) {
  width: 190px;
}

.backend-supplement-table th:nth-child(16),
.backend-supplement-table td:nth-child(16) {
  width: 210px;
}

.backend-supplement-table th:nth-child(17),
.backend-supplement-table td:nth-child(17) {
  width: 150px;
}

.backend-supplement-table .table-filter-row input,
.backend-supplement-table .table-filter-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.backend-supplement-table .table-filter-row th {
  padding-top: 6px;
  padding-bottom: 6px;
}

.backend-supplement-table tbody td:nth-child(14),
.backend-supplement-table tbody td:nth-child(17) {
  overflow: visible;
}

.backend-supplement-table .row-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.backend-supplement-table .supplement-payment-proof {
  width: auto;
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.backend-supplement-table .supplement-payment-proof img {
  display: none;
}

.backend-supplement-table .supplement-payment-proof span {
  max-width: none;
  color: var(--primary);
  font-size: 12px;
}

.backend-supplement-table-wrap {
  max-height: 520px;
}

/* Only the active backend supplement list: do not change other register tabs. */
@media (max-width: 1600px) {
  #view-recycle:has([data-backend-panel="supplement"]:not([hidden])) > .list-panel > .section-heading {
    flex-direction: column;
    gap: 10px;
  }

  #view-recycle:has([data-backend-panel="supplement"]:not([hidden])) > .list-panel > .section-heading > div:first-child {
    width: 100%;
    min-width: 0;
  }

  #view-recycle:has([data-backend-panel="supplement"]:not([hidden])) > .list-panel > .section-heading > .section-actions {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.backend-supplement-truncate,
.backend-supplement-reference-meta,
.backend-supplement-contact-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backend-supplement-reference-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.backend-supplement-contact-line + .backend-supplement-contact-line {
  margin-top: 3px;
}

.backend-supplement-contact-line small {
  margin-right: 5px;
  color: var(--muted);
  font-size: 10px;
}

.profit-table .summary-row td {
  background: #fbfdff;
  border-top: 1px solid var(--line-strong);
}

.profit-positive {
  color: var(--green);
}

.profit-negative {
  color: var(--red);
}

.backend-stats-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 14px;
  overflow: hidden;
}

.backend-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.backend-stats-head h2 {
  margin: 0;
  font-size: 18px;
}

.backend-stats-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.backend-stats-body {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: #fbfdff;
}

.backend-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.backend-report-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.backend-report-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.backend-report-card h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.backend-report-scroll {
  overflow-x: auto;
}

/* v773: independent first-round route notices beside the existing report titles. */
#backendStatsPanel .backend-report-header773 {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
#backendStatsPanel .backend-report-header773 > h3 {
  flex: none;
  align-self: center;
  padding: 0;
  border-bottom: 0;
}
#backendStatsPanel .backend-stats-announcement773 {
  min-width: 0;
  margin-left: 0;
  padding-left: 12px;
  gap: 12px;
}
#backendStatsPanel .backend-stats-announcement773 .visit-announcement-label {
  padding: 6px 12px 6px 0;
  font-size: 14px;
}
#backendStatsPanel .backend-stats-announcement773 .visit-announcement-content { max-height: 80px; }
@media (max-width: 720px) {
  #backendStatsPanel .backend-report-header773 { flex-wrap: wrap; gap: 10px; }
  #backendStatsPanel .backend-stats-announcement773 {
    flex-basis: 100%;
    margin-left: 0;
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    gap: 10px;
  }
}

.backend-report-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.backend-report-table th,
.backend-report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

.backend-report-table th {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 600;
}

.backend-postal-ranked-report .backend-postal-rank-column {
  width: 64px;
  min-width: 64px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.backend-report-table .summary-row td {
  background: #f6fbff;
  border-top: 1px solid var(--line-strong);
}

.backend-visit-profit-report th:first-child,
.backend-visit-profit-report td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}

.backend-visit-profit-report th:first-child {
  z-index: 2;
  background: var(--panel-soft);
}

.backend-visit-profit-report .summary-row td:first-child {
  background: #f6fbff;
}

.metric.backend-profit-card.is-backend-leader,
.backend-report-table tr.is-backend-leader td,
.backend-visit-profit-report tr.is-backend-leader td:first-child {
  background: #f3edff;
}

.metric.backend-profit-card.is-backend-leader {
  border-color: #d7c6f3;
}

.old-customer-report {
  min-width: 680px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 74px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.toolbar.compact {
  align-items: end;
  justify-content: start;
}

.ecommerce-filter-toolbar {
  flex-wrap: wrap;
  gap: 10px;
}

.ecommerce-filter-toolbar label {
  flex: 0 0 126px;
  min-width: 0;
}

.ecommerce-filter-toolbar label:has(#ecomBackendDealMonthFilter),
.ecommerce-filter-toolbar label:has(#ecomDateFromFilter),
.ecommerce-filter-toolbar label:has(#ecomDateToFilter),
.ecommerce-filter-toolbar label:has(#ecomCustomerIdFilter),
.ecommerce-filter-toolbar label:has(#ecomContactFilter),
.ecommerce-filter-toolbar label:has(#ecomOrderNoFilter),
.ecommerce-filter-toolbar label:has(#ecomBrandPriceKeywordFilter) {
  flex-basis: 140px;
}

.ecommerce-filter-toolbar label:has(#ecomPlatformFilter),
.ecommerce-filter-toolbar label:has(#ecomStoreFilter),
.ecommerce-filter-toolbar label:has(#ecomStaffFilter),
.ecommerce-filter-toolbar label:has(#ecomTagFilter) {
  flex-basis: 132px;
}

.ecommerce-filter-toolbar input,
.ecommerce-filter-toolbar select {
  min-width: 0;
}

.tag-multi-filter {
  position: relative;
  width: 100%;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
}

.tag-multi-filter-details {
  position: relative;
}

.tag-multi-filter-details > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 36px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.tag-multi-filter-details > summary::-webkit-details-marker {
  display: none;
}

.tag-multi-filter-details > summary::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-65%) rotate(45deg);
}

.tag-multi-filter-details[open] > summary {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(56, 103, 255, 0.12);
}

.tag-multi-filter-details[open] > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.tag-multi-filter-summary-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-multi-filter-count {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e8efff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.tag-multi-filter-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  left: 0;
  width: max(220px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.16);
}

.tag-multi-filter-options {
  display: grid;
  gap: 2px;
  max-height: 240px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tag-multi-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.tag-multi-filter-option:hover,
.tag-multi-filter-option.is-selected {
  background: #f0f5ff;
}

.tag-multi-filter-check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid #b7c3d6;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.tag-multi-filter-option.is-selected .tag-multi-filter-check {
  border-color: var(--primary);
  background: var(--primary);
}

.tag-multi-filter-empty {
  padding: 12px 8px;
  color: var(--muted);
  text-align: center;
}

.tag-multi-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
}

.tag-multi-filter-footer button {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.tag-multi-filter-footer button:disabled {
  color: #aab4c3;
  cursor: default;
}

.inventory-toolbar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.inventory-toolbar label {
  grid-column: span 1;
  width: 100%;
  min-width: 0;
}

/* 库存总账桌面筛选固定为紧凑的上下两行；区间项保留足够输入宽度。 */
.inventory-toolbar label:has(.range-fields),
.inventory-toolbar label:has(#inventoryBrandFilter),
.inventory-toolbar label:has(#inventoryModelFilter),
.inventory-toolbar .inventory-filter-wide {
  grid-column: span 2;
}

.inventory-toolbar input,
.inventory-toolbar select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.inventory-toolbar .range-fields,
.inventory-toolbar .clearable-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.inventory-toolbar .range-fields input,
.inventory-toolbar .clearable-input input {
  min-width: 0;
}

.inventory-toolbar label:first-child {
  grid-column: span 2;
  min-width: 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(5, minmax(145px, 1fr));
  gap: 10px;
  flex: 1;
}

/* V886: existing lead filters, two aligned desktop rows with eight equal columns. */
#view-leads .lead-filter-toolbar .filter-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 14px;
  width: 100%;
}

#view-leads .lead-filter-toolbar .lead-status-row {
  display: contents;
  margin: 0;
}

#view-leads .lead-filter-toolbar .stage-filter-select,
#view-leads .lead-filter-toolbar .filter-grid > label {
  grid-column: span 1;
  width: 100%;
  min-width: 0;
  gap: 6px;
}

#view-leads .lead-filter-toolbar .filter-grid > label > span,
#view-leads .lead-filter-toolbar .stage-filter-select > span {
  font-size: 13px;
  line-height: 18px;
}

#view-leads .lead-filter-toolbar .filter-grid input,
#view-leads .lead-filter-toolbar .filter-grid select,
#view-leads .lead-filter-toolbar .tag-multi-filter {
  width: 100%;
  min-width: 0;
}

@media (min-width: 901px) {
  #view-leads .lead-filter-toolbar .filter-grid input,
  #view-leads .lead-filter-toolbar .filter-grid select,
  #view-leads .lead-filter-toolbar .tag-multi-filter-details > summary {
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
    font-size: 14px;
  }

  #view-leads .lead-filter-toolbar .tag-multi-filter-details > summary {
    display: flex;
    align-items: center;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  #view-leads .lead-filter-toolbar .filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tag-multi-filter-menu {
    width: min(300px, calc(100vw - 44px));
  }
}

.backend-filter-panel {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.backend-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.backend-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.backend-filter-panel.is-collapsed .backend-filter-head {
  margin-bottom: 0;
}

.backend-filter-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.backend-filter-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.backend-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  align-items: end;
}

.backend-filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.backend-filter-field.span-2 {
  grid-column: span 2;
}

.backend-filter-field span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
}

.backend-filter-field input,
.backend-filter-field select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 0 10px;
  font-size: 13px;
}

.backend-filter-field select {
  padding-right: 28px;
}

.recycle-table-wrap .data-table th {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  line-height: 1.35;
  min-width: 88px;
  vertical-align: middle;
}

.range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-select {
  width: auto;
  min-width: 96px;
  padding: 6px 28px 6px 10px;
  min-height: 34px;
}

.lead-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.lead-mobile-dashboard-control,
.lead-mobile-quickbar,
.lead-mobile-list,
.lead-market-mobile-list {
  display: none;
}

.column-panel {
  margin: -4px 0 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lead-board-tabs {
  display: flex;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin: 2px 0 12px;
}

.lead-board-tabs button {
  height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 0 2px;
}

.lead-board-tabs button.is-active {
  border-bottom-color: var(--blue);
  color: var(--blue);
  font-weight: 700;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.lead-market-panel {
  min-width: 0;
}

#view-leads.is-market-view #leadDashboardTabs,
#view-leads.is-market-view .lead-dashboard-panels,
#view-leads.is-market-view .lead-action-row {
  display: none !important;
}

.lead-market-toolbar {
  display: grid;
  grid-template-columns: 200px 120px 120px max-content minmax(250px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.lead-market-toolbar.has-sale-destination {
  grid-template-columns: 200px 120px 120px 104px max-content minmax(250px, 1fr);
}

.lead-market-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lead-market-toolbar label > span {
  color: var(--muted);
  font-size: 12px;
}

.lead-market-toolbar input,
.lead-market-toolbar select {
  width: 100%;
}

.lead-market-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
  flex-wrap: nowrap;
  min-height: 40px;
}

#leadMarketSummary {
  display: flex;
  align-items: center;
  justify-self: start;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.lead-list-pagination,
.lead-market-pagination,
.ecommerce-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--panel);
  font-size: 13px;
}

.lead-list-pagination > div,
.lead-market-pagination > div,
.ecommerce-table-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-list-page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.lead-list-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lead-list-page-number,
.lead-list-page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.lead-list-page-arrow {
  width: 36px;
  padding: 0;
  font-size: 20px;
}

.lead-list-page-number:hover,
.lead-list-page-arrow:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.lead-list-page-number.is-active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.lead-list-page-arrow:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lead-list-page-ellipsis {
  min-width: 24px;
  color: var(--muted);
  text-align: center;
}

.lead-list-page-size-control > span {
  color: var(--muted);
}

.lead-list-page-size-control select {
  min-width: 92px;
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
}

.lead-list-pagination[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .lead-list-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-list-pagination > div > button {
    flex: 0 0 36px;
  }

  .lead-list-pagination-actions {
    flex-wrap: wrap;
  }

  .lead-list-page-size-control {
    width: 100%;
  }

  .lead-list-page-size-control select {
    flex: 1;
  }

  .lead-list-page-numbers {
    flex: 1;
    justify-content: center;
  }
}

.lead-market-table-wrap {
  max-height: clamp(420px, 62vh, 760px);
  overflow: auto;
}

.lead-market-table {
  min-width: 1120px;
}

.lead-market-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  white-space: nowrap;
}

.lead-market-table td {
  vertical-align: middle;
}

.lead-market-table .lead-market-select-column {
  width: 42px;
  min-width: 42px;
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
}

.lead-market-select-column input,
.lead-market-mobile-select input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.lead-market-table [data-market-column="date"] {
  width: 108px;
  white-space: nowrap;
}

.lead-market-table [data-market-column="brand"],
.lead-market-table [data-market-column="model"] {
  min-width: 130px;
}

.lead-market-table [data-market-column="description"] {
  min-width: 230px;
}

.lead-market-table [data-market-column$="Price"] {
  min-width: 132px;
  white-space: nowrap;
}

.lead-market-description {
  display: block;
  max-width: 360px;
  white-space: normal;
  line-height: 1.5;
}

.lead-market-price {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.lead-market-empty {
  color: var(--muted);
  font-size: 12px;
}

.lead-market-table [data-market-column="images"] {
  min-width: 160px;
}

.lead-market-images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

.lead-market-image {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.lead-market-image img {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.lead-market-image .lead-market-image-index {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.lead-market-loading {
  min-height: 220px;
}

@media (max-width: 1100px) {
  .lead-market-toolbar,
  .lead-market-toolbar.has-sale-destination {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-market-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #leadMarketSummary {
    grid-column: 1 / -1;
  }
}

.lead-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.stage-filter-select {
  width: min(360px, 100%);
}

.lead-status-row button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
}

.lead-status-row button.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.lead-status-row strong {
  font-size: 13px;
}

.laike-notice {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid #edf2f7;
  border-radius: 7px;
  background: #fbfdff;
  color: #506070;
  font-size: 13px;
}

.notice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.column-panel h3 {
  margin-bottom: 10px;
}

.column-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.column-panel-heading h3 {
  margin: 0 0 4px;
}

.column-panel-heading p {
  margin: 0;
}

.column-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.check-item {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: var(--panel-soft);
  font-size: 13px;
}

.check-item input {
  width: 16px;
  min-height: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  appearance: none;
  -webkit-appearance: none;
  display: none;
}

input[type="search"] {
  appearance: textfield;
  -webkit-appearance: textfield;
}

.clearable-input {
  position: relative;
  display: block;
  width: 100%;
}

.clearable-input input {
  padding-right: 30px;
}

.clear-input-button {
  position: absolute;
  top: 50%;
  right: 3px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  touch-action: manipulation;
  transform: translateY(-50%);
}

.clear-input-button:hover {
  background: #eef4ff;
  color: var(--blue);
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.is-locked-field {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 13px;
}

.form-status.saving {
  color: var(--blue);
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: var(--red);
}

.form-status.warning {
  color: #a16207;
}

.form-warning {
  padding: 10px 12px;
  border: 1px solid #f2cf88;
  border-radius: 8px;
  background: #fff8e8;
  color: #8a5700;
  line-height: 1.6;
}

.outbound-request-form-status:not(:empty) {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff1f2;
  color: var(--red);
  font-weight: 600;
}

.outbound-request-form-status.saving:not(:empty) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

#outboundRequestForm [aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

#recycleForm [aria-invalid="true"] {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16) !important;
}

#recycleForm .recycle-validation-location {
  border-radius: 7px;
  background: #fff7f7;
  outline: 2px solid rgba(220, 38, 38, 0.3);
  outline-offset: 4px;
}

.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.image-drop-zone {
  position: relative;
  border: 1px dashed transparent;
  border-radius: 7px;
  padding: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.image-drop-zone:focus-within,
.image-drop-zone:hover,
.image-drop-zone.is-drag-over {
  border-color: var(--blue);
  background: #f8fbff;
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.image-drop-zone input[type="file"] {
  padding-right: 32px;
}

.image-drop-clear {
  position: absolute;
  right: 10px;
  top: 29px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.image-drop-clear:hover {
  border-color: var(--red);
  color: var(--red);
  background: #fff7f7;
}

.image-drop-clear[hidden] {
  display: none;
}

.image-drop-status {
  display: block;
  min-height: 16px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  scrollbar-gutter: stable;
}

* {
  scrollbar-width: auto;
  scrollbar-color: #9aa8ba #edf2f7;
}

*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

*::-webkit-scrollbar-track {
  background: #edf2f7;
}

*::-webkit-scrollbar-thumb {
  background: #9aa8ba;
  border: 3px solid #edf2f7;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #74849a;
}

.table-wrap.small {
  max-height: 610px;
}

.pledge-order-table {
  min-width: 3200px;
}

.pledge-detail-table {
  min-width: 1280px;
}

.pledge-order-table th,
.pledge-detail-table th {
  white-space: normal;
  line-height: 1.35;
  min-width: 92px;
}

.lead-table-wrap {
  height: clamp(360px, 48vh, 620px);
  max-height: clamp(360px, 48vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
}

.lead-table-wrap #leadTable th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.ecommerce-table-wrap {
  height: clamp(340px, 56vh, 680px);
  max-height: clamp(340px, 56vh, 680px);
  overflow: auto;
  overscroll-behavior: contain;
}

.ecommerce-table-wrap #ecommerceTable th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.recycle-table-wrap {
  height: clamp(430px, 62vh, 720px);
  max-height: clamp(430px, 62vh, 720px);
}

.recycle-table-wrap .data-table {
  min-width: 3650px;
}

.recycle-list-pagination:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 0 2px;
  color: var(--muted);
}

.deposit-order-wrap {
  height: clamp(190px, 28vh, 320px);
  max-height: clamp(190px, 28vh, 320px);
}

.deposit-filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 10px 0;
}

.deposit-filter-panel label {
  display: grid;
  gap: 6px;
}

.table-wrap.price-adjustment-wrap {
  height: clamp(360px, 62vh, 900px);
  max-height: none;
}

.payment-summary-wrap {
  max-height: 280px;
}

.payment-summary-content {
  display: grid;
  gap: 12px;
}

.alipay-balance-card {
  display: grid;
  gap: 0;
  background: var(--panel);
}

.alipay-balance-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.alipay-balance-overview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--muted);
  font-size: 13px;
}

.alipay-balance-overview strong {
  color: var(--text);
  font-size: 15px;
}

.alipay-balance-sync-all {
  flex: 0 0 auto;
  min-width: 126px;
}

.alipay-balance-table-wrap {
  max-height: 360px;
  border: 0;
  border-radius: 0;
}

.alipay-balance-table {
  min-width: 900px;
}

.alipay-balance-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.alipay-balance-table th,
.alipay-balance-table td {
  padding: 13px 16px;
  vertical-align: middle;
}

.alipay-balance-table tbody tr:hover td {
  background: #fbfdff;
}

.alipay-available-balance {
  color: var(--blue);
  font-size: 15px;
}

.alipay-balance-error {
  display: block;
  max-width: 280px;
  margin-top: 5px;
  color: var(--red);
  font-size: 11px;
  line-height: 1.4;
}

.alipay-balance-alert {
  margin: 12px 16px 0;
  padding: 9px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff7f7;
  color: var(--red);
  font-size: 13px;
}

.alipay-balance-footnote {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .alipay-balance-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .alipay-balance-sync-all {
    width: 100%;
  }
}

.alipay-reconcile-panel {
  display: grid;
  gap: 10px;
  margin: 0;
}

.alipay-import-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.alipay-import-form label {
  display: grid;
  gap: 6px;
}

.alipay-import-form .form-status {
  grid-column: 1 / -1;
}

.alipay-import-mode-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.alipay-import-mode-card.is-file-import {
  border-color: #bfc9ff;
  background: #f5f7ff;
}

.alipay-import-mode-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.alipay-import-mode-card > button {
  justify-self: start;
}

.alipay-import-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.alipay-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.alipay-reconcile-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.alipay-reconcile-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.alipay-reconcile-summary span,
.alipay-filter-result,
.alipay-matched-order span {
  color: var(--muted);
  font-size: 12px;
}

.alipay-reconcile-summary .is-warning strong {
  color: #b45309;
}

.alipay-transaction-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  align-items: end;
}

.alipay-transaction-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.alipay-transaction-filters .alipay-pending-only {
  display: flex;
  align-items: center;
  min-height: 38px;
  min-width: 150px;
  white-space: nowrap;
}

.alipay-transaction-filters .alipay-pending-only input {
  width: auto;
}

.alipay-transaction-table {
  min-width: 1420px;
}

.alipay-matched-order {
  display: grid;
  gap: 3px;
  min-width: 210px;
}

.payment-reconcile-lines {
  display: grid;
  gap: 6px;
  min-width: 240px;
  margin-top: 4px;
}

.payment-reconcile-line {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 2px 6px;
  align-items: center;
}

.payment-reconcile-line .muted {
  grid-column: 1 / -1;
  white-space: normal;
}

.payment-reconcile-details {
  min-width: 190px;
}

.payment-reconcile-details > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.payment-reconcile-details > summary::-webkit-details-marker {
  display: none;
}

.payment-reconcile-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.payment-reconcile-toggle-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.payment-reconcile-toggle-label .when-open {
  display: none;
}

.payment-reconcile-details[open] .payment-reconcile-toggle-label .when-collapsed {
  display: none;
}

.payment-reconcile-details[open] .payment-reconcile-toggle-label .when-open {
  display: inline;
}

.payment-reconcile-details > .payment-reconcile-lines {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.finance-lock-note {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.finance-history-list {
  display: grid;
  gap: 10px;
}

.finance-history-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.finance-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.finance-history-head span,
.finance-history-item p {
  color: var(--muted);
  font-size: 13px;
}

.finance-history-changes {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.finance-history-changes > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(220px, 1fr);
  gap: 8px;
}

.alipay-transaction-wrap {
  max-height: 280px;
}

@media (max-width: 1100px) {
  .alipay-import-form {
    grid-template-columns: 1fr;
  }

  .alipay-reconcile-summary {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1320px;
}

.inventory-table {
  min-width: 2820px;
}

.outbound-request-table {
  min-width: 3900px;
}

.peer-settlement-table {
  min-width: 1780px;
}

.peer-settlement-selection-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.peer-settlement-select-col {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
}

.peer-settlement-select-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.peer-settlement-item-list,
.peer-settlement-receipt-list,
.peer-settlement-form-items {
  display: grid;
  gap: 6px;
}

.peer-settlement-item-list > div,
.peer-settlement-form-items > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 260px;
}

.peer-settlement-receipt-item {
  display: grid;
  gap: 2px;
  min-width: 260px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.peer-settlement-receipt-item small {
  color: var(--muted);
}

.peer-settlement-form {
  display: grid;
  gap: 14px;
}

.peer-settlement-form-items > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.peer-settlement-form-items > div:last-child {
  border-bottom: 0;
}

.peer-settlement-live-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  background: #d8e0ea;
}

.peer-settlement-live-summary > span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #fff;
}

.peer-settlement-table tr.is-muted {
  opacity: 0.68;
}

.peer-settlement-audit-log {
  grid-column: 1 / -1;
}

.peer-settlement-audit-record {
  min-width: 0;
}

.peer-settlement-audit-reason {
  color: #7a2e0e;
  overflow-wrap: anywhere;
}

.peer-settlement-audit-snapshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.peer-settlement-audit-snapshot {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.peer-settlement-audit-snapshot > strong {
  display: block;
  margin-bottom: 7px;
}

.peer-settlement-audit-snapshot ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.peer-settlement-audit-snapshot li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.peer-settlement-audit-snapshot li:first-child {
  padding-top: 0;
  border-top: 0;
}

.peer-settlement-audit-snapshot li > span,
.peer-settlement-audit-snapshot li > small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.peer-settlement-audit-receipt {
  display: grid !important;
  justify-content: stretch !important;
}

.peer-settlement-audit-receipt small {
  color: var(--muted);
}

.text-danger {
  color: #b42318;
}

@media (max-width: 900px) {
  .peer-settlement-live-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .peer-settlement-audit-snapshots {
    grid-template-columns: 1fr;
  }
}

.inventory-table th {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  line-height: 1.25;
  min-width: 86px;
  vertical-align: middle;
}

.inventory-table td {
  min-width: 86px;
}

#inventoryTable .export-select-col {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  background: #fff;
}

#inventoryTable th.export-select-col {
  z-index: 9;
  background: var(--panel-soft);
}

#inventoryTable th:nth-child(2),
#inventoryTable td:nth-child(2),
#inventoryTable th:nth-child(3),
#inventoryTable td:nth-child(3) {
  position: sticky;
  z-index: 4;
  background: #fff;
}

#inventoryTable thead th:nth-child(2),
#inventoryTable thead th:nth-child(3) {
  z-index: 8;
  background: var(--panel-soft);
}

#inventoryTable th:nth-child(2),
#inventoryTable td:nth-child(2) {
  left: 42px;
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

#inventoryTable th:nth-child(3),
#inventoryTable td:nth-child(3) {
  left: 182px;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.45);
}

.inventory-table th:nth-child(2),
.inventory-table td:nth-child(2),
.inventory-table th:nth-child(22),
.inventory-table td:nth-child(22),
.inventory-table th:nth-child(26),
.inventory-table td:nth-child(26) {
  min-width: 150px;
}

.logistics-cell {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.visit-filter-toolbar {
  margin: 10px 0 12px;
  align-items: end;
  flex-wrap: wrap;
}

.visit-filter-toolbar label {
  min-width: 180px;
}

#visitSecondaryBackendFilterField[hidden] { display: none; }
.visit-filter-toolbar.visit-first-failed-filters { flex-wrap: wrap; }
.visit-filter-toolbar.visit-first-failed-filters .visit-announcement { flex-basis: 260px; }

.visit-announcement {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 20px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.visit-announcement[hidden] { display: none; }
.visit-announcement-label {
  flex: none;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  padding: 10px 20px 10px 0;
  border-right: 1px solid var(--line);
}
.visit-announcement-content {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 80px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
}
.visit-announcement-edit { display: inline-flex; align-items: center; gap: 5px; flex: none; white-space: nowrap; }
.visit-announcement-edit .icon-svg { width: 18px; height: 18px; }
.visit-announcement-editor { flex: 1; min-width: 0; }
.visit-announcement-editor textarea { display: block; width: 100%; min-height: 60px; resize: vertical; font-size: 14px; }
.visit-announcement-editor .danger-text { font-size: 12px; }
.visit-announcement-actions { display: grid; gap: 5px; flex: none; }
@media (max-width: 720px) {
  .visit-filter-toolbar { flex-wrap: wrap; }
  .visit-announcement { grid-column: 1 / -1; flex-basis: 100%; margin-left: 0; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  #view-visitOrders .visit-announcement { grid-column: 1 / -1; gap: 10px; }
  .visit-announcement-label { padding-right: 10px; font-size: 14px; }
  .visit-announcement-editor textarea { font-size: 16px; min-height: 88px; }
  .visit-announcement-edit, .visit-announcement-actions .text-button { min-height: 44px; min-width: 44px; }
}

.visit-record-summary,
.visit-record-summary-wrap {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.visit-record-summary strong,
.visit-record-summary .muted {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Secondary follow-up and recording actions share a baseline, including empty summaries. */
.visit-secondary-record-content {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: calc(3em + 5px);
  line-height: 1.5;
}

.visit-secondary-record-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
}

.visit-secondary-record-actions .text-button {
  margin: 0;
  padding: 0;
  line-height: 1.5;
  white-space: nowrap;
}

.ai-text-button {
  justify-self: start;
}

.visit-record-detail-modal {
  max-width: 760px;
}

.visit-record-detail-list {
  display: grid;
  gap: 10px;
}

.visit-record-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.visit-record-detail-card p {
  margin: 6px 0 0;
}

.ai-suggestion-modal {
  max-width: 760px;
}

.ai-result-panel {
  display: grid;
  gap: 12px;
}

.ai-notice {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
}

.ai-result-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.ai-result-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ai-result-section p,
.ai-result-section ul {
  margin: 0;
}

.ai-result-section ul {
  padding-left: 18px;
}

.ai-review-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-review-tabs {
  margin-bottom: 0;
}

.ai-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.ai-suggestion-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft, #f7f9fc);
}

.ai-suggestion-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ai-suggestion-filter span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e8edf7;
  color: inherit;
  font-size: 12px;
  text-align: center;
}

.ai-suggestion-filter.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgb(15 23 42 / 10%);
  font-weight: 600;
}

.ai-suggestion-filter.is-active span {
  background: rgb(59 91 219 / 10%);
}

.ai-review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.ai-review-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ai-candidate-content {
  min-width: 0;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #f8fafc;
}

.ai-candidate-content summary {
  padding: 10px 12px;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
}

.ai-candidate-content-body {
  max-height: 420px;
  overflow: auto;
  padding: 0 12px 12px;
  color: #243247;
  line-height: 1.65;
}

.ai-candidate-content-body h4 {
  margin: 14px 0 6px;
  color: #172033;
  font-size: 14px;
}

.ai-candidate-content-body p {
  margin: 4px 0;
}

.ai-candidate-content-bullet {
  padding-left: 15px;
  position: relative;
}

.ai-candidate-content-bullet::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--primary);
}

.ai-candidate-content-step {
  font-weight: 500;
}

.ai-candidate-content-space {
  height: 5px;
}

.ai-knowledge-material-shell {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-knowledge-material-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-knowledge-material-toolbar h3,
.ai-knowledge-material-toolbar p,
.ai-knowledge-material-preview {
  margin: 0;
}

.ai-knowledge-material-toolbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-material-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-knowledge-material-preview {
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-knowledge-organizer-result {
  display: grid;
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
}

.ai-knowledge-organizer-result.is-error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.ai-knowledge-organizer-result summary {
  cursor: pointer;
  font-weight: 700;
}

.ai-knowledge-organizer-result ul,
.ai-knowledge-organizer-result p {
  margin: 0;
}

.ai-knowledge-organizer-result ul {
  padding-left: 18px;
}

.ai-knowledge-source-modal pre {
  max-height: min(62vh, 620px);
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font: inherit;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-knowledge-department-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ai-knowledge-department-field legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-department-field legend em {
  margin-right: 3px;
  color: #dc2626;
  font-style: normal;
}

.ai-knowledge-department-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-knowledge-upload-area {
  padding: 16px;
  border: 1px dashed #a9b8d5;
  border-radius: 10px;
  background: #f8faff;
  transition: border-color .15s, background .15s;
}
.ai-knowledge-upload-area:focus,
.ai-knowledge-upload-area.is-dragging { outline: 2px solid #4963ff; outline-offset: 2px; background: #edf2ff; }
.ai-knowledge-upload-area > p { margin: 8px 0 0; }
.ai-knowledge-upload-list { display: grid; gap: 8px; margin-top: 10px; }
.ai-knowledge-upload-file { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ai-knowledge-upload-file img { width: 52px; height: 52px; object-fit: contain; border-radius: 5px; background: #f1f4f8; }
.ai-knowledge-upload-file > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ai-knowledge-upload-file small { display: block; color: var(--muted); }
.ai-knowledge-upload-document { flex: 0 0 52px !important; text-align: center; font-size: 12px; color: #64748b; }
.ai-knowledge-original-image { margin: 14px 0; }
.ai-knowledge-original-image > button { display: block; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fc; cursor: zoom-in; }
.ai-knowledge-original-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 420px; margin: auto; object-fit: contain; }
.ai-knowledge-original-image p { color: var(--muted); overflow-wrap: anywhere; font-size: 12px; }
.ai-knowledge-image-recognition { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-knowledge-recognition-consent { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 12px; }
.ai-knowledge-recognition-consent input { flex: 0 0 16px; width: 16px; height: 16px; margin: 1px 0 0; }

.ai-knowledge-department-option {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.ai-knowledge-department-option:has(input:checked) {
  border-color: #8ea9ff;
  background: #f2f6ff;
  color: #2457d6;
}

.ai-knowledge-department-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.ai-knowledge-department-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.ai-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ai-feedback-list {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-feedback-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.ai-feedback-item span {
  color: var(--muted);
  margin-left: 8px;
  font-size: 12px;
}

.ai-feedback-item p {
  margin: 6px 0 0;
}

.ai-feedback-item.is-supervisor {
  background: #fff7ed;
}

.ai-employee-feedback-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffaf5;
}

.ai-employee-feedback-head,
.ai-employee-feedback-entry > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ai-employee-feedback-head span,
.ai-employee-feedback-entry > div span {
  color: var(--muted);
  font-size: 12px;
}

.ai-employee-feedback-entry {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid #ffedd5;
}

.ai-employee-feedback-entry p {
  margin: 0;
  line-height: 1.6;
}

.ai-employee-feedback-entry p span {
  color: var(--muted);
}

.ai-model-trace {
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
}

.ai-model-trace.is-live {
  color: #047857;
  background: #ecfdf5;
}

.ai-model-config-shell {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-model-config-head,
.ai-model-provider-title,
.ai-model-provider-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-model-config-head h3,
.ai-model-route-panel h3 {
  margin: 0;
}

.ai-model-config-head p,
.ai-model-provider-title span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ai-model-provider-title > div {
  display: flex;
  flex-direction: column;
}

.ai-model-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-model-provider-card,
.ai-model-route-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.ai-model-provider-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-model-provider-card > .ai-model-provider-title,
.ai-model-provider-card > .ai-model-provider-foot,
.ai-model-provider-card > small {
  grid-column: 1 / -1;
}

.ai-model-provider-card label:not(.compact-check) {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.ai-model-provider-card input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #fff;
}

.compact-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ai-model-route-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-model-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ai-model-route-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.ai-model-route-grid span,
.ai-model-security-note {
  color: var(--muted);
  font-size: 12px;
}

.ai-boss-review-advice {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe6ff;
  border-radius: 10px;
  background: #f7f9ff;
  color: #334155;
}

.ai-boss-review-advice > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-boss-review-advice span {
  color: #64748b;
  font-size: 12px;
}

.ai-boss-review-advice p {
  margin: 8px 0 0;
}

@media (max-width: 860px) {
  .ai-model-provider-grid,
  .ai-model-provider-card,
  .ai-model-route-grid,
  .ai-knowledge-material-list {
    grid-template-columns: 1fr;
  }

  .ai-knowledge-material-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-knowledge-department-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ai-activity-meta {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.ai-activity-meta strong {
  color: var(--text);
}

.ai-supervisor-form textarea {
  resize: vertical;
}

.ai-supervisor-form {
  display: grid;
  gap: 12px;
}

.ai-supervisor-object-bar,
.ai-supervisor-card,
.ai-supervisor-knowledge-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ai-supervisor-object-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  background: #f8fafc;
}

.ai-supervisor-object-bar > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ai-supervisor-object-bar span,
.ai-supervisor-object-meta {
  color: var(--muted);
  font-size: 12px;
}

.ai-supervisor-object-bar strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-supervisor-object-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-supervisor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: 12px;
  align-items: start;
}

.ai-supervisor-card {
  min-width: 0;
  padding: 14px;
}

.ai-supervisor-card-head,
.ai-supervisor-knowledge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-supervisor-card-head h3,
.ai-supervisor-knowledge-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 16px;
}

.ai-supervisor-eyebrow {
  color: var(--muted);
  font-size: 11px;
}

.ai-supervisor-summary-block {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8fc;
}

.ai-supervisor-summary-block > span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.ai-supervisor-summary-block p {
  margin: 5px 0 0;
  line-height: 1.6;
}

.ai-supervisor-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.ai-supervisor-analysis-grid section {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ai-supervisor-analysis-grid h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.ai-supervisor-analysis-grid ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.ai-supervisor-evidence-card .ai-employee-feedback-panel {
  margin-top: 10px;
}

.ai-supervisor-decision-card {
  display: flex;
  flex-direction: column;
}

.ai-supervisor-decision-grid,
.ai-supervisor-candidate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-supervisor-decision-grid {
  margin-top: 12px;
}

.ai-supervisor-comment {
  margin-top: 10px;
}

.ai-supervisor-comment textarea {
  min-height: 148px;
}

.ai-supervisor-decision-tip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.ai-supervisor-knowledge-card {
  padding: 12px 14px 14px;
}

.ai-supervisor-candidate-toggle {
  min-height: 32px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #c9d7ff;
  border-radius: 999px;
  background: #f3f6ff;
  color: #285fd8;
  cursor: pointer;
}

.ai-supervisor-candidate-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.ai-supervisor-candidate-fields {
  margin-top: 12px;
}

.ai-supervisor-candidate-fields .full {
  grid-column: 1 / -1;
}

.ai-supervisor-candidate-fields[hidden] {
  display: none;
}

.ai-supervisor-candidate-fields textarea {
  min-height: 118px;
}

.ai-supervisor-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 2px;
}

.ai-supervisor-footer .form-status {
  flex: 1 1 auto;
}

@media (max-width: 760px) {
  .ai-supervisor-object-bar,
  .ai-supervisor-object-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-supervisor-object-meta {
    gap: 3px;
  }

  .ai-supervisor-workspace,
  .ai-supervisor-analysis-grid,
  .ai-supervisor-decision-grid,
  .ai-supervisor-candidate-fields {
    grid-template-columns: 1fr;
  }

  .ai-supervisor-candidate-fields .full {
    grid-column: auto;
  }
}

.visit-appointment-cell {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.visit-appointment-cell strong {
  font-size: 13px;
}

.visit-appointment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.visit-appointment-history-modal {
  display: grid;
  gap: 10px;
}

.visit-appointment-history {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.visit-appointment-history-item {
  display: grid;
  gap: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.visit-appointment-history-item span {
  color: var(--text);
}

.visit-appointment-history-item em {
  font-style: normal;
  color: var(--muted);
}

.visit-appointment-history-item p {
  margin: 0;
  color: var(--muted);
}

.visit-customer-cell,
.visit-follow-cell,
.call-record-cell {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.fulfillment-items-cell {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.fulfillment-item-line {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.fulfillment-item-line strong,
.fulfillment-item-line span {
  font-size: 12px;
  line-height: 1.35;
}

.fulfillment-item-line span {
  color: var(--muted);
}

.visit-follow-cell {
  min-width: 260px;
  max-width: 360px;
}

.visit-follow-list {
  display: grid;
  gap: 6px;
}

.visit-follow-item,
.call-record-item {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.visit-follow-item strong,
.call-record-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.visit-follow-item p,
.call-record-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.call-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.logistics-link {
  max-width: 240px;
  text-align: left;
  white-space: normal;
}

.logistics-record {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.logistics-record h3 {
  margin: 0;
  font-size: 15px;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-soft);
  color: #3b4652;
  font-weight: 700;
}

.data-table thead .table-filter-row th {
  top: 44px;
  z-index: 3;
  padding: 8px 10px;
}

.table-filter-row input,
.table-filter-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 8px;
  font-size: 12px;
}

.table-filter-row input + input,
.table-filter-row select + select {
  margin-top: 6px;
}

.table-filter-reset {
  width: 100%;
}

.data-table th .mini-button {
  width: 100%;
  min-height: 28px;
  margin-top: 6px;
  padding: 0 8px;
  font-size: 12px;
}

.compact-table {
  min-width: 900px;
}

.data-table .select-col,
.data-table td:has([data-select-lead]) {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.data-table input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
}

#leadTable {
  table-layout: fixed;
}

#ecommerceTable {
  table-layout: fixed;
}

#visitOrderTable {
  table-layout: fixed;
}

#leadTable th,
#leadTable td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: middle;
}

#leadTable th {
  height: 38px;
}

#ecommerceTable th,
#ecommerceTable td {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
  vertical-align: middle;
}

#ecommerceTable th {
  height: 40px;
}

#leadTable td {
  overflow: hidden;
}

#ecommerceTable td {
  overflow: hidden;
}

#leadTable .select-col,
#leadTable td:has([data-select-lead]) {
  padding-left: 6px;
  padding-right: 6px;
}

.lead-table-header-cell,
.sales-traffic-table-header-cell {
  position: sticky;
  overflow: visible;
  user-select: none;
}

.ecommerce-table-header-cell {
  position: sticky;
  overflow: visible;
  user-select: none;
}

.visit-table-header-cell {
  position: sticky;
  overflow: visible;
  user-select: none;
}

.lead-th-content {
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
}

#visitOrderTable .lead-th-content {
  white-space: nowrap;
  text-overflow: ellipsis;
}

#leadTable .sticky-lead-col {
  position: sticky;
  z-index: 4;
  background: #fff;
}

#leadTable th.sticky-lead-col {
  z-index: 8;
  background: var(--panel-soft);
}

#leadTable .sticky-lead-col[data-lead-cell="phone"],
#leadTable th.sticky-lead-col[data-lead-column="phone"] {
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.35);
}

#leadTable tbody tr.lead-table-row.has-high-value-tag > td {
  background: #edf8ff;
}

#leadTable tbody tr.lead-table-row.has-high-value-tag:hover > td {
  background: #e0f2ff;
}

#leadTable tbody tr.owner-contact-receipt-pending > td,
#salesTrafficTable tbody tr.owner-contact-receipt-pending > td {
  background: #fff4bf;
}

#leadTable tbody tr.owner-contact-receipt-pending:hover > td,
#salesTrafficTable tbody tr.owner-contact-receipt-pending:hover > td {
  background: #ffeaa0;
}

.lead-new-assignment-summary {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #9fc0ff;
  border-radius: 10px;
  background: #edf4ff;
  color: #173b78;
}

.lead-new-assignment-summary[hidden] {
  display: none;
}

.lead-new-assignment-summary > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-new-assignment-summary > div > div {
  min-width: 0;
}

.lead-new-assignment-summary strong,
.lead-new-assignment-summary span {
  display: block;
}

.lead-new-assignment-summary span:not(.lead-new-assignment-count) {
  margin-top: 2px;
  color: #506b96;
  font-size: 13px;
}

.lead-follow-todo-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.lead-follow-todo-summary-chips em {
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  color: #34517f;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.lead-follow-todo-summary-chips em.overdue {
  background: #ffe5e5;
  color: #b42318;
}

.lead-follow-todo-summary-chips em.new-assignment,
.lead-follow-todo-summary-chips em.unfollowed {
  background: #dce8ff;
  color: #2456bf;
}

.lead-follow-todo-summary-chips em.missing-intention,
.lead-follow-todo-summary-chips em.due-today {
  background: #fff0bf;
  color: #8a4b08;
}

.lead-new-assignment-count {
  display: grid !important;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #3164df;
  color: #fff;
  font-weight: 800;
}

#leadTable tbody tr.lead-table-row.is-new-public-assignment > td {
  background: #edf4ff;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-unfollowed > td {
  background: #edf4ff;
}

#leadTable tbody tr.lead-table-row.is-new-public-assignment:hover > td {
  background: #dfeaff;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-unfollowed:hover > td {
  background: #dfeaff;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-overdue > td {
  background: #fff0f0;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-overdue:hover > td {
  background: #ffe3e3;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-missing-intention > td,
#leadTable tbody tr.lead-table-row.is-follow-todo-due-today > td {
  background: #fff9df;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-missing-intention:hover > td,
#leadTable tbody tr.lead-table-row.is-follow-todo-due-today:hover > td {
  background: #fff1bd;
}

#leadTable tbody tr.lead-table-row.is-follow-todo-due-tomorrow > td,
#leadTable tbody tr.lead-table-row.is-follow-todo-due-day-after > td,
#leadTable tbody tr.lead-table-row.is-follow-todo-due-this-week > td {
  background: #f5f8ff;
}

.lead-new-assignment-badge {
  width: max-content;
  max-width: 100%;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #3164df;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.lead-follow-todo-badge {
  width: max-content;
  max-width: 100%;
  margin-bottom: 5px;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
  color: #4b607d;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-follow-todo-badge.new-assignment,
.lead-follow-todo-badge.unfollowed {
  background: #3164df;
  color: #fff;
}

.lead-follow-todo-badge.overdue {
  background: #d92d20;
  color: #fff;
}

.lead-follow-todo-badge.missing-intention,
.lead-follow-todo-badge.due-today {
  background: #f59e0b;
  color: #fff;
}

.lead-follow-todo-badge.due-tomorrow,
.lead-follow-todo-badge.due-day-after,
.lead-follow-todo-badge.due-this-week {
  background: #dce8ff;
  color: #2456bf;
}

#ecommerceTable .sticky-ecommerce-col {
  position: sticky;
  z-index: 4;
  background: #fff;
}

#ecommerceTable th.sticky-ecommerce-col {
  z-index: 8;
  background: var(--panel-soft);
}

#ecommerceTable .sticky-ecommerce-col[data-ecommerce-cell="platformCustomerId"],
#ecommerceTable th.sticky-ecommerce-col[data-ecommerce-column="platformCustomerId"] {
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.35);
}

#ecommerceTable tbody tr.ecommerce-table-row.has-high-value-tag > td {
  background: #edf8ff;
}

#ecommerceTable tbody tr.ecommerce-table-row.has-high-value-tag:hover > td {
  background: #e0f2ff;
}

#visitOrderTable .export-select-col {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
}

#visitOrderTable th.export-select-col {
  z-index: 9;
  background: var(--panel-soft);
}

#visitOrderTable .sticky-visit-col {
  position: sticky;
  z-index: 4;
  background: #fff;
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.35);
}

#visitOrderTable th.sticky-visit-col {
  z-index: 8;
  background: var(--panel-soft);
}

@media (max-width: 720px) {
  #view-visitOrders .fulfillment-table-wrap {
    scrollbar-gutter: auto;
    -webkit-overflow-scrolling: touch;
  }

  #visitOrderTable td.export-select-col,
  #visitOrderTable td.sticky-visit-col {
    position: static;
    left: auto !important;
    z-index: auto;
    box-shadow: none;
  }

  #visitOrderTable th.export-select-col,
  #visitOrderTable th.sticky-visit-col {
    left: auto !important;
    box-shadow: none;
  }
}

#shippingOrderTable {
  min-width: 2072px;
  table-layout: auto;
}

#shippingOrderTable th {
  min-width: 108px;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

#shippingOrderTable .shipping-created-date-col {
  min-width: 112px;
  white-space: nowrap;
}

#shippingOrderTable .shipping-primary-follow-col {
  min-width: 220px;
}

#shippingOrderTable .shipping-primary-follow-cell {
  display: grid;
  gap: 8px;
  min-width: 220px;
  max-width: 320px;
}

#shippingOrderTable .shipping-primary-follow-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#shippingOrderTable .shipping-primary-follow-summary > strong,
#shippingOrderTable .shipping-primary-follow-summary > .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#shippingOrderTable .shipping-primary-follow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#shippingOrderTable .shipping-primary-follow-actions > button {
  min-height: 32px;
}

@media (max-width: 720px) {
  #shippingOrderTable .shipping-primary-follow-actions > button { min-height: 44px; }
}

#shippingOrderTable th:nth-child(4) {
  min-width: 210px;
}

#shippingOrderTable th:nth-child(5) {
  min-width: 180px;
}

#shippingOrderTable th:nth-child(7) {
  min-width: 220px;
}

#shippingOrderTable th:nth-child(8) {
  min-width: 180px;
}

#shippingOrderTable th:last-child {
  min-width: 220px;
}

#shippingOrderTable .shipping-order-actions {
  display: grid;
  gap: 6px;
  width: 216px;
  max-width: 100%;
}

#shippingOrderTable .shipping-order-primary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

#shippingOrderTable .shipping-order-primary-actions > .row-actions {
  grid-column: 1 / -1;
  min-width: 0;
}

#shippingOrderTable .shipping-order-primary-actions:has([data-action="cancel-shipping-order"]) > .row-actions {
  grid-column: 1;
}

#shippingOrderTable .shipping-order-primary-actions > [data-action="shipping-correction-history"] {
  grid-column: 1 / -1;
}

#shippingOrderTable .shipping-order-actions .inline-select,
#shippingOrderTable .shipping-order-primary-actions > [data-action="cancel-shipping-order"],
#shippingOrderTable .shipping-order-actions > .backend-order-check-button {
  box-sizing: border-box;
  height: 32px;
  margin: 0;
}

#shippingOrderTable .shipping-order-actions .inline-select,
#shippingOrderTable .shipping-order-actions > .backend-order-check-button {
  width: 100%;
  min-width: 0;
}

#shippingOrderTable .export-select-col {
  position: sticky;
  left: 0;
  z-index: 5;
  box-sizing: border-box;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  background: #fff;
}

#shippingOrderTable th.export-select-col {
  z-index: 10;
  background: var(--panel-soft);
}

#shippingOrderTable .shipping-customer-col {
  position: sticky;
  left: 42px;
  z-index: 4;
  box-sizing: border-box;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  background: #fff;
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.4);
}

#shippingOrderTable th.shipping-customer-col {
  z-index: 9;
  background: var(--panel-soft);
}

#recycleTable .export-select-col {
  position: sticky;
  left: 0;
  z-index: 5;
  box-sizing: border-box;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  padding-left: 6px;
  padding-right: 6px;
  background: #fff;
}

#recycleTable th.export-select-col {
  z-index: 9;
  background: var(--panel-soft);
}

#recycleTable .sticky-recycle-col {
  position: sticky;
  z-index: 4;
  box-sizing: border-box;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
  background: #fff;
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.35);
}

#recycleTable th.sticky-recycle-col {
  z-index: 8;
  background: var(--panel-soft);
}

.column-resizer {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  width: 16px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  background: transparent;
}

.column-resizer:hover::after,
body.is-resizing-column .column-resizer::after {
  background: var(--blue);
}

body.is-resizing-column {
  cursor: col-resize;
  user-select: none;
}

#leadTable .link-button,
#leadTable .text-button {
  font-size: 12px;
  line-height: 1.2;
}

#leadTable .customer-cell strong,
#leadTable .item-cell strong {
  margin-bottom: 2px;
  font-size: 12px;
  line-height: 1.2;
}

#leadTable .muted {
  font-size: 11px;
  line-height: 1.2;
}

#leadTable [data-lead-cell="latest"] {
  max-height: 58px;
  overflow: hidden;
}

.lead-latest-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lead-latest-line {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.lead-latest-line > span {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lead-follow-edit-button {
  flex: 0 0 22px;
  margin-top: 8px;
  transform: translateY(3px);
}

.quick-follow-modal {
  max-width: 920px;
}

.quick-follow-current {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #f7faff;
}

.quick-follow-current span {
  color: var(--muted);
  font-size: 12px;
}

.quick-follow-current strong {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

#leadTable [data-lead-cell="tags"] {
  white-space: normal;
}

.compact-list {
  display: grid;
  gap: 2px;
}

.compact-list span,
.compact-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list small {
  color: var(--muted);
}

.mini-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-stack-item {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mini-stack-item strong,
.mini-stack-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-stack-item small {
  color: var(--muted);
  font-weight: 500;
}

.ecommerce-tag-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lead-tag-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 240px;
}

.ecommerce-tag-line,
.lead-tag-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.ecommerce-tag-cell .tag-line,
.lead-tag-cell .tag-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.deposit-shipping-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #f0c36d;
  border-radius: 10px;
  background: #fff9e9;
}

.deposit-shipping-pending-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.deposit-shipping-pending.is-compact {
  align-items: flex-start;
  flex-direction: column;
  padding: 7px 8px;
}

.deposit-shipping-pending.is-detail {
  margin: 0 0 2px;
  padding: 12px 14px;
}

.deposit-shipping-pending.is-detail .deposit-shipping-pending-copy {
  font-weight: 600;
}

@media (max-width: 760px) {
  .deposit-shipping-pending.is-detail {
    align-items: stretch;
    flex-direction: column;
  }

  .deposit-shipping-pending.is-detail .secondary-button {
    width: 100%;
  }
}

.ecommerce-follow-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ecommerce-chat-record-cell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding-right: 30px;
  box-sizing: border-box;
}

.ecommerce-chat-record-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ecommerce-chat-record-summary strong,
.ecommerce-chat-record-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecommerce-chat-record-summary span {
  color: var(--muted);
  font-size: 12px;
}

.ecommerce-chat-record-thumbnails {
  grid-column: 1 / -1;
  display: flex;
  gap: 5px;
}

.ecommerce-chat-record-thumbnail {
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.ecommerce-chat-record-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ecommerce-chat-edit-button {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
}

.ecommerce-chat-record-cell:hover .field-edit-button,
.ecommerce-chat-record-cell:focus-within .field-edit-button,
.ecommerce-chat-record-cell .field-edit-button:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.ecommerce-chat-record-cell:focus-visible {
  outline: 2px solid rgba(47, 101, 234, 0.28);
  outline-offset: 2px;
  border-radius: 4px;
}

.ecommerce-chat-record-history {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ecommerce-chat-record-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
}

.ecommerce-chat-record-card p {
  margin: 8px 0 0;
  color: #34404b;
}

.fulfillment-chat-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 6px;
  padding: 5px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
  font: inherit;
}

.fulfillment-chat-summary:hover {
  border-color: #60a5fa;
  background: #dbeafe;
}

.fulfillment-chat-summary strong {
  font-size: 12px;
}

.fulfillment-communication-cell {
  display: grid;
  gap: 7px;
  min-width: 170px;
  max-width: 250px;
}

.fulfillment-communication-row {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fulfillment-communication-row strong {
  color: #334155;
  font-size: 12px;
}

.fulfillment-communication-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfillment-chat-history {
  display: grid;
  gap: 12px;
}

.fulfillment-chat-history-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.fulfillment-chat-history-card p {
  margin: 8px 0;
  white-space: pre-wrap;
}

.fulfillment-chat-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.ecommerce-addable-cell {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.ecommerce-addable-value {
  min-width: 0;
  flex: 1;
}

.ecommerce-field-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.field-edit-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.shipping-courier-number-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shipping-logistics-inline-edit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}

.shipping-logistics-inline-edit > span,
.shipping-logistics-inline-edit > .logistics-link {
  min-width: 0;
}

.shipping-logistics-edit-button {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  padding: 3px;
  border: 0;
  background: transparent;
}

.shipping-logistics-inline-edit:hover .shipping-logistics-edit-button,
.shipping-logistics-inline-edit:focus-within .shipping-logistics-edit-button,
.shipping-logistics-edit-button:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.shipping-logistics-inline-edit:focus-visible {
  outline: 2px solid rgba(47, 101, 234, 0.28);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (hover: none), (pointer: coarse) {
  .shipping-logistics-edit-button {
    opacity: 0.72;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}

.ecommerce-addable-cell:hover .field-edit-button,
.ecommerce-addable-cell:focus-within .field-edit-button,
.field-edit-button:focus-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.ecommerce-addable-cell:focus-visible {
  outline: 2px solid rgba(47, 101, 234, 0.28);
  outline-offset: 2px;
  border-radius: 4px;
}

.ecommerce-field-mode-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f7fa;
}

.ecommerce-field-mode-button {
  width: 28px;
  min-width: 28px;
  height: 26px;
  min-height: 26px;
}

.ecommerce-field-mode-button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.ecommerce-field-add-mode-button {
  font-size: 20px;
  line-height: 1;
}

.ecommerce-field-entry-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ecommerce-field-entry-choice {
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.ecommerce-field-entry-choice:hover {
  border-color: #9fb4df;
  color: var(--text);
}

.ecommerce-field-entry-choice.active {
  border-color: var(--blue);
  background: #eef4ff;
  color: var(--blue);
}

.ecommerce-field-manager-content {
  margin: 0;
}

.ecommerce-field-edit-input {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ecommerce-field-edit-input > label:only-child {
  grid-column: 1 / -1;
}

.performance-allocation-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.allocation-editor {
  display: grid;
  gap: 10px;
}

.allocation-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 160px) auto;
  gap: 10px;
  align-items: end;
}

.follow-snippet {
  display: grid;
  gap: 1px;
}

.follow-snippet strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.35;
}

.follow-snippet span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecommerce-follow-history {
  display: grid;
  gap: 10px;
}

.follow-history-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.follow-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.compact-action {
  width: fit-content;
  font-size: 12px;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.customer-cell strong,
.item-cell strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.link-button {
  display: block;
  width: fit-content;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
}

.customer-title-row,
.phone-line,
.tag-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.customer-title-row {
  align-items: flex-start;
}

/* v762 manual entry classification only; does not alter other form/radio or table rules. */
.manual-lead-kind-choice762 {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.manual-lead-kind-choice762 legend { padding: 0 4px; font-size: 13px; }
.manual-lead-kind-options762 { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.manual-lead-kind-options762 label { display: inline-flex; align-items: center; gap: 6px; }
.manual-lead-kind-options762 input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}
.manual-lead-kind-choice762 small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.6; }
.manual-lead-old762 { flex: none; white-space: nowrap; font-size: 11px; }
.manual-lead-kind-detail762 { align-items: center; }
.manual-lead-kind-detail762 > button { justify-self: start; }

.mini-icon-button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6b7785;
  vertical-align: middle;
}

.mini-icon-button:hover {
  color: #475569;
  background: #f1f5f9;
}

.name-edit-button {
  opacity: 0;
}

.customer-cell:hover .name-edit-button,
.customer-cell:focus-within .name-edit-button {
  opacity: 1;
}

.icon-svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 180px;
}

.lead-city-line {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  text-align: left;
}

.phone-cell.is-revealed .phone-value {
  color: var(--blue);
}

.phone-eye-button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6b7785;
  padding: 0;
}

.phone-eye-button:hover,
.phone-cell.is-revealed .phone-eye-button {
  color: #475569;
  background: #f1f5f9;
}

.tag-cell {
  max-width: 240px;
  min-width: 0;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.tag-inline {
  min-width: 0;
  max-width: calc(100% - 26px);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.tag-inline .tag {
  flex: 0 0 auto;
  margin: 0;
}

.tag-edit-button {
  flex: 0 0 22px;
}

.customer-cell span,
.item-cell span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 8px;
  margin: 0 4px 4px 0;
  font-size: 12px;
  background: var(--blue-soft);
  color: #1d4ed8;
  border: 1px solid transparent;
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.pill.gray {
  background: #edf1f4;
  color: #4c5965;
}

.mini-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-pill-list .pill {
  margin: 0;
}

.lead-follow-reminder {
  display: grid;
  gap: 2px;
  align-items: start;
}

.lead-follow-reminder-stack {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.lead-follow-reminder .pill {
  width: max-content;
  max-width: 100%;
  margin-bottom: 0;
}

.lead-follow-reminder small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.follow-value-rule-section {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 16px;
}

/* 跟单规则配置：意向度与价值规则双栏工作台 */
.follow-rule-manager-panel {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
}

.follow-rule-manager-panel > .settings-summary {
  padding-bottom: 8px;
}

.follow-rule-redistribution-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.follow-rule-toolbar-title {
  padding-right: 14px;
  border-right: 1px solid var(--line);
  color: #202b3c;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.follow-rule-toolbar-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.follow-rule-toolbar-field input,
.follow-rule-toolbar-field select {
  width: 76px;
  min-height: 34px;
  padding: 0 9px;
}

.follow-rule-toolbar-select select {
  width: 84px;
}

.follow-rule-toolbar-field em {
  color: var(--muted);
  font-style: normal;
}

.follow-rule-redistribution-toolbar .form-status {
  min-width: 0;
  min-height: 0;
  flex: 1;
  margin: 0;
  text-align: right;
}

.follow-rule-redistribution-toolbar .primary-button {
  flex: 0 0 auto;
}

.follow-rule-manager-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: start;
}

.follow-rule-workspace {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.follow-rule-column-header,
.follow-rule-editor-heading,
.follow-rule-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.follow-rule-column-header h3 {
  margin: 0;
  color: #172033;
  font-size: 17px;
}

.follow-rule-column-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.follow-rule-column-header > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #315fc5;
  font-size: 11px;
}

.follow-rule-card-list {
  display: grid;
  gap: 6px;
}

.follow-rule-summary-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.follow-rule-summary-card.selected {
  border-color: #7998ff;
  background: #f5f8ff;
  box-shadow: 0 0 0 1px rgba(62, 99, 244, 0.08);
}

.follow-rule-intention-badge {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #65758b;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.follow-rule-intention-badge.a { background: #3e63f4; }
.follow-rule-intention-badge.b { background: #22a447; }
.follow-rule-intention-badge.c { background: #f47a1f; }
.follow-rule-intention-badge.d { background: #7c3aed; }

.follow-rule-summary-main {
  min-width: 0;
}

.follow-rule-summary-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.follow-rule-summary-name strong {
  color: #1e293b;
  font-size: 13px;
}

.follow-rule-summary-name span,
.follow-rule-summary-main p {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-rule-summary-main p {
  margin: 3px 0 0;
}

.follow-rule-card-actions,
.follow-value-rule-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.follow-rule-card-actions button,
.follow-value-rule-actions button {
  min-height: 28px;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
}

.follow-rule-card-actions button:hover,
.follow-value-rule-actions button:hover {
  background: #eef3ff;
}

.follow-rule-card-actions button.danger-text,
.follow-value-rule-actions button.danger-text {
  color: var(--red);
}

.follow-rule-compact-form,
.follow-value-rule-form {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.follow-rule-editor-heading {
  min-height: 32px;
}

.follow-rule-editor-heading strong {
  color: #253047;
  font-size: 13px;
}

.follow-rule-editor-heading .secondary-button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 11px;
}

.follow-rule-compact-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.follow-rule-compact-fields > label,
.follow-value-rule-fields > label {
  min-width: 0;
}

.follow-rule-compact-fields > label > span,
.follow-value-rule-fields > label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.follow-rule-compact-fields > label.full {
  grid-column: 1 / -1;
}

.follow-rule-compact-fields input,
.follow-rule-compact-fields select,
.follow-value-rule-fields input,
.follow-value-rule-fields select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.follow-rule-compact-form .follow-rule-schedule-editor {
  min-width: 0;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 7px;
}

.follow-rule-compact-form .follow-rule-schedule-title {
  align-items: center;
  margin-bottom: 7px;
}

.follow-rule-compact-form .follow-rule-schedule-title strong {
  font-size: 13px;
}

.follow-rule-compact-form .follow-rule-schedule-title span {
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follow-rule-compact-form .follow-rule-schedule-grid {
  gap: 5px;
}

.follow-rule-compact-form .follow-rule-schedule-row {
  grid-template-columns: 58px minmax(120px, 1fr) minmax(125px, 1fr);
  gap: 5px;
  padding: 6px 7px;
}

.follow-rule-compact-form .follow-rule-schedule-row > strong {
  font-size: 12px;
}

.follow-rule-compact-form .follow-rule-schedule-row label {
  gap: 3px;
  font-size: 11px;
  white-space: nowrap;
}

.follow-rule-compact-form .follow-rule-schedule-row input {
  width: 48px;
  min-height: 30px;
  padding: 0 5px;
}

.follow-rule-compact-form .follow-rule-preview {
  margin-top: 7px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.4;
}

.follow-rule-form-footer {
  min-width: 0;
  min-height: 34px;
}

.follow-rule-form-footer .form-status {
  min-height: 0;
  margin: 0;
}

.follow-rule-form-footer .primary-button {
  min-height: 34px;
  padding: 6px 12px;
  white-space: nowrap;
}

.follow-value-rule-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.follow-value-band-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.follow-value-band-tabs button {
  min-height: 38px;
  padding: 6px 9px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: #3a4658;
  font-size: 12px;
  font-weight: 650;
}

.follow-value-band-tabs button:last-child {
  border-right: 0;
}

.follow-value-band-tabs button:hover,
.follow-value-band-tabs button.selected {
  background: #f2f6ff;
  color: var(--blue);
}

.follow-value-band-tabs button.selected {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.tag-config-table.follow-value-rule-table {
  min-width: 0;
  table-layout: fixed;
}

.follow-value-rule-table th,
.follow-value-rule-table td {
  padding: 8px 6px;
  font-size: 11px;
  vertical-align: middle;
}

.follow-value-rule-table th:nth-child(1) { width: 25%; }
.follow-value-rule-table th:nth-child(2) { width: 48%; }
.follow-value-rule-table th:nth-child(3) { width: 11%; }
.follow-value-rule-table th:nth-child(4) { width: 16%; }

.follow-value-cycle-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.follow-value-cycle-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #d9e2f2;
  border-radius: 999px;
  background: #f8fafc;
  color: #42526b;
  white-space: nowrap;
}

.follow-value-cycle-chip b,
.follow-value-cycle-chip em {
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.follow-value-cycle-chip b {
  font-weight: 600;
}

.follow-value-cycle-chip em {
  color: #172b4d;
  font-weight: 750;
}

.follow-value-cycle-chip.recurring {
  border-color: #b9c9ff;
  background: #eef3ff;
  color: var(--blue);
}

.follow-value-rule-table tr.selected td {
  background: #f2f6ff;
}

.follow-value-rule-table td strong {
  display: block;
  color: #1e293b;
  font-size: 12px;
}

.follow-value-rule-table td .muted {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
}

.follow-value-rule-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.15fr 0.8fr 0.8fr 0.8fr;
  gap: 8px;
}

.follow-value-rule-form .value-cycle-deadline-editor {
  padding: 9px;
  border-radius: 7px;
}

.follow-value-rule-form .value-cycle-deadline-header {
  align-items: center;
  margin-bottom: 7px;
}

.follow-value-rule-form .value-cycle-deadline-header strong {
  font-size: 13px;
}

.follow-value-rule-form .value-cycle-deadline-header .secondary-button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 11px;
}

.follow-value-rule-form .value-cycle-deadline-rows {
  gap: 5px;
}

.follow-value-rule-form .value-cycle-deadline-row {
  grid-template-columns: 104px minmax(110px, 1fr) auto;
  gap: 7px;
  padding: 6px 7px;
}

.follow-value-rule-form .value-cycle-order {
  font-size: 11px;
}

.follow-value-rule-form .value-cycle-deadline-row label > span {
  display: none;
}

.follow-value-rule-form .value-cycle-days-input input {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.follow-value-rule-form .value-cycle-days-input em {
  min-width: 30px;
  font-size: 11px;
}

.follow-value-rule-form .value-cycle-deadline-row > button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 11px;
}

.follow-rule-manager-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid #e7ebf1;
  border-radius: 7px;
  background: #fafbfd;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1120px) {
  .follow-rule-manager-grid {
    grid-template-columns: 1fr;
  }

  .follow-rule-redistribution-toolbar {
    flex-wrap: wrap;
  }

  .follow-rule-redistribution-toolbar .form-status {
    order: 5;
    flex-basis: 100%;
  }
}

.value-cycle-deadline-editor {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.value-cycle-deadline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.value-cycle-deadline-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.value-cycle-deadline-rows {
  display: grid;
  gap: 8px;
}

.value-cycle-deadline-row {
  display: grid;
  grid-template-columns: 132px minmax(190px, 320px) auto;
  align-items: end;
  justify-content: start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.value-cycle-order {
  align-self: center;
  font-weight: 700;
}

.value-cycle-deadline-row label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.value-cycle-deadline-row label > span i {
  color: #dc2626;
  font-style: normal;
}

.value-cycle-days-input {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 34px;
  align-items: center;
}

.value-cycle-days-input input {
  min-height: 38px;
  border-radius: 6px 0 0 6px;
}

.value-cycle-days-input em {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: var(--panel-soft);
  color: var(--muted);
  font-style: normal;
}

.value-cycle-summary-chip {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .value-cycle-deadline-header {
    align-items: stretch;
    flex-direction: column;
  }

  .value-cycle-deadline-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.row-actions button {
  min-width: 44px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

#leadTable .row-actions {
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
}

#leadTable [data-lead-cell="actions"] {
  min-width: 170px;
}

#leadTable .row-actions button {
  min-width: 44px;
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.risk-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.risk-count.is-risk {
  background: var(--red-soft);
  color: var(--red);
}

.danger-text {
  color: var(--red);
}

.risk-row {
  background: #fff7f7;
}

.mini-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-image {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.mini-image.empty {
  background: #f3f5f7;
  color: var(--muted);
  cursor: default;
}

.backend-register-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  border-bottom: 1px solid var(--line);
}

.backend-register-tabs.dashboard-tabs {
  flex-wrap: nowrap;
  margin: 12px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.backend-register-tab {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.backend-register-tab.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.nav-inspection-quick {
  display: none;
}

#view-recycle.is-inspection-workspace > .list-panel > #recycleDashboardTabs,
#view-recycle.is-inspection-workspace > .list-panel > .recycle-dashboard-panels,
#view-recycle.is-inspection-workspace > .list-panel > .section-heading,
#view-recycle.is-inspection-workspace > .list-panel > #backendRegisterTabs {
  display: none;
}

.inspection-workspace {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.inspection-workspace[hidden] {
  display: none;
}

.inspection-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #edf3ff 0%, #f8fbff 100%);
  border: 1px solid #cbd9ff;
}

.inspection-workspace-head h2 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 24px;
}

.inspection-workspace-head p {
  margin: 0;
  color: var(--muted);
}

.inspection-workspace-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.inspection-search-field {
  display: grid;
  gap: 8px;
  max-width: 820px;
  color: var(--text);
  font-weight: 700;
}

.inspection-search-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.inspection-search-control {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(52, 91, 224, 0.12);
}

.inspection-search-control > span {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--blue);
  font-size: 26px;
}

.inspection-search-control input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 14px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.inspection-status-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.inspection-status-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.inspection-status-tabs button.is-active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 14px rgba(52, 91, 224, 0.22);
}

.inspection-result-summary {
  color: var(--muted);
  font-size: 13px;
}

.inspection-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.inspection-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.inspection-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inspection-card-topline > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.inspection-card-topline span,
.inspection-card-item > span,
.inspection-card-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.inspection-logistics-number {
  padding: 0;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.inspection-logistics-number.is-empty {
  color: var(--text);
  cursor: default;
}

.inspection-card-body {
  display: grid;
  gap: 14px;
}

.inspection-card-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 9px;
  background: var(--panel-soft);
}

.inspection-card-item strong {
  color: var(--text);
  font-size: 16px;
}

.inspection-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.inspection-card-meta div {
  min-width: 0;
}

.inspection-card-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 600;
}

.inspection-card-warning {
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff1f0;
  color: #b42318;
  font-size: 12px;
}

.inspection-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.inspection-card-actions button {
  min-height: 42px;
}

.inspection-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 180px;
  place-content: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.inspection-empty strong {
  color: var(--text);
  font-size: 17px;
}

.inspection-abnormal-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.inspection-abnormal-type-tabs {
  flex: 1 1 auto;
  margin: 0;
}

.inspection-abnormal-status-filter {
  display: grid;
  flex: 0 0 180px;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.inspection-abnormal-status-filter select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

@media (max-width: 760px) {
  .inspection-abnormal-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .inspection-abnormal-status-filter {
    flex-basis: auto;
  }
}

.visit-order-tabs {
  margin: 4px 0 10px;
  gap: 4px;
}

.visit-order-tabs .backend-register-tab {
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.visit-order-tabs .tab-count {
  margin-left: 0;
}

.visit-order-tabs .backend-register-tab.is-active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.inventory-tabs {
  margin-top: 2px;
}

.inventory-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.inventory-tabs-row .inventory-tabs {
  flex: 1;
  margin: 0;
}

.inventory-tabs-row > .secondary-button {
  flex: 0 0 auto;
}

.inventory-tab-panel[hidden] {
  display: none;
}

.inventory-filter-panel {
  margin: 0 0 12px;
}

.inventory-filter-panel .inventory-toolbar {
  padding: 0;
  border: 0;
  background: transparent;
}

.inventory-history-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1.6fr) repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
}

#outboundHistoryTable .export-select-col {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  background: #fff;
}

#outboundHistoryTable th.export-select-col {
  z-index: 9;
  background: var(--panel-soft);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf2ff;
  color: #2f5df5;
  font-size: 12px;
  font-weight: 700;
}

.backend-register-tab.is-active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.choice-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.choice-card strong,
.choice-card span {
  display: block;
}

.choice-card span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.appraisal-items-editor {
  display: grid;
  gap: 12px;
}

.appraisal-item-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.recycle-item-image-section {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.recycle-item-image-upload-grid label {
  min-width: 0;
}

.appraisal-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lead-item-quantity-actions {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lead-item-quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-overview-save-button {
  min-height: 40px;
  padding-inline: 18px;
}

.lead-overview-save-status {
  min-height: 0;
  margin-top: -4px;
  line-height: 1.5;
  text-align: right;
}

.lead-item-quantity-button {
  width: 38px;
  min-width: 38px;
  height: 36px;
  padding: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.lead-items-detail {
  display: grid;
  gap: 10px;
}

.lead-item-column-list {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

#leadTable .lead-item-column-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  min-width: 0;
}

.lead-item-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  line-height: 1.35;
}

#leadTable .lead-item-line {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 4px;
  min-height: 16px;
  max-width: 100%;
  line-height: 1.15;
}

.lead-item-line span {
  color: var(--muted);
  font-size: 12px;
}

#leadTable .lead-item-line span {
  flex: 0 0 auto;
  font-size: 11px;
}

.lead-item-line strong {
  font-weight: 600;
  word-break: break-word;
}

#leadTable .lead-item-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.lead-item-toggle {
  justify-self: start;
  margin-top: 2px;
  font-size: 12px;
}

#leadTable .lead-item-toggle {
  margin-top: 0;
  padding: 0;
  min-height: 0;
  font-size: 11px;
}

#leadTable .lead-item-editable-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
  min-height: 24px;
}

#leadTable .lead-item-inline-edit-button {
  position: static;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 3px;
  opacity: 0.72;
}

#leadTable .lead-item-editable-cell:hover .lead-item-inline-edit-button,
#leadTable .lead-item-inline-edit-button:focus-visible {
  opacity: 1;
}

#leadTable .lead-item-inline-editor {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#leadTable .lead-item-inline-input-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

#leadTable .lead-item-inline-input-row.single-item {
  grid-template-columns: minmax(0, 1fr);
}

#leadTable .lead-item-inline-input-row > span {
  color: var(--muted);
  font-size: 11px;
}

#leadTable .lead-item-inline-input-row input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}

#leadTable .lead-item-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#leadTable .lead-item-inline-actions button {
  min-height: 28px;
  padding: 3px 9px;
  font-size: 12px;
}

#leadTable .lead-item-inline-status {
  min-height: 0;
  margin: 0;
  font-size: 11px;
}

.lead-item-detail-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.lead-item-detail-head,
.lead-item-detail-grid {
  display: grid;
  gap: 8px;
}

.lead-item-detail-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 10px;
}

.lead-item-detail-head span {
  color: var(--blue);
  font-weight: 700;
}

.lead-item-detail-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.5fr) minmax(0, 0.7fr);
  align-items: start;
  column-gap: 18px;
}

.lead-item-detail-grid.has-item-index {
  grid-template-columns: 72px repeat(3, minmax(0, 1fr));
}

.lead-item-detail-grid div {
  min-width: 0;
}

.lead-item-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.lead-item-detail-grid strong {
  display: block;
  word-break: break-word;
}

.lead-item-images {
  margin-top: 10px;
}

.lead-item-photo-field {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.lead-item-photo-drop {
  display: block;
}

.lead-item-photo-drop > span {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.lead-item-photo-drop > span small {
  color: var(--muted);
  font-weight: 400;
}

.lead-item-photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.lead-item-photo-preview:empty {
  display: none;
}

.lead-item-photo-thumb {
  position: relative;
  width: 68px;
  height: 68px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.lead-item-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-item-photo-thumb b {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 9px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 10px;
  text-align: center;
}

.lead-item-photo-status {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.lead-item-photo-status.is-pending {
  color: var(--orange);
}

.lead-item-photo-status.is-complete {
  color: var(--green);
}

.lead-item-saved-images {
  margin-top: 8px;
}

.lead-item-saved-images-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.lead-item-saved-images-head strong {
  color: var(--text);
  font-size: 13px;
}

.lead-item-saved-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lead-item-saved-image-card {
  position: relative;
  width: 92px;
}

.lead-item-saved-image-preview {
  width: 92px;
  height: 92px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.lead-item-saved-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lead-item-saved-image-remove {
  width: 100%;
  margin-top: 5px;
  padding: 4px 6px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  background: #fff7f7;
  font-size: 12px;
  cursor: pointer;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recycle-stage-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.recycle-stage-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.recycle-stage-tabs button.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef2ff;
  font-weight: 600;
}

#recycleForm[data-recycle-stage="contract"] [data-recycle-registration-fields],
#recycleForm[data-recycle-stage="contract"] [data-recycle-registration-save],
#recycleForm[data-recycle-stage="contract"] .recycle-item-field-grid > .recycle-item-field,
#recycleForm[data-recycle-stage="registration"] [data-recycle-registration-next] {
  display: none;
}

#recycleForm[data-recycle-stage="contract"] .recycle-item-field-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 720px) {
  .recycle-stage-tabs button { flex: 1; padding: 10px 8px; min-height: 44px; }
}

.form-grid.recycle-item-field-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.recycle-item-field-grid > .recycle-item-field-category,
.recycle-item-field-grid > .recycle-item-field-brand,
.recycle-item-field-grid > .recycle-item-field-model,
.recycle-item-field-grid > .recycle-item-field-code,
.recycle-item-field-grid > .recycle-item-field-destination,
.recycle-item-field-grid > .recycle-item-field-valuation {
  grid-column: span 3;
}

.recycle-item-field-grid > .recycle-item-field-description {
  grid-column: span 6;
}

.recycle-item-field-brand {
  position: relative;
  z-index: 4;
}

.recycle-brand-combobox {
  position: relative;
  min-width: 0;
}

.recycle-brand-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.recycle-brand-menu[hidden] {
  display: none;
}

.recycle-brand-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.recycle-brand-option:hover,
.recycle-brand-option:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
  outline: none;
}

.recycle-brand-menu-empty {
  padding: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.settings-table-wrap {
  margin-top: 14px;
}

.assignment-rule-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.assignment-rule-overview {
  margin: 0;
  padding: 12px 14px;
}

.assignment-rule-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.assignment-rule-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.assignment-rule-heading h3,
.assignment-section-heading h3 {
  margin: 0;
}

.assignment-rule-heading p,
.assignment-section-heading p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.assignment-rule-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.assignment-mode-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.assignment-mode-control > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.assignment-mode-segment {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #cad5e3;
  border-radius: 7px;
  background: #fff;
}

.assignment-mode-option {
  position: relative;
  margin: 0;
}

.assignment-mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.assignment-mode-option span {
  display: block;
  min-width: 84px;
  padding: 8px 14px;
  color: #334155;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.assignment-mode-option + .assignment-mode-option span {
  border-left: 1px solid #cad5e3;
}

.assignment-mode-option input:checked + span {
  background: var(--blue);
  color: #fff;
}

.assignment-mode-option input:focus-visible + span {
  outline: 2px solid rgba(47, 101, 246, 0.28);
  outline-offset: -2px;
}

.assignment-rule-summary {
  display: flex;
  align-items: center;
  gap: 0;
  margin-right: auto;
}

.assignment-stat {
  min-width: 132px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 16px;
  border-left: 1px solid #dbe4f0;
}

.assignment-stat span {
  color: var(--muted);
  font-size: 12px;
}

.assignment-stat strong {
  font-size: 16px;
}

.assignment-rule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.assignment-rule-main-panel,
.assignment-platform-panel {
  min-width: 0;
  padding: 0;
  overflow: visible;
}

.assignment-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.assignment-add-control {
  display: grid;
  grid-template-columns: auto minmax(220px, 320px) auto;
  align-items: center;
  gap: 8px;
}

.assignment-add-control select,
.assignment-add-control button {
  min-height: 36px;
}

.assignment-scope-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2455d6;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.assignment-method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.assignment-method-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font-size: 13px;
}

.assignment-method-chip input {
  width: 16px;
  height: 16px;
}

.assignment-participant-wrap {
  margin: 0;
  overflow: visible;
}

.assignment-compact-table,
.assignment-platform-table {
  width: 100%;
  table-layout: fixed;
}

.assignment-compact-table th,
.assignment-compact-table td {
  padding: 8px 14px;
  vertical-align: middle;
}

.assignment-compact-table th:first-child {
  width: 29%;
}

.assignment-compact-table th:nth-child(2),
.assignment-compact-table th:nth-child(3),
.assignment-compact-table th:nth-child(4) {
  width: 14%;
}

.assignment-compact-table th:nth-child(5) {
  width: 15%;
}

.assignment-compact-table th:last-child {
  width: 14%;
}

.assignment-strategy-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.assignment-strategy-bar > strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.permission-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 0;
}

.checkbox-card {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.checkbox-card.compact {
  min-height: 34px;
  padding: 6px 8px;
}

.inline-number-input {
  width: 76px;
  min-width: 68px;
  min-height: 32px;
}

.form-actions.align-end {
  align-self: end;
  margin: 0;
}

.assignment-platform-panel {
  margin-top: 0;
}

.assignment-platform-table-wrap {
  margin: 0;
  overflow: visible;
}

.assignment-platform-table th,
.assignment-platform-table td {
  padding: 8px 14px;
  vertical-align: middle;
}

.assignment-platform-table th:first-child {
  width: 24%;
}

.assignment-platform-table th:last-child {
  width: 92px;
}

.assignment-assignee-picker {
  position: relative;
  width: 100%;
}

.assignment-assignee-picker > summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 5px 32px 5px 8px;
  border: 1px solid #cbd6e4;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.assignment-assignee-picker[open] > summary {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(47, 101, 246, 0.1);
}

.assignment-assignee-summary-values {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.assignment-assignee-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f0f3f8;
  color: #26364c;
  font-size: 12px;
  font-weight: 700;
}

.assignment-assignee-menu {
  position: absolute;
  z-index: 15;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 31, 44, 0.12);
}

.assignment-assignee-menu label {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 7px;
  border-radius: 5px;
  cursor: pointer;
}

.assignment-assignee-menu label:hover {
  background: #f5f8ff;
}

.assignment-excluded-note {
  margin: 0;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
}

.assignment-manual-note {
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #fff8eb;
  color: #8a5a00;
  font-size: 12px;
}

@media (max-width: 900px) {
  .assignment-rule-statusbar,
  .assignment-section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .assignment-rule-summary {
    margin: 0;
  }

  .assignment-rule-actions {
    justify-content: flex-start;
  }

  .assignment-add-control {
    grid-template-columns: 1fr;
  }

  .assignment-strategy-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.image-preview-panel {
  max-height: 78vh;
  overflow: auto;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.image-preview-panel img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
  background: #fff;
}

.image-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.image-preview-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.image-preview-zoom-value {
  min-width: 46px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.danger-button {
  color: var(--red);
  border-color: #fecaca;
  background: #fff7f7;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.section-heading.slim {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recycle-draft-tools {
  flex: 0 1 320px;
  min-width: 0;
}

@media (max-width: 900px) {
  .recycle-draft-tools {
    flex: none;
    width: 100%;
  }
}

.recycle-draft-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.recycle-draft-confirm {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
}

.recycle-draft-confirm p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.recycle-draft-indicator {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.recycle-draft-indicator.saving {
  color: #1d4ed8;
  background: #eff6ff;
}

.recycle-draft-indicator.saved,
.recycle-draft-indicator.restored {
  color: #047857;
  background: #ecfdf5;
}

.recycle-draft-indicator.error {
  color: #b91c1c;
  background: #fef2f2;
}

.recycle-draft-file-note {
  display: block;
  margin-top: 4px;
  color: #047857;
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(390px, 440px) 1fr;
  gap: 14px;
  align-items: start;
}

.form-panel,
.list-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.sub-list-panel {
  margin-top: 14px;
}

.price-adjustment-table {
  min-width: 1280px;
}

.inline-note,
.permission-empty {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 11px 12px;
  min-height: 42px;
  font-size: 13px;
}

.inline-note span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.inline-note strong {
  color: var(--text);
}

.fulfillment-customer-meta .pill {
  display: inline-flex;
  margin: 0 2px 0 0;
}

.fulfillment-customer-meta small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.repeat-fulfillment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #cfd9f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8faff 0%, #f2f6ff 100%);
}

.repeat-fulfillment-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.repeat-fulfillment-copy strong {
  color: var(--text);
}

.repeat-fulfillment-copy span,
.repeat-fulfillment-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.repeat-fulfillment-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.repeat-fulfillment-actions.is-compact {
  display: flex;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 720px) {
  .repeat-fulfillment-actions:not(.is-compact) {
    align-items: stretch;
    flex-direction: column;
  }

  .repeat-fulfillment-buttons {
    justify-content: stretch;
  }

  .repeat-fulfillment-buttons .secondary-button {
    flex: 1 1 140px;
  }
}

.permission-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  min-height: 110px;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.own-lead-contact-duration-controls {
  display: grid;
  grid-template-columns: minmax(112px, 1.2fr) minmax(72px, 0.8fr) minmax(72px, 0.7fr);
  gap: 8px;
}

.own-lead-contact-duration-controls.is-fixed-mode {
  grid-template-columns: minmax(112px, 1fr);
}

.own-lead-contact-duration-controls > [hidden] {
  display: none;
}

.own-lead-contact-duration-field .field-help {
  margin-top: 5px;
}

.ai-knowledge-department-scope-field,
.hr-department-scope-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ai-knowledge-department-scope-field > label,
.hr-department-scope-field > label {
  min-width: 0;
}

.ai-knowledge-department-options,
.hr-department-options {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle, #f8fafc);
}

.ai-knowledge-department-options[hidden],
.hr-department-options[hidden] {
  display: none;
}

.ai-knowledge-department-options > span,
.hr-department-options > span {
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-department-checks,
.hr-department-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-knowledge-department-checks label,
.hr-department-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.ai-knowledge-department-checks input,
.hr-department-checks input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.calc-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(1180px, calc(100vw - 84px));
  height: 100vh;
  z-index: 20;
  background: var(--panel);
  box-shadow: var(--shadow);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform 180ms ease;
  display: flex;
  flex-direction: column;
}

.detail-drawer.is-open {
  transform: none !important;
}

.drawer-header {
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.detail-drawer .drawer-header-compact {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  min-height: 0;
  padding: 0;
  border: 0;
}

.drawer-title-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.detail-drawer .drawer-header-compact + .drawer-content .detail-workbench {
  min-height: 100vh;
}

.drawer-content {
  padding: 0;
  overflow: auto;
}

.drawer-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.drawer-section:last-child {
  border-bottom: 0;
}

.detail-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: calc(100vh - 76px);
}

.detail-main {
  min-width: 0;
  padding: 16px 18px 26px;
}

.detail-side {
  border-left: 1px solid var(--line);
  background: #fbfcfd;
  padding: 0 18px 24px;
}

.detail-card {
  border-bottom: 1px solid var(--line);
  padding: 14px 0 16px;
}

.detail-card:first-child {
  padding-top: 0;
}

.detail-card-head,
.timeline-head,
.side-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lead-detail-summary .detail-action-bar {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.lead-core-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lead-detail-summary .lead-items-detail {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.lead-detail-summary .lead-item-detail-card {
  min-height: 48px;
  padding: 8px 10px;
  border-color: #d9e2f2;
  background: #f8faff;
}

.lead-detail-summary .lead-item-detail-grid {
  min-height: 30px;
  align-items: center;
}

.lead-extra-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.lead-core-summary-grid .info-box,
.lead-extra-summary-grid .info-box {
  min-height: 48px;
  padding: 8px 10px;
}

.lead-core-summary-grid .info-box span,
.lead-extra-summary-grid .info-box span {
  margin-bottom: 4px;
}

.lead-detail-phone-box.phone-cell {
  width: auto;
  max-width: none;
}

.lead-detail-phone-box .phone-line {
  min-height: 22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mark-invalid {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.mark-invalid input {
  width: 16px;
  min-height: 16px;
}

.tag-row {
  margin-top: 12px;
}

.tag-editor {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--panel-soft);
}

.tag-group {
  margin-bottom: 10px;
}

.tag-group h4,
.permission-section h4 {
  margin: 0 0 9px;
  font-size: 13px;
}

.tag-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.follow-form {
  margin-top: 10px;
}

.chat-upload-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
}

.chat-upload-section-head,
.chat-upload-group-head,
.activity-chat-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-upload-section-head > div,
.chat-upload-group-head > div {
  display: grid;
  gap: 4px;
}

.chat-upload-section-head small {
  color: var(--muted);
}

.chat-upload-groups,
.activity-chat-groups {
  display: grid;
  gap: 10px;
}

.chat-upload-group,
.activity-chat-group {
  padding: 11px;
  border: 1px solid #cfd8eb;
  border-radius: 8px;
  background: #fff;
}

.chat-upload-group.is-main,
.activity-chat-group.is-main {
  border-left: 4px solid var(--blue);
}

.chat-upload-group.is-sub,
.activity-chat-group.is-sub {
  border-left: 4px solid #9b7ce8;
}

.chat-role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #3157b7;
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 700;
}

.is-sub .chat-role-badge {
  color: #6d49bd;
  background: #f0eaff;
}

.chat-upload-group-fields {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 1.6fr);
  align-items: start;
  gap: 10px;
  margin-top: 10px;
}

.chat-screenshot-input.image-drop-zone {
  align-self: start;
  gap: 4px;
  padding: 4px;
}

.chat-account-input {
  display: grid;
  gap: 6px;
  padding-top: 5px;
}

.chat-screenshot-label {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.chat-screenshot-label small {
  color: var(--muted);
  font-size: inherit;
}

.chat-screenshot-input input[type="file"] {
  min-height: 34px;
  padding-block: 5px;
}

.chat-screenshot-input .image-drop-status {
  min-height: 0;
  margin-top: 0;
}

.chat-screenshot-input .image-drop-status:empty {
  display: none;
}

.chat-image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.chat-image-preview-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.chat-image-preview-item img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  background: #fff;
}

.chat-image-preview-meta {
  display: grid;
  gap: 5px;
  padding: 7px;
}

.chat-image-preview-meta > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.chat-image-preview-meta > div {
  display: flex;
  gap: 7px;
}

.danger-text {
  color: var(--danger, #d14343);
}

.activity-chat-groups {
  margin-top: 10px;
}

.activity-chat-group-head {
  justify-content: flex-start;
}

.activity-chat-group-head > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.activity-chat-group-head > small {
  color: var(--muted);
}

.wechat-account-config-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.wechat-account-config-table th:last-child,
.wechat-account-config-table td:last-child {
  width: 150px;
}

.activity-chat-group .activity-attachments {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .chat-upload-section-head,
  .chat-upload-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-upload-section-head > button {
    width: 100%;
  }

  .chat-upload-group-fields {
    grid-template-columns: 1fr;
  }

  .chat-account-input {
    padding-top: 0;
  }

  .wechat-account-config-form {
    grid-template-columns: 1fr;
  }

  .chat-image-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.detail-tabs,
.side-tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.detail-tabs button,
.side-tabs button {
  height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
}

.detail-tabs button.is-active,
.side-tabs button.is-active {
  border-bottom-color: var(--blue);
  color: var(--blue);
  font-weight: 700;
}

.side-form {
  display: grid;
  gap: 12px;
}

.source-block {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.source-panel {
  display: grid;
  gap: 10px;
}

.timeline-head span {
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.stage-chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
}

.stage-chip.is-current {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-box {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  min-height: 58px;
}

.info-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.info-box strong {
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--panel-soft);
}

.timeline-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.timeline-item p {
  margin: 0;
  color: #34404b;
  font-size: 13px;
}

.activity-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lead-item-image-audit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lead-item-image-audit > section {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.lead-item-image-audit > section > strong {
  margin-bottom: 2px;
}

.lead-item-image-audit .activity-attachment,
.lead-item-image-audit .activity-attachment img {
  width: 86px;
}

.lead-item-image-audit .activity-attachment img {
  height: 86px;
}

@media (max-width: 720px) {
  .lead-item-saved-images-head,
  .lead-item-image-audit {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.activity-attachment {
  width: 132px;
  display: grid;
  gap: 5px;
  color: var(--text);
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.activity-attachment img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.activity-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.visit-fake-evidence {
  min-width: 150px;
  margin-top: 8px;
}

.visit-fake-evidence > strong {
  display: block;
  color: #b42318;
  font-size: 12px;
}

.visit-fake-evidence-missing {
  padding: 7px 8px;
  border: 1px solid #f4b4ad;
  border-radius: 6px;
  background: #fff4f2;
}

.visit-fake-evidence-missing .text-button {
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
}

.visit-fake-evidence .activity-attachments {
  gap: 6px;
  margin-top: 6px;
}

.visit-fake-evidence .activity-attachment,
.visit-fake-evidence .activity-attachment img {
  width: 64px;
}

.visit-fake-evidence .activity-attachment img {
  height: 64px;
}

.visit-fake-evidence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.visit-fake-evidence-thumb {
  display: block;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid #f0a39b;
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}

.visit-fake-evidence-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visit-fake-evidence-hint {
  display: block;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
  white-space: nowrap;
}

#visitOrderTable td[data-visit-cell="status"] {
  min-width: 156px;
  overflow: visible;
}

.settings-grid {
  display: block;
}

.settings-tab-shell {
  margin-bottom: 12px;
  overflow-x: auto;
}

.settings-tabs {
  display: inline-flex;
  gap: 8px;
  min-width: max-content;
  padding-bottom: 2px;
}

.settings-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.settings-tab.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.settings-tab-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
}

.settings-tab-content.lead-assignment-tab-content {
  grid-template-columns: 1fr;
  width: 100%;
  min-width: 0;
}

.lead-assignment-tab-content .settings-panel {
  min-width: 0;
}

.settings-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.settings-panel[open] {
  box-shadow: 0 8px 24px rgba(18, 31, 44, 0.05);
}

.settings-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
}

.settings-summary::-webkit-details-marker {
  display: none;
}

.settings-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-summary > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.settings-summary > span::after {
  content: "⌄";
  display: inline-block;
  margin-left: 6px;
  transition: transform 160ms ease;
}

.settings-panel[open] .settings-summary > span::after {
  transform: rotate(180deg);
}

.settings-panel-body {
  margin-top: 14px;
}

.account-panel {
  grid-column: 1 / -1;
}

.account-permission-workspace {
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.account-workspace-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.account-workspace-tabs {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.account-workspace-tabs button {
  position: relative;
  min-width: 76px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.account-workspace-tabs button.is-active {
  color: var(--blue);
}

.account-workspace-tabs button.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
}

.account-add-employee-button {
  min-height: 34px;
  padding: 0 14px;
}

.account-employee-workspace {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: 720px;
}

.account-workspace-sidebar {
  min-width: 0;
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.account-employee-search {
  display: block;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.account-employee-search input {
  min-height: 36px;
  background: #fff;
}

.account-department-list {
  max-height: 760px;
  overflow: auto;
  padding-bottom: 12px;
}

.account-department-group {
  border-bottom: 1px solid #e7ebf0;
}

.account-department-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.account-department-toggle:hover {
  background: #eef3f8;
}

.account-department-toggle span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-department-toggle i {
  color: var(--muted);
  font-style: normal;
  transition: transform 160ms ease;
}

.account-department-group:not(.is-open) .account-department-toggle i {
  transform: rotate(-90deg);
}

.account-department-toggle b {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e9eef5;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.account-department-employees {
  padding: 0 8px 8px;
}

.account-employee-row {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.account-employee-row:hover {
  background: #fff;
}

.account-employee-row.is-active {
  border-color: #c7d6ff;
  background: #eaf1ff;
  color: var(--blue);
}

.account-employee-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7edf5;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.account-employee-row.is-active .account-employee-avatar {
  background: var(--blue);
  color: #fff;
}

.account-employee-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-employee-copy strong,
.account-employee-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-employee-copy strong {
  font-size: 13px;
}

.account-employee-copy strong em {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}

.account-employee-copy small {
  color: var(--muted);
  font-size: 11px;
}

.account-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.account-status-dot.is-active {
  background: #18a77b;
}

.account-department-empty {
  padding: 10px 44px;
  color: var(--muted);
  font-size: 12px;
}

.account-job-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px 7px 28px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}

.account-job-group > summary::-webkit-details-marker { display: none; }
.account-job-group > summary > span::before { content: "›"; margin-right: 6px; }
.account-job-group[open] > summary > span::before { content: "⌄"; }
.account-job-group > summary > b { font-size: 11px; font-weight: 400; }
.account-job-group .account-employee-row { padding-left: 28px; }
.account-job-group .account-department-empty { padding: 5px 44px 8px; }

.account-workspace-main {
  min-width: 0;
  background: #fff;
}

.account-workspace-main-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}

.account-workspace-main-header > div:first-child {
  min-width: 0;
}

.account-workspace-main-header span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.account-workspace-main-header h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.account-workspace-editor {
  padding: 0 18px 68px;
}

.account-editor-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.account-protected-readonly {
  display: grid;
  gap: 16px;
  padding: 20px 18px;
}

.account-protected-readonly .inline-note {
  margin: 0;
}

.account-protected-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
}

.account-protected-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.account-protected-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.account-protected-summary dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-editor-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.account-editor-section-heading h4 {
  margin: 0;
  font-size: 15px;
}

.account-basic-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.account-basic-fields > label {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

.account-basic-fields .account-field-name {
  flex-basis: 112px;
  max-width: 120px;
}

.account-basic-fields .account-field-username {
  flex-basis: 150px;
  max-width: 170px;
}

.account-basic-fields .account-field-department,
.account-basic-fields .account-field-job {
  flex-basis: 180px;
  max-width: 200px;
}

.account-basic-fields .account-field-status,
.account-basic-fields .account-field-work-status {
  flex-basis: 104px;
  max-width: 112px;
}

.account-basic-fields .account-field-call-center {
  flex-basis: 250px;
  max-width: 280px;
}

.account-basic-fields .account-field-outbound-phone {
  flex-basis: 245px;
  max-width: 275px;
}

.account-basic-fields .account-field-template {
  flex-basis: 180px;
  max-width: 205px;
}

.account-basic-fields .account-field-password,
.account-basic-fields .account-field-password-confirm {
  flex-basis: 185px;
  max-width: 205px;
}

.account-data-scope-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 10px;
}

.account-data-scope-fields > .permission-data-scope-field {
  flex: 0 1 210px;
  max-width: 230px;
}

.account-data-scope-fields > .own-lead-contact-duration-field {
  flex: 0 1 385px;
  max-width: 410px;
}

.account-data-scope-fields .ai-knowledge-department-scope-field,
.account-data-scope-fields .hr-department-scope-field {
  flex: 0 1 215px;
  max-width: 235px;
  gap: 5px;
}

.account-data-scope-fields .ai-knowledge-department-scope-field.is-expanded,
.account-data-scope-fields .hr-department-scope-field.is-expanded {
  flex: 1 0 100%;
  max-width: none;
  grid-template-columns: minmax(190px, 230px) minmax(360px, 1fr);
  align-items: end;
}

.account-data-scope-fields .ai-knowledge-department-options,
.account-data-scope-fields .hr-department-options {
  margin-top: 0;
}

.account-permission-heading {
  align-items: flex-start;
  margin-bottom: 0;
}

.account-permission-quick-nav {
  max-width: calc(100% - 110px);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.account-permission-quick-nav button {
  min-height: 28px;
  padding: 0 10px;
  border-color: #d9e0e9;
  background: #fff;
  color: #526071;
  font-size: 12px;
  white-space: nowrap;
}

.account-workspace-editor .permission-tree {
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.account-workspace-editor .permission-group {
  padding: 10px;
  scroll-margin-top: 12px;
}

.account-workspace-editor .permission-check-grid {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 6px;
}

.account-workspace-form-status {
  min-height: 22px;
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.account-workspace-savebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 -18px -68px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.account-login-history {
  padding: 16px;
  min-width: 0;
}

.login-history-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.login-history-filters label {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

.login-history-filters label:first-child { min-width: 220px; }
.login-history-filters label span { color: var(--muted); font-size: 12px; }
.account-login-history .data-table { min-width: 840px; }
.account-login-history .data-table td { white-space: nowrap; }
.login-history-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.login-history-pagination > span { color: var(--muted); }
.reference-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 18px; margin-left: auto; color: #62748e; font-size: 14px; }
.reference-pagination-pages, .reference-pagination-jump, .reference-pagination-jump label { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.reference-pagination .lead-list-page-numbers { gap: 6px; }
.reference-pagination :is(.lead-list-page-number,.lead-list-page-arrow) { min-width: 36px; height: 36px; border-radius: 7px; }
.reference-pagination .lead-list-page-number.is-active { color: white; background: var(--primary); border-color: var(--primary); }
.reference-pagination-chevron { display: block; width: 18px; height: 18px; background: url('/assets/pre-visit-knowledge/chevron-right.svg') center / contain no-repeat; }
.reference-pagination-chevron.is-previous { transform: rotate(180deg); }
.reference-pagination-jump { position: relative; gap: 10px; }
.reference-pagination-jump input { box-sizing: border-box; width: 54px; height: 36px; padding: 0 6px; text-align: center; border: 1px solid var(--line-strong); border-radius: 7px; background: white; font: inherit; color: var(--text); }
.reference-pagination-jump > button { min-height: 36px; height: 36px; padding: 0 12px; border-radius: 7px; }
.reference-pagination .lead-list-page-size-control { gap: 8px; }
.reference-pagination .lead-list-page-size-control select { height: 36px; }
.reference-pagination :is(button,input,select):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.reference-pagination input[aria-invalid="true"] { border-color: #dc2626; }
.reference-pagination-error:not([hidden]) { position: absolute; z-index: 3; right: 0; top: 100%; padding: 4px 8px; background: #fff; color: #b42318; font-size: 12px; border: 1px solid #fecaca; border-radius: 4px; }
@media (max-width: 760px) { .reference-pagination { justify-content: flex-start; width: 100%; gap: 12px; } .reference-pagination-pages { max-width: 100%; overflow-x: auto; padding: 2px; } .reference-pagination-pages > button { flex-shrink: 0; } }
.compact-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.compact-pagination-pages { display: inline-flex; align-items: center; gap: 4px; }
.compact-pagination .lead-list-page-number:disabled { cursor: wait; }
.compact-pagination .lead-list-page-number:focus-visible,
.compact-pagination .lead-list-page-arrow:focus-visible,
.compact-pagination select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 760px) {
  .login-history-pagination { align-items: flex-start; }
  .compact-pagination { width: 100%; gap: 8px; }
  .compact-pagination-pages { width: 100%; min-width: 0; padding: 2px; box-sizing: border-box; }
  .compact-pagination-pages > button { flex-shrink: 0; }
  .compact-pagination .lead-list-page-numbers { min-width: 0; flex-shrink: 1; overflow-x: auto; }
  .compact-pagination .lead-list-page-number { min-width: 32px; padding: 0 4px; font-size: 12px; flex-shrink: 0; }
  .compact-pagination .lead-list-page-arrow { min-width: 32px; width: 32px; }
  .compact-pagination .lead-list-page-ellipsis { min-width: 20px; }
  .ecommerce-table-pagination .compact-pagination .lead-list-page-numbers { justify-content: flex-start; }
}

.account-template-workspace {
  padding: 12px;
  background: #f8fafc;
}

.account-template-workspace > .permission-template-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.account-template-workspace .permission-template-toolbar {
  margin: 0 0 10px;
}

@media (max-width: 1360px) {
  .account-data-scope-fields .ai-knowledge-department-scope-field {
    flex-basis: 215px;
  }

  .account-workspace-editor .permission-tree {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 900px) {
  .account-employee-workspace {
    grid-template-columns: 230px minmax(620px, 1fr);
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .account-workspace-header {
    padding: 0 12px;
  }

  .account-employee-workspace {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .account-workspace-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .account-department-list {
    max-height: 300px;
  }

  .account-basic-fields,
  .account-data-scope-fields,
  .account-workspace-editor .permission-tree {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-basic-fields > label,
  .account-data-scope-fields > .permission-data-scope-field,
  .account-data-scope-fields > .own-lead-contact-duration-field,
  .account-data-scope-fields .ai-knowledge-department-scope-field,
  .account-data-scope-fields .ai-knowledge-department-scope-field.is-expanded {
    grid-column: auto;
    max-width: none;
  }

  .account-permission-heading {
    display: grid;
  }

  .account-permission-quick-nav {
    max-width: 100%;
  }

  .account-protected-summary {
    grid-template-columns: 1fr;
  }
}

.product-config-workspace {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.product-config-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.product-config-tabs button {
  appearance: none;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.product-config-tabs button:hover {
  color: var(--primary);
  background: #f8faff;
}

.product-config-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.product-config-content {
  min-width: 0;
}

.product-config-panel {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.product-config-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.product-config-panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.product-config-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.product-config-panel-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.product-config-inline-form {
  display: grid;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.product-config-inline-form.is-destination {
  grid-template-columns: minmax(150px, 1fr) minmax(118px, 0.58fr) auto;
}

.product-config-inline-form.is-category {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.product-config-inline-form label {
  min-width: 0;
}

.product-config-inline-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.product-config-inline-form input,
.product-config-inline-form select,
.product-config-inline-form button {
  min-height: 38px;
}

.product-config-inline-form .form-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.product-config-table-panel {
  margin: 0;
  overflow-x: auto;
}

.tag-config-table.product-config-table {
  min-width: 0;
  table-layout: fixed;
}

.product-config-table th,
.product-config-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.destination-config-table th:nth-child(1) { width: 20%; }
.destination-config-table th:nth-child(2) { width: 17%; }
.destination-config-table th:nth-child(3) { width: 45%; }
.destination-config-table th:nth-child(4) { width: 18%; }
.category-config-table th:nth-child(1) { width: 48%; }
.category-config-table th:nth-child(2) { width: 22%; }
.category-config-table th:nth-child(3) { width: 30%; }

.product-config-table .row-actions {
  flex-wrap: nowrap;
}

.product-brand-panel-head {
  min-height: 64px;
}

.product-brand-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(240px, 1fr) minmax(170px, 0.65fr);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.product-brand-toolbar label,
.product-brand-create-form label {
  min-width: 0;
}

.product-brand-toolbar label > span,
.product-brand-create-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.product-brand-toolbar input,
.product-brand-toolbar select,
.product-brand-create-form input,
.product-brand-create-form select {
  min-height: 38px;
}

.product-brand-create-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.2fr) minmax(110px, 0.45fr) minmax(110px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #c9d6ff;
  background: #f4f7ff;
}

.product-brand-create-actions {
  display: flex;
  gap: 8px;
}

.product-brand-create-form .form-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.product-brand-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.product-brand-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.product-brand-summary > div:last-child {
  border-right: 0;
}

.product-brand-summary span {
  color: var(--muted);
  font-size: 12px;
}

.product-brand-summary strong {
  color: var(--text);
  font-size: 15px;
}

.product-brand-table th:nth-child(1) { width: 30%; }
.product-brand-table th:nth-child(2) { width: 18%; }
.product-brand-table th:nth-child(3) { width: 14%; }
.product-brand-table th:nth-child(4) { width: 14%; }
.product-brand-table th:nth-child(5) { width: 24%; }

.product-brand-table td:first-child strong,
.product-brand-table td:first-child small {
  display: block;
}

.product-brand-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
}

.product-brand-table input,
.product-brand-table select {
  min-width: 0;
  min-height: 34px;
}

.product-brand-pending {
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.product-brand-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.product-brand-pending-head h4,
.product-brand-pending-head p {
  margin: 0;
}

.product-brand-pending-head p,
.product-brand-pending-head > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.product-brand-pending-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.product-brand-pending-list > div:not(.empty-state) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.product-brand-pending-list span,
.product-brand-pending-list strong,
.product-brand-pending-list small {
  display: block;
  min-width: 0;
}

.product-brand-pending-list small {
  margin-top: 3px;
  color: var(--muted);
}

.product-brand-pending-actions {
  display: flex !important;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.product-brand-pending-actions button {
  white-space: nowrap;
}

.organization-workspace {
  padding-top: 0;
}

.organization-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}

.organization-workspace-tabs button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 16px 10px;
  cursor: pointer;
}

.organization-workspace-tabs button.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.organization-workspace-content {
  padding-top: 14px;
}

.organization-structure-layout {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.organization-department-pane,
.organization-position-pane {
  min-width: 0;
  padding: 14px;
}

.organization-department-pane {
  border-right: 1px solid var(--line);
  background: var(--panel-soft);
}

.organization-pane-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 10px;
}

.organization-pane-heading > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.organization-pane-heading h4,
.organization-pane-heading p {
  margin: 0;
}

.organization-pane-heading span,
.organization-pane-heading p {
  color: var(--muted);
  font-size: 12px;
}

.organization-department-form,
.organization-position-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.organization-department-form .form-status,
.organization-position-form .form-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.organization-department-list {
  display: grid;
  gap: 7px;
}

.organization-department-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 6px;
}

.organization-department-row.is-active {
  border-color: #93b4ff;
  background: #f2f6ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.organization-department-row.is-unassigned {
  border-style: dashed;
}

.organization-department-select {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 4px 6px;
  cursor: pointer;
}

.organization-department-select > span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.organization-department-select strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-department-select small {
  color: var(--muted);
}

.organization-row-actions {
  flex-wrap: nowrap;
  gap: 3px;
}

.organization-row-actions button {
  padding: 4px 6px;
  font-size: 12px;
}

.organization-position-table-panel {
  margin-top: 4px;
}

.tag-config-table.organization-position-table {
  min-width: 0;
}

.tag-config-table.backend-acceptance-table {
  min-width: 520px;
}

.organization-position-table th:nth-child(1) { width: 42%; }
.organization-position-table th:nth-child(2) { width: 18%; }
.organization-position-table th:nth-child(3) { width: 40%; }

.backend-acceptance-config {
  min-width: 0;
}

.backend-acceptance-header h4,
.backend-acceptance-header p {
  margin: 0;
}

.backend-acceptance-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.backend-acceptance-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.15fr) minmax(380px, .85fr);
  gap: 16px;
  margin-top: 12px;
}

.backend-acceptance-levels,
.backend-employee-levels {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.backend-acceptance-form {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.backend-acceptance-form .form-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.backend-acceptance-table {
  min-width: 560px;
}

.backend-employee-level-list {
  display: grid;
  gap: 8px;
}

.backend-employee-level-row {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(180px, 1.3fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 8px;
}

.backend-employee-level-row > div {
  display: grid;
  gap: 2px;
}

.backend-employee-level-row span {
  color: var(--muted);
  font-size: 12px;
}

.backend-auto-assignment-standard {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.backend-auto-assignment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.backend-auto-assignment-switch {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 8px 10px;
}

.backend-auto-assignment-switch input {
  width: 16px;
  height: 16px;
}

.backend-auto-assignment-number {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.backend-auto-assignment-number > span {
  color: var(--muted);
}

.backend-auto-assignment-flow,
.backend-auto-assignment-fixed {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.backend-auto-assignment-flow span,
.backend-auto-assignment-fixed span {
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 5px 9px;
  font-size: 12px;
}

.backend-auto-assignment-flow i {
  color: var(--muted);
  font-style: normal;
}

.backend-auto-assignment-fixed span {
  color: var(--muted);
}

.backend-auto-assignment-form .form-status {
  grid-column: 1 / -2;
  min-height: 0;
}

.backend-auto-assignment-form > .primary-button {
  grid-column: 1;
  justify-self: start;
  min-width: 168px;
}

.backend-auto-assignment-preview {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 10px 12px;
}

.backend-auto-assignment-preview > span,
.backend-auto-assignment-preview > small {
  color: var(--muted);
}

.backend-auto-assignment-preview.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.backend-visit-selection-summary {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 9px 11px;
}

.backend-visit-selection-head,
.backend-appointment-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.backend-visit-selection-head span,
.backend-appointment-chip {
  color: var(--muted);
  font-size: 12px;
}

.backend-appointment-list {
  margin-top: 7px;
}

.backend-appointment-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 3px 8px;
}

.backend-appointment-chip.is-overdue {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff7ed;
}

.organization-option-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.organization-option-form.is-position {
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.2fr) auto;
}

.organization-option-form .form-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.organization-config-table {
  min-width: 520px;
}

.payment-account-workspace {
  overflow: hidden;
}

.payment-account-create-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(230px, 1fr) minmax(210px, 0.72fr) auto;
  gap: 12px;
  align-items: end;
}

.payment-account-create-button {
  min-height: 40px;
  padding-inline: 20px;
  white-space: nowrap;
}

.payment-account-create-status {
  grid-column: 1 / -1;
}

.payment-account-mode-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.payment-account-create-status:empty {
  display: none;
}

.payment-account-group-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow-x: auto;
}

.payment-account-group-tab {
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-right-width: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.payment-account-group-tab:first-child {
  border-radius: 8px 0 0 8px;
}

.payment-account-group-tab:last-child {
  border-right-width: 1px;
  border-radius: 0 8px 8px 0;
}

.payment-account-group-tab:hover {
  background: var(--panel-soft);
}

.payment-account-group-tab.is-active,
.payment-account-group-tab.is-active:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.payment-account-group-tab.is-active + .payment-account-group-tab {
  border-left-color: var(--primary);
}

.payment-account-group-pane {
  padding-top: 16px;
}

.payment-account-api-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.checkbox-line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checkbox-line input {
  width: auto;
}

.compact-table-wrap {
  overflow-x: auto;
  position: relative;
}

.payment-account-table {
  min-width: 760px;
}

.payment-account-table td:nth-child(2) {
  min-width: 230px;
}

.payment-account-table td:nth-child(2) select {
  display: inline-block;
  width: 150px;
  margin-right: 6px;
}

.compact-inline-button {
  min-height: 36px;
  padding: 7px 10px;
}

.payment-account-table th:first-child,
.payment-account-table td:first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 250px;
  min-width: 250px;
  background: #fff;
  box-shadow: 8px 0 10px -10px rgba(15, 23, 42, 0.35);
}

.payment-account-table th:first-child {
  z-index: 3;
  background: #f4f7fa;
}

@media (max-width: 1180px) {
  .payment-account-create-row {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .payment-account-create-button {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .payment-account-create-row {
    grid-template-columns: 1fr;
  }

  .payment-account-create-status {
    grid-column: 1;
  }

  .payment-account-create-button {
    width: 100%;
  }

  .payment-account-group-tabs {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
  }
}

.permission-section {
  margin-top: 14px;
}

.permission-tree {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.permission-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.permission-group-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.permission-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  margin: 0;
  cursor: pointer;
}

.permission-group-header input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.permission-group-header span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.permission-group-header strong {
  font-size: 15px;
}

.permission-group-header small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.permission-collapse-button {
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 12px;
  white-space: nowrap;
}

.permission-group-body {
  margin-top: 10px;
}

.permission-subtitle {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.permission-section h4 {
  margin: 0 0 9px;
  font-size: 13px;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.alipay-balance-permission-groups {
  display: grid;
  gap: 8px;
}

.alipay-balance-permission-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.alipay-balance-permission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 9px 12px;
}

.alipay-balance-permission-master {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.alipay-balance-permission-master input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.alipay-balance-permission-master span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.alipay-balance-permission-master strong {
  font-size: 14px;
}

.alipay-balance-permission-master small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alipay-balance-permission-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.alipay-balance-permission-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.alipay-balance-permission-toggle {
  margin-top: 0;
  white-space: nowrap;
}

.alipay-balance-permission-body {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.alipay-balance-permission-body[hidden] {
  display: none;
}

.settings-panel ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.tag-manager {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.tag-group-panel {
  background: #fbfcfd;
  border-right: 1px solid var(--line);
}

.tag-group-title,
.tag-group-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.tag-group-title {
  font-weight: 700;
  background: #f4f7fa;
}

.tag-group-row {
  position: relative;
  background: transparent;
}

.tag-group-line {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  padding: 0;
}

.tag-group-row:hover {
  background: #eef7ff;
}

.tag-group-row.is-active {
  background: #eaf1ff;
  color: var(--blue);
  font-weight: 700;
}

.tag-group-line strong {
  color: var(--muted);
  font-size: 12px;
}

.tag-group-switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d4dbe7;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.tag-group-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.tag-group-switch.is-on {
  background: var(--blue);
}

.tag-group-switch.is-on::after {
  left: 21px;
}

.tag-group-edit-icon {
  opacity: 0;
  background: #fff;
}

.tag-group-row:hover .tag-group-edit-icon,
.tag-group-row.is-active .tag-group-edit-icon {
  opacity: 1;
}

.tag-table-panel {
  overflow: auto;
  background: #fff;
}

.tag-config-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.employee-account-table {
  min-width: 980px;
}

.tag-config-table th,
.tag-config-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.tag-config-table th {
  background: #f4f7fa;
  color: #3b4652;
}

.tag-workspace-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.platform-store-workspace {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.platform-store-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 620px;
}

.platform-store-sidebar {
  min-width: 0;
  background: #fbfcff;
  border-right: 1px solid var(--line);
}

.platform-store-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background: #f7f9fc;
}

.platform-store-editor,
.platform-store-table-card,
.platform-store-trade-card,
.douyin-sync-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.douyin-sync-card {
  padding: 0;
}

.douyin-sync-head {
  border-bottom: 1px solid var(--line);
}

.douyin-sync-head > div {
  display: grid;
  gap: 4px;
}

.douyin-sync-head span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
}

.douyin-sync-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
}

.douyin-sync-form > label:not(.douyin-sync-toggle) {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.douyin-sync-form > label > span:first-child,
.douyin-sync-advanced label > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.douyin-sync-form em {
  color: #e5484d;
  font-style: normal;
}

.douyin-sync-form input {
  width: 100%;
  min-width: 0;
}

.douyin-sync-wide {
  grid-column: span 2;
}

.douyin-sync-full {
  grid-column: 1 / -1;
}

.douyin-sync-toggle {
  min-height: 42px;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.douyin-sync-toggle input {
  width: auto;
}

.douyin-sync-advanced {
  border-top: 1px solid #eef1f6;
  border-bottom: 1px solid #eef1f6;
  padding: 10px 0;
}

.douyin-sync-advanced summary,
.douyin-sync-logs summary {
  cursor: pointer;
  font-weight: 700;
}

.douyin-sync-advanced > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.douyin-sync-advanced label {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.douyin-sync-advanced small {
  color: var(--muted);
}

.douyin-sync-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.douyin-sync-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.douyin-sync-logs {
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}

.douyin-sync-logs .tag-table-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 980px) {
  .douyin-sync-form {
    grid-template-columns: 1fr;
  }

  .douyin-sync-wide,
  .douyin-sync-full {
    grid-column: auto;
  }

  .douyin-sync-advanced > div {
    grid-template-columns: 1fr;
  }

  .douyin-sync-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.platform-store-editor {
  padding: 16px;
}

.platform-store-editor-head,
.platform-store-editor-footer,
.platform-store-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.platform-store-editor-head {
  margin-bottom: 14px;
}

.platform-store-editor-head h3,
.platform-store-table-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.platform-store-editor-head .eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.platform-store-status {
  display: inline-flex;
  align-items: center;
}

.platform-store-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(200px, 1fr) minmax(220px, 1fr);
  gap: 12px;
}

.platform-store-form-grid.is-sales {
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.35fr);
}

.platform-store-form-grid label {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.platform-store-form-grid label > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.platform-store-form-grid label em {
  color: #e5484d;
  font-style: normal;
}

.platform-store-form-grid input,
.platform-store-form-grid select {
  width: 100%;
  min-width: 0;
}

.platform-store-editor-footer {
  min-height: 46px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef1f6;
}

.platform-store-editor-footer .form-status,
.platform-store-inline-create .form-status {
  min-height: 18px;
  padding: 0;
}

.platform-store-editor-footer .form-actions {
  margin: 0;
}

.platform-store-table-head {
  min-height: 58px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.platform-store-table-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.platform-store-table-head span,
.platform-store-table-head > strong {
  color: var(--muted);
  font-size: 12px;
}

.platform-store-inline-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.channel-type-manager { min-width: 0; }
.channel-type-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.channel-type-form label { min-width: 0; }
.channel-type-form input, .channel-type-form select { width: 100%; min-width: 0; }
.channel-type-form .form-status, .channel-type-form .form-actions { grid-column: 1 / -1; }
.channel-type-note { margin: 12px 0; line-height: 1.6; }
.channel-type-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.channel-type-row strong, .channel-type-row .muted { overflow-wrap: anywhere; }
.channel-type-row .row-actions { grid-column: 1 / -1; flex-wrap: wrap; }
@media (max-width: 720px) {
  .channel-type-form { grid-template-columns: minmax(0, 1fr); }
  .channel-type-form input, .channel-type-form select, .channel-type-manager button { min-height: 44px; font-size: 16px; }
  .channel-type-form .form-actions { flex-wrap: wrap; }
}

.platform-store-inline-create:has(select) {
  grid-template-columns: minmax(180px, 0.45fr) minmax(260px, 1fr) auto auto;
}

.platform-store-inline-create input,
.platform-store-inline-create select {
  width: 100%;
  min-width: 0;
}

.platform-store-inline-create .form-status:empty {
  display: none;
}

.platform-store-table-card .tag-table-panel,
.platform-store-trade-card .tag-table-panel {
  max-height: 430px;
}

.platform-store-table {
  min-width: 680px;
}

.platform-store-table th {
  background: #f7f9fc;
  color: #536078;
  font-size: 12px;
  white-space: nowrap;
}

.platform-store-trade-card > summary {
  min-height: 54px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.platform-store-trade-card > summary::-webkit-details-marker {
  display: none;
}

.platform-store-trade-card > summary span {
  color: var(--muted);
  font-size: 12px;
}

.tag-domain-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tag-domain-tab {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f5f7fb;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tag-domain-tab:hover {
  color: var(--blue);
  border-color: #cbd8ff;
}

.tag-domain-tab.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 5px 12px rgba(47, 91, 234, 0.18);
}

.tag-workspace-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 620px;
}

.tag-workspace-sidebar {
  min-width: 0;
  background: #fbfcff;
  border-right: 1px solid var(--line);
}

.tag-workspace-sidebar-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--line);
}

.tag-workspace-sidebar-head strong {
  font-size: 16px;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.tag-workspace-groups .tag-group-row {
  min-height: 52px;
  padding: 0 12px 0 16px;
}

.tag-workspace-groups .tag-group-row.is-active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.tag-workspace-groups .tag-group-line {
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.tag-workspace-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background: #f7f9fc;
}

.tag-workspace-editor,
.tag-workspace-table-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.tag-workspace-editor {
  padding: 16px;
}

.tag-workspace-editor-head,
.tag-workspace-editor-footer,
.tag-workspace-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tag-workspace-editor-head {
  margin-bottom: 14px;
}

.tag-workspace-editor-head h3,
.tag-workspace-table-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.tag-workspace-editor-head .eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.tag-workspace-editing-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #edf2ff;
  font-size: 12px;
  font-weight: 700;
}

.tag-workspace-form-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) minmax(170px, 0.75fr);
  gap: 12px;
}

.tag-workspace-form-grid label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.tag-workspace-form-grid label > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tag-workspace-form-grid label em {
  color: #e5484d;
  font-style: normal;
}

.tag-workspace-form-grid input:not([type="color"]) {
  width: 100%;
  min-width: 0;
}

.tag-color-input-shell {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.tag-color-input-shell input[type="color"] {
  width: 38px;
  height: 30px;
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tag-color-input-shell code {
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
}

.tag-workspace-editor-footer {
  min-height: 46px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef1f6;
}

.tag-workspace-editor-footer .form-status {
  min-height: 18px;
  padding: 0;
}

.tag-workspace-editor-footer .form-actions {
  margin: 0;
}

.tag-workspace-table-head {
  min-height: 58px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.tag-workspace-table-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tag-workspace-table-head span,
.tag-workspace-table-head > strong {
  color: var(--muted);
  font-size: 12px;
}

.tag-workspace-table-card .tag-table-panel {
  max-height: 460px;
}

.tag-workspace-table-card .tag-config-table {
  min-width: 720px;
}

.tag-workspace-table-card .tag-config-table th {
  background: #f7f9fc;
  color: #536078;
  font-size: 12px;
  white-space: nowrap;
}

.tag-workspace-table-card .tag-config-table tr.is-editing td {
  background: #edf3ff;
}

.tag-color-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.tag-color-value .color-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 4px;
}

@media (max-width: 900px) {
  .platform-store-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .platform-store-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .platform-store-sidebar .tag-workspace-groups {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 8px;
  }

  .platform-store-sidebar .tag-group-row {
    min-width: 148px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .platform-store-sidebar .tag-group-row.is-active {
    box-shadow: inset 0 3px 0 var(--blue);
  }

  .platform-store-main {
    padding: 12px;
  }

  .platform-store-form-grid,
  .platform-store-form-grid.is-sales,
  .platform-store-inline-create,
  .platform-store-inline-create:has(select) {
    grid-template-columns: 1fr;
  }

  .tag-workspace-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tag-workspace-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tag-workspace-groups {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 8px;
  }

  .tag-workspace-groups .tag-group-row {
    min-width: 148px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .tag-workspace-groups .tag-group-row.is-active {
    box-shadow: inset 0 3px 0 var(--blue);
  }

  .tag-workspace-form-grid {
    grid-template-columns: 1fr;
  }

  .tag-workspace-main {
    padding: 12px;
  }
}

.permission-summary-text {
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.color-swatch {
  width: 24px;
  height: 24px;
  display: inline-block;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
}

.settings-panel li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  font-size: 13px;
}

.tag-config-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.tag-config-item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: var(--panel-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(18, 31, 44, 0.36);
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

/* Shipping and ecommerce dialogs must sit above the mobile bottom navigation. */
#formModal:has(.backend-order-check),
#formModal:has(#shippingCorrectionForm),
#formModal:has(#shippingCancellationForm),
#formModal:has(#shippingCorrectionHistory),
#formModal:has(#ecommerceForm),
#formModal:has(#ecommerceLeadEditForm),
#formModal:has(#ecommerceItems957),
#formModal:has(#additionalItem891Form),
#formModal:has(#ecommerceDepositDateForm) {
  z-index: 150;
}

.modal-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-header {
  min-height: 60px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 14px;
  overflow: auto;
}

.modal-form {
  border: 0;
  padding: 0;
}

.ecommerce-batch-form {
  display: grid;
  gap: 16px;
}

.ecommerce-shared-fields {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.ecommerce-customer-batch-panel {
  display: grid;
  gap: 12px;
}

.ecommerce-customer-batch-head,
.ecommerce-customer-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ecommerce-customer-batch-head h3,
.ecommerce-customer-batch-head p {
  margin: 0;
}

.ecommerce-customer-batch-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.ecommerce-customer-rows {
  display: grid;
  gap: 12px;
}

.ecommerce-customer-entry {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ecommerce-customer-sequence {
  margin-right: 8px;
  color: var(--text);
  font-weight: 800;
}

.ecommerce-customer-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ecommerce-customer-entry-grid .full {
  grid-column: 1 / -1;
}

.ecommerce-customer-hint:empty {
  display: none;
}

.supplement-batch-form {
  display: grid;
  gap: 16px;
}

.supplement-shared-fields {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.supplement-batch-defaults {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #f5f7ff;
}

.supplement-batch-defaults h3,
.supplement-batch-defaults p,
.supplement-order-batch-head h3,
.supplement-order-batch-head p {
  margin: 0;
}

.supplement-batch-defaults p,
.supplement-order-batch-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.supplement-order-batch-panel,
.supplement-order-rows {
  display: grid;
  gap: 12px;
}

.supplement-order-batch-head,
.supplement-order-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.supplement-order-entry {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.supplement-order-sequence {
  margin-right: 8px;
  color: var(--text);
  font-weight: 800;
}

.supplement-order-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.supplement-order-entry-grid .full {
  grid-column: 1 / -1;
}

.backend-supplement-payment-fields > [data-supplement-external-payment] {
  max-width: calc(50% - 6px);
}

.backend-supplement-internal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.backend-supplement-internal-fields[hidden] {
  display: none;
}

.backend-supplement-form,
.backend-supplement-edit-form {
  gap: 12px;
}

.backend-supplement-form-heading {
  margin-bottom: 0;
}

.backend-supplement-form-heading h2,
.backend-supplement-form-heading p {
  margin: 0;
}

.backend-supplement-form-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.backend-supplement-shared-fields,
.backend-supplement-form-row {
  display: grid;
  gap: 10px;
}

.backend-supplement-shared-fields,
.backend-supplement-identity-row,
.backend-supplement-amount-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.backend-supplement-shared-fields {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
}

.backend-supplement-contact-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backend-supplement-order-panel,
.backend-supplement-order-entry-grid {
  gap: 10px;
}

.backend-supplement-order-entry {
  gap: 10px;
  padding: 12px;
}

.backend-supplement-payment-row {
  grid-template-columns: minmax(160px, 0.7fr) minmax(160px, 0.7fr) minmax(340px, 1.6fr);
  align-items: end;
}

.backend-supplement-payment-row .backend-supplement-payment-fields {
  grid-column: auto;
  min-width: 0;
}

.backend-supplement-payment-row .backend-supplement-payment-fields > [data-supplement-external-payment] {
  max-width: none;
}

.backend-supplement-payment-row .backend-supplement-payment-fields:has([data-supplement-internal-payment]:not([hidden])) {
  grid-column: 1 / -1;
}

.backend-supplement-payment-row .backend-supplement-internal-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.backend-supplement-proof-row {
  grid-template-columns: minmax(230px, 0.6fr) minmax(0, 1.4fr);
  align-items: start;
}

.backend-supplement-edit-proof-row {
  grid-template-columns: minmax(210px, 0.45fr) minmax(150px, 0.35fr) minmax(0, 1.2fr);
}

.backend-supplement-current-proof {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.backend-supplement-current-proof .supplement-payment-proof {
  flex: 0 0 auto;
}

.supplement-batch-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.supplement-batch-summary strong {
  margin-left: 5px;
  color: var(--text);
}

@media (max-width: 760px) {
  .ecommerce-customer-batch-head,
  .ecommerce-customer-entry-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ecommerce-customer-batch-head > button,
  .ecommerce-customer-entry-head > button {
    align-self: flex-start;
  }

  .ecommerce-customer-entry-grid {
    grid-template-columns: 1fr;
  }

  .supplement-batch-defaults,
  .supplement-order-entry-grid {
    grid-template-columns: 1fr;
  }

  .backend-supplement-payment-fields > [data-supplement-external-payment] {
    max-width: none;
  }

  .backend-supplement-internal-fields {
    grid-template-columns: 1fr;
  }

  .backend-supplement-shared-fields,
  .backend-supplement-identity-row,
  .backend-supplement-contact-row,
  .backend-supplement-amount-row,
  .backend-supplement-payment-row,
  .backend-supplement-payment-row .backend-supplement-internal-fields,
  .backend-supplement-proof-row,
  .backend-supplement-edit-proof-row {
    grid-template-columns: 1fr;
  }

  .supplement-order-batch-head,
  .supplement-order-entry-head {
    align-items: stretch;
    flex-direction: column;
  }

  .supplement-order-batch-head > button,
  .supplement-order-entry-head > button {
    align-self: flex-start;
  }
}

.image-preview-backdrop {
  z-index: 70;
}

.image-preview-modal {
  width: min(1100px, 100%);
}

.export-result-panel {
  display: grid;
  gap: 18px;
}

.export-result-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.export-result-summary p {
  margin: 0;
  color: var(--muted);
}

.export-result-summary code {
  display: block;
  padding: 10px;
  border-radius: 7px;
  background: #eef3f7;
  color: var(--text);
  white-space: normal;
  word-break: break-all;
}

.export-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.export-scope-panel {
  display: grid;
  gap: 12px;
}

.modal-panel:has(.export-scope-panel) {
  width: min(640px, 100%);
}

.export-scope-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.export-scope-summary span,
.export-scope-options label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.export-scope-summary span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  background: var(--panel-soft);
}

.export-scope-summary span.is-highlight {
  border-color: #b7c7ff;
  background: #eef3ff;
}

.export-scope-summary small,
.export-scope-option small {
  color: var(--muted);
  font-size: 12px;
}

.export-scope-summary strong {
  font-size: 18px;
}

.export-scope-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.export-scope-options .export-scope-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.export-scope-option:has(input:checked) {
  border-color: var(--blue);
  background: #eef3ff;
}

.export-scope-option > span {
  display: grid;
  gap: 2px;
}

.export-scope-option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.export-select-col {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.export-select-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.employee-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-option {
  min-height: 64px;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 10px 12px;
}

.employee-option:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.employee-option span {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: #16212b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 7px;
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 80;
  font-size: 13px;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.lead-notification-banner {
  position: fixed;
  z-index: 96;
  top: 18px;
  right: 22px;
  width: min(390px, calc(100vw - 28px));
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #9aafff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(31, 55, 130, 0.24);
}

.lead-notification-banner-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lead-notification-banner-copy strong {
  font-size: 14px;
}

.lead-notification-banner-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-notification-banner-actions {
  display: flex;
  gap: 6px;
}

.lead-unread-mascot {
  position: fixed;
  z-index: 97;
  right: 22px;
  bottom: 22px;
  width: min(350px, calc(100vw - 28px));
  display: grid;
  gap: 7px;
  justify-items: end;
  filter: drop-shadow(0 16px 30px rgba(31, 55, 130, 0.24));
}

.lead-unread-mascot[hidden] {
  display: none !important;
}

.lead-unread-mascot-main {
  position: relative;
  width: 100%;
  min-height: 82px;
  padding: 11px 42px 11px 82px;
  display: grid;
  align-items: center;
  border: 1px solid #8da7ff;
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(135deg, #fff 0%, #f2f6ff 100%);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(31, 55, 130, 0.2);
}

.lead-unread-mascot-main:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.lead-unread-mascot-character {
  position: absolute;
  left: 12px;
  bottom: 9px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #24335d;
  border-radius: 20px 20px 24px 24px;
  background: linear-gradient(145deg, #ffe36d, #ffc83f);
  transform-origin: 50% 100%;
  animation: lead-mascot-hop 1.65s ease-in-out infinite;
}

.lead-unread-mascot-ear {
  position: absolute;
  top: -10px;
  width: 17px;
  height: 20px;
  border: 3px solid #24335d;
  background: #ffd451;
  transform: rotate(45deg);
  z-index: -1;
}

.lead-unread-mascot-ear-left {
  left: 5px;
  border-radius: 7px 2px 3px 2px;
}

.lead-unread-mascot-ear-right {
  right: 5px;
  border-radius: 2px 7px 2px 3px;
}

.lead-unread-mascot-face {
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 17px;
}

.lead-unread-mascot-eye {
  width: 5px;
  height: 7px;
  border-radius: 50%;
  background: #24335d;
}

.lead-unread-mascot-mark {
  margin-top: 17px;
  color: #3a2c08;
  font-family: serif;
  font-size: 20px;
  font-weight: 800;
}

.lead-unread-mascot-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.lead-unread-mascot-copy strong,
.lead-unread-mascot-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-unread-mascot-copy strong {
  color: #1e3fae;
  font-size: 15px;
}

.lead-unread-mascot-copy span {
  color: var(--muted);
  font-size: 12px;
}

.lead-unread-mascot-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #e5484d;
  font-size: 12px;
  font-weight: 800;
  animation: lead-mascot-count-pulse 1.65s ease-in-out infinite;
}

.lead-unread-mascot-enable {
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid #b9c8f5;
  border-radius: 999px;
  color: #315fe8;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.lead-unread-mascot-enable:hover {
  border-color: #315fe8;
  background: #f4f7ff;
}

@keyframes lead-mascot-hop {
  0%, 45%, 100% { transform: translateY(0) rotate(0); }
  12% { transform: translateY(-9px) rotate(-3deg); }
  24% { transform: translateY(0) rotate(2deg); }
  33% { transform: translateY(-4px) rotate(0); }
}

@keyframes lead-mascot-count-pulse {
  0%, 45%, 100% { transform: scale(1); }
  15% { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  .lead-unread-mascot-character,
  .lead-unread-mascot-count {
    animation: none;
  }
}

@media (max-width: 720px) {
  .lead-unread-mascot {
    right: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: min(330px, calc(100vw - 20px));
  }

  .lead-unread-mascot-main {
    min-height: 74px;
    padding-left: 72px;
  }

  .lead-unread-mascot-character {
    width: 52px;
    height: 52px;
  }

  .lead-notification-panel-foot {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
}

.label-preview-wrap {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 12px;
}

.label-preview-sheet {
  width: 240px;
  height: 360px;
  border: 1px solid #111827;
  background: #fff;
  color: #111827;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 18px 24px 30px;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.label-preview-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  max-height: 68px;
  overflow: hidden;
  padding-bottom: 9px;
  border-bottom: 1px solid #111827;
}

.label-preview-line {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
  line-height: 1.3;
  word-break: break-all;
}

.label-preview-line strong {
  color: #111827;
  font-size: 13px;
}

.label-preview-line-code {
  grid-template-columns: 60px 100px;
}

.label-preview-line-code span {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.label-preview-qr {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  transform: translateY(-6px);
}

.label-preview-qr img {
  width: 84px;
  height: 84px;
  background: #fff;
}

.label-preview-qr span {
  font-size: 12px;
  line-height: 1.3;
}

.label-preview-meta {
  color: var(--muted);
  font-size: 13px;
}

.label-print-helper-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.label-print-helper-actions .primary-button {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
}

.label-print-helper-actions span {
  color: var(--muted-color, #64748b);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.label-print-helper-actions span[data-state="success"] {
  color: #047857;
  font-weight: 700;
}

.label-print-helper-actions span[data-state="warning"] {
  color: #b45309;
  font-weight: 700;
}

.label-print-helper-actions [data-copy-state="success"] {
  background: #059669;
  border-color: #059669;
}

.label-print-helper-help {
  color: var(--muted-color, #64748b);
  font-size: 13px;
  text-align: center;
}

.label-print-helper-help summary {
  display: inline-block;
  padding: 6px 10px;
  cursor: pointer;
  color: #64748b;
}

.label-print-helper-help > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.label-print-helper-help a,
.label-print-helper-help button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
}

@media (max-width: 640px) {
  .label-print-helper-help > div {
    grid-template-columns: 1fr;
  }
}

.label-print-task-manual-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  text-align: left;
}

.label-print-task-manual-copy textarea {
  width: 100%;
  min-height: 86px;
  padding: 10px;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  resize: none;
}

.inventory-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inventory-detail-grid > div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.inventory-detail-grid .full {
  grid-column: 1 / -1;
}

.inventory-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inventory-detail-grid strong {
  font-size: 14px;
  word-break: break-word;
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .backend-profit-overview-body {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .settings-tab-content {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .permission-tree {
    grid-template-columns: 1fr;
  }

  .permission-check-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .detail-drawer {
    width: calc(100vw - 72px);
  }

  .detail-workbench {
    grid-template-columns: 1fr;
  }

  .detail-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 72px 1fr;
  }

  .sidebar {
    padding: 14px 10px;
  }

  .brand {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
  }

  .brand strong,
  .brand span,
  .nav-item span:last-child {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .main {
    padding: 14px;
  }

  .inventory-toolbar {
    grid-template-columns: 1fr;
  }

  .inventory-history-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar label,
  .inventory-toolbar label:first-child,
  .inventory-toolbar label:has(.range-fields),
  .inventory-toolbar label:has(#inventoryBrandFilter),
  .inventory-toolbar label:has(#inventoryModelFilter),
  .inventory-toolbar .inventory-filter-wide {
    grid-column: auto;
  }

  .topbar,
  .toolbar,
  .section-heading,
  .backend-stats-head,
  .profit-panel-head,
  .profit-panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-grid,
  .backend-report-grid,
  .split-layout,
  .form-grid,
  .settings-tab-content,
  .column-grid,
  .tag-options,
  .permission-check-grid,
  .tag-manager,
  .image-upload-grid,
  .employee-picker {
    grid-template-columns: 1fr;
  }

  .organization-structure-layout,
  .organization-option-form,
  .backend-acceptance-layout,
  .backend-acceptance-form,
  .backend-auto-assignment-form {
    grid-template-columns: 1fr;
  }

  .backend-auto-assignment-form .form-status,
  .backend-auto-assignment-form .primary-button {
    grid-column: 1;
  }

  .backend-auto-assignment-preview {
    grid-template-columns: 1fr;
  }

  .organization-department-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .organization-workspace-tabs {
    overflow-x: auto;
  }

  .organization-workspace-tabs button {
    flex: 0 0 auto;
  }

  .backend-acceptance-layout {
    margin-top: 10px;
  }

  .backend-employee-level-row {
    grid-template-columns: 1fr;
  }

  .product-config-inline-form.is-destination,
  .product-config-inline-form.is-category,
  .product-brand-toolbar,
  .product-brand-create-form,
  .product-brand-summary,
  .product-brand-pending-list {
    grid-template-columns: 1fr;
  }

  .product-config-tabs {
    overflow-x: auto;
    padding: 0 6px;
  }

  .product-config-tabs button {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .product-brand-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-brand-create-actions {
    justify-content: flex-start;
  }

  .product-config-inline-form button {
    justify-self: start;
  }

  .product-config-table {
    min-width: 560px;
  }

  .range-fields {
    grid-template-columns: 1fr;
  }

  .tag-group-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .backend-profit-overview-body {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .detail-drawer {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }

  .detail-side {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .lead-item-quantity-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin: 8px -18px 0;
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.09);
  }

  .lead-overview-save-button {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    font-size: 15px;
  }

  .lead-overview-save-status {
    padding: 0 2px;
    text-align: left;
  }

  .summary-grid,
  .tag-config-item {
    grid-template-columns: 1fr;
  }

  .lead-core-summary-grid,
  .lead-item-detail-grid,
  .lead-item-detail-grid.has-item-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backend-report-card:last-child {
    grid-column: auto;
  }
}

.inventory-toolbar .range-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-config-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
}

.platform-config-form .form-status,
.platform-config-form .form-actions {
  grid-column: 1 / -1;
}

.invalid-tag-evidence-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.invalid-tag-evidence-panel .tag-evidence-field {
  display: block;
  margin-top: 10px;
}

.identity-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.identity-readonly-grid .full {
  grid-column: 1 / -1;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(241, 245, 249, 0.96);
}

.login-screen.is-visible {
  display: flex;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 20px;
  color: var(--text);
}

.login-brand span {
  margin-top: 2px;
  color: var(--muted);
}

.login-card label {
  display: block;
  margin-top: 14px;
}

.login-card label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.login-card input {
  width: 100%;
}

.login-card .primary-button {
  width: 100%;
  margin-top: 18px;
}

.login-error {
  min-height: 20px;
  margin-top: 12px;
  color: #dc2626;
  font-size: 13px;
}

.login-location-notice {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.top-logout-button {
  height: 38px;
  align-self: end;
}

.permission-template-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1.25fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.permission-template-panel > .settings-panel-body {
  margin-top: 0;
}

.permission-template-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.permission-template-editor,
.permission-template-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.permission-template-form-head,
.permission-template-list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.permission-template-form-head h4,
.permission-template-list-head h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.permission-template-form-head p,
.permission-template-list-head p,
.permission-template-list small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.permission-template-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.permission-template-fields > label,
.permission-template-fields > .ai-knowledge-department-scope-field,
.permission-template-fields > .hr-department-scope-field {
  min-width: 0;
  margin: 0;
}

.permission-template-fields .permission-template-name-field {
  flex: 1 1 140px;
  max-width: 155px;
}

.permission-template-fields .permission-template-status-field {
  flex: 0 1 90px;
  max-width: 95px;
}

.permission-template-fields .permission-template-type-field {
  flex: 0 1 155px;
  max-width: 175px;
}

.permission-template-fields .permission-data-scope-field {
  flex: 1 1 145px;
  max-width: 155px;
}

.permission-template-fields .own-lead-contact-duration-field {
  flex: 1.5 1 250px;
  max-width: 270px;
}

.permission-template-fields .own-lead-contact-duration-controls {
  grid-template-columns: minmax(88px, 1.2fr) minmax(48px, 0.65fr) minmax(48px, 0.65fr);
  gap: 6px;
}

.permission-template-fields .own-lead-contact-duration-controls > * {
  min-width: 0;
}

.permission-template-fields .full {
  flex-basis: 100%;
}

.permission-template-fields .ai-knowledge-department-scope-field,
.permission-template-fields .hr-department-scope-field {
  flex: 1 1 155px;
  max-width: 165px;
  grid-template-columns: 1fr;
  align-items: start;
}

.permission-template-fields .ai-knowledge-department-scope-field.is-expanded,
.permission-template-fields .hr-department-scope-field.is-expanded {
  flex: 1 0 100%;
  max-width: none;
  grid-template-columns: minmax(175px, 220px) minmax(360px, 1fr);
  align-items: end;
}

.permission-template-fields .ai-knowledge-department-scope-field.is-expanded .ai-knowledge-department-options,
.permission-template-fields .hr-department-scope-field.is-expanded .hr-department-options {
  min-height: 40px;
  padding: 6px 8px;
}

.permission-template-tree-wrap {
  max-height: 520px;
  margin-top: 14px;
  overflow: auto;
  padding-right: 4px;
}

.permission-template-list table {
  width: 100%;
  border-collapse: collapse;
}

.permission-template-list th,
.permission-template-list td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  vertical-align: top;
  text-align: left;
}

.permission-template-list tr.is-active {
  background: #f2f6ff;
}

.permission-template-actions {
  white-space: nowrap;
}

.permission-template-actions .row-actions {
  justify-content: flex-start;
}

.permission-template-sync-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.permission-template-sync-list table {
  width: 100%;
  border-collapse: collapse;
}

.permission-template-sync-list th,
.permission-template-sync-list td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.permission-template-sync-list th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}

.permission-template-sync-list td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.permission-template-sync-list tr.is-incompatible {
  background: #fff7ed;
  color: #9a3412;
}

.risk-log-heading {
  align-items: center;
}

.risk-log-heading p {
  margin: 0;
}

.risk-rule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.risk-rule-summary div {
  display: grid;
  gap: 4px;
}

.risk-rule-summary strong {
  color: var(--text);
}

.risk-rule-summary span {
  color: var(--muted);
  line-height: 1.5;
}

.risk-rule-settings {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.risk-rule-settings summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 12px;
  cursor: pointer;
}

.risk-rule-settings summary span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.risk-rule-form {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
}

.risk-rule-meta {
  display: flex;
  align-items: end;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
}

.risk-log-table-wrap {
  max-height: 70vh;
}

.risk-log-table th,
.risk-log-table td {
  vertical-align: top;
}

.risk-lead-list {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

.risk-lead-list div {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
}

.risk-lead-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .permission-template-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .platform-config-form {
    grid-template-columns: 1fr;
  }

  .identity-readonly-grid {
    grid-template-columns: 1fr;
  }

  .permission-template-fields {
    gap: 10px;
  }

  .permission-template-fields > label,
  .permission-template-fields > .ai-knowledge-department-scope-field,
  .permission-template-fields .permission-template-name-field,
  .permission-template-fields .permission-template-status-field,
  .permission-template-fields .permission-data-scope-field,
  .permission-template-fields .own-lead-contact-duration-field {
    flex: 1 1 calc(50% - 5px);
    max-width: none;
  }
}

@media (max-width: 560px) {
  .permission-template-fields > label,
  .permission-template-fields > .ai-knowledge-department-scope-field,
  .permission-template-fields .permission-template-name-field,
  .permission-template-fields .permission-template-status-field,
  .permission-template-fields .permission-data-scope-field,
  .permission-template-fields .own-lead-contact-duration-field {
    flex-basis: 100%;
    max-width: none;
  }

  .permission-template-fields .ai-knowledge-department-scope-field.is-expanded {
    grid-template-columns: 1fr;
  }
}

.care-page {
  display: grid;
  gap: 10px;
}

.care-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.care-toolbar {
  grid-template-columns: minmax(130px, .7fr) minmax(220px, 1.35fr) repeat(3, minmax(145px, 1fr));
}

.care-table th:last-child,
.care-table td:last-child {
  min-width: 260px;
}

.care-comparison-list,
.care-review-comparisons,
.care-log-list {
  display: grid;
  gap: 12px;
}

.care-log-disclosure {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.care-log-disclosure summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.care-log-disclosure summary::-webkit-details-marker {
  display: none;
}

.care-log-disclosure summary::after {
  content: "展开";
  margin-left: auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
}

.care-log-disclosure[open] summary::after {
  content: "收起";
}

.care-log-disclosure[open] .care-log-list {
  margin-top: 10px;
}

.care-log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.care-log-heading span {
  color: var(--muted);
  font-size: 12px;
}

.care-log-list p {
  margin: 6px 0 0;
}

.care-comparison-editor,
.care-config-section,
.care-compare-row,
.care-log-list > div {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

.care-comparison-heading,
.care-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.care-project-selector > span,
.care-project-checks > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.care-project-selector-heading,
.care-cost-heading,
.care-cost-total,
.care-project-cost-row,
.care-project-cost-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.care-project-selector-heading {
  margin-bottom: 8px;
}

.care-project-selector-heading > span {
  color: var(--muted);
}

.care-project-selector-heading > strong {
  color: var(--accent);
  font-size: 13px;
}

.required-mark {
  color: #dc2626;
  font-weight: 700;
  margin-right: 4px;
}

.required-mark[hidden] {
  display: none;
}

.care-project-options {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px 18px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.care-project-option {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.care-project-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.care-project-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.care-project-empty,
.care-cost-empty {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
}

.care-cost-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.care-cost-heading span {
  color: var(--muted);
  font-size: 12px;
}

.care-project-cost-list {
  display: grid;
  gap: 7px;
}

.care-project-cost-row {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.care-project-cost-row > .care-number-input {
  width: min(210px, 48%);
}

.care-project-cost-total {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.care-project-cost-summary {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.care-project-cost-summary span {
  padding: 5px 8px;
  border-radius: 5px;
  background: #f1f5f9;
}

[data-care-internal-field] > label {
  display: grid;
}

.care-part-fields {
  display: grid;
  grid-template-columns: minmax(120px, .55fr) minmax(160px, .7fr) minmax(260px, 1.5fr);
  gap: 10px;
  align-items: end;
}

#careOrderForm.is-external-care .care-part-fields {
  grid-template-columns: minmax(120px, .55fr) minmax(170px, .8fr) minmax(130px, .5fr) minmax(220px, 1.2fr);
}

.care-part-fields > .full {
  grid-column: 1 / -1;
}

.care-external-fields,
.care-date-fields {
  display: grid;
  gap: 10px;
  align-items: end;
}

.care-external-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.care-date-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.care-before-strip,
.care-compare-row > div > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.care-compare-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  background: #f8fafc;
}

.care-config-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.care-config-save-row {
  display: flex;
  justify-content: flex-end;
  min-height: 36px;
}

.care-config-section {
  min-width: 0;
}

.care-project-matrix-wrap {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.care-project-matrix {
  --care-project-count: 1;
  display: grid;
  grid-template-columns: 100px repeat(var(--care-project-count), minmax(100px, 1fr));
  grid-template-rows: repeat(5, auto);
  gap: 7px 10px;
  align-items: center;
  min-width: calc(100px + var(--care-project-count) * 100px + var(--care-project-count) * 10px);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.care-project-config-record {
  display: contents;
}

.care-project-matrix-label {
  align-self: center;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.care-project-category-label,
.care-project-category-cell {
  grid-row: 1;
}

.care-project-name-label,
.care-project-name-cell {
  grid-row: 2;
}

.care-project-cost-label,
.care-project-cost-cell {
  grid-row: 3;
}

.care-project-days-label,
.care-project-days-cell {
  grid-row: 4;
}

.care-project-manage-label,
.care-project-manage-cell {
  grid-row: 5;
}

.care-project-matrix-cell {
  min-width: 0;
}

.care-project-category-cell select,
.care-project-matrix-cell input[type="text"],
.care-project-matrix-cell input[type="number"] {
  width: 100%;
  min-width: 0;
}

.care-project-manage-cell {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.care-number-input {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}

.care-number-input input[type="number"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.care-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.care-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.care-toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: #cbd5e1;
  transition: background-color .15s ease;
}

.care-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
  transition: transform .15s ease;
}

.care-toggle input:checked + .care-toggle-track {
  background: #16a34a;
}

.care-toggle input:checked + .care-toggle-track::after {
  transform: translateX(14px);
}

.care-toggle-text {
  color: var(--muted);
  font-size: 12px;
}

.care-toggle-text::after {
  content: "停用";
}

.care-toggle input:checked ~ .care-toggle-text::after {
  content: "启用";
}

.care-delete-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.care-delete-icon:hover {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}

.care-project-config-record:has([data-field="enabled"]:not(:checked)) .care-project-matrix-cell:not(.care-project-manage-cell) {
  opacity: .55;
}

.care-worker-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
}

.care-worker-config-item {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto 36px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.care-worker-config-item > input[data-field="name"] {
  min-width: 0;
  width: 100%;
}

.care-config-row {
  display: grid;
  grid-template-columns: 1.5fr minmax(120px, .7fr) minmax(110px, .6fr) auto 40px;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.care-config-row.vendor {
  grid-template-columns: 1.4fr 1fr 1fr auto 40px;
}

.care-enabled-check {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 900px) {
  .care-toolbar,
  .care-config-row,
  .care-config-row.vendor,
  .care-compare-row {
    grid-template-columns: 1fr;
  }

  .care-project-options {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .care-project-selector-heading,
  .care-cost-heading,
  .care-project-cost-row {
    align-items: stretch;
    flex-direction: column;
  }

  .care-project-cost-row > .care-number-input {
    width: 100%;
  }

  .care-worker-config-grid {
    grid-template-columns: 1fr;
  }

  .care-part-fields,
  #careOrderForm.is-external-care .care-part-fields {
    grid-template-columns: 1fr;
  }

  .care-external-fields,
  .care-date-fields {
    grid-template-columns: 1fr;
  }

  .care-part-fields > .full {
    grid-column: auto;
  }
}
.sales-workspace {
  padding: 14px;
}

.sales-heading {
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.sales-tabs {
  margin: 0;
}

.sales-filter-bar {
  display: grid;
  grid-template-columns: 150px 170px 210px minmax(260px, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e0ea;
  background: #f8fafc;
}

.sales-traffic-filter-bar {
  grid-template-columns: 150px 170px 210px 150px minmax(260px, 420px);
  justify-content: start;
}

.sales-filter-bar label,
.sales-order-fields label,
.sales-finance-fields label,
.sales-item-editor-row label,
.sales-receipt-editor-row label {
  min-width: 0;
}

.sales-tab-panel {
  margin-top: 12px;
}

.sales-table-wrap {
  max-height: calc(100vh - 280px);
  min-height: 260px;
}

.sales-table th,
.sales-table td {
  white-space: nowrap;
}

.sales-pledge-table {
  min-width: 1750px;
}

.sales-table:not(.sales-traffic-table) td:nth-child(3),
.sales-table:not(.sales-traffic-table) td:nth-child(8) {
  white-space: normal;
  min-width: 160px;
}

.sales-table td strong,
.sales-table td small {
  display: block;
}

.sales-table td small {
  margin-top: 4px;
  color: #667085;
  line-height: 1.35;
}

.sales-row-actions {
  min-width: 190px;
}

.sales-traffic-table {
  min-width: 1970px;
  table-layout: fixed;
}

.sales-traffic-table th,
.sales-traffic-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-traffic-table [data-sales-lead-cell="mobile"],
.sales-traffic-table [data-sales-lead-cell="latestNote"] {
  min-width: 0;
}

.sales-traffic-table [data-sales-lead-cell="latestNote"] {
  white-space: normal;
}

.sales-traffic-table .sales-lead-name-link {
  margin-top: 0;
  font-weight: 600;
}

.sales-lead-customer-type-select {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  min-height: 34px;
  padding: 6px 24px 6px 8px;
}

.sales-lead-customer-type-select.is-saving {
  opacity: 0.65;
}

.sales-traffic-row-actions {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 6px;
  align-items: center;
  min-width: max-content;
}

.sales-recycle-row-actions {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px;
  align-items: center;
  min-width: max-content;
}

.sales-payment-transactions {
  min-width: 210px;
  white-space: normal;
}

.sales-payment-transactions span {
  display: block;
  line-height: 1.45;
}

.sales-payment-transactions strong {
  display: inline;
  margin-right: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef2f6;
  color: #475467;
  font-size: 13px;
}

.status-badge.success {
  background: #e8f7ef;
  color: #147a50;
}

.status-badge.warning {
  background: #fff4d6;
  color: #8a5a00;
}

.status-badge.danger {
  background: #fdecec;
  color: #b42318;
}

.sales-order-form {
  display: grid;
  gap: 14px;
}

.sales-order-fields,
.sales-finance-fields {
  gap: 10px 12px;
}

.sales-form-section {
  padding: 12px;
  border: 1px solid #d8e0ea;
  background: #f8fafc;
}

.sales-form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sales-form-section-head.is-action-only {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.sales-item-editor-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 180px 38px;
  align-items: start;
  gap: 10px;
  margin-top: 8px;
}

.sales-inventory-field {
  min-width: 0;
}

.sales-inventory-picker {
  position: relative;
  min-width: 0;
}

.sales-inventory-search[aria-expanded="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.sales-inventory-search[aria-invalid="true"] {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px #fee4e2;
}

.sales-inventory-listbox {
  position: absolute;
  z-index: 12;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16);
}

.sales-inventory-listbox[hidden] {
  display: none;
}

.sales-inventory-option {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}

.sales-inventory-option:last-child {
  border-bottom: 0;
}

.sales-inventory-option > strong,
.sales-inventory-option > span {
  overflow-wrap: anywhere;
}

.sales-inventory-option > span {
  color: var(--muted);
  font-size: 12px;
}

.sales-inventory-option:hover,
.sales-inventory-option.is-active {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.sales-inventory-option.is-selected {
  background: #f0f6ff;
}

.sales-inventory-option.is-disabled {
  background: #f8fafc;
  color: #667085;
  cursor: not-allowed;
}

.sales-inventory-option.is-disabled:hover,
.sales-inventory-option.is-disabled.is-active {
  background: #fff4ed;
  box-shadow: inset 3px 0 0 #f79009;
}

.sales-inventory-option .sales-inventory-option-ready,
.sales-inventory-snapshot-ready {
  color: #18794e;
}

.sales-inventory-option .sales-inventory-option-reason,
.sales-inventory-snapshot-warning,
.sales-price-preserved-note {
  color: #b54708;
}

.sales-inventory-no-results {
  padding: 16px 10px;
  color: var(--muted);
  text-align: center;
}

.sales-inventory-snapshot {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sales-inventory-snapshot strong {
  color: var(--text);
  font-size: 13px;
}

.sales-inventory-snapshot-empty {
  align-self: center;
}

.sales-price-preserved-note {
  line-height: 1.4;
}

.sales-item-editor-row .sales-remove-item {
  margin-top: 22px;
}

.inventory-sales-unavailable {
  display: inline-grid;
  max-width: 230px;
  gap: 3px;
}

.inventory-sales-unavailable small {
  color: #b54708;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sales-receipt-editor-row {
  display: grid;
  grid-template-columns: 125px minmax(160px, 1fr) 130px minmax(220px, 1.25fr) 38px;
  align-items: end;
  gap: 10px;
  margin-top: 8px;
}

.single-fee-payment-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e2f3;
  border-radius: 12px;
  background: #fbfcfe;
}

.single-fee-payment-primary {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(190px, 1fr) minmax(220px, 1.2fr);
  gap: 10px;
  align-items: end;
}

.single-fee-payment-internal {
  margin-top: 2px;
}

.payment-internal-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 125px minmax(150px, 1fr) minmax(150px, 1fr) minmax(210px, 1.2fr);
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #d7e2f3;
  border-radius: 10px;
  background: #f7faff;
}

.payment-internal-fields[hidden] {
  display: none;
}

.payment-proof-upload {
  grid-column: 1 / 3;
}

.payment-proof-preview {
  min-height: 38px;
}

.payment-proof-recognition-status {
  grid-column: 1 / -1;
  color: #475467;
  font-size: 12px;
}

.sales-receipt-transaction-field small,
.sales-section-hint {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-weight: 400;
}

.sales-remove-item {
  width: 38px;
  height: 38px;
}

.sales-live-summary,
.sales-kpi-strip {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  background: #d8e0ea;
}

.sales-live-summary {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.recycle-payment-summary {
  display: block;
  border-radius: 6px;
}

.recycle-payment-summary .payment-reconcile-lines {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
  margin-top: 0;
}

.recycle-payment-summary .payment-reconcile-line {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
}

.recycle-payment-summary .payment-reconcile-line:last-child {
  justify-content: center;
}

.recycle-payment-summary .payment-reconcile-line > span {
  padding: 0;
  background: transparent;
}

.recycle-payment-summary .payment-reconcile-line > .pill {
  padding: 4px 8px;
}

.sales-kpi-strip {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.sales-referral-kpi-strip {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.sales-performance-dashboard-section + .sales-referral-dashboard-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #d8e0ea;
}

.sales-referral-dashboard-section h4 {
  margin: 18px 0 8px;
}

.sales-lead-referral-source-card {
  border-left: 4px solid #4b70e2;
}

.sales-lead-source-id {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.lead-transfer-status {
  margin-top: 4px;
  color: #315fc5;
  font-size: 12px;
  font-weight: 600;
}

.sales-referral-config-panel .settings-panel-body + .settings-panel-body {
  border-top: 1px solid #e4e9f0;
}

.sales-referral-config-panel {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.sales-live-summary span,
.sales-kpi-strip > div {
  padding: 10px 12px;
  background: #fff;
}

.sales-live-summary .sales-amount-check-ok {
  background: #eefaf3;
  color: #18794e;
}

.sales-live-summary .sales-amount-check-error {
  background: #fff1f0;
  color: #b42318;
}

.sales-live-summary .sales-amount-check-pending {
  background: #fff8e6;
  color: #8a5b00;
}

.sales-kpi-strip span,
.sales-kpi-strip strong {
  display: block;
}

.sales-kpi-strip span {
  color: #667085;
  font-size: 13px;
}

.sales-kpi-strip strong {
  margin-top: 6px;
  font-size: 20px;
}

.reconcile-summary-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-left: 4px solid #2d6a4f;
  background: #f7faf8;
  color: #344054;
}

.sales-refund-items {
  display: grid;
  gap: 8px;
}

.sales-refund-item {
  display: grid;
  grid-template-columns: 22px minmax(220px, 1fr) 150px 150px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #e4e9f0;
}

.sales-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mono-cell {
  font-family: Consolas, monospace;
}

@media (max-width: 1280px) {
  .sales-traffic-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-traffic-filter-bar .sales-keyword-filter {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .sales-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-item-editor-row {
    grid-template-columns: minmax(0, 1fr) 150px 38px;
  }

  .sales-receipt-editor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 38px;
  }

  .sales-receipt-transaction-field {
    grid-column: 1 / 3;
  }

  .payment-internal-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .single-fee-payment-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .single-fee-payment-primary [data-payment-external-fields] {
    grid-column: 1 / -1;
  }

  .sales-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sales-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-filter-bar,
  .sales-live-summary,
  .sales-kpi-strip,
  .sales-detail-grid {
    grid-template-columns: 1fr;
  }

  .recycle-payment-summary .payment-reconcile-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-traffic-filter-bar .sales-keyword-filter {
    grid-column: auto;
  }

  .sales-item-editor-row {
    grid-template-columns: 1fr 120px 38px;
  }

  .sales-receipt-editor-row {
    grid-template-columns: 1fr 38px;
  }

  .sales-receipt-editor-row label,
  .sales-receipt-transaction-field {
    grid-column: 1;
  }

  .sales-receipt-editor-row .sales-remove-item {
    grid-column: 2;
    grid-row: 1;
  }

  .payment-internal-fields {
    grid-template-columns: 1fr;
  }

  .single-fee-payment-primary {
    grid-template-columns: 1fr;
  }

  .single-fee-payment-primary [data-payment-external-fields] {
    grid-column: 1;
  }

  .payment-internal-fields label,
  .payment-proof-upload,
  .payment-proof-recognition-status {
    grid-column: 1;
  }

  .sales-refund-item {
    grid-template-columns: 22px 1fr;
  }

  .sales-refund-item input[type="number"],
  .sales-refund-item small {
    grid-column: 2;
  }
}

/* 人事薪资：回收前端第一阶段 */
.sidebar {
  overflow-y: auto;
}

.hr-workspace {
  --hr-blue: #2563eb;
  --hr-blue-soft: #eef4ff;
  --hr-green: #15945d;
  --hr-green-soft: #ecf9f1;
  --hr-orange: #e77919;
  --hr-orange-soft: #fff5e9;
  --hr-red: #d84b47;
  --hr-red-soft: #fff0ef;
  color: #1f2b3d;
}

.hr-workspace button,
.hr-workspace input,
.hr-workspace select,
.hr-workspace textarea {
  font: inherit;
}

.hr-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.hr-module-head.is-self-attendance {
  justify-content: flex-end;
}

.topbar.is-self-attendance > div:first-child .eyebrow {
  display: none;
}

.hr-module-head h2 {
  margin-top: 5px;
  font-size: 21px;
}

.hr-module-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hr-breadcrumb {
  color: #4c5b70;
  font-size: 13px;
}

.hr-demo-chip {
  padding: 7px 11px;
  border: 1px solid #b9cfff;
  border-radius: 999px;
  background: var(--hr-blue-soft);
  color: #245acb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hr-module-tabs,
.hr-payroll-mode {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.hr-module-tabs button,
.hr-payroll-mode button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #657287;
  font-weight: 700;
  white-space: nowrap;
}

.hr-module-tabs button:hover,
.hr-module-tabs button.is-active,
.hr-payroll-mode button:hover,
.hr-payroll-mode button.is-active {
  border-bottom-color: var(--hr-blue);
  color: var(--hr-blue);
}

.hr-page-body {
  margin-top: 14px;
}

.hr-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-filter-bar label {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.hr-filter-bar label > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-filter-bar input,
.hr-filter-bar select,
.hr-split-table input,
.hr-score-input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #fff;
  color: #203047;
}

.hr-filter-bar select:disabled {
  opacity: 1;
  background: #f8fafc;
}

.hr-template-filter {
  min-width: 280px !important;
}

.hr-performance-scope-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #cbd9ff;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8faff 0%, #eef3ff 100%);
}

.hr-performance-scope-bar > div {
  display: grid;
  gap: 3px;
  margin-right: auto;
}

.hr-performance-scope-bar > div strong {
  color: #183153;
  font-size: 14px;
}

.hr-performance-scope-bar > div span,
.hr-performance-scope-bar label > span {
  color: var(--muted);
  font-size: 11px;
}

.hr-performance-scope-bar label {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.hr-performance-scope-bar select {
  min-height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid #b8c8f4;
  border-radius: 7px;
  background: #fff;
  color: #1e2e47;
}

.hr-performance-scope-count {
  align-self: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #dfe8ff;
  color: #2853c5;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hr-performance-workspace {
  display: grid;
  gap: 12px;
}

.hr-performance-workflow-nav {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-performance-workflow-title {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 170px;
  padding: 4px 10px;
  border-right: 1px solid var(--line);
}

.hr-performance-workflow-title span {
  color: var(--muted);
  font-size: 10px;
}

.hr-performance-workflow-title strong {
  color: #26354d;
  font-size: 13px;
}

.hr-performance-workflow-nav > button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 145px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fbfcfe;
  color: #526178;
  text-align: left;
  cursor: pointer;
}

.hr-performance-workflow-nav > button:hover {
  border-color: #a9bfe9;
  background: #f5f8ff;
}

.hr-performance-workflow-nav > button.is-active {
  border-color: #6f91e8;
  background: #edf3ff;
  color: #2f61c3;
}

.hr-performance-workflow-nav > button b {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #e5eaf2;
  color: #65748a;
  font-size: 11px;
}

.hr-performance-workflow-nav > button.is-active b {
  background: #4f74dc;
  color: #fff;
}

.hr-performance-workflow-nav > button span,
.hr-performance-workflow-nav > button small {
  display: block;
}

.hr-performance-workflow-nav > button span {
  font-size: 12px;
  font-weight: 700;
}

.hr-performance-workflow-nav > button small {
  margin-top: 2px;
  color: #8792a3;
  font-size: 9px;
  font-weight: 400;
}

.hr-performance-stage-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hr-progress-strip,
.hr-approval-counts,
.hr-payroll-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-progress-strip > div:first-child {
  display: grid;
  gap: 4px;
}

.hr-progress-strip span,
.hr-progress-strip p,
.hr-approval-counts span,
.hr-approval-counts p {
  color: var(--muted);
  font-size: 12px;
}

.hr-progress-strip p,
.hr-approval-counts p {
  margin: 0 0 0 auto;
}

.hr-progress-track {
  width: 150px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.hr-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hr-green);
}

.hr-score-layout,
.hr-submit-layout,
.hr-approval-layout,
.hr-payroll-layout {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hr-score-layout {
  grid-template-columns: 226px minmax(620px, 1fr) 276px;
}

.hr-submit-layout {
  grid-template-columns: minmax(720px, 1fr) 290px;
}

.hr-approval-layout {
  grid-template-columns: 240px minmax(760px, 1fr);
}

.hr-payroll-layout {
  grid-template-columns: minmax(700px, 1fr) 350px;
}

.hr-employee-queue,
.hr-score-main,
.hr-item-detail,
.hr-submit-main,
.hr-submit-confirm,
.hr-approval-main,
.hr-payroll-main,
.hr-payroll-detail {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-panel-title,
.hr-person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.hr-panel-title span,
.hr-person-head span {
  color: var(--muted);
  font-size: 12px;
}

.hr-person-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hr-person-head strong {
  font-size: 17px;
}

.hr-employee-row {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  text-align: left;
}

.hr-employee-row:hover,
.hr-employee-row.is-active {
  background: #f3f7ff;
}

.hr-employee-row.is-active {
  box-shadow: inset 3px 0 0 var(--hr-blue);
}

.hr-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f0ff;
  color: var(--hr-blue);
  font-weight: 800;
}

.hr-employee-copy,
.hr-employee-state {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hr-employee-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-employee-copy small,
.hr-employee-state small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.hr-employee-state {
  justify-items: end;
}

.hr-employee-state em {
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.hr-employee-state em.success {
  color: var(--hr-green);
}

.hr-employee-state em.warning {
  color: var(--hr-orange);
}

.hr-employee-state em.info {
  color: var(--hr-blue);
}

.hr-employee-state em.danger {
  color: var(--hr-red);
}

.hr-metric-strip,
.hr-payroll-metrics,
.hr-validation-strip {
  display: grid;
  border-bottom: 1px solid var(--line);
}

.hr-metric-strip {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.hr-payroll-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-validation-strip {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-metric-strip > div,
.hr-payroll-metrics > div,
.hr-validation-strip > div {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.hr-metric-strip > div:last-child,
.hr-payroll-metrics > div:last-child,
.hr-validation-strip > div:last-child {
  border-right: 0;
}

.hr-metric-strip span,
.hr-payroll-metrics span,
.hr-validation-strip span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.hr-metric-strip strong,
.hr-payroll-metrics strong,
.hr-validation-strip strong {
  display: block;
  font-size: 17px;
}

.hr-payroll-metrics > div > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.hr-validation-strip .success strong,
.is-balanced {
  color: var(--hr-green) !important;
}

.hr-validation-strip .warning strong,
.is-negative {
  color: var(--hr-red) !important;
}

.hr-table-scroll {
  max-width: 100%;
  overflow: auto;
}

.hr-score-table,
.hr-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.hr-score-table {
  min-width: 790px;
  table-layout: fixed;
}

.hr-score-table th:nth-child(1) { width: 64px; }
.hr-score-table th:nth-child(2) { width: 104px; }
.hr-score-table th:nth-child(3) { width: 76px; }
.hr-score-table th:nth-child(4) { width: 156px; }
.hr-score-table th:nth-child(5) { width: 78px; }
.hr-score-table th:nth-child(6) { width: 50px; }
.hr-score-table th:nth-child(7) { width: 112px; }
.hr-score-table th:nth-child(8) { width: 78px; }
.hr-score-table th:nth-child(9) { width: 58px; }

.hr-summary-table {
  min-width: 920px;
}

.hr-score-table th,
.hr-score-table td,
.hr-summary-table th,
.hr-summary-table td {
  padding: 10px 9px;
  border-right: 1px solid #e7ecf2;
  border-bottom: 1px solid #e7ecf2;
  vertical-align: middle;
  text-align: left;
}

.hr-score-table th,
.hr-score-table td {
  padding: 8px 6px;
  word-break: break-word;
}

.hr-score-table td:nth-child(7) {
  white-space: nowrap;
}

.hr-score-table th,
.hr-summary-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fc;
  color: #47566b;
  font-weight: 700;
  white-space: nowrap;
}

.hr-score-table tr.is-selected,
.hr-summary-table tr.is-selected {
  background: #f2f7ff;
}

.hr-score-table tbody tr:hover,
.hr-summary-table tbody tr:hover {
  background: #f8fbff;
}

.hr-score-table tfoot td,
.hr-summary-table tfoot td {
  background: #f7f9fc;
  font-weight: 800;
}

.hr-summary-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.hr-score-input {
  width: 66px;
}

.hr-mode-tag,
.hr-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hr-mode-tag.auto,
.hr-status-pill.info {
  background: var(--hr-blue-soft);
  color: #245acb;
}

.hr-mode-tag.mixed,
.hr-mode-tag.manual,
.hr-status-pill.warning {
  background: var(--hr-orange-soft);
  color: #b35d0a;
}

.hr-status-pill.success {
  background: var(--hr-green-soft);
  color: #117246;
}

.hr-status-pill.danger {
  background: var(--hr-red-soft);
  color: #bd3834;
}

.hr-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hr-blue);
  font-size: 12px;
  font-weight: 700;
}

.hr-score-editor {
  display: inline-grid;
  grid-template-columns: 26px 48px 26px;
  align-items: stretch;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #fff;
}

.hr-score-editor:focus-within {
  border-color: var(--hr-blue);
  box-shadow: 0 0 0 2px rgba(55, 103, 230, 0.13);
}

.hr-score-editor button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #f5f7fb;
  color: #31528d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.hr-score-editor button:hover,
.hr-score-editor button:active {
  background: #e7efff;
  color: var(--hr-blue);
}

.hr-score-editor .hr-score-input {
  width: 48px;
  min-width: 0;
  padding: 0 4px;
  border: 0;
  border-right: 1px solid #dfe5ef;
  border-left: 1px solid #dfe5ef;
  border-radius: 0;
  outline: 0;
  text-align: center;
  font-weight: 700;
}

.hr-template-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px;
  padding: 16px 18px;
  border: 1px solid #d6dfec;
  border-radius: 9px;
  background: #fff;
}

.hr-template-page-head h3,
.hr-template-page-head p {
  margin: 0;
}

.hr-template-page-head h3 {
  color: #1d2d48;
  font-size: 18px;
}

.hr-template-page-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.hr-template-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 12px;
  margin: 0 12px 12px;
}

.hr-template-versions,
.hr-template-main {
  overflow: hidden;
  border: 1px solid #d6dfec;
  border-radius: 9px;
  background: #fff;
}

.hr-template-version {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-top: 1px solid #edf0f5;
  border-radius: 0;
  background: #fff;
  color: inherit;
  text-align: left;
}

.hr-template-version:hover,
.hr-template-version.is-active {
  background: #f1f6ff;
}

.hr-template-version.is-active {
  box-shadow: inset 3px 0 0 var(--hr-blue);
}

.hr-template-version > span {
  display: grid;
  gap: 5px;
}

.hr-template-version > span:last-child {
  justify-items: end;
}

.hr-template-version small {
  max-width: 126px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-template-meta {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.6fr 1fr;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e6ebf2;
}

.hr-template-meta label,
.hr-template-review label {
  display: grid;
  gap: 5px;
}

.hr-template-meta label > span,
.hr-template-review label > span {
  color: var(--muted);
  font-size: 11px;
}

.hr-template-meta input,
.hr-template-items input,
.hr-template-items select,
.hr-template-items textarea,
.hr-template-review textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #ccd6e4;
  border-radius: 6px;
  background: #fff;
}

.hr-template-meta input {
  min-height: 36px;
  padding: 7px 9px;
}

.hr-template-meta input:disabled,
.hr-template-items input:disabled,
.hr-template-items select:disabled,
.hr-template-items textarea:disabled {
  color: #57677e;
  background: #f5f7fa;
  opacity: 1;
}

.hr-template-permission-note {
  display: flex;
  gap: 10px;
  margin: 12px 14px;
  padding: 9px 11px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f4f8ff;
  color: #416083;
  font-size: 11px;
}

.hr-template-items {
  min-width: 1780px;
}

.hr-template-items th,
.hr-template-items td {
  padding: 8px;
  border-bottom: 1px solid #e7ebf1;
  border-right: 1px solid #edf0f4;
  text-align: left;
  vertical-align: middle;
}

.hr-template-items th {
  background: #f5f7fb;
  color: #53637a;
  font-size: 11px;
  white-space: nowrap;
}

.hr-template-items input,
.hr-template-items select {
  min-height: 32px;
  padding: 5px 6px;
  font-size: 11px;
}

.hr-template-items .hr-template-metric-select {
  min-width: 210px;
}

.hr-template-items textarea {
  min-width: 260px;
  min-height: 58px;
  padding: 7px;
  resize: vertical;
  font-size: 11px;
}

.hr-template-row-actions {
  display: flex;
  gap: 4px;
}

.hr-template-row-actions button {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid #d2dbe8;
  border-radius: 5px;
  background: #fff;
  color: #395172;
}

.hr-template-row-actions button.danger {
  color: #b83d3d;
}

.hr-template-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 12px;
  padding: 14px;
  border: 1px solid #c9daf7;
  border-radius: 9px;
  background: #f8fbff;
}

.hr-template-review textarea {
  min-height: 64px;
  padding: 8px 10px;
  resize: vertical;
}

.hr-template-review > div {
  display: flex;
  gap: 8px;
}

.hr-info-note,
.hr-readonly-note {
  margin: 10px 12px 12px;
  padding: 10px 12px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f4f8ff;
  color: #416083;
  font-size: 12px;
}

.hr-conversion-formulas {
  display: grid;
  grid-template-columns: 170px repeat(2, minmax(0, 1fr));
  margin: 10px 12px 12px;
  overflow: hidden;
  border: 1px solid #c9daf7;
  border-radius: 8px;
  background: #f8fbff;
}

.hr-conversion-formulas > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-right: 1px solid #dbe6f6;
}

.hr-conversion-formulas > div:last-child {
  border-right: 0;
}

.hr-conversion-formulas-title {
  align-content: center;
  background: #edf4ff;
}

.hr-conversion-formulas span {
  color: var(--muted);
  font-size: 11px;
}

.hr-conversion-formulas strong {
  color: #294c85;
  font-size: 12px;
  line-height: 1.55;
}

.hr-conversion-formulas small {
  color: #65758d;
  font-size: 10px;
  line-height: 1.45;
}

.hr-source-detail {
  margin: 10px 12px 12px;
  overflow: hidden;
  border: 1px solid #bcd2fb;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 4px 14px rgba(41, 86, 160, 0.08);
}

.hr-source-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e5f8;
  background: #eef5ff;
}

.hr-source-detail-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hr-source-detail-head span,
.hr-source-block > span,
.hr-source-detail-grid span {
  color: var(--muted);
  font-size: 11px;
}

.hr-source-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #c9d9ef;
  border-radius: 6px;
  background: #fff;
  color: #5b6f8e;
  font-size: 18px;
}

.hr-source-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dfe8f4;
}

.hr-source-detail-grid > div {
  display: grid;
  gap: 4px;
  padding: 9px 12px;
  border-right: 1px solid #dfe8f4;
}

.hr-source-detail-grid > div:last-child {
  border-right: 0;
}

.hr-source-block {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 5px 10px;
  padding: 9px 12px;
  border-bottom: 1px dashed #dfe6ef;
  font-size: 12px;
}

.hr-source-block:last-child {
  border-bottom: 0;
}

.hr-source-block small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}

.hr-return-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px;
  padding: 12px 14px;
  border: 1px solid #ffc9c3;
  border-radius: 8px;
  background: #fff6f4;
  color: #8f302d;
}

.hr-return-banner strong {
  font-size: 14px;
}

.hr-return-banner p {
  margin: 4px 0 0;
  color: #a04a45;
  font-size: 12px;
}

.hr-item-detail {
  padding-bottom: 14px;
}

.hr-item-detail h3,
.hr-item-detail > p,
.hr-item-detail .hr-detail-kv,
.hr-item-detail .hr-note-field,
.hr-item-detail .hr-evidence-card {
  margin-right: 14px;
  margin-left: 14px;
}

.hr-item-detail h3 {
  margin-top: 16px;
  font-size: 16px;
}

.hr-item-detail > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.hr-detail-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 12px;
}

.hr-detail-kv span {
  color: var(--muted);
}

.hr-detail-kv.total {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.hr-note-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.hr-note-field textarea,
.hr-approval-actions textarea {
  min-height: 88px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  color: #26364a;
  line-height: 1.55;
}

.hr-evidence-card {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: #f8fafc;
}

.hr-evidence-card span,
.hr-evidence-card strong {
  display: block;
}

.hr-evidence-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.hr-sticky-actions {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f1dfc7;
  border-radius: 8px;
  background: #fffaf3;
  box-shadow: 0 5px 18px rgba(34, 48, 68, 0.04);
}

.hr-sticky-actions p {
  margin: 0 auto 0 0;
  color: #5f6874;
  font-size: 12px;
}

.hr-inline-input {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5f6874;
  font-size: 12px;
  white-space: nowrap;
}

.hr-inline-input input {
  width: 76px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #cfd8e8;
  border-radius: 6px;
  background: #fff;
  color: #243047;
}

.hr-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 18px 16px;
}

.hr-stepper > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
}

.hr-stepper > i {
  height: 1px;
  flex: 1;
  margin: 0 14px;
  background: #cfd8e5;
}

.hr-stepper b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #718096;
}

.hr-stepper .is-done b,
.hr-stepper .is-current b {
  border-color: var(--hr-blue);
  background: var(--hr-blue);
  color: #fff;
}

.hr-stepper span {
  display: grid;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
}

.hr-stepper small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.hr-selected-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfd;
}

.hr-selected-summary > strong {
  width: 100%;
}

.hr-selected-summary span {
  padding: 5px 7px;
  border-radius: 5px;
  background: #fff;
  color: #5b687a;
  font-size: 11px;
}

.hr-submit-confirm,
.hr-payroll-detail {
  padding: 14px;
}

.hr-submit-confirm h3,
.hr-submit-confirm h4 {
  margin: 0 0 10px;
}

.hr-submit-confirm h4 {
  margin-top: 18px;
  font-size: 13px;
}

.hr-submit-confirm ul {
  margin: 0;
  padding-left: 18px;
  color: #546277;
  font-size: 12px;
  line-height: 1.85;
}

.hr-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}

.hr-check-row input {
  margin-top: 2px;
}

.hr-approval-counts > div {
  min-width: 120px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hr-approval-counts strong {
  font-size: 22px;
}

.hr-approval-main .hr-table-scroll {
  max-height: 590px;
}

.hr-approval-actions {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-approval-actions > div {
  display: grid;
  gap: 6px;
}

.hr-approval-actions span {
  color: var(--muted);
  font-size: 12px;
}

.hr-approval-actions textarea {
  min-height: 62px;
}

.hr-return-approval-actions {
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: center;
  border-color: #ffc9c3;
  background: #fff8f7;
}

.hr-return-approval-actions strong {
  color: #8f302d;
}

.hr-return-approval-actions small {
  color: var(--muted);
}

.hr-return-actions {
  border-color: #ffc9c3;
  background: #fff8f7;
}

.hr-payroll-mode {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.hr-salary-config-workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.hr-salary-scheme-sidebar {
  position: sticky;
  top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.hr-salary-scheme-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 13px 14px 8px;
}

.hr-salary-scheme-sidebar-head strong {
  color: #1e2b44;
  font-size: 16px;
}

.hr-salary-scheme-sidebar-head button {
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: #edf3ff;
  color: #2d64d8;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.hr-salary-scheme-sidebar footer span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.hr-salary-scheme-search {
  display: block;
  margin: 0;
  padding: 0 12px 12px;
}

.hr-salary-scheme-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 9px;
  background: #f8fafc;
}

.hr-salary-scheme-list {
  max-height: 520px;
  overflow-y: auto;
  padding: 7px 8px 12px;
  border-top: 1px solid #eef1f5;
}

.hr-salary-scheme-group h4 {
  margin: 9px 8px 6px;
  color: #7a8496;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hr-salary-scheme-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hr-salary-scheme-group-head > div {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hr-salary-scheme-group-head button {
  padding: 4px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #56709a;
  font-size: 9px;
  cursor: pointer;
  white-space: nowrap;
}

.hr-salary-scheme-group-head button:hover {
  background: #edf3fb;
}

.hr-salary-scheme-group-head button.is-danger {
  color: #b14d4a;
}

.hr-salary-scheme-group-empty {
  margin: 4px 7px 9px;
  padding: 10px 8px;
  border: 1px dashed #d8e0eb;
  border-radius: 7px;
  color: #8791a3;
  font-size: 10px;
  text-align: center;
}

.hr-salary-scheme-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #27344c;
  text-align: left;
  cursor: pointer;
}

.hr-salary-scheme-entry + .hr-salary-scheme-entry {
  margin-top: 4px;
}

.hr-salary-scheme-entry:hover {
  background: #f5f8fc;
}

.hr-salary-scheme-entry.is-active {
  border-color: #bcd1ff;
  background: #edf4ff;
  color: #245dcc;
}

.hr-salary-scheme-entry.is-planned:not(.is-active) {
  color: #68758a;
}

.hr-salary-scheme-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e9eff8;
  color: #53647e;
  font-size: 13px;
  font-weight: 800;
}

.hr-salary-scheme-entry.is-active .hr-salary-scheme-icon {
  background: #3b6fe8;
  color: #fff;
}

.hr-salary-scheme-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hr-salary-scheme-copy strong,
.hr-salary-scheme-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hr-salary-scheme-copy strong {
  font-size: 13px;
}

.hr-salary-scheme-copy small {
  color: #7b8598;
  font-size: 10px;
}

.hr-salary-scheme-entry .hr-status-pill {
  padding: 3px 6px;
  font-size: 9px;
  white-space: nowrap;
}

.hr-salary-scheme-sidebar footer {
  display: grid;
  gap: 5px;
  padding: 11px 13px 13px;
  border-top: 1px solid #e8edf4;
  background: #fafbfd;
}

.hr-salary-scheme-sidebar footer strong {
  color: #53627a;
  font-size: 11px;
}

.hr-salary-scheme-no-result {
  padding: 24px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.hr-salary-scheme-main {
  min-width: 0;
}

.hr-salary-scheme-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #f7faff 100%);
}

.hr-salary-scheme-main-head > div > span {
  color: #73809a;
  font-size: 11px;
}

.hr-salary-scheme-main-head > div > div {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
}

.hr-salary-scheme-delete {
  margin-left: 2px;
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  background: #fff0ef;
  color: #b2433f;
  font-size: 10px;
  cursor: pointer;
}

.hr-salary-scheme-main-head h3 {
  margin: 0;
  color: #1c2941;
  font-size: 19px;
}

.hr-salary-scheme-main-head p {
  margin: 5px 0 0;
  color: #647188;
  font-size: 12px;
}

.hr-salary-scheme-main-head dl {
  min-width: 410px;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce5f2;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
}

.hr-salary-scheme-main-head dl > div {
  display: grid;
  gap: 3px;
  padding: 9px 12px;
  border-right: 1px solid #e1e7f0;
}

.hr-salary-scheme-main-head dl > div:last-child {
  border-right: 0;
}

.hr-salary-scheme-main-head dt {
  color: #7a8597;
  font-size: 10px;
}

.hr-salary-scheme-main-head dd {
  margin: 0;
  color: #2d3b55;
  font-size: 12px;
  font-weight: 700;
}

.hr-salary-config-sections {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7fa;
}

.hr-salary-config-sections button {
  min-width: 112px;
  padding: 9px 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5c687c;
  font-weight: 700;
  cursor: pointer;
}

.hr-salary-config-sections button.is-active {
  background: #fff;
  color: #2d64d8;
  box-shadow: 0 2px 8px rgba(38, 60, 96, 0.1);
}

.hr-salary-standard-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid #d8e5fb;
  border-radius: 9px;
  background: #f7faff;
}

.hr-salary-standard-intro strong {
  color: #2d4f8d;
  font-size: 13px;
}

.hr-salary-standard-intro span {
  color: #687891;
  font-size: 11px;
  text-align: right;
}

.hr-salary-config-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.hr-salary-compare-column {
  min-width: 0;
}

.hr-salary-compare-column > .hr-salary-config-section:last-child {
  margin-bottom: 14px;
}

.hr-salary-compare-panel,
.hr-salary-compare-split .hr-salary-config-section {
  border-color: #dbe3ef;
  box-shadow: 0 4px 14px rgba(32, 52, 83, 0.04);
}

.hr-salary-compare-panel .hr-salary-config-table {
  min-width: 860px;
}

.hr-salary-compare-split .hr-split-field-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.hr-salary-compare-split .hr-split-field-card {
  min-width: 145px;
  flex: 1 1 145px;
}

.hr-salary-scheme-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 42px 24px;
  border: 1px dashed #c9d3e2;
  border-radius: 12px;
  background: #fbfcfe;
  text-align: center;
}

.hr-salary-scheme-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eaf1ff;
  color: #3f70dc;
  font-size: 26px;
}

.hr-salary-scheme-empty h3 {
  margin: 16px 0 7px;
  color: #27344d;
}

.hr-salary-scheme-empty p {
  max-width: 560px;
  margin: 0;
  color: #6b778c;
  font-size: 13px;
  line-height: 1.65;
}

.hr-salary-scheme-empty > div {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 11px 18px;
  border-radius: 9px;
  background: #f0f4fa;
}

.hr-salary-scheme-empty > div span {
  color: #7c8799;
  font-size: 10px;
}

.hr-salary-scheme-empty > div strong {
  color: #475671;
  font-size: 12px;
}

.hr-config-history-empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.hr-salary-config-history-table {
  min-width: 820px;
}

.hr-salary-config-history-table tr.is-selected td {
  background: #f1f6ff;
}

.hr-split-field-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.hr-split-field-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 11px;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  background: #fbfcfe;
}

.hr-split-field-card label {
  display: grid;
  gap: 4px;
}

.hr-split-field-card label > span {
  color: #778397;
  font-size: 10px;
}

.hr-split-field-card input,
.hr-split-field-card select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
}

.hr-split-field-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.hr-split-field-order span {
  min-width: 24px;
  color: #6d7890;
  font-size: 10px;
  text-align: center;
}

.hr-split-field-order button,
.hr-split-field-delete {
  padding: 4px 7px;
  border: 1px solid #d9e1ec;
  border-radius: 6px;
  background: #fff;
  color: #53627a;
  font-size: 10px;
  cursor: pointer;
}

.hr-split-field-order button:disabled,
.hr-split-field-delete:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hr-split-field-delete {
  color: #b24b46;
  border-color: #efd2cf;
  background: #fff8f7;
}

.hr-split-config-table {
  min-width: 1120px;
}

.hr-split-config-table th small {
  display: block;
  margin-top: 3px;
  color: #8a6a2d;
  font-size: 9px;
  font-weight: 500;
}

.hr-split-config-table input {
  width: 96px;
  min-height: 34px;
  padding: 6px 8px;
}

.hr-auto-split-value {
  display: grid;
  gap: 3px;
  min-width: 96px;
}

.hr-auto-split-value strong {
  color: #2d64d8;
}

.hr-auto-split-value small {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.hr-salary-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 20px;
}

.hr-salary-dialog-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(20, 31, 49, 0.42);
  cursor: default;
}

.hr-salary-dialog {
  position: relative;
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid #dce3ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(27, 39, 62, 0.24);
}

.hr-salary-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid #e8edf4;
}

.hr-salary-dialog > header span {
  color: #6580ad;
  font-size: 10px;
}

.hr-salary-dialog > header h3 {
  margin: 3px 0 0;
  color: #25324a;
  font-size: 18px;
}

.hr-salary-dialog > header > button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #f2f5f9;
  color: #5d687a;
  font-size: 20px;
  cursor: pointer;
}

.hr-salary-dialog-body {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.hr-salary-dialog-body label {
  display: grid;
  gap: 6px;
}

.hr-salary-dialog-body label > span,
.hr-salary-dialog-context > span {
  color: #68758b;
  font-size: 11px;
}

.hr-salary-dialog-body input,
.hr-salary-dialog-body select {
  width: 100%;
}

.hr-salary-dialog-body > p {
  margin: 0;
  color: #7a8597;
  font-size: 11px;
  line-height: 1.6;
}

.hr-salary-dialog-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f8fc;
}

.hr-salary-dialog-context strong {
  color: #34435d;
  font-size: 12px;
}

.hr-salary-dialog-warning {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #f0c7c3;
  border-radius: 9px;
  background: #fff7f6;
}

.hr-salary-dialog-warning strong {
  color: #8f3430;
}

.hr-salary-dialog-warning span {
  color: #765a5a;
  font-size: 12px;
  line-height: 1.6;
}

.hr-salary-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 18px 16px;
  border-top: 1px solid #edf0f5;
  background: #fbfcfe;
}

.hr-salary-config-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.hr-salary-config-head > div,
.hr-salary-config-head > label {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-salary-config-head span {
  color: var(--muted);
  font-size: 12px;
}

.hr-salary-config-head strong {
  font-size: 20px;
}

.hr-salary-config-head select,
.hr-salary-config-head input {
  width: 100%;
  min-height: 38px;
}

.hr-config-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 12px;
  padding: 13px 16px;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #f7faff;
}

.hr-config-notice p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hr-salary-config-section {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-config-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}

.hr-config-section-title > div {
  display: grid;
  gap: 4px;
}

.hr-config-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.hr-salary-config-table {
  min-width: 900px;
}

.hr-salary-config-table input,
.hr-coefficient-config-table input {
  width: 104px;
  min-width: 0;
}

.hr-salary-config-table td small,
.hr-coefficient-config-table td small {
  white-space: nowrap;
}

.hr-coefficient-config-table {
  min-width: 720px;
}

.hr-sales-boost-config-table {
  min-width: 1120px;
}

.hr-sales-boost-config-table input,
.hr-sales-boost-config-table select {
  width: 100%;
  min-width: 118px;
}

.hr-sales-boost-config-table th:nth-child(1),
.hr-sales-boost-config-table td:nth-child(1) {
  min-width: 175px;
}

.hr-sales-boost-config-table th:nth-child(3),
.hr-sales-boost-config-table td:nth-child(3) {
  min-width: 170px;
}

.hr-sales-boost-formula {
  display: grid;
  gap: 5px;
  margin: 0 14px 14px;
  padding: 12px 14px;
  border: 1px solid #cfddf5;
  border-radius: 9px;
  background: #f5f8ff;
  color: #53627a;
  font-size: 12px;
}

.hr-sales-boost-formula strong {
  color: #244f9c;
  font-size: 13px;
}

.hr-commission-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 12px;
}

.hr-commission-config-grid .hr-salary-config-section {
  margin-bottom: 0;
}

.hr-custom-commission-section {
  grid-column: 1 / -1;
}

.hr-commission-config-table,
.hr-custom-commission-table,
.hr-customer-commission-table,
.hr-salary-assignment-table {
  min-width: 640px;
}

.hr-customer-commission-table td:first-child strong,
.hr-salary-assignment-table td:first-child strong {
  display: block;
  color: #17233b;
}

.hr-customer-commission-table td:first-child small,
.hr-salary-assignment-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.hr-salary-assignment-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid #e3e9f2;
  background: #f8faff;
}

.hr-salary-assignment-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 190px;
  color: #66738a;
  font-size: 12px;
}

.hr-salary-assignment-table select {
  min-width: 165px;
}

.hr-commission-rate-input,
.hr-commission-parameter,
.hr-referral-commission-form label > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hr-commission-rate-input input {
  width: 82px;
}

.hr-commission-rate-input span,
.hr-commission-parameter span,
.hr-referral-commission-form b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.hr-referral-commission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 15px 8px;
}

.hr-referral-commission-form label:not(.hr-switch-field) {
  display: grid;
  gap: 6px;
  color: #66738a;
  font-size: 12px;
}

.hr-referral-commission-form label:not(.hr-switch-field) input {
  width: 100%;
}

.hr-referral-commission-form .is-wide {
  grid-column: 1 / -1;
}

.hr-commission-config-grid > .hr-salary-config-section > .hr-source-note {
  margin: 0 15px 14px;
}

.hr-custom-commission-table input,
.hr-custom-commission-table select {
  width: 100%;
  min-width: 130px;
}

.hr-custom-commission-table th:first-child,
.hr-custom-commission-table td:first-child {
  min-width: 180px;
}

.hr-custom-commission-table th:nth-child(2),
.hr-custom-commission-table td:nth-child(2) {
  min-width: 220px;
}

.hr-custom-commission-payroll {
  display: grid;
  gap: 7px;
  min-width: 180px;
}

.hr-custom-commission-payroll > span,
.hr-custom-commission-payroll label {
  display: grid;
  gap: 3px;
}

.hr-custom-commission-payroll small {
  color: var(--muted);
  line-height: 1.3;
}

.hr-custom-commission-payroll input {
  width: 120px;
}

.hr-custom-commission-payroll > b {
  color: #244f9c;
  font-size: 12px;
}

.hr-switch-field,
.hr-payroll-auto-value {
  display: grid;
  gap: 4px;
}

.hr-switch-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  white-space: nowrap;
}

.hr-switch-field input {
  width: auto;
  min-width: 0;
}

.hr-payroll-auto-value strong {
  color: #244f9c;
}

.hr-payroll-auto-value small {
  max-width: 230px;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
}

.hr-config-errors {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid #f3c0ba;
  border-radius: 9px;
  background: #fff7f6;
  color: #8f302d;
}

.hr-config-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.hr-config-review {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 14px;
  border: 1px solid #cfdcf1;
  border-radius: 10px;
  background: #fff;
}

.hr-config-review label {
  display: grid;
  gap: 6px;
}

.hr-config-review textarea {
  min-height: 68px;
}

.hr-config-review > div {
  display: flex;
  gap: 8px;
}

.hr-payroll-banner {
  color: #44536a;
  font-size: 12px;
}

.hr-payroll-table {
  min-width: 900px;
  table-layout: fixed;
}

.hr-payroll-table th:nth-child(1) { width: 100px; }
.hr-payroll-table th:nth-child(2) { width: 64px; }
.hr-payroll-table th:nth-child(3) { width: 104px; }
.hr-payroll-table th:nth-child(4) { width: 106px; }
.hr-payroll-table th:nth-child(5) { width: 88px; }
.hr-payroll-table th:nth-child(6) { width: 88px; }
.hr-payroll-table th:nth-child(7) { width: 88px; }
.hr-payroll-table th:nth-child(8) { width: 88px; }
.hr-payroll-table th:nth-child(9) { width: 112px; }
.hr-payroll-table th:nth-child(10) { width: 62px; }

.hr-payroll-table th,
.hr-payroll-table td {
  padding: 8px 6px;
  word-break: break-word;
}

.hr-payroll-next-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  min-height: 220px;
  align-content: center;
  padding: 28px;
  border: 1px dashed #bfd0e8;
  border-radius: 12px;
  background: #fbfdff;
}

.hr-payroll-next-empty strong {
  font-size: 18px;
  color: #17253a;
}

.hr-payroll-next-empty p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.hr-payslip-management {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.hr-payslip-management > aside,
.hr-payslip-management > main,
.hr-payslip-sheet {
  min-width: 0;
  border: 1px solid #d7e0ed;
  border-radius: 12px;
  background: #fff;
}

.hr-payslip-management > aside {
  overflow: hidden;
}

.hr-payslip-management .hr-panel-title {
  margin: 0;
}

.hr-payslip-employee-list {
  display: grid;
  max-height: 690px;
  overflow: auto;
}

.hr-payslip-employee-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 0;
  border-top: 1px solid #edf1f7;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.hr-payslip-employee-list button:hover,
.hr-payslip-employee-list button.is-active {
  background: #f1f6ff;
}

.hr-payslip-employee-list button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hr-payslip-employee-list small {
  color: var(--muted);
}

.hr-payslip-employee-list em {
  flex: 0 0 auto;
  font-style: normal;
}

.hr-payslip-sheet {
  overflow: hidden;
}

.hr-payslip-management > main .hr-payslip-sheet {
  border: 0;
}

.hr-payslip-sheet > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #dbe4f1;
  background: linear-gradient(135deg, #f4f8ff, #fff);
}

.hr-payslip-sheet > header > div {
  display: grid;
  gap: 3px;
}

.hr-payslip-sheet > header span,
.hr-payslip-sheet > header small {
  color: var(--muted);
}

.hr-payslip-sheet > header strong {
  font-size: 18px;
  color: #17253a;
}

.hr-payslip-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #e2e8f2;
}

.hr-payslip-summary span {
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border-right: 1px solid #e2e8f2;
  color: var(--muted);
  font-size: 11px;
}

.hr-payslip-summary span:last-child {
  border-right: 0;
}

.hr-payslip-summary strong {
  color: #17253a;
  font-size: 15px;
}

.hr-payslip-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px;
}

.hr-payslip-columns section {
  min-width: 0;
}

.hr-payslip-columns h4 {
  margin: 0 0 8px;
  color: #20314b;
}

.hr-payslip-columns table {
  width: 100%;
  border-collapse: collapse;
}

.hr-payslip-columns td {
  padding: 8px 4px;
  border-bottom: 1px solid #edf1f6;
  color: #526078;
}

.hr-payslip-columns td:last-child {
  text-align: right;
  color: #17253a;
  font-variant-numeric: tabular-nums;
}

.hr-payslip-columns tr.is-total td {
  border-top: 1px solid #bdcbe0;
  color: #17253a;
  font-weight: 700;
}

.hr-payslip-columns tr.is-final td {
  padding-top: 11px;
  color: #174fb6;
  font-size: 15px;
  font-weight: 800;
}

.hr-payslip-columns td.is-negative {
  color: #c23f3f;
}

.hr-payslip-feedback {
  margin: 0 20px 16px;
  padding: 12px;
  border: 1px solid #f1c9c9;
  border-radius: 8px;
  background: #fff8f8;
}

.hr-payslip-feedback p {
  margin: 5px 0;
}

.hr-payslip-feedback small,
.hr-payslip-sheet > footer {
  color: var(--muted);
}

.hr-payslip-sheet > footer {
  padding: 12px 20px;
  border-top: 1px solid #e2e8f2;
  background: #fafbfd;
  font-size: 11px;
}

.hr-payslip-confirm {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d7e0ed;
  border-radius: 12px;
  background: #fff;
}

.hr-payslip-confirm label {
  display: grid;
  gap: 6px;
}

.hr-payslip-confirm > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hr-payment-table {
  min-width: 1220px;
}

.hr-payment-table th:nth-child(1) { width: 110px; }
.hr-payment-table th:nth-child(2) { width: 110px; }
.hr-payment-table th:nth-child(3),
.hr-payment-table th:nth-child(5) { width: 220px; }
.hr-payment-table th:nth-child(4),
.hr-payment-table th:nth-child(6),
.hr-payment-table th:nth-child(7) { width: 120px; }
.hr-payment-table th:nth-child(8) { width: 90px; }

.hr-payment-table input {
  width: 100%;
  min-width: 0;
}

.hr-payment-table td.is-balanced {
  color: #198754;
  font-weight: 700;
}

.hr-payroll-detail .hr-panel-title {
  margin: -14px -14px 6px;
}

.hr-payroll-detail {
  max-height: 680px;
  overflow: auto;
}

.hr-payroll-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  padding: 11px 14px 8px;
  border: 1px solid #cfe0ff;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f7faff;
}

.hr-payroll-flow-head > div {
  display: grid;
  gap: 3px;
}

.hr-payroll-flow-head span {
  color: var(--muted);
  font-size: 11px;
}

.hr-payroll-flow {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(110px, 0.85fr) auto minmax(130px, 1fr) auto minmax(130px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px 14px;
  border: 1px solid #cfe0ff;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #f7faff;
}

.hr-payroll-flow > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce7f8;
  border-radius: 7px;
  background: #fff;
}

.hr-payroll-flow > div.is-total {
  border-color: #a9c5ff;
  background: #eef4ff;
}

.hr-payroll-flow b {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: #e7efff;
  color: #2d61c7;
  font-size: 11px;
}

.hr-payroll-flow span {
  min-width: 0;
  color: #4b5d76;
  font-size: 11px;
  font-weight: 700;
}

.hr-payroll-flow small {
  display: block;
  margin-top: 3px;
  color: #172b4d;
  font-size: 12px;
  white-space: nowrap;
}

.hr-payroll-flow > i {
  color: #7f97bf;
  font-style: normal;
  font-weight: 800;
}

.hr-payroll-gate {
  display: grid;
  justify-items: start;
  gap: 9px;
  margin-top: 12px;
  padding: 22px;
  border: 1px dashed #f0b66b;
  border-radius: 10px;
  background: #fffaf2;
}

.hr-payroll-gate.is-inline {
  margin: 0 0 12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.hr-payroll-gate > strong {
  color: #7a4c13;
  font-size: 15px;
}

.hr-payroll-gate > p {
  margin: 0;
  color: #7a6549;
  font-size: 12px;
  line-height: 1.7;
}

.hr-payroll-table tr.is-payroll-blocked td {
  background: #fbfbfc;
  color: #8a94a3;
}

.hr-calc-entry {
  display: block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hr-blue);
  font-size: 11px;
  font-weight: 700;
}

.hr-calc-section {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.hr-calc-title,
.hr-calc-line,
.hr-calc-result,
.hr-grade-flow,
.hr-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hr-calc-title {
  margin-bottom: 8px;
}

.hr-calc-title > span {
  color: var(--muted);
  font-size: 11px;
}

.hr-calc-line {
  padding: 6px 0;
  border-bottom: 1px dashed #e5eaf1;
  font-size: 12px;
}

.hr-calc-line > span {
  color: #617087;
}

.hr-calc-line > span > small {
  display: block;
  margin-top: 2px;
  color: #8a96a8;
  font-size: 10px;
}

.hr-calc-line.hr-calc-non-salary {
  margin-top: 7px;
  border-top: 1px solid #d9e5f7;
}

.hr-calc-line.hr-calc-non-salary strong {
  color: var(--hr-blue);
}

.hr-calc-result {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #eef4ff;
  color: #274e97;
  font-size: 12px;
}

.hr-calc-result.total strong {
  font-size: 17px;
}

.hr-calc-formula {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.7fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 9px;
  border-radius: 6px;
  background: #f1f5fb;
  text-align: center;
  font-size: 12px;
}

.hr-calc-formula i,
.hr-grade-flow i {
  color: #8b98aa;
  font-style: normal;
}

.hr-source-note,
.hr-calc-reason {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.hr-grade-adjust-section {
  border-color: #f0d6b7;
  background: #fffaf3;
}

.hr-grade-adjust-section.is-approved {
  border-color: #bfe3cf;
  background: #f3fbf6;
}

.hr-grade-flow {
  justify-content: center;
  padding: 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.hr-compact-field {
  display: grid;
  gap: 5px;
  margin-top: 9px;
  color: #647188;
  font-size: 11px;
}

.hr-compact-field select,
.hr-compact-field textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  background: #fff;
  color: #26364a;
}

.hr-compact-field textarea {
  min-height: 72px;
  resize: vertical;
}

.hr-full-button {
  width: 100%;
  margin-top: 9px;
}

.hr-inline-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.hr-adjust-rejected {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #fff0ee;
  color: #9b3833;
  font-size: 11px;
}

.hr-split-scroll {
  max-height: 570px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-split-table {
  min-width: 2700px;
}

.hr-split-table td,
.hr-split-table th {
  white-space: nowrap;
}

.hr-split-table input {
  width: 88px;
}

.hr-direct-payroll-table .hr-payroll-group-row th {
  top: 0;
  z-index: 4;
  background: #eaf1fb;
  color: #29496f;
  text-align: center;
}

.hr-direct-payroll-table thead tr:nth-child(2) th {
  top: 41px;
  z-index: 3;
  background: #f7f9fc;
}

.hr-direct-payroll-table td input + small {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hr-direct-payroll-table td input:disabled {
  border-color: #e1e6ed;
  background: #f3f5f8;
  color: #69778a;
}

.hr-payroll-deduction-cell small {
  color: #9a6640 !important;
}

@media (max-width: 1500px) {
  .hr-score-layout {
    grid-template-columns: 210px minmax(650px, 1fr);
  }

  .hr-item-detail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0 12px 12px;
  }

  .hr-item-detail .hr-panel-title {
    grid-column: 1 / -1;
    margin: 0 -12px;
  }

  .hr-item-detail h3,
  .hr-item-detail > p,
  .hr-item-detail .hr-detail-kv,
  .hr-item-detail .hr-note-field,
  .hr-item-detail .hr-evidence-card {
    margin-right: 0;
    margin-left: 0;
  }

  .hr-item-detail h3,
  .hr-item-detail > p {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .hr-score-layout,
  .hr-submit-layout,
  .hr-approval-layout,
  .hr-payroll-layout {
    grid-template-columns: 1fr;
  }

  .hr-employee-queue {
    max-height: 260px;
    overflow: auto;
  }

  .hr-employee-row {
    grid-template-columns: 34px minmax(0, 1fr) 100px;
  }

  .hr-submit-confirm,
  .hr-payroll-detail {
    order: -1;
  }

  .hr-payroll-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-payroll-flow > i {
    display: none;
  }
}

.hr-attendance-page {
  display: grid;
  gap: 14px;
}

.hr-attendance-scope-switch {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  background: #f3f6fa;
}

.hr-attendance-scope-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #607087;
  padding: 6px 18px;
  font-weight: 700;
}

.hr-attendance-scope-switch button.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 5px rgba(50, 75, 110, 0.14);
}

.hr-attendance-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-attendance-toolbar label {
  display: grid;
  gap: 5px;
}

.hr-attendance-toolbar label > span,
.hr-attendance-location-card label > span,
.hr-attendance-punches span {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-toolbar input,
.hr-attendance-toolbar select,
.hr-attendance-location-card input {
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.hr-attendance-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hr-attendance-toolbar.is-self {
  align-items: center;
}

.hr-attendance-page.is-self .hr-attendance-toolbar.is-self {
  display: none;
}

.hr-attendance-toolbar.is-self .hr-attendance-today {
  display: grid;
  gap: 3px;
  margin-left: 0;
}

.hr-attendance-today span {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-today strong {
  font-size: 15px;
}

.hr-attendance-location-settings {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #c9d8ec;
  border-radius: 12px;
  background: #f8fbff;
}

.hr-attendance-location-settings > header,
.hr-attendance-location-settings > footer,
.hr-attendance-location-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-attendance-location-settings > header p,
.hr-attendance-location-settings > footer span,
.hr-attendance-location-card > header span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-location-settings > h4 {
  margin: 4px 0 0;
}

.hr-attendance-location-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e2ed;
  border-radius: 10px;
  background: #fff;
}

.hr-attendance-location-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-attendance-location-section > header > div {
  display: grid;
  gap: 3px;
}

.hr-attendance-location-section h4 {
  margin: 0;
}

.hr-attendance-location-section header span {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-location-section button.is-saved {
  border-color: #9bd5b0;
  color: #18733c;
  background: #ecf9f1;
}

.hr-attendance-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hr-attendance-location-grid.is-home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 420px;
  overflow: auto;
}

.hr-attendance-location-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid #d9e2ed;
  border-radius: 10px;
  background: #fff;
}

.hr-attendance-location-card > header,
.hr-attendance-location-card .is-wide {
  grid-column: 1 / -1;
}

.hr-attendance-location-card header > div,
.hr-attendance-location-card label {
  display: grid;
  gap: 5px;
}

.hr-attendance-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-attendance-location-actions button {
  flex: 1 1 150px;
}

.hr-attendance-location-capture {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #cbdcf5;
  border-radius: 9px;
  background: #f4f8ff;
}

.hr-attendance-location-capture.is-submitted {
  border-color: #a9d9ba;
  background: #eef9f2;
}

.hr-attendance-location-capture > div {
  display: grid;
  gap: 3px;
}

.hr-attendance-location-capture span {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-location-capture button {
  flex: 0 0 auto;
}

.hr-attendance-location-settings > footer {
  padding-top: 12px;
  border-top: 1px solid #d9e2ed;
}

.hr-attendance-self-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  grid-template-areas:
    "head punches"
    "actions punches"
    "actions device"
    "quick quick";
  overflow: hidden;
  border: 1px solid #cfdbeb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(24, 56, 96, 0.08);
}

.hr-attendance-self-head,
.hr-attendance-self-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.hr-attendance-self-head {
  grid-area: head;
  align-items: flex-start;
  padding: 24px 26px 8px;
  background: #fff;
}

.hr-attendance-self-head > div,
.hr-attendance-self-actions > div {
  display: grid;
  gap: 5px;
}

.hr-attendance-self-head span,
.hr-attendance-self-head p,
.hr-attendance-self-actions span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-self-head strong {
  color: #162642;
  font-size: 24px;
  line-height: 1.25;
}

.hr-attendance-punches {
  grid-area: punches;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  border-left: 1px solid var(--line);
  background: #fbfdff;
}

.hr-attendance-punches-title {
  display: grid;
  gap: 5px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.hr-attendance-punches-title strong {
  color: #162642;
  font-size: 18px;
}

.hr-attendance-punches-title small {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-punches > div {
  display: grid;
  gap: 6px;
  padding: 24px 22px;
}

.hr-attendance-punches > div + div {
  border-top: 1px solid var(--line);
}

.hr-attendance-punches strong {
  font-size: 18px;
}

.hr-attendance-punches small {
  color: var(--muted);
}

.hr-attendance-punch-step header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.hr-attendance-punch-step header > div {
  display: grid;
  gap: 4px;
}

.hr-attendance-punch-step header > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e8eef7;
  color: #68788e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.hr-attendance-punch-step header > em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f3f7;
  color: #6d7a8d;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.hr-attendance-punch-step.is-current header > i,
.hr-attendance-punch-step.is-current header > em {
  background: #edf4ff;
  color: #245acb;
}

.hr-attendance-punch-step.is-complete header > i,
.hr-attendance-punch-step.is-complete header > em {
  background: #eaf8f0;
  color: #18733c;
}

.hr-attendance-punch-step.is-error header > i,
.hr-attendance-punch-step.is-error header > em {
  background: #fff0ef;
  color: #bd443f;
}

.hr-attendance-next-copy small {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-next-copy {
  align-content: center;
  justify-items: center;
  min-height: 150px;
  text-align: center;
}

.hr-attendance-next-copy > span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff0ef;
  color: #bd443f;
  font-weight: 700;
}

.hr-attendance-next-copy > strong {
  color: #162642;
  font-size: 23px;
  line-height: 1.35;
}

.hr-attendance-primary-action {
  width: 100%;
  min-height: 68px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(56, 91, 230, 0.22);
}

.hr-attendance-primary-action:disabled {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
  opacity: 1;
  cursor: not-allowed;
}

.hr-attendance-device-status {
  grid-area: device;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}

.hr-attendance-device-status > div {
  display: grid;
  gap: 3px;
}

.hr-attendance-device-status span,
.hr-attendance-device-status small {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-device-status strong {
  color: #21344d;
  font-size: 14px;
}

.hr-attendance-quick-actions {
  grid-area: quick;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.hr-attendance-quick-actions button {
  min-height: 40px;
}

.hr-attendance-self-actions > button:first-of-type {
  margin-left: auto;
}

.hr-attendance-self-actions {
  grid-area: actions;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 26px 26px;
}

.hr-attendance-self-actions > button:first-of-type {
  margin-left: 0;
}

.hr-attendance-self-card > .hr-attendance-makeup-form,
.hr-attendance-self-card > .hr-attendance-makeup-history {
  grid-column: 1 / -1;
}

.hr-attendance-makeup-form,
.hr-attendance-makeup-history,
.hr-attendance-makeup-review {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.hr-attendance-makeup-form > header,
.hr-attendance-makeup-form > footer,
.hr-attendance-makeup-history > header,
.hr-attendance-makeup-review > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-attendance-makeup-form header > div,
.hr-attendance-makeup-review header > div {
  display: grid;
  gap: 4px;
}

.hr-attendance-makeup-form header span,
.hr-attendance-makeup-form footer span,
.hr-attendance-makeup-history header span,
.hr-attendance-makeup-history li span,
.hr-attendance-makeup-review header span,
.hr-attendance-makeup-review td small {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-makeup-form > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hr-attendance-makeup-form label {
  display: grid;
  gap: 5px;
}

.hr-attendance-makeup-form label > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-makeup-form input,
.hr-attendance-makeup-form select,
.hr-attendance-makeup-form textarea,
.hr-attendance-makeup-review-actions input {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.hr-attendance-makeup-form .is-wide {
  grid-column: 1 / -1;
}

.hr-attendance-makeup-form > footer {
  padding-top: 2px;
}

.hr-attendance-makeup-history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hr-attendance-makeup-history li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 9px;
  background: #fff;
}

.hr-attendance-makeup-history li > div {
  display: grid;
  gap: 4px;
}

.hr-attendance-makeup-review {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-attendance-makeup-table {
  min-width: 1120px;
}

.hr-attendance-reason-cell {
  max-width: 260px;
  white-space: normal !important;
}

.hr-attendance-makeup-review-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 7px;
  min-width: 430px;
}

.hr-attendance-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-attendance-schedule-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid #f3d08b;
  border-radius: 9px;
  background: #fff8e8;
  color: #8a5600;
}

.hr-attendance-schedule-notice > div,
.hr-attendance-schedule-notice.is-success {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hr-attendance-schedule-notice.is-success {
  justify-content: flex-start;
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.hr-attendance-schedule-notice span {
  line-height: 1.5;
}

.hr-attendance-metrics > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.hr-attendance-metrics > div:last-child {
  border-right: 0;
}

.hr-attendance-metrics span,
.hr-attendance-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.hr-attendance-metrics strong {
  font-size: 19px;
}

.hr-attendance-metrics strong.is-negative {
  color: var(--red);
}

.hr-attendance-table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-attendance-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.hr-attendance-table th,
.hr-attendance-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #e8edf3;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.hr-attendance-table th {
  color: #536174;
  background: #f7f9fc;
  font-size: 12px;
}

.hr-attendance-note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d9e2ee;
  border-radius: 9px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 12px;
}

.hr-attendance-note strong {
  color: var(--text);
}

.hr-monthly-attendance-page {
  display: grid;
  gap: 14px;
}

.hr-monthly-attendance-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-monthly-attendance-toolbar label {
  display: grid;
  gap: 5px;
}

.hr-monthly-attendance-toolbar label > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-monthly-attendance-toolbar input,
.hr-monthly-attendance-toolbar select {
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.hr-monthly-attendance-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hr-monthly-attendance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.hr-monthly-attendance-layout > main {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-monthly-attendance-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hr-monthly-attendance-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-monthly-attendance-section-head > div {
  display: grid;
  gap: 3px;
}

.hr-monthly-attendance-section-head > div > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-monthly-attendance-section-head h3 {
  margin: 0;
}

.hr-monthly-attendance-summary {
  min-width: 1120px;
}

.hr-monthly-attendance-summary tbody tr {
  cursor: pointer;
}

.hr-monthly-attendance-summary tbody tr:hover,
.hr-monthly-attendance-summary tbody tr.is-selected {
  background: #eef5ff;
}

.hr-monthly-attendance-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-monthly-attendance-detail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-monthly-attendance-detail > header > div {
  display: grid;
  gap: 3px;
}

.hr-monthly-attendance-detail header span {
  color: var(--muted);
  font-size: 12px;
}

.hr-monthly-attendance-detail h3 {
  margin: 0;
}

.hr-monthly-attendance-daily {
  min-width: 980px;
}

.hr-application-page {
  display: grid;
  gap: 14px;
}

.hr-application-settings-bar,
.hr-leave-type-settings > header,
.hr-leave-type-settings > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hr-application-settings-bar {
  padding: 13px 15px;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  background: #f8fbff;
}

.hr-application-settings-bar > div,
.hr-leave-type-settings > header > div {
  display: grid;
  gap: 3px;
}

.hr-application-settings-bar span,
.hr-leave-type-settings > header span,
.hr-leave-type-settings > footer > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-leave-type-settings {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #b9cce5;
  border-radius: 10px;
  background: #fff;
}

.hr-leave-type-settings h3 {
  margin: 0;
}

.hr-leave-type-settings > footer > div {
  display: flex;
  gap: 10px;
}

.hr-application-config-settings {
  overflow: hidden;
  border: 1px solid #bfd0e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 76, 125, 0.06);
}

.hr-application-config-settings > header,
.hr-application-config-settings > footer,
.hr-application-config-grid > section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-application-config-settings > header,
.hr-application-config-settings > footer {
  padding: 12px 14px;
  background: #f7faff;
}

.hr-application-config-settings > header {
  border-bottom: 1px solid var(--line);
}

.hr-application-config-settings > footer {
  border-top: 1px solid var(--line);
}

.hr-application-config-settings h3,
.hr-application-config-settings p {
  margin: 0;
}

.hr-application-config-settings p,
.hr-application-config-grid header span,
.hr-application-config-feedback {
  color: var(--muted);
  font-size: 11px;
}

.hr-application-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
  gap: 12px;
  padding: 12px;
}

.hr-application-config-grid > section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dde5ef;
  border-radius: 8px;
}

.hr-application-config-grid > section > header {
  padding: 9px 10px;
  background: #fafcff;
  border-bottom: 1px solid #e4eaf2;
}

.hr-application-config-grid > section > header > div {
  display: grid;
  gap: 2px;
}

.hr-application-config-grid table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.hr-application-config-grid th,
.hr-application-config-grid td {
  padding: 7px 8px;
  border-bottom: 1px solid #e8edf4;
  text-align: left;
  white-space: nowrap;
}

.hr-application-config-grid th {
  background: #f5f8fc;
  color: #65748a;
  font-size: 10px;
  font-weight: 600;
}

.hr-application-config-grid input[type="text"],
.hr-application-config-grid select {
  width: 100%;
  min-width: 120px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid #ccd7e5;
  border-radius: 6px;
  background: #fff;
}

.hr-application-config-feedback.is-error {
  color: #b42318;
}

.hr-application-config-feedback.is-success {
  color: #15803d;
}

.hr-leave-type-save-feedback {
  font-size: 13px;
  font-weight: 600;
}

.hr-leave-type-save-feedback.is-saving {
  color: #1d4ed8;
}

.hr-leave-type-save-feedback.is-success {
  color: #15803d;
}

.hr-leave-type-save-feedback.is-error {
  color: #b42318;
}

.hr-leave-type-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.hr-leave-type-table th,
.hr-leave-type-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.hr-leave-type-table th {
  background: #f6f8fb;
  color: #536273;
  font-size: 12px;
}

.hr-leave-type-table input[type="text"],
.hr-leave-type-table input[type="number"],
.hr-leave-type-table select {
  width: 100%;
  min-width: 105px;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 7px;
  background: #fff;
  padding: 7px 8px;
}

.hr-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.danger-text {
  color: var(--red);
}

.hr-application-form,
.hr-application-layout > main,
.hr-application-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-application-form > header,
.hr-application-detail > header,
.hr-application-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hr-application-form > header > div,
.hr-application-detail > header > div {
  display: grid;
  gap: 3px;
}

.hr-application-form > header > div > span,
.hr-application-detail > header > div > span,
.hr-application-form > footer > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-application-submit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.hr-application-submit-feedback {
  max-width: 520px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.hr-application-submit-feedback.error {
  color: var(--red);
}

.hr-application-submit-feedback.success {
  color: var(--green);
}

.hr-attendance-payroll-panel {
  gap: 12px;
}

.hr-attendance-payroll-source {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hr-attendance-payroll-source > span {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
}

.hr-attendance-payroll-source strong {
  color: var(--text);
  font-size: 13px;
}

.hr-attendance-deduction-detail th,
.hr-attendance-deduction-detail td {
  padding: 8px 9px;
  font-size: 12px;
}

.hr-attendance-issue-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #f0d7a1;
  border-radius: 8px;
  background: #fffbeb;
}

.hr-attendance-issue-summary span,
.hr-attendance-issue-summary small {
  color: #785b1d;
  font-size: 12px;
}

.hr-attendance-adjustment-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e2f0;
  border-radius: 9px;
  background: #f8fbff;
}

.hr-attendance-adjustment-editor label {
  display: grid;
  gap: 5px;
}

.hr-attendance-adjustment-editor label > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-attendance-adjustment-editor input,
.hr-attendance-adjustment-editor textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.hr-attendance-adjustment-editor .is-wide {
  grid-column: 1 / -1;
}

.hr-attendance-adjustment-editor button {
  grid-column: 1 / -1;
  justify-self: end;
}

.hr-attendance-adjustment-feedback {
  padding: 8px 10px;
  border-radius: 7px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.hr-attendance-adjustment-feedback.error {
  background: #fff1f2;
  color: var(--red);
}

.hr-attendance-adjustment-feedback.success {
  background: #ecfdf3;
  color: var(--green);
}

.hr-attendance-adjustment-history {
  display: grid;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.hr-attendance-adjustment-history span {
  color: var(--muted);
  font-size: 11px;
}

.hr-payroll-metrics.hr-payroll-metrics-five {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.hr-payroll-banner > button {
  margin-left: auto;
}

.hr-statutory-config-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #bfd2f2;
  border-radius: 10px;
  background: #f8fbff;
}

.hr-statutory-config-panel > header,
.hr-statutory-config-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hr-statutory-config-panel > header p,
.hr-statutory-config-panel > footer span,
.hr-statutory-config-panel section p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.hr-statutory-config-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.hr-statutory-config-grid > section {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hr-statutory-config-grid h4 {
  margin: 0 0 2px;
}

.hr-statutory-config-grid label,
.hr-statutory-config-note,
.hr-statutory-employee-editor label {
  display: grid;
  gap: 4px;
}

.hr-statutory-config-grid label > span,
.hr-statutory-config-note > span,
.hr-statutory-employee-editor label > span {
  color: var(--muted);
  font-size: 11px;
}

.hr-statutory-config-grid input,
.hr-statutory-config-note textarea,
.hr-statutory-employee-editor input,
.hr-statutory-employee-editor select,
.hr-statutory-employee-editor textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 1px solid #cfd9e5;
  border-radius: 7px;
  background: #fff;
}

.hr-statutory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hr-statutory-summary > span {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.hr-statutory-summary strong {
  color: var(--text);
  font-size: 14px;
}

.hr-statutory-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hr-statutory-breakdown > div {
  display: grid;
  grid-template-columns: minmax(75px, 1fr) repeat(2, auto);
  gap: 5px 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11px;
}

.hr-statutory-breakdown > div > strong,
.hr-statutory-breakdown > div > b {
  grid-column: 1 / -1;
}

.hr-statutory-breakdown > div > b {
  padding-top: 5px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.hr-statutory-employee-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid #d8e2f0;
  border-radius: 9px;
  background: #f8fbff;
}

.hr-statutory-employee-editor .is-wide,
.hr-statutory-employee-editor > button,
.hr-statutory-overrides {
  grid-column: 1 / -1;
}

.hr-statutory-employee-editor > button {
  justify-self: end;
}

.hr-statutory-overrides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px dashed #b8c8dc;
  border-radius: 8px;
  background: #fff;
}

.hr-statutory-overrides > strong {
  grid-column: 1 / -1;
  font-size: 12px;
}

.hr-application-form h3,
.hr-application-detail h3 {
  margin: 0;
}

.hr-application-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hr-application-form-grid label,
.hr-application-review label {
  display: grid;
  gap: 5px;
}

.hr-application-form-grid label > span,
.hr-application-review label > span {
  color: var(--muted);
  font-size: 12px;
}

.hr-required-mark {
  color: var(--red);
  font-style: normal;
  font-weight: 700;
}

.hr-application-form-grid input,
.hr-application-form-grid select,
.hr-application-form-grid textarea,
.hr-application-review textarea {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.hr-application-form-grid .is-wide {
  grid-column: 1 / -1;
}

.hr-application-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 14px;
  align-items: start;
}

.hr-application-layout.is-employee-view {
  grid-template-columns: minmax(0, 1fr);
}

.hr-application-layout.is-single-table {
  grid-template-columns: minmax(0, 1fr);
}

.hr-application-scope-switch {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef2f7;
}

.hr-application-scope-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 8px 18px;
  font-weight: 700;
  cursor: pointer;
}

.hr-application-scope-switch button.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}

.hr-application-scope-switch button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
}

.hr-application-record-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7fa;
}

.hr-application-record-categories button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.hr-application-record-categories button.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}

.hr-application-record-categories button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e6edf7;
  color: #526178;
  font-size: 10px;
}

.hr-application-review-statuses {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  overflow-x: auto;
}

.hr-application-review-statuses button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  color: var(--muted);
  padding: 6px 13px;
  white-space: nowrap;
  cursor: pointer;
}

.hr-application-review-statuses button.is-active {
  border-color: #9ab2ff;
  background: #eef3ff;
  color: var(--blue);
  font-weight: 700;
}

.hr-application-review-statuses button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #e8edf4;
  color: inherit;
  font-size: 11px;
}

.hr-expense-workflow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 520px;
  padding-top: 6px;
}

.hr-expense-workflow > span {
  position: relative;
  display: grid;
  flex: 1 1 0;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.hr-expense-workflow > span::before {
  position: absolute;
  top: 5px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #dce4ee;
  content: "";
}

.hr-expense-workflow > span:first-child::before {
  display: none;
}

.hr-expense-workflow i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.hr-expense-workflow > span.is-complete,
.hr-expense-workflow > span.is-current {
  color: #166534;
}

.hr-expense-workflow > span.is-complete::before,
.hr-expense-workflow > span.is-current::before {
  background: #86d4a2;
}

.hr-expense-workflow > span.is-complete i,
.hr-expense-workflow > span.is-current i {
  border-color: #22a559;
  background: #22a559;
}

.hr-expense-workflow > span.is-current i {
  box-shadow: 0 0 0 3px #dcfce7;
}

.hr-expense-workflow > span.is-rejected {
  color: #b42318;
}

.hr-expense-workflow > span.is-rejected i {
  border-color: #ef4444;
  background: #ef4444;
  box-shadow: 0 0 0 3px #fee2e2;
}

.hr-application-table {
  min-width: 1180px;
}

.hr-application-table.is-management {
  min-width: 1480px;
}

.hr-application-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hr-application-table tbody tr:hover {
  background: #eef5ff;
}

.hr-application-reason-cell {
  min-width: 280px;
  white-space: normal;
}

.hr-application-reason-detail {
  display: grid;
  gap: 5px;
}

.hr-application-reason-detail > small,
.hr-financial-upload small,
.hr-application-form-grid label > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.hr-financial-empty {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px dashed #f0b65c;
  border-radius: 9px;
  background: #fff9ed;
  color: #8a5600;
}

.hr-financial-empty span {
  font-size: 12px;
  line-height: 1.5;
}

.hr-application-form button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.hr-financial-upload input[type="file"] {
  min-height: 46px;
  padding: 7px 9px;
}

.hr-financial-upload input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #f8fafc;
  padding: 6px 10px;
  color: var(--text);
  cursor: pointer;
}

.hr-financial-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.hr-financial-attachments button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.hr-financial-no-proof {
  color: var(--muted);
  font-size: 11px;
}

.hr-financial-budget-overrun {
  width: fit-content;
  border-radius: 999px;
  background: #fff1f2;
  color: #c2413a;
  padding: 3px 8px;
  font-size: 11px;
}

.hr-financial-approval-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.hr-financial-approval-progress > div {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 7px 8px;
  border: 1px solid #e3eaf3;
  border-radius: 7px;
  background: #f8fafc;
}

.hr-financial-approval-progress > div > span,
.hr-financial-approval-progress > div > small {
  color: var(--muted);
  font-size: 10px;
}

.hr-financial-approval-progress .hr-status-pill {
  width: fit-content;
}

.hr-application-review-cell {
  min-width: 280px;
  white-space: normal;
}

.hr-application-inline-review,
.hr-application-inline-result {
  display: grid;
  gap: 7px;
}

.hr-application-inline-review textarea {
  width: 100%;
  min-height: 58px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font: inherit;
}

.hr-application-inline-review label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.hr-application-inline-review input[type="month"] {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  border: 1px solid #cfd9e5;
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
}

.hr-application-inline-review > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hr-application-inline-review button {
  min-height: 34px;
  padding: 7px 14px;
}

.hr-application-inline-result span,
.hr-application-inline-result small {
  color: var(--muted);
  line-height: 1.45;
}

.hr-application-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.hr-application-detail dl > div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #e3eaf3;
  border-radius: 8px;
  background: #f8fafc;
}

.hr-application-detail dl > div.is-wide {
  grid-column: 1 / -1;
}

.hr-application-detail dt {
  color: var(--muted);
  font-size: 11px;
}

.hr-application-detail dd {
  margin: 0;
  line-height: 1.5;
}

.hr-application-review,
.hr-application-review-result {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hr-application-review > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hr-application-review-result span,
.hr-application-review-result small {
  color: var(--muted);
}

.hr-schedule-page {
  display: grid;
  gap: 12px;
}

.hr-schedule-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-schedule-toolbar-filters,
.hr-schedule-toolbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.hr-schedule-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.hr-schedule-toolbar label > span {
  color: var(--muted);
  font-size: 11px;
}

.hr-schedule-publish-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #f3d08b;
  border-radius: 9px;
  background: #fff8e8;
  color: #8a5600;
}

.hr-schedule-publish-feedback.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.hr-schedule-publish-feedback.is-saving {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.hr-schedule-publish-feedback.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.hr-schedule-publish-feedback span {
  line-height: 1.5;
}

.hr-schedule-toolbar input,
.hr-schedule-toolbar select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #cfd9e5;
  border-radius: 7px;
  background: #fff;
}

.hr-schedule-toolbar input:disabled,
.hr-schedule-toolbar select:disabled {
  opacity: 1;
  background: #f7f9fc;
  color: #526178;
}

.hr-schedule-shift-settings {
  overflow: hidden;
  border: 1px solid #cfdcf2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 76, 125, 0.08);
}

.hr-schedule-shift-settings > header,
.hr-schedule-shift-settings > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
}

.hr-schedule-shift-settings > header {
  border-bottom: 1px solid var(--line);
  background: #f7faff;
}

.hr-schedule-shift-settings > header strong {
  color: #26354d;
  font-size: 14px;
}

.hr-schedule-shift-settings > header p,
.hr-schedule-shift-settings > footer p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.hr-schedule-shift-settings-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hr-schedule-shift-settings-head-actions > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #386dc5;
  font-size: 10px;
  white-space: nowrap;
}

.hr-schedule-shift-settings-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(185px, 1fr));
  gap: 10px;
  padding: 12px 15px;
}

.hr-schedule-shift-setting {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.hr-schedule-shift-setting > div:first-child {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 7px;
}

.hr-schedule-shift-setting-head label,
.hr-schedule-location-field {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.hr-schedule-shift-setting-head label span,
.hr-schedule-location-field span {
  color: var(--muted);
  font-size: 9px;
}

.hr-schedule-shift-setting-head input,
.hr-schedule-location-field input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 7px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #fff;
  color: #26354d;
  font-size: 11px;
}

.hr-schedule-shift-setting-head button {
  min-height: 32px;
  padding: 0 7px;
  border: 1px solid #f0c8c3;
  border-radius: 6px;
  background: #fff7f6;
  color: #c65b4e;
  font-size: 10px;
  cursor: pointer;
}

.hr-schedule-time-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 5px;
}

.hr-schedule-time-range label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hr-schedule-time-range label span {
  color: var(--muted);
  font-size: 9px;
}

.hr-schedule-time-range input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #fff;
  color: #26354d;
  font-size: 12px;
  text-align: center;
}

.hr-schedule-time-range i {
  padding-bottom: 9px;
  color: #8b97a8;
  font-size: 9px;
  font-style: normal;
}

.hr-schedule-shift-settings > footer {
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.hr-schedule-shift-settings > footer > div {
  display: flex;
  gap: 8px;
}

.hr-schedule-roster-settings {
  overflow: hidden;
  border: 1px solid #cfdcf2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(42, 76, 125, 0.08);
}

.hr-schedule-roster-settings > header,
.hr-schedule-roster-settings > footer,
.hr-schedule-roster-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hr-schedule-roster-settings > header,
.hr-schedule-roster-settings > footer {
  padding: 10px 12px;
  background: #f7faff;
}

.hr-schedule-roster-settings > header {
  border-bottom: 1px solid var(--line);
}

.hr-schedule-roster-settings > footer {
  border-top: 1px solid var(--line);
}

.hr-schedule-roster-settings p,
.hr-schedule-roster-title span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.hr-schedule-roster-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 220px;
}

.hr-schedule-roster-layout > aside {
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.hr-schedule-roster-layout > main {
  min-width: 0;
  padding: 10px 12px;
}

.hr-schedule-roster-departments {
  display: grid;
  gap: 5px;
}

.hr-schedule-roster-departments > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dfe6f0;
  border-radius: 7px;
  background: #fff;
  color: #445169;
  cursor: pointer;
}

.hr-schedule-roster-departments > button.is-active {
  border-color: #9bb9ff;
  background: #eef4ff;
  color: #245fd7;
}

.hr-schedule-roster-departments span,
.hr-schedule-roster-member em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.hr-schedule-roster-add-department,
.hr-schedule-roster-add-member {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.hr-schedule-roster-add-member {
  grid-template-columns: 34px minmax(100px, 1fr) 66px 52px;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  background: #f7faff;
  margin-top: 0;
}

.hr-schedule-roster-add-member > span {
  color: #55739e;
  text-align: center;
}

.hr-schedule-roster-add-member > em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.hr-schedule-roster-settings input {
  min-width: 0;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #fff;
}

.hr-schedule-roster-add-department button,
.hr-schedule-roster-member > button,
.hr-schedule-roster-add-member > button {
  min-height: 32px;
  padding: 0 7px;
  border: 1px solid #d8e1ee;
  border-radius: 6px;
  background: #fff;
  color: #42608e;
  cursor: pointer;
  white-space: nowrap;
}

.hr-schedule-roster-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.hr-schedule-roster-member,
.hr-schedule-roster-add-member,
.hr-schedule-roster-member-header > div {
  display: grid;
  grid-template-columns: 34px minmax(100px, 1fr) 66px 52px;
  align-items: center;
  gap: 6px;
}

.hr-schedule-roster-member-header {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.hr-schedule-roster-member-header > div {
  padding: 5px 6px;
  border-radius: 6px;
  background: #f1f5fa;
  color: #65748a;
  font-size: 10px;
}

.hr-schedule-roster-member-header > div span:first-child,
.hr-schedule-roster-member-header > div span:nth-child(3),
.hr-schedule-roster-member-header > div span:last-child {
  text-align: center;
}

.hr-schedule-roster-member {
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  background: #fff;
}

.hr-schedule-roster-member:hover {
  background: #fbfcff;
}

.hr-schedule-roster-member > span {
  align-self: center;
  color: var(--muted);
  text-align: center;
}

.hr-schedule-roster-member em {
  align-self: center;
  justify-self: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f5f8;
  line-height: 1.3;
}

.hr-schedule-roster-member em.is-linked {
  color: #15803d;
  background: #ecf9f0;
}

.hr-schedule-roster-member em.is-unlinked {
  color: #b45309;
  background: #fff7e6;
}

.hr-schedule-roster-member em.is-ambiguous {
  color: #b42318;
  background: #fff1f0;
}

.hr-schedule-roster-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hr-schedule-roster-title > div span {
  margin: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3fa;
  color: #5a6b83;
}

.hr-schedule-roster-title .danger-link {
  border: 0;
  background: transparent;
  color: #c65b4e;
  cursor: pointer;
}

.hr-schedule-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-schedule-metrics > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.hr-schedule-metrics > div:last-child {
  border-right: 0;
}

.hr-schedule-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.hr-schedule-metrics strong {
  color: #26354d;
  font-size: 18px;
}

.hr-schedule-metrics strong.is-negative {
  color: #dc5c47;
}

.hr-schedule-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-schedule-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hr-schedule-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #d9e2ee;
}

.hr-schedule-legend strong {
  color: #33435a;
  font-size: 12px;
}

.hr-schedule-legend small {
  color: var(--muted);
  font-size: 10px;
}

.hr-schedule-legend .is-rest i { background: #e8b85f; }
.hr-schedule-legend .is-early i { background: #51a9e8; }
.hr-schedule-legend .is-regular i { background: #7b8ba4; }
.hr-schedule-legend .is-middle i { background: #a674df; }
.hr-schedule-legend .is-late_office i { background: #eb765f; }
.hr-schedule-legend .is-late_home i { background: #4abf9f; }
.hr-schedule-legend .is-custom-shift i { background: #4c7de4; }

.hr-schedule-table-scroll {
  max-width: 100%;
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.hr-schedule-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #26354d;
  font-size: 12px;
}

.hr-schedule-table th,
.hr-schedule-table td {
  height: 58px;
  padding: 6px;
  border-right: 1px solid #e7ebf1;
  border-bottom: 1px solid #e7ebf1;
  background: #fff;
  text-align: center;
}

.hr-schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 54px;
  background: #f5f8fc;
  color: #526178;
  font-weight: 700;
}

.hr-schedule-table .hr-schedule-employee {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 142px;
  max-width: 142px;
  padding: 8px 12px;
  background: #fbfcfe;
  text-align: left;
}

.hr-schedule-table thead .hr-schedule-employee {
  z-index: 5;
  background: #f5f8fc;
}

.hr-schedule-employee strong,
.hr-schedule-employee small {
  display: block;
}

.hr-schedule-employee small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.hr-schedule-date {
  min-width: 64px;
}

.hr-schedule-date span,
.hr-schedule-date strong {
  display: block;
}

.hr-schedule-date span {
  color: #7b8799;
  font-size: 10px;
}

.hr-schedule-date strong {
  margin-top: 2px;
  color: #27364e;
  font-size: 14px;
}

.hr-schedule-date.is-weekend {
  background: #fff8ed !important;
}

.hr-schedule-shift-cell {
  min-width: 64px;
  padding: 5px !important;
}

.hr-schedule-shift-cell select {
  width: 54px;
  min-height: 34px;
  padding: 3px 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #33435a;
  font-size: 11px;
  text-align: center;
}

.hr-schedule-shift-cell select:disabled {
  opacity: 1;
  cursor: default;
}

.hr-schedule-shift-cell.is-rest { background: #fff8dd; }
.hr-schedule-shift-cell.is-early { background: #eaf6ff; }
.hr-schedule-shift-cell.is-regular { background: #f4f6f9; }
.hr-schedule-shift-cell.is-middle { background: #f5edff; }
.hr-schedule-shift-cell.is-late_office { background: #fff0ec; }
.hr-schedule-shift-cell.is-late_home { background: #eafaf5; }
.hr-schedule-shift-cell.is-custom-shift { background: #edf3ff; }
.hr-schedule-shift-cell.is-deleted-shift { background: #fff0ee; }

.hr-schedule-summary,
.hr-schedule-quota,
.hr-schedule-confirm {
  min-width: 72px;
}

.hr-schedule-quota input {
  width: 58px;
  min-height: 32px;
  border: 1px solid #d3dce8;
  border-radius: 6px;
  text-align: center;
}

.hr-schedule-quota input:disabled {
  border-color: transparent;
  background: transparent;
}

.hr-schedule-deviation {
  min-width: 150px;
  text-align: left !important;
}

.hr-schedule-deviation strong,
.hr-schedule-deviation small {
  display: block;
}

.hr-schedule-deviation small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.hr-schedule-deviation.success strong { color: #25805c; }
.hr-schedule-deviation.warning strong { color: #ad6b14; }
.hr-schedule-deviation.danger strong { color: #ce5546; }

.hr-schedule-confirm {
  min-width: 116px;
}

.hr-schedule-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid #eadfcb;
  border-radius: 9px;
  background: #fffaf1;
  color: #6f6250;
  font-size: 11px;
}

.hr-schedule-foot p {
  margin: 0;
}

.hr-schedule-foot span {
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .hr-salary-config-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .hr-salary-scheme-main-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-salary-scheme-main-head dl {
    min-width: 0;
    width: 100%;
  }

}

@media (max-width: 820px) {
  .hr-salary-config-workspace {
    grid-template-columns: 1fr;
  }

  .hr-salary-scheme-sidebar {
    position: static;
  }

  .hr-salary-scheme-list {
    max-height: none;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 10px 12px;
  }

  .hr-salary-scheme-group {
    min-width: 245px;
  }

  .hr-salary-scheme-sidebar footer {
    display: none;
  }

  .hr-salary-scheme-main-head dl {
    grid-template-columns: 1fr;
  }

  .hr-salary-scheme-main-head dl > div {
    border-right: 0;
    border-bottom: 1px solid #e1e7f0;
  }

  .hr-salary-scheme-main-head dl > div:last-child {
    border-bottom: 0;
  }

  .hr-salary-config-sections {
    overflow-x: auto;
  }

  .hr-salary-config-sections button {
    min-width: 104px;
    white-space: nowrap;
  }

  .hr-commission-config-grid,
  .hr-referral-commission-form {
    grid-template-columns: 1fr;
  }

  .hr-salary-assignment-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-custom-commission-section,
  .hr-referral-commission-form .is-wide {
    grid-column: auto;
  }

  .hr-salary-standard-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-salary-standard-intro span {
    text-align: left;
  }

  .hr-salary-compare-split .hr-split-field-card {
    min-width: 205px;
    flex: 0 0 205px;
  }

  .hr-split-field-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-template-layout,
  .hr-template-meta,
  .hr-template-review {
    grid-template-columns: 1fr;
  }

  .hr-template-page-head,
  .hr-performance-scope-bar,
  .hr-template-permission-note,
  .hr-template-review > div {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-performance-scope-bar > div,
  .hr-performance-scope-bar label {
    width: 100%;
    min-width: 0;
  }

  .hr-performance-scope-count {
    align-self: flex-start;
  }

  .hr-template-versions {
    max-height: 260px;
    overflow: auto;
  }

  .hr-conversion-formulas {
    grid-template-columns: 1fr;
  }

  .hr-conversion-formulas > div {
    border-right: 0;
    border-bottom: 1px solid #dbe6f6;
  }

  .hr-conversion-formulas > div:last-child {
    border-bottom: 0;
  }

  .main {
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .top-actions .user-switch {
    min-width: 0;
  }

  .top-actions .user-switch select,
  .top-actions .icon-button,
  .top-actions .top-logout-button {
    width: 100%;
    min-width: 0;
  }

  .hr-module-head,
  .hr-progress-strip,
  .hr-approval-counts,
  .hr-payroll-banner,
  .hr-sticky-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-module-tabs,
  .hr-payroll-mode {
    overflow-x: auto;
  }

  .hr-module-tabs button,
  .hr-payroll-mode button {
    white-space: nowrap;
  }

  .hr-performance-workflow-nav {
    overflow-x: auto;
  }

  .hr-performance-workflow-title {
    min-width: 150px;
  }

  .hr-performance-workflow-nav > button {
    flex: 0 0 145px;
  }

  .hr-attendance-toolbar,
  .hr-monthly-attendance-toolbar,
  .hr-attendance-location-settings > header,
  .hr-attendance-location-settings > footer,
  .hr-attendance-location-section > header,
  .hr-attendance-self-head,
  .hr-attendance-self-actions,
  .hr-attendance-makeup-form > header,
  .hr-attendance-makeup-form > footer,
  .hr-attendance-makeup-history > header,
  .hr-attendance-makeup-history li,
  .hr-attendance-note {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-attendance-toolbar > div,
  .hr-monthly-attendance-toolbar > div,
  .hr-attendance-self-actions > button:first-of-type {
    margin-left: 0;
  }

  .hr-module-head.is-self-attendance {
    display: block;
    margin-bottom: 8px;
  }

  .hr-module-head.is-self-attendance > .hr-demo-chip {
    display: none;
  }

  .hr-attendance-page.is-self {
    gap: 10px;
  }

  .hr-attendance-toolbar.is-self {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 12px;
  }

  .hr-attendance-toolbar.is-self > div {
    width: auto;
  }

  .hr-attendance-toolbar.is-self > div:last-child {
    margin-left: auto;
  }

  .hr-attendance-self-card {
    display: block;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(24, 56, 96, 0.09);
  }

  .hr-attendance-punches {
    border-left: 0;
  }

  .hr-attendance-self-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 16px;
  }

  .hr-attendance-self-head > .hr-status-pill {
    align-self: start;
  }

  .hr-attendance-self-head strong {
    font-size: 19px;
  }

  .hr-attendance-punches > div {
    padding: 16px;
  }

  .hr-attendance-punch-step header {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .hr-attendance-self-actions {
    gap: 14px;
    padding: 16px;
  }

  .hr-attendance-device-status {
    align-items: stretch;
    padding: 12px 16px;
    border-left: 0;
  }

  .hr-attendance-device-status > button {
    flex: 0 0 auto;
  }

  .hr-attendance-next-copy {
    display: grid;
    gap: 5px;
  }

  .hr-attendance-primary-action {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
  }

  .hr-attendance-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 16px 16px;
  }

  .hr-attendance-quick-actions button {
    min-width: 0;
    padding: 8px 6px;
  }

  .hr-monthly-attendance-layout {
    grid-template-columns: 1fr;
  }

  .hr-monthly-attendance-detail > header,
  .hr-monthly-attendance-section-head,
  .hr-application-form > header,
  .hr-application-form > footer,
  .hr-application-detail > header,
  .hr-application-settings-bar,
  .hr-leave-type-settings > header,
  .hr-leave-type-settings > footer,
  .hr-application-config-settings > header,
  .hr-application-config-settings > footer,
  .hr-application-config-grid > section > header {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-application-config-grid {
    grid-template-columns: 1fr;
  }

  .hr-application-layout,
  .hr-application-form-grid,
  .hr-application-detail dl {
    grid-template-columns: 1fr;
  }

  .hr-application-form-grid .is-wide,
  .hr-application-detail dl > div.is-wide {
    grid-column: auto;
  }

  .hr-application-submit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-application-submit-feedback {
    max-width: none;
    text-align: left;
  }

  .hr-attendance-payroll-source,
  .hr-attendance-adjustment-editor,
  .hr-statutory-config-grid,
  .hr-statutory-summary,
  .hr-statutory-breakdown,
  .hr-statutory-employee-editor,
  .hr-statutory-overrides {
    grid-template-columns: 1fr;
  }

  .hr-attendance-adjustment-editor .is-wide,
  .hr-attendance-adjustment-editor button,
  .hr-statutory-employee-editor .is-wide,
  .hr-statutory-employee-editor > button,
  .hr-statutory-overrides,
  .hr-statutory-overrides > strong {
    grid-column: auto;
  }

  .hr-statutory-config-panel > header,
  .hr-statutory-config-panel > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-attendance-self-actions > button,
  .hr-attendance-makeup-form > footer > button {
    width: 100%;
  }

  .hr-attendance-makeup-form > div {
    grid-template-columns: 1fr;
  }

  .hr-attendance-makeup-form .is-wide {
    grid-column: auto;
  }

  .hr-attendance-location-grid,
  .hr-attendance-location-grid.is-home,
  .hr-attendance-location-card {
    grid-template-columns: 1fr;
  }

  .hr-attendance-location-card > header,
  .hr-attendance-location-card .is-wide {
    grid-column: auto;
  }

  .hr-attendance-location-capture {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-attendance-location-capture button {
    width: 100%;
  }

  .hr-attendance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-application-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-attendance-punches {
    grid-template-columns: 1fr;
  }

  .hr-attendance-punches > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hr-schedule-toolbar,
  .hr-schedule-toolbar-filters,
  .hr-schedule-toolbar-actions,
  .hr-schedule-shift-settings > header,
  .hr-schedule-shift-settings > footer,
  .hr-schedule-roster-settings > header,
  .hr-schedule-roster-settings > footer,
  .hr-schedule-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .hr-schedule-shift-settings-grid {
    grid-template-columns: 1fr;
  }

  .hr-schedule-roster-layout,
  .hr-schedule-roster-members {
    grid-template-columns: 1fr;
  }

  .hr-schedule-roster-member-header {
    grid-template-columns: 1fr;
  }

  .hr-schedule-roster-member-header > div:nth-child(2) {
    display: none;
  }

  .hr-schedule-roster-member,
  .hr-schedule-roster-add-member,
  .hr-schedule-roster-member-header > div {
    grid-template-columns: 30px minmax(0, 1fr) 60px 50px;
  }

  .hr-schedule-roster-layout > aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hr-schedule-shift-settings > footer > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-schedule-shift-settings-head-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .hr-schedule-toolbar label {
    min-width: 0;
  }

  .hr-schedule-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-schedule-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .hr-schedule-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .hr-schedule-foot span {
    white-space: normal;
  }

  .hr-template-filter {
    min-width: 100% !important;
  }

  .hr-filter-bar label {
    min-width: calc(50% - 6px);
    flex: 1;
  }

  .hr-progress-strip p,
  .hr-approval-counts p,
  .hr-sticky-actions p {
    margin: 0;
  }

  .hr-payroll-flow {
    grid-template-columns: 1fr;
  }

  .hr-metric-strip,
  .hr-payroll-metrics,
  .hr-validation-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-metric-strip > div,
  .hr-payroll-metrics > div,
  .hr-validation-strip > div {
    border-bottom: 1px solid var(--line);
  }

  .hr-stepper {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hr-stepper > i {
    width: 1px;
    height: 20px;
    flex: none;
    margin: 0 0 0 16px;
  }

  .hr-approval-actions {
    grid-template-columns: 1fr;
  }

  .hr-source-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-return-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-item-detail {
    grid-template-columns: 1fr;
  }

  .hr-item-detail h3,
  .hr-item-detail > p {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .hr-application-scope-switch {
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }

  .hr-application-scope-switch button {
    flex: 1;
    min-width: 0;
    padding-inline: 10px;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    z-index: 120;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: calc(68px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar .brand {
    display: none;
  }

  .sidebar .nav-list {
    display: flex;
    min-width: max-content;
    gap: 4px;
  }

  .sidebar .nav-item {
    grid-template-columns: 1fr;
    grid-template-rows: 26px auto;
    justify-items: center;
    gap: 2px;
    flex: 0 0 66px;
    min-height: 52px;
    padding: 4px;
    border-radius: 10px;
    text-align: center;
  }

  .sidebar .nav-item span:last-child {
    display: block;
    max-width: 62px;
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar .nav-icon {
    width: 26px;
    height: 26px;
  }

  .sidebar .nav-attendance-quick {
    position: sticky;
    left: 0;
    z-index: 2;
    display: grid;
    flex-basis: 70px;
    background: #f5c94a;
    color: #1d2939;
    box-shadow: 8px 0 16px rgba(15, 23, 42, 0.24);
  }

  .sidebar .nav-attendance-quick:hover,
  .sidebar .nav-attendance-quick.is-active {
    background: #ffd85e;
    color: #172033;
  }

  .sidebar .nav-attendance-quick[hidden] {
    display: none;
  }

  .sidebar .nav-inspection-quick {
    position: sticky;
    left: 74px;
    z-index: 2;
    display: grid;
    flex-basis: 76px;
    background: var(--blue);
    color: #fff;
    box-shadow: 8px 0 16px rgba(15, 23, 42, 0.2);
  }

  .sidebar .nav-attendance-quick[hidden] + .nav-inspection-quick {
    left: 0;
  }

  .sidebar .nav-inspection-quick:hover,
  .sidebar .nav-inspection-quick.is-active {
    background: #2349d4;
    color: #fff;
  }

  .sidebar .nav-inspection-quick[hidden] {
    display: none;
  }

  .main {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
  }

  #view-recycle.is-inspection-workspace .list-panel {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .inspection-workspace {
    gap: 12px;
  }

  .inspection-workspace-head {
    display: none;
  }

  .inspection-search-field {
    gap: 6px;
  }

  .inspection-search-control {
    min-height: 60px;
    border-radius: 12px;
  }

  .inspection-search-control input {
    font-size: 17px;
  }

  .inspection-status-tabs {
    width: 100%;
    box-sizing: border-box;
  }

  .inspection-status-tabs button {
    flex: 1 0 auto;
    padding: 0 12px;
  }

  .inspection-card-list {
    grid-template-columns: 1fr;
  }

  .inspection-card {
    gap: 12px;
    padding: 14px;
  }

  .inspection-logistics-number {
    font-size: 19px;
  }

  .inspection-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inspection-card-actions button {
    width: 100%;
    min-height: 48px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 10px;
  }

  body:has(.view.is-active .hr-attendance-page.is-self) .topbar {
    display: none;
  }

  .top-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .lead-notification-center,
  .lead-notification-center .lead-notification-button {
    width: 100%;
  }

  .lead-notification-panel {
    position: fixed;
    top: 112px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .lead-notification-banner {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .hr-module-tabs {
    margin-right: -10px;
    margin-left: -10px;
    padding: 0 10px;
    scrollbar-width: none;
  }

  .hr-module-tabs::-webkit-scrollbar {
    display: none;
  }

  .hr-module-tabs button {
    min-height: 42px;
    padding: 0 14px;
  }

  .hr-module-head.is-self-attendance + .hr-module-tabs,
  .hr-attendance-page.is-self .hr-attendance-toolbar.is-self {
    display: none;
  }

  .hr-module-head.is-self-attendance {
    margin-bottom: 4px;
  }

  .hr-attendance-page.is-self .hr-attendance-scope-switch {
    display: flex;
    width: min(100%, 270px);
    padding: 3px;
  }

  .hr-attendance-page.is-self .hr-attendance-scope-switch button {
    flex: 1;
    min-height: 38px;
  }

  .hr-attendance-toolbar.is-self {
    border-radius: 12px;
  }

  .hr-attendance-toolbar.is-self > div:last-child .hr-status-pill {
    max-width: 112px;
    text-align: center;
    white-space: normal;
  }

  .hr-attendance-self-head p {
    line-height: 1.5;
  }

  .hr-attendance-self-head {
    padding: 12px 14px;
  }

  .hr-attendance-self-actions {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 12px 14px 14px;
    border-top: 1px solid #dbe6f6;
    border-bottom: 1px solid #dbe6f6;
    background: #fff;
    box-shadow: 0 8px 18px rgba(24, 56, 96, 0.08);
  }

  .hr-attendance-self-actions .hr-attendance-next-copy small {
    display: none;
  }

  .hr-attendance-punches > div {
    padding: 12px 14px;
  }

  .hr-attendance-punch-step header > em {
    padding: 4px 6px;
  }

  .hr-attendance-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar > div:first-child .eyebrow {
    display: none;
  }

  .topbar > div:first-child h1 {
    font-size: 21px;
    line-height: 1.2;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(86px, 1fr) minmax(82px, 1fr) 36px 36px 52px;
    gap: 6px;
    align-items: end;
  }

  .top-actions .user-switch > span {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .top-actions .user-switch select {
    min-height: 36px;
    padding-right: 24px;
    padding-left: 8px;
    font-size: 13px;
  }

  .top-actions .lead-notification-center,
  .top-actions .lead-notification-button,
  .top-actions .icon-button {
    width: 36px;
    min-width: 36px;
  }

  .top-actions .top-logout-button {
    width: 52px;
    min-width: 52px;
    padding: 0 8px;
    font-size: 12px;
  }

  #view-leads {
    min-width: 0;
  }

  .lead-mobile-dashboard-control {
    display: flex;
    margin-bottom: 8px;
  }

  .lead-mobile-dashboard-control button {
    width: 100%;
    height: 38px;
  }

  #view-leads #leadDashboardTabs,
  #view-leads .lead-dashboard-panels {
    display: none;
  }

  #view-leads.mobile-dashboard-open #leadDashboardTabs {
    display: flex;
    margin-right: -10px;
    margin-left: -10px;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #view-leads.mobile-dashboard-open #leadDashboardTabs::-webkit-scrollbar {
    display: none;
  }

  #view-leads.mobile-dashboard-open .lead-dashboard-panels {
    display: block;
  }

  #view-leads.is-market-view .lead-mobile-dashboard-control {
    display: none;
  }

  #view-leads .lead-action-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
    margin-right: -10px;
    margin-left: -10px;
    padding: 0 10px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #view-leads .lead-action-row::-webkit-scrollbar {
    display: none;
  }

  #view-leads .lead-action-row button {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  #view-leads #columnPickerBtn {
    display: none;
  }

  .lead-board-tabs {
    gap: 4px;
    margin-right: -10px;
    margin-left: -10px;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lead-board-tabs::-webkit-scrollbar {
    display: none;
  }

  .lead-board-tabs button {
    flex: 1 0 78px;
    min-width: 78px;
    height: 40px;
    padding: 0 8px;
    font-size: 14px;
  }

  .lead-board-tabs .tab-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
  }

  .lead-mobile-quickbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
  }

  .lead-mobile-quickbar strong {
    color: var(--muted);
    font-size: 13px;
  }

  .lead-mobile-quickbar button {
    height: 34px;
    padding: 0 13px;
    font-size: 13px;
  }

  #view-leads.is-market-view .lead-mobile-quickbar {
    display: none;
  }

  #view-leads .lead-status-row,
  #view-leads .lead-filter-toolbar {
    display: none;
  }

  #view-leads.mobile-filters-open .lead-status-row {
    display: flex;
  }

  #view-leads.mobile-filters-open .lead-filter-toolbar {
    display: block;
    padding: 10px;
  }

  #view-leads.mobile-filters-open .filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  #view-leads.mobile-filters-open .filter-grid > label {
    grid-column: 1 / -1;
  }

  #view-leads.mobile-filters-open .range-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-leads.mobile-filters-open .lead-status-row select,
  #view-leads.mobile-filters-open .lead-filter-toolbar input,
  #view-leads.mobile-filters-open .lead-filter-toolbar select {
    min-height: 40px;
  }

  #view-leads .laike-notice,
  #view-leads .lead-table-wrap {
    display: none;
  }

  .lead-mobile-list {
    display: grid;
    gap: 10px;
  }

  .lead-mobile-list > .empty-state {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .lead-mobile-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
  }

  .lead-mobile-card.has-high-value-tag {
    border-color: #c9e4f5;
    background: #f5fbff;
  }

  .lead-mobile-card.owner-contact-receipt-pending {
    border-color: #ecd26c;
    background: #fff9dc;
  }

  .lead-mobile-card.is-new-public-assignment {
    border-color: #8fb3ff;
    background: #f3f7ff;
    box-shadow: 0 5px 16px rgba(49, 100, 223, 0.12);
  }

  .lead-mobile-card.is-follow-todo-unfollowed {
    border-color: #8fb3ff;
    background: #f3f7ff;
    box-shadow: 0 5px 16px rgba(49, 100, 223, 0.12);
  }

  .lead-mobile-card.is-follow-todo-overdue {
    border-color: #f09a94;
    background: #fff5f5;
    box-shadow: 0 5px 16px rgba(217, 45, 32, 0.1);
  }

  .lead-mobile-card.is-follow-todo-missing-intention,
  .lead-mobile-card.is-follow-todo-due-today {
    border-color: #efc45b;
    background: #fffaf0;
  }

  .lead-mobile-card.is-follow-todo-due-tomorrow,
  .lead-mobile-card.is-follow-todo-due-day-after,
  .lead-mobile-card.is-follow-todo-due-this-week {
    border-color: #bed1f8;
    background: #f7f9ff;
  }

  .lead-mobile-card-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .lead-mobile-select {
    display: grid;
    place-items: center;
  }

  .lead-mobile-select input {
    width: 18px;
    height: 18px;
  }

  .lead-mobile-customer {
    min-width: 0;
  }

  .lead-mobile-customer .customer-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .lead-mobile-customer .customer-cell > span {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lead-mobile-customer .link-button {
    max-width: 100%;
    overflow: hidden;
    padding: 0;
    color: var(--blue);
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lead-mobile-stage {
    align-self: start;
  }

  .lead-mobile-card-grid,
  .lead-mobile-item-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .lead-mobile-card-grid {
    padding-bottom: 10px;
  }

  .lead-mobile-field,
  .lead-mobile-item-grid > div {
    min-width: 0;
  }

  .lead-mobile-field.is-wide,
  .lead-mobile-item-grid .is-wide {
    grid-column: 1 / -1;
  }

  .lead-mobile-field > span:first-child,
  .lead-mobile-item-grid span,
  .lead-mobile-item-head span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
  }

  .lead-mobile-field strong,
  .lead-mobile-item-grid strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.45;
  }

  .lead-mobile-field .phone-cell .muted {
    margin-top: 3px;
    font-size: 11px;
  }

  .lead-mobile-field .phone-line {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lead-mobile-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .lead-mobile-item-head strong {
    font-size: 13px;
  }

  .lead-mobile-item-head span {
    margin: 0;
  }

  .lead-mobile-item-grid {
    padding-top: 9px;
  }

  .lead-mobile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 12px 12px;
  }

  .lead-mobile-tags .tag {
    margin: 0;
  }

  .lead-mobile-actions {
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    background: rgba(248, 250, 252, 0.72);
  }

  .lead-mobile-actions .row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .lead-mobile-actions .row-actions button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
  }

  .lead-market-toolbar,
  .lead-market-toolbar.has-sale-destination {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
  }

  .lead-market-toolbar-actions {
    grid-column: auto;
  }

  .lead-market-table-wrap {
    display: none;
  }

  .lead-market-mobile-list {
    display: grid;
    gap: 10px;
  }

  .lead-market-mobile-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .lead-market-mobile-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .lead-market-mobile-select {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding-top: 2px;
  }

  .lead-market-mobile-title {
    flex: 1 1 auto;
  }

  .lead-market-mobile-card > header div {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .lead-market-mobile-card > header strong {
    overflow: hidden;
    color: var(--blue);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lead-market-mobile-card > header span,
  .lead-market-mobile-card > header time,
  .lead-market-mobile-description > span,
  .lead-market-mobile-prices > div > span:first-child {
    color: var(--muted);
    font-size: 11px;
  }

  .lead-market-mobile-card > header time {
    flex: 0 0 auto;
  }

  .lead-market-mobile-description {
    display: grid;
    gap: 4px;
    padding: 11px 12px 8px;
  }

  .lead-market-mobile-description strong {
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.45;
  }

  .lead-market-mobile-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 12px 12px;
  }

  .lead-market-mobile-prices > div {
    display: grid;
    gap: 4px;
  }

  .lead-market-mobile-prices strong {
    font-size: 13px;
  }

  .lead-market-mobile-images:not(:empty) {
    padding: 0 12px 12px;
  }

  .lead-market-pagination,
  .ecommerce-table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-market-pagination > div,
  .ecommerce-table-pagination > div {
    justify-content: flex-end;
  }
}
.finance-reimbursement-panel {
  display: grid;
  gap: 14px;
}

.finance-reimbursement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #dbe5f4;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7faff 0%, #fff 72%);
}

.finance-reimbursement-heading > div {
  display: grid;
  gap: 4px;
}

.finance-reimbursement-heading span,
.finance-reimbursement-heading p,
.finance-reimbursement-table small {
  color: #65748a;
}

.finance-reimbursement-heading h3,
.finance-reimbursement-heading p {
  margin: 0;
}

.finance-reimbursement-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.finance-reimbursement-metrics > div {
  display: grid;
  gap: 3px;
  padding: 14px 18px;
  border-right: 1px solid #e5ebf5;
}

.finance-reimbursement-metrics > div:last-child {
  border-right: 0;
}

.finance-reimbursement-metrics strong {
  font-size: 20px;
}

.finance-reimbursement-status-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.finance-reimbursement-status-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #d8e1ee;
  border-radius: 9px;
  background: #fff;
  color: #40516a;
}

.finance-reimbursement-status-tabs button.is-active {
  border-color: #4d69f6;
  background: #eef2ff;
  color: #3550d8;
}

.finance-reimbursement-status-tabs button span {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #edf1f7;
  text-align: center;
}

.finance-reimbursement-feedback,
.finance-reimbursement-readonly {
  padding: 10px 14px;
  border-radius: 8px;
  background: #eef5ff;
  color: #315cc7;
}

.finance-payroll-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  width: max-content;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #f7f9fc;
}

.finance-payroll-mode button {
  border: 0;
  border-radius: 7px;
  padding: 8px 18px;
  background: transparent;
  color: #58677c;
  font-weight: 700;
}

.finance-payroll-mode button.is-active {
  background: #fff;
  color: #315be8;
  box-shadow: 0 1px 5px rgba(26, 54, 93, 0.12);
}

.finance-payee-addbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #dbe5f2;
  border-top: 0;
  background: #f9fbfe;
}

.finance-payee-addbar label {
  display: grid;
  gap: 5px;
  min-width: 320px;
}

.finance-payee-table input[type="text"] {
  min-width: 130px;
  width: 100%;
}

.finance-payee-table th:first-child,
.finance-payee-table td:first-child {
  min-width: 150px;
}

.finance-payee-table tr.is-draft {
  background: #f2f6ff;
}

.finance-payee-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.finance-payee-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.finance-payroll-payment-table td small,
.finance-payee-table td small {
  display: block;
  margin-top: 3px;
  color: #7a8798;
}

.finance-payroll-payment-bar {
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 180px) minmax(220px, 1fr) minmax(230px, 1.2fr) auto;
}

.finance-payroll-payment-bar input[type="file"] {
  max-width: 260px;
}

.hr-payee-account {
  display: block;
  min-width: 180px;
  line-height: 1.45;
  color: #334155;
}

.hr-payee-account.is-missing {
  color: #c2410c;
}

@media (max-width: 1100px) {
  .finance-payroll-payment-bar {
    grid-template-columns: 1fr 1fr;
  }

  .finance-payee-addbar {
    align-items: stretch;
    flex-direction: column;
  }
}

.finance-reimbursement-feedback.success {
  background: #eaf8ef;
  color: #227447;
}

.finance-reimbursement-feedback.error {
  background: #fff0f0;
  color: #b83b3b;
}

.finance-reimbursement-table-wrap {
  max-height: 520px;
}

.finance-reimbursement-table th,
.finance-reimbursement-table td {
  vertical-align: middle;
  white-space: nowrap;
}

.finance-reimbursement-table td:nth-child(4) {
  min-width: 180px;
  white-space: normal;
}

.finance-reimbursement-table td strong,
.finance-reimbursement-table td small {
  display: block;
}

.finance-reimbursement-table input[type="text"] {
  min-width: 205px;
}

.finance-reimbursement-payment-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 180px minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cfdaec;
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 28px rgba(38, 57, 89, .12);
}

.finance-reimbursement-payment-bar > div,
.finance-reimbursement-payment-bar label {
  display: grid;
  gap: 5px;
}

@media (max-width: 960px) {
  .finance-reimbursement-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-reimbursement-payment-bar {
    grid-template-columns: 1fr 1fr;
  }
}

/* Historical leads stay isolated until an AI-qualified lead is accepted by a person. */
.ai-reactivation-panel {
  display: grid;
  gap: 14px;
}

.ai-reactivation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
}

.ai-reactivation-header h3,
.ai-reactivation-header p {
  margin: 0;
}

.ai-reactivation-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ai-reactivation-header p {
  margin-top: 5px;
  color: #68778b;
  font-size: 13px;
}

.ai-reactivation-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ai-reactivation-metrics > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.ai-reactivation-metrics span {
  color: #68778b;
  font-size: 13px;
}

.ai-reactivation-metrics strong {
  color: #172033;
  font-size: 22px;
}

.ai-reactivation-toolbar {
  display: grid;
  grid-template-columns: 190px minmax(320px, 520px) auto;
  align-items: end;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.ai-reactivation-toolbar label {
  display: grid;
  gap: 5px;
}

.ai-reactivation-toolbar label > span {
  color: #65758a;
  font-size: 12px;
}

.ai-reactivation-table-wrap {
  max-height: 610px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.ai-reactivation-table th,
.ai-reactivation-table td {
  vertical-align: middle;
}

.ai-reactivation-table .selection-column {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.ai-reactivation-table .selection-column input {
  width: 16px;
  height: 16px;
}

.ai-reactivation-table td:nth-child(2) {
  min-width: 128px;
}

.ai-reactivation-table td:nth-child(3) {
  min-width: 150px;
}

.ai-reactivation-table td:nth-child(4),
.ai-reactivation-table td:nth-child(5),
.ai-reactivation-table td:nth-child(6) {
  min-width: 190px;
  white-space: normal;
}

.ai-reactivation-table td:nth-child(7) {
  min-width: 150px;
}

.ai-reactivation-table td > span,
.ai-reactivation-table td > small {
  display: block;
}

.ai-reactivation-table td > small {
  margin-top: 4px;
  color: #7a8798;
  line-height: 1.4;
}

.ai-reactivation-match,
.ai-reactivation-status {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.ai-reactivation-match {
  color: #2f5fb6;
  background: #edf3ff;
}

.ai-reactivation-status.is-pending {
  color: #5b6575;
  background: #eef1f5;
}

.ai-reactivation-status.is-retry {
  color: #a85d00;
  background: #fff3dd;
}

.ai-reactivation-status.is-interested {
  color: #185cc8;
  background: #e8f1ff;
}

.ai-reactivation-status.is-transferred {
  color: #197149;
  background: #e6f7ef;
}

.ai-reactivation-status.is-closed {
  color: #9d4650;
  background: #fbecee;
}

.ai-reactivation-status-select {
  min-width: 145px;
}

.ai-reactivation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.ai-reactivation-selection-bar,
.ai-reactivation-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #bfd2ff;
  border-radius: 10px;
  color: #244d9b;
  background: #f2f6ff;
}

.ai-reactivation-selection-bar > div,
.ai-reactivation-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-reactivation-pagination {
  border-color: #dbe4f0;
  color: #68778b;
  background: #fff;
}

.ai-reactivation-call-preview {
  display: grid;
  gap: 14px;
}

.ai-reactivation-call-preview p {
  margin: 0;
}

.ai-reactivation-call-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-reactivation-call-summary > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}

.ai-reactivation-call-summary span {
  color: #68778b;
  font-size: 12px;
}

.ai-reactivation-call-summary strong {
  font-size: 24px;
}

.ai-reactivation-call-unavailable {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #f0d18d;
  border-radius: 10px;
  color: #805300;
  background: #fff8e8;
}

.ai-reactivation-call-unavailable span {
  color: #786846;
  font-size: 13px;
}

@media (max-width: 900px) {
  .ai-reactivation-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-reactivation-header-actions {
    justify-content: flex-start;
  }

  .ai-reactivation-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-reactivation-toolbar {
    grid-template-columns: 1fr;
  }

  .ai-reactivation-selection-bar,
  .ai-reactivation-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-reactivation-call-summary {
    grid-template-columns: 1fr;
  }
}
.customer-payee-confirmation-card {
  padding: 16px 18px;
  background: linear-gradient(135deg, #fffdf8, #f8f5ec);
  border: 1px solid #dfcf9f;
  border-radius: 10px;
}

.customer-payee-confirmation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.customer-payee-confirmation-heading > div {
  display: grid;
  gap: 3px;
}

.customer-payee-confirmation-heading strong {
  color: #302819;
  font-size: 16px;
}

.customer-payee-confirmation-heading span,
.customer-payee-confirmation-help,
.customer-payee-confirmation-number {
  color: #756b58;
  font-size: 12px;
}

.customer-payee-confirmation-status {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.customer-payee-confirmation-status.empty { color: #676d78; background: #eceff3; }
.customer-payee-confirmation-status.pending { color: #8a5a12; background: #fff0c9; }
.customer-payee-confirmation-status.confirmed { color: #0f7650; background: #dff5ea; }
.customer-payee-confirmation-status.expired { color: #ad3b30; background: #fde8e6; }
.customer-payee-confirmation-number { margin-top: 10px; }
.customer-payee-confirmation-help { margin: 8px 0 0; }
.customer-payee-confirmation-result { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; font-size: 13px; }
.customer-payee-confirmation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.customer-payee-confirmation-actions button { min-height: 34px; }
.customer-payee-confirmation-card .form-status { margin-top: 8px; }

.customer-payee-payout {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #d7dce5;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
}

.customer-payee-payout.pending { border-color: #efc776; background: #fffaf0; }
.customer-payee-payout.ready { border-color: #9eb5f0; background: #f6f8ff; }
.customer-payee-payout.processing { border-color: #8db6ef; background: #f4f8ff; }
.customer-payee-payout.unknown { border-color: #d7a65b; background: #fff8eb; }
.customer-payee-payout.paid { border-color: #87cfac; background: #f2fbf6; }
.customer-payee-payout.failed { border-color: #e5a39d; background: #fff6f5; }

.customer-payee-payout-summary {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(130px, 0.7fr) minmax(190px, 1.2fr);
  gap: 10px;
}

.customer-payee-payout-summary > div {
  display: grid;
  gap: 3px;
}

.customer-payee-payout-summary span,
.customer-payee-payout-message,
.customer-payee-payout-warning {
  color: #756b58;
  font-size: 12px;
}

.customer-payee-payout-summary strong { color: #302819; font-size: 14px; }
.customer-payout-totals870 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.customer-payout-totals870 > div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 10px; background: #f6f8ff; border-radius: 7px; }
.customer-payout-totals870 span, .customer-payout-totals870 small { color: #68738b; font-size: 12px; line-height: 1.5; }
.customer-payout-totals870 strong { font-size: 20px; color: #263657; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.customer-payout-plan-editor870 { margin: 12px 0; padding: 10px; border: 1px solid #dce3f0; border-radius: 7px; }
.customer-payout-plan-editor870 > summary { cursor: pointer; font-weight: 600; }
.customer-payout-plan-row870 { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, .5fr) auto; gap: 10px; align-items: end; margin: 10px 0; }
.customer-payout-plan-row870 label { display: grid; gap: 5px; }
.customer-payout-plan-row870 label > span { font-size: 12px; color: #68738b; }
.customer-payout-installments870 { margin-top: 12px; }
.customer-payout-installments870 .data-table { min-width: 0; table-layout: fixed; }
.customer-payout-installments870 th, .customer-payout-installments870 td { padding: 9px 7px; overflow-wrap: anywhere; white-space: normal; }
.customer-payout-installments870 th:first-child { width: 42px; }
.customer-payout-installments870 th:last-child { width: 142px; }
.customer-payout-installments870 td small { display: block; color: #68738b; margin-top: 4px; }
.customer-payout-installments870 tr.is-selected { background: #f0f3ff; }
.customer-payout-installments870 td button { min-height: 30px; margin: 0 4px 4px 0; padding: 5px 8px; }
.customer-payout-current870 { margin: 16px 0 0; font-size: 14px; color: #263657; }
.customer-alipay-payment871 { width: 100%; max-width: 1000px; padding: 22px 24px; background: #fff; border-color: #e0e6ee; }
.customer-alipay-heading871 { padding-bottom: 16px; border-bottom: 1px solid #dce3ed; }
.customer-alipay-heading871 h3 { margin: 0 0 7px; font-size: 30px; line-height: 1.3; color: #151c28; }
.customer-alipay-heading871 p { margin: 0; font-size: 16px; color: #707888; }
.customer-alipay-draft-summary871 { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 20px 0; border-bottom: 1px solid #dce3ed; }
.customer-alipay-draft-summary871 > span:first-child { font-size: 20px; font-weight: 600; color: #202734; }
.customer-alipay-draft-summary871 > strong { color: #2563eb; font-size: 36px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.customer-alipay-draft-summary871 > span:last-child { border-left: 1px solid #dce3ed; padding-left: 20px; color: #707888; font-size: 16px; }
.customer-alipay-editor871 { margin-top: 18px; }
.customer-alipay-editor871 > summary { cursor: pointer; color: #2563eb; padding: 6px 0; font-weight: 600; }
.customer-alipay-editor-heading871 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.customer-alipay-editor-heading871 h4 { margin: 0; color: #171f2b; font-size: 23px; }
.customer-alipay-editor871 .text-button { color: #2563eb; }
.customer-alipay-editor871 button { font-size: 16px; min-height: 44px; }
.customer-alipay-columns871, .customer-alipay-editor871 .customer-payout-plan-row870 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(140px, 1fr) 70px; column-gap: 28px; align-items: center; }
.customer-alipay-columns871 { padding: 12px 16px; background: #f1f4f8; color: #202734; font-size: 16px; font-weight: 600; border-radius: 7px 7px 0 0; }
.customer-alipay-editor871 .customer-payout-plan-row870 { margin: 0; min-height: 78px; padding: 16px; border-bottom: 1px solid #e1e6ee; }
.customer-alipay-editor871 .customer-payout-plan-row870 label { min-width: 0; }
.customer-alipay-editor871 .customer-payout-plan-row870 label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.customer-alipay-editor871 .customer-payout-plan-row870 input, .customer-alipay-editor871 .customer-payout-plan-row870 select { width: 100%; min-width: 0; font-size: 18px; min-height: 46px; }
.customer-alipay-editor871 .customer-payout-plan-row870 input { text-align: right; font-variant-numeric: tabular-nums; }
.customer-alipay-editor871 .customer-payout-plan-row870 > button { justify-self: start; font-size: 16px; padding: 8px 0; }
.customer-alipay-limit871 { margin: 15px 0 22px; color: #747d8c; font-size: 15px; }
.customer-alipay-footer871 { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid #dce3ed; }
.customer-alipay-footer871 > span { color: #747d8c; font-size: 15px; }
.customer-alipay-footer871 > div { display: flex; gap: 12px; flex-shrink: 0; }
.customer-alipay-footer871 button { min-height: 44px; font-size: 16px; }
.customer-alipay-footer871 .primary-button { background: #2563eb; border-color: #2563eb; color: #fff; }
.customer-alipay-footer871 .primary-button:hover { background: #1d4ed8; border-color: #1d4ed8; }
.customer-alipay-saved-title871 { margin: 20px 0 8px; font-size: 16px; color: #263657; }
.customer-alipay-payment871[data-payout-mode872="single"] [data-payee-confirmation-action="payout-plan-add"],
.customer-alipay-payment871[data-payout-mode872="single"] [data-payee-confirmation-action="payout-plan-remove"],
.customer-alipay-payment871[data-payout-mode872="single"] [data-payee-confirmation-action="payout-plan-save"],
.customer-alipay-payment871[data-payout-mode872="single"] .customer-alipay-columns871 > span:last-child,
.customer-alipay-payment871[data-payout-mode872="multi"] [data-payee-confirmation-action="payout-single-next872"] { display: none; }
.customer-alipay-payment871[data-payout-mode872="single"] .customer-alipay-columns871,
.customer-alipay-payment871[data-payout-mode872="single"] .customer-payout-plan-row870 { grid-template-columns: minmax(0, 1.35fr) minmax(140px, 1fr); }
.customer-alipay-editor-heading871 > div { display: flex; align-items: center; gap: 12px; }
@media (max-width: 680px) {
  .customer-alipay-payment871 { padding: 16px 12px; }
  .customer-alipay-draft-summary871 { gap: 12px; }
  .customer-alipay-draft-summary871 > strong { font-size: 25px; }
  .customer-alipay-columns871, .customer-alipay-editor871 .customer-payout-plan-row870 { grid-template-columns: minmax(0, 1fr) minmax(100px, .65fr) 38px; column-gap: 10px; padding-left: 8px; padding-right: 8px; }
  .customer-alipay-columns871 { font-size: 12px; }
  .customer-alipay-footer871 { flex-wrap: wrap; }
  .customer-alipay-footer871 > div { width: 100%; justify-content: flex-end; }
}
@media (max-width: 680px) {
  .customer-payout-totals870 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-payout-plan-row870 { grid-template-columns: minmax(0, 1fr) minmax(100px, .65fr) auto; gap: 6px; }
  .customer-payout-installments870 .data-table { min-width: 700px; }
}
.customer-payee-payout-message { margin: 10px 0 0; line-height: 1.55; }
.customer-payee-payout-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.customer-payee-payout-actions button { min-height: 34px; }

.customer-payee-payout-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d9cda9;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
}

.customer-payee-payout-form[hidden] { display: none; }
.customer-payee-payout-form > label:not(.customer-payee-payout-confirm) { display: grid; gap: 6px; }
.customer-payee-payout-confirm { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.customer-payee-payout-confirm input { width: auto; }
.customer-payee-payout-warning { grid-column: 1 / -1; line-height: 1.5; }
.customer-payee-payout-message.security-error,
.customer-payee-payout-warning.security-error { color: #b42318; }

.customer-payee-payout-security-policy,
.customer-payee-payout-password-setup {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d5def7;
  border-radius: 8px;
  background: #f7f9ff;
}

.customer-payee-payout-security-policy { display: grid; gap: 4px; }
.customer-payee-payout-security-policy strong,
.customer-payee-payout-password-setup > strong { font-size: 14px; color: #25345c; }
.customer-payee-payout-security-policy span { color: #5d6780; font-size: 12px; line-height: 1.5; }
.customer-payee-payout-password-setup {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
  gap: 10px;
  align-items: end;
}
.customer-payee-payout-password-setup > strong { grid-column: 1 / -1; }
.customer-payee-payout-password-setup label,
.customer-payee-payout-otp label { display: grid; gap: 6px; }

.customer-payee-payout-execution {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2c98d;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(300px, 1.3fr) auto;
  align-items: end;
  gap: 10px;
}

.customer-payee-payout-execution.ready { border-color: #9fb5ec; }
.customer-payee-payout-execution.blocked { border-color: #e4cf9c; }
.customer-payee-payout-readiness { grid-column: 1 / -1; display: grid; gap: 3px; }
.customer-payee-payout-readiness strong { font-size: 14px; }
.customer-payee-payout-readiness span { color: #756b58; font-size: 12px; line-height: 1.5; }
.customer-payee-payout-execution > label:not(.customer-payee-payout-confirm) { display: grid; gap: 6px; }
.customer-payee-payout-execution .customer-payee-payout-confirm { align-self: end; }
.customer-payee-payout-otp {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(170px, .6fr);
  gap: 10px;
  align-items: end;
  padding: 11px;
  border: 1px dashed #f0b85b;
  border-radius: 8px;
  background: #fffaf0;
}
.customer-payee-payout-otp > div { display: grid; gap: 4px; }
.customer-payee-payout-otp > div span { color: #756b58; font-size: 12px; }

@media (max-width: 720px) {
  .customer-payee-confirmation-heading { display: grid; }
  .customer-payee-confirmation-status { justify-self: start; }
  .customer-payee-confirmation-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .customer-payee-confirmation-actions button { width: 100%; }
  .customer-payee-payout-summary,
  .customer-payee-payout-form,
  .customer-payee-payout-execution,
  .customer-payee-payout-password-setup,
  .customer-payee-payout-otp { grid-template-columns: 1fr; }
  .customer-payee-payout-actions button,
  .customer-payee-payout-form button,
  .customer-payee-payout-execution button { width: 100%; }
}

.contract-decision-card {
  padding: 16px 18px;
  border: 1px solid #cfd8e8;
  border-radius: 12px;
  background: #f8fafc;
}

.contract-decision-card.standard {
  border-color: #b9decf;
  background: linear-gradient(135deg, #f7fcfa, #f0faf6);
}

.contract-decision-card.formal {
  border-color: #e3c9a2;
  background: linear-gradient(135deg, #fffaf3, #fff5e8);
}

.contract-decision-heading,
.contract-rule-section-heading,
.contract-rule-form-footer,
.formal-contract-direction-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.contract-decision-heading > div:first-child,
.contract-rule-section-heading > div,
.formal-contract-direction-card > div {
  display: grid;
  gap: 4px;
}

.contract-decision-heading > div:first-child > strong,
.contract-rule-section-heading h3,
.formal-contract-direction-card strong {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
}

.contract-decision-heading > div:first-child > span,
.contract-rule-section-heading p,
.formal-contract-direction-card span:not(.pill) {
  margin: 0;
  color: #697386;
  font-size: 12px;
}

.contract-decision-result {
  min-width: 150px;
  padding: 9px 12px;
  border-radius: 9px;
  display: grid;
  gap: 2px;
  text-align: right;
  background: #e9edf4;
  color: #596275;
}

.contract-decision-result span { font-size: 11px; }
.contract-decision-result strong { font-size: 14px; }
.contract-decision-result.standard { color: #0f7650; background: #dcf4e9; }
.contract-decision-result.formal { color: #975315; background: #ffebcf; }

.contract-decision-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.contract-decision-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #d9e0eb;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.contract-decision-option:has(input:checked) {
  border-color: #7894ef;
  box-shadow: 0 0 0 2px rgba(62, 99, 244, 0.1);
}

.contract-decision-option.disabled { opacity: .68; }
.contract-decision-option input { width: 17px; height: 17px; margin: 0; }
.contract-decision-option-copy { display: grid; gap: 2px; min-width: 0; }
.contract-decision-option-copy strong { color: #283246; font-size: 13px; }
.contract-decision-option-copy small { color: #7b8494; font-size: 11px; }

.contract-decision-outcome {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.contract-decision-outcome.standard { color: #0f7650; background: #dff5ea; }
.contract-decision-outcome.formal { color: #975315; background: #ffead0; }
.contract-decision-result-description { margin: 10px 0 0; color: #5d6675; font-size: 12px; }

.formal-contract-direction-card {
  padding: 14px 18px;
  border: 1px solid #dfc49d;
  border-radius: 10px;
  background: #fff9ef;
}

.contract-rule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, .85fr);
  gap: 18px;
  align-items: start;
}

.contract-rule-workspace {
  padding: 0;
  overflow: hidden;
}

.contract-rule-workspace-tabs {
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 14px 16px 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.contract-rule-workspace-tabs .backend-register-tab {
  flex: 0 0 auto;
  min-width: 172px;
}

.contract-rule-workspace-content {
  padding: 16px;
}

.contract-rule-workspace-pane {
  min-width: 0;
}

.contract-rule-list-panel,
.contract-rule-form {
  padding: 16px;
  border: 1px solid #dde3ed;
  border-radius: 11px;
  background: #fff;
}

.contract-rule-section-heading { margin-bottom: 14px; }
.contract-rule-section-heading > span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #536174;
  background: #eef2f7;
  font-size: 12px;
  white-space: nowrap;
}

.contract-rule-table td:first-child { min-width: 260px; }
.contract-rule-table tr.selected td { background: #f2f6ff; }
.contract-rule-actions { white-space: nowrap; }
.contract-rule-actions button {
  border: 0;
  padding: 4px 7px;
  color: #315bd8;
  background: transparent;
  cursor: pointer;
}
.contract-rule-actions button.danger-text { color: #c43c32; }

.contract-rule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contract-rule-fields > label { display: grid; gap: 6px; }
.contract-rule-fields > label.full { grid-column: 1 / -1; }
.contract-rule-form-footer { align-items: center; margin-top: 16px; }
.contract-rule-form-footer .form-status { flex: 1; }

.payee-template-form {
  display: grid;
  gap: 18px;
}

.payee-template-intro,
.payee-template-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.payee-template-intro h3,
.payee-template-intro p,
.payee-template-footer p {
  margin: 0;
}

.payee-template-intro h3 {
  color: #1f2937;
  font-size: 16px;
}

.payee-template-intro p,
.payee-template-footer p {
  margin-top: 5px;
  color: #697386;
  font-size: 12px;
}

.payee-template-version {
  min-width: 210px;
  padding: 10px 12px;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  display: grid;
  gap: 3px;
  color: #657083;
  background: #f7f9fc;
  font-size: 11px;
}

.payee-template-version strong {
  color: #315bd8;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.payee-template-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dde3ed;
  border-radius: 11px;
  background: #fff;
}

.payee-template-fields > label {
  display: grid;
  gap: 6px;
}

.payee-template-fields > label.full { grid-column: 1 / -1; }
.payee-template-footer { align-items: center; }
.payee-template-footer .form-status { flex: 1; text-align: right; }

@media (max-width: 960px) {
  .contract-rule-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .contract-decision-heading,
  .formal-contract-direction-card { display: grid; }
  .contract-decision-result { min-width: 0; text-align: left; }
  .contract-decision-options,
  .contract-rule-fields,
  .payee-template-fields { grid-template-columns: 1fr; }
  .payee-template-intro,
  .payee-template-footer { display: grid; }
  .payee-template-version { min-width: 0; }
  .payee-template-footer .form-status { text-align: left; }
  .contract-decision-option { grid-template-columns: auto minmax(0, 1fr); }
  .contract-decision-outcome { grid-column: 2; justify-self: start; }
  .contract-rule-workspace-tabs { padding-inline: 10px; }
  .contract-rule-workspace-content { padding: 10px; }
  .recycle-item-field-grid > .recycle-item-field { grid-column: 1 / -1; }
}

.call-center-config-panel {
  display: grid;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  gap: 16px;
}

.call-center-config-form {
  display: grid;
  width: 100%;
  min-width: 0;
}

.call-center-config-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.call-center-config-heading h3,
.call-center-config-heading p,
.call-center-app-card h4,
.call-center-app-card footer {
  margin: 0;
}

.call-center-plan-summary {
  min-width: 210px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #cdd9ff;
  border-radius: 12px;
  color: #315bd8;
  background: #f4f7ff;
  text-align: right;
}

.call-center-plan-summary span {
  color: #697386;
  font-size: 12px;
}

.call-center-route-note {
  margin: 0;
}

.call-center-app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.call-center-app-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe3f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(47, 72, 128, 0.05);
}

.call-center-app-card header,
.call-center-app-card header > div,
.call-center-app-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.call-center-app-card header > div {
  justify-content: flex-start;
}

.call-center-edition-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #315bd8;
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 700;
}

.call-center-edition-badge.is-advanced {
  color: #8a4b08;
  background: #fff0d8;
}

.call-center-config-panel .pill.blue {
  color: #315bd8;
  background: #eaf0ff;
}

.call-center-config-panel .pill.orange {
  color: #9a5b0a;
  background: #fff1dc;
}

.call-center-app-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.call-center-app-card footer {
  align-items: flex-start;
  color: #697386;
  font-size: 12px;
}

@media (max-width: 900px) {
  .call-center-app-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .call-center-config-heading,
  .call-center-app-card header,
  .call-center-app-card footer { display: grid; }
  .call-center-plan-summary { min-width: 0; text-align: left; }
  .call-center-app-fields { grid-template-columns: 1fr; }
}

.ykt-integration-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #cfdaf6;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8faff 0%, #fff 180px);
}

.ykt-integration-heading,
.ykt-integration-heading > div,
.ykt-heading-line,
.ykt-workspace-card > header,
.ykt-workspace-card > header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ykt-integration-heading > div,
.ykt-workspace-card > header > div {
  justify-content: flex-start;
}

.ykt-integration-heading h3,
.ykt-integration-heading p,
.ykt-workspace-card h4 {
  margin: 0;
}

.ykt-heading-line {
  justify-content: flex-start;
}

.ykt-environment-badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #315bd8;
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 700;
}

.ykt-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ykt-status-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #dce4f2;
  border-radius: 10px;
  background: #fff;
}

.ykt-status-grid > div > span:first-child {
  color: #667085;
  font-size: 13px;
}

.ykt-privacy-warning {
  margin: 0;
}

.ykt-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.ykt-workspace-card {
  display: grid;
  min-width: 0;
  gap: 13px;
  padding: 15px;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(49, 91, 216, 0.04);
}

.ykt-workspace-card > header {
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f7;
}

.ykt-workspace-card > header small {
  max-width: 48%;
  color: #697386;
  text-align: right;
}

.ykt-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: #315bd8;
  font-size: 13px;
  font-weight: 800;
}

.ykt-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ykt-photo-field {
  align-content: start;
}

.ykt-photo-compression-status {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.ykt-photo-compression-status.is-processing {
  color: #315bd8;
}

.ykt-photo-compression-status.is-ready {
  color: #15803d;
}

.ykt-photo-compression-status.is-error {
  color: #c62828;
}

.ykt-field-wide {
  grid-column: 1 / -1;
}

.ykt-consent-field {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #f1d5a6;
  border-radius: 9px;
  background: #fffaf0;
}

.ykt-consent-field input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.ykt-consent-field span {
  color: #6b4c1c;
  font-size: 13px;
}

.ykt-query-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 11px;
  border-radius: 10px;
  background: #f7f9fc;
}

.ykt-query-box > strong {
  grid-column: 1 / -1;
  min-height: 18px;
  color: #315bd8;
  font-size: 13px;
}

.ykt-record-list {
  display: grid;
  max-height: 286px;
  overflow: auto;
  border: 1px solid #edf1f7;
  border-radius: 10px;
}

.ykt-record-row,
.ykt-binding-row {
  display: grid;
  grid-template-columns: 1.15fr .8fr 1.2fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f7;
}

.ykt-record-row:last-child,
.ykt-binding-row:last-child {
  border-bottom: 0;
}

.ykt-record-row > div,
.ykt-binding-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ykt-record-row span,
.ykt-record-row small,
.ykt-binding-row span,
.ykt-binding-row small {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ykt-binding-row {
  grid-template-columns: 1.1fr 1fr .8fr auto;
}

[data-ykt-binding-manager] .ykt-record-list {
  max-height: 620px;
}

.ykt-binding-row .ykt-failure-detail {
  white-space: normal;
  overflow-wrap: anywhere;
}

.ykt-record-row small.ykt-failure-detail {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.ykt-real-name-history { display: grid; grid-column: 1 / -1; gap: 12px; min-width: 0; }
.ykt-real-name-history-heading { display: flex; align-items: center !important; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ykt-real-name-history-heading h4 { margin: 0; }
.ykt-real-name-history-heading p { margin: 5px 0 0; color: #667085; font-size: 12px; }
.ykt-real-name-search { display: grid; gap: 6px; color: #536277; font-size: 13px; }
.ykt-real-name-history-heading .ykt-real-name-search { width: min(380px, 100%); max-width: 100%; min-width: 0; }
.ykt-real-name-search input { width: 100%; min-width: 0; min-height: 40px; }
.ykt-real-name-count { margin: 0 0 8px; color: #667085; font-size: 12px; line-height: 1.6; }
.ykt-real-name-table-wrap { min-width: 0; max-width: 100%; max-height: 510px; overflow: auto; border: 1px solid #edf1f7; border-radius: 10px; }
.ykt-real-name-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.ykt-real-name-table .ykt-real-name-column-employee { width: 28%; }
.ykt-real-name-table .ykt-real-name-column-receipt { width: 21%; }
.ykt-real-name-table .ykt-real-name-column-audit { width: 18%; }
.ykt-real-name-table .ykt-real-name-column-time { width: 21%; }
.ykt-real-name-table .ykt-real-name-column-details { width: 12%; }
.ykt-real-name-table th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; color: #536277; font-size: 12px; font-weight: 600; }
.ykt-real-name-table th, .ykt-real-name-table td { padding: 14px 15px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ykt-real-name-table tbody tr:last-child td { border-bottom: 0; }
.ykt-real-name-identity { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
.ykt-real-name-identity > div { display: grid; gap: 4px; min-width: 0; }
.ykt-real-name-identity strong { color: #1f2937; font-size: 14px; }
.ykt-real-name-identity > div > span { color: #667085; font-size: 12px; }
.ykt-real-name-identity .ykt-environment-badge { flex-shrink: 0; }
.ykt-real-name-status { display: inline-block; padding: 4px 9px; border-radius: 6px; color: #667085; background: #f1f4f8; font-size: 12px; font-weight: 600; line-height: 1.6; }
.ykt-real-name-record .ykt-receipt-confirmed, .ykt-real-name-record .ykt-audit-approved { color: #15803d; background: #eef9f2; }
.ykt-real-name-record .ykt-receipt-unconfirmed { color: #98670b; }
.ykt-real-name-status.ykt-receipt-unconfirmed { background: #fff7e8; }
.ykt-real-name-record .ykt-audit-rejected { color: #c62828; background: #fff0ef; }
.ykt-real-name-record small { display: block; margin-top: 6px; color: #667085; font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.ykt-real-name-record .ykt-real-name-scope-warning { color: #98670b; }
.ykt-real-name-record .ykt-failure-detail { color: #b5472a; }
.ykt-real-name-time { color: #536277; font-size: 12px; line-height: 1.8; }
.ykt-real-name-details { min-width: 0; min-height: 32px; padding: 4px 0; border: 0; background: transparent; color: #315bd8; font-size: 12px; cursor: pointer; }
.ykt-real-name-details:focus-visible, .ykt-real-name-table-wrap:focus-visible { outline: 2px solid #315bd8; outline-offset: 3px; border-radius: 4px; }
.ykt-real-name-table .ykt-real-name-detail-row[hidden] { display: none; }
.ykt-real-name-table .ykt-real-name-detail-row > td { padding: 14px 18px; background: #f8fafc; }
.ykt-real-name-evidence { color: #667085; font-size: 12px; line-height: 1.7; }
.ykt-real-name-evidence p { margin: 0 0 8px; }
.ykt-real-name-evidence dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 0; }
.ykt-real-name-evidence dt { color: #536277; }
.ykt-real-name-evidence dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.ykt-real-name-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ykt-real-name-pagination span { color: #667085; font-size: 12px; }
.ykt-real-name-pagination button { min-height: 40px; }
@media (max-width: 760px) {
  .ykt-real-name-table colgroup, .ykt-real-name-table thead { display: none; }
  .ykt-real-name-table, .ykt-real-name-table tbody, .ykt-real-name-table .ykt-real-name-record { display: block; width: 100%; }
  .ykt-real-name-table .ykt-real-name-record { padding: 10px 12px; border-bottom: 1px solid #edf1f7; }
  .ykt-real-name-table .ykt-real-name-record:last-child { border-bottom: 0; }
  .ykt-real-name-table td { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 5px 8px; padding: 7px 0; border: 0; }
  .ykt-real-name-table td::before { content: attr(data-label); color: #667085; font-size: 12px; line-height: 1.8; }
  .ykt-real-name-table td > * { grid-column: 2; min-width: 0; }
  .ykt-real-name-table td > .ykt-real-name-status { justify-self: start; }
  .ykt-real-name-table td > small { margin: 0; }
  .ykt-real-name-table-wrap { max-height: 600px; }
  .ykt-real-name-table .ykt-real-name-detail-row:not([hidden]) { display: block; }
  .ykt-real-name-table .ykt-real-name-detail-row > td { display: block; padding: 14px 12px; }
  .ykt-real-name-table .ykt-real-name-detail-row > td::before { content: none; }
  .ykt-real-name-evidence dl { grid-template-columns: minmax(0, 1fr); }
}

.ykt-binding-row.is-active {
  background: #f3f7ff;
}

.ykt-middle-number strong {
  color: #1748c7;
  font-size: 18px;
  letter-spacing: .04em;
}

.ykt-empty-state {
  padding: 18px;
  border: 1px dashed #d8e0ec;
  border-radius: 10px;
  color: #7a8496;
  background: #fafbfc;
  text-align: center;
}

.ykt-call-record-card {
  grid-column: 1 / -1;
}

.ykt-call-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.ykt-call-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.ykt-call-table th,
.ykt-call-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
  white-space: nowrap;
}

.ykt-call-table th {
  color: #667085;
  background: #f8fafc;
  font-size: 12px;
}

.ykt-recording-player {
  display: grid;
  gap: 14px;
  min-width: min(560px, 100%);
}

.ykt-recording-player audio {
  width: 100%;
}

/* v683: approved first design; scoped to frontend fixed-X surfaces only. */
.phone-cell .ykt-lead-call-button { margin-top: 8px; min-height: 34px; padding: 6px 12px; font-size: 13px; }
.ykt-fixed-number-workspace { min-width: 0; }
.ykt-fixed-number-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.ykt-fixed-number-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); min-height: 46px; padding: 10px 18px; font-size: 15px; }
.ykt-fixed-number-tabs button.is-active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 700; }
.ykt-fixed-number-tabs button:focus-visible, .ykt-frontend-fixed-card button:focus-visible, .ykt-frontend-business-dial :is(a, button):focus-visible { outline: 3px solid #93b4ff; outline-offset: 3px; }
.ykt-frontend-fixed-card { padding: 20px; }
.ykt-frontend-fixed-card > header { margin-bottom: 16px; }
.ykt-frontend-fixed-card > header > div { display: grid; gap: 8px; }
.ykt-frontend-fixed-card > header small { max-width: none; text-align: left; }
.ykt-frontend-fixed-card h4 { font-size: 19px; }
.ykt-frontend-account-note, .ykt-frontend-fixed-help { border: 1px solid #cfddff; background: #f2f6ff; border-radius: 6px; color: #334865; padding: 14px 16px; line-height: 1.7; }
.ykt-frontend-account-note { font-weight: 600; margin-bottom: 18px; }
.ykt-frontend-account-note small { display: block; color: #64748b; font-weight: 400; margin-top: 4px; }
.ykt-frontend-fixed-help { margin: 18px 0 0; font-size: 13px; }
.ykt-frontend-fixed-table { min-width: 840px; }
.ykt-frontend-fixed-table th { padding: 14px; color: #536277; background: #f7f9fc; }
.ykt-frontend-fixed-table td { padding: 18px 14px; vertical-align: middle; border-bottom: 1px solid #e9eef5; }
.ykt-frontend-fixed-table td small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.ykt-frontend-fixed-table td:nth-child(3) { width: 26%; min-width: 210px; }
.ykt-frontend-fixed-table input { min-height: 40px; width: 100%; }
.ykt-frontend-fixed-table input:disabled { background: #f4f6f8; color: #667085; cursor: not-allowed; }
#formModal:has([data-ykt-frontend-business-dial]) .modal-panel { width: min(560px, 100%); border-radius: 9px; }
#formModal:has([data-ykt-frontend-business-dial]) .modal-header { min-height: 64px; padding: 16px 18px; }
#formModal:has([data-ykt-frontend-business-dial]) .modal-header h2 { font-size: 20px; }
#formModal:has([data-ykt-frontend-business-dial]) .modal-body { padding: 16px 18px 18px; }
.ykt-frontend-business-dial { gap: 14px; }
.ykt-frontend-dial-number { display: grid; justify-items: center; gap: 10px; padding: 22px 10px; border: 1px solid #cdd9ff; border-radius: 6px; background: #f3f6ff; text-align: center; }
.ykt-frontend-dial-number span, .ykt-frontend-dial-number small { color: #65738b; font-size: 13px; line-height: 1.6; }
.ykt-frontend-dial-number > strong { font-size: clamp(30px, 6vw, 42px); line-height: 1.2; color: #2459eb; letter-spacing: 1px; overflow-wrap: anywhere; }
.ykt-frontend-business-dial .ykt-business-dial-parties { gap: 10px; }
.ykt-frontend-business-dial .ykt-business-dial-parties > div { border-radius: 6px; padding: 12px 14px; }
.ykt-frontend-business-dial .ykt-business-dial-parties strong { font-size: 16px; }
.ykt-frontend-dial-note { border: 1px solid #dfe5ee; border-radius: 6px; padding: 13px 15px; background: #f8fafc; line-height: 1.7; }
.ykt-frontend-dial-note strong { font-size: 14px; }
.ykt-frontend-dial-note p { margin: 4px 0 0; font-size: 13px; color: #64717d; }
.ykt-frontend-business-dial .ykt-business-dial-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin: 2px 0 0; }
.ykt-frontend-business-dial .ykt-business-dial-actions :is(a, button) { min-height: 44px; padding: 10px 14px; white-space: nowrap; }
.ykt-frontend-switch-note { padding: 13px 15px; border: 1px solid #f5d49c; border-radius: 6px; background: #fffaf1; color: #92520d; font-size: 13px; line-height: 1.7; }
.ykt-frontend-business-dial a[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.ykt-frontend-confirm-backdrop { position: fixed; inset: 0; z-index: 260; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgb(20 32 50 / 42%); }
.ykt-frontend-confirm-dialog { width: min(460px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.ykt-frontend-confirm-dialog h3 { margin: 0 0 12px; font-size: 19px; }
.ykt-frontend-confirm-dialog p { margin: 0 0 18px; color: #536277; line-height: 1.8; font-size: 14px; }
.ykt-frontend-confirm-dialog .form-actions { justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ykt-frontend-confirm-dialog button { min-height: 44px; }
.ykt-frontend-ended-check { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #f5d49c; border-radius: 6px; background: #fffaf1; line-height: 1.7; }
.ykt-frontend-ended-check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--blue); }
.ykt-frontend-confirm-dialog :is(button, input):focus-visible { outline: 3px solid #93b4ff; outline-offset: 3px; }
@media (max-width: 640px) {
  .ykt-frontend-fixed-card { padding: 12px; }
  .ykt-frontend-business-dial .ykt-business-dial-parties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ykt-frontend-business-dial .ykt-business-dial-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ykt-frontend-business-dial .ykt-business-dial-button { grid-column: 1 / -1; }
  .phone-cell .ykt-lead-call-button { min-height: 44px; }
  .ykt-fixed-number-tabs button { min-height: 48px; }
  .ykt-frontend-fixed-card button { min-height: 44px; }
}

.ykt-business-dial {
  display: grid;
  gap: 16px;
}

.ykt-business-dial-status {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px;
  border: 1px solid #cbd8ff;
  border-radius: 14px;
  background: linear-gradient(145deg, #f7f9ff, #eef3ff);
  text-align: center;
}

.ykt-business-dial-status span,
.ykt-business-dial-status small,
.ykt-business-dial-parties span {
  color: #667085;
}

.ykt-business-dial-status strong {
  color: #3159e8;
  font-size: clamp(30px, 7vw, 46px);
  letter-spacing: 2px;
}

.ykt-business-dial-parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ykt-business-dial-parties > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e0e6f2;
  border-radius: 10px;
  background: #fff;
}

.ykt-business-dial-actions {
  align-items: stretch;
}

.ykt-business-dial-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  text-decoration: none;
}

@media (max-width: 980px) {
  .ykt-status-grid,
  .ykt-workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ykt-workspace-card { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .ykt-integration-panel { padding: 12px; }
  .ykt-integration-heading,
  .ykt-workspace-card > header { display: grid; }
  .ykt-status-grid,
  .ykt-form-grid { grid-template-columns: 1fr; }
  .ykt-field-wide { grid-column: auto; }
  .ykt-workspace-card > header small { max-width: none; text-align: left; }
  .ykt-record-row,
  .ykt-binding-row { grid-template-columns: 1fr; }
  .ykt-binding-row .secondary-button { justify-self: start; }
  .ykt-business-dial-parties { grid-template-columns: 1fr; }
  .ykt-business-dial-actions { display: grid; grid-template-columns: 1fr; }
}

/* Knowledge workbenches: queue, source/curation and retained preview. */
.ai-knowledge-flow-container { width: 100%; min-width: 0; }
.ai-knowledge-stages { display: flex; align-items: center; gap: 16px; padding: 8px 14px; border: 1px solid #dde4ea; border-radius: 8px; background: #fff; }
.ai-knowledge-stages .backend-register-tab { border: 0; border-radius: 4px; background: transparent; padding: 8px 12px; color: #64717d; }
.ai-knowledge-stages .backend-register-tab.is-active { color: #2563eb; background: #eaf1ff; }
.ai-knowledge-stages > span { color: #64717d; font-size: 12px; margin-left: auto; }
.ai-knowledge-flow .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ai-knowledge-flow { display: flex; flex-direction: column; height: calc(100dvh - 270px); min-height: 580px; max-height: 850px; border: 1px solid #dde4ea; border-radius: 8px; background: #fff; overflow: hidden; color: #16212b; font-size: 14px; }
.ai-knowledge-flow h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.4; }
.ai-knowledge-flow h4 { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.ai-knowledge-flow p { line-height: 1.65; margin: 8px 0; }
.ai-knowledge-flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid #dde4ea; }
.ai-knowledge-flow-toolbar h3 { margin-bottom: 3px; }
.ai-knowledge-flow-toolbar p { color: #64717d; margin: 0; font-size: 13px; }
.ai-knowledge-flow-filters { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ai-knowledge-flow-filters input { width: 210px; }
.ai-knowledge-flow-filters select { width: 120px; }
.ai-knowledge-flow-columns { display: grid; grid-template-columns: 24% minmax(0, 1fr) 32%; min-height: 0; flex: 1; }
.ai-knowledge-flow-queue, .ai-knowledge-flow-editor, .ai-knowledge-flow-preview { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; overflow-wrap: anywhere; }
.ai-knowledge-flow-queue { padding: 10px 12px; border-right: 1px solid #dde4ea; }
.ai-knowledge-flow-preview { border-left: 1px solid #dde4ea; }
.ai-knowledge-queue-count { font-size: 13px; color: #64717d; padding: 0 6px; }
.ai-knowledge-queue-item { display: flex; flex-direction: column; gap: 6px; width: 100%; border: 0; border-bottom: 1px solid #e6ebf0; border-radius: 0; background: #fff; padding: 16px 10px; text-align: left; color: #16212b; cursor: pointer; }
.ai-knowledge-queue-item:hover { background: #f7f9fc; }
.ai-knowledge-queue-item.is-selected { background: #eaf1ff; box-shadow: inset 3px 0 #2563eb; border-radius: 6px; }
.ai-knowledge-queue-item strong { font-size: 14px; line-height: 1.55; }
.ai-knowledge-queue-item > span, .ai-knowledge-queue-item small { color: #64717d; font-size: 12px; line-height: 1.55; }
.ai-knowledge-queue-item small { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.ai-knowledge-curation-point { padding: 6px 0; border-bottom: 1px solid #dde4ea; }
.ai-knowledge-curation-point h4 { margin-bottom: 6px; }
.ai-knowledge-original { background: #f5f7fa; border-radius: 4px; padding: 6px 8px; }
.ai-knowledge-original span { color: #64717d; }
.ai-knowledge-original p { margin: 0; font-size: 13px; line-height: 1.55; }
.ai-knowledge-choices, .ai-knowledge-destinations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; padding: 0; margin: 10px 0; gap: 5px; min-width: 0; }
.ai-knowledge-choices label, .ai-knowledge-destinations label { display: flex; align-items: center; gap: 5px; padding: 6px 3px; cursor: pointer; font-size: 13px; color: #334155; line-height: 1.4; }
.ai-knowledge-choices { margin: 6px 0; }
.ai-knowledge-choices label { min-height: 30px; }
.ai-knowledge-flow input[type="radio"] { width: 15px; height: 15px; min-height: 15px; padding: 0; margin: 0; accent-color: #2563eb; flex-shrink: 0; }
.ai-knowledge-choices .is-selected { color: #2563eb; font-weight: 600; }
.ai-knowledge-curation-point .ai-knowledge-keep-note { color: #2563eb; font-size: 13px; margin: 4px 0; }
.ai-knowledge-curation-point .ai-knowledge-input { margin: 6px 0; }
.ai-knowledge-flow .ai-knowledge-curation-point details { margin: 4px 0; }
.ai-knowledge-flow .ai-knowledge-curation-point summary { padding: 4px 0; }
.ai-knowledge-input { display: grid; gap: 5px; margin: 10px 0; min-width: 0; }
.ai-knowledge-input > span { font-size: 13px; }
.ai-knowledge-flow textarea { width: 100%; min-width: 0; min-height: 60px; resize: vertical; line-height: 1.5; }
.ai-knowledge-flow textarea[data-knowledge-field="reason"] { min-height: 40px; height: 40px; }
.ai-knowledge-flow input:not([type="radio"]), .ai-knowledge-flow select, .ai-knowledge-flow textarea { max-width: 100%; box-sizing: border-box; border: 1px solid #cdd8e5; border-radius: 5px; padding: 8px 9px; background: #fff; color: #16212b; font-family: inherit; font-size: 14px; }
.ai-knowledge-flow input:focus-visible, .ai-knowledge-flow select:focus-visible, .ai-knowledge-flow textarea:focus-visible, .ai-knowledge-flow button:focus-visible, .ai-knowledge-flow summary:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.ai-knowledge-flow details { margin: 10px 0; font-size: 13px; }
.ai-knowledge-flow summary { cursor: pointer; color: #475569; padding: 7px 0; }
.ai-knowledge-retained-point { padding: 10px 0; border-bottom: 1px solid #dde4ea; }
.ai-knowledge-retained-point header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; }
.ai-knowledge-retained-point header span, .ai-knowledge-flow h3 small { color: #2563eb; background: #eaf1ff; border-radius: 4px; padding: 3px 7px; font-size: 12px; font-weight: 400; }
.ai-knowledge-retained-point p { white-space: normal; font-size: 14px; }
.ai-knowledge-trace-note { color: #64717d; font-size: 12px; padding: 12px 0; }
.ai-knowledge-reference { border-top: 1px solid #dde4ea; padding-top: 3px; }
.ai-knowledge-reference pre { white-space: pre-wrap; font-family: inherit; font-size: 12px; max-height: 220px; overflow: auto; }
.ai-knowledge-boss-decision { border-top: 1px solid #dde4ea; margin-top: 14px; padding-top: 16px; }
.ai-knowledge-boss-decision > .ai-knowledge-input { grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; margin: 7px 0; }
.ai-knowledge-flow-preview .ai-knowledge-trace-note { padding: 6px 0; margin: 6px 0; }
.ai-knowledge-destinations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ai-knowledge-destinations label { border: 1px solid #dde4ea; border-radius: 5px; padding: 10px 7px; }
.ai-knowledge-destinations .is-selected { background: #eaf1ff; color: #2563eb; border-color: #b7cdf9; }
.ai-knowledge-material-info { margin: 16px 0 24px; }
.ai-knowledge-material-info > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
.ai-knowledge-material-info dt { color: #64717d; }
.ai-knowledge-material-info dd { margin: 0; }
.ai-knowledge-material-links { display: grid; gap: 8px; }
.ai-knowledge-material-fulltext p { margin: 10px 0; }
.ai-knowledge-flow-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid #dde4ea; background: #fff; }
.ai-knowledge-flow-footer > div:first-child { display: grid; gap: 5px; min-width: 0; font-size: 13px; }
.ai-knowledge-flow .form-status:empty { display: none; }
.ai-knowledge-footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ai-knowledge-flow button:disabled { opacity: .55; cursor: not-allowed; }
.ai-knowledge-flow-empty { grid-column: 2 / -1; }
@media (max-width: 1100px) and (min-width: 761px) {
  .ai-knowledge-flow-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ai-knowledge-flow-columns { grid-template-columns: 22% minmax(0, 1fr) 33%; }
  .ai-knowledge-flow-queue, .ai-knowledge-flow-editor, .ai-knowledge-flow-preview { padding: 12px; }
  .ai-knowledge-choices { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ai-knowledge-flow { height: auto; max-height: none; min-height: 0; overflow: visible; }
  .ai-knowledge-stages { flex-wrap: wrap; gap: 3px; padding: 6px; }
  .ai-knowledge-stages > span { display: none; }
  .ai-knowledge-stages .backend-register-tab { padding: 8px 6px; font-size: 12px; }
  .ai-knowledge-flow-toolbar { align-items: stretch; flex-direction: column; padding: 14px; gap: 10px; }
  .ai-knowledge-flow-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-knowledge-flow-filters input { width: 100%; grid-column: 1 / -1; }
  .ai-knowledge-flow-filters select { width: 100%; }
  .ai-knowledge-flow-columns { display: flex; flex-direction: column; }
  .ai-knowledge-flow-queue { max-height: 220px; border-right: 0; border-bottom: 1px solid #dde4ea; }
  .ai-knowledge-flow-editor, .ai-knowledge-flow-preview { overflow: visible; padding: 14px; }
  .ai-knowledge-flow-preview { border-left: 0; border-top: 1px solid #dde4ea; }
  .ai-knowledge-boss-decision > .ai-knowledge-input { grid-template-columns: 1fr; }
  .ai-knowledge-flow-footer { position: sticky; bottom: 0; flex-direction: column; align-items: stretch; padding: 12px; z-index: 2; box-shadow: 0 -2px 7px #16212b0d; }
  .ai-knowledge-footer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-knowledge-flow button, .ai-knowledge-flow select, .ai-knowledge-flow input:not([type="radio"]), .ai-knowledge-flow summary, .ai-knowledge-choices label, .ai-knowledge-destinations label { min-height: 44px; }
  .ai-knowledge-flow input:not([type="radio"]), .ai-knowledge-flow select, .ai-knowledge-flow textarea { font-size: 16px; }
  .ai-knowledge-flow textarea[data-knowledge-field="reason"] { min-height: 60px; height: 60px; }
  .ai-knowledge-choices { gap: 2px; }
  .ai-knowledge-choices label { font-size: 12px; }
}

/* Boss review: one submitted-content panel, one short approval path. */
.ai-boss-simple { height: calc(100dvh - 284px); min-height: 420px; max-height: 900px; }
.ai-boss-simple .ai-knowledge-flow-columns,
.ai-knowledge-flow[data-knowledge-mode="bossReview"] .ai-knowledge-flow-columns { grid-template-columns: minmax(210px, 24%) minmax(0, 1fr); }
.ai-knowledge-flow[data-knowledge-mode="bossReview"] .ai-knowledge-flow-preview { display: none; }
.ai-boss-simple .ai-knowledge-flow-toolbar { padding: 12px 18px; }
.ai-boss-simple .ai-knowledge-flow-toolbar p { margin-top: 2px; }
.ai-boss-simple .ai-knowledge-flow-filters input { width: 240px; }
.ai-boss-review-main { padding: 18px 22px; }
.ai-boss-content-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-boss-content-header h3 { margin: 0; }
.ai-boss-content-header .status-pill { white-space: nowrap; }
.ai-boss-submitted-content { padding: 14px 0; font-size: 14px; line-height: 1.7; }
.ai-boss-submitted-content p { margin: 6px 0; }
.ai-boss-submitted-content h4 { font-size: 14px; margin: 12px 0 5px; }
.ai-boss-review-controls { border-top: 1px solid #dde4ea; padding-top: 14px; }
.ai-boss-methods { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ai-boss-methods legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ai-boss-methods label { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 16px; border: 1px solid #cdd8e5; border-radius: 5px; cursor: pointer; font-size: 14px; }
.ai-boss-methods .is-selected { color: #2563eb; background: #eaf1ff; border-color: #b7cdf9; }
.ai-boss-classification { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ai-boss-classification .ai-knowledge-input { margin: 0; }
.ai-boss-content-edit { margin: 14px 0; }
.ai-knowledge-flow .ai-boss-content-edit textarea { min-height: 210px; line-height: 1.7; }
.ai-boss-reject-link { border: 0; background: transparent; color: #64717d; padding: 5px 0; font-size: 13px; text-decoration: underline; cursor: pointer; }
.ai-boss-simple .ai-knowledge-flow-footer { padding: 10px 18px; }
.ai-boss-simple .ai-knowledge-footer-actions { margin-left: auto; }
@media (max-width: 1100px) and (min-width: 761px) {
  .ai-boss-simple .ai-knowledge-flow-columns { grid-template-columns: 210px minmax(0, 1fr); }
  .ai-boss-simple .ai-knowledge-flow-toolbar { flex-direction: row; align-items: center; }
  .ai-boss-review-main { padding: 16px; }
}
@media (max-width: 760px) {
  .ai-boss-simple { height: auto; max-height: none; min-height: 0; }
  .ai-boss-simple .ai-knowledge-flow-columns { display: flex; }
  .ai-boss-simple .ai-knowledge-flow-queue { max-height: 190px; }
  .ai-boss-simple .ai-knowledge-flow-toolbar { padding: 12px; }
  .ai-boss-simple .ai-knowledge-flow-filters { display: block; }
  .ai-boss-simple .ai-knowledge-flow-filters input { width: 100%; }
  .ai-boss-review-main { padding: 14px; }
  .ai-boss-classification { grid-template-columns: 1fr; }
  .ai-boss-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-boss-methods label { padding: 10px 7px; min-height: 44px; }
  .ai-boss-simple .ai-knowledge-flow-footer { padding: 12px; }
}

/* AI review knowledge lifecycle: decision, reusable knowledge and archive */
.ai-knowledge-review-form {
  display: grid;
  gap: 14px;
}

.ai-review-decision-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-review-decision-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.ai-review-decision-option:has(input:checked),
.ai-review-decision-option.is-selected {
  border-color: #7c98ff;
  background: #f3f6ff;
  box-shadow: 0 0 0 2px rgb(59 91 219 / 8%);
}

.ai-review-decision-option input {
  grid-row: 1 / 3;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.ai-review-decision-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ai-review-source-preview,
.ai-knowledge-conclusion,
.ai-archive-remark {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.ai-review-source-preview > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ai-review-source-preview span {
  color: var(--muted);
  font-size: 12px;
}

.ai-review-source-preview p,
.ai-knowledge-conclusion p,
.ai-archive-remark {
  margin: 8px 0 0;
  line-height: 1.65;
}

.ai-review-grid > .ai-archive-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.ai-archive-status.is-knowledge {
  color: #047857;
  background: #ecfdf5;
}

.ai-archive-status.is-case {
  color: #315bd8;
  background: #eef3ff;
}

.ai-archive-status.is-rejected {
  color: #9a3412;
  background: #fff7ed;
}

.ai-final-knowledge-card {
  grid-column: 1 / -1;
}

.ai-knowledge-workspace {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.ai-knowledge-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ai-knowledge-section-tabs {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ai-knowledge-section-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.ai-knowledge-section-tab b {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e8edf6;
  font-size: 11px;
  text-align: center;
}

.ai-knowledge-section-tab.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.ai-knowledge-section-tab.is-active b {
  background: rgb(255 255 255 / 20%);
}

.ai-knowledge-section-manage {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ai-knowledge-section-badge {
  display: inline-flex;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.ai-knowledge-section-badge.is-unclassified {
  background: #f1f5f9;
  color: #64748b;
}

.ai-knowledge-manager-actions {
  align-items: end;
  justify-content: flex-end;
}

.ai-knowledge-manager-actions label {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.ai-knowledge-manager-actions label span {
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-section-config-list {
  display: grid;
  gap: 9px;
}

.ai-knowledge-section-config-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.ai-knowledge-section-config-row label,
.ai-knowledge-section-order-actions {
  display: grid;
  gap: 5px;
}

.ai-knowledge-section-config-row label > span,
.ai-knowledge-section-order-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-section-order-actions > div {
  display: flex;
  gap: 6px;
}

.ai-knowledge-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ai-knowledge-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ai-knowledge-toolbar label > span {
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-ask-button {
  white-space: nowrap;
}

.ai-knowledge-toolbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-results {
  display: grid;
  gap: 12px;
}

.ai-knowledge-assistant-result {
  display: grid;
  gap: 12px;
}

.ai-knowledge-answer,
.ai-knowledge-reference-list {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.ai-knowledge-answer h3,
.ai-knowledge-reference-list h3 {
  margin: 0;
  font-size: 14px;
}

.ai-knowledge-answer-content {
  line-height: 1.75;
}

.ai-knowledge-reference-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
}

.ai-knowledge-reference-item span {
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-conclusion h4,
.ai-knowledge-structured-section h4 {
  margin: 0 0 7px;
  font-size: 13px;
}

.ai-knowledge-structured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-knowledge-structured-section {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.ai-knowledge-structured-section ul,
.ai-knowledge-structured-section p {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.ai-knowledge-structured-section p {
  padding-left: 0;
}

.ai-knowledge-source-cases {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.ai-knowledge-source-cases summary {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.ai-knowledge-source-case {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.ai-knowledge-source-case span {
  color: var(--muted);
  font-size: 12px;
}

.ai-knowledge-source-case p {
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .ai-review-decision-cards,
  .ai-knowledge-structured-grid {
    grid-template-columns: 1fr;
  }

  .ai-knowledge-toolbar {
    grid-template-columns: 1fr;
  }

  .ai-knowledge-toolbar-meta {
    flex-direction: column;
    gap: 4px;
  }

  .ai-knowledge-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-knowledge-section-manage {
    align-self: flex-start;
  }

  .ai-knowledge-section-config-row {
    grid-template-columns: 1fr;
  }
}
.account-field-outbound-phone {
  display: grid;
  gap: 6px;
  align-content: end;
}

.account-field-outbound-phone > label {
  display: grid;
  gap: 6px;
}

.account-field-outbound-phone .compact-button {
  justify-self: start;
}
.customer-payee-confirmation-variant{display:grid;grid-template-columns:auto minmax(280px,520px);align-items:center;justify-content:start;gap:12px;margin:12px 0;padding:12px 14px;border:1px solid #dfe5ef;border-radius:10px;background:#f8faff}.customer-payee-confirmation-variant>span{font-size:13px;font-weight:700;color:#526079}.customer-payee-confirmation-variant select{width:100%;height:40px;padding:0 12px;border:1px solid #cdd6e5;border-radius:8px;background:#fff;color:#172033;font:inherit}@media(max-width:680px){.customer-payee-confirmation-variant{grid-template-columns:1fr;gap:7px}}

.ecommerce-store-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.ecommerce-store-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #d9e0ec;
  border-radius: 999px;
  background: #f5f7fa;
  color: #5d6675;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.ecommerce-store-role-badge.is-primary {
  border-color: #b9ccff;
  background: #edf3ff;
  color: #245bd8;
}

.ecommerce-store-single {
  color: var(--text);
  white-space: nowrap;
}

.ecommerce-store-role-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce5f5;
  border-radius: 12px;
  background: #f8fbff;
}

.ecommerce-store-role-editor-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ecommerce-store-role-editor-heading > div {
  display: grid;
  gap: 3px;
}

.ecommerce-store-role-editor-heading small,
.ecommerce-store-role-option small {
  color: var(--muted);
}

.ecommerce-store-role-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.ecommerce-store-role-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d9e0ec;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.ecommerce-store-role-option:has(input:checked) {
  border-color: #7fa3ff;
  box-shadow: 0 0 0 2px rgba(54, 104, 240, .1);
}

.ecommerce-store-role-option > span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef1f6;
  color: #687285;
  font-size: 12px;
  font-weight: 700;
}

.ecommerce-store-role-option:has(input:checked) > span {
  background: #e6efff;
  color: #245bd8;
}

.ecommerce-store-role-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecommerce-store-role-option small {
  grid-column: 3;
}

.fulfillment-consulted-store-meta strong {
  display: block;
}

@media (max-width: 680px) {
  .ecommerce-store-role-editor-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ecommerce-store-role-editor-heading .secondary-button {
    width: 100%;
  }
}
.failed-expense-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.failed-expense-summary-card {
  display: grid;
  min-width: 136px;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.failed-expense-summary-card span {
  color: var(--muted);
  font-size: 12px;
}

.failed-expense-summary-card strong {
  font-size: 18px;
  color: var(--text);
}

.failed-expense-summary-card.total {
  border-color: #f3c479;
  background: #fffaf0;
}

.failed-expense-summary-card.employee strong {
  font-size: 14px;
}

.failed-expense-filter-panel {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(130px, 0.7fr) minmax(210px, 1.25fr);
  gap: 10px;
  align-items: end;
  margin: 10px 0 12px;
}

.failed-expense-filter-panel label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.failed-expense-filter-panel :is(input, select) {
  width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .failed-expense-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .failed-expense-filter-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

.failed-expense-row-duplicate > td {
  background: #fff9e8;
}

.failed-expense-row-strong > td {
  background: #fff0f0;
}

.failed-expense-warning {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  color: #9a6300;
  background: #fff0c2;
  font-size: 12px;
}

.failed-expense-warning.strong {
  color: #b42318;
  background: #fee4e2;
}

.failed-expense-table .failed-expense-row-payee-phone-risk > td {
  background: #ffe1e1;
}

.failed-expense-chat-upload {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8faff;
}

.failed-expense-chat-existing,
.failed-expense-evidence-line,
.failed-expense-bill-line,
.failed-expense-permanent-risk {
  display: grid;
  gap: 4px;
}

.failed-expense-chat-existing {
  margin-top: 8px;
}

.failed-expense-evidence-line + .failed-expense-evidence-line,
.failed-expense-bill-line + .failed-expense-bill-line {
  margin-top: 8px;
}

.failed-expense-bill-line small,
.failed-expense-permanent-risk small {
  color: var(--muted);
}

.failed-expense-permanent-risk {
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #f04438;
  border-radius: 8px;
  color: #b42318;
  background: #fff1f0;
}

.failed-expense-table {
  min-width: 1740px;
}

.contract-rule-variant-field {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.contract-rule-variant-field legend {
  padding: 0 5px;
  font-weight: 700;
}

.contract-rule-variant-field p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.contract-rule-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contract-rule-variant-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 120px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.customer-payee-downgrade-request {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #f3c86a;
  border-radius: 10px;
  background: #fff9e9;
}

.customer-payee-downgrade-request[hidden] {
  display: none;
}

.customer-payee-downgrade-request label,
.customer-payee-downgrade-request .full,
.customer-payee-downgrade-heading,
.customer-payee-downgrade-request > p {
  grid-column: 1 / -1;
}

.customer-payee-downgrade-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-payee-downgrade-request label {
  display: grid;
  gap: 6px;
}

.customer-payee-refusal-flow,
.customer-payee-special-report-form,
.customer-payee-special-report-summary {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.customer-payee-special-report-form[hidden],
.customer-payee-refusal-flow [hidden] {
  display: none;
}

.customer-payee-refusal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-payee-refusal-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.customer-payee-refusal-flow [data-payee-refusal-evidence],
.customer-payee-special-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-payee-refusal-flow label,
.customer-payee-special-report-fields label {
  display: grid;
  gap: 6px;
}

.customer-payee-refusal-options label {
  display: inline-flex;
  grid-column: auto;
  cursor: pointer;
  user-select: none;
}

.customer-payee-refusal-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.customer-payee-refusal-options label:has(input:checked) {
  border-color: var(--primary);
  background: #eef3ff;
  color: #2448ad;
}

.customer-payee-refusal-flow .full,
.customer-payee-special-report-fields .full {
  grid-column: 1 / -1;
}

.customer-payee-provisional-panel,
.contract-provisional-config,
.contract-provisional-review-evidence {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8faff;
}

.customer-payee-provisional-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.customer-payee-provisional-toggle input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

[data-payee-provisional-fields] > .customer-payee-provisional-toggle {
  margin: 12px 0;
}

[data-payee-provisional-fields][hidden] { display: none; }

.customer-payee-auto-variant-result {
  margin: 0;
  color: #3156b8;
  font-weight: 700;
}

.customer-payee-special-report-form {
  border-color: #efb04d;
  background: #fffaf0;
}

.customer-payee-special-report-alert,
.customer-payee-special-report-summary > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-payee-special-report-alert span,
.customer-payee-special-report-requirements,
.customer-payee-special-report-summary p {
  color: var(--muted);
}

.customer-payee-special-report-requirements ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.customer-payee-confirmation-variant-readonly {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f7fb;
}

.contract-special-report-config-form {
  margin-top: 16px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.contract-review-status-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.contract-review-status-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #5f6b7d;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contract-review-status-tab:hover {
  color: #315bd8;
}

.contract-review-status-tab.is-active {
  border-bottom-color: #315bd8;
  color: #315bd8;
}

.contract-review-status-tab span {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: inherit;
  background: #eef2f7;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.contract-review-status-tab.is-active span {
  background: #e9efff;
}

.contract-special-report-review-section,
.contract-ordinary-downgrade-review-section {
  border-top: 1px solid var(--border);
}

.contract-downgrade-batch-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8faff;
}

.contract-downgrade-batch-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  cursor: pointer;
}

.contract-downgrade-batch-toolbar [data-contract-downgrade-selected-count] {
  color: var(--muted);
  font-size: 13px;
}

.contract-downgrade-batch-toolbar .primary-button {
  margin-left: auto;
}

.contract-special-report-review-section > h4,
.contract-ordinary-downgrade-review-section > h4 {
  margin: 16px 16px 0;
}

.contract-special-report-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 4px 0;
}

.contract-special-report-detail div {
  display: grid;
  gap: 2px;
}

.contract-special-report-detail dt {
  color: var(--muted);
  font-size: 12px;
}

.contract-special-report-detail dd {
  margin: 0;
}

.contract-downgrade-review-actions {
  flex-wrap: wrap;
}

.contract-downgrade-review-actions label {
  display: grid;
  gap: 5px;
  min-width: 160px;
}

.contract-downgrade-review-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.contract-downgrade-review-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.contract-downgrade-review-checkbox {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}

.contract-downgrade-review-card.pending {
  border-color: #f3c86a;
  background: #fffdf5;
}

.contract-downgrade-review-main {
  display: grid;
  gap: 8px;
}

.contract-downgrade-review-main > div:first-child,
.contract-downgrade-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contract-downgrade-review-main p,
.contract-downgrade-review-main small {
  margin: 0;
}

.contract-downgrade-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contract-downgrade-evidence img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (max-width: 720px) {
  .customer-payee-downgrade-request {
    grid-template-columns: 1fr;
  }

  .contract-downgrade-review-card {
    flex-direction: column;
  }

  .customer-payee-refusal-flow [data-payee-refusal-evidence],
  .customer-payee-special-report-fields,
  .contract-special-report-detail {
    grid-template-columns: 1fr;
  }
}

/* Shipping mobile workspace: compact filters and full-width horizontal browsing. */
@media (max-width: 720px) {
  #view-shippingOrders > .list-panel {
    padding: 8px;
  }

  #view-shippingOrders .section-heading {
    gap: 0;
    margin-bottom: 8px;
  }

  #view-shippingOrders .section-heading-spacer,
  #view-shippingOrders .section-heading:has(#exportShippingOrdersBtn[hidden]) {
    display: none;
  }

  #shippingOrderTabs {
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #shippingOrderTabs .backend-register-tab {
    flex: 1 0 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  #shippingOrderTabs .tab-count {
    min-width: 18px;
    margin-left: 2px;
    padding: 0 4px;
  }

  #view-shippingOrders .shipping-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    margin-bottom: 10px;
  }

  #view-shippingOrders .shipping-toolbar > label {
    min-width: 0;
    width: 100%;
    gap: 4px;
  }

  #view-shippingOrders .shipping-toolbar > label:first-child {
    grid-column: 1 / -1;
  }

  #view-shippingOrders .shipping-toolbar input,
  #view-shippingOrders .shipping-toolbar select {
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
  }

  #view-shippingOrders .shipping-toolbar .clear-input-button {
    width: 40px;
    height: 44px;
  }

  #view-shippingOrders .shipping-toolbar input[type="search"] {
    padding-right: 44px;
  }

  #view-shippingOrders .fulfillment-table-wrap {
    max-height: none;
    scrollbar-gutter: auto;
    -webkit-overflow-scrolling: touch;
  }

  #shippingOrderTable td.export-select-col,
  #shippingOrderTable td.shipping-customer-col {
    position: static;
    left: auto;
    z-index: auto;
    box-shadow: none;
  }

  #shippingOrderTable th.export-select-col,
  #shippingOrderTable th.shipping-customer-col {
    left: auto;
    z-index: 2;
    box-shadow: none;
  }

  #shippingOrderTable .shipping-customer-col {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
  }

  #shippingOrderTable button,
  #shippingOrderTable select,
  #view-shippingOrders .section-actions button {
    min-height: 44px;
    min-width: 44px;
  }

  #shippingOrderTable .shipping-order-actions .inline-select,
  #shippingOrderTable .shipping-order-primary-actions > [data-action="cancel-shipping-order"],
  #shippingOrderTable .shipping-order-actions > .backend-order-check-button {
    height: 44px;
  }

  #shippingOrderTable .shipping-logistics-edit-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  #shippingOrderTable .empty-state {
    position: sticky;
    left: 0;
    width: calc(100vw - 64px);
    padding: 24px 12px;
  }

  body:has(#view-shippingOrders.is-active) #formModal {
    z-index: 150;
    padding: 10px;
  }

  body:has(#view-shippingOrders.is-active) #formModal .modal-panel {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  body:has(#view-shippingOrders.is-active) #formModal input,
  body:has(#view-shippingOrders.is-active) #formModal select,
  body:has(#view-shippingOrders.is-active) #formModal textarea {
    font-size: 16px;
  }

  body:has(#view-shippingOrders.is-active) #formModal button,
  body:has(#view-shippingOrders.is-active) #formModal select,
  body:has(#view-shippingOrders.is-active) #formModal input:not([type="hidden"]):not([type="checkbox"]) {
    min-height: 44px;
  }
}

/* Related postal parcels retain individual assessment and assignment controls. */
#shippingOrderTable .shipping-package-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
#shippingOrderTable .shipping-batch-button { text-align: left; }
.shipping-package-list { display: grid; gap: 12px; min-width: 0; }
#shippingPackageForm, #shippingPackageForm > * { min-width: 0; }
#shippingPackageForm .form-actions { flex-wrap: wrap; }
@media (max-width: 360px) {
  #shippingPackageForm .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  #shippingPackageForm .form-actions button { min-width: 0; width: 100%; }
}
.shipping-package-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.shipping-package-card button { justify-self: start; }

/* v568: keep mobile workspaces inside the viewport; only tabs/tables pan. */
@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .main, .main > .view, .main .list-panel, .dashboard-tab-panels {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }
  .top-actions > .user-switch { grid-column: span 3; min-width: 0; width: 100%; }
  .top-actions > :not(.user-switch) { grid-column: span 2; width: 100%; min-width: 0; }
  .top-actions .user-switch select, .top-actions .icon-button, .top-actions .top-logout-button,
  .top-actions .lead-notification-button { width: 100%; min-width: 0; min-height: 44px; height: 44px; }
  .top-actions .user-switch select { font-size: 16px; }
  #view-leads .lead-action-row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: 0;
    padding: 0;
    gap: 8px;
    overflow: visible;
  }
  #view-leads .lead-action-row button { flex: 1 1 calc(50% - 8px); min-height: 44px; }
  #view-leads .lead-board-tabs, #visitOrderTabs, #ecommerceDashboardTabs, #ecommerceTableTabs {
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  #view-leads .lead-board-tabs button, #visitOrderTabs button,
  #ecommerceDashboardTabs button, #ecommerceTableTabs button {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 13px;
  }
  .lead-mobile-card-head { grid-template-columns: 28px minmax(0, 1fr); }
  .lead-mobile-stage { grid-column: 2; justify-self: start; }
  .lead-mobile-customer .link-button { white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .lead-mobile-item-head { flex-wrap: wrap; }
  #view-leads .lead-mobile-filter-toggle, #leadMobileFilterToggle, #leadMobileDashboardToggle,
  .lead-mobile-actions .row-actions button { min-height: 44px; }
  #view-visitOrders > .list-panel, #view-ecommerce > .list-panel { padding: 8px; }
  #view-visitOrders .visit-filter-toolbar, #view-ecommerce .ecommerce-filter-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }
  #view-visitOrders .visit-filter-toolbar > label,
  #view-ecommerce .ecommerce-filter-toolbar > label {
    min-width: 0;
    width: 100%;
    flex: none;
    gap: 4px;
  }
  #view-visitOrders .visit-filter-toolbar > label:first-child { grid-column: 1 / -1; }
  #view-visitOrders .visit-filter-toolbar input, #view-visitOrders .visit-filter-toolbar select,
  #view-ecommerce .ecommerce-filter-toolbar input, #view-ecommerce .tag-multi-filter-details > summary,
  #view-leads .lead-filter-toolbar input, #view-leads .tag-multi-filter-details > summary {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    font-size: 16px;
  }
  #view-ecommerce .ecommerce-action-heading > .section-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }
  #view-ecommerce .tag-multi-filter-menu {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  #view-ecommerce .tag-multi-filter-option {
    min-height: 44px;
    overflow-wrap: anywhere;
  }
  #view-ecommerce .section-actions button, #view-visitOrders .section-actions button {
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 8px;
    white-space: normal;
  }
  #view-ecommerce .ecommerce-dashboard-head { flex-wrap: wrap; gap: 8px; }
  #view-ecommerce .table-wrap, #view-ecommerce .ecommerce-dashboard-table-wrap,
  #view-visitOrders .fulfillment-table-wrap { max-width: 100%; max-height: none; -webkit-overflow-scrolling: touch; }
  #ecommerceTable td.sticky-ecommerce-col { position: static; left: auto !important; box-shadow: none; }
  #ecommerceTable th.sticky-ecommerce-col { left: auto !important; box-shadow: none; }
  #visitOrderTable button, #ecommerceTable button { min-height: 44px; min-width: 44px; }
  #view-salary .hr-attendance-page, #view-salary .hr-attendance-self-card { min-width: 0; }
  #view-salary .hr-attendance-self-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "actions" "punches" "device" "quick";
  }
  #view-salary .hr-attendance-schedule-notice,
  #view-salary .hr-attendance-schedule-notice > div {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
    overflow-wrap: anywhere;
  }
  #view-salary .hr-attendance-schedule-notice button { min-height: 44px; white-space: normal; }
  #view-salary .hr-attendance-self-head, #view-salary .hr-attendance-self-actions {
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  #view-salary .hr-attendance-next-copy { min-width: 0; min-height: 90px; }
  #view-salary .hr-attendance-next-copy > strong { font-size: 20px; white-space: normal; overflow-wrap: anywhere; }
  #view-salary .hr-attendance-primary-action { min-height: 52px; font-size: 18px; white-space: normal; }
  #view-salary .hr-attendance-punches { min-width: 0; border-left: 0; border-top: 1px solid var(--line); }
}
/* Versioned backend assessment: numeric settings stay editable on narrow screens. */
/* v605: monthly backend workspace; calculations and permissions remain server-owned. */
.hr-backend-workbench { --backend-line: #dce4ef; --backend-blue: #3c50ed; color: #18243b; min-width: 0; display: grid; gap: 12px; font-size: 13px; }
.hr-backend-workbench * { box-sizing: border-box; }
.hr-backend-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; padding: 14px 16px; border: 1px solid var(--backend-line); border-radius: 8px; background: #fff; }
.hr-backend-toolbar > label { display: grid; gap: 5px; min-width: 150px; color: #64748b; font-size: 12px; }
.hr-backend-toolbar input, .hr-backend-toolbar select { min-height: 36px; font-size: 13px; width: 100%; }
.hr-backend-toolbar .hr-performance-scope-bar { display: flex; gap: 16px; padding: 0; margin: 0; border: 0; background: none; }
.hr-backend-toolbar .hr-performance-scope-bar > div, .hr-backend-toolbar .hr-performance-scope-count { display: none; }
.hr-backend-toolbar .hr-performance-scope-bar label { width: 160px; min-width: 0; }
.hr-backend-approved { flex: 1; }
.hr-backend-approved > span { display: block; padding: 9px 12px; min-height: 36px; border: 1px solid var(--backend-line); border-radius: 5px; color: #334155; }
.hr-backend-toolbar > div:last-child { display: flex; gap: 8px; }
.hr-backend-lifecycle { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 12px 18px; border: 1px solid var(--backend-line); border-radius: 7px; background: #fff; color: #64748b; font-size: 12px; }
.hr-backend-lifecycle li { display: flex; align-items: center; gap: 8px; }
.hr-backend-lifecycle li > span { width: 27px; height: 27px; display: grid; place-items: center; background: #eef1f6; border-radius: 50%; font-weight: 600; }
.hr-backend-lifecycle .is-current { color: var(--backend-blue); font-weight: 600; }
.hr-backend-lifecycle .is-current > span { background: var(--backend-blue); color: #fff; }
.hr-backend-lifecycle .is-complete > span { color: var(--backend-blue); background: #e9eeff; }
.hr-backend-lifecycle .hr-backend-period { margin-left: auto; }
.hr-backend-workspace { display: grid; grid-template-columns: 195px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.hr-backend-employee-list, .hr-backend-assessment-main { min-width: 0; background: #fff; border: 1px solid var(--backend-line); border-radius: 7px; overflow: clip; }
.hr-backend-employee-list > h3, .hr-backend-item-list > h3 { margin: 0; padding: 16px; font-size: 14px; }
.hr-backend-employee-list h3 small { float: right; color: #64748b; font-weight: 400; font-size: 12px; }
.hr-backend-mobile-employee { display: none; }
.hr-backend-employee-list > button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 12px 14px; border: 0; border-left: 3px solid transparent; border-radius: 0; background: none; color: inherit; min-height: 63px; }
.hr-backend-employee-list > button.is-active { border-left-color: var(--backend-blue); background: #edf2ff; }
.hr-backend-initial { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center; background: #eaf0ff; color: var(--backend-blue); font-weight: 600; }
.hr-backend-employee-list button strong { font-size: 14px; display: block; overflow-wrap: anywhere; }
.hr-backend-employee-list button small { display: block; color: #64748b; font-size: 11px; margin-top: 3px; }
.hr-backend-employee-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; background: #f5f8ff; border-bottom: 1px solid var(--backend-line); }
.hr-backend-employee-head > div:first-child { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-width: 0; }
.hr-backend-employee-head h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.hr-backend-tag { display: inline-block; padding: 3px 7px; border: 1px solid #d5def4; background: #edf2ff; color: #3c50c5; border-radius: 4px; font-size: 11px; font-weight: 400; white-space: nowrap; }
.hr-backend-head-metrics { display: flex; gap: 22px; align-items: center; }
.hr-backend-head-metrics > div { display: flex; align-items: center; gap: 10px; }
.hr-backend-head-metrics span { color: #64748b; font-size: 12px; white-space: nowrap; }
.hr-backend-head-metrics strong { font-size: 22px; white-space: nowrap; }
.hr-backend-assessment-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 550px; }
.hr-backend-item-list { min-width: 0; border-right: 1px solid var(--backend-line); }
.hr-backend-item-list > h3 small { font-weight: 400; color: #64748b; font-size: 11px; display: block; margin-top: 5px; }
.hr-backend-item-list > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 16px; text-align: left; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid #edf1f7; border-radius: 0; background: none; color: inherit; min-height: 59px; }
.hr-backend-item-list > button > span:last-child { text-align: right; white-space: nowrap; }
.hr-backend-item-list b { font-size: 15px; display: block; }
.hr-backend-item-list small { font-size: 11px; color: #64748b; display: block; margin-top: 3px; font-weight: 400; }
.hr-backend-item-list > button.is-active { border-left-color: var(--backend-blue); background: #edf2ff; color: var(--backend-blue); font-weight: 600; }
.hr-backend-item-detail { min-width: 0; padding: 18px; }
.hr-backend-item-detail > header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.hr-backend-item-detail > header h3 { font-size: 20px; margin: 0; }
.hr-backend-item-detail > header > div { margin-left: auto; color: #64748b; font-size: 12px; }
.hr-backend-item-detail > header strong { font-size: 23px; color: #18243b; margin-left: 8px; }
.hr-backend-route-tabs, .hr-backend-evidence-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--backend-line); margin-bottom: 12px; }
.hr-backend-route-tabs > button, .hr-backend-evidence-tabs > button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 10px 6px; color: #53627a; font-size: 13px; min-height: 36px; }
.hr-backend-route-tabs > button.is-active, .hr-backend-evidence-tabs > button.is-active { border-bottom-color: var(--backend-blue); color: var(--backend-blue); font-weight: 600; }
.hr-backend-route-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.hr-backend-route-summary > div { border: 1px solid var(--backend-line); padding: 12px 14px; border-radius: 5px; background: #f8faff; }
.hr-backend-route-summary strong { font-size: 14px; }
.hr-backend-route-summary p { margin: 6px 0 0; color: #53627a; font-size: 12px; }
.hr-backend-route-summary b { color: #18243b; font-size: 16px; margin-left: 8px; }
.hr-backend-route-summary p > span { margin-left: 24px; }
.hr-backend-formula { padding: 11px 14px; background: #edf3ff; border-radius: 5px; margin: 10px 0; line-height: 1.6; }
.hr-backend-workbench .hr-backend-band-table { min-width: 520px; width: 100%; font-size: 12px; }
.hr-backend-workbench .hr-backend-band-table th, .hr-backend-workbench .hr-backend-band-table td { padding: 9px 10px; white-space: normal; vertical-align: top; }
.hr-backend-band-table small { color: #64748b; font-size: 11px; }
.hr-backend-band-table .is-positive { color: #27674f; font-weight: 600; }
.hr-backend-band-table .is-negative { color: #ba3434; font-weight: 600; }
.hr-backend-band-orders > summary { color: var(--backend-blue); white-space: nowrap; }
.hr-backend-band-orders p { min-width: 150px; line-height: 1.6; }
.hr-backend-band-orders span, .hr-backend-orders span { display: block; margin: 5px 0; overflow-wrap: anywhere; }
.hr-backend-unused { padding: 10px 12px; background: #f7f9fc; border: 1px solid var(--backend-line); border-radius: 4px; }
.hr-backend-workbench summary { cursor: pointer; line-height: 1.6; }
.hr-backend-note { font-size: 11px; color: #64748b; line-height: 1.65; margin: 10px 0 14px; }
.hr-backend-evidence-tabs { margin: 18px 0 10px; }
.hr-backend-evidence-tabs > button { padding: 9px 4px; font-size: 12px; }
.hr-backend-evidence-pane { color: #53627a; font-size: 12px; line-height: 1.7; }
.hr-backend-evidence-pane > p { margin: 0 0 8px; }
.hr-backend-evidence-pane h4 { font-size: 13px; color: #18243b; margin: 12px 0 6px; }
.hr-backend-evidence-pane h4 small { font-weight: 400; color: #64748b; }
.hr-backend-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.hr-backend-new-event { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--backend-line); }
.hr-backend-workbench .hr-backend-event-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hr-backend-event-form > p { grid-column: 1 / -1; margin: 0; }
.hr-backend-month-footer { position: sticky; bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--backend-line); border-radius: 7px; box-shadow: 0 3px 12px #233c6510; z-index: 2; }
.hr-backend-month-footer p { margin: 0; font-size: 12px; color: #53627a; }
.hr-backend-month-footer small { display: block; font-size: 11px; margin-top: 4px; }
.hr-backend-month-footer > div { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-backend-empty { padding: 18px 12px; color: #64748b; font-size: 12px; line-height: 1.7; margin: 0; }
.hr-backend-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.hr-backend-metrics span { display: block; color: #64748b; font-size: 12px; }
.hr-backend-metrics strong { display: block; font-size: 20px; margin-top: 8px; }
.hr-backend-conversion section { border: 1px solid var(--backend-line); border-radius: 6px; padding: 14px; margin-top: 12px; }
.hr-backend-conversion h4 { margin: 0; }
.hr-backend-conversion .hr-backend-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hr-backend-workbench button:focus-visible, .hr-backend-workbench summary:focus-visible { outline: 2px solid var(--backend-blue); outline-offset: -2px; }
/* Keep the chosen design's first-screen density; override only backend workspace controls. */
#salaryView:has(.hr-backend-workbench) > .hr-module-head { display: none; }
.hr-backend-workbench .hr-backend-item-list > h3 small { display: inline; margin-left: 6px; }
.hr-backend-workbench .hr-backend-item-list > button { min-height: 51px; padding: 8px 14px; line-height: 18px; }
.hr-backend-workbench .hr-backend-item-list small { line-height: 14px; margin-top: 0; }
.hr-backend-workbench .hr-backend-route-tabs > button, .hr-backend-workbench .hr-backend-evidence-tabs > button { padding: 8px 8px; min-width: 0; background: transparent; border: 0; border-radius: 0; border-bottom: 2px solid transparent; color: #53627a; box-shadow: none; }
.hr-backend-workbench .hr-backend-route-tabs > button.is-active, .hr-backend-workbench .hr-backend-evidence-tabs > button.is-active { background: transparent; color: var(--backend-blue); border-bottom-color: var(--backend-blue); }
.hr-backend-workbench .hr-backend-band-table { table-layout: auto; }
.hr-backend-workbench .hr-backend-band-table th { width: auto; white-space: nowrap; }
.hr-backend-workbench .hr-backend-band-table th, .hr-backend-workbench .hr-backend-band-table td { padding: 6px 9px; line-height: 1.5; }
.hr-backend-workbench .hr-backend-warning { margin-top: 10px; padding: 6px 10px; font-size: 11px; }
.hr-backend-workbench .hr-backend-approved { max-width: 280px; }
.hr-backend-toolbar > div:last-child { margin-left: auto; }
@media (min-width: 1181px) { .hr-backend-workspace { grid-template-columns: 210px minmax(0, 1fr); } }
.hr-backend-workbench .hr-backend-unused { padding: 6px 10px; }
.hr-backend-workbench .hr-backend-note { margin: 8px 0; }
.hr-backend-workbench .hr-backend-evidence-tabs { margin-top: 12px; }
@media (min-width: 721px) {
  .hr-backend-toolbar { padding-top: 12px; padding-bottom: 12px; }
  .hr-backend-employee-head { padding-top: 16px; padding-bottom: 16px; }
  .hr-backend-item-detail { padding: 16px; }
  .hr-backend-route-summary > div { padding-top: 10px; padding-bottom: 10px; }
  .hr-backend-workbench .hr-backend-formula { padding-top: 8px; padding-bottom: 8px; }
  .hr-backend-workbench .hr-backend-band-table th, .hr-backend-workbench .hr-backend-band-table td { padding-top: 5px; padding-bottom: 5px; }
  .hr-backend-workbench .hr-backend-unused { padding-top: 4px; padding-bottom: 4px; }
  .hr-backend-workbench .hr-backend-evidence-tabs { margin-top: 8px; }
}
@media (max-width: 1180px) {
  .hr-backend-workspace { grid-template-columns: 165px minmax(0, 1fr); gap: 10px; }
  .hr-backend-assessment-body { grid-template-columns: 180px minmax(0, 1fr); }
  .hr-backend-head-metrics { gap: 12px; }
  .hr-backend-head-metrics > div { display: grid; gap: 3px; }
  .hr-backend-item-list > button { padding: 14px 10px; }
}
@media (max-width: 960px) {
  .hr-backend-workspace { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-employee-list { display: flex; flex-wrap: wrap; }
  .hr-backend-employee-list > h3 { width: 100%; }
  .hr-backend-employee-list > button { width: auto; flex: 1 1 145px; }
  .hr-backend-assessment-body { grid-template-columns: 190px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hr-backend-toolbar { gap: 12px; padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); }
  .main:has(.hr-backend-workbench, .hr-monthly-standard) .top-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; min-width: 0; width: 100%; }
  .main:has(.hr-backend-workbench, .hr-monthly-standard) .top-actions > label { min-width: 0; grid-column: span 3; }
  .main:has(.hr-backend-workbench, .hr-monthly-standard) .top-actions > button { grid-column: span 2; width: 100%; min-width: 0; }
  .main:has(.hr-backend-workbench, .hr-monthly-standard) .top-actions select { width: 100%; min-width: 0; }
  .hr-backend-workbench .hr-backend-mobile-employee { display: grid; width: 100%; gap: 6px; padding: 0 12px 12px; font-size: 12px; }
  .hr-backend-workbench .hr-backend-mobile-employee select { width: 100%; font-size: 16px; }
  .hr-backend-workbench .hr-backend-employee-list > button { display: none; }
  .hr-backend-workbench .hr-backend-band-table thead { display: table-header-group; }
  .hr-backend-workbench .hr-backend-band-table tbody { display: table-row-group; }
  .hr-backend-workbench .hr-backend-band-table tr { display: table-row; }
  .hr-backend-workbench .hr-backend-band-table th, .hr-backend-workbench .hr-backend-band-table td { display: table-cell; position: static; border-radius: 0; }
  .hr-backend-workbench .hr-backend-band-table td::before { display: none; }
  .hr-backend-workbench .hr-backend-month-footer button { width: 100%; min-width: 0; }
  .hr-backend-toolbar > label { min-width: 0; }
  .hr-backend-toolbar .hr-performance-scope-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hr-backend-toolbar .hr-performance-scope-bar label { width: auto; }
  .hr-backend-toolbar > div:last-child { justify-content: flex-end; }
  .hr-backend-lifecycle { gap: 12px; padding: 12px; }
  .hr-backend-lifecycle li { flex: 1 1 40%; font-size: 11px; }
  .hr-backend-lifecycle .hr-backend-period { display: none; }
  .hr-backend-employee-head { align-items: flex-start; flex-direction: column; padding: 14px; }
  .hr-backend-employee-head h2 { font-size: 20px; }
  .hr-backend-head-metrics { width: 100%; justify-content: space-between; }
  .hr-backend-head-metrics strong { font-size: 20px; }
  .hr-backend-assessment-body { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-item-list { border-right: 0; border-bottom: 1px solid var(--backend-line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-backend-item-list > h3 { grid-column: 1 / -1; padding: 12px; }
  .hr-backend-item-list > h3 small { display: inline; margin-left: 8px; }
  .hr-backend-item-list > button { padding: 10px; font-size: 12px; }
  .hr-backend-item-detail { padding: 12px; }
  .hr-backend-item-detail > header h3 { font-size: 18px; }
  .hr-backend-route-summary > div { padding: 10px; }
  .hr-backend-route-summary p > span { display: block; margin: 6px 0 0; }
  .hr-backend-month-footer { position: static; display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; justify-content: normal; padding: 12px; }
  .hr-backend-month-footer > div { display: grid; }
  .hr-backend-workbench button, .hr-backend-workbench input, .hr-backend-workbench select { min-height: 44px; }
  .hr-backend-toolbar input, .hr-backend-toolbar select, .hr-backend-event-form input, .hr-backend-event-form select, .hr-backend-event-form textarea { font-size: 16px; }
  .hr-backend-workbench .hr-backend-event-form { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-metrics { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-conversion .hr-backend-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* v606: same compact monthly header; each department keeps its own workflow. */
.hr-monthly-standard { --backend-line: #dce4ef; --backend-blue: #3c50ed; min-width: 0; }
#salaryView:has(.hr-monthly-standard) > .hr-module-head { display: none; }
.hr-monthly-standard .hr-backend-approved { min-width: 240px; max-width: 280px; }
#view-salary .hr-monthly-lifecycle > button { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 27px; padding: 0; border: 0; border-radius: 0; background: none; color: #64748b; font-size: 12px; font-weight: 400; }
#view-salary .hr-monthly-lifecycle > button:hover { color: var(--backend-blue); background: none; }
#view-salary .hr-monthly-lifecycle > button.is-current { color: var(--backend-blue); font-weight: 600; }
#view-salary .hr-monthly-lifecycle > button > span { width: auto; height: auto; display: inline; background: none; color: inherit; border-radius: 0; font-weight: inherit; }
.hr-monthly-lifecycle > button > b { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; background: #eef1f6; color: #64748b; font-weight: 600; }
.hr-monthly-lifecycle > button.is-current > b { background: var(--backend-blue); color: #fff; }
.hr-monthly-lifecycle > button small { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hr-monthly-lifecycle > button:focus-visible { outline: 2px solid var(--backend-blue); outline-offset: 4px; border-radius: 4px; }
.hr-monthly-stage-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hr-monthly-stage-meta > label { display: flex; gap: 8px; align-items: center; color: #64748b; font-size: 12px; white-space: nowrap; }
.hr-monthly-stage-meta select { min-height: 30px; min-width: 110px; font-size: 12px; }
@media (max-width: 720px) {
  .hr-monthly-standard .hr-backend-approved { min-width: 0; max-width: none; }
  .hr-monthly-toolbar > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: 0; width: 100%; }
  #view-salary .hr-monthly-toolbar button, .hr-monthly-toolbar input, .hr-monthly-toolbar select { min-height: 44px; min-width: 0; width: 100%; }
  .hr-monthly-toolbar input, .hr-monthly-toolbar select { font-size: 16px; }
  .hr-monthly-lifecycle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  #view-salary .hr-monthly-lifecycle > button { min-height: 44px; text-align: left; }
  .hr-monthly-lifecycle .hr-backend-period { display: none; }
  .hr-monthly-stage-meta { justify-content: flex-start; }
}

.hr-backend-assessment { min-width: 0; padding: 16px; background: #fff; border: 1px solid #d9e2ee; border-radius: 10px; }
.hr-backend-assessment p { overflow-wrap: anywhere; }
.hr-backend-assessment .hr-backend-summary-table { min-width: 0; width: 100%; table-layout: fixed; }
.hr-backend-summary-table th:first-child { width: 46%; }
.hr-backend-summary-table th, .hr-backend-summary-table td { white-space: normal; overflow-wrap: anywhere; }
.hr-backend-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0; }
.hr-backend-actions label, .hr-backend-config-grid > label, .hr-backend-event-form > label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hr-backend-config fieldset { min-width: 0; margin: 12px 0; padding: 12px; border: 1px solid #d9e2ee; border-radius: 8px; }
.hr-backend-config legend { padding: 0 5px; font-weight: 600; }
.hr-backend-config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.hr-backend-config-grid > fieldset { grid-column: 1 / -1; }
.hr-backend-config-row { margin-bottom: 12px; border-bottom: 1px solid #edf1f6; padding-bottom: 10px; }
.hr-backend-config input, .hr-backend-config select, .hr-backend-event-form input, .hr-backend-event-form select, .hr-backend-event-form textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.hr-backend-event { margin: 10px 0; padding: 12px; background: #f7f9fc; border: 1px solid #d9e2ee; border-radius: 8px; overflow-wrap: anywhere; }
.hr-backend-event > strong, .hr-backend-event > span, .hr-backend-event > small { display: block; margin-bottom: 5px; }
.hr-backend-event button { margin: 5px 8px 0 0; }
.hr-backend-order-reference { display: grid; gap: 5px; padding: 10px 0; border-bottom: 1px solid #dce3ef; margin-bottom: 8px; }
.hr-backend-order-reference small { color: #64748b; }
.hr-backend-order-reference button { justify-self: start; }
.hr-backend-acceptance-wait { display: inline-block; margin-left: 12px; color: #64748b; font-size: 12px; font-weight: 400; }
.hr-backend-item-detail > .hr-backend-process-heading { margin-bottom: 0; }
.hr-backend-item-detail > .hr-backend-process-heading h3 { color: #18243b; font-size: 20px; line-height: 1.4; }
.hr-backend-process-summary { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; color: #64748b; font-size: 13px; line-height: 1.5; }
.hr-backend-process-formula b { color: #18243b; font-weight: 700; }
.hr-backend-process-summary button { margin-left: auto; }
.hr-backend-event-list { min-width: 0; }
.hr-backend-event-list-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--backend-line); }
.hr-backend-event-list-head > span { font-size: 12px; color: #64748b; }
.hr-backend-event-list-head b { color: var(--backend-blue); }
.hr-backend-event-status-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.hr-backend-event-status-tabs button { min-height: 44px; padding: 8px 5px; border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: #53627a; font-size: 13px; }
.hr-backend-event-status-tabs button.is-active { border-bottom-color: var(--backend-blue); color: var(--backend-blue); font-weight: 600; }
.hr-backend-event-filters { display: flex; gap: 12px; align-items: end; margin: 14px 0; }
.hr-backend-event-filters label { display: flex; flex-direction: column; gap: 4px; color: #64748b; font-size: 11px; min-width: 0; }
.hr-backend-event-filters .hr-backend-event-search { flex: 1; }
.hr-backend-event-filters input, .hr-backend-event-filters select { width: 100%; min-width: 0; min-height: 40px; font-size: 13px; }
.hr-backend-event-filters select { width: 112px; }
.hr-backend-item-detail:has(.hr-backend-event-list) > header > div strong { color: var(--backend-blue); font-size: 28px; }
.hr-backend-workbench .hr-backend-event-table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.hr-backend-event-table th { text-align: left; color: #334155; font-weight: 600; background: #f3f6fb; padding: 12px 8px; }
.hr-backend-event-table th:nth-child(1) { width: 16%; }
.hr-backend-event-table th:nth-child(2) { width: 18%; }
.hr-backend-event-table th:nth-child(3) { width: 23%; }
.hr-backend-event-table th:nth-child(4) { width: 9%; }
.hr-backend-event-table th:nth-child(5) { width: 12%; }
.hr-backend-event-table th:nth-child(6) { width: 22%; }
.hr-backend-event-table td { padding: 12px 8px; border-bottom: 1px solid #edf1f7; vertical-align: middle; overflow-wrap: anywhere; line-height: 1.5; }
.hr-backend-event-table td strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-backend-event-table td small { display: block; margin-top: 3px; color: #64748b; font-size: 11px; }
.hr-backend-event-date { color: #53627a; }
.hr-backend-event-points { font-weight: 600; white-space: nowrap; }
.hr-backend-event-points.is-negative { color: #9f3434; }
.hr-backend-event-points.is-positive { color: #27674f; }
.hr-backend-event-points.is-unscored { color: #64748b; font-weight: 400; }
.hr-backend-event-status { display: inline-block; padding: 3px 6px; border-radius: 4px; background: #f0f3f7; color: #64748b; font-size: 11px; }
.hr-backend-event-status.is-confirmed { color: #3c50c5; background: #edf2ff; }
.hr-backend-event-status.is-pending { color: #965411; background: #fff3df; }
.hr-backend-event-row-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.hr-backend-event-row-actions button { min-height: 36px; padding: 7px 8px; font-size: 12px; white-space: nowrap; }
.hr-backend-event-pagination { display: flex; justify-content: flex-end; padding-top: 16px; color: #64748b; font-size: 12px; }
@media (min-width: 1181px) {
  .hr-backend-workbench:has(.hr-backend-event-list) .hr-backend-workspace { grid-template-columns: 175px minmax(0, 1fr); }
  .hr-backend-workbench:has(.hr-backend-event-list) .hr-backend-assessment-body { grid-template-columns: 165px minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .hr-backend-event-filters { flex-wrap: wrap; gap: 8px; }
  .hr-backend-event-filters .hr-backend-event-search { flex: 1 1 100%; }
  .hr-backend-event-filters label:not(.hr-backend-event-search) { flex: 1; }
  .hr-backend-event-filters input, .hr-backend-event-filters select { width: 100%; font-size: 16px; min-height: 44px; }
  .hr-backend-event-row-actions button, .hr-backend-event-pagination button { min-height: 44px; }
  .hr-backend-event-pagination select { min-height: 44px; font-size: 16px; }
  .hr-backend-event-pagination .lead-list-page-numbers { justify-content: flex-start; }
  .hr-backend-process-summary button { margin-left: 0; }
}
.hr-backend-event button { min-height: 44px; max-width: 100%; white-space: normal; }
.hr-backend-event-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.hr-backend-event-form h4, .hr-backend-event-form label:has(textarea) { grid-column: 1 / -1; }
.hr-backend-warning { color: #875d09; background: #fff9df; padding: 10px; border-radius: 6px; }
/* Monthly performance: supplemental checks are only shown in this scoped dialog. */
#formModal:has(.hr-backend-manual-dialog), #formModal:has(.hr-backend-calculation-dialog) { z-index: 150; }
#formModal:has(.hr-backend-manual-dialog) .modal-panel,
#formModal:has(.hr-backend-calculation-dialog) .modal-panel { width: min(620px, 100%); }
.hr-backend-dialog-context { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.hr-backend-manual-dialog .hr-backend-event-form { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; gap: 14px; }
.hr-backend-manual-dialog .hr-backend-event-form [hidden] { display: none; }
.hr-backend-manual-dialog input, .hr-backend-manual-dialog select { min-height: 38px; }
.hr-backend-dialog-note { margin: 12px 0 16px; color: var(--muted); font-size: 12px; }
.hr-backend-manual-dialog .form-actions { margin: 0; justify-content: flex-end; }
.hr-backend-calculation-notes { margin-top: 12px; color: var(--muted); font-size: 12px; }
.hr-backend-calculation-notes ul, .hr-backend-calculation-dialog ul { padding-left: 20px; line-height: 1.7; }
@media (max-width: 680px) {
  #formModal:has(.hr-backend-manual-dialog), #formModal:has(.hr-backend-calculation-dialog) { padding: 12px; }
  #formModal:has(.hr-backend-manual-dialog) .modal-panel { max-height: calc(100dvh - 24px); }
  .hr-backend-manual-dialog .hr-backend-event-form { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-manual-dialog input, .hr-backend-manual-dialog select, .hr-backend-manual-dialog textarea { font-size: 16px; }
  .hr-backend-manual-dialog button, .hr-backend-manual-dialog input, .hr-backend-manual-dialog select { min-height: 44px; }
  #formModal:has(.hr-backend-manual-dialog) .modal-header button,
  #formModal:has(.hr-backend-calculation-dialog) .modal-header button { min-width: 44px; min-height: 44px; }
  .hr-backend-calculation-dialog button { min-height: 44px; }
}
/* v581: one assessment item at a time, with shared draft state across tabs. */
.hr-backend-template { --backend-editor-line: #e0e7ef; min-width: 0; overflow: clip; background: #fff; border: 1px solid var(--backend-editor-line); border-radius: 8px; color: var(--text); }
#salaryView:has(.hr-backend-template) > .hr-module-head { display: none; }
@media (min-width: 721px) {
  .main:has(.hr-backend-template) > .topbar { margin-bottom: 0; }
}
.hr-backend-template-header { padding: 20px 24px 18px; }
.hr-backend-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hr-backend-template h3 { margin: 0; font-size: 25px; line-height: 1.4; letter-spacing: -.5px; }
.hr-backend-title-row p { margin: 6px 0 16px; font-size: 13px; color: var(--muted); }
.hr-backend-template-status { margin-top: 4px; padding: 5px 10px; border-radius: 5px; background: #edf7f2; color: #287458; font-size: 12px; white-space: nowrap; }
.hr-backend-template-status.is-draft { background: #f2f5fa; color: #66758a; }
.hr-backend-template-meta { display: grid; grid-template-columns: minmax(270px, 1.35fr) minmax(170px, .9fr) minmax(170px, .85fr); gap: 16px; max-width: 860px; align-items: end; }
.hr-backend-template .hr-performance-scope-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; margin: 0; padding: 0; border: 0; background: transparent; min-width: 0; }
.hr-backend-template .hr-performance-scope-bar > div, .hr-backend-template .hr-performance-scope-count { display: none; }
.hr-backend-template .hr-performance-scope-bar label, .hr-backend-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; }
.hr-backend-field > span, .hr-backend-template .hr-performance-scope-bar label > span { font-size: 13px; font-weight: 400; color: #45556b; }
.hr-backend-template input:not([type="checkbox"]), .hr-backend-template select { width: 100%; min-width: 0; max-width: 100%; height: 38px; padding: 7px 10px; border: 1px solid #cbd7e5; border-radius: 5px; background: #fff; color: var(--text); box-sizing: border-box; font-size: 13px; }
.hr-backend-template input:disabled, .hr-backend-template select:disabled { background: #f6f8fb; color: #59677a; opacity: 1; }
.hr-backend-template input::placeholder { color: #8b98a9; }
.hr-backend-template input:focus-visible, .hr-backend-template select:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.hr-backend-field-control { display: flex; gap: 6px; align-items: center; min-width: 0; }
.hr-backend-field-control > small { font-size: 12px; color: #66758a; white-space: nowrap; }
.hr-backend-template-body { display: grid; grid-template-columns: 188px minmax(0, 1fr); border-top: 1px solid var(--backend-editor-line); margin: 0 24px; }
.hr-backend-section-nav { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--backend-editor-line); padding: 14px 12px 14px 0; }
.hr-backend-section-nav > button { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-bottom: 1px solid #edf1f6; border-radius: 0; background: transparent; color: #253449; font-size: 14px; text-align: left; cursor: pointer; }
.hr-backend-section-nav > button > small { color: inherit; font-size: 13px; font-weight: 400; }
.hr-backend-section-nav > button:hover { background: #f5f8fd; }
.hr-backend-section-nav > button.is-active { border-bottom-color: transparent; border-left: 3px solid #2563eb; border-radius: 4px; padding-left: 13px; background: #edf3ff; color: #2563eb; font-weight: 600; }
.hr-backend-section-nav > button.hr-backend-nav-settings { margin-top: 12px; border-top: 1px solid var(--backend-editor-line); font-size: 13px; color: #68788e; }
.hr-backend-template-main { container: backend-editor / inline-size; min-width: 0; padding: 16px 0 20px 20px; }
/* v665: draft item names and verified data bindings stay within the template editor. */
.hr-backend-template .hr-backend-item-binding { border-bottom: 1px solid var(--backend-editor-line); margin-bottom: 12px; padding-bottom: 10px; }
.hr-backend-template .hr-backend-item-binding .hr-backend-form-grid,
.hr-backend-template .hr-backend-new-item .hr-backend-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin-top: 0; }
.hr-backend-template .hr-backend-new-item { max-width: 760px; }
.hr-backend-template .hr-backend-item-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 8px 10px; background: #fff8e8; border: 1px solid #f1ddb0; border-radius: 5px; font-size: 13px; }
@media (max-width: 720px) {
  .hr-backend-template .hr-backend-item-binding .hr-backend-form-grid,
  .hr-backend-template .hr-backend-new-item .hr-backend-form-grid { grid-template-columns: minmax(0, 1fr); }
}
.hr-backend-section-heading h4 { font-size: 21px; margin: 0 0 4px; line-height: 1.5; }
.hr-backend-section-heading p { font-size: 13px; margin: 0 0 16px; color: #66758a; }
.hr-backend-profit-summary { margin: 0 0 14px; font-size: 12px; color: #45556b; line-height: 1.7; }
.hr-backend-score-bounds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 0 0 18px; border-bottom: 1px solid var(--backend-editor-line); }
.hr-backend-score-bounds .hr-backend-field { flex-direction: row; align-items: center; gap: 10px; }
.hr-backend-score-bounds .hr-backend-field > span { flex: 0 0 auto; white-space: nowrap; }
.hr-backend-score-bounds .hr-backend-field-control { flex: 1; }
.hr-backend-route-bar { display: flex; align-items: center; gap: 24px; margin: 14px 0; font-size: 13px; color: #45556b; }
.hr-backend-route-tabs { display: flex; gap: 8px; }
.hr-backend-route-tabs > button { min-width: 88px; height: 36px; padding: 6px 18px; border: 1px solid #d8e2ee; border-radius: 5px; background: #f8fafc; color: #334155; font-size: 13px; cursor: pointer; }
.hr-backend-route-tabs > button.is-active { color: #fff; background: #2563eb; border-color: #2563eb; }
.hr-backend-band-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; border: 1px solid var(--backend-editor-line); border-radius: 5px; overflow: hidden; }
.hr-backend-band-table th { padding: 8px 12px; border-right: 1px solid #edf1f6; background: #f6f8fb; font-size: 12px; font-weight: 600; color: #53647c; text-align: left; }
.hr-backend-band-table td { padding: 5px 12px; border-top: 1px solid #edf1f6; border-right: 1px solid #edf1f6; }
.hr-backend-band-table th:first-child { width: 33%; }
.hr-backend-band-table th:last-child { width: 10%; }
.hr-backend-band-table th:last-child, .hr-backend-band-table td:last-child { border-right: 0; text-align: center; }
.hr-backend-band-table .hr-backend-field > span { display: none; }
.hr-backend-template .hr-backend-band-table input:not([type="checkbox"]), .hr-backend-template .hr-backend-band-table select { height: 30px; min-height: 30px; padding: 4px 8px; font-size: 12px; }
.hr-backend-value-range { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hr-backend-value-range > .hr-backend-field { flex: 1; }
.hr-backend-value-range > span { color: #8795a7; font-size: 12px; }
.hr-backend-template button.hr-backend-remove { padding: 6px 0; border: 0; background: transparent; color: #2563eb; font-size: 12px; cursor: pointer; }
.hr-backend-template button.hr-backend-remove:hover { color: #c24142; }
.hr-backend-readonly-mark { color: #8391a3; font-size: 12px; }
.hr-backend-template button.hr-backend-add { min-width: 146px; margin-top: 10px; min-height: 34px; padding: 6px 20px; border: 1px dashed #a7c0fa; border-radius: 4px; background: #f5f8ff; color: #2563eb; font-weight: 600; font-size: 13px; cursor: pointer; }
.hr-backend-editor-note { font-size: 12px; line-height: 1.8; color: #68788e; margin: 12px 0 16px; overflow-wrap: anywhere; }
.hr-backend-advanced { border: 1px solid #e7edf5; border-radius: 5px; background: #f5f7fa; margin-top: 16px; }
.hr-backend-advanced > summary { padding: 13px 16px; font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; }
.hr-backend-advanced > summary > span { margin-left: 10px; font-weight: 400; color: #68788e; }
.hr-backend-advanced-content { padding: 0 16px 12px; }
.hr-backend-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; margin-top: 18px; }
.hr-backend-subheading { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin: 26px 0 12px; font-size: 15px; }
.hr-backend-subheading > span { color: #7a889a; font-size: 12px; font-weight: 400; }
.hr-backend-personal-table th:first-child { width: 45%; }
.hr-backend-rule-row { padding: 16px 0 18px; border-bottom: 1px solid var(--backend-editor-line); }
.hr-backend-rule-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.hr-backend-rule-row .hr-backend-form-grid { margin-top: 12px; }
/* v588: seven compact rating controls per priority, scoped away from other rule editors. */
.hr-backend-rating-row { container-type: inline-size; padding: 12px 0 14px; }
.hr-backend-rating-row .hr-backend-rating-grid { grid-template-columns: minmax(0, .75fr) repeat(4, minmax(0, .68fr)) minmax(0, 1.15fr) minmax(0, 1.35fr); gap: 10px; max-width: 860px; align-items: end; }
.hr-backend-rating-grid .hr-backend-field > span { font-size: 12px; line-height: 1.4; }
@container (max-width: 700px) {
  .hr-backend-rating-row .hr-backend-rating-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 420px) {
  .hr-backend-rating-row .hr-backend-rating-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
.hr-backend-rule-more { margin-top: 12px; font-size: 12px; color: #68788e; }
.hr-backend-rule-more > summary { cursor: pointer; }
.hr-backend-rule-more .hr-backend-field { margin-top: 8px; max-width: 240px; }
.hr-backend-core-goals { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0 8px; padding: 12px 0; font-size: 13px; }
.hr-backend-core-goals > label { display: flex; flex: 0 0 auto; gap: 6px; align-items: center; white-space: nowrap; }
.hr-backend-core-goals input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; min-height: 0; margin: 0; }
/* v589: compact the remaining backend template sections, without changing other HR forms. */
.hr-backend-template-main .hr-backend-score-bounds { max-width: 700px; gap: 12px; padding-bottom: 14px; }
.hr-backend-template-main .hr-backend-target-grid { max-width: 700px; margin-top: 14px; gap: 12px; align-items: end; }
.hr-backend-template-main .hr-backend-band-table { max-width: 900px; }
.hr-backend-template-main .hr-backend-personal-table { max-width: 700px; }
.hr-backend-process-row { max-width: 900px; padding: 12px 0 14px; }
.hr-backend-process-row .hr-backend-process-grid { grid-template-columns: minmax(0, 2.1fr) minmax(0, .8fr) minmax(0, .7fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; align-items: end; }
.hr-backend-process-grid .hr-backend-field > span { font-size: 12px; line-height: 1.4; }
.hr-backend-template-main .hr-backend-advanced { max-width: 900px; margin-top: 12px; }
.hr-backend-template-main .hr-backend-advanced > summary { padding: 11px 14px; }
.hr-backend-advanced-content .hr-backend-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; align-items: end; }
.hr-backend-advanced-content .hr-backend-form-grid:has(> .hr-backend-field:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
.hr-backend-template-main .hr-backend-subheading { margin-top: 20px; }
@container backend-editor (max-width: 760px) {
  .hr-backend-advanced-content .hr-backend-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container backend-editor (max-width: 680px) {
  .hr-backend-process-row .hr-backend-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hr-backend-process-row .hr-backend-process-grid > .hr-backend-field:has([data-kind="string"]) { grid-column: auto; }
  .hr-backend-process-row .hr-backend-process-grid > .hr-backend-field:first-child { grid-column: 1 / -1; }
}
@container backend-editor (max-width: 420px) {
  .hr-backend-template-main .hr-backend-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-backend-target-grid > .hr-backend-field:first-child { grid-column: 1 / -1; }
}
.hr-backend-template-footer { position: sticky; bottom: 0; z-index: 8; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--backend-editor-line); background: #fff; box-shadow: 0 -3px 12px #182f4d08; }
.hr-backend-footer-primary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; flex: 1; }
.hr-backend-footer-primary > button { min-width: 116px; height: 40px; border-radius: 5px; font-size: 13px; }
.hr-backend-footer-primary > span { color: #68788e; font-size: 12px; }
.hr-backend-template button.hr-backend-refresh { color: #68788e; font-size: 12px; padding: 6px 8px; background: transparent; border: 0; cursor: pointer; }
.hr-backend-return-reason { margin: 0; padding: 10px 24px; color: #a45132; background: #fff7ed; font-size: 13px; }
.hr-backend-template-review { padding: 14px 24px; border-top: 1px solid var(--backend-editor-line); background: #f8fafc; }
.hr-backend-template-review textarea { width: 100%; min-height: 64px; resize: vertical; padding: 10px; border: 1px solid #cbd7e5; border-radius: 5px; background: #fff; color: var(--text); font: inherit; box-sizing: border-box; }
@media (max-width: 1100px) and (min-width: 721px) {
  .hr-backend-template-body { grid-template-columns: 172px minmax(0, 1fr); }
  .hr-backend-score-bounds { gap: 12px; }
  .hr-backend-score-bounds .hr-backend-field { flex-direction: column; align-items: stretch; }
  .hr-backend-band-table td, .hr-backend-band-table th { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 720px) {
  .hr-backend-template-header { padding: 16px 14px; }
  .hr-backend-template h3 { font-size: 21px; }
  .hr-backend-title-row { gap: 8px; }
  .hr-backend-title-row p { font-size: 12px; line-height: 1.6; margin-bottom: 14px; }
  .hr-backend-template-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hr-backend-template .hr-performance-scope-bar { grid-column: 1 / -1; }
  .hr-backend-template input:not([type="checkbox"]), .hr-backend-template select { height: 44px; font-size: 14px; }
  .hr-backend-template-body { display: block; margin: 0; }
  .hr-backend-section-nav { flex-direction: row; overflow-x: auto; gap: 6px; border-right: 0; border-bottom: 1px solid var(--backend-editor-line); padding: 10px 14px; }
  .hr-backend-section-nav > button { flex-shrink: 0; gap: 12px; min-height: 44px; padding: 0 12px; font-size: 13px; border: 1px solid #e1e7ef; border-radius: 5px; white-space: nowrap; }
  .hr-backend-section-nav > button.is-active { padding-left: 12px; border: 1px solid #b7ceff; }
  .hr-backend-section-nav > button.hr-backend-nav-settings { margin-top: 0; font-size: 13px; }
  .hr-backend-template-main { min-height: 0; padding: 18px 14px; }
  .hr-backend-section-heading h4 { font-size: 19px; }
  .hr-backend-score-bounds { gap: 10px; }
  .hr-backend-score-bounds .hr-backend-field { flex-direction: column; align-items: stretch; }
  .hr-backend-route-bar { gap: 16px; }
  .hr-backend-route-tabs > button { min-height: 44px; min-width: 74px; padding: 6px 14px; }
  .hr-backend-band-table, .hr-backend-band-table tbody { display: block; width: 100%; border: 0; overflow: visible; }
  .hr-backend-band-table thead { display: none; }
  .hr-backend-band-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--backend-editor-line); border-radius: 6px; }
  .hr-backend-band-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .hr-backend-band-table td::before { content: attr(data-label); display: block; margin-bottom: 6px; color: #68788e; font-size: 12px; }
  .hr-backend-band-table td:first-child { grid-column: 1 / -1; }
  .hr-backend-band-table td:last-child { display: flex; align-items: end; justify-content: flex-end; text-align: right; }
  .hr-backend-band-table td:last-child::before { display: none; }
  .hr-backend-template .hr-backend-band-table input:not([type="checkbox"]), .hr-backend-template .hr-backend-band-table select { height: 44px; min-height: 44px; font-size: 14px; }
  .hr-backend-template button.hr-backend-remove { min-height: 44px; padding: 8px 10px; }
  .hr-backend-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hr-backend-form-grid > .hr-backend-field:has([data-kind="string"]) { grid-column: 1 / -1; }
  .hr-backend-core-goals > label { min-height: 44px; }
  .hr-backend-template button.hr-backend-add { min-height: 44px; }
  .hr-backend-advanced > summary { padding: 14px 12px; font-size: 12px; }
  .hr-backend-advanced > summary > span { margin-left: 6px; font-size: 11px; }
  .hr-backend-template-footer { padding: 14px; gap: 6px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .hr-backend-template-review { padding: 14px; }
  .hr-backend-footer-primary { justify-content: flex-start; gap: 10px; }
  .hr-backend-footer-primary > button { flex: 1 1 110px; min-height: 44px; }
  .hr-backend-footer-primary > span { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .hr-module-head.is-self-attendance.is-backend-performance + .hr-module-tabs { display: flex; }
  .hr-backend-assessment { padding: 10px; }
  .hr-backend-actions > label { flex: 1 1 130px; }
  .hr-backend-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-backend-event-form { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-assessment button, .hr-backend-assessment input, .hr-backend-assessment select { min-height: 44px; }
  .hr-backend-assessment .hr-table-scroll { overflow-x: auto; }
}

/* v666: backend-only compact template; item management stays in the left rail. */
.hr-backend-template-header { padding: 14px 20px; }
.hr-backend-template-body { grid-template-columns: 210px minmax(0, 1fr); margin: 0 20px; }
.hr-backend-template-main { padding: 14px 0 16px 20px; }
.hr-backend-nav-item { min-width: 0; border-bottom: 1px solid #edf1f6; }
.hr-backend-nav-select { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 4px; background: transparent; color: #253449; font-size: 13px; text-align: left; cursor: pointer; }
.hr-backend-nav-select > span { min-width: 0; overflow-wrap: anywhere; }
.hr-backend-nav-select > small { flex: 0 0 auto; font-size: 12px; font-weight: 400; }
.hr-backend-nav-select:hover { background: #f5f8fd; }
.hr-backend-nav-select.is-active { padding-left: 7px; border-left: 3px solid #2563eb; color: #2563eb; background: #edf3ff; font-weight: 600; }
.hr-backend-nav-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 4px 2px 8px; }
.hr-backend-nav-actions > button { min-width: 0; min-height: 28px; padding: 3px 0; border: 0; border-radius: 3px; background: #f5f7fa; color: #52637a; font-size: 12px; cursor: pointer; }
.hr-backend-nav-actions > button:disabled { opacity: .4; cursor: default; }
.hr-backend-template .hr-backend-section-nav .hr-backend-item-binding { margin: 0; padding: 4px 2px 12px; border: 0; }
.hr-backend-template .hr-backend-section-nav .hr-backend-item-binding .hr-backend-form-grid,
.hr-backend-template .hr-backend-section-nav .hr-backend-new-item .hr-backend-form-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.hr-backend-template .hr-backend-section-nav .hr-backend-field > span { font-size: 12px; }
.hr-backend-nav-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hr-backend-nav-scores > .hr-backend-field:only-child { grid-column: 1 / -1; }
.hr-backend-template .hr-backend-section-nav .hr-backend-new-item { padding: 8px 2px; }
.hr-backend-section-nav .hr-backend-new-item .form-actions { display: flex; gap: 6px; margin-top: 12px; }
.hr-backend-section-nav .hr-backend-new-item .form-actions > button { min-width: 0; flex: 1; padding: 6px; font-size: 12px; }
.hr-backend-score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 14px; }
.hr-backend-score-row > .hr-backend-route-bar { margin: 0; }
.hr-backend-score-row > .hr-backend-field { flex-direction: row; align-items: center; gap: 10px; width: 200px; }
.hr-backend-score-row > .hr-backend-field > span { white-space: nowrap; }
.hr-backend-score-row > .hr-backend-field > .hr-backend-field-control { flex: 1; }
.hr-backend-template-main .hr-backend-rule-row:first-child { padding-top: 0; }
.hr-backend-template-footer { padding: 12px 20px; }
@media (max-width: 720px) {
  .hr-backend-template-body { grid-template-columns: minmax(0, 1fr); margin: 0 12px; }
  .hr-backend-section-nav { flex-direction: column; overflow-x: visible; border-right: 0; border-bottom: 1px solid var(--backend-editor-line); padding: 8px 0; }
  .hr-backend-template-main { padding: 14px 0; }
  .hr-backend-nav-actions > button, .hr-backend-nav-select { min-height: 44px; }
  .hr-backend-score-row { gap: 10px; }
  .hr-backend-score-row > .hr-backend-field { width: min(200px, 100%); }
}

/* Dedicated backend order inspection, separate from frontend communication evidence. */
/* Visit operation rows share outer edges; permission checks remain in their renderers. */
#visitOrderTable .visit-order-actions {
  display: grid;
  gap: 6px;
  width: 260px;
  max-width: 100%;
}
#visitOrderTable .visit-cancellation-info {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#visitOrderTable .visit-cancellation-info p {
  margin: 0 0 3px;
  white-space: pre-wrap;
}
#visitOrderTable .visit-order-primary-actions,
#visitOrderTable .visit-order-review-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}
#visitOrderTable .visit-order-primary-actions:has([data-action="open-ai-knowledge-assistant"]) {
  grid-template-columns: minmax(0, 1fr) 94px;
}
#visitOrderTable .visit-order-review-actions:has(.backend-order-check-button):has([data-action="delete-order"]) {
  grid-template-columns: minmax(0, 1fr) 64px;
}
#visitOrderTable .visit-order-review-actions:empty { display: none; }
#visitOrderTable .visit-order-primary-actions > .row-actions { width: 100%; min-width: 0; }
#visitOrderTable .visit-order-actions .inline-select,
#visitOrderTable .visit-order-actions button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}
#visitOrderTable .visit-order-review-actions > [data-action="delete-order"] {
  color: var(--red);
  border-color: #fecaca;
  background: #fff7f7;
}
@media (max-width: 720px) {
  #visitOrderTable .visit-order-actions .inline-select,
  #visitOrderTable .visit-order-actions button { height: 44px; min-height: 44px; }
}

/* Customer-specific AI review: separate source facts, AI judgement and sendable replies. */
.ai-case-point { display: grid; gap: 14px; min-width: 0; margin-top: 14px; font-size: 13px; line-height: 1.7; }
.ai-case-point p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-case-source { display: flex; flex-wrap: wrap; gap: 6px; color: #64748b; font-size: 11px; }
.ai-case-source > span { padding: 3px 7px; border-radius: 4px; background: #f1f5f9; overflow-wrap: anywhere; }
.ai-case-quote, .ai-case-basis { padding: 10px 12px; border-left: 3px solid #94a3b8; background: #f8fafc; }
.ai-case-quote > span, .ai-case-basis > span, .ai-case-analysis > span, .ai-case-branches > span { display: block; font-weight: 600; color: #334155; }
.ai-case-quote small { display: inline; margin-left: 6px; font-size: 11px; font-weight: 400; color: #64748b; }
.ai-case-analysis { padding: 0 12px; }
.ai-case-reply { padding: 12px; border: 1px solid #c8d9f5; border-radius: 6px; background: #f4f8ff; }
.ai-case-reply > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: #2353a5; }
.ai-case-reply button { font-size: 12px; min-height: 32px; }
.ai-case-reply > small { display: block; margin-top: 8px; color: #66758e; font-size: 11px; }
.ai-case-branches { display: grid; gap: 8px; }
.ai-case-branches > section { padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px; }
.ai-case-branches strong { font-size: 12px; }
.ai-case-branches small { display: block; margin-top: 4px; color: #64748b; overflow-wrap: anywhere; }
.ai-case-next { padding: 10px 12px; background: #f2f7f4; border-radius: 6px; }
.ai-case-next strong { color: #35624d; font-size: 12px; }
.ai-case-missing { margin: 14px 0; padding: 12px; border: 1px solid #f2dfba; border-radius: 6px; background: #fffbf2; color: #826129; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.ai-case-missing ul { margin: 6px 0 0; padding-left: 18px; }
.ai-case-point-missing { color: #8a612e; font-size: 12px; }
.ai-case-evidence { margin: 14px 0; font-size: 12px; line-height: 1.7; }
.ai-case-evidence > summary { cursor: pointer; color: #536986; }
.ai-case-evidence > section { padding: 10px; margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 6px; }
.ai-case-evidence p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 720px) { .ai-case-reply button { min-height: 44px; } .ai-case-quote small { display: block; margin-left: 0; } }

.backend-order-check { display: grid; gap: 16px; min-width: 0; }
.backend-order-check-evidence, .backend-order-check-form { padding: 16px; border: 1px solid #dce3ef; border-radius: 12px; min-width: 0; }
.backend-order-check-evidence { background: #f7f9fc; }
.backend-order-check h3 { margin: 0 0 12px; font-size: 16px; }
.backend-order-check-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.backend-order-check-facts span { display: block; color: #64748b; font-size: 12px; margin-bottom: 4px; }
.backend-order-check-facts strong, .backend-order-check p { overflow-wrap: anywhere; }
.backend-order-check-form > label { display: grid; gap: 6px; margin: 12px 0; }
.backend-order-check-standard { padding: 10px; color: #2844b5; background: #edf2ff; border-radius: 8px; }
.backend-order-check-form > .backend-order-check-confirm { display: flex; align-items: flex-start; gap: 8px; }
.backend-order-check-confirm input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0; }
@media (max-width: 720px) {
  .backend-order-check-evidence, .backend-order-check-form { padding: 12px; }
  .backend-order-check-facts { grid-template-columns: minmax(0, 1fr); }
  .backend-order-check .form-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .backend-order-check .form-actions button, .backend-order-check-button { min-height: 44px; }
  .backend-order-check input:not([type="checkbox"]), .backend-order-check select { min-height: 44px; }
  .backend-order-check input:not([type="checkbox"]), .backend-order-check select, .backend-order-check textarea { font-size: 16px; }
  .backend-order-check-confirm input { min-height: 18px; height: 18px; }
}

/* WeChat first-deal registration: scoped to its own form, detail and list. */
#formModal:has(.wechat-registration-form, .wechat-registration-detail) {
  z-index: 150;
}
body:has(#formModal:not([hidden]) .wechat-registration-detail) #imagePreviewOverlay {
  z-index: 160;
}
#formModal:has(.wechat-registration-form, .wechat-registration-detail) .modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  background: var(--panel);
}
#formModal:has(.wechat-registration-form, .wechat-registration-detail) .modal-body {
  padding: 0;
  min-height: 0;
  overscroll-behavior: contain;
}
#formModal:has(.wechat-registration-form, .wechat-registration-detail) .modal-header h2 { font-size: 22px; }
.wechat-registration-form,
.wechat-registration-detail {
  min-width: 0;
  padding: 20px 24px 24px;
  color: var(--text);
  background: var(--panel);
}
.wechat-registration-form { margin: 0; border: 0; }
.wechat-registration-subtitle { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.wechat-registration-section {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.wechat-registration-section:first-of-type { padding-top: 4px; }
.wechat-registration-section h3,
.wechat-registration-section h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.wechat-registration-form label {
  min-width: 0;
  display: grid;
  gap: 7px;
  font-size: 13px;
}
.wechat-registration-form input:not([type="radio"]):not([type="checkbox"]),
.wechat-registration-form textarea,
.wechat-registration-form select {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  font-size: 13px;
}
.wechat-registration-form textarea { min-height: 64px; resize: vertical; }
.wechat-registration-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.wechat-registration-two-col label { grid-template-columns: max-content minmax(0, 1fr); column-gap: 8px; align-items: center; }
.wechat-registration-section > label:not(.wechat-registration-image-field) { grid-template-columns: 124px minmax(0, 1fr); align-items: center; }
.wechat-registration-evidence { min-width: 0; }
.wechat-registration-evidence .wechat-registration-image-field { grid-template-columns: 124px minmax(0, 1fr); align-items: start; }
.wechat-registration-form .wechat-registration-image-field.image-drop-zone { padding: 0; border: 0; background: transparent; box-shadow: none; }
.wechat-registration-form .image-drop-status,
.wechat-registration-form .image-drop-clear { display: none; }
.wechat-registration-form .wechat-registration-image-field:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.wechat-registration-form .wechat-registration-image-field.is-drag-over { outline: 2px dashed var(--blue); outline-offset: 4px; border-radius: 6px; }
.wechat-registration-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.wechat-registration-image-field { min-width: 0; cursor: pointer; }
.wechat-registration-image-box {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.wechat-registration-form [data-wechat-image-preview] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.wechat-registration-evidence [data-wechat-image-preview] {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.wechat-registration-image-tile,
.wechat-registration-image-add {
  position: relative;
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 152px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel-soft);
}
.wechat-registration-image-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.wechat-registration-image-add {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-style: dashed;
  color: var(--muted);
}
.wechat-registration-image-add > span:first-child { color: var(--text); font-size: 28px; line-height: 1; }
.wechat-registration-evidence .wechat-registration-image-tile,
.wechat-registration-evidence .wechat-registration-image-add { flex: 0 0 100px; width: 100px; height: 100px; }
.wechat-registration-form .wechat-registration-image-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #6b7280;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.wechat-registration-form .wechat-registration-image-remove:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wechat-registration-form .wechat-registration-image-box input[type="file"] {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 1px;
  height: 1px;
  min-height: 1px;
  max-width: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.wechat-registration-image-box .wechat-registration-note { margin: 0; }
.wechat-registration-image-box small,
.wechat-registration-image-box .field-help {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.wechat-registration-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 8px;
}
.wechat-registration-item-head h4 { margin: 0; font-size: 13px; }
.wechat-registration-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.wechat-registration-modes { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 16px 0 0; padding: 0; border: 0; }
.wechat-registration-modes legend { float: left; margin-right: 20px; color: var(--muted); font-size: 13px; }
.wechat-registration-modes label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.wechat-registration-modes input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}
.wechat-registration-footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px -24px -24px;
  padding: 14px 24px max(14px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.wechat-registration-footer button { min-height: 38px; }
.wechat-registration-detail { line-height: 1.6; overflow-wrap: anywhere; }
.wechat-registration-detail .wechat-registration-image-box input[type="file"] { display: block; }
.wechat-registration-panel { min-width: 0; }
.wechat-registration-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.wechat-registration-toolbar h3 { margin: 0; font-size: 16px; }
.wechat-registration-toolbar select { max-width: 180px; }
.wechat-registration-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.wechat-registration-status.pending,
.wechat-registration-status.provisional { color: var(--amber); background: var(--amber-soft); }
.wechat-registration-status.approved,
.wechat-registration-status.completed { color: var(--green); background: var(--green-soft); }
.wechat-registration-status.rejected { color: var(--red); background: var(--red-soft); }
/* 微信登记申请：已确认的简洁列表和审核弹窗，仅作用于本区域。 */
.wechat-registration-list-toolbar { justify-content: flex-end; margin: 12px 0; }
.wechat-registration-panel .wechat-registration-table { width: 100%; min-width: 960px; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.wechat-registration-table .wechat-list-customer { width: 15%; }
.wechat-registration-table .wechat-list-applicant { width: 16%; }
.wechat-registration-table .wechat-list-time { width: 18%; }
.wechat-registration-table .wechat-list-amount { width: 13%; }
.wechat-registration-table .wechat-list-status { width: 21%; }
.wechat-registration-table .wechat-list-actions { width: 17%; }
.wechat-registration-table th { padding: 14px 16px; background: #f4f6fb; text-align: left; font-weight: 600; color: #45556b; }
.wechat-registration-table td { padding: 18px 16px; height: 76px; vertical-align: middle; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.wechat-registration-table tbody tr:hover { background: #fafbff; }
.wechat-registration-table .wechat-list-money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wechat-list-date, .wechat-list-clock { display: block; line-height: 1.5; font-variant-numeric: tabular-nums; }
.wechat-list-clock { margin-top: 2px; color: var(--muted); font-size: 12px; }
.wechat-list-action-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wechat-list-action-group button { margin: 0; white-space: nowrap; }
.wechat-list-action-group .primary-button { min-height: 36px; padding: 7px 12px; }
.wechat-registration-detail .wechat-registration-section { margin-top: 0; padding: 18px 0; }
.wechat-review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.wechat-review-person { display: grid; gap: 4px; margin-right: auto; min-width: 0; }
.wechat-review-person strong { font-size: 16px; }
.wechat-review-person span { font-size: 13px; color: var(--muted); }
.wechat-review-amount { display: grid; gap: 4px; padding-left: 18px; border-left: 1px solid var(--line); }
.wechat-review-amount span { font-size: 12px; color: var(--muted); }
.wechat-review-amount strong { font-size: 22px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.wechat-review-evidence { display: flex; flex-wrap: wrap; gap: 10px; }
.wechat-review-image { display: block; padding: 0; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); cursor: pointer; }
.wechat-review-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wechat-review-evidence .wechat-review-image { width: 120px; height: 120px; aspect-ratio: auto; }
.wechat-review-image-field { display: grid; gap: 8px; min-width: 0; font-size: 13px; }
.wechat-review-remark { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.wechat-review-remark textarea { min-height: 88px; width: 100%; resize: vertical; font-size: 14px; }
.wechat-review-image:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 600px) {
  .wechat-review-summary { gap: 12px; }
  .wechat-review-person { flex: 1 1 100%; }
  .wechat-review-amount { margin-left: auto; }
  .wechat-review-items { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wechat-review-remark textarea { font-size: 16px; }
}
@media (max-width: 600px) {
  #formModal:has(.wechat-registration-form, .wechat-registration-detail) { padding: 12px; }
  #formModal:has(.wechat-registration-form, .wechat-registration-detail) .modal-panel {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #formModal:has(.wechat-registration-form, .wechat-registration-detail) .modal-header button {
    min-width: 44px;
    min-height: 44px;
  }
  .wechat-registration-form, .wechat-registration-detail { padding: 14px 16px 16px; }
  .wechat-registration-two-col { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wechat-registration-two-col label,
  .wechat-registration-section > label:not(.wechat-registration-image-field),
  .wechat-registration-evidence .wechat-registration-image-field { grid-template-columns: minmax(0, 1fr); }
  .wechat-registration-images { gap: 8px; }
  .wechat-registration-image-tile,
  .wechat-registration-image-add { height: 104px; }
  .wechat-registration-form .wechat-registration-image-remove { width: 32px; height: 32px; }
  .wechat-registration-form input:not([type="radio"]):not([type="checkbox"]),
  .wechat-registration-form textarea, .wechat-registration-form select { font-size: 16px; }
  .wechat-registration-footer { margin: 16px -16px -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px)); }
  .wechat-registration-footer button { flex: 1 1 auto; min-height: 44px; }
  .wechat-registration-toolbar { align-items: flex-start; }
}
@media (max-width: 380px) {
  .wechat-registration-images { grid-template-columns: minmax(0, 1fr); }
  .wechat-registration-image-tile,
  .wechat-registration-image-add { height: 152px; }
  .wechat-registration-modes { flex-direction: column; gap: 10px; }
}
.wechat-registration-panel .wechat-registration-filters { justify-content: flex-start; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.wechat-registration-panel .wechat-registration-filters label { display: grid; gap: 6px; min-width: 150px; color: var(--muted); font-size: 12px; }
.wechat-registration-panel .wechat-registration-date-filter > div { display: flex; align-items: center; gap: 8px; }
.wechat-registration-panel .wechat-registration-filters input { width: 150px; min-width: 0; }
.wechat-registration-panel .wechat-registration-filters select { min-width: 150px; }
.wechat-registration-panel .wechat-registration-filters > button { margin-left: auto; }
@media (max-width: 600px) {
  .wechat-registration-panel .wechat-registration-filters label { flex: 1; min-width: 130px; }
  .wechat-registration-panel .wechat-registration-filters .wechat-registration-date-filter { flex-basis: 100%; }
  .wechat-registration-panel .wechat-registration-date-filter input { flex: 1; width: 120px; }
}

/* Application entry: neutral by default, blue only while pressed. */
#newBackendWechatRegistrationBtn:active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Work handoffs: one calm list and a full-screen reading/working surface. */
.todo-list { padding: 0 4px 24px; }
.todo-list .todo-tabs-row { margin-bottom: 16px; }
.todo-list .todo-filters { margin-bottom: 16px; gap: 10px; }
.todo-list .todo-filters input, .todo-list .todo-filters select { height: 36px; }
.todo-list .todo-table { min-width: 100%; table-layout: fixed; font-size: 14px; }
.todo-list .todo-table th { position: relative; padding: 12px 14px; }
.todo-list .todo-table td { padding: 13px 14px; height: auto; min-width: 0; overflow: hidden; }
.todo-list .todo-table td:nth-child(2) { min-width: 0; width: auto; }
.todo-list .todo-title-text { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.todo-list .todo-table td small { font-size: 12px; margin-top: 4px; }
.todo-list .todo-row-actions { flex-wrap: nowrap; gap: 8px; }
.todo-list .todo-row-actions button, .todo-list .todo-stage-button { min-height: 34px; padding: 6px 12px; white-space: nowrap; font-size: 14px; }
.todo-list .todo-stage-button { color: var(--blue); border-color: #b7c6ee; }
.todo-score-button { color: var(--blue); background: #eef4ff; border-color: #bed0f4; white-space: nowrap; }
.todo-score-button.is-linked { background: #f2f4f7; color: var(--muted); border-color: var(--line); }
#workTodoDetail .todo-detail-content { padding: 24px 3vw 92px; }
#workTodoDetail .todo-detail-top { display:flex; justify-content:space-between; align-items:center; gap:16px; }
#workTodoDetail .todo-detail-top .todo-back { margin-bottom:0; }
#workTodoDetail .todo-detail-heading { margin:18px 0 24px; }
#workTodoDetail h1 { font-size:26px; }
#workTodoDetail .todo-meta { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; padding-bottom:20px; border-bottom:1px solid var(--line); }
#workTodoDetail .todo-meta > div { padding:0 24px; border-left:1px solid var(--line); }
#workTodoDetail .todo-meta > div:first-child { padding-left:0; border-left:0; }
#workTodoDetail .todo-member-tabs { border-top:0; border-bottom:1px solid var(--line); padding:0; margin-bottom:24px; gap:18px; }
#workTodoDetail .todo-member-tabs button { border:0; border-radius:0; padding:12px 8px; border-bottom:3px solid transparent; background:white; }
#workTodoDetail .todo-member-tabs button.is-active { border-bottom-color:var(--blue); }
#workTodoDetail .todo-detail-columns { display:grid; grid-template-columns:minmax(0,42%) minmax(0,1fr); gap:28px; }
#workTodoDetail .todo-requirements { padding:0; border:0; }
#workTodoDetail .todo-submitted-records { padding-left:28px; border-left:1px solid var(--line); min-width:0; }
#workTodoDetail .todo-record-section { padding:0 0 18px; margin-bottom:18px; border-bottom:1px solid var(--line); }
#workTodoDetail .todo-record-section h2 { font-size:20px; display:flex; align-items:center; gap:12px; }
#workTodoDetail .todo-record-section small { color:var(--muted); }
#workTodoDetail .todo-reply-inline { display:flex; align-items:flex-end; gap:10px; }
#workTodoDetail .todo-reply-inline label { display:grid; flex:1; gap:7px; min-width:0; }
#workTodoDetail .todo-reply-inline button { flex:none; }
#workTodoDetail .todo-action-content { max-width:1120px; margin:0 auto; padding:24px 30px; }
#workTodoDetail .todo-action-task { display:flex; flex-wrap:wrap; gap:18px; align-items:center; }
#workTodoDetail .todo-action-task span { color:var(--muted); }
#workTodoDetail .todo-action-requirements { background:var(--panel-soft); padding:14px 18px; border-radius:6px; margin:18px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
#workTodoDetail .todo-action-form { display:grid; gap:18px; }
#workTodoDetail .todo-action-form > label, #workTodoDetail .todo-two-fields > label { display:grid; gap:8px; }
#workTodoDetail .todo-action-form > label > span, #workTodoDetail .todo-two-fields > label > span { font-size:14px; color:var(--text); }
#workTodoDetail .todo-action-form > .todo-time-toggle { display:flex; align-items:center; gap:10px; color:var(--text); font-size:16px; }
#workTodoDetail input[type="checkbox"] { accent-color:var(--blue); }
#workTodoDetail .todo-action-form textarea, #workTodoDetail .todo-action-form input:not([type="checkbox"]) { width:100%; min-width:0; }
#workTodoDetail .todo-time-toggle { display:flex; gap:10px; align-items:center; }
#workTodoDetail .todo-time-toggle input { width:18px; height:18px; }
#workTodoDetail .todo-inline-note { background:#eef4ff; color:var(--blue); padding:10px 14px; border-radius:5px; }
#workTodoDetail .todo-action-footer { display:flex; gap:12px; align-items:center; border-top:1px solid var(--line); padding-top:18px; margin-top:4px; }
#workTodoDetail .todo-action-footer small { color:var(--muted); flex:1; }
#workTodoDetail .todo-assessment-content { padding:24px 3vw; }
#workTodoDetail .todo-assessment-title { margin:24px 0; overflow-wrap:anywhere; }
#workTodoDetail .todo-assessment-layout.is-multi { display:grid; grid-template-columns:230px minmax(0,1fr); gap:30px; }
#workTodoDetail .todo-assessment-people { border-right:1px solid var(--line); padding-right:22px; }
#workTodoDetail .todo-assessment-people > button { display:grid; width:100%; text-align:left; margin:10px 0; border:0; background:white; padding:14px; gap:7px; }
#workTodoDetail .todo-assessment-people > button.is-active { background:#eef4ff; color:var(--blue); }
#workTodoDetail .todo-assessment-people small { color:var(--muted); }
#workTodoDetail .todo-assessment-controls { display:flex; align-items:flex-end; gap:22px; margin:20px 0; }
#workTodoDetail .todo-assessment-controls label { display:grid; gap:8px; flex:0 1 280px; }
#workTodoDetail .todo-assessment-controls input { width:100%; }
#workTodoDetail .todo-deduction-table { width:100%; border-collapse:collapse; table-layout:fixed; }
#workTodoDetail .todo-deduction-table .todo-deduction { display:table-row; }
#workTodoDetail .todo-deduction-table th { padding:12px; background:var(--panel-soft); text-align:left; }
#workTodoDetail .todo-deduction-table td { padding:14px 12px; border:1px solid var(--line); }
#workTodoDetail .todo-deduction-table th:first-child { width:64px; }
#workTodoDetail .todo-deduction-table th:nth-child(2) { width:180px; }
#workTodoDetail .todo-deduction-table th:nth-child(3) { width:155px; }
#workTodoDetail .todo-deduction-table input:not([type="checkbox"]) { width:100%; }
#workTodoDetail .todo-deduction-table input:disabled { background:var(--panel-soft); color:var(--muted); }
#workTodoDetail .todo-score-total { margin:20px 0; }
#workTodoDetail .todo-score-total strong { color:var(--blue); font-size:24px; }
@media (max-width:720px) {
  #workTodoDetail .todo-detail-columns, #workTodoDetail .todo-assessment-layout.is-multi { grid-template-columns:1fr; gap:18px; }
  #workTodoDetail .todo-submitted-records { padding-left:0; border-left:0; }
  #workTodoDetail .todo-meta { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  #workTodoDetail .todo-meta > div { padding:0; border:0; }
  #workTodoDetail .todo-detail-top, #workTodoDetail .todo-assessment-controls, #workTodoDetail .todo-action-footer { flex-wrap:wrap; }
  #workTodoDetail .todo-action-content { padding:20px 18px; }
  #workTodoDetail .todo-assessment-people { border:0; padding:0; }
  #workTodoDetail #todoDeductions { overflow-x:auto; }
  #workTodoDetail .todo-deduction-table { min-width:640px; }
}
#leadNotificationBanner[data-notification-type="work_todo_summary"] { top: auto; bottom: 22px; z-index: 170; }
body.todo-detail-open #leadNotificationBanner[data-notification-type="work_todo_summary"] { bottom: 100px; }
.todo-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.todo-tabs { display: flex; gap: 22px; min-width: 0; }
.todo-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: 14px 6px; font-size: 16px; white-space: nowrap; }
.todo-tabs button.is-active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.todo-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 24px; }
.todo-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; min-width: 130px; flex: 0 1 170px; }
.todo-filters input, .todo-filters select { width: 100%; min-width: 0; height: 40px; }
.todo-filters .todo-search { flex: 1 1 240px; }
.todo-table-wrap { border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: white; }
.todo-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 16px; }
.todo-table th { background: var(--panel-soft); color: var(--muted); font-weight: 600; text-align: left; padding: 16px 20px; white-space: nowrap; }
.todo-table td { padding: 20px; border-top: 1px solid var(--line); vertical-align: middle; min-height: 78px; }
.todo-table td:first-child { min-width: 140px; white-space: nowrap; }
.todo-table td:nth-child(2) { width: 30%; min-width: 180px; }
.todo-table td small { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }
.todo-unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 10px; vertical-align: 2px; }
.todo-tabs-row > button { min-height: 40px; font-size: 16px; }
.todo-table td strong { font-weight: 500; }
.todo-row-actions, .todo-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.todo-row-actions .text-button { white-space: nowrap; }
.todo-badge { display: inline-flex; padding: 5px 10px; border-radius: 4px; font-size: 13px; white-space: nowrap; line-height: 1.3; }
.todo-badge.warning { background: #fff0ca; color: #a4670b; }
.todo-badge.info { background: #eaf2ff; color: #2363cf; }
.todo-badge.success { background: #e4f6ec; color: #168557; }
.todo-badge.danger { background: #fde8e8; color: #be3333; }
.todo-table .todo-empty { text-align: center; height: 150px; color: var(--muted); }
.todo-pagination { display: flex; justify-content: flex-end; margin-top: 18px; }
.todo-error, #todoDetailStatus, #todoAssessmentStatus, #todoSnoozeStatus { color: #bb3333; line-height: 1.6; }
.todo-permission-scope { padding: 14px 0; border-top: 1px solid var(--line); margin-top: 12px; }
.todo-permission-scope[hidden] { display: none; }
.todo-scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.todo-scope-grid fieldset, .todo-recipients { border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 0; max-height: 230px; overflow-y: auto; }
.todo-scope-grid label, .todo-recipients label { display: flex; align-items: center; gap: 7px; padding: 5px 0; }
.todo-scope-grid small, .todo-recipients small { color: var(--muted); margin-left: auto; }
.todo-scope-grid input[type="checkbox"], .todo-recipients input[type="checkbox"], .todo-deduction input[type="checkbox"] { width: 16px; height: 16px; flex: none; }
.todo-recipients em, .todo-detail em { color: #dc3535; font-style: normal; }
.todo-detail { position: fixed; inset: 0; z-index: 130; background: white; overflow-y: auto; color: var(--text); font-size: 16px; }
body.todo-detail-open { overflow: hidden; }
.todo-detail-content { width: 100%; margin: 0; padding: 22px 3vw 100px; }
.todo-back { margin-bottom: 16px; }
.todo-detail-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.todo-sender-actions { margin-left: auto; display: flex; gap: 18px; }
.todo-detail h1 { margin: 0; font-size: 28px; line-height: 1.35; }
.todo-detail h2 { margin: 0 0 12px; font-size: 20px; }
.todo-member-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo-member-tabs button { background: white; color: var(--muted); border: 1px solid var(--line); padding: 10px 16px; border-radius: 6px; }
.todo-member-tabs button.is-active { color: var(--blue); border-color: var(--blue); background: #eef4ff; }
.todo-member-tabs small { display: block; font-size: 12px; margin-top: 5px; }
.todo-time-request { padding: 16px 20px; border: 1px solid #f0d29a; border-radius: 6px; background: #fff8e8; margin: 0 0 24px; }
.todo-time-request button { margin-right: 10px; }
.todo-detail input, .todo-detail textarea, .todo-detail button { font-size: 16px; }
.todo-detail .todo-badge { font-size: 14px; }
.todo-detail .primary-button, .todo-detail .secondary-button { min-height: 44px; padding: 10px 18px; }
.todo-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 16px; margin: 0 0 18px; }
.todo-meta div { padding: 0 30px; border-left: 1px solid var(--line); }
.todo-meta div:nth-child(5n+1) { border-left: 0; padding-left: 0; }
.todo-meta dt { font-size: 15px; color: var(--muted); margin-bottom: 7px; }
.todo-meta dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.todo-requirements { padding: 20px 0; border-top: 1px solid var(--line); }
.todo-detail p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 10px; line-height: 1.7; }
.todo-stage { border-top: 1px solid var(--line); padding: 14px 0; }
.todo-stage > summary { cursor: pointer; display: flex; align-items: flex-start; gap: 13px; list-style: none; font-size: 20px; }
.todo-stage summary::-webkit-details-marker { display: none; }
.todo-stage summary::before { content: '›'; font-size: 24px; color: var(--text); width: 20px; }
.todo-stage[open] summary::before { transform: rotate(90deg); }
.todo-stage summary > .todo-badge { margin-left: auto; }
.todo-stage summary small { display: block; margin-top: 6px; }
.todo-stage .todo-confirmation-preview { font-size: 14px; line-height: 1.6; font-weight: 400; }
.todo-feedback-history { margin-top: 12px; font-size: 14px; }
.todo-feedback-history summary { display: list-item; margin-bottom: 12px; }
.todo-feedback-history summary::before { display: none; }
.todo-stage small, .todo-hint { color: var(--muted); font-size: 12px; }
.todo-stage-body { margin: 14px 0 0 34px; }
.todo-stage-body form { display: grid; gap: 14px; }
.todo-stage-body label, #todo-snooze-form label, .todo-two-fields label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; }
.todo-stage-body input, .todo-stage-body textarea, .todo-two-fields input { width: 100%; min-width: 0; }
.todo-stage-body textarea { resize: vertical; min-height: 64px; }
.todo-stage-body form > button { justify-self: start; }
.todo-stage-body .todo-reply-inline { grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.todo-reply-inline label { grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.todo-stage-body .todo-reply-inline textarea { min-height: 44px; height: 44px; }
.todo-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.todo-history-entry { border-left: 2px solid var(--line); padding: 0 14px; margin: 0 0 16px; }
.todo-feedback-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 14px 0 6px; }
.todo-feedback-meta > div { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.todo-feedback-meta > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.todo-feedback-meta dt { color: var(--muted); }
.todo-feedback-meta dd { margin: 0; overflow-wrap: anywhere; }
.todo-detail-footer { position: fixed; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 14px 3vw; background: white; border-top: 1px solid var(--line); z-index: 131; }
.todo-detail-footer > div { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.todo-detail-footer small { color: var(--muted); }
.todo-attachments { display: flex; flex-wrap: wrap; gap: 12px; }
.todo-attachments img { width: 100px; height: 100px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; }
#formModal:has(#todo-create-form), #formModal:has(#todo-assessment-form), #formModal:has(#todo-snooze-form) { z-index: 160; }
#todo-assessment-form { display: grid; gap: 18px; }
.todo-standards table { width: 100%; margin-top: 14px; border-collapse: collapse; }
.todo-standards td, .todo-standards th { text-align: left; border-bottom: 1px solid var(--line); padding: 10px; }
.todo-standards pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; font-size: 12px; }
.todo-deduction { display: grid; grid-template-columns: 1fr 90px 2fr; gap: 12px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo-deduction > label { display: grid; gap: 6px; }
.todo-deduction > label:first-child { display: flex; align-items: center; padding-bottom: 8px; }
.todo-deduction input { min-width: 0; width: 100%; }
.todo-tabs button:focus-visible, .todo-detail button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 720px) {
  .todo-tabs-row { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .todo-tabs { gap: 7px; overflow-x: auto; max-width: 100%; }
  .todo-tabs button { font-size: 14px; padding: 12px 4px; }
  .todo-filters { gap: 10px; }
  .todo-filters label { flex: 1 1 130px; min-width: 0; }
  .todo-filters .todo-search { flex-basis: 100%; order: -1; }
  .todo-table-wrap { max-width: 100%; }
  .todo-table th, .todo-table td { padding: 14px 12px; }
  .todo-detail-content { padding: 20px 18px 180px; }
  .todo-detail h1 { font-size: 22px; }
  .todo-meta { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
  .todo-meta div, .todo-meta div:nth-child(3n+1) { padding: 0; border: 0; }
  .todo-meta dd { font-size: 13px; }
  .todo-stage-body { margin-left: 0; }
  .todo-two-fields, .todo-scope-grid { grid-template-columns: 1fr; gap: 14px; }
  .todo-detail-footer { padding: 14px 18px; gap: 10px; }
  .todo-detail-footer > div { gap: 10px; }
  .todo-deduction { grid-template-columns: 1fr 80px; }
  .todo-deduction > label:last-child { grid-column: 1 / -1; }
}

/* v655: compact backend registration only; no ecommerce/shared form restyling. */
#formModal:has(#recycleForm) { z-index: 150; }
body:has(#formModal:not([hidden]) #recycleForm) #imagePreviewOverlay { z-index: 160; }
#formModal:has(#recycleForm[data-recycle-stage="contract"]) .modal-panel { width: min(896px, 100%); }
#formModal:has(#recycleForm[data-recycle-stage="contract"]) .modal-header { min-height: 52px; padding-block: 8px; }
#recycleForm[data-recycle-stage="contract"] .recycle-stage-tabs { margin-bottom: 14px; padding-bottom: 12px; }
#recycleForm[data-recycle-stage="contract"] .contract-decision-card {
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
#recycleForm[data-recycle-stage="contract"] .contract-decision-options { margin-top: 12px; gap: 8px 10px; }
#recycleForm[data-recycle-stage="contract"] .contract-decision-option {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px 9px;
  box-sizing: border-box;
  min-height: 68px;
  padding: 9px 12px;
  border-radius: 6px;
}
#recycleForm[data-recycle-stage="contract"] .contract-decision-option > input { grid-row: 1 / 3; }
#recycleForm[data-recycle-stage="contract"] .contract-decision-option-copy strong { font-size: 13px; line-height: 1.45; font-weight: 600; }
#recycleForm[data-recycle-stage="contract"] .contract-decision-outcome {
  grid-column: 2;
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.45;
}
#recycleForm .contract-decision-result-description:empty { display: none; }
#recycleForm[data-recycle-stage="contract"] .appraisal-item-card { border: 0; border-radius: 0; padding: 0 0 14px; border-bottom: 1px solid var(--line); background: transparent; }
#recycleForm .recycle-item-head-actions { display: flex; align-items: center; gap: 12px; }
#recycleForm[data-recycle-stage="contract"] .appraisal-item-head { margin-bottom: 10px; min-height: 34px; }
#recycleForm[data-recycle-stage="contract"] .recycle-item-image-section { padding: 0; border: 0; margin: 0; }
#recycleForm .recycle-image-field.image-drop-zone { position: relative; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; cursor: pointer; }
#recycleForm .recycle-image-field > span:first-child { font-size: 13px; line-height: 1.5; }
#recycleForm .recycle-image-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 56px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--panel-soft);
}
#recycleForm .recycle-image-placeholder { color: var(--muted); font-size: 13px; }
#recycleForm .recycle-image-box input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
#recycleForm [data-recycle-image-preview] { position: absolute; inset: 1px; display: block; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: contain; background: #fff; }
#recycleForm [data-recycle-image-preview][hidden],
#recycleForm .recycle-image-placeholder[hidden] { display: none; }
#recycleForm .recycle-image-field .image-drop-status { min-height: 0; margin: 0; font-size: 11px; }
#recycleForm .recycle-image-field .image-drop-status:empty { display: none; }
#recycleForm .recycle-image-field .image-drop-clear { top: 27px; right: 5px; width: 24px; height: 24px; z-index: 1; }
#recycleForm .recycle-image-field:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
#recycleForm .recycle-image-field:focus-within .recycle-image-box,
#recycleForm .recycle-image-field:hover .recycle-image-box,
#recycleForm .recycle-image-field.is-drag-over .recycle-image-box { border-color: var(--blue); background: #f3f6ff; }
#recycleForm .recycle-image-field .wechat-review-image { width: 100%; height: 56px; min-height: 0; margin: 0; padding: 0; }
#recycleForm .recycle-image-field .wechat-review-image img { width: 100%; height: 100%; object-fit: contain; }
#recycleForm[data-recycle-stage="contract"] > .form-actions { padding-top: 8px; margin-top: 8px; }
#recycleForm[data-recycle-stage="contract"] [data-recycle-registration-next] { min-height: 36px; padding: 8px 16px; }
@media (max-width: 720px) {
  #recycleForm[data-recycle-stage="contract"] .contract-decision-options { grid-template-columns: 1fr; }
  #recycleForm .recycle-item-image-upload-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #recycleForm .recycle-image-box, #recycleForm .recycle-image-field .wechat-review-image { height: 64px; }
  #recycleForm .recycle-image-field > span:first-child { font-size: 12px; }
  #recycleForm .recycle-item-head-actions { gap: 8px; }
  #recycleForm .recycle-item-head-actions button { min-height: 40px; }
  #recycleForm[data-recycle-stage="contract"] [data-recycle-registration-next] { min-height: 44px; }
}

/* v657: selected compact registration layout; keep the original form controls. */
#recycleForm[data-recycle-stage="registration"] [data-recycle-contract-fields] { display: none; }
#recycleForm .recycle-contract-fields { display: grid; gap: 12px; }
#formModal:has(#recycleForm[data-recycle-stage="registration"]) .modal-panel { width: min(1120px, 100%); }
#recycleForm[data-recycle-stage="registration"] .recycle-customer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; }
#recycleForm .recycle-compact-section-title { margin: 0; font-size: 17px; line-height: 1.4; }
#recycleForm[data-recycle-stage="registration"] .recycle-customer-grid { padding: 0 0 14px; border-bottom: 1px solid var(--line); }
#recycleForm[data-recycle-stage="registration"] .recycle-source-attribution-editor[data-enabled="false"] { padding: 0; border: 0; background: transparent; }
#recycleForm[data-recycle-stage="registration"] .recycle-source-attribution-editor[data-enabled="false"] .recycle-source-attribution-title { justify-content: flex-end; }
#recycleForm[data-recycle-stage="registration"] .recycle-source-attribution-editor[data-enabled="false"] .recycle-source-attribution-title strong { display: none; }
#recycleForm[data-recycle-stage="registration"] .recycle-source-attribution-editor[data-enabled="false"] .recycle-source-attribution-title button { border: 0; padding: 0; min-height: 30px; background: transparent; color: var(--blue); }
#recycleForm[data-recycle-stage="registration"] .appraisal-item-card { padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: white; }
#recycleForm[data-recycle-stage="registration"] .appraisal-item-head { margin-bottom: 10px; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-grid { gap: 10px 16px; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-destination { grid-column: 1 / 4; grid-row: 2; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-valuation { grid-column: 4 / 7; grid-row: 2; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-description { grid-column: 7 / -1; grid-row: 2; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-image-section { padding: 0; margin: 0; border: 0; }
#recycleForm[data-recycle-stage="registration"] .recycle-image-box,
#recycleForm[data-recycle-stage="registration"] .recycle-image-field .wechat-review-image { height: 84px; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 14px; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-details,
#recycleForm[data-recycle-stage="registration"] .customer-payment-lines-section,
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-lines],
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child { display: contents; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-grid > h3 { grid-column: 1 / 9; grid-row: 1; align-self: center; }
#recycleForm[data-recycle-stage="registration"] .customer-payment-lines-section > .sales-form-section-head { grid-column: 9 / -1; grid-row: 1; padding: 0; margin: 0; justify-content: flex-end; }
#recycleForm[data-recycle-stage="registration"] .recycle-payable-field { grid-column: 1 / 6; grid-row: 2; }
#recycleForm[data-recycle-stage="registration"] .recycle-deposit-field { grid-column: 6 / 9; grid-row: 2; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentDate"]) { grid-column: 9 / -1; grid-row: 2; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentAccount"]) { grid-column: 1 / 4; grid-row: 3; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentLineAmount"]) { grid-column: 4 / 6; grid-row: 3; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-receipt-transaction-field { grid-column: 6 / -1; grid-row: 3; padding-right: 46px; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-remove-item { grid-column: 12; grid-row: 3; justify-self: end; align-self: end; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line] > .payment-internal-fields { grid-column: 1 / -1; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:not(:first-child) { grid-column: 1 / -1; grid-template-columns: 140px minmax(140px, 1fr) 120px minmax(220px, 2fr) 38px; }
#recycleForm[data-recycle-stage="registration"] .single-fee-payment-editor { border: 0; padding: 2px 0; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-summary .payment-reconcile-lines { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 6px 12px; border-color: #bcebdc; background: #edfbf5; color: var(--green); }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-summary .payment-reconcile-line { justify-content: flex-start; gap: 8px; padding: 0; min-height: 24px; border: 0; background: transparent; font-size: 14px; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-summary .payment-reconcile-line > span { text-align: left; font-size: 14px; }
#recycleForm[data-recycle-stage="registration"] .single-fee-payment-primary { grid-template-columns: minmax(145px, .75fr) minmax(180px, 1.15fr) minmax(250px, 2fr); gap: 14px; }
#recycleForm[data-recycle-stage="registration"] .single-fee-payment-primary > label { display: flex; align-items: center; gap: 10px; }
#recycleForm[data-recycle-stage="registration"] .single-fee-payment-primary > label > span { white-space: nowrap; }
#recycleForm[data-recycle-stage="registration"] .single-fee-payment-primary > label > input,
#recycleForm[data-recycle-stage="registration"] .single-fee-payment-primary > label > select { min-width: 0; flex: 1; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-details > label:has([name="sourceComplianceStatus"]) { grid-column: span 3; }
#recycleForm[data-recycle-stage="registration"] .recycle-remark-field { grid-column: span 9; }
#recycleForm[data-recycle-stage="registration"] .recycle-remark-field textarea { min-height: 38px; height: 38px; }
#recycleForm[data-recycle-stage="contract"] .recycle-payment-grid { display: block; }
#recycleForm[data-recycle-stage="contract"] .recycle-payment-details { display: none; }

@media (max-width: 800px) {
  #recycleForm[data-recycle-stage="registration"] .recycle-customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #recycleForm[data-recycle-stage="registration"] .recycle-item-field-destination,
  #recycleForm[data-recycle-stage="registration"] .recycle-item-field-valuation { grid-column: span 3; grid-row: auto; }
  #recycleForm[data-recycle-stage="registration"] .recycle-item-field-description { grid-column: span 6; grid-row: auto; }
  #recycleForm[data-recycle-stage="registration"] .recycle-payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #recycleForm[data-recycle-stage="registration"] .recycle-payment-grid > h3,
  #recycleForm[data-recycle-stage="registration"] .recycle-payable-field,
  #recycleForm[data-recycle-stage="registration"] .recycle-deposit-field,
  #recycleForm[data-recycle-stage="registration"] .recycle-payment-details > label,
  #recycleForm[data-recycle-stage="registration"] .recycle-payment-details > label:has([name="sourceComplianceStatus"]),
  #recycleForm[data-recycle-stage="registration"] .recycle-remark-field,
  #recycleForm[data-recycle-stage="registration"] .customer-payment-lines-section > .sales-form-section-head,
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label,
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentDate"]),
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentAccount"]),
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentLineAmount"]),
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-receipt-transaction-field,
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-remove-item { grid-row: auto; grid-column: 1 / -1; }
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-receipt-transaction-field { padding-right: 0; }
  #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:not(:first-child) { grid-template-columns: 1fr; }
  #recycleForm[data-recycle-stage="registration"] .single-fee-payment-primary { grid-template-columns: 1fr; }
  .todo-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-meta div, .todo-meta div:nth-child(5n+1) { padding: 0; border: 0; }
  .todo-sender-actions { margin-left: 0; }
  .todo-feedback-meta { grid-template-columns: 1fr; gap: 12px; }
  .todo-feedback-meta > div + div { padding-left: 0; border: 0; }
  .todo-stage-body .todo-reply-inline, .todo-reply-inline label { grid-template-columns: 1fr; }
  .todo-detail-footer { padding-inline: 18px; }
}

/* v663: the approved referral and help layouts; never restyle other departments. */
#formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) { z-index: 150; }
body:has(#formModal:not([hidden]) .backend-referral-detail) #imagePreviewOverlay { z-index: 160; }
#formModal:has(.backend-referral-form, .backend-referral-detail) .modal-panel { width: min(940px, 100%); }
#formModal:has(.help-question-form) .modal-panel { width: min(800px, 100%); }
#formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) .modal-header { min-height: 56px; padding: 12px 22px; }
#formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) .modal-header h2 { margin: 0; font-size: 20px; }
#formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) .modal-body { padding: 18px 22px; }
.backend-referral-form, .backend-referral-detail { display: grid; gap: 16px; }
.backend-referral-form h3, .backend-referral-detail h3 { margin: 0; font-size: 17px; }
.backend-referral-form label { display: grid; min-width: 0; gap: 7px; font-size: 13px; }
.backend-referral-form input, .backend-referral-form select, .backend-referral-form textarea { width: 100%; min-width: 0; }
.backend-referral-form textarea { min-height: 88px; resize: vertical; }
.backend-referral-note { margin: 0; padding: 11px 14px; background: var(--blue-soft); border-radius: 6px; font-size: 13px; color: #294578; line-height: 1.6; }
.backend-referral-source { display: grid; gap: 8px; min-width: 0; }
.backend-referral-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.backend-referral-evidence { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; }
.backend-referral-evidence input[type="file"] { width: auto; max-width: 100%; }
.backend-referral-evidence img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; }
.backend-referral-footer { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 14px; }
.backend-referral-footer button { min-width: 86px; min-height: 38px; }
.backend-referral-source-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.backend-referral-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.backend-referral-toolbar > div, .backend-referral-actions { display: flex; gap: 8px; align-items: center; }
.backend-referral-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13px; }
.backend-referral-table th, .backend-referral-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.backend-referral-table th { background: var(--panel-soft); font-weight: 600; white-space: nowrap; }
.backend-referral-actions { white-space: nowrap; }
.backend-referral-actions button { min-height: 32px; font-size: 13px; }
.backend-referral-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.backend-referral-detail-head strong { font-size: 21px; overflow-wrap: anywhere; }
.backend-referral-detail .backend-referral-grid p { margin: 5px 0 0; font-size: 14px; }
.backend-referral-description { margin: -7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 14px; }
.backend-referral-materials { display: flex; flex-wrap: wrap; gap: 10px; }
.backend-referral-materials .wechat-review-image { width: 130px; height: 120px; margin: 0; }
.backend-referral-detail > label { display: grid; gap: 8px; font-size: 13px; }
.backend-referral-detail > label textarea { width: 100%; min-height: 82px; }

#view-recycle .list-panel.recycle-help-active > :not(#recycleDashboardTabs):not(.dashboard-tab-panels) { display: none; }
.recycle-help-panel { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); overflow: hidden; }
.recycle-help-panel[hidden] { display: none; }
.recycle-help-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.recycle-help-scopes { display: flex; gap: 8px; }
.recycle-help-scopes button.is-active { background: var(--blue-soft); color: var(--blue); border-color: #b7ccff; }
.recycle-help-toolbar button { min-height: 38px; }
.recycle-help-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 0 16px 14px; }
.recycle-help-filters > input { width: 280px; }
.recycle-help-filters > .clearable-input { flex: 0 1 280px; width: 280px; min-width: 200px; }
.recycle-help-filters > .clearable-input > input { width: 100%; }
.recycle-help-filters > select { width: 170px; }
.recycle-help-filters label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.recycle-help-filters label input { width: 180px; }
.recycle-help-filters input, .recycle-help-filters select { min-height: 36px; }
.recycle-help-filters .text-button { min-height: 36px; }
.recycle-help-table-scroll { overflow-x: auto; }
.recycle-help-table { width: 100%; min-width: 1000px; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.recycle-help-table th { padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; background: var(--panel-soft); border-block: 1px solid var(--line); white-space: nowrap; }
.recycle-help-table td { height: 54px; padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.recycle-help-table th:nth-child(1), .recycle-help-table th:nth-child(5) { width: 156px; }
.recycle-help-table th:nth-child(2) { width: auto; }
.recycle-help-table th:nth-child(3) { width: 110px; }
.recycle-help-table th:nth-child(4) { width: 82px; }
.recycle-help-table th:nth-child(6) { width: 96px; }
.recycle-help-table th:nth-child(7) { width: 165px; }
.help-question-cell strong, .help-question-cell > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.6; }
.help-question-cell strong { font-weight: 600; }
.help-question-cell > span { color: var(--muted); font-size: 12px; }
.recycle-help-row-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.recycle-help-row-actions button { height: 32px; min-height: 32px; padding: 5px 14px; font-size: 13px; }
.recycle-help-reply-button { color: var(--blue); border-color: #c9d8ff; background: #f1f5ff; }
.recycle-help-panel .status-pill { display: inline-flex; justify-content: center; border-radius: 4px; padding: 4px 9px; font-size: 12px; white-space: nowrap; }
.recycle-help-panel .status-pill.is-complete { color: var(--green); background: var(--green-soft); }
.recycle-help-panel .status-pill.is-pending { color: var(--red); background: var(--red-soft); }
.recycle-help-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; color: var(--muted); font-size: 13px; }
.recycle-help-pagination > div { display: flex; align-items: center; gap: 6px; }
.recycle-help-pagination button { min-height: 34px; padding: 6px 11px; }
.recycle-help-pagination select { min-height: 34px; width: 108px; }
.recycle-help-detail { padding: 18px 22px; }
.recycle-help-detail-header { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; }
.recycle-help-detail-header h2 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.recycle-help-detail-header > button { margin-left: auto; flex-shrink: 0; }
.recycle-help-meta { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.recycle-help-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; }
.recycle-help-replies-heading { font-size: 17px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.recycle-help-answer { padding: 18px 0; border-bottom: 1px solid var(--line); }
.recycle-help-answer header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.recycle-help-answer header > span { font-size: 12px; color: var(--muted); }
.recycle-help-answer .recycle-help-credit { color: var(--green); }
.recycle-help-answer footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.recycle-help-actions { display: flex; align-items: center; gap: 12px; }
.recycle-help-share-toolbar { min-height: 76px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.recycle-help-share-toolbar .recycle-help-actions button { min-height: 44px; }
.recycle-help-share-form { display: grid; gap: 24px; --blue: #2563eb; padding: 38px 18px 14px; margin: 0; color: #16212b; }
.recycle-help-share-toolbar { --blue: #2563eb; }
.recycle-help-share-form h2 { margin: 0; font-size: 20px; line-height: 28px; }
.recycle-help-share-field { display: grid; gap: 8px; min-width: 0; font-size: 15px; line-height: 20px; }
.recycle-help-share-field > span { color: #16212b; font-size: 16px; }
.recycle-help-share-field.image-drop-zone { margin-top: 8px; padding: 0; border: 0; min-height: 0; }
.recycle-help-share-field .image-drop-status:empty { display: none; }
.recycle-help-share-toolbar .secondary-button { color: #2563eb; border-color: #80a1ff; }
.recycle-help-share-field i { color: var(--red); font-style: normal; }
.recycle-help-share-field > input, .recycle-help-share-field > textarea { width: 100%; min-width: 0; font-size: 16px; }
.recycle-help-share-field > input { min-height: 46px; }
.recycle-help-share-field > textarea { height: clamp(280px, calc(100dvh - 729px), 450px); min-height: 280px; padding: 12px 14px; line-height: 26px; resize: vertical; }
.recycle-help-share-upload { min-height: 78px; }
.recycle-help-share-upload > span { width: 156px; min-height: 78px; padding: 12px 18px; }
.recycle-help-share-upload input[type="file"] { width: 156px; height: 78px; }
.recycle-help-share-form [data-help-share-attachments]:empty, .recycle-help-share-form .form-status:empty { display: none; }
.recycle-help-share-form .form-status { margin: 0; font-size: 13px; }
.recycle-help-share-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: -4px; padding-top: 16px; border-top: 1px solid var(--line); }
.recycle-help-share-footer button { min-width: 88px; min-height: 46px; }
.recycle-help-share-footer button[data-help-action="share-save"], .recycle-help-share-footer button[data-help-action="share-publish"] { min-width: 120px; }
.recycle-help-share-form button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 720px) {
  .recycle-help-share-toolbar { min-height: 0; padding: 12px; gap: 12px; }
  .recycle-help-actions { flex-wrap: wrap; gap: 8px; }
  .recycle-help-share-form { padding: 20px 12px 14px; gap: 20px; }
  .recycle-help-share-field > textarea { height: 280px; }
  .recycle-help-share-footer { flex-wrap: wrap; gap: 8px; }
  .recycle-help-share-footer button { min-width: 0; flex: 1; }
  .recycle-help-share-footer button[data-help-action="share-save"], .recycle-help-share-footer button[data-help-action="share-publish"] { min-width: 0; }
}
.help-question-form { display: grid; gap: 18px; }
.help-question-field { display: grid; grid-template-columns: 102px minmax(0, 1fr); align-items: start; gap: 14px; font-size: 14px; }
.help-question-field > span { padding-top: 9px; font-weight: 600; }
.help-question-field i, .help-question-method i { color: var(--red); font-style: normal; }
.help-question-field input, .help-question-field textarea { width: 100%; min-width: 0; }
.help-question-field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.help-question-method { border: 0; padding: 0 0 0 116px; margin: 0; min-width: 0; position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.help-question-method legend { position: absolute; left: 0; top: 6px; font-size: 14px; font-weight: 600; }
.help-question-method label { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 14px; }
.help-question-method input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.help-question-method small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.help-question-upload { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.help-question-upload > span { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border: 1px dashed var(--line-strong); border-radius: 5px; color: var(--blue); }
.help-question-upload input[type="file"] { position: absolute; left: 0; top: 0; width: 132px; height: 46px; opacity: 0; cursor: pointer; }
.help-question-upload:focus-within > span { outline: 2px solid var(--blue); outline-offset: 2px; }
.help-question-upload small { color: var(--muted); }
.help-question-field.image-drop-zone { padding: 0; border: 0; background: transparent; box-shadow: none; }
.help-question-field .image-drop-status { grid-column: 2; min-height: 0; margin: 0; font-size: 12px; }
.help-question-field .image-drop-status:empty { display: none; }
.help-question-field .image-drop-clear { top: 8px; right: 8px; }
.backend-referral-evidence.image-drop-zone { padding: 0; border: 0; background: transparent; box-shadow: none; }
.backend-referral-evidence .image-drop-status:empty { display: none; }
.help-question-note { margin: -8px 0 0 116px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.help-question-knowledge-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-question-knowledge-meta label { display: grid; gap: 6px; font-size: 13px; }
.help-question-form > .form-status:empty { display: none; }
.help-question-form-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.help-question-form-actions button { min-width: 88px; min-height: 40px; }
.recycle-help-panel button:focus-visible, .backend-referral-form button:focus-visible, .help-question-form button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 720px) {
  #formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) { padding: 12px; }
  #formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) .modal-panel { max-height: calc(100dvh - 24px); }
  #formModal:has(.backend-referral-form, .backend-referral-detail, .help-question-form) .modal-body { padding: 16px; }
  .backend-referral-grid { grid-template-columns: 1fr; }
  .backend-referral-footer { flex-wrap: wrap; }
  .backend-referral-toolbar { flex-wrap: wrap; }
  .recycle-help-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .recycle-help-scopes { gap: 5px; }
  .recycle-help-scopes button { padding-inline: 9px; font-size: 13px; }
  .recycle-help-filters > input { width: 100%; }
  .recycle-help-filters > .clearable-input { flex-basis: 100%; width: 100%; }
  .recycle-help-filters > select, .recycle-help-filters label { flex: 1 1 130px; }
  .recycle-help-filters label input { width: 100%; }
  .recycle-help-pagination { flex-wrap: wrap; }
  .recycle-help-pagination > div { max-width: 100%; overflow-x: auto; }
  .recycle-help-pagination button { white-space: nowrap; min-height: 40px; }
  .recycle-help-detail { padding: 16px; }
  .recycle-help-detail-header { flex-wrap: wrap; }
  .recycle-help-detail-header h2 { font-size: 18px; }
  .recycle-help-answer header { flex-wrap: wrap; gap: 8px; }
  .help-question-field { grid-template-columns: 1fr; gap: 7px; }
  .help-question-field > span { padding-top: 0; }
  .help-question-field .image-drop-status { grid-column: 1; }
  .help-question-method { padding-left: 0; padding-top: 30px; }
  .help-question-method legend { top: 0; }
  .help-question-note { margin-left: 0; }
  .help-question-knowledge-meta { grid-template-columns: 1fr; }
  .help-question-form-actions button { min-height: 44px; }
}

/* v664: approved work-todo mockups. Scope every rule to this module/page. */
body:has(#view-workTodos.is-active) .topbar #viewTitle { visibility: hidden; }
#view-workTodos .todo-list {
  --todo-blue: #075cff;
  color: #152139;
  background: #fff;
  border-radius: 6px;
  padding: 18px 20px 22px;
  font-size: 18px;
}
#view-workTodos .todo-list-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
#view-workTodos .todo-list-header h1 { margin: 0; font-size: 28px; line-height: 1.4; }
#view-workTodos .todo-list-header button { color: var(--todo-blue); border-color: var(--todo-blue); min-height: 44px; padding: 8px 18px; font-size: 18px; }
#view-workTodos .todo-tabs-row { margin: 0 0 24px; }
#view-workTodos .todo-tabs { gap: 26px; }
#view-workTodos .todo-tabs button { padding: 12px 10px; font-size: 20px; font-weight: 600; }
#view-workTodos .todo-tabs button.is-active { color: var(--todo-blue); border-bottom-color: var(--todo-blue); }
#view-workTodos .todo-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 24px; }
#view-workTodos .todo-filters .todo-filter-field { display: flex; align-items: center; gap: 10px; flex: 1 1 190px; min-width: 0; color: #152139; font-size: 17px; }
#view-workTodos .todo-filter-field > span { white-space: nowrap; flex: none; }
#view-workTodos .todo-filter-field > .clearable-input { flex: 1; width: 0; min-width: 0; }
#view-workTodos .todo-filter-field > .clearable-input input { width: 100%; }
#view-workTodos .todo-filter-field:has([data-todo-filter="status"]) { flex: 0 1 142px; }
#view-workTodos .todo-filter-field.todo-search { flex: 1.2 1 215px; }
#view-workTodos .todo-filter-field:has([data-todo-filter="senderId"]) { flex: 1 1 172px; }
#view-workTodos .todo-filters input, #view-workTodos .todo-filters select { height: 44px; flex: 1; width: 0; font-size: 17px; color: #152139; border-color: #cbd7e8; }
#view-workTodos .todo-filters [data-todo-action="reset-filters"] { height: 44px; min-width: 72px; padding: 6px 12px; font-size: 17px; }
#view-workTodos .todo-filters .todo-date-range { display: flex; align-items: center; gap: 10px; flex: 1.4 1 300px; min-width: 0; font-size: 17px; color: #152139; }
#view-workTodos .todo-date-range > span { white-space: nowrap; }
#view-workTodos .todo-date-range-controls { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 0 8px; border: 1px solid #cbd7e8; border-radius: 5px; }
#view-workTodos .todo-date-range-controls input { border: 0; padding: 6px 0; min-width: 0; flex: 1; background: transparent; }
#view-workTodos .todo-table-wrap { border-color: #dce5f0; border-radius: 5px; }
#view-workTodos .todo-table { min-width: 100%; table-layout: fixed; font-size: 18px; }
#view-workTodos .todo-table th { position: relative; height: 54px; background: #f3f7fa; color: #152139; font-weight: 500; padding: 12px 16px; border-right: 1px solid #e1e8f1; }
#view-workTodos .todo-table td { height: 92px; padding: 14px 16px; border-top: 1px solid #e1e8f1; border-right: 1px solid #e1e8f1; min-width: 0; overflow: hidden; }
#view-workTodos .todo-table th:last-child, #view-workTodos .todo-table td:last-child { border-right: 0; }
#view-workTodos .todo-table td:first-child, #view-workTodos .todo-table td:nth-child(2) { min-width: 0; }
#view-workTodos .todo-table td small { color: #65738b; font-size: 17px; line-height: 1.6; }
#view-workTodos .todo-table td:first-child small { color: #152139; }
#view-workTodos .todo-title-text { font-weight: 500; line-height: 1.5; }
#view-workTodos .todo-row-actions { flex-wrap: nowrap; gap: 10px; }
#view-workTodos .todo-row-actions button, #view-workTodos .todo-stage-button { padding: 8px 12px; min-height: 42px; font-size: 16px; border-radius: 4px; }
#view-workTodos .todo-stage-button { border-color: var(--todo-blue); color: var(--todo-blue); background: #fff; }
#view-workTodos .todo-row-actions .text-button { border: 0; background: transparent; color: var(--todo-blue); padding: 7px 0; }
#view-workTodos .todo-row-actions .primary-button { background: var(--todo-blue); border-color: var(--todo-blue); white-space: nowrap; }
#view-workTodos .todo-score-button { background: #f0f5ff; border-color: #8ab2ff; color: var(--todo-blue); }
#view-workTodos .todo-score-button.is-linked { background: #f1f3f6; border-color: #d6ddea; color: #69778e; }
#view-workTodos .todo-badges { flex-wrap: wrap; gap: 6px; }
#view-workTodos .todo-badge { font-size: 16px; padding: 4px 8px; }
#view-workTodos .todo-pagination { align-items: center; justify-content: space-between; margin-top: 22px; gap: 12px; color: #65738b; }
#view-workTodos .todo-pagination :is(button,select) { font-size: 17px; min-height: 42px; }
#view-workTodos .todo-list-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; font-size: 17px; margin: 0; }
#view-workTodos .todo-pagination .lead-list-page-number.is-active { color: var(--todo-blue); background: white; border-color: var(--todo-blue); }
#view-workTodos .todo-list-summary small { font-size: 15px; }
#view-workTodos .todo-list-note { margin: 20px 0 0; color: #65738b; font-size: 16px; }
#view-workTodos .todo-table .column-resizer { right: -4px; width: 8px; }
#view-workTodos .todo-table th:last-child .column-resizer { right: 0; }

#workTodoDetail { --todo-blue: #075cff; --line: #d5e0ee; --muted: #667993; color: #152139; }
body:has(#workTodoDetail) #imagePreviewOverlay { z-index: 180; }
#workTodoDetail .text-button { color: var(--todo-blue); }
#workTodoDetail .primary-button { background: var(--todo-blue); border-color: var(--todo-blue); }
#workTodoDetail .secondary-button { border-color: var(--todo-blue); color: var(--todo-blue); background: #fff; }
#workTodoDetail .todo-back { font-size: 20px; padding: 0; min-height: 30px; margin-bottom: 24px; }
#workTodoDetail .todo-detail-heading { margin: 0 0 22px; gap: 16px; }
#workTodoDetail h1 { font-size: 30px; line-height: 1.35; }
#workTodoDetail .todo-badge { font-size: 19px; padding: 5px 10px; }
#workTodoDetail .todo-detail-content { padding: 22px 2.8vw 40px; }
#workTodoDetail .todo-detail-top { align-items: flex-start; margin-bottom: 12px; }
#workTodoDetail .todo-detail-top .todo-back { margin-bottom: 0; }
#workTodoDetail .todo-sender-actions { gap: 16px; align-items: center; }
#workTodoDetail .todo-sender-actions .secondary-button { padding: 6px 18px; min-height: 42px; font-size: 18px; }
#workTodoDetail .todo-more-actions { position: relative; font-size: 19px; }
#workTodoDetail .todo-more-actions > summary { cursor: pointer; list-style: none; padding: 7px 0; white-space: nowrap; }
#workTodoDetail .todo-more-actions > summary::-webkit-details-marker { display: none; }
#workTodoDetail .todo-more-menu { position: absolute; top: 100%; right: 0; min-width: 160px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: white; z-index: 2; box-shadow: 0 6px 20px #19324a14; display: grid; gap: 4px; }
#workTodoDetail .todo-more-menu button { padding: 8px; text-align: left; }
#workTodoDetail .todo-detail-metadata { grid-template-columns: repeat(3,minmax(0,1fr)); padding-bottom: 24px; margin-bottom: 0; }
#workTodoDetail .todo-detail-metadata dt { font-size: 19px; }
#workTodoDetail .todo-detail-metadata dd { font-size: 20px; margin-top: 8px; }
#workTodoDetail .todo-detail-metadata > div { padding: 0 28px; }
#workTodoDetail .todo-detail-metadata > div:first-child { padding-left: 0; }
#workTodoDetail .todo-member-tabs { gap: 18px; margin: 12px 0 24px; font-size: 19px; }
#workTodoDetail .todo-member-tabs > span { color: var(--muted); }
#workTodoDetail .todo-member-tabs button { font-size: 19px; font-weight: 600; padding: 14px; }
#workTodoDetail .todo-detail-columns { grid-template-columns: minmax(0,43%) minmax(0,1fr); gap: 26px; }
#workTodoDetail .todo-submitted-records { padding-left: 26px; }
#workTodoDetail .todo-detail-columns h2 { font-size: 24px; }
#workTodoDetail .todo-detail-columns p { font-size: 20px; line-height: 1.55; margin: 10px 0 16px; }
#workTodoDetail .todo-requirements > p { margin: 18px 0 24px; }
#workTodoDetail .todo-record-section { padding-bottom: 16px; margin-bottom: 16px; }
#workTodoDetail .todo-record-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
#workTodoDetail .todo-record-section small { font-size: 18px; }
#workTodoDetail .todo-history-entry { border: 0; padding: 0; margin-bottom: 12px; }
#workTodoDetail .todo-history-entry p { margin: 3px 0 10px; }
#workTodoDetail .todo-reply-inline { display: flex; align-items: flex-end; gap: 12px; }
#workTodoDetail .todo-reply-inline label { display: grid; grid-template-columns: 1fr; gap: 6px; }
#workTodoDetail .todo-reply-inline label { font-size: 18px; }
#workTodoDetail .todo-reply-inline textarea { min-height: 52px; height: 52px; font-size: 19px; }
#workTodoDetail .todo-reply-inline button { min-height: 52px; padding: 8px 18px; font-size: 19px; }
#workTodoDetail .todo-attachments { gap: 10px; }
#workTodoDetail .todo-attachments-label { width: 100%; color: var(--muted); font-size: 18px; }
#workTodoDetail .todo-requirements .todo-attachments { align-items: flex-start; }
#workTodoDetail .todo-file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: #152139; text-decoration: none; background: #f3f7fb; border: 1px solid #d9e5f2; border-radius: 4px; padding: 10px 14px; font-size: 20px; overflow-wrap: anywhere; }
#workTodoDetail .todo-file-chip .todo-file-icon { color: var(--todo-blue); flex: none; }
#workTodoDetail .todo-file-chip button { min-height: 24px; padding: 0 4px; border: 0; background: transparent; color: #65738b; }
#workTodoDetail .todo-detail-status:empty { display: none; }
#workTodoDetail .todo-detail-footer { position: static; margin: 24px 2.8vw 0; padding: 14px 0; }
#workTodoDetail .todo-detail-footer:empty { display: none; }

#workTodoDetail.todo-action-page { padding: 18px 3.2vw; background: #f1f7fb; }
#workTodoDetail .todo-action-content { max-width: none; margin: 0; width: 100%; padding: 22px 26px; border: 1px solid #dfebf5; border-radius: 5px; background: white; }
#workTodoDetail .todo-action-content .todo-detail-heading { margin: 0 0 22px; }
#workTodoDetail .todo-action-content h1 { font-size: 38px; }
#workTodoDetail .todo-action-task { gap: 0; font-size: 22px; margin-bottom: 8px; }
#workTodoDetail .todo-action-task strong { font-size: 24px; }
#workTodoDetail .todo-action-person { padding-left: 18px; margin-left: 18px; border-left: 1px solid #bdcbdc; }
#workTodoDetail .todo-action-content .todo-hint { font-size: 21px; margin: 8px 0 16px; }
#workTodoDetail .todo-action-requirements { padding: 14px 20px; background: #f3f7fa; font-size: 21px; margin: 0 0 22px; line-height: 1.55; }
#workTodoDetail .todo-action-form { gap: 22px; }
#workTodoDetail .todo-action-form > label, #workTodoDetail .todo-two-fields > label { gap: 7px; }
#workTodoDetail .todo-action-form > label > span, #workTodoDetail .todo-two-fields > label > span { font-size: 22px; font-weight: 500; color: #152139; }
#workTodoDetail .todo-textarea-field { position: relative; }
#workTodoDetail .todo-textarea-field textarea { font-size: 21px; line-height: 1.5; padding: 12px 16px 28px; height: 124px; min-height: 110px; border-color: #ccd9ea; resize: vertical; }
#workTodoDetail .todo-textarea-field textarea[rows="2"] { height: 100px; min-height: 88px; }
#workTodoDetail .todo-field-counter { position: absolute; bottom: 10px; right: 20px; font-size: 16px !important; color: var(--muted) !important; pointer-events: none; }
#workTodoDetail .todo-action-form .todo-time-toggle { font-size: 22px; gap: 12px; }
#workTodoDetail .todo-time-toggle input { height: 23px; width: 23px; }
#workTodoDetail .todo-two-fields { grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
#workTodoDetail .todo-two-fields input { height: 56px; border-color: #ccd9ea; font-size: 21px; }
#workTodoDetail .todo-inline-note { padding: 10px 16px; font-size: 20px; background: #edf4ff; color: var(--todo-blue); margin: 14px 0 0; }
#workTodoDetail .todo-action-attachment { display: flex !important; align-items: center; gap: 18px !important; flex-wrap: wrap; }
#workTodoDetail .todo-attachment-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; min-width: 0; }
#workTodoDetail .todo-attachment-picker.image-drop-zone { padding: 0; border: 0; background: transparent; box-shadow: none; }
#workTodoDetail .todo-attachment-picker > .image-drop-clear { display: none; }
#workTodoDetail .todo-action-attachment { font-size: 21px; }
#workTodoDetail .todo-add-attachment { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; color: var(--todo-blue); border: 1px dashed var(--todo-blue); border-radius: 4px; cursor: pointer; font-size: 21px; min-height: 54px; }
#workTodoDetail .todo-add-attachment:focus-visible { outline: 2px solid var(--todo-blue); outline-offset: 3px; }
#workTodoDetail .todo-attachment-files { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#workTodoDetail .todo-action-footer { gap: 14px; margin: 0; padding-top: 18px; }
#workTodoDetail .todo-action-footer small { font-size: 20px; }
#workTodoDetail .todo-action-footer button { min-width: 126px; min-height: 56px; font-size: 22px; padding: 10px 22px; }
#workTodoDetail [role="status"]:empty { display: none; }

#workTodoDetail .todo-assessment-content { padding: 26px 2.8vw; }
#workTodoDetail .todo-assessment-content > h1 { font-size: 46px; }
#workTodoDetail .todo-assessment-title { font-size: 32px; margin: 26px 0 12px; line-height: 1.5; }
#workTodoDetail .todo-assessment-description { color: var(--muted); font-size: 23px; margin: 0 0 24px; }
#workTodoDetail .todo-assessment-layout.is-multi { grid-template-columns: minmax(220px,22%) minmax(0,1fr); gap: 28px; margin-top: 24px; }
#workTodoDetail .todo-assessment-people { padding-right: 26px; }
#workTodoDetail .todo-assessment-people > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 18px; border-bottom: 1px solid var(--line); }
#workTodoDetail .todo-assessment-people h2 { font-size: 25px; margin: 0; }
#workTodoDetail .todo-assessment-people small { font-size: 20px; }
#workTodoDetail .todo-assessment-people > button { border-radius: 0; padding: 18px 16px; margin: 0; gap: 9px; border-left: 4px solid transparent; color: #152139; font-size: 24px; }
#workTodoDetail .todo-assessment-people > button.is-active { border-left-color: var(--todo-blue); background: #eef5ff; color: #152139; }
#workTodoDetail .todo-assessment-people > button.is-active > small:last-child { color: var(--todo-blue); }
#workTodoDetail .todo-assessment-form { gap: 0; min-width: 0; }
#workTodoDetail .todo-assessment-form > h2 { display: flex; align-items: center; gap: 14px; font-size: 28px; }
#workTodoDetail .todo-assessment-controls { margin: 20px 0 24px; align-items: center; gap: 24px; }
#workTodoDetail .todo-assessment-controls label { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; font-size: 23px; }
#workTodoDetail .todo-assessment-controls label span { white-space: nowrap; }
#workTodoDetail .todo-assessment-controls input { height: 60px; flex: 1; min-width: 0; font-size: 23px; }
#workTodoDetail .todo-assessment-controls button { font-size: 23px; min-height: 60px; padding: 10px 22px; }
#workTodoDetail .todo-assessment-layout.is-multi .todo-assessment-controls label { flex: 0 1 410px; }
#workTodoDetail .todo-deduction-table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; font-size: 23px; }
#workTodoDetail .todo-deduction-table th { background: #f3f7fa; color: #152139; font-weight: 500; padding: 16px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
#workTodoDetail .todo-deduction-table td { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
#workTodoDetail .todo-deduction-table tr:last-child td { border-bottom: 0; }
#workTodoDetail .todo-deduction-table :is(th,td):last-child { border-right: 0; }
#workTodoDetail .todo-deduction-table th:first-child { width: 80px; white-space: nowrap; padding: 16px 10px; text-align: center; }
#workTodoDetail .todo-deduction-table th:nth-child(2) { width: 18%; }
#workTodoDetail .todo-deduction-table th:nth-child(3) { width: 23%; }
#workTodoDetail .todo-deduction-table input[type="checkbox"] { width: 27px; height: 27px; margin: 0; accent-color: var(--todo-blue); }
#workTodoDetail .todo-deduction-table input:not([type="checkbox"]) { height: 56px; padding: 8px 14px; font-size: 23px; border-color: #ccd9ea; }
#workTodoDetail .todo-points-field { display: flex; align-items: center; gap: 12px; }
#workTodoDetail .todo-points-field input { flex: 1; min-width: 0; }
#workTodoDetail .todo-deduction-table input:disabled { background: #f0f3f7; color: #8b99ad; opacity: 1; }
#workTodoDetail .todo-score-total { margin: 22px 0; font-size: 24px; }
#workTodoDetail .todo-score-total strong { font-size: 36px; color: var(--todo-blue); padding: 0 5px; }
#workTodoDetail .todo-assessment-form .todo-action-footer { padding-top: 18px; }

@media (max-width: 900px) {
  #view-workTodos .todo-filters { gap: 12px; }
  #view-workTodos .todo-filters .todo-filter-field { flex-basis: 220px; }
  #view-workTodos .todo-table { min-width: 950px; }
  #workTodoDetail .todo-detail-columns { grid-template-columns: 1fr; }
  #workTodoDetail .todo-submitted-records { border: 0; padding: 0; }
  #workTodoDetail .todo-assessment-layout.is-multi { grid-template-columns: 1fr; }
  #workTodoDetail .todo-assessment-people { border: 0; padding: 0; }
  #workTodoDetail .todo-assessment-people > button { display: inline-grid; width: auto; min-width: 150px; }
  #workTodoDetail .todo-assessment-controls { flex-wrap: wrap; gap: 14px; }
  #workTodoDetail #todoDeductions { overflow-x: auto; }
  #workTodoDetail .todo-deduction-table { min-width: 680px; }
}
@media (max-width: 600px) {
  #view-workTodos .todo-list { padding: 16px 12px; }
  #view-workTodos .todo-list-header h1 { font-size: 24px; }
  #view-workTodos .todo-tabs { gap: 4px; }
  #view-workTodos .todo-tabs button { font-size: 14px; padding-inline: 5px; }
  #view-workTodos .todo-filters .todo-filter-field { flex-basis: 100%; }
  #view-workTodos .todo-pagination { flex-wrap: wrap; }
  #workTodoDetail .todo-detail-content, #workTodoDetail .todo-assessment-content { padding: 18px 16px; }
  #workTodoDetail .todo-detail-top { flex-wrap: wrap; gap: 12px; }
  #workTodoDetail .todo-detail-metadata { grid-template-columns: 1fr; gap: 12px; }
  #workTodoDetail .todo-detail-metadata > div { padding: 0; border: 0; }
  #workTodoDetail .todo-detail-heading h1, #workTodoDetail .todo-assessment-content > h1 { font-size: 26px; }
  #workTodoDetail .todo-assessment-title { font-size: 20px; }
  #workTodoDetail.todo-action-page { padding: 12px; }
  #workTodoDetail .todo-action-content { padding: 18px 16px; }
  #workTodoDetail .todo-action-task { gap: 8px; }
  #workTodoDetail .todo-action-person { border: 0; padding: 0; margin: 0; flex-basis: 100%; }
  #workTodoDetail .todo-two-fields { grid-template-columns: 1fr; }
  #workTodoDetail .todo-action-footer { flex-wrap: wrap; }
  #workTodoDetail .todo-action-footer small { flex-basis: 100%; }
  #workTodoDetail .todo-action-footer button { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }
  #workTodoDetail .todo-assessment-controls label { flex-basis: 100%; }
  #workTodoDetail .todo-assessment-controls button { width: 100%; }
}
.call-transcription-panel, #callTranscriptionConfigForm { overflow-wrap: anywhere; }
.call-transcription-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.call-transcription-head strong { color: var(--primary, #4658f8); }
.call-transcription-head small { color: var(--muted, #64748b); }
.call-transcription-segments { display: grid; gap: 10px; max-height: 52vh; overflow: auto; }
.call-transcription-segments section { background: var(--surface, #f7f9fd); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.call-transcription-segments small { color: var(--muted, #64748b); }
.call-transcription-segments p, .call-transcription-text { white-space: pre-wrap; line-height: 1.7; }
.call-transcription-cost-note { border: 1px solid #f4d7a2; border-radius: 8px; background: #fffbf3; padding: 12px; }
#callTranscriptionConfigForm [hidden] { display: none !important; }
@media (max-width: 600px) {
  .call-transcription-panel button, #callTranscriptionConfigForm button { min-height: 44px; }
  .call-transcription-panel .form-actions, #callTranscriptionConfigForm .form-actions { flex-wrap: wrap; }
}
/* Monthly performance's read-only overlay never replaces the shared form modal. */
.modal-backdrop.hr-backend-order-backdrop { z-index: 160; }
#recycleForm [data-recycle-sales-referral-field][hidden],
#recycleForm [data-recycle-sales-referral-change-reason][hidden],
#recycleForm [data-recycle-sales-referral-source-note][hidden] { display: none !important; }
.hr-backend-order-footer { padding: 12px 16px; margin: 0; border-top: 1px solid var(--line); justify-content: flex-end; }
.hr-backend-order-backdrop .modal-body { min-height: 0; }
.hr-backend-order-backdrop .visit-record-detail-card p { overflow-wrap: anywhere; }

/* Appraiser quotation evidence: selected local-material layout, separate from chats. */
.appraiser-quote-panel { scroll-margin-top: 20px; }
.detail-workbench.appraiser-quote-workbench { grid-template-columns: minmax(0, 1fr); }
.appraiser-quote-workbench .detail-main { min-width: 0; }
.appraiser-quote-lead-item-summary { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.appraiser-quote-customer-heading { margin: 0 0 14px; font-size: 19px; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; }
.appraiser-quote-tab-card .detail-tabs { margin-bottom: 16px; }
.appraiser-quote-form > h3 { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 16px; }
.appraiser-quote-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.appraiser-quote-editor-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr); gap: 22px; }
.appraiser-quote-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; align-content: start; }
.appraiser-quote-fields label, .appraiser-quote-upload, .appraiser-quote-conversion-upload { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.appraiser-quote-fields label > span { font-size: 13px; color: var(--muted); }
.appraiser-quote-fields .full { grid-column: 1 / -1; }
.appraiser-quote-fields input, .appraiser-quote-fields select, .appraiser-quote-fields textarea { width: 100%; box-sizing: border-box; min-width: 0; }
.appraiser-quote-upload { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; align-self: stretch; justify-content: flex-start; }
.appraiser-quote-upload strong { font-size: 14px; }
.appraiser-quote-upload small, .appraiser-quote-conversion-upload small, [data-quote-file-names] { color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.appraiser-quote-upload-target.image-drop-zone, .appraiser-quote-upload-target { position: relative; display: flex; flex: 1; min-height: 150px; align-items: center; justify-content: center; flex-direction: column; gap: 12px; margin-top: 8px; padding: 20px 14px; border: 1px dashed #cbd6e6; border-radius: 6px; cursor: pointer; text-align: center; }
.appraiser-quote-upload-target > span { font-size: 14px; color: var(--text); }
.appraiser-quote-upload-target input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; cursor: pointer; z-index: 1; }
.appraiser-quote-upload-target > svg, .appraiser-quote-upload-target > span, .appraiser-quote-upload-target > small { pointer-events: none; }
.appraiser-quote-upload-target .todo-file-icon { width: 28px; height: 28px; color: var(--text); flex: 0 0 auto; }
.appraiser-quote-upload-target .image-drop-clear { top: 8px; right: 8px; }
.appraiser-quote-upload-target .image-drop-status { margin: 0; min-height: 0; }
.appraiser-quote-upload-target .image-drop-status:empty, [data-quote-file-names]:empty { display: none; }
.appraiser-quote-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.appraiser-quote-form-actions .muted { font-size: 12px; }
.appraiser-quote-form > .form-status { min-height: 0; margin: 10px 0 0; }
.appraiser-quote-form > .form-status:empty { display: none; }
.appraiser-quote-history-head { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.appraiser-quote-history-head h3 { margin: 0; font-size: 15px; }
.appraiser-quote-history-head > span { font-size: 12px; color: var(--muted); }
.appraiser-quote-history-head > button { margin-left: auto; }
.appraiser-quote-record { display: grid; grid-template-columns: minmax(96px, 145px) minmax(140px, 1fr) minmax(170px, .85fr); gap: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-top: 12px; align-items: center; }
.appraiser-quote-thumbnails { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.appraiser-quote-thumbnail { width: 65px; height: 84px; border: 1px solid var(--line); background: #f7f9fc; padding: 0; border-radius: 5px; overflow: hidden; cursor: pointer; }
.appraiser-quote-thumbnail img { width: 100%; height: 100%; object-fit: contain; display: block; }
.appraiser-quote-thumbnail:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.appraiser-quote-no-image { font-size: 12px; }
.appraiser-quote-record-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.65; }
.appraiser-quote-record-main > strong { font-size: 13px; }
.appraiser-quote-price { font-size: 21px; font-weight: 700; line-height: 1.4; color: var(--text); }
.appraiser-quote-record-main p { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.appraiser-quote-record-meta { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.appraiser-quote-image-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.appraiser-quote-image-actions .text-button { font-size: 12px; padding: 0; white-space: nowrap; }
.appraiser-quote-source { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.appraiser-quote-source > span, .appraiser-quote-source > small { font-size: 12px; color: var(--muted); }
.appraiser-quote-source > small { flex-basis: 100%; }
.appraiser-quote-group { margin-top: 18px; }
.appraiser-quote-group > header { display: flex; gap: 12px; padding: 12px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.appraiser-quote-group > header span { color: var(--muted); }
.appraiser-quote-viewer .appraiser-quote-record { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; }
#formModal:has([data-visit-appraiser-quote-viewer]) > .modal-panel { width: min(640px, calc(100vw - 40px)); }
@media (min-width: 901px) {
  .appraiser-quote-viewer .appraiser-quote-record { grid-template-columns: minmax(125px, 1fr) 84px minmax(120px, .85fr); gap: 18px; }
  .appraiser-quote-viewer .appraiser-quote-record-main { order: 1; }
  .appraiser-quote-viewer .appraiser-quote-thumbnails { order: 2; justify-content: center; }
  .appraiser-quote-viewer .appraiser-quote-record-meta { order: 3; }
  .appraiser-quote-viewer .appraiser-quote-image-actions { gap: 6px 9px; }
  .appraiser-quote-viewer .appraiser-quote-image-actions > .text-button:first-of-type { flex-basis: 100%; text-align: left; }
}
.appraiser-quote-conversion { margin-top: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; }
.appraiser-quote-conversion > strong { font-size: 14px; }
.appraiser-quote-conversion > p { margin: 8px 0 14px; font-size: 13px; }
.appraiser-quote-conversion-upload input[type="file"] { width: 100%; }
.appraiser-quote-order-entry { align-self: flex-start; }
@media (max-width: 900px) {
  .appraiser-quote-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .appraiser-quote-upload { min-height: 150px; }
  .appraiser-quote-record { grid-template-columns: 100px minmax(0, 1fr); }
  .appraiser-quote-record-meta { grid-column: 2; }
}
@media (max-width: 600px) {
  .appraiser-quote-fields { grid-template-columns: minmax(0, 1fr); }
  .appraiser-quote-record { grid-template-columns: 85px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .appraiser-quote-price { font-size: 19px; }
  .appraiser-quote-image-actions { gap: 12px; }
  .appraiser-quote-image-actions .text-button { min-height: 44px; }
  .appraiser-quote-form-actions button { min-height: 44px; }
  #formModal:has([data-visit-appraiser-quote-viewer]) > .modal-panel { width: calc(100vw - 24px); }
}
@media (max-width: 600px) {
  .hr-backend-order-backdrop { padding: 12px; }
  .hr-backend-order-backdrop .modal-panel { max-height: calc(100dvh - 24px); }
  .hr-backend-order-backdrop button { min-height: 44px; min-width: 44px; }
  .hr-backend-order-backdrop .modal-header h2 { font-size: 18px; }
}

/* v689: the four primary visit summaries use one content band and one action baseline. */
#visitOrderTable .visit-summary-toolbar-cell {
  display: grid;
  grid-template-rows: 48px 40px;
  gap: 8px;
  min-width: 0;
}
#visitOrderTable .visit-summary-toolbar-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  height: 48px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  line-height: 20px;
}
#visitOrderTable .visit-summary-toolbar-content > strong,
#visitOrderTable .visit-summary-toolbar-content > .muted {
  display: block;
  flex: none;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
#visitOrderTable .visit-summary-toolbar-content > strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
#visitOrderTable .visit-summary-toolbar-content > .pill { flex: none; }
#visitOrderTable .visit-summary-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
  height: 40px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
#visitOrderTable .visit-summary-toolbar-actions > button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  min-height: 32px;
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
}
#visitOrderTable .visit-summary-toolbar-actions > .visit-summary-toolbar-primary {
  border-color: var(--line);
  background: var(--blue-soft);
  font-weight: 600;
}
#visitOrderTable .visit-summary-toolbar-actions > .is-empty { color: var(--muted); }
#visitOrderTable .visit-summary-toolbar-actions > button:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--blue-soft);
  color: var(--primary);
}
#visitOrderTable .visit-summary-toolbar-actions > button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
#visitOrderTable .visit-summary-toolbar-actions > button:disabled { opacity: .55; cursor: not-allowed; }
#visitOrderTable .visit-summary-toolbar-actions > .ai-learning-status { flex: none; align-self: center; }
@media (max-width: 760px) {
  #visitOrderTable .visit-summary-toolbar-cell { grid-template-rows: 48px 52px; }
  #visitOrderTable .visit-summary-toolbar-actions { height: 52px; }
  #visitOrderTable .visit-summary-toolbar-actions > button { height: 44px; min-height: 44px; padding-block: 11px; }
}

/* Approved v690 communication viewer only: existing record/image actions remain shared. */
#formModal:has(.visit-communication-workspace) { z-index: 150; }
body:has(#formModal:not([hidden]) .visit-communication-workspace) #imagePreviewOverlay { z-index: 160; }
#formModal:has(.visit-communication-workspace) > .modal-panel {
  width: min(1120px, calc(100vw - 48px));
  height: min(920px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  border-radius: 9px;
}
#formModal:has(.visit-communication-workspace) .modal-header {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 14px 26px 4px;
  border-bottom: 0;
}
#formModal:has(.visit-communication-workspace) .modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}
#formModal:has(.visit-communication-workspace) .modal-header .icon-button {
  flex: none;
  width: 44px;
  height: 44px;
  min-height: 44px;
}
#formModal:has(.visit-communication-workspace) .modal-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.visit-communication-workspace {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
}
.visit-communication-heading {
  flex: none;
  padding: 0 26px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}
.visit-communication-heading p,
.visit-communication-subtitle { margin: 0; }
.visit-communication-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(240px, 31%) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.visit-communication-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 24px 12px 20px 18px;
  border-right: 1px solid var(--line);
  background: #f6f8fc;
}
.visit-communication-sidebar-heading {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 16px;
}
.visit-communication-sidebar-heading h3,
.visit-communication-sidebar-heading strong {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}
.visit-communication-sidebar-heading > span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.visit-communication-nav {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.visit-communication-record {
  position: relative;
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 114px;
  margin: 0;
  padding: 16px 14px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.visit-communication-record:hover { background: #edf1fa; }
.visit-communication-record.is-active {
  border-left-color: var(--primary);
  background: #ecefff;
}
.visit-communication-record-time {
  display: block;
  padding-right: 48px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.visit-communication-record-latest {
  position: absolute;
  top: 16px;
  right: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #dce3ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}
.visit-communication-record-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #52627a;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.visit-communication-record-meta {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visit-communication-detail {
  min-width: 0;
  min-height: 0;
  padding: 26px 32px 24px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.visit-communication-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
}
.visit-communication-source {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 3px 11px;
  border-radius: 5px;
  background: #e9edff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.visit-communication-operator {
  color: var(--text);
  overflow-wrap: anywhere;
}
.visit-communication-time {
  padding-left: 16px;
  border-left: 1px solid #d0d8e6;
}
.visit-communication-content {
  margin-top: 22px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.visit-communication-content h3,
.visit-communication-evidence-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.visit-communication-content p {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.visit-communication-audio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  overflow-wrap: anywhere;
}
.visit-communication-audio h3,
.visit-communication-audio p {
  flex-basis: 100%;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.visit-communication-audio h3 { font-weight: 600; }
.visit-communication-audio > span { font-size: 13px; line-height: 1.7; }
.visit-communication-audio button { min-height: 36px; padding: 6px 0; font-size: 14px; }
.visit-communication-evidence-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 23px;
}
.visit-communication-evidence-heading > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.visit-communication-groups {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 10px 0 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.visit-communication-group {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 34px;
  margin: 0;
  padding: 6px 17px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #edf0ff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}
.visit-communication-group:hover { border-color: #9caeff; }
.visit-communication-group.is-active {
  background: var(--primary);
  color: #fff;
}
.visit-communication-account {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.visit-communication-images { min-width: 0; }
.visit-communication-attachment {
  min-width: 0;
  margin: 0;
}
.visit-communication-attachment.is-unavailable {
  padding: 12px;
  border: 1px solid #e0d8b3;
  border-radius: 6px;
  background: #fffdf5;
}
.visit-communication-unavailable-name {
  display: block;
  color: #52627a;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.visit-communication-image-warning {
  margin: 8px 0 0;
  color: #806324;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.visit-communication-images img[data-visit-communication-image][hidden] { display: none; }
.visit-communication-images .activity-attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  margin: 0;
}
.visit-communication-images .activity-attachment {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
.visit-communication-images .activity-attachment img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 180px;
  max-height: 350px;
  aspect-ratio: 0.8;
  border: 1px solid #d3dbe8;
  border-radius: 6px;
  background: #f7f9fc;
  object-fit: contain;
}
.visit-communication-images .activity-attachment span {
  display: block;
  overflow: hidden;
  color: #52627a;
  font-size: 13px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.visit-communication-footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px 26px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.visit-communication-footer p,
.visit-communication-footer-note,
.visit-communication-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.visit-communication-footer button {
  flex: none;
  min-width: 82px;
  min-height: 38px;
  font-size: 14px;
}
.visit-communication-record:focus-visible,
.visit-communication-group:focus-visible,
.visit-communication-images .activity-attachment:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (max-width: 900px) and (min-width: 701px) {
  .visit-communication-layout { grid-template-columns: minmax(220px, 31%) minmax(0, 1fr); }
  .visit-communication-sidebar { padding-inline: 10px; }
  .visit-communication-detail { padding-inline: 22px; }
  .visit-communication-images .activity-attachments { gap: 12px; }
}
@media (max-width: 700px) {
  #formModal:has(.visit-communication-workspace) { padding: 12px; }
  #formModal:has(.visit-communication-workspace) > .modal-panel {
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #formModal:has(.visit-communication-workspace) .modal-header { min-height: 60px; padding: 10px 16px 2px; }
  #formModal:has(.visit-communication-workspace) .modal-header h2 { font-size: 21px; }
  .visit-communication-heading { padding: 0 16px 10px; font-size: 13px; }
  .visit-communication-layout { display: flex; flex-direction: column; }
  .visit-communication-sidebar {
    flex: none;
    padding: 12px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .visit-communication-sidebar-heading { padding: 0 4px 9px; }
  .visit-communication-sidebar-heading h3,
  .visit-communication-sidebar-heading strong { font-size: 16px; }
  .visit-communication-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    max-height: 126px;
    padding: 2px 2px 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .visit-communication-record { flex: 0 0 min(260px, 83vw); min-height: 108px; padding: 11px 12px; gap: 5px; }
  .visit-communication-record-time { font-size: 14px; }
  .visit-communication-record-latest { top: 11px; right: 10px; }
  .visit-communication-record-summary { font-size: 13px; -webkit-line-clamp: 1; }
  .visit-communication-record-meta { font-size: 12px; }
  .visit-communication-detail { flex: 1 1 auto; padding: 18px 16px 22px; }
  .visit-communication-metadata { gap: 8px 10px; font-size: 13px; }
  .visit-communication-source { padding: 3px 8px; font-size: 12px; }
  .visit-communication-time { padding-left: 10px; }
  .visit-communication-content { margin-top: 18px; padding-bottom: 20px; }
  .visit-communication-content p { font-size: 16px; }
  .visit-communication-audio { padding: 12px; }
  .visit-communication-audio button { min-height: 44px; padding-block: 11px; }
  .visit-communication-evidence-heading { margin-top: 18px; }
  .visit-communication-evidence-heading > span { font-size: 12px; }
  .visit-communication-groups { margin-top: 10px; gap: 8px; }
  .visit-communication-group { min-width: 86px; min-height: 44px; padding-block: 11px; }
  .visit-communication-images .activity-attachments { gap: 12px; }
  .visit-communication-images .activity-attachment img { min-height: 120px; max-height: 320px; aspect-ratio: 0.75; }
  .visit-communication-images .activity-attachment span { font-size: 13px; }
  .visit-communication-footer { min-height: 66px; gap: 12px; padding: 10px 16px; }
  .visit-communication-footer p,
  .visit-communication-footer-note,
  .visit-communication-note { font-size: 13px; }
  .visit-communication-footer button { min-width: 72px; min-height: 44px; }
}
@media (max-width: 380px) {
  .visit-communication-time { width: 100%; padding-left: 0; border-left: 0; }
  .visit-communication-images .activity-attachments { grid-template-columns: minmax(0, 1fr); }
  .visit-communication-images .activity-attachment img { max-height: 400px; aspect-ratio: auto; }
}

/* v692: approved sensitive-permission card only; other permission cards retain their layout. */
.permission-group.permission-group-sensitive {
  min-width: 0;
  align-self: start;
  padding: 14px;
  border-color: #dce5ef;
  border-radius: 8px;
  background: #f6f9fc;
  container-type: inline-size;
}
.permission-group-sensitive .permission-group-title-row { gap: 10px; }
.permission-group-sensitive .permission-group-header { gap: 10px; }
.permission-group-sensitive .permission-group-header strong { color: #152033; font-size: 15px; }
.permission-group-sensitive .permission-group-header small { color: #5c6675; font-size: 13px; }
.permission-group-sensitive .permission-collapse-button { color: #405cff; font-size: 13px; }
.permission-group-sensitive .permission-group-body { margin-top: 22px; }
.permission-group-sensitive .sensitive-permission-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.permission-group-sensitive .sensitive-permission-section + .sensitive-permission-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dce5ef;
}
.permission-group-sensitive .sensitive-permission-section h4,
.permission-group-sensitive .sensitive-permission-section legend {
  margin: 0 0 10px;
  padding: 0;
  color: #152033;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.permission-group-sensitive .permission-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-group-sensitive .check-item {
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  gap: 9px;
  border: 1px solid #dce5ef;
  border-radius: 6px;
  color: #182235;
  background: transparent;
  font-size: 13px;
  line-height: 1.4;
}
.permission-group-sensitive .check-item input { width: 17px; height: 17px; min-height: 17px; flex: 0 0 17px; margin: 0; accent-color: #405cff; }
.permission-group-sensitive .check-item span { min-width: 0; overflow-wrap: anywhere; }
.check-item-contact-help {
  position: relative;
}
.check-item-contact-label {
  display: flex;
  flex: 1;
  align-self: stretch;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.contact-permission-help > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--crm-help-target-size, 18px);
  height: var(--crm-help-target-size, 18px);
  list-style: none;
  padding: 0;
  border-radius: 4px;
  color: #405cff;
  font-size: var(--crm-help-icon-size, 12px);
  line-height: 1;
  cursor: pointer;
}
.contact-permission-help > summary::-webkit-details-marker { display: none; }
.contact-permission-help > summary:focus-visible {
  outline: 2px solid #405cff;
  outline-offset: 1px;
}
.contact-permission-help-text {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + 4px);
  inset-inline-start: 0;
  box-sizing: border-box;
  inline-size: min(17rem, calc(200% + 6px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(21 32 51 / 12%);
  line-height: 1.5;
}
.permission-group-sensitive .sensitive-secondary-phone legend { float: left; width: 100%; }
.permission-group-sensitive .sensitive-phone-segments {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  clear: both;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 6px;
}
.permission-group-sensitive .sensitive-phone-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  color: #182235;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.permission-group-sensitive .sensitive-phone-option + .sensitive-phone-option { border-left: 1px solid #dce5ef; }
.permission-group-sensitive .sensitive-phone-option:has(input:checked) { background: #eaf0ff; box-shadow: inset 0 0 0 1px #c8d6ff; }
.permission-group-sensitive .sensitive-phone-option:has(input:focus-visible) { outline: 2px solid #405cff; outline-offset: -2px; }
.permission-group-sensitive .sensitive-phone-option:has(input:disabled) { cursor: not-allowed; }
.permission-group-sensitive .sensitive-phone-option:has(input:disabled):not(:has(input:checked)) { color: #8993a3; }
.permission-group-sensitive .sensitive-phone-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; accent-color: #405cff; }
.permission-group-sensitive .sensitive-phone-option span { white-space: nowrap; }
.permission-group-sensitive .sensitive-phone-default-badge { padding: 2px 7px; border-radius: 12px; color: #405cff; background: #dbe5ff; font-size: 11px; line-height: 1.5; white-space: nowrap; }
@container (max-width: 350px) {
  .permission-group-sensitive .check-item { padding: 7px 8px; gap: 6px; font-size: 12px; }
  .permission-group-sensitive .sensitive-phone-option { gap: 5px; padding: 7px 4px; font-size: 12px; }
  .permission-group-sensitive .sensitive-phone-option input { width: 16px; height: 16px; min-height: 16px; flex-basis: 16px; }
  .permission-group-sensitive .sensitive-phone-default-badge { padding-inline: 5px; font-size: 10px; }
}
@container (max-width: 275px) {
  .permission-group-sensitive .sensitive-phone-option { flex-wrap: wrap; gap: 4px; font-size: 11px; }
  .permission-group-sensitive .sensitive-phone-option:first-child { gap: 4px; }
  .permission-group-sensitive .sensitive-phone-default-badge { padding-inline: 4px; }
}
/* v693 — approved recording timeline and single-record sentence review. */
#formModal:has(.v693-recording-workspace) { z-index: 150; }
#formModal:has(.v693-recording-workspace) > .modal-panel {
  width: min(1160px, calc(100vw - 48px));
  height: min(1080px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  border-radius: 12px;
}
#formModal:has(.v693-recording-workspace) .modal-header {
  flex: none; padding: 24px 32px 8px; border-bottom: 0; min-height: 68px;
}
#formModal:has(.v693-recording-workspace) .modal-header h2 { font-size: 28px; line-height: 1.4; font-weight: 700; }
#formModal:has(.v693-recording-workspace) .modal-header .icon-button { width: 44px; height: 44px; min-width: 44px; }
#formModal:has(.v693-recording-workspace) .modal-body { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0; }
.v693-recording-workspace { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; color: #15213a; background: white; }
.v693-recording-workspace .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.v693-customer-subtitle { flex: none; margin: 0; padding: 0 32px 20px; color: #74839b; font-size: 16px; border-bottom: 1px solid #dde5f0; }
.v693-timeline-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 14px 0; }
.v693-timeline { position: relative; }
.v693-timeline::before { content: ""; position: absolute; top: 34px; bottom: 44px; left: 34px; width: 1px; background: #bacbfb; }
.v693-timeline-item { position: relative; display: grid; grid-template-columns: 146px minmax(0, 1fr); border-bottom: 1px solid #dce4ef; min-width: 0; }
.v693-timeline-time { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; padding: 25px 12px 24px 80px; color: #566579; line-height: 1.45; font-size: 15px; }
.v693-timeline-time::before { content: ""; position: absolute; left: 28px; top: 31px; width: 13px; height: 13px; border-radius: 50%; background: #95a1b3; box-shadow: 0 0 0 5px white; }
.v693-timeline-time strong { font-weight: 500; }
.v693-timeline-item.is-expanded .v693-timeline-time { color: #215cff; font-weight: 600; }
.v693-timeline-item.is-expanded .v693-timeline-time::before { background: #215cff; }
.v693-timeline-main { min-width: 0; }
.v693-call-heading { min-height: 85px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 14px 24px; }
.v693-call-person { display: flex; align-items: center; gap: 22px; min-width: 0; }
.v693-call-person > strong { color: #152139; font-size: 18px; white-space: nowrap; }
.v693-call-states { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.v693-status { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 11px; border-radius: 6px; font-size: 13px; line-height: 1.3; white-space: nowrap; }
.v693-status.green { background: #e6f6f0; color: #06836e; }
.v693-status.blue { background: #edf2ff; color: #285dff; }
.v693-status.gray { background: #eff2f5; color: #6e7989; }
.v693-status.orange { background: #fff1e4; color: #e06400; font-weight: 600; }
.v693-expand-button { flex: none; color: #2a5df4; padding: 8px; min-height: 36px; border: 0; background: transparent; font-size: 12px; }
.v693-call-states .secondary-button { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.v693-call-expanded { padding: 0 16px 28px 24px; border-left: 1px solid #edf0f5; min-width: 0; }
.v693-audio-player { border-radius: 8px; background: #f3f7fb; padding: 13px 12px; margin: 4px 0 24px; min-width: 0; }
.v693-audio-player audio { display: block; width: 100%; max-width: 100%; height: 50px; }
.v693-transcript-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 0 0 16px; }
.v693-transcript-heading > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.v693-transcript-heading h3, .v693-review-source > h3 { color: #14213a; margin: 0; font-size: 20px; font-weight: 700; line-height: 1.5; }
.v693-identity-state { display: inline-flex; padding: 4px 10px; border-radius: 5px; background: #f1f3f7; color: #718098; font-size: 12px; }
.v693-heading-actions { margin-left: auto; }
.v693-heading-actions button { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.v693-heading-actions .primary-button { background: #285dff; border-color: #285dff; min-width: 100px; }
.v693-heading-actions .secondary-button { background: #eef3ff; color: #285dff; border-color: #eef3ff; }
.v693-transcript-list { display: grid; gap: 0; min-width: 0; }
.v693-transcript-segment { min-width: 0; padding: 3px 0; }
.v693-segment-line, .v693-segment-select { display: grid; grid-template-columns: 58px 100px minmax(0, 1fr); align-items: start; gap: 14px; min-width: 0; width: 100%; padding: 10px 0; font-size: 15px; line-height: 1.8; }
.v693-segment-line time, .v693-segment-select time { color: #7b8ca7; font-variant-numeric: tabular-nums; }
.v693-speaker { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-width: 80px; max-width: 100%; padding: 3px 10px; border-radius: 6px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.v693-speaker.is-employee { background: #eaf0ff; color: #285dff; }
.v693-speaker.is-customer { background: #eff2f5; color: #48576c; }
.v693-speaker.is-unknown { background: #fff5e6; color: #9b6b15; font-size: 11px; }
.v693-transcript-text { white-space: pre-wrap; overflow-wrap: anywhere; color: #17233b; min-width: 0; }
.v693-timeline-footer { flex: none; padding: 16px 30px; color: #748399; font-size: 12px; line-height: 1.6; border-top: 1px solid #e0e6ef; }
.v693-no-recording { border: 1px solid #f3d7ac; border-radius: 8px; background: #fff8ed; color: #a4680a; padding: 18px; line-height: 1.8; font-size: 14px; }
.v693-state-message { border: 1px solid #dce5f1; border-radius: 8px; color: #65748c; background: #f8faff; padding: 18px; line-height: 1.8; overflow-wrap: anywhere; }
.v693-state-message button { margin-left: 10px; }
.v693-state-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.v693-identity-editor { margin: 12px 0 22px; padding: 16px; border: 1px solid #bdd0f9; border-radius: 8px; background: #f7faff; }
.v693-identity-editor h4 { margin: 0 0 8px; font-size: 16px; }
.v693-identity-editor > p { font-size: 12px; line-height: 1.8; }
.v693-identity-row { display: grid; grid-template-columns: minmax(90px, 1fr) 120px minmax(130px, 1fr); gap: 10px; align-items: center; margin: 12px 0; font-size: 12px; }
.v693-identity-row label { min-width: 0; }
.v693-identity-row select { width: 100%; min-width: 0; }
.v693-identity-editor .form-actions { justify-content: flex-end; margin-top: 16px; }
.v727-identity-card { margin: 12px 0; padding: 12px; border: 1px solid #dbe4f4; border-radius: 8px; background: #fff; }
.v727-identity-card > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.v727-identity-card > header > span, .v727-group-choice { color: #6f7c91; font-size: 12px; }
.v727-group-choice { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.v727-identity-sample { padding: 8px 0; border-top: 1px solid #edf1f7; }
.v727-identity-sample > div { display: flex; align-items: center; gap: 12px; }
.v727-identity-sample time { color: #73839a; font-size: 12px; white-space: nowrap; }
.v727-identity-sample p { margin: 4px 0 0; line-height: 1.65; overflow-wrap: anywhere; }
.v727-identity-card .v693-identity-row { grid-template-columns: minmax(95px, .6fr) minmax(120px, 1fr); margin-bottom: 0; }
.v727-identity-card details > summary { padding: 6px 0; color: #4661e9; cursor: pointer; font-size: 12px; }
.v727-group-actions { margin: 10px 0; }
@media (max-width: 560px) { .v727-identity-card .v693-identity-row { grid-template-columns: 1fr; } .v727-group-choice { margin-left: 0; } }

#formModal:has(.v693-review-workspace) > .modal-panel { width: min(1440px, calc(100vw - 40px)); height: min(1150px, calc(100dvh - 40px)); position: relative; }
#formModal:has(.v693-review-workspace) .modal-header { position: absolute; right: 0; top: 0; z-index: 2; min-height: 0; padding: 12px 16px; background: transparent; }
#formModal:has(.v693-review-workspace) .modal-header h2 { display: none; }
.v693-review-workspace { padding: 24px 24px 16px; }
.v693-review-title { position: relative; flex: none; padding: 0 20px 20px 0; }
.v693-review-title > .text-button { display: inline-flex; color: #1e5cff; padding: 0; min-height: 30px; font-size: 16px; margin-bottom: 8px; }
.v693-review-title h2 { margin: 4px 0 8px; color: #111c32; font-size: 30px; line-height: 1.4; font-weight: 700; }
.v693-review-title p { margin: 0 0 7px; color: #74829c; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.v693-review-title > span { color: #74829c; font-size: 13px; }
.v693-review-title .v693-review-caution { position: absolute; right: 58px; top: 28px; display: inline-flex; padding: 10px 15px; border-radius: 8px; background: #fff2e6; color: #db650a; font-size: 13px; font-weight: 600; }
.v693-review-columns { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 56%); flex: 1 1 auto; min-height: 0; min-width: 0; }
.v693-review-source { padding: 16px 22px 24px 0; overflow: auto; min-height: 0; min-width: 0; border-right: 1px solid #dce9fa; }
.v693-review-source .v693-audio-player { margin: 4px 0 20px; background: #edf5ff; }
.v693-review-source > h3 { margin-bottom: 10px; }
.v693-segment-select { text-align: left; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font-family: inherit; grid-template-columns: 54px 82px minmax(0, 1fr); gap: 10px; padding: 12px 2px; }
.v693-segment-select .v693-speaker { min-width: 70px; padding-inline: 7px; }
.v693-segment-select:hover, .v693-transcript-segment.is-selected .v693-segment-select { background: #f0f5ff; border-color: #c9d9fd; }
.v693-add-comment { margin: 0 0 8px 148px; }
.v693-add-comment button { font-size: 13px; min-height: 32px; padding: 5px 10px; color: #245dff; background: #f1f6ff; border-color: #c0d8ff; }
.v693-review-comments { padding: 0 0 6px 16px; overflow: auto; min-width: 0; min-height: 0; }
.v693-review-group { display: grid; gap: 10px; margin-bottom: 12px; }
.v693-review-group:has(> :nth-child(2)) { gap: 0; border: 1px solid #b5d8ff; border-radius: 10px; overflow: hidden; background: #f0f7ff; }
.v693-review-group:has(> :nth-child(2)) > .v693-review-note,
.v693-review-group:has(> :nth-child(2)) > .v693-note-editor { border: 0; border-radius: 0; }
.v693-review-group:has(> :nth-child(2)) > :nth-child(n + 2) { border-top: 1px solid #c7dcf8; }
.v693-review-note, .v693-review-summary { border: 1px solid #b5d8ff; border-radius: 10px; padding: 16px; background: #f0f7ff; min-width: 0; overflow-wrap: anywhere; }
.v693-review-note > header, .v693-review-summary > header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 7px 10px; margin-bottom: 10px; }
.v693-review-note h3, .v693-review-summary h3 { margin: 0; color: #1055f5; font-size: 19px; font-weight: 700; line-height: 1.6; }
.v693-review-point { display: inline; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.v693-review-note > header > div, .v693-review-summary > header > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.v693-origin { display: inline-flex; padding: 4px 8px; font-size: 12px; line-height: 1.4; border-radius: 5px; white-space: nowrap; }
.v693-origin.ai { color: #245dff; background: #dceaff; }
.v693-origin.manual { color: #8247da; background: #ece0ff; }
.v693-origin.warning { color: #b76f0a; background: #fff0d7; }
.v693-review-note .text-button, .v693-review-summary .text-button { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; min-height: 30px; padding: 4px; }
.v693-review-note .icon-svg, .v693-review-summary .icon-svg { width: 15px; height: 15px; }
.v693-review-workspace .danger-text { color: #de3b31; }
.v693-review-note blockquote { border: 0; border-radius: 7px; margin: 0 0 10px; padding: 12px; background: rgba(255,255,255,.75); color: #273754; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.v693-comment-block { margin-top: 8px; padding: 12px 14px; border-radius: 8px; min-width: 0; }
.v693-comment-block > strong { display: inline-flex; border-radius: 5px; padding: 2px 7px; font-size: 14px; }
.v693-comment-block > p { margin: 7px 0 0; color: #1c2f49; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.v693-comment-block.is-strength { background: #e4f6ed; }
.v693-comment-block.is-strength strong { background: #c7efdd; color: #078c5c; }
.v693-comment-block.is-problem { background: #fff2e8; }
.v693-comment-block.is-problem strong { background: #ffe3ce; color: #da570a; }
.v693-comment-block.is-suggestion { background: #e3f1ff; }
.v693-comment-block.is-suggestion strong { background: #cde5ff; color: #1257ef; }
.v693-review-summary { margin-top: 14px; background: #f2f7ff; padding: 12px 16px; }
.v693-review-summary > p { margin: 4px 0 0; color: #273754; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.v693-review-summary .secondary-button { padding: 5px 8px; min-height: 30px; font-size: 12px; }
.v693-review-empty { margin: 0 0 18px; padding: 24px; border: 1px solid #d7e3f4; border-radius: 10px; background: #f6faff; }
.v693-review-empty h3 { margin: 0 0 10px; font-size: 19px; }
.v693-review-empty p { color: #6e7e96; line-height: 1.9; font-size: 14px; }
.v693-review-empty button { margin-right: 10px; }
.v693-summary-add { margin-top: 12px; }
.v693-note-editor { display: grid; gap: 10px; border: 1px solid #a9caff; border-radius: 9px; background: #f7faff; padding: 16px; }
.v693-note-editor h4 { margin: 0; color: #2055d0; font-size: 17px; }
.v693-note-editor label, .v693-review-summary > label { display: grid; gap: 5px; font-size: 13px; color: #5d6e88; }
.v693-note-editor fieldset { display: grid; gap: 10px; min-width: 0; padding: 0; margin: 0; border: 0; }
.v693-note-editor input, .v693-note-editor textarea, .v693-review-summary textarea { display: block; width: 100%; max-width: 100%; min-width: 0; background: white; font-size: 14px; line-height: 1.65; }
.v693-note-editor textarea, .v693-review-summary textarea { resize: vertical; }
.v693-note-editor .muted { font-size: 12px; margin: 0; }
.v693-note-editor .form-actions, .v693-review-summary .form-actions { justify-content: flex-end; gap: 10px; margin-top: 8px; }
.v693-conflict-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 18px; }
.v693-conflict-actions small { flex-basis: 100%; color: #795b24; font-size: 12px; line-height: 1.7; }
.v693-recording-workspace button:focus-visible, .v693-recording-workspace select:focus-visible, .v693-recording-workspace textarea:focus-visible, .v693-recording-workspace input:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
.v693-recording-workspace button:disabled { opacity: .5; cursor: not-allowed; }
/* Desktop typography is normalized to the approved references at the same card width. */
@media (min-width: 761px) {
  .v693-review-workspace { padding-bottom: 8px; }
  #formModal:has(.v693-timeline-workspace) .modal-header h2 { font-size: 32px; }
  .v693-customer-subtitle { font-size: 18px; line-height: 1.6; }
  .v693-timeline-time { font-size: 18px; line-height: 1.45; }
  .v693-timeline-item:not(.is-expanded) .v693-timeline-time { padding-block: 16px; }
  .v693-timeline-workspace .v693-segment-line { padding-block: 6px; }
  .v693-timeline-workspace .v693-transcript-heading { margin-bottom: 12px; }
  .v693-timeline-workspace .v693-audio-player { margin-bottom: 14px; }
  .v693-call-person > strong { font-size: 21px; }
  .v693-status { font-size: 16px; min-height: 32px; padding: 6px 12px; }
  .v693-expand-button { font-size: 14px; }
  .v693-call-states .secondary-button { font-size: 16px; min-height: 38px; }
  .v693-transcript-heading { margin-bottom: 18px; }
  .v693-transcript-heading h3, .v693-review-source > h3 { font-size: 25px; line-height: 1.5; }
  .v693-identity-state { font-size: 15px; padding: 5px 11px; }
  .v693-heading-actions button { font-size: 16px; min-height: 42px; padding: 8px 13px; }
  .v693-segment-line, .v693-segment-select { font-size: 20px; line-height: 1.7; padding-block: 12px; }
  .v693-speaker { font-size: 17px; padding-block: 4px; }
  .v693-speaker.is-unknown { font-size: 14px; }
  .v693-timeline-footer { font-size: 14px; line-height: 1.7; }
  .v693-no-recording, .v693-state-message { font-size: 17px; line-height: 1.8; }
  .v693-identity-editor h4 { font-size: 20px; }
  .v693-identity-editor > p, .v693-identity-row { font-size: 15px; }
  .v693-review-title { padding-bottom: 10px; }
  .v693-review-title > .text-button { font-size: 20px; min-height: 30px; margin-bottom: 0; }
  .v693-review-title h2 { font-size: 40px; line-height: 1.25; margin: 0 0 4px; }
  .v693-review-title p { font-size: 19px; line-height: 1.4; margin-bottom: 4px; }
  .v693-review-title > span { font-size: 17px; line-height: 1.3; }
  .v693-review-title .v693-review-caution { font-size: 17px; top: 32px; }
  .v693-review-source > h3 { margin-bottom: 16px; }
  .v693-review-source .v693-segment-select { padding: 14px 3px; }
  .v693-review-source .v693-speaker { font-size: 18px; }
  .v693-review-source .v693-speaker.is-unknown { font-size: 13px; }
  .v693-add-comment { margin-top: 3px; margin-bottom: 10px; }
  .v693-add-comment button { font-size: 16px; min-height: 38px; padding: 6px 11px; }
  .v693-review-note { padding: 10px 18px; }
  .v693-review-note > header, .v693-review-summary > header { gap: 6px 12px; margin-bottom: 8px; }
  .v693-review-note h3, .v693-review-summary h3 { font-size: 25px; line-height: 1.35; }
  .v693-origin { font-size: 16px; padding: 4px 9px; }
  .v693-review-note .text-button, .v693-review-summary .text-button { font-size: 15px; min-height: 34px; }
  .v693-review-note .icon-svg, .v693-review-summary .icon-svg { width: 18px; height: 18px; }
  .v693-review-note blockquote { padding: 9px 13px; margin-bottom: 8px; font-size: 19px; line-height: 1.65; }
  .v693-comment-block { padding: 9px 15px; }
  .v693-comment-block > strong { font-size: 18px; line-height: 1.45; padding: 3px 8px; }
  .v693-comment-block > p { margin-top: 5px; font-size: 19px; line-height: 1.65; }
  .v693-review-summary { padding: 12px 18px; }
  .v693-review-summary > p { font-size: 16px; line-height: 1.5; }
  .v693-review-summary .secondary-button { font-size: 15px; min-height: 36px; padding: 6px 10px; }
  .v693-review-empty h3 { font-size: 24px; }
  .v693-review-empty p { font-size: 18px; line-height: 1.8; }
  .v693-review-empty > button, .v693-summary-add { font-size: 16px; min-height: 42px; }
  .v693-note-editor h4 { font-size: 21px; }
  .v693-note-editor label, .v693-review-summary > label { font-size: 16px; }
  .v693-note-editor input, .v693-note-editor textarea, .v693-review-summary textarea { font-size: 17px; }
  .v693-note-editor .muted { font-size: 14px; }
}
@media (max-width: 1000px) {
  .v693-call-heading { flex-wrap: wrap; gap: 10px; }
  .v693-call-states { margin-left: auto; }
  .v693-review-title .v693-review-caution { position: static; margin-top: 10px; }
  .v693-review-columns { grid-template-columns: minmax(0, 42%) minmax(0, 58%); }
  .v693-segment-select { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
  .v693-segment-select .v693-transcript-text { grid-column: 2; }
  .v693-add-comment { margin-left: 58px; }
}
@media (max-width: 760px) {
  #formModal:has(.v693-recording-workspace) { padding: 8px; }
  #formModal:has(.v693-recording-workspace) > .modal-panel { width: 100%; max-width: 100%; height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  #formModal:has(.v693-recording-workspace) .modal-header { padding: 14px 16px 6px; min-height: 56px; }
  #formModal:has(.v693-recording-workspace) .modal-header h2 { font-size: 23px; }
  .v693-customer-subtitle { padding: 0 16px 14px; font-size: 14px; }
  .v693-timeline-scroll { padding-inline: 6px; }
  .v693-timeline::before { left: 14px; }
  .v693-timeline-item { grid-template-columns: 76px minmax(0, 1fr); }
  .v693-timeline-time { padding: 22px 4px 18px 30px; font-size: 12px; }
  .v693-timeline-time::before { left: 9px; top: 28px; width: 11px; height: 11px; }
  .v693-call-heading { padding: 15px 6px 15px 8px; }
  .v693-call-person { gap: 10px; flex-wrap: wrap; }
  .v693-call-person > strong { font-size: 16px; }
  .v693-call-states { justify-content: flex-start; gap: 6px; margin-left: 0; }
  .v693-status { font-size: 11px; padding: 4px 7px; }
  .v693-call-expanded { padding: 0 4px 20px 8px; }
  .v693-audio-player { padding: 8px 0; margin-bottom: 16px; }
  .v693-audio-player audio { min-width: 0; height: 44px; }
  .v693-transcript-heading { gap: 8px; }
  .v693-transcript-heading h3, .v693-review-source > h3 { font-size: 18px; }
  .v693-heading-actions { margin-left: 0; gap: 6px !important; }
  .v693-heading-actions button { font-size: 12px; padding: 7px 8px; min-height: 40px; }
  .v693-heading-actions .primary-button { min-width: 76px; }
  .v693-segment-line { grid-template-columns: 44px minmax(0, 1fr); gap: 6px; font-size: 14px; }
  .v693-segment-line .v693-transcript-text { grid-column: 2; }
  .v693-speaker { min-width: 64px; width: fit-content; font-size: 12px; }
  .v693-timeline-footer { padding: 12px 16px; font-size: 11px; }
  .v693-identity-editor { padding: 12px; }
  .v693-identity-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  #formModal:has(.v693-review-workspace) .modal-header { min-height: 0; padding: 10px; }
  .v693-review-workspace { padding: 16px 12px 12px; overflow: auto; display: block; }
  .v693-review-title { padding-bottom: 12px; }
  .v693-review-title > .text-button { font-size: 14px; padding-right: 30px; }
  .v693-review-title h2 { font-size: 25px; }
  .v693-review-title p { font-size: 12px; }
  .v693-review-title .v693-review-caution { font-size: 11px; padding: 6px 10px; }
  .v693-review-columns { display: flex; flex-direction: column; }
  .v693-review-source { padding: 12px 0; border-right: 0; border-bottom: 1px solid #dce9fa; overflow: visible; }
  .v693-segment-select { font-size: 14px; grid-template-columns: 44px 68px minmax(0, 1fr); gap: 7px; }
  .v693-segment-select .v693-transcript-text { grid-column: auto; }
  .v693-segment-select .v693-speaker { min-width: 60px; }
  .v693-add-comment { margin-left: 126px; }
  .v693-review-comments { padding: 16px 0 0; overflow: visible; }
  .v693-review-note, .v693-review-summary { padding: 12px; }
  .v693-review-note h3, .v693-review-summary h3 { font-size: 16px; }
  .v693-review-note blockquote, .v693-comment-block > p, .v693-review-summary > p { font-size: 13px; }
  .v693-review-note .text-button, .v693-review-summary .text-button { min-height: 40px; }
}

/* v694: a compact native per-call selector; the approved review layout is unchanged. */
.v694-call-selector { position: absolute; right: 0; bottom: 10px; display: flex; align-items: center; gap: 12px; width: min(640px, 50%); margin-top: 0; color: #62728b; font-size: 15px; }
.v694-call-selector > span { flex: none; font-weight: 500; }
.v694-call-selector > select { flex: 1 1 auto; min-width: 0; width: 100%; max-width: 100%; min-height: 40px; padding: 8px 30px 8px 12px; border: 1px solid #cfdaeb; border-radius: 7px; background-color: #fff; color: #263851; font: inherit; text-overflow: ellipsis; }
.v694-call-selector > select:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
.v694-unavailable-recording { margin: 10px 0; font-size: 18px; }
.v694-pending-transcription h3 { margin: 0 0 10px; color: #405573; font-size: 21px; }
.v694-pending-transcription p { margin: 0; }
.v694-pending-transcription .v693-state-actions { margin-top: 14px; }
@media (max-width: 1000px) {
  .v694-call-selector { position: static; right: auto; bottom: auto; width: 100%; margin-top: 14px; }
}
@media (max-width: 760px) {
  .v694-call-selector { align-items: flex-start; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 12px; }
  .v694-call-selector > select { min-height: 42px; padding-block: 9px; }
  .v694-unavailable-recording { font-size: 14px; }
  .v694-pending-transcription h3 { font-size: 17px; }
}

/* v695 — an index-only entry to the existing per-recording workspace. */
.v695-recording-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid #e0e6ef; }
.v695-recording-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #dbe3f0; border-radius: 7px; background: #fff; color: #697890; font: inherit; font-size: 14px; }
.v695-recording-tabs button.is-active { background: #edf3ff; border-color: #bcd0ff; color: #245df7; }
.v695-recording-tabs button span { padding: 1px 6px; border-radius: 5px; background: #f0f3f9; font-size: 12px; }
.v695-recording-index { min-width: 0; padding-top: 16px; }
.v695-recording-index > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.v695-recording-index h3 { margin: 0 0 5px; color: #20324f; font-size: 20px; }
.v695-recording-index > header p { margin: 0; color: #738099; font-size: 13px; line-height: 1.8; }
.v695-recording-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 12px; max-height: calc(100dvh - 360px); min-height: 140px; overflow: auto; padding: 2px; }
.v695-recording-card { display: flex; flex-direction: column; gap: 13px; min-width: 0; padding: 18px; border: 1px solid #dbe3ef; border-radius: 9px; background: #fff; }
.v695-recording-card.is-selected { border-color: #8badff; background: #f8faff; }
.v695-recording-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.v695-recording-card-heading > strong { color: #172b49; font-size: 17px; overflow-wrap: anywhere; }
.v695-recording-status { display: inline-flex; border-radius: 5px; padding: 4px 8px; color: #167f6e; background: #e8f5f0; font-size: 12px; }
.v695-recording-status.is-warning { color: #a97112; background: #fff3df; }
.v695-recording-card-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: #708098; font-size: 13px; line-height: 1.6; }
.v695-recording-card-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; }
.v695-recording-card-footer > span { color: #74829a; font-size: 12px; }
.v695-recording-card-footer .secondary-button { min-height: 36px; padding: 7px 11px; color: #235be8; font-size: 13px; }
.v695-recording-index > footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; color: #76849a; font-size: 13px; }
.v695-recording-tabs button:focus-visible, .v695-recording-index button:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
.v695-recording-loading { padding: 22px; line-height: 1.8; }
@media (max-width: 760px) {
  .v695-recording-tabs button { font-size: 13px; min-height: 42px; }
  .v695-recording-list { grid-template-columns: minmax(0, 1fr); max-height: 65dvh; }
  .v695-recording-card { padding: 14px; }
  .v695-recording-card-heading > strong { font-size: 16px; }
  .v695-recording-card-footer .secondary-button { min-height: 42px; }
}

/* v696: one shared recording/transcript/comment surface, in the center or visit modal. */
.v696-review-workbench { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 12px; height: calc(100dvh - 232px); min-height: 620px; }
.v696-review-queue, .v696-review-detail { min-width: 0; border: 1px solid #e1e8f3; background: #fff; border-radius: 8px; overflow: hidden; }
.v696-review-queue { display: flex; flex-direction: column; padding: 16px 12px 10px; }
.v696-review-queue > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.v696-review-queue h3 { margin: 0; font-size: 21px; color: #15233e; }
.v696-review-workbench .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.v696-queue-search input { width: 100%; min-height: 40px; font-size: 14px; }
.v696-queue-filters { display: flex; gap: 6px; margin: 10px 0 12px; }
.v696-queue-filters button { flex: 1; min-height: 36px; border: 1px solid #dde5f0; border-radius: 6px; background: #fff; color: #52627b; font: inherit; font-size: 13px; cursor: pointer; }
.v696-queue-filters button.is-active { background: #2f5cff; color: #fff; border-color: #2f5cff; }
.v696-queue-list { min-height: 0; flex: 1; overflow-y: auto; display: block; }
.v696-queue-row { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 7px; text-align: left; padding: 16px 10px; color: #667693; border: 0; border-bottom: 1px solid #e8edf5; background: #fff; cursor: pointer; font: inherit; font-size: 13px; line-height: 1.5; border-left: 3px solid transparent; }
.v696-queue-row:hover { background: #f6f8ff; }
.v696-queue-row.is-selected { background: #edf4ff; border-left-color: #325dff; }
.v696-queue-row-heading { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; }
.v696-queue-row-heading strong { color: #16233f; font-size: 16px; overflow-wrap: anywhere; }
.v696-queue-row-heading .v695-recording-status { flex-shrink: 0; font-size: 11px; padding: 3px 6px; }
.v696-review-queue > footer { padding-top: 12px; color: #73819a; font-size: 12px; }
.v696-review-queue > footer .compact-pagination { gap: 4px; flex-wrap: wrap; }
.v696-review-detail { height: 100%; }
.v696-detail-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #70809b; padding: 24px; text-align: center; }
.v696-review-workspace { height: 100%; min-height: 0; padding: 16px; display: flex; flex-direction: column; overflow: hidden; gap: 0; }
.v696-review-workspace .v696-review-heading { flex: 0 0 auto; display: block; padding: 0 320px 14px 0; min-height: 80px; margin: 0; position: relative; }
.v696-review-workspace .v696-review-heading h2 { font-size: 23px; line-height: 1.4; color: #15233e; margin: 0 0 7px; }
.v696-review-workspace .v696-review-heading p { font-size: 13px; line-height: 1.7; color: #7584a0; margin: 0; }
.v696-review-workspace .v696-review-heading > .text-button { font-size: 13px; margin-bottom: 8px; }
.v696-review-workspace .v694-call-selector { position: absolute; inset: 2px 0 auto auto; display: flex; gap: 8px; align-items: center; max-width: 310px; margin: 0; }
.v696-review-workspace .v694-call-selector > span { white-space: nowrap; font-size: 13px; }
.v696-review-workspace .v694-call-selector select { min-width: 0; width: 250px; min-height: 38px; font-size: 12px; }
.v696-detail-tabs { display: flex; gap: 20px; flex: 0 0 auto; align-items: center; border-bottom: 1px solid #e3e9f3; margin-bottom: 14px; min-height: 40px; }
.v696-detail-tabs > span { color: #3159ff; border-bottom: 2px solid #3159ff; align-self: stretch; display: flex; align-items: center; font-weight: 650; font-size: 15px; }
.v696-detail-tabs > button[disabled] { background: none; border: 0; font-size: 13px; color: #8a96aa; }
.v696-detail-tabs > .text-button { margin-left: auto; font-size: 12px; }
.v696-review-workspace .v693-review-columns { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 56%); gap: 10px; overflow: hidden; padding: 0; }
.v696-review-workspace .v693-review-source, .v696-review-workspace .v693-review-comments { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 12px; border: 1px solid #e3e9f3; border-radius: 7px; margin: 0; }
.v696-source-heading { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.v696-source-heading h3, .v696-transcript-title h3, .v696-comments-title { font-size: 18px; margin: 0; color: #16233f; line-height: 1.5; }
.v696-source-heading > div { display: flex; gap: 5px; flex-wrap: wrap; }
.v696-review-workspace .v693-status { font-size: 11px; padding: 4px 6px; line-height: 1.4; }
.v696-review-workspace .v693-audio-player { padding: 8px 5px; background: #f2f5fb; border-radius: 6px; margin: 0 0 20px; }
.v696-review-workspace .v693-audio-player audio { width: 100%; min-width: 0; height: 42px; }
.v696-transcript-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.v696-transcript-title h3 { margin-right: auto; }
.v696-transcript-title .text-button { font-size: 11px; padding: 4px 0; }
.v696-review-workspace .v693-transcript-list { padding: 0; }
.v696-review-workspace .v693-transcript-segment { border: 0; margin: 0 0 4px; padding: 0; border-left: 2px solid transparent; border-radius: 4px; }
.v696-review-workspace .v693-transcript-segment.is-selected { background: #eaf3ff; border-left-color: #3462ff; }
.v696-review-workspace .v693-segment-select { grid-template-columns: 42px 46px minmax(0, 1fr); gap: 7px; padding: 12px 3px; width: 100%; text-align: left; font-size: 14px; line-height: 1.9; }
.v696-review-workspace .v693-segment-select time { font-size: 12px; color: #75839a; }
.v696-review-workspace .v693-speaker { min-width: 0; padding: 3px 7px; font-size: 12px; width: fit-content; align-self: start; }
.v696-review-workspace .v693-segment-select .v693-transcript-text { grid-column: auto; font-size: 14px; }
.v696-review-workspace .v693-add-comment { margin: 0 8px 10px 0; text-align: right; }
.v696-review-workspace .v693-add-comment button { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.v696-comments-title { padding-bottom: 12px; border-bottom: 1px solid #e5eaf3; margin-bottom: 12px; }
.v696-review-workspace .v693-review-group { margin: 0 0 10px; padding: 0; border: 0; background: transparent; }
.v696-review-workspace .v693-review-note, .v696-review-workspace .v693-note-editor { border: 1px solid #e1e8f3; border-radius: 7px; padding: 12px; margin: 0 0 10px; background: #fff; }
.v696-review-workspace .v693-note-editor { display: block; }
.v696-review-workspace .v693-review-note.is-selected { border-color: #9fbaff; background: #fcfdff; }
.v696-review-workspace .v693-review-note > header { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.v696-review-workspace .v693-review-note h3 { margin: 0; min-width: 0; flex: 1 1 160px; }
.v696-review-workspace .v693-review-point { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; line-height: 1.6; color: #182843; text-align: left; }
.v696-review-workspace .v693-review-point time, .v696-note-edit-heading > time { color: #315cff; background: #eff4ff; border-radius: 4px; font-weight: 700; white-space: nowrap; padding: 0 5px; font-size: 16px; }
.v696-review-workspace .v693-review-note > header > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.v696-review-workspace .v693-origin { font-size: 11px; padding: 3px 5px; line-height: 1.4; }
.v696-review-workspace .v693-review-note .text-button { font-size: 12px; padding: 2px 0; }
.v696-comment-tags, .v696-selected-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.v696-comment-tags:empty { display: none; }
.v696-comment-tag { display: inline-block; border-radius: 4px; font-size: 12px; padding: 4px 7px; line-height: 1.4; font-weight: 550; }
.v696-comment-tag.is-strength { background: #e6f6ef; color: #07876e; }
.v696-comment-tag.is-problem { background: #fff2e1; color: #b66b17; }
.v696-comment-tag.is-suggestion { background: #edf2ff; color: #365dd2; }
.v696-comment-body { white-space: pre-wrap; overflow-wrap: anywhere; background: #f4f6fb; color: #34445e; font-size: 14px; line-height: 1.9; padding: 10px; border-radius: 4px; margin: 8px 0 0; }
.v696-note-edit-heading { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.v696-review-workspace .v696-note-edit-heading h4 { font-size: 15px; margin: 0; }
.v696-review-workspace .v693-note-editor fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.v696-review-workspace .v693-note-editor label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #64728b; }
.v696-review-workspace .v693-note-editor input:not([type="checkbox"]), .v696-review-workspace .v693-note-editor textarea { min-width: 0; width: 100%; font-size: 14px; line-height: 1.7; }
.v696-review-workspace .v693-note-editor textarea { min-height: 78px; resize: vertical; }
.v696-review-workspace .v693-note-editor textarea[name="commentText"] { height: 78px; }
.v696-review-workspace .v696-note-edit-heading .v696-note-title { flex: 1; min-width: 120px; }
.v696-review-workspace .v696-note-edit-heading .v696-note-title input { min-height: 30px; padding: 4px 6px; font-weight: 600; color: #172a49; }
.v696-review-workspace .v696-tag-options { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.v696-review-workspace .v696-tag-options label { flex-direction: row; align-items: center; gap: 5px; white-space: nowrap; font-size: 13px; color: #465772; }
.v696-tag-options input { accent-color: #315cff; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; }
.v696-review-workspace .v693-note-editor .form-actions, .v696-review-workspace .v693-review-summary .form-actions { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
.v696-review-workspace .form-actions button { min-height: 34px; padding: 5px 11px; font-size: 13px; }
.v696-review-workspace .v693-review-summary { padding: 12px; margin-top: 14px; background: #f2f5fc; border: 1px solid #e5eaf5; border-radius: 7px; }
.v696-review-workspace .v693-review-summary h3 { font-size: 18px; margin: 0; color: #16233f; }
.v696-review-workspace .v693-review-summary header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.v696-review-workspace .v693-review-summary header > div { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v696-review-workspace .v693-review-summary p { font-size: 14px; line-height: 1.9; padding: 10px; background: white; border-radius: 4px; margin: 0; white-space: pre-wrap; }
.v696-review-workspace .v693-review-summary textarea { font-size: 14px; min-height: 100px; width: 100%; }
.v696-review-workspace .v693-review-summary .text-button, .v696-review-workspace .v693-review-summary .secondary-button { font-size: 12px; min-height: 28px; padding: 3px 7px; }
.v696-review-workspace .v693-identity-editor { padding: 10px; margin-bottom: 12px; }
.v696-review-workspace .v693-identity-editor h4 { font-size: 15px; }
.v696-review-workspace .v693-identity-editor p { font-size: 12px; }
.v696-review-workspace .v693-identity-row { grid-template-columns: 1fr; gap: 5px; }
.v696-review-workspace :is(button,input,select,textarea):focus-visible, .v696-review-queue :is(button,input):focus-visible { outline: 2px solid #557bff; outline-offset: 2px; }
.v697-queue-options { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; color: #7b889d; font-size: 12px; }
.v697-queue-options label { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; margin: 0; white-space: nowrap; color: #5d6d87; font-size: 12px; }
.v697-queue-options input[type="checkbox"] { width: 15px; height: 15px; min-height: 15px; margin: 0; padding: 0; accent-color: #315cff; }
.v697-disposition-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 5px 0; }
.v697-disposition-actions .secondary-button { font-size: 12px; padding: 4px 9px; min-height: 30px; }
.v697-disposition { padding: 4px 7px; background: #eef2fa; border-radius: 4px; color: #66758c; font-size: 12px; white-space: nowrap; }
.v697-disposition.is-reviewed { background: #e6f6ef; color: #07876e; }
.v697-disposition.is-skipped { background: #f2f3f6; color: #7b8290; }
.v697-record-warning { color: #a36a22; font-size: 11px; }
@media (max-width: 1280px) {
  .v696-review-workbench { grid-template-columns: 220px minmax(0,1fr); }
  .v696-review-workspace .v696-review-heading { padding-right: 0; min-height: 112px; }
  .v696-review-workspace .v694-call-selector { position: static; margin-top: 10px; max-width: 100%; }
  .v696-review-workspace .v694-call-selector select { width: min(370px, 100%); }
  .v696-review-workspace .v693-review-columns { grid-template-columns: minmax(0, 46%) minmax(0,54%); }
  .v696-review-workspace .v693-segment-select { grid-template-columns: 40px minmax(0, 1fr); }
  .v696-review-workspace .v693-segment-select .v693-transcript-text { grid-column: 2; }
}
@media (max-width: 900px) {
  .v696-review-workbench { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .v696-review-queue { max-height: 320px; }
  .v696-review-detail { height: 760px; }
}
@media (max-width: 760px) {
  .v696-review-detail { height: auto; min-height: 560px; }
  .v696-review-workspace { display: flex; height: auto; overflow: visible; padding: 12px; }
  .v696-review-workspace .v693-review-columns { display: flex; flex-direction: column; overflow: visible; }
  .v696-review-workspace .v693-review-source, .v696-review-workspace .v693-review-comments { overflow: visible; }
  .v696-review-workspace .v696-review-heading h2 { font-size: 21px; }
  .v696-detail-tabs { gap: 10px; flex-wrap: wrap; }
  .v696-review-workspace .v693-segment-select { grid-template-columns: 40px 46px minmax(0,1fr); }
  .v696-review-workspace .v693-segment-select .v693-transcript-text { grid-column: auto; }
}

.v698-identity-notice { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; background: #fff5e6; color: #9b6b15; font-size: 12px; line-height: 1.45; white-space: nowrap; }
.v693-speaker { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; text-align: center; }
.v696-review-workspace .v693-review-source { container-name: recording-transcript; container-type: inline-size; }
.v696-review-workspace .v693-segment-select { grid-template-columns: 42px 68px minmax(0, 1fr); }
.v696-review-workspace .v693-segment-select .v693-transcript-text { grid-column: auto; }
.v696-review-workspace .v693-speaker { max-width: 100%; }
/* v935: keep the existing recording controls above an independent transcript scroller. */
.v696-review-workspace .v693-review-source:has(> .v935-transcript-scroll) { display: flex; flex-direction: column; overflow: hidden; }
.v696-review-workspace .v693-review-source > .v696-source-heading,
.v696-review-workspace .v693-review-source > .v693-audio-player,
.v696-review-workspace .v693-review-source > .v693-no-recording { flex: 0 0 auto; }
.v696-review-workspace .v693-review-source > .v693-audio-player { margin-bottom: 12px; }
.v935-transcript-scroll { min-width: 0; min-height: 0; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding-right: 4px; }
.v935-transcript-scroll .v693-transcript-segment { scroll-margin-block: 8px; }
.v935-transcript-scroll:focus-visible { outline: 2px solid #557bff; outline-offset: 2px; }
@media (max-width: 760px) {
  .v696-review-workspace .v693-review-source:has(> .v935-transcript-scroll) { height: min(620px, 78dvh); }
  .v696-review-workspace .v693-review-comments { max-height: 78dvh; overflow-y: auto; overscroll-behavior-y: contain; }
}
@container recording-transcript (max-width: 420px) {
  .v696-review-workspace .v693-segment-select { grid-template-columns: 42px minmax(0, 1fr); row-gap: 5px; }
  .v696-review-workspace .v693-segment-select time { grid-column: 1; grid-row: 1; }
  .v696-review-workspace .v693-segment-select .v693-speaker { grid-column: 2; grid-row: 1; justify-self: start; }
  .v696-review-workspace .v693-segment-select .v693-transcript-text { grid-column: 2; grid-row: 2; }
}

/* v699 keeps the approved compact queue and audio/transcript + review split. */
.lead-unread-mascot-main { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.lead-unread-mascot-main:focus-visible { outline: 2px solid #315cff; outline-offset: 2px; }
.lead-unread-mascot.is-dragging .lead-unread-mascot-main { cursor: grabbing; }
.lead-unread-mascot.is-dragging .lead-unread-mascot-character, .lead-unread-mascot.is-dragging .lead-unread-mascot-count { animation-play-state: paused; }
.lead-unread-mascot { max-width: calc(100vw - 28px); max-height: calc(100dvh - 28px); gap: 6px; }
.lead-unread-mascot-main { min-width: 0; }
@media (max-width: 720px) {
  .lead-unread-mascot-toolbar button { min-height: 36px; padding-inline: 10px; }
  .lead-unread-mascot { width: min(330px, calc(100vw - 28px)); }
}
.v699-mode-tabs { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.v699-mode-tabs button { border: 1px solid #e1e7f0; border-radius: 5px; padding: 6px 12px; background: #fff; color: #64728a; font: inherit; font-size: 13px; cursor: pointer; }
.v699-mode-tabs button.is-active { color: #315cff; background: #edf3ff; border-color: #bdccff; font-weight: 650; }
.v696-detail-tabs > button[role="tab"] { align-self: stretch; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #72809a; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 2px; cursor: pointer; }
.v696-detail-tabs > button[role="tab"].is-active { color: #315cff; border-bottom-color: #315cff; }
.v699-state { display: inline-flex; align-items: center; width: fit-content; white-space: nowrap; border-radius: 4px; padding: 4px 7px; font-size: 12px; line-height: 1.5; color: #57709b; background: #eef3fd; }
.v699-state.is-submitted { color: #ad6b20; background: #fff2df; }
.v699-state.is-published, .v699-state.is-graded { color: #07856e; background: #e6f6ef; }
.v699-state.is-rejected, .v699-state.is-cancelled { color: #98624e; background: #fbede9; }
.v696-detail-tabs > .v699-state { border: 0; align-self: center; font-size: 12px; font-weight: 500; }
.v699-training-footer { flex: 0 0 auto; border-top: 1px solid #e5eaf3; margin-top: 12px; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; max-height: 240px; overflow-y: auto; }
.v699-training-footer > div, .v699-training-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #6a7890; font-size: 12px; }
.v699-training-footer .form-warning { flex: 1 0 100%; margin: 0; }
.v699-workflow-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.v699-workflow-actions button { min-height: 35px; font-size: 13px; padding: 6px 12px; }
.v699-unsaved { color: #a87921; font-size: 12px; }
.v699-review-note { max-width: 320px; white-space: pre-wrap; overflow-wrap: anywhere; }
.v699-exam-panel { min-width: 0; color: #34445e; font-size: 14px; line-height: 1.8; }
.v699-exam-panel > header, .v699-question > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.v699-exam-panel h3 { margin: 0; color: #16233f; font-size: 18px; }
.v699-question { border: 1px solid #e1e8f3; border-radius: 7px; background: #fff; padding: 12px; margin: 0 0 12px; min-width: 0; }
.v699-question h4, .v699-grading-editor h4, .v699-grade-result h4, .v699-task-scoring h4, .v699-publications h4 { margin: 0 0 8px; color: #23344e; font-size: 14px; }
.v699-question > header h4 { margin: 0; }
.v699-question label, .v699-grading-editor label, .v699-workflow-confirm > label { display: flex; flex-direction: column; gap: 5px; margin: 8px 0; color: #64728a; font-size: 13px; }
.v699-question textarea, .v699-grading-editor textarea, .v699-workflow-confirm textarea { width: 100%; min-height: 80px; resize: vertical; font: inherit; line-height: 1.8; }
.v699-question p, .v699-answer-text, .v699-grade-result p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 7px 0; }
.v699-question details { margin-top: 10px; color: #72809a; font-size: 13px; }
.v699-answer-text { padding: 10px; border-radius: 4px; background: #f4f6fb; }
.v699-grading-editor, .v699-grade-result, .v699-task-scoring { background: #f3f6fc; padding: 12px; border: 1px solid #e1e8f3; border-radius: 7px; margin-top: 14px; }
.v699-grading-editor select { min-height: 36px; font: inherit; }
.v699-grading-editor > button { margin-top: 8px; }
.v699-task-scoring > div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 4px 10px; padding: 8px 0; border-top: 1px solid #e2e8f2; font-size: 12px; }
.v699-task-scoring small { grid-column: 2; color: #72809a; overflow-wrap: anywhere; }
.v699-deadline { color: #6b7d98; font-size: 12px; margin: 0 0 12px; }
.v699-workflow-confirm { flex: 1 0 100%; border: 1px solid #ccdaf8; background: #f6f8ff; padding: 10px; border-radius: 6px; color: #34445e; font-size: 13px; }
.v699-workflow-confirm > div { display: flex; justify-content: flex-end; gap: 8px; }
.v699-workflow-confirm .v699-inline-option { display: flex; flex-direction: row; align-items: center; gap: 7px; }
.v699-inline-option input { width: 16px; height: 16px; min-height: 16px; padding: 0; }
.v699-publications { padding-top: 12px; margin-top: 14px; border-top: 1px solid #e2e8f2; }
.v699-publications > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; padding: 6px 0; color: #6f7f98; }
.v699-exam-tools { margin-top: 16px; }
.v699-learning-marker { font-size: 10px; color: #0e8b76; margin-left: 4px; }
.v699-visit-review-entry[disabled] { color: #a0a9b7; cursor: not-allowed; opacity: .75; }
.v699-performance-linked-notice { padding: 12px; background: #f3f6fc; border: 1px solid #dce6f6; border-radius: 6px; color: #4e6383; font-size: 13px; }
.v699-learning-workbench .v696-queue-filters { flex-wrap: wrap; }
.v699-learning-workbench .v696-queue-filters button { flex: 1 1 65px; }
@media (max-width: 760px) {
  .v699-training-footer { max-height: none; overflow: visible; }
  .v699-training-footer .v699-workflow-actions { width: 100%; margin: 0; }
  .v699-training-footer .v699-workflow-actions > button { flex: 1; }
  .v699-mode-tabs { flex-wrap: wrap; }
}

/* v702: explicit CRM quota mode, with technical audio protections unchanged. */
.v702-transcription-limit { border: 0; padding: 0; margin: 0; min-width: 0; }
.v702-transcription-limit legend { padding: 0; margin-bottom: 7px; color: var(--muted, #64748b); font-size: 13px; }
.v702-transcription-limit > div { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(0, 1fr); gap: 8px; }
.v702-transcription-limit > div:has(input[hidden]) { grid-template-columns: minmax(0, 1fr); }
.v702-transcription-limit input, .v702-transcription-limit select { min-width: 0; width: 100%; }
.v702-transcription-limit small { display: block; margin-top: 6px; color: var(--muted, #64748b); line-height: 1.5; }
.v702-transcription-failure { margin: 10px 0; padding: 12px; border: 1px solid #efd2a6; border-radius: 7px; background: #fff9ee; color: #6d522d; overflow-wrap: anywhere; }
.v702-transcription-failure > strong { display: block; font-size: 14px; line-height: 1.6; }
.v702-transcription-failure dl { display: grid; gap: 5px; margin: 8px 0; font-size: 12px; }
.v702-transcription-failure dl > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.v702-transcription-failure dt { color: #876c48; }
.v702-transcription-failure dd { margin: 0; min-width: 0; }
.v702-transcription-failure > p { margin: 6px 0 0; font-size: 12px; line-height: 1.6; }

/* v702 narrow-form fix: wrap long consent labels, rather than clipping content. */
#callTranscriptionConfigForm { min-width: 0; max-width: 100%; }
#callTranscriptionConfigForm > * { min-width: 0; max-width: 100%; }
#callTranscriptionConfigForm input:not([type="checkbox"]), #callTranscriptionConfigForm select { min-width: 0; max-width: 100%; }
#callTranscriptionConfigForm .compact-check { white-space: normal; align-items: flex-start; line-height: 1.6; }
#callTranscriptionConfigForm .compact-check input[type="checkbox"] { flex: 0 0 16px; width: 16px; min-width: 16px; height: 16px; min-height: 16px; margin: 2px 0 0; padding: 0; }
@media (max-width: 600px) {
  #callTranscriptionConfigForm { grid-template-columns: minmax(0, 1fr); }
}

/* v705: approved source / transcript / sentence review, isolated from all other CRM views. */
/* v705f: source-like conversation alignment; unknown roles remain neutral. */
#leadSentenceReview .v705-message .v705-message-select { display: flex; flex-direction: column; align-items: flex-start; }
#leadSentenceReview .v705-message.is-outgoing .v705-message-select { align-items: flex-end; }
#leadSentenceReview .v705-message .v705-message-head { width: 100%; }
#leadSentenceReview .v705-message.is-outgoing .v705-message-head { justify-content: flex-end; }
#leadSentenceReview .v705-message-nickname { max-width: 70%; white-space: normal; overflow-wrap: anywhere; }
#leadSentenceReview .v705-message-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; min-width: 0; }
#leadSentenceReview .v705-message .v705-message-body { max-width: 92%; text-align: left; }
#leadSentenceReview .v705-message.is-outgoing .v705-message-body { margin-left: auto; background: #e4f3ed; border-color: #cce7da; }
#leadSentenceReview .v705-message.is-outgoing.is-selected .v705-message-body { background: #dcecf8; border-color: #aecbf4; }
#leadSentenceReview .v705-message.is-incoming .v705-message-actions { justify-content: flex-start; }
#leadSentenceReview .v705-message.is-outgoing .v705-message-actions { justify-content: flex-end; }
#leadSentenceReview .v705-message.is-unknown .v705-message-actions { justify-content: flex-start; }
#leadSentenceReview .v705-message { display: block !important; }
#leadSentenceReview .v705-message-select { display: block; width: 100%; padding: 0; border: 0; text-align: left; background: transparent; color: inherit; }
#leadSentenceReview .v705-message-select:hover { background: transparent; border: 0; }
#leadSentenceReview .v705-add-comment { width: 100%; margin: 6px 0 14px; border-style: dashed; }
#leadSentenceReview .v705-quote-timeline { padding: 10px 12px; margin: 8px 0; border: 1px solid #deebfc; border-radius: 7px; font-size: 13px; color: #43536d; }
#leadSentenceReview .v705-quote-timeline summary { cursor: pointer; color: #2563eb; }
#leadSentenceReview .v705-quote-timeline button { display: block; width: 100%; margin-top: 8px; text-align: left; font-size: 13px; }
#leadSentenceReview .v705-knowledge-action { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e3ebf5; }
#leadSentenceReview .v705-knowledge-action small { color: #74839e; font-size: 12px; }
#leadSentenceReview .v705-knowledge-action form { width: 100%; }
#leadSentenceReview .v705-knowledge-action form label { display: block; margin: 8px 0; }
#leadSentenceReview .danger-text { color: #b74135; }
#leadSentenceReview .v705-comment-card[data-tags] .v705-comment-text { padding: 10px 12px; border-radius: 6px; }
#leadSentenceReview .v705-comment-card[data-tags~="strength"] .v705-comment-text { background: #ecf8f2; }
#leadSentenceReview .v705-comment-card[data-tags~="issue"] .v705-comment-text { background: #fff2ed; }
#leadSentenceReview .v705-comment-card[data-tags~="improvement"] .v705-comment-text { background: #edf5ff; }
#leadSentenceReview .v705-message-editor textarea { width: 100%; min-height: 75px; padding: 8px; border: 1px solid #ccdcf0; border-radius: 5px; }
#leadSentenceReview .v705-message-editor label { display: block; font-size: 13px; }
#leadSentenceReview .v705-message-editor input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; margin: 6px 5px 6px 0; vertical-align: middle; }
#leadSentenceReview .v705-message-editor .v705-form-actions { display: block; }
#leadSentenceReview .v705-message-editor :is(input,select) { min-width: 0; }
#leadSentenceReview .v705-status { flex-shrink: 0; flex-wrap: wrap; margin-bottom: 6px; }
#leadSentenceReview.v705-sentence-review {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 28px 20px;
  overflow: hidden;
  background: #f6f9fd;
  color: #15213a;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  isolation: isolate;
}
#leadSentenceReview.v705-sentence-review[hidden] { display: none; }
#leadSentenceReview *, #leadSentenceReview *::before, #leadSentenceReview *::after { box-sizing: border-box; }
#leadSentenceReview :is(button,input,select,textarea) { font: inherit; max-width: 100%; }
#leadSentenceReview button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid #cbdaf0; border-radius: 6px; background: #fff; color: #2563eb; line-height: 1.5; cursor: pointer; }
#leadSentenceReview button:hover { background: #f0f5ff; border-color: #8eb3ff; }
#leadSentenceReview button:disabled { opacity: .55; cursor: not-allowed; }
#leadSentenceReview button.primary-button, #leadSentenceReview button.v705-primary { color: #fff; border-color: #2563eb; background: #2563eb; }
#leadSentenceReview button.primary-button:hover, #leadSentenceReview button.v705-primary:hover { background: #1d4ed8; }
#leadSentenceReview :is(button,input,select,textarea):focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
#leadSentenceReview :is(h1,h2,h3,h4,p,figure) { margin: 0; }
#leadSentenceReview :is(img,svg) { max-width: 100%; }
#leadSentenceReview svg { width: 19px; height: 19px; flex: 0 0 auto; }
#leadSentenceReview .v705-review-header { position: relative; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; padding: 0 0 16px; }
#leadSentenceReview .v705-review-header > div { min-width: 0; }
#leadSentenceReview .v705-back { min-height: 27px; padding: 0; margin: 0 0 12px; border: 0; border-radius: 0; background: transparent; color: #2563eb; font-size: 15px; font-weight: 650; }
#leadSentenceReview .v705-back:hover { background: transparent; color: #1d4ed8; text-decoration: underline; }
#leadSentenceReview .v705-review-header h1 { color: #0f1830; font-size: 34px; line-height: 1.35; font-weight: 750; letter-spacing: -.4px; }
#leadSentenceReview .v705-review-subtitle, #leadSentenceReview .v705-review-header .subtitle { margin-top: 4px; color: #6b7d9b; font-size: 15px; }
#leadSentenceReview .v705-header-actions { display: flex; align-items: center; flex: 0 0 auto; justify-content: flex-end; flex-wrap: wrap; gap: 9px; max-width: 48%; }
#leadSentenceReview .v705-header-actions .primary-button { min-height: 45px; padding: 10px 19px; font-weight: 650; }
#leadSentenceReview .v705-review-grid { display: grid; grid-template-columns: minmax(0, 30fr) minmax(0, 28fr) minmax(0, 38fr); gap: 10px; min-height: 0; min-width: 0; flex: 1 1 auto; align-items: stretch; }
#leadSentenceReview .v705-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; border: 1px solid #dfe9f6; border-radius: 8px; background: #fff; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#leadSentenceReview .v705-pane-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
#leadSentenceReview .v705-pane-head > div { min-width: 0; }
#leadSentenceReview .v705-pane-head h2 { color: #111c34; font-size: 24px; line-height: 1.45; font-weight: 750; }
#leadSentenceReview .v705-pane-head p { margin-top: 1px; color: #74839e; font-size: 14px; line-height: 1.65; }
#leadSentenceReview .v705-pane-head button { flex: 0 0 auto; min-height: 34px; padding: 5px 10px; font-size: 14px; }
#leadSentenceReview .v705-pane-body { padding: 0 14px 14px; min-width: 0; }
#leadSentenceReview .v705-accounts { display: flex; flex: 0 0 auto; align-items: stretch; gap: 8px; min-width: 0; max-width: 100%; margin: 0 16px 16px; padding: 0 1px 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
#leadSentenceReview .v705-accounts button { flex: 1 0 auto; min-width: 118px; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; background: #eff4fa; color: #53647e; font-size: 14px; font-weight: 650; white-space: nowrap; }
#leadSentenceReview .v705-accounts button.is-active, #leadSentenceReview .v705-accounts button[aria-selected="true"] { border-color: #2563eb; background: #2563eb; color: #fff; }
#leadSentenceReview .v705-source-stage { min-width: 0; margin: 0 14px 14px; padding: 10px; border: 1px solid #e0e8f3; border-radius: 7px; background: #fff; }
#leadSentenceReview .v705-source-stage > header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; color: #1c2c48; font-size: 14px; }
#leadSentenceReview .v705-source-stage > header strong { font-size: 15px; font-weight: 700; }
#leadSentenceReview .v705-source-stage > header :is(time,small,span) { color: #74839e; font-size: 12px; }
#leadSentenceReview .v705-source-image { position: relative; width: 100%; line-height: 0; border-radius: 6px; background: #f4f6f9; overflow: hidden; }
#leadSentenceReview .v705-source-image > img, #leadSentenceReview .v705-source-stage > img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 6px; }
#leadSentenceReview .v705-source-highlight { position: absolute; border: 2px solid #2563eb; outline: 2px solid rgba(255,255,255,.85); border-radius: 5px; background: rgba(37,99,235,.09); pointer-events: none; }
#leadSentenceReview .v705-source-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 14px 16px; min-width: 0; }
#leadSentenceReview .v705-thumbnails { display: flex; align-items: flex-start; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
#leadSentenceReview .v705-thumbnails button { display: flex; flex: 0 0 88px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; min-height: 98px; padding: 3px; border: 1px solid #dbe5f2; border-radius: 5px; color: #6f7f97; font-size: 12px; text-align: left; }
#leadSentenceReview .v705-thumbnails button img { display: block; width: 80px; height: 67px; border-radius: 3px; object-fit: cover; object-position: top; }
#leadSentenceReview .v705-thumbnails button.is-active { border: 2px solid #2563eb; padding: 2px; color: #2563eb; background: #f5f8ff; }
#leadSentenceReview .v705-source-footer > button { flex: 0 0 auto; padding: 7px 10px; font-size: 13px; }
#leadSentenceReview .v705-message-list { min-width: 0; padding: 0 6px 12px; }
#leadSentenceReview .v705-message { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; min-width: 0; margin: 0 0 5px; padding: 14px 10px; border-left: 2px solid transparent; border-radius: 4px; background: #fff; }
#leadSentenceReview .v705-message.is-selected { border-left-color: #2563eb; background: #eaf2ff; }
#leadSentenceReview .v705-message-avatar { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
#leadSentenceReview .v705-message-avatar > img, #leadSentenceReview .v705-message > img { display: block; width: 38px; height: 38px; border-radius: 5px; object-fit: cover; }
#leadSentenceReview .v705-message.employee .v705-message-avatar > img { border-radius: 50%; }
#leadSentenceReview .v705-message-id { display: inline-flex; min-width: 32px; justify-content: center; border-radius: 4px; padding: 1px 5px; background: #eaf1ff; color: #2563eb; font-size: 11px; line-height: 1.7; }
#leadSentenceReview .v705-message.is-selected .v705-message-id { background: #2563eb; color: #fff; }
#leadSentenceReview .v705-message-content { min-width: 0; }
#leadSentenceReview .v705-message-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; min-width: 0; font-size: 14px; }
#leadSentenceReview .v705-message-head strong { color: #1c2841; font-size: 15px; font-weight: 700; }
#leadSentenceReview .v705-message-head :is(time,small) { color: #7b89a3; font-size: 12px; }
#leadSentenceReview .v705-message-body { display: block; width: fit-content; max-width: 100%; padding: 7px 10px; border: 1px solid #e1eaf5; border-radius: 6px; background: #f6f8fc; color: #24344f; font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
#leadSentenceReview .v705-message.is-selected .v705-message-body { background: #dceaff; border-color: #dceaff; }
#leadSentenceReview .v705-message-body img { display: block; width: auto; max-width: 100%; max-height: 240px; object-fit: contain; border-radius: 5px; }
#leadSentenceReview .v705-message-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 9px; margin-top: 6px; font-size: 12px; }
#leadSentenceReview .v705-message-actions button { min-height: 28px; padding: 3px 7px; font-size: 12px; }
#leadSentenceReview .v705-source-link { min-height: 26px; border: 0; padding: 0; background: transparent; color: #2563eb; font-size: 12px; }
#leadSentenceReview .v705-source-link:hover { background: transparent; text-decoration: underline; }
#leadSentenceReview .v705-message-select { min-height: 44px; }
#leadSentenceReview .v705-message-actions button { min-height: 44px; padding: 5px 12px; font-size: 13px; }
#leadSentenceReview .v705-comment-header > button { min-height: 44px; display: flex; align-items: center; }
#leadSentenceReview .v705-comment-quote:has(.v705-quote-select) { padding: 0; }
#leadSentenceReview .v705-quote-select { display: block; width: 100%; min-height: 44px; margin: 0; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; line-height: inherit; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
#leadSentenceReview .v705-quote-select:hover { background: #edf4ff; }
#leadSentenceReview :is(.v705-message-select, .v705-quote-select), #leadSentenceReview .v705-message-body { user-select: text; -webkit-user-select: text; }
#leadSentenceReview :is(.v705-message-select, .v705-quote-select, .v705-comment-header > button):focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px; }
#leadSentenceReview .v705-message-editor { width: 100%; min-height: 92px; margin: 5px 0; padding: 8px 10px; border: 1px solid #cbdaf0; border-radius: 6px; resize: vertical; background: #fff; color: #24344f; font-size: 14px; line-height: 1.7; }
#leadSentenceReview .v705-comments { min-width: 0; padding: 0 12px 12px; }
#leadSentenceReview .v705-comment-card { min-width: 0; margin-bottom: 10px; padding: 12px 13px; border: 1px solid #dce8fa; border-radius: 8px; background: #fff; }
#leadSentenceReview .v705-comment-card.is-selected { border-color: #8cafff; background: #f3f7ff; }
#leadSentenceReview .v705-comment-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 5px 8px; margin-bottom: 5px; }
#leadSentenceReview .v705-comment-header > strong { display: block; min-width: 0; color: #2563eb; font-size: 15px; font-weight: 700; }
#leadSentenceReview .v705-comment-header > button { border: 0; border-radius: 0; padding: 0; min-height: 44px; background: transparent; color: #2563eb; font-size: 16px; font-weight: 700; }
#leadSentenceReview .v705-comment-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; }
#leadSentenceReview .v705-comment-tools button { min-height: 27px; padding: 2px 5px; border: 0; background: transparent; font-size: 12px; }
#leadSentenceReview .v705-comment-tools .v705-delete { color: #d2473f; }
#leadSentenceReview .v705-comment-author { display: inline-block; border-radius: 4px; padding: 2px 6px; background: #eaf1ff; color: #2563eb; font-size: 11px; font-weight: 650; }
#leadSentenceReview .v705-comment-author.is-human { background: #eef4f0; color: #147c65; }
#leadSentenceReview .v705-comment-quote { margin: 7px 0 9px; padding: 7px 10px; border: 1px solid #edf2f8; border-radius: 6px; background: #f8fafd; color: #23334c; font-size: 16px; line-height: 1.65; white-space: pre-wrap; }
#leadSentenceReview .v705-comment-point { margin-top: 8px; padding: 9px 11px; border-radius: 6px; background: #f4f6fa; }
#leadSentenceReview .v705-comment-point.positive { background: #ecf8f2; }
#leadSentenceReview .v705-comment-point.problem { background: #fff2ed; }
#leadSentenceReview .v705-comment-point.suggestion { background: #edf5ff; }
#leadSentenceReview .v705-tag { display: inline-flex; align-items: center; width: fit-content; gap: 4px; margin: 0 4px 3px 0; border-radius: 4px; padding: 2px 6px; color: #55647c; background: #e9eef5; font-size: 12px; font-weight: 650; line-height: 1.5; }
#leadSentenceReview .v705-tag.positive, #leadSentenceReview .v705-tag.is-positive { background: #d9f3e5; color: #10865e; }
#leadSentenceReview .v705-tag.problem, #leadSentenceReview .v705-tag.is-problem { background: #ffe1d6; color: #b94d2b; }
#leadSentenceReview .v705-tag.suggestion, #leadSentenceReview .v705-tag.is-suggestion { background: #dfecff; color: #2563eb; }
#leadSentenceReview .v705-comment-text { margin: 0; color: #273750; font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
#leadSentenceReview .v705-comment-form { min-width: 0; margin: 12px 0; padding: 12px 0 0; border-top: 1px solid #e3ebf5; }
#leadSentenceReview .v705-comment-form h3 { margin-bottom: 2px; color: #1c2b45; font-size: 15px; font-weight: 700; }
#leadSentenceReview .v705-comment-form > p { margin-bottom: 8px; color: #7a88a1; font-size: 12px; }
#leadSentenceReview .v705-comment-form label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: #43536d; }
#leadSentenceReview .v705-comment-form input[type="checkbox"] { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; padding: 0; margin: 0; accent-color: #2563eb; }
#leadSentenceReview .v705-comment-categories { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 9px 0; }
#leadSentenceReview .v705-comment-form textarea, #leadSentenceReview .v705-summary-block textarea { display: block; width: 100%; min-height: 86px; padding: 9px 10px; border: 1px solid #ccdcf0; border-radius: 6px; background: #fff; color: #24344f; resize: vertical; font-size: 14px; line-height: 1.7; }
#leadSentenceReview .v705-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
#leadSentenceReview .v705-form-actions button { min-height: 31px; padding: 4px 10px; font-size: 13px; }
#leadSentenceReview .v705-summary-block { min-width: 0; margin: 10px 0 0; padding: 10px 12px; border: 1px solid #deebfc; border-radius: 7px; background: #fff; }
#leadSentenceReview .v705-summary-block > header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; }
#leadSentenceReview .v705-summary-block h3 { margin: 0; color: #2563eb; font-size: 17px; line-height: 1.5; font-weight: 700; }
#leadSentenceReview .v705-summary-block header button { min-height: 25px; border: 0; padding: 2px 3px; background: transparent; font-size: 12px; }
#leadSentenceReview .v705-summary-block > p, #leadSentenceReview .v705-summary-text { padding: 7px 10px; border-radius: 5px; background: #f1f5fa; color: #33435d; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
#leadSentenceReview .v705-empty { margin: 12px 16px; padding: 25px 14px; border: 1px dashed #d7e1ef; border-radius: 7px; color: #7a89a0; background: #fafcff; text-align: center; font-size: 14px; }
#leadSentenceReview .v705-status { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 3px 8px; border-radius: 4px; background: #edf3ff; color: #4169ab; font-size: 12px; line-height: 1.5; }
#leadSentenceReview .v705-status.is-success { background: #e7f6ef; color: #168363; }
#leadSentenceReview .v705-status.is-error { background: #fff0eb; color: #b65335; }
#leadSentenceReview .v705-status.is-warning { background: #fff6e5; color: #997025; }
#leadSentenceReview .v705-proofnote { display: block; min-width: 0; margin: 6px 0 0; color: #7b89a0; font-size: 11px; line-height: 1.65; }
#leadSentenceReview .v705-error { margin: 8px 0; padding: 8px 10px; border: 1px solid #f2d8ce; border-radius: 5px; background: #fff5f1; color: #a44a30; font-size: 13px; }
@media (min-width: 1650px) {
  #leadSentenceReview.v705-sentence-review { padding-inline: 32px; }
  #leadSentenceReview .v705-review-grid { gap: 14px; }
  #leadSentenceReview .v705-pane-head { padding: 18px 21px 14px; }
  #leadSentenceReview .v705-message { padding-block: 16px; }
  #leadSentenceReview .v705-comment-card { padding: 15px 16px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  #leadSentenceReview.v705-sentence-review { padding: 14px 16px 16px; }
  #leadSentenceReview .v705-review-grid { grid-template-columns: minmax(0, 30fr) minmax(0, 29fr) minmax(0, 37fr); gap: 8px; }
  #leadSentenceReview .v705-pane-head { padding: 13px 12px 10px; gap: 7px; }
  #leadSentenceReview .v705-pane-head h2 { font-size: 20px; }
  #leadSentenceReview .v705-pane-head p { font-size: 12px; }
  #leadSentenceReview .v705-pane-head button { font-size: 12px; padding-inline: 6px; }
  #leadSentenceReview .v705-accounts { margin-inline: 10px; }
  #leadSentenceReview .v705-source-stage { margin-inline: 9px; padding: 7px; }
  #leadSentenceReview .v705-message { grid-template-columns: 31px minmax(0,1fr); padding-inline: 5px; gap: 7px; }
  #leadSentenceReview .v705-message-avatar > img, #leadSentenceReview .v705-message > img { width: 31px; height: 31px; }
  #leadSentenceReview .v705-message-body { padding: 6px 8px; font-size: 14px; }
  #leadSentenceReview .v705-comments { padding-inline: 9px; }
  #leadSentenceReview .v705-comment-card { padding: 10px; }
  #leadSentenceReview .v705-source-footer { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  #leadSentenceReview.v705-sentence-review { overflow-y: auto; overflow-x: hidden; padding: 16px; }
  #leadSentenceReview .v705-review-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  #leadSentenceReview .v705-review-header h1 { font-size: 27px; }
  #leadSentenceReview .v705-header-actions { max-width: 100%; margin-left: auto; }
  #leadSentenceReview .v705-header-actions .primary-button { min-height: 39px; padding: 7px 14px; }
  #leadSentenceReview .v705-review-grid { flex: 0 0 auto; display: flex; flex-direction: column; gap: 14px; min-height: auto; width: 100%; }
  #leadSentenceReview .v705-pane { flex: 0 0 auto; overflow: visible; min-height: auto; scrollbar-gutter: auto; }
  #leadSentenceReview .v705-source-image { max-width: 560px; margin-inline: auto; }
  #leadSentenceReview .v705-message-list { padding-inline: 10px; }
  #leadSentenceReview .v705-comment-tools button { min-height: 34px; padding-inline: 7px; }
}
@media (max-width: 480px) {
  #leadSentenceReview.v705-sentence-review { padding: 12px 10px 18px; }
  #leadSentenceReview .v705-back { margin-bottom: 8px; font-size: 14px; }
  #leadSentenceReview .v705-review-header h1 { font-size: 25px; }
  #leadSentenceReview .v705-review-subtitle, #leadSentenceReview .v705-review-header .subtitle { font-size: 12px; }
  #leadSentenceReview .v705-header-actions { gap: 6px; }
  #leadSentenceReview .v705-header-actions button { min-height: 36px; padding: 6px 9px; font-size: 13px; }
  #leadSentenceReview .v705-pane-head { padding: 13px 12px 10px; gap: 8px; }
  #leadSentenceReview .v705-pane-head h2 { font-size: 20px; }
  #leadSentenceReview .v705-pane-head p { font-size: 12px; }
  #leadSentenceReview .v705-pane-head button { padding-inline: 8px; font-size: 12px; }
  #leadSentenceReview .v705-accounts { margin-inline: 10px; margin-bottom: 12px; }
  #leadSentenceReview .v705-accounts button { min-width: 112px; padding-inline: 11px; font-size: 13px; }
  #leadSentenceReview .v705-source-stage { margin-inline: 9px; padding: 7px; }
  #leadSentenceReview .v705-source-footer { margin-inline: 10px; flex-wrap: wrap; }
  #leadSentenceReview .v705-message-list { padding-inline: 4px; }
  #leadSentenceReview .v705-message { grid-template-columns: 32px minmax(0,1fr); gap: 7px; padding: 12px 7px; }
  #leadSentenceReview .v705-message-avatar > img, #leadSentenceReview .v705-message > img { width: 32px; height: 32px; }
  #leadSentenceReview .v705-message-head strong { font-size: 14px; }
  #leadSentenceReview .v705-message-body { font-size: 14px; padding: 6px 8px; }
  #leadSentenceReview .v705-comments { padding-inline: 9px; }
  #leadSentenceReview .v705-comment-card { padding: 10px; }
  #leadSentenceReview .v705-comment-header > strong { font-size: 14px; }
  #leadSentenceReview .v705-comment-tools { width: 100%; justify-content: flex-end; }
  #leadSentenceReview .v705-comment-quote { font-size: 13px; }
  #leadSentenceReview .v705-summary-block { padding: 10px; }
  #leadSentenceReview .v705-summary-block h3 { font-size: 16px; }
}

/* v729: one identity control per speaker; explicit per-sentence corrections. */
.v693-identity-editor .v727-identity-sample > div { flex-wrap: wrap; }
.v693-identity-editor .v729-speaker-correction { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.v693-identity-editor .v729-speaker-correction select { max-width: 220px; }
.v693-identity-editor .v727-identity-sample .v727-group-choice { margin-left: 0; }
.v693-identity-editor .v727-group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v693-identity-editor .v727-group-actions select { max-width: 220px; }
@media (max-width: 560px) {
  .v693-identity-editor .v729-speaker-correction select { width: 100%; max-width: none; }
  .v693-identity-editor .v727-group-actions select { width: 100%; max-width: none; }
}

/* v734: approved compact batch adjustment workspace. */
#formModal:has(.v734-price-batch) { z-index: 150; }
#formModal:has(.v734-price-batch) .modal-panel { width: min(1180px, 100%); max-height: calc(100dvh - 40px); }
#formModal:has(.v734-price-batch) .modal-header { min-height: 55px; padding: 16px 24px 8px; border-bottom: 0; }
#formModal:has(.v734-price-batch) .modal-header h2 { margin: 0; font-size: 23px; line-height: 1.35; }
#formModal:has(.v734-price-batch) .modal-header .icon-button { width: 36px; height: 36px; }
#formModal:has(.v734-price-batch) .modal-body { display: flex; padding: 0; min-height: 0; overflow: hidden; }
.v734-price-batch { display: flex; flex-direction: column; min-width: 0; min-height: 0; width: 100%; gap: 0; }
.v734-price-batch .v734-batch-subtitle { margin: 0; padding: 0 24px 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.v734-batch-main { display: grid; grid-template-columns: 31.5% minmax(0, 1fr); min-height: 0; overflow: hidden; border-top: 1px solid var(--line); }
.v734-batch-sidebar { display: flex; flex-direction: column; min-width: 0; padding: 17px 12px 16px; border-right: 1px solid var(--line); min-height: 0; }
.v734-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 9px 13px; }
.v734-price-batch h3 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 700; }
.v734-list-heading h3 b { color: var(--primary); margin-left: 7px; font-size: 16px; }
.v734-price-batch .v734-add-link { color: var(--primary); background: transparent; border: 0; padding: 2px 0; min-height: 30px; white-space: nowrap; font-size: 14px; box-shadow: none; }
.v734-order-list { flex: 1 1 auto; overflow: auto; min-height: 190px; max-height: 520px; }
.v734-order-row { position: relative; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.v734-order-row.is-active { background: #edf3ff; border-left-color: var(--primary); border-bottom-color: transparent; }
.v734-order-row.has-error { border-left-color: var(--danger, #c83d43); }
.v734-price-batch .v734-order-select { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; width: 100%; text-align: left; padding: 13px 30px 13px 11px; background: transparent; border: 0; box-shadow: none; border-radius: 0; min-height: 104px; color: var(--text); font-size: 13px; line-height: 1.45; }
.v734-order-select strong { font-size: 14px; overflow-wrap: anywhere; }
.v734-order-select b { grid-column: 2; grid-row: 1 / span 3; align-self: center; white-space: nowrap; font-size: 15px; font-weight: 650; }
.v734-order-select > span { grid-column: 1; overflow-wrap: anywhere; color: var(--muted); }
.v734-order-select > .v734-order-owners { grid-column: 1 / -1; font-size: 12px; }
.v734-price-batch .v734-order-remove { position: absolute; top: 6px; right: 3px; min-width: 24px; min-height: 27px; width: 24px; height: 27px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; box-shadow: none; }
.v734-price-batch .v734-order-remove:hover { color: var(--danger, #c83d43); background: #fff0f0; }
.v734-price-batch .v734-add-order { margin: 18px 9px 0; min-height: 39px; color: var(--primary); background: white; font-size: 14px; }
.v734-batch-detail { min-width: 0; min-height: 0; overflow: auto; padding: 15px 22px 14px; }
.v734-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.v734-price-batch .v734-query-window { min-height: 31px; font-size: 12px; padding: 4px 9px; color: var(--primary); }
.v734-query-window > span { margin-right: 3px; font-size: 16px; }
.v734-source-lookup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); gap: 10px 14px; }
.v734-price-batch label { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.v734-price-batch input, .v734-price-batch select { width: 100%; min-width: 0; min-height: 36px; height: 36px; padding: 7px 10px; border-radius: 5px; font-size: 13px; color: var(--text); background: white; }
.v734-code-query { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
.v734-price-batch .v734-code-query > button { height: 36px; min-height: 36px; padding: 6px 15px; font-size: 13px; }
.v734-exact-source { grid-column: 1 / -1; }
.v734-query-fallback { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--muted); }
.v734-query-fallback:has(a[hidden]):not(:has(span:not(:empty))) { display: none; }
.v734-query-fallback a:not([hidden]), .v734-query-fallback span:not(:empty) { margin-top: 8px; }
.v734-source-info { background: #f3f5f8; border-radius: 7px; margin-top: 14px; padding: 13px 16px; }
.v734-source-empty { display: grid; place-items: center; min-height: 192px; padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.v734-source-title { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.v734-source-title > span { color: var(--muted); font-size: 11px; }
.v734-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; margin: 0; }
.v734-source-fact { min-width: 0; }
.v734-source-fact.is-wide { grid-column: span 2; }
.v734-source-fact:nth-child(4) { grid-column: 1 / -1; }
.v734-source-fact dt { margin: 0 0 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.v734-source-fact dd { margin: 0; color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.v734-attribution-warning { margin-top: 11px; padding-top: 8px; border-top: 1px solid #e2d7b7; color: #86631e; font-size: 12px; line-height: 1.5; }
.v734-current-entry { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.v734-current-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; margin-top: 9px; }
.v734-current-fields > label { flex-direction: row; align-items: center; gap: 10px; }
.v734-current-fields > label > span { white-space: nowrap; }
.v734-profit-input { display: flex; align-items: center; border: 1px solid var(--primary); border-radius: 5px; min-width: 0; background: white; }
.v734-profit-input i { font-style: normal; font-size: 14px; padding-left: 10px; color: var(--text); }
.v734-price-batch .v734-profit-input input { border: 0; box-shadow: none; padding-left: 7px; }
.v734-profit-input:focus-within { outline: 2px solid #c6d5ff; outline-offset: 1px; }
.v734-price-batch #priceAdjustmentFormStatus { min-height: 0; margin: 0; padding: 0; font-size: 12px; line-height: 1.5; }
.v734-price-batch #priceAdjustmentFormStatus:not(:empty) { padding-top: 9px; }
.v734-batch-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding: 14px 22px; background: white; }
.v734-batch-total { min-width: 0; font-size: 14px; font-weight: 650; line-height: 1.5; }
.v734-batch-total b, .v734-batch-total strong { color: var(--primary); }
.v734-batch-total strong { font-size: 17px; margin-left: 4px; }
.v734-batch-total small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.v734-batch-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; flex-shrink: 0; }
.v734-batch-actions > button { min-height: 39px; min-width: 84px; font-size: 13px; }
.v734-price-batch .v734-row-error { color: var(--danger, #c83d43); font-size: 11px; grid-column: 1 / -1; }
.v734-price-batch button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.v734-price-batch button:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 900px) {
  #formModal:has(.v734-price-batch) { padding: 12px; }
  #formModal:has(.v734-price-batch) .modal-panel { max-height: calc(100dvh - 24px); }
  .v734-batch-main { grid-template-columns: 29% minmax(0, 1fr); }
  .v734-batch-detail { padding-inline: 15px; }
  .v734-order-select b { grid-column: 1; grid-row: auto; font-size: 13px; }
  .v734-current-fields > label { flex-direction: column; align-items: stretch; gap: 5px; }
}
@media (max-width: 620px) {
  #formModal:has(.v734-price-batch) .modal-header { padding: 12px 14px 6px; }
  #formModal:has(.v734-price-batch) .modal-header h2 { font-size: 21px; }
  .v734-price-batch .v734-batch-subtitle { padding: 0 14px 11px; font-size: 12px; }
  .v734-batch-main { display: block; overflow: auto; }
  .v734-batch-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .v734-list-heading { padding: 0 0 8px; }
  .v734-order-list { display: flex; gap: 8px; overflow: auto; min-height: 0; max-height: none; }
  .v734-order-row { min-width: 190px; max-width: 230px; border: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 5px; }
  .v734-order-select { height: 100%; }
  .v734-price-batch .v734-order-select { min-height: 83px; padding-block: 9px; }
  .v734-order-select > .v734-order-owners { display: none; }
  .v734-price-batch .v734-add-order { min-height: 32px; margin: 9px 0 0; }
  .v734-batch-detail { overflow: visible; padding: 13px 14px; }
  .v734-source-lookup { grid-template-columns: 1fr; gap: 9px; }
  .v734-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .v734-source-fact.is-wide { grid-column: span 1; }
  .v734-source-fact:nth-child(4), .v734-source-fact:nth-child(6) { grid-column: 1 / -1; }
  .v734-current-fields { gap: 10px; grid-template-columns: 1fr 1fr; }
  .v734-batch-footer { flex-wrap: wrap; padding: 10px 14px 12px; gap: 10px; }
  .v734-batch-total { font-size: 12px; }
  .v734-batch-total strong { font-size: 14px; }
  .v734-batch-actions { gap: 7px; }
  .v734-batch-actions > button { min-width: 72px; min-height: 38px; }
}

/* v743: one compact identity card per voice; long/uncertain originals stay accessible. */
.v743-voice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.v743-voice-cards .v727-identity-card { margin: 0; min-width: 0; }
.v743-voice-cards .v727-identity-sample { padding: 10px 0; }
.v743-voice-cards details > summary, .v743-voice-editor > details > summary { cursor: pointer; color: #4853e8; padding: 10px 0; }
.v743-voice-cards details[open] { max-height: 360px; overflow: auto; }
.v743-voice-editor > details[open] { max-height: 400px; overflow: auto; }
.v743-voice-regroup { border: 1px solid #dce1f6; border-radius: 8px; padding: 12px; margin-bottom: 12px; background: #fafbff; }
.v743-voice-regroup .form-actions { justify-content: flex-start; flex-wrap: wrap; }
.v743-two-speakers { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 0; }
.v743-two-speakers small { flex-basis: 100%; }
@media (max-width: 760px) { .v743-voice-cards { grid-template-columns: 1fr; } }

/* v747: independent lead conversion notice, reusing the visit notice layout. */
#frontendProfitPanel .frontend-conversion-topline { display: flex; align-items: stretch; flex: 1 0 100%; min-width: 0; gap: 16px; }
#frontendProfitPanel .v736-conversion-head .frontend-conversion-topline > .conversion-tabs { flex: 0 0 auto; padding: 0; border-bottom: 0; align-items: end; }
#frontendProfitPanel .lead-dashboard-announcement { min-height: 42px; margin-left: 0; gap: 16px; }
#frontendProfitPanel .lead-dashboard-announcement .visit-announcement-label { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 1000px) {
  #frontendProfitPanel .frontend-conversion-topline { flex-wrap: wrap; }
  #frontendProfitPanel .lead-dashboard-announcement { flex-basis: 100%; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  #frontendProfitPanel .frontend-conversion-topline > .conversion-tabs { width: 100%; overflow-x: auto; align-items: stretch; }
  #frontendProfitPanel .lead-dashboard-announcement { gap: 10px; }
  #frontendProfitPanel .lead-dashboard-announcement .visit-announcement-label { padding-right: 10px; font-size: 14px; }
}

/* v750: eight registration tables share v749's height plus about two customer rows. */
#view-recycle [data-backend-panel="deposit"] > .table-wrap,
#view-recycle .table-wrap[data-backend-panel="recycle"],
#view-recycle [data-backend-panel="wechat-registration"] > .table-wrap,
#view-recycle [data-backend-panel="referral"] > .table-wrap,
#view-recycle [data-backend-panel="failed-expense"] > .table-wrap,
#view-recycle [data-backend-panel="price"] > .table-wrap,
#view-recycle [data-backend-panel="pledge"] > .table-wrap,
#view-recycle [data-backend-panel="fake"] > .table-wrap {
  height: calc(clamp(360px, 62vh, 900px) + 260px);
  max-height: none;
}

#view-recycle [data-backend-panel="wechat-registration"] .wechat-registration-table thead th,
#view-recycle [data-backend-panel="referral"] .backend-referral-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* v751: exact return workspace only; no backend registration or other page changes. */
#view-returnOrders .table-wrap.fulfillment-table-wrap {
  height: clamp(440px, 66vh, 940px);
  max-height: none;
  max-width: 100%;
  overflow: auto;
}
#view-returnOrders #returnOrderTable { min-width: 3520px; table-layout: fixed; }
#view-returnOrders #returnOrderTable th,
#view-returnOrders #returnOrderTable td { box-sizing: border-box; overflow-wrap: anywhere; line-height: 1.55; }
#view-returnOrders #returnOrderTable th { position: sticky; top: 0; z-index: 3; white-space: normal; background: var(--panel-soft); }
#view-returnOrders #returnOrderTable th:nth-child(1) { width: 44px; }
#view-returnOrders #returnOrderTable th:nth-child(2) { width: 225px; }
#view-returnOrders #returnOrderTable th:nth-child(3) { width: 180px; }
#view-returnOrders #returnOrderTable th:nth-child(4) { width: 220px; }
#view-returnOrders #returnOrderTable th:nth-child(5),
#view-returnOrders #returnOrderTable th:nth-child(6) { width: 230px; }
#view-returnOrders #returnOrderTable th:nth-child(7) { width: 300px; }
#view-returnOrders #returnOrderTable th:nth-child(8),
#view-returnOrders #returnOrderTable th:nth-child(10) { width: 205px; }
#view-returnOrders #returnOrderTable th:nth-child(9),
#view-returnOrders #returnOrderTable th:nth-child(11) { width: 340px; }
#view-returnOrders #returnOrderTable th:nth-child(12) { width: 280px; }
#view-returnOrders #returnOrderTable th:nth-child(13) { width: 235px; }
#view-returnOrders #returnOrderTable th:nth-child(14) { width: 270px; }
#view-returnOrders #returnOrderTable th:nth-child(15) { width: 215px; }
#view-returnOrders .return751-date-cell > small { display: block; margin-top: 5px; }
#view-returnOrders .return751-shop + .return751-shop,
#view-returnOrders .return751-assignment + .return751-assignment,
#view-returnOrders .return751-appraisal-item + .return751-appraisal-item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
#view-returnOrders .return751-shop > strong,
#view-returnOrders .return751-meta-label { display: block; }
#view-returnOrders .return751-meta-label { margin-bottom: 3px; font-size: 12px; color: var(--muted); }
#view-returnOrders .return751-details { margin-top: 8px; }
#view-returnOrders .return751-details > summary { color: var(--blue); cursor: pointer; padding: 6px 0; font-weight: 600; }
#view-returnOrders .return751-record-content { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
#view-returnOrders .return751-follow-list { display: grid; gap: 12px; padding-top: 8px; }
#view-returnOrders .return751-follow-record { border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: var(--panel-soft); }
#view-returnOrders .return751-follow-record > header { display: grid; gap: 4px; }
#view-returnOrders .return751-follow-record time { font-size: 12px; color: var(--muted); }
#view-returnOrders .return751-appraisal-item { padding-top: 8px; }
#view-returnOrders .activity-attachments { flex-wrap: wrap; }
#view-returnOrders .activity-attachment { max-width: 132px; }
#view-returnOrders .row-actions { margin-top: 10px; }

/* v752: independent postal settings only. Existing visit panels are unchanged. */
.organization-settings-panel .backend-business-tabs752,
.organization-settings-panel .postal-tier-round-tabs752 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 20px;
  padding: 0 4px;
}

.organization-settings-panel .backend-business-tabs752 button,
.organization-settings-panel .postal-tier-round-tabs752 button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  padding: 11px 22px;
  cursor: pointer;
}

.organization-settings-panel .backend-business-tabs752 button.is-active,
.organization-settings-panel .postal-tier-round-tabs752 button.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.organization-settings-panel .backend-business-tabs752 button:focus-visible,
.organization-settings-panel .postal-tier-round-tabs752 button:focus-visible,
.postal-tier-workspace752 button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.organization-settings-panel .postal-tier-workspace752 {
  display: grid;
  gap: 12px;
  min-width: 0;
  font-size: 14px;
  color: var(--text);
}

.organization-settings-panel .postal-tier-section752 {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px 24px 12px;
}

.postal-tier-heading752,
.postal-tier-person-heading752 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 12px;
}

.postal-tier-heading752 h3,
.postal-tier-person-heading752 h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: 0;
}

.postal-tier-heading752 h3 .pill {
  font-size: 12px;
  font-weight: 500;
}

.postal-tier-heading752 p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.postal-tier-heading-actions752,
.postal-tier-form-actions752 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.postal-tier-heading-actions752 {
  padding-top: 2px;
}

.postal-tier-heading-actions752 button,
.postal-tier-form-actions752 button {
  min-height: 38px;
}

.postal-tier-person-heading752 {
  align-items: center;
}

.postal-tier-person-heading752 > span {
  border-radius: 5px;
  background: #f4f6ff;
  color: #56658d;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
}

.postal-tier-table-wrap752 {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.postal-tier-table752 {
  width: 100%;
  min-width: 650px;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.55;
}

.postal-tier-table752 th,
.postal-tier-table752 td {
  border-right: 1px solid #e9edf5;
  border-bottom: 1px solid var(--line);
  padding: 13px 18px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.postal-tier-table752 th {
  background: #f5f7fb;
  color: #3c4a65;
  font-weight: 700;
}

.postal-tier-table752 td:last-child,
.postal-tier-table752 th:last-child {
  border-right: 0;
}

.postal-tier-table752 tr:last-child td {
  border-bottom: 0;
}

.postal-tier-table752 tbody tr:hover {
  background: #fafbff;
}

.postal-tier-table752 .pill {
  margin-left: 8px;
  white-space: normal;
}

.postal-tier-table752 .text-button {
  white-space: nowrap;
  font-size: 14px;
}

.postal-tier-table752 small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 3px;
}

.postal-tier-level-table752 th:nth-child(1) { width: 24%; }
.postal-tier-level-table752 th:nth-child(2) { width: 32%; }
.postal-tier-level-table752 th:nth-child(3) { width: 32%; }
.postal-tier-level-table752 th:nth-child(4) { width: 12%; }
.organization-settings-panel .postal-tier-level-table752 th {
  padding-top: 7px;
  padding-bottom: 7px;
}
.organization-settings-panel .postal-tier-level-table752 td {
  padding-top: 5px;
  padding-bottom: 5px;
}
.organization-settings-panel .postal-tier-level-table752 .text-button {
  min-height: 26px;
  height: 26px;
  line-height: 18px;
  padding: 2px 8px;
}
.organization-settings-panel .postal-tier-section752 > .postal-tier-note752 {
  margin-top: 8px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.postal-tier-person-table752 th:nth-child(1) { width: 16%; }
.postal-tier-person-table752 th:nth-child(2) { width: 18%; }
.postal-tier-person-table752 th:nth-child(3) { width: 18%; }
.postal-tier-person-table752 th:nth-child(4) { width: 30%; }
.postal-tier-person-table752 th:nth-child(5) { width: 18%; }

.postal-tier-grade752 {
  display: inline-block;
  border-radius: 4px;
  background: #efedff;
  color: #5147bc;
  font-weight: 600;
  padding: 4px 12px;
}

.postal-tier-note752 {
  margin: 12px 0 0;
  border-radius: 5px;
  background: #f0f5ff;
  color: #526591;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.7;
}

.postal-tier-note752.is-warning {
  background: #fff8e9;
  color: #926115;
}

.organization-settings-panel .postal-tier-loading752 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 160px;
  padding: 30px 24px;
  color: var(--muted);
}

.organization-settings-panel .postal-tier-allocation752 {
  padding: 12px 24px 24px;
}

.organization-settings-panel .postal-tier-round-tabs752 {
  margin-bottom: 0;
  padding: 0;
}

.postal-tier-form752 {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.postal-tier-form752 h4,
.postal-tier-preview-results752 h4,
.postal-tier-promotion752 h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}

.postal-tier-form752 p {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.7;
}

.postal-tier-form-grid752 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
  min-width: 0;
}

.postal-tier-form752 label:not(.postal-tier-checkbox752) {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}

.postal-tier-form752 input:not([type="checkbox"]),
.postal-tier-form752 select,
.postal-tier-form752 textarea {
  width: 100%;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
}

.postal-tier-form752 textarea {
  min-height: 72px;
  resize: vertical;
}

.postal-tier-form752 input[readonly] {
  background: #f7f8fc;
  color: var(--muted);
}

.postal-tier-checkbox752 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.postal-tier-checkbox752 input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.postal-tier-ranking752 {
  display: grid;
  gap: 8px;
  background: #f7f8fd;
  padding: 13px 16px;
  border-radius: 6px;
}

.postal-tier-ranking752 p {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(0, 1fr);
  gap: 14px;
  font-size: 14px;
}

.postal-tier-ranking752 p span {
  color: var(--muted);
}

.postal-tier-modal752 {
  min-width: 0;
  font-size: 14px;
}

.postal-tier-rules-table752 {
  min-width: 740px;
}

.postal-tier-rules-table752 th,
.postal-tier-rules-table752 td {
  padding: 10px;
}

.postal-tier-rules-table752 th:first-child {
  width: 24%;
}

.postal-tier-promotion752,
.postal-tier-preview-results752 {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}

.postal-tier-promotion752 > p {
  margin: 0;
  line-height: 1.65;
}

.postal-tier-history752 p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
}

.postal-tier-history752 p > span:last-child {
  flex-basis: 100%;
  color: var(--muted);
}

.postal-tier-preview-results752 details {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 800px) {
  .organization-settings-panel .postal-tier-section752,
  .organization-settings-panel .postal-tier-allocation752 {
    padding: 16px 12px;
  }
  .postal-tier-heading752 h3,
  .postal-tier-person-heading752 h3 {
    font-size: 19px;
  }
  .postal-tier-heading752 p {
    font-size: 14px;
  }
  .postal-tier-heading-actions752 {
    width: 100%;
  }
  .postal-tier-form-grid752,
  .postal-tier-ranking752 p {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .postal-tier-person-heading752 > span {
    width: 100%;
  }
  .organization-settings-panel .backend-business-tabs752 button,
  .organization-settings-panel .postal-tier-round-tabs752 button {
    min-height: 42px;
    padding: 10px 14px;
  }
  .postal-tier-form-actions752 > button {
    min-height: 42px;
  }
}

/* v753: configurable postal grades use three columns; other tables unchanged. */
.organization-settings-panel .postal-tier-level-table752 th:nth-child(1) { width: 34%; }
.organization-settings-panel .postal-tier-level-table752 th:nth-child(2) { width: 52%; }
.organization-settings-panel .postal-tier-level-table752 th:nth-child(3) { width: 14%; }

/* v755: postal partial purchase keeps rejected source materials outside financial facts. */
#recycleForm .shipping-item-decision755 {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr);
  gap: 12px 18px;
  padding: 14px;
  margin: 0 0 16px;
  border: 1px solid #d7dfff;
  border-radius: 8px;
  background: #f5f7ff;
}
#recycleForm .shipping-item-decision755 > p { grid-column: 1 / -1; margin: 0; }
#recycleForm .shipping-item-decision755 [hidden] { display: none; }
#recycleForm .shipping-item-rejected755 { border: 1px solid #cdd4df; background: #f8fafc; }
#recycleForm .shipping-item-rejected755 .recycle-item-field-grid { opacity: .78; }
#recycleForm .shipping-source-images755 { margin: 10px 0 16px; }
#recycleForm .shipping-source-images755 summary { cursor: pointer; color: #304ca4; }
#recycleForm .shipping-saved-rejected755 {
  grid-column: 1 / -1;
  padding: 16px;
  margin: 12px 0 20px;
  border: 1px solid #d9dfe8;
  border-radius: 8px;
  background: #f8fafc;
}
#recycleForm .shipping-saved-rejected755 article { padding: 12px 0; border-bottom: 1px solid #dfe4ed; }
#recycleForm .shipping-saved-rejected755 article:last-of-type { border-bottom: 0; }
#recycleForm .shipping-saved-rejected755 article > div { margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
#recycleForm .shipping-selection-warning755 { padding: 12px; background: #fff6df; color: #745000; border-radius: 6px; }
@media (max-width: 700px) {
  #recycleForm .shipping-item-decision755 { grid-template-columns: 1fr; }
}

/* v756: derived postal outcomes supplement existing totals; no new columns. */
.shipping-outcome-status756 { white-space: normal; line-height: 1.55; }
.shipping-recycle-outcome756 { margin-top: 8px; min-width: 190px; line-height: 1.55; }
.shipping-recycle-outcome756 > .muted { color: #52627b; }
.shipping-outcome-rejected756 { margin-top: 8px; }
.shipping-outcome-rejected756 > summary { color: #304ca4; cursor: pointer; }
.shipping-outcome-rejected756 .shipping-saved-rejected755 {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #d9dfe8;
  border-radius: 8px;
  background: #f8fafc;
  min-width: 230px;
  max-width: 460px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.shipping-outcome-rejected756 .shipping-saved-rejected755 h3 { margin: 0 0 8px; font-size: 14px; }
.shipping-outcome-rejected756 .shipping-saved-rejected755 article { padding: 10px 0; border-bottom: 1px solid #dfe4ed; }
.shipping-outcome-rejected756 .shipping-saved-rejected755 article:last-of-type { border-bottom: 0; }
.shipping-outcome-rejected756 .shipping-saved-rejected755 article > div { margin-top: 4px; }
.backend-report-table .shipping-converted-outcomes756 { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; color: #52627b; font-size: 11px; line-height: 1.35; font-weight: 400; white-space: normal; }
.backend-report-table .shipping-converted-outcomes756 > span { display: block; }
#returnOrderTable tr.is-shipping-return-linked756 { outline: 2px solid #6d59ff; outline-offset: -2px; background-color: #f1edff; }

/* v763: original identities and incremental registration stay visually separate. */
.shipping-supplement-note763 { padding: 12px 16px; border: 1px solid #cbd9f5; border-left: 4px solid #4063ef; border-radius: 8px; background: #f2f6ff; line-height: 1.7; }
.shipping-supplement-items763, .shipping-supplement-mapping763 { display: grid; gap: 10px; margin-top: 10px; }
.shipping-supplement-items763 > label { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #dce4ef; border-radius: 8px; }
.shipping-supplement-item766 { padding: 12px; border: 1px solid #dce4ef; border-radius: 8px; }
.shipping-supplement-item766 > label:first-child { display: flex; align-items: flex-start; gap: 10px; }
.shipping-supplement-category766 { display: grid; gap: 6px; margin: 12px 0 0 26px; }
.shipping-supplement-category766 select { max-width: 280px; }
.shipping-supplement-items763 input[type="checkbox"], .shipping-supplement763 input[type="checkbox"] { width: auto; flex: 0 0 auto; }
.shipping-supplement-items763 small { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.shipping-supplement-mapping763 > label { display: grid; gap: 8px; padding: 12px; background: #f7f9fc; border: 1px solid #dce4ef; border-radius: 8px; }
.shipping-supplement763 section ul, .shipping-supplement-readonly763 ul { margin: 8px 0; padding-left: 22px; line-height: 1.8; }
.shipping-supplement763 [data-supplement-inbound763][hidden] { display: none; }
.shipping-supplement-note763 button { margin: 8px 8px 0 0; max-width: 100%; overflow-wrap: anywhere; }
.postal-remaining-disposition966 { display: grid; gap: 6px; }
.postal-remaining-caption966 { position: relative; }
.postal-remaining-help966 > summary { list-style: none; color: #4861ba; }
.postal-remaining-help966 > summary::-webkit-details-marker { display: none; }
.postal-remaining-help966 > ul {
  position: absolute;
  z-index: 5;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 4px);
  width: min(400px, 100%);
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 18px #172a4e22;
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
}
.postal-remaining-help966 li + li { margin-top: 7px; }
.postal-remaining-help966 strong { display: block; }


/* v768: selected two-column supplement workspace; scoped to preparation only. */
#formModal:has(.shipping-supplement-workspace768) .modal-panel { width: min(1060px, calc(100vw - 32px)); height: min(920px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); }
#formModal:has(.shipping-supplement-workspace768) .modal-header { padding: 22px 26px 18px; }
#formModal:has(.shipping-supplement-workspace768) .modal-header h2 { font-size: 28px; line-height: 1.35; }
#formModal:has(.shipping-supplement-workspace768) .modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding: 0 26px 24px; }
.shipping-supplement-workspace768 { display: flex; flex-direction: column; flex: 1; min-height: 0; color: #16212b; font-size: 16px; }
.shipping-supplement-workspace768 > :not(.shipping-supplement-columns768) { flex-shrink: 0; }
.shipping-supplement-workspace768 .shipping-supplement-rule768 { margin: 0 0 22px; padding: 16px 18px; color: #42536b; background: #f1f5ff; border-color: #c8d7ff; border-left-color: #2563eb; }
.shipping-supplement-meta768 { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-bottom: 24px; color: #64717d; font-size: 16px; }
.shipping-supplement-meta768 strong { color: #16212b; }
.shipping-supplement-meta768 > span + span { border-left: 1px solid #dde4ea; padding-left: 26px; }
.shipping-supplement-columns768 { display: grid; grid-template-columns: 0.88fr 1.12fr; gap: 16px; align-items: stretch; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.shipping-supplement-column768 { min-width: 0; padding: 22px; border: 1px solid #dde4ea; border-radius: 8px; }
.shipping-supplement-column768 h3 { margin: 0 0 6px; font-size: 24px; line-height: 1.45; }
.shipping-supplement-subtitle768 { margin: 0 0 20px; color: #64717d; line-height: 1.6; }
.shipping-supplement-product768 { display: flex; align-items: center; gap: 18px; padding: 18px 0; min-width: 0; }
.shipping-supplement-product768 + .shipping-supplement-product768 { border-top: 1px solid #e5eaf0; }
.shipping-supplement-photo768 { display: block; flex: 0 0 102px; width: 102px; height: 108px; padding: 0; border: 0; background: #f5f7f8; border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.shipping-supplement-photo768 img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shipping-supplement-current768 .shipping-supplement-photo768 { flex-basis: 158px; width: 158px; height: 174px; }
.shipping-supplement-product-info768 { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.shipping-supplement-product-info768 strong { font-size: 22px; }
.shipping-supplement-product-info768 > span:not(.shipping-supplement-badge768) { font-size: 18px; }
.shipping-supplement-badge768 { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 15px; font-weight: 600; }
.shipping-supplement-badge768.is-complete { background: #e5f7f0; color: #0f8064; }
.shipping-supplement-badge768.is-pending { background: #fff1d4; color: #a66100; }
.shipping-supplement-pending-help768 { margin: 16px 0; color: #64717d; line-height: 1.7; }
.shipping-supplement-pending-select768, .shipping-supplement-scenario768 { display: grid; gap: 8px; margin-bottom: 20px; }
.shipping-supplement-scenario768 { margin: 22px 0 0; }
.shipping-supplement-inbound768 { margin-top: 16px; }
.shipping-supplement-workspace768 [hidden] { display: none !important; }
.shipping-supplement-workspace768 .form-status:empty { display: none; }
.shipping-supplement-workspace768 > .form-status:not(:empty) { margin-top: 16px; }
.shipping-supplement-footer768 { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #dde4ea; margin-top: 24px; padding-top: 20px; }
.shipping-supplement-footer768 p { margin: 0; color: #64717d; line-height: 1.6; font-size: 14px; }
.shipping-supplement-footer768 small { display: block; font-size: 12px; }
.shipping-supplement-footer-actions768 { display: flex; flex: 0 0 auto; gap: 12px; }
.shipping-supplement-footer-actions768 button { min-height: 48px; padding: 10px 20px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.shipping-supplement-workspace768 button:focus-visible, .shipping-supplement-workspace768 select:focus-visible { outline: 3px solid #93b8ff; outline-offset: 2px; }
.shipping-supplement-workspace768 button:disabled { background: #e5eaf0; color: #7b8795; border-color: #d9e0e8; cursor: not-allowed; opacity: 1; }
@media (max-width: 760px) {
  #formModal:has(.shipping-supplement-workspace768) .modal-panel { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  #formModal:has(.shipping-supplement-workspace768) .modal-header { padding: 16px; }
  #formModal:has(.shipping-supplement-workspace768) .modal-header h2 { font-size: 21px; }
  #formModal:has(.shipping-supplement-workspace768) .modal-body { padding: 0 16px 16px; }
  .shipping-supplement-columns768 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .shipping-supplement-column768 { padding: 16px; }
  .shipping-supplement-column768 h3 { font-size: 20px; }
  .shipping-supplement-meta768 { gap: 8px; flex-direction: column; font-size: 14px; }
  .shipping-supplement-meta768 > span + span { border: 0; padding-left: 0; }
  .shipping-supplement-current768 .shipping-supplement-photo768 { flex-basis: 108px; width: 108px; height: 126px; }
  .shipping-supplement-footer768 { align-items: stretch; flex-direction: column; gap: 14px; }
  .shipping-supplement-footer-actions768 { justify-content: flex-end; }
  .shipping-supplement-footer-actions768 .primary-button { flex: 1; }
}

.shipping-supplement-blocked768 { margin-top: 16px; color: #64717d; font-size: 13px; }
.shipping-supplement-blocked768 summary { cursor: pointer; padding: 8px 0; }
.shipping-supplement-blocked768 p { border-top: 1px solid #e5eaf0; padding-top: 10px; line-height: 1.6; }
.shipping-supplement-blocked768 strong { font-weight: 500; }
.shipping-supplement-blocked768 small { display: block; margin-top: 4px; }
/* v781: manual postal dispatch is separate from automatic allocation. */
.postal-manual-toolbar781 { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-soft); }
.postal-manual-toolbar781 > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.postal-manual-toolbar781 > small { display: block; margin-top: 6px; color: var(--muted); }
.postal-manual-status781 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; padding: 10px 12px; background: #fff7e7; border-radius: 6px; color: #735422; }
#formModal:has(#postalManualDispatchPlan781) .modal-panel { width: min(1000px, calc(100vw - 24px)); }
.postal-manual-dialog781 { display: grid; gap: 14px; min-width: 0; }
.postal-manual-dialog781 p { margin: 0; line-height: 1.65; }
.postal-manual-ranking781, .postal-manual-summary781 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.postal-manual-summary781 { padding: 12px; background: #f4f6ff; border-radius: 8px; }
.postal-manual-table-wrap781 { overflow: auto; max-height: min(48vh, 460px); border: 1px solid var(--line); border-radius: 8px; }
.postal-manual-plan-table781 { min-width: 720px; }
.postal-manual-plan-table781 td { vertical-align: top; white-space: normal; line-height: 1.6; }
.postal-manual-plan-table781 td:first-child strong,
.postal-manual-plan-table781 td:first-child small,
.postal-manual-plan-table781 td:last-child strong { display: block; }
.postal-manual-plan-table781 td:first-child small { margin-top: 4px; color: var(--muted); }
.postal-manual-plan-table781 td:last-child strong { margin-bottom: 4px; }
.postal-manual-plan-table781 td:last-child small { display: block; color: var(--muted); }
.postal-manual-plan-table781 th { position: sticky; top: 0; background: #f7f9fc; z-index: 1; }
.postal-manual-plan-table781 td:first-child { min-width: 170px; }
.postal-manual-plan-table781 td:last-child { min-width: 200px; }
.postal-manual-blocked781 { background: #fffbf2; }
.postal-manual-dialog781 .form-actions { position: sticky; bottom: 0; margin-top: 0; padding-top: 12px; background: #fff; }
@media (max-width: 700px) {
  #postalManualDispatchButton781 { min-height: 40px; }
  .postal-manual-toolbar781 > div:first-child { align-items: flex-start; gap: 6px 12px; }
  .postal-manual-dialog781 .form-actions { gap: 10px; }
  .postal-manual-dialog781 .form-actions button { flex: 1; min-height: 42px; }
}

/* v779: the existing ecommerce allocation dialog stays compact. */
#formModal:has(#ecommercePerformanceAllocationForm) .modal-panel { width: min(700px, 100%); }
#ecommercePerformanceAllocationForm { display: block; }
#ecommercePerformanceAllocationForm .chat-pages-total779 { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
#ecommercePerformanceAllocationForm .chat-pages-total779 input { width: 120px; }
#ecommercePerformanceAllocationForm .allocation-editor { margin-bottom: 14px; }
#ecommercePerformanceAllocationForm .chat-allocation-row779 { grid-template-columns: minmax(150px, 1.6fr) minmax(110px, 1fr) minmax(120px, 1fr) auto; gap: 12px; }
#ecommercePerformanceAllocationForm [name="allocationRatio"][readonly] { background: #f1f4f8; color: #223047; }
#ecommercePerformanceAllocationForm [data-pages-mode-caption779] { color: #68788e; font-size: 11px; font-weight: 400; }
#ecommercePerformanceAllocationForm .chat-pages-summary779 { display: inline-block; padding-left: 14px; color: #53657d; }
#ecommercePerformanceAllocationForm .chat-pages-summary779.is-error { color: #c53939; }
#ecommercePerformanceAllocationForm .form-actions { margin-top: 24px; }
@media (max-width: 620px) {
  #ecommercePerformanceAllocationForm .chat-allocation-row779 { grid-template-columns: minmax(130px, 1.4fr) minmax(85px, 1fr) minmax(90px, 1fr) auto; gap: 8px; }
  #ecommercePerformanceAllocationForm .chat-pages-summary779 { display: block; padding: 10px 0 0; }
  #ecommercePerformanceAllocationForm .chat-allocation-row779 label span { font-size: 12px; }
}
@media (max-width: 440px) {
  #ecommercePerformanceAllocationForm .chat-allocation-row779 { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 58px; }
  #ecommercePerformanceAllocationForm .chat-allocation-row779 label:first-child { grid-column: 1 / -1; }
}

/* v834: per-adjustment customer type and a compact independent proof dialog. */
.v834-completion-fields { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr); gap: 10px 14px; margin-top: 9px; align-items: start; }
.v834-completion-fields > label { max-width: 240px; }
.v834-proof-selected { min-width: 0; font-size: 12px; color: var(--muted); }
.v834-proof-selected > div { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.v834-proof-selected strong { color: var(--text); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.v834-proof-selected button { flex-shrink: 0; padding-inline: 0; }
.v834-proof-dialog { width: min(540px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; box-shadow: 0 18px 60px #172a4e35; }
.v834-proof-dialog::backdrop { background: #0b173966; }
.v834-proof-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.v834-proof-heading h3 { margin: 0; font-size: 18px; }
.v834-proof-dialog label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.v834-proof-dialog input, .v834-proof-dialog select { width: 100%; min-width: 0; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text); background: #fff; font-size: 13px; }
.v834-proof-query { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.v834-proof-code-field { display: grid; gap: 6px; min-width: 0; }
.v834-proof-code-caption { position: relative; }
.v834-proof-code-help > summary { list-style: none; color: #4861ba; }
.v834-proof-code-help > summary::-webkit-details-marker { display: none; }
.v834-proof-code-help > p {
  position: absolute;
  z-index: 1;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 4px);
  width: min(360px, 100%);
  box-sizing: border-box;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 18px #172a4e22;
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
}
.v834-proof-choice { margin-top: 15px; }
.v834-proof-dialog .form-status { margin-top: 10px; font-size: 12px; }
.v834-proof-dialog .form-actions { justify-content: flex-end; gap: 9px; margin-top: 18px; }
.v834-proof-dialog .icon-button { width: 32px; height: 32px; }
.v834-confirm-completion { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 12px 14px; background: #f3f5f8; border-radius: 6px; }
.v834-confirm-completion .is-wide { grid-column: 1 / -1; }
.v834-confirm-completion dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.v834-confirm-completion dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 620px) { .v834-completion-fields { grid-template-columns: 1fr; } .v834-completion-fields > label { max-width: none; } .v834-proof-dialog { padding: 16px; } }

/* v835: finance reconciliation links open read-only backend bills. */
.finance-table .finance-bill-link835 { display: inline; padding: 0; margin: 0; min-height: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; color: #4b7de0; font: inherit; cursor: pointer; text-align: left; white-space: inherit; }
.finance-table .finance-bill-link835:hover { color: #2457d6; text-decoration: underline; }
.finance-table .finance-bill-link835:focus-visible { outline: 2px solid #a8c5ff; outline-offset: 3px; }
.finance-table .finance-bill-owners835 { min-width: 100px; max-width: 210px; white-space: normal; }
.finance-backend-bill-dialog835 { width: min(840px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; box-shadow: 0 18px 60px #172a4e35; }
.finance-backend-bill-dialog835::backdrop { background: #0b173966; }
.finance-bill-heading835 { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 18px; }
.finance-bill-heading835 h2 { margin: 0; font-size: 20px; }
.finance-bill-heading835 .icon-button { width: 34px; height: 34px; }
.finance-bill-facts835 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; }
.finance-bill-facts835 > div { min-width: 0; }
.finance-bill-facts835 span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.finance-bill-facts835 strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.finance-bill-detail835 h3 { margin: 18px 0 9px; font-size: 15px; }
.finance-bill-payments835 th, .finance-bill-payments835 td { font-size: 12px; white-space: nowrap; }
.finance-bill-payments835 .is-matched { background: #eff5ff; }
.finance-backend-bill-dialog835 > .form-actions { justify-content: flex-end; margin-top: 18px; }
@media (max-width: 620px) { .finance-backend-bill-dialog835 { padding: 15px; } .finance-bill-facts835 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* v839: backend registration date-range controls only. */
#recycleFilterPanel .backend-date-range839 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
#recycleFilterPanel .backend-date-range839 input[type="date"] { min-width: 0; width: 100%; }
#recycleFilterPanel .backend-date-range839 > span { white-space: nowrap; }
@media (max-width: 600px) {
  #recycleFilterPanel .backend-date-filter839 { grid-column: 1 / -1; }
}

/* v841 postal item classification and existing registration split. */
#shippingAppraisalForm .appraisal-valuation-category841, .postal-payable-split841 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
#shippingAppraisalForm .appraisal-valuation-category841 > label, .shipping-classification-list841 > label { display:grid; gap:6px; min-width:0; }
.shipping-classification-list841 { display:grid; gap:14px; }
.shipping-classification-list841 select, #shippingAppraisalForm [name="itemStatisticsCategory841"] { min-width:0; width:100%; min-height:36px; }
@media(max-width:600px){ #shippingAppraisalForm .appraisal-valuation-category841, .postal-payable-split841 { grid-template-columns:1fr; } }

/* v842 independent classified postal standards. */
.hr-postal-config-state842 { display:inline-block; margin:0 0 10px; padding:3px 9px; border-radius:5px; background:#f3f5fa; color:#65748d; font-size:12px; }

.departure-handoff-dialog844 { width: min(850px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; box-shadow: 0 18px 60px #172a4e35; }
.departure-handoff-dialog844::backdrop { background: #0b173966; }
.departure-handoff-heading844 { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.departure-handoff-heading844 h2 { margin: 0; font-size: 18px; }
.departure-handoff-group844 { border: 1px solid var(--line); border-radius: 6px; margin: 12px 0; padding: 10px 12px; }
.departure-handoff-group844 summary { cursor: pointer; font-weight: 600; }
.departure-handoff-group844 summary strong { margin-left: 12px; color: #64748b; font-size: 13px; font-weight: 400; }
.departure-handoff-table844 { max-height: 220px; overflow: auto; margin-top: 9px; }
.departure-handoff-table844 table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 13px; }
.departure-handoff-table844 th, .departure-handoff-table844 td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.departure-handoff-table844 th { color: #64748b; background: #f7f9fc; }
.departure-handoff-receiver844 { max-width: 320px; margin: 12px 0; }
.departure-handoff-dialog844 > .form-actions { justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 620px) { .departure-handoff-dialog844 { padding: 14px; } .departure-handoff-heading844 h2 { font-size: 16px; } }
.price-adjustment-filters847 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.price-adjustment-filters847 label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.price-adjustment-filters847 label > span {
  color: #64748b;
  font-size: 13px;
}
.price-adjustment-filters847 input,
.price-adjustment-filters847 select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
}
.price-adjustment-filter-clear847 {
  display: flex;
  align-items: flex-end;
}
.price-adjustment-filter-clear847 button { width: 100%; min-height: 38px; }
.price-adjustment-filter-error847 { grid-column: 1 / -1; margin: 0; }
@media (max-width: 1100px) {
  .price-adjustment-filters847 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .price-adjustment-filters847 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .price-adjustment-filters847 { grid-template-columns: minmax(0, 1fr); }
}
.hr-backend-payroll-source848 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}
.hr-backend-payroll-source848 .hr-payroll-mode { margin: 0; }
.hr-backend-payroll-reference848,
.hr-backend-payroll-summary848 {
  border: 1px solid #dce4f2;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  margin: 16px 0;
}
.hr-backend-payroll-overview848 { min-width: 940px; }
.hr-backend-payroll-overview848 td,
.hr-backend-payroll-overview848 th { white-space: nowrap; }
.hr-backend-payroll-overview848 tbody tr { cursor: pointer; }
.hr-backend-payroll-overview848 tr.is-selected { background: #eef2ff; }
.hr-backend-payroll-selected848 { margin-top: 20px; }
.hr-backend-payroll-sources848 > table { min-width: 780px; }
.hr-backend-payroll-sources848 td { vertical-align: top; }
.hr-backend-payroll-sources848 td:first-child { min-width: 140px; }
.hr-backend-payroll-sources848 small { display: block; color: #64748b; margin-top: 4px; }
.hr-backend-payroll-sources848 summary { cursor: pointer; color: #4057df; }
.hr-backend-payroll-sources848 details p { max-width: 380px; }
.hr-reference-markup848 { display: grid; gap: 8px; padding: 12px 0; min-width: 290px; }
.hr-backend-payroll-wages848 { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 16px 0 2px; }
.hr-backend-payroll-wages848 > span { display: flex; gap: 8px; color: #64748b; }
.hr-backend-payroll-wages848 strong { color: #172b4d; }
@media (max-width: 620px) {
  .hr-backend-payroll-reference848, .hr-backend-payroll-summary848 { padding: 12px; }
  .hr-backend-payroll-source848 { align-items: flex-start; }
  .hr-backend-payroll-wages848 { display: grid; gap: 10px; }
}
.shipping-classification-state850 {
  display: inline-flex;
  align-items: center;
  margin: 4px 0 0 6px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}
.shipping-classification-state850.is-pending { background: #fff4dc; color: #946200; }
.shipping-classification-state850.is-complete { background: #e7f6ef; color: #177f5a; }

/* V856_PLEDGE_FORMS_BEGIN: approved new-contract and historical-opening forms only. */
body:has(#formModal:not([hidden]) .pledge-form856) {
  overflow: hidden;
}
#formModal:has(.pledge-form856) {
  padding: 24px;
  z-index: 150;
}
#formModal:has(.pledge-form856) .modal-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
#formModal:has(.pledge-form856) .modal-header {
  min-height: 72px;
  flex: 0 0 auto;
  padding: 18px 24px;
}
#formModal:has(.pledge-form856) .modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 700;
}
#formModal:has(.pledge-form856) .modal-header button {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 40px;
}
#formModal:has(.pledge-form856) .modal-body {
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#formModal:has(.pledge-form856) .pledge-form856 {
  --pledge-label-width856: 148px;
  min-width: 0;
  margin: 0;
  padding: 18px 24px 0;
  border: 0;
  font-size: 16px;
  line-height: 1.5;
}
#formModal:has(.pledge-form856) .pledge-source856 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 22px;
  min-width: 0;
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #f0f4fa;
  color: var(--text);
  overflow-wrap: anywhere;
}
#formModal:has(.pledge-form856) .pledge-source856 :is(p, strong, span) {
  min-width: 0;
  margin: 0;
}
#formModal:has(.pledge-form856) .pledge-form-section856 {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}
#formModal:has(.pledge-form856) .pledge-form-section856 > h3 {
  margin: 0 0 14px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
}
#formModal:has(.pledge-form856) .pledge-form-grid856 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px 28px;
  min-width: 0;
}
#formModal:has(.pledge-form856) .pledge-form-grid856 > label {
  display: grid;
  grid-template-columns: var(--pledge-label-width856) minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
  margin: 0;
  color: var(--text);
}
#formModal:has(.pledge-form856) .pledge-form-grid856 > label > span:first-child {
  min-width: 0;
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
#formModal:has(.pledge-form856) .pledge-form-grid856 > .full {
  grid-column: 1 / -1;
}
#formModal:has(.pledge-form856) .pledge-form856 :is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}
#formModal:has(.pledge-form856) .pledge-form856 select:not([multiple]) {
  height: 42px;
}
#formModal:has(.pledge-form856) .pledge-form856 select[multiple] {
  min-height: 72px;
}
#formModal:has(.pledge-form856) .pledge-form856 textarea {
  min-height: 70px;
  resize: vertical;
}
#formModal:has(.pledge-form856) .pledge-form856 :is(input[readonly], input:disabled, select:disabled) {
  background: #f0f3f7;
  color: #4b5563;
}
#formModal:has(.pledge-form856) .pledge-form856 :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
#formModal:has(.pledge-form856) .pledge-form-grid856 > label > :is(small, .field-help) {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#formModal:has(.pledge-form856) .pledge-form-grid856 > .pledge-amount856 :is(input, select) {
  border-color: #779bff;
}
#formModal:has(.pledge-form856) .pledge-photo-grid856 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  margin-top: 16px;
}
#formModal:has(.pledge-form856) .pledge-form856 .upload-field856 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  color: #4b5563;
}
#formModal:has(.pledge-form856) .pledge-form856 .upload-field856 > :is(span, small) {
  margin: 0;
  font-size: 14px;
}
#formModal:has(.pledge-form856) .pledge-form856 .upload-field856 input[type="file"] {
  display: block;
  min-height: 40px;
  padding: 4px;
  overflow: hidden;
  background: #f8faff;
  color: var(--muted);
  font-size: 12px;
}
#formModal:has(.pledge-form856) .pledge-form856 :is(.pledge-file-button856, .upload-field856) input[type="file"]::file-selector-button,
#formModal:has(.pledge-form856) .pledge-form856 input.pledge-file-button856::file-selector-button {
  min-height: 30px;
  margin: 0 8px 0 0;
  padding: 5px 12px;
  border: 1px solid #c9d6ee;
  border-radius: 5px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
}
#formModal:has(.pledge-form856) .pledge-more856 {
  min-width: 0;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f8fb;
}
#formModal:has(.pledge-form856) .pledge-more856 > summary {
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
#formModal:has(.pledge-form856) .pledge-more856 > .pledge-form-grid856 {
  padding: 2px 14px 14px;
}
#formModal:has(.pledge-form856) .pledge-form856 .pledge-confirm856 {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  margin: 18px 0 22px;
  color: var(--text);
  line-height: 1.6;
}
#formModal:has(.pledge-form856) .pledge-confirm856 input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--blue);
}
#formModal:has(.pledge-form856) .pledge-form856 .form-status {
  min-width: 0;
  overflow-wrap: anywhere;
}
#formModal:has(.pledge-form856) .pledge-form-footer856 {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px -24px 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
#formModal:has(.pledge-form856) .pledge-form-footer856 > button {
  min-width: 96px;
  min-height: 40px;
  margin: 0;
  padding: 8px 18px;
  font-size: 14px;
}
#formModal:has(.pledge-form856) .pledge-form856 [hidden] {
  display: none;
}
@media (max-width: 760px) {
  #formModal:has(.pledge-form856) {
    padding: 12px;
  }
  #formModal:has(.pledge-form856) .modal-panel {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #formModal:has(.pledge-form856) .modal-header {
    min-height: 64px;
    padding: 12px 16px;
  }
  #formModal:has(.pledge-form856) .modal-header h2 {
    font-size: 21px;
  }
  #formModal:has(.pledge-form856) .pledge-form856 {
    --pledge-label-width856: 128px;
    padding: 16px 16px 0;
  }
  #formModal:has(.pledge-form856) .pledge-form-grid856 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  #formModal:has(.pledge-form856) .pledge-photo-grid856 {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  #formModal:has(.pledge-form856) .pledge-source856 {
    gap: 6px;
    padding: 11px 12px;
  }
  #formModal:has(.pledge-form856) .pledge-form-section856 > h3 {
    font-size: 18px;
  }
  #formModal:has(.pledge-form856) .pledge-form-footer856 {
    margin-inline: -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  #formModal:has(.pledge-form856) .pledge-form-footer856 > button {
    min-height: 44px;
    flex: 1 1 auto;
  }
}
@media (max-width: 420px) {
  #formModal:has(.pledge-form856) {
    padding: 8px;
  }
  #formModal:has(.pledge-form856) .modal-panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  #formModal:has(.pledge-form856) .pledge-form-grid856 > label {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
  }
  #formModal:has(.pledge-form856) .pledge-form-grid856 > label > :is(small, .field-help) {
    grid-column: 1;
  }
  #formModal:has(.pledge-form856) .pledge-form856 :is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) {
    font-size: 16px;
  }
  #formModal:has(.pledge-form856) .pledge-form-footer856 > button {
    padding-inline: 10px;
    white-space: normal;
  }
}
/* V856_PLEDGE_FORMS_END */
.account-public-contact-slot857 {
  display: contents;
}

.account-data-scope-fields.account-frontend-contact-windows857 {
  flex-wrap: nowrap;
  gap: 8px;
}

.account-data-scope-fields.account-frontend-contact-windows857 > .permission-data-scope-field {
  flex: 1 1 160px;
  min-width: 0;
  max-width: none;
}

.account-data-scope-fields.account-frontend-contact-windows857 > .own-lead-contact-duration-field,
.account-data-scope-fields.account-frontend-contact-windows857 .public-lead-contact-duration-field857 {
  flex: 1.35 1 220px;
  min-width: 170px;
  max-width: none;
}

.account-data-scope-fields.account-frontend-contact-windows857 .own-lead-contact-duration-controls {
  grid-template-columns: minmax(62px, 1fr) 46px 54px;
  gap: 4px;
}

.account-data-scope-fields.account-frontend-contact-windows857 .own-lead-contact-duration-controls.is-fixed-mode {
  grid-template-columns: minmax(0, 1fr);
}

.account-data-scope-fields.account-frontend-contact-windows857 .ai-knowledge-department-scope-field,
.account-data-scope-fields.account-frontend-contact-windows857 .hr-department-scope-field,
.account-data-scope-fields.account-frontend-contact-windows857 .ai-knowledge-department-scope-field.is-expanded,
.account-data-scope-fields.account-frontend-contact-windows857 .hr-department-scope-field.is-expanded {
  flex: .85 1 140px;
  min-width: 0;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
}

.account-data-scope-fields.account-frontend-contact-windows857 select,
.account-data-scope-fields.account-frontend-contact-windows857 input[type="number"] {
  min-width: 0;
  width: 100%;
  padding-left: 7px;
  padding-right: 5px;
}

.account-data-scope-fields.account-frontend-contact-windows857 [hidden] {
  display: none;
}

@media (max-width: 1200px) {
  .account-data-scope-fields.account-frontend-contact-windows857 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .account-data-scope-fields.account-frontend-contact-windows857 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* V864_HISTORICAL_PLEDGE_LABEL_HELP_BEGIN */
.pledge-form856 .pledge-field-caption864 { display: inline-flex; align-items: center; gap: var(--crm-help-caption-gap, 2px); }
.pledge-form856 .pledge-field-info864 { position: relative; display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 auto; width: var(--crm-help-target-size, 18px); height: var(--crm-help-target-size, 18px); color: #8794aa; font-size: var(--crm-help-icon-size, 12px); line-height: 1; cursor: help; }
.pledge-form856 .pledge-field-info-text864 { display: none; position: absolute; z-index: 12; left: 0; top: calc(100% + 5px); width: max-content; max-width: min(280px, 68vw); padding: 8px 10px; border: 1px solid #dbe3ef; border-radius: 6px; background: #fff; color: #52617a; font-size: 13px; font-weight: 400; line-height: 1.5; box-shadow: 0 3px 12px #22355514; white-space: normal; }
.pledge-form856 .pledge-field-info864:is(:hover, :focus, :focus-within) .pledge-field-info-text864 { display: block; }
/* V864_HISTORICAL_PLEDGE_LABEL_HELP_END */

.permission-template-fields > .permission-template-contact-windows864 { flex: 1 0 100%; width: 100%; max-width: none; }
.permission-template-contact-windows864 > .own-lead-contact-duration-field { max-width: none; }

/* V866_FORMER_OWNER_REVIEW_BEGIN */
#filterFollowScopeField866[hidden] { display: none !important; }
#view-leads .lead-filter-toolbar .filter-grid > #filterFollowScopeField866 { grid-column: span 1; width: 100%; min-width: 0; max-width: none; }
#filterFollowScopeField866 > span { white-space: nowrap; }
#filterFollowScope866 { width: 100%; min-width: 0; }
@media (max-width: 1180px) {
  #view-leads .lead-filter-toolbar .filter-grid > #filterFollowScopeField866 { grid-column: span 1; max-width: none; }
}
.lead-former-owner866 { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
/* V866_FORMER_OWNER_REVIEW_END */

/* V888_FOLLOW_SCOPE_CONTEXT_HELP_BEGIN */
#view-leads .lead-filter-toolbar .lead-follow-scope-field888 { display: grid; gap: 6px; align-content: start; }
.lead-follow-scope-caption888 { display: flex; align-items: center; gap: var(--crm-help-caption-gap, 2px); position: relative; min-height: 18px; }
.lead-follow-scope-caption888 > label { display: inline; margin: 0; color: var(--muted); font-size: 13px; line-height: 18px; white-space: nowrap; }
.field-info888 { display: inline-flex; align-items: center; justify-content: flex-start; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; color: #8291a8; font-size: var(--crm-help-icon-size, 12px); font-weight: 500; line-height: 1; cursor: help; outline-offset: 3px; }
.field-info888:focus-visible { outline: 2px solid #4b5cf5; }
.field-info888:hover, .field-info888:focus { color: #485bf2; background: #edf0ff; }
.field-info-panel888 { display: none; position: absolute; z-index: 45; left: 0; top: 100%; width: min(460px, calc(100vw - 48px)); max-height: min(520px, calc(100dvh - 120px)); overflow-y: auto; padding: 14px 16px; border: 1px solid #dce4f0; border-radius: 10px; background: #fff; color: #46546b; box-shadow: 0 8px 28px #25344b24; font-size: 13px; font-weight: 400; line-height: 1.65; text-align: left; white-space: normal; cursor: text; }
.field-info888:hover > .field-info-panel888, .field-info888:focus-within > .field-info-panel888 { display: block; }
.field-info-title888 { display: block; margin-bottom: 10px; color: #1d293d; font-size: 14px; }
.field-info-section888 { display: block; margin-top: 9px; }
.field-info-section888 > strong { display: block; margin-bottom: 2px; color: #293a56; font-weight: 600; }
.field-info-section888 > span { display: block; }
.field-info-section888 > span + span { margin-top: 4px; }
@media (max-width: 900px) {
  #view-leads.mobile-filters-open .filter-grid > .lead-follow-scope-field888 { grid-column: 1 / -1; }
  .field-info-panel888 { max-height: min(480px, calc(100dvh - 160px)); }
}
/* V888_FOLLOW_SCOPE_CONTEXT_HELP_END */

/* v889: original registration fields, grouped per item; no payment-flow changes. */
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-grid > .recycle-item-field { grid-column:auto; grid-row:auto; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-category { order:1; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-brand { order:2; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-model { order:3; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-code { order:4; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-destination { order:5; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-valuation { order:6; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-payable889 { order:7; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-profit889 { order:8; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-loss889 { order:9; color:#c62828; font-size:13px; margin:-3px 0 0; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-field-grid > .recycle-item-field-description { order:10; grid-column:1/-1; }
#recycleForm[data-recycle-stage="registration"] .recycle-item-image-section { order:11; }
#recycleForm .recycle-item-field-profit889 output, #recycleForm .recycle-totals889 output { display:block; min-height:38px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--panel-soft); font-variant-numeric:tabular-nums; }
#recycleForm output[data-tone="positive"] { color:#16833f; background:#eafaef; border-color:#daf2e1; font-weight:650; }
#recycleForm output[data-tone="negative"] { color:#c62828; background:#fff0f0; border-color:#f6cece; font-weight:650; }
#recycleForm [name="recycleItemCustomerPayable889"][aria-invalid="true"] { border-color:#d94242; }
#recycleForm .recycle-totals889 { display:grid; grid-template-columns:1.18fr 1fr 1fr; gap:16px; padding:0 0 14px; border-bottom:1px solid var(--line); }
#recycleForm .recycle-totals889 label { min-width:0; }
#recycleForm[data-recycle-stage="registration"] .recycle-totals889 > .recycle-payable-field { grid-column:auto; grid-row:auto; }
#recycleForm [data-recycle-image-preview] { object-fit:scale-down; }
#recycleForm .recycle-totals889 label > span { display:flex; align-items:baseline; gap:4px; flex-wrap:wrap; }
#recycleForm .recycle-totals889 small { font-size:12px; color:var(--muted); font-weight:400; margin-left:6px; }
#recycleForm .recycle-existing-preview889 { position:absolute; z-index:2; right:5px; bottom:4px; background:rgba(255,255,255,.95); padding:2px 6px; border-radius:4px; }
#recycleForm[data-recycle-stage="registration"] .recycle-payment-grid { grid-template-columns:repeat(12,minmax(0,1fr)); }
#recycleForm[data-recycle-stage="registration"] .recycle-deposit-field { grid-column:1/-1; grid-row:2; display:flex; align-items:center; gap:12px; }
#recycleForm[data-recycle-stage="registration"] .recycle-deposit-field input { width:168px; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentDate"]) { grid-column:1/4; grid-row:3; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentAccount"]) { grid-column:4/7; grid-row:3; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label:has([name="customerPaymentLineAmount"]) { grid-column:7/9; grid-row:3; }
#recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-receipt-transaction-field { grid-column:9/-1; grid-row:3; }
@media(max-width:850px) {
 #recycleForm[data-recycle-stage="registration"] .recycle-item-field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #recycleForm .recycle-totals889 { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #recycleForm[data-recycle-stage="registration"] .recycle-totals889 > .recycle-payable-field { grid-column:1/-1; }
 #recycleForm[data-recycle-stage="registration"] .recycle-payment-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > label,
 #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-receipt-transaction-field,
 #recycleForm[data-recycle-stage="registration"] [data-customer-payment-line]:first-child > .sales-remove-item,
 #recycleForm[data-recycle-stage="registration"] .recycle-deposit-field { grid-column:1/-1 !important; grid-row:auto !important; }
}
@media(max-width:540px) {
 #recycleForm[data-recycle-stage="registration"] .recycle-item-field-grid, #recycleForm .recycle-totals889 { grid-template-columns:1fr; }
}

#recycleForm .recycle-negative-confirm889 { display:grid; gap:8px; padding:12px; border:1px solid #f2caca; border-radius:6px; background:#fff1f1; color:#b42318; font-size:13px; }
#recycleForm .recycle-negative-confirm889[hidden] {display:none;}
#recycleForm .recycle-negative-confirm889 > div {display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap;}

/* V893_FOLLOWUP_HISTORY_BEGIN: scoped follow-up history, selected accordion design. */
.followup893-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  min-height: 36px;
}
.followup893-latest {
  min-width: 0;
  color: var(--text);
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.followup893-summary > .text-button {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 0;
  color: #0863f7;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}
#formModal:has(.followup893-modal) .modal-panel {
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  border-radius: 10px;
}
#formModal:has(.followup893-modal) .modal-header {
  flex: 0 0 auto;
  min-height: 72px;
  margin: 0 20px;
  padding: 16px 2px;
  border-bottom: 1px solid #dfe6ef;
}
#formModal:has(.followup893-modal) .modal-header h2 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  color: #15202e;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}
#formModal:has(.followup893-modal) .modal-header .icon-button {
  flex: 0 0 auto;
  width: 38px;
  min-width: 38px;
  height: 38px;
  margin-left: 12px;
  border-color: #d7e0eb;
  border-radius: 6px;
  background: #fff;
  color: #172330;
}
#formModal:has(.followup893-modal) .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.followup893-modal {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: none;
  overflow: hidden;
  color: #182432;
  background: #fff;
}
.followup893-count {
  color: #637286;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
}
.followup893-history {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 20px 0;
  scrollbar-gutter: stable;
}
.followup893-history > .followup893-count {
  display: block;
  margin: 0 0 12px;
}
.followup893-entry {
  min-width: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #dfe6ef;
  border-radius: 0;
  background: #fff;
}
.followup893-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  padding: 13px 22px;
  border-radius: 5px;
  color: #14202e;
  cursor: pointer;
  list-style: none;
}
.followup893-header::-webkit-details-marker { display: none; }
.followup893-header::marker { content: ""; }
.followup893-entry[open] > .followup893-header { background: #edf3ff; }
.followup893-entry:not([open]) > .followup893-header:hover { background: #f7f9fc; }
.followup893-header:focus-visible {
  outline: 2px solid #2869ee;
  outline-offset: -2px;
}
.followup893-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.followup893-meta {
  color: #637286;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}
.followup893-chevron {
  display: block;
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
}
.followup893-entry[open] > .followup893-header .followup893-chevron { transform: rotate(270deg); }
.followup893-complete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 4px;
  color: #07854d;
  background: #e8f8ef;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.followup893-complete > img { flex: 0 0 auto; width: 16px; height: 16px; }
.followup893-body { padding: 12px 22px 22px; }
.followup893-content {
  margin: 0;
  color: #1b2634;
  font-size: 16px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.followup893-evidence {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 14px;
}
.followup893-evidence:empty { display: none; }
.followup893-image-label {
  display: block;
  margin: 0 0 9px;
  color: #637286;
  font-size: 14px;
  line-height: 1.5;
}
.followup893-images { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; min-width: 0; }
.followup893-image {
  display: block;
  flex: 0 0 160px;
  width: 160px;
  max-width: 100%;
  height: 148px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe3ed;
  border-radius: 6px;
  background: #f5f7fa;
  cursor: zoom-in;
}
.followup893-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.followup893-call-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  gap: 7px;
  max-width: 100%;
  min-height: 32px;
  height: auto;
  margin: 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 4px;
  color: #0863df;
  background: #eaf1ff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.followup893-call-link > img { flex: 0 0 auto; width: 17px; height: 17px; }
.followup893-call-link:hover { background: #dfeaff; }
.followup893-audio {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #637286;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.followup893-audio:empty { display: none; }
.followup893-audio audio { display: block; width: min(100%, 440px); max-width: 100%; }
.followup893-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 20px;
  padding: 22px 2px 20px;
  background: #fff;
}
.followup893-actions > button {
  min-width: 104px;
  min-height: 42px;
  height: auto;
  margin: 0;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
}
.followup893-actions > .primary-button { background: #0863f7; }
.followup893-actions > .secondary-button { border-color: #cfd9e6; background: #fff; color: #172330; }
@media (max-width: 640px) {
  #formModal:has(.followup893-modal) { padding: 12px; }
  #formModal:has(.followup893-modal) .modal-panel {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  #formModal:has(.followup893-modal) .modal-header { min-height: 64px; margin-inline: 14px; padding-block: 12px; }
  #formModal:has(.followup893-modal) .modal-header h2 { gap: 3px 10px; font-size: 19px; }
  #formModal:has(.followup893-modal) .modal-header .icon-button { width: 40px; min-width: 40px; height: 40px; }
  .followup893-history { padding: 14px 14px 0; scrollbar-gutter: auto; }
  .followup893-header { grid-template-columns: minmax(0, 1fr) 18px; gap: 4px 12px; min-height: 76px; padding: 12px; }
  .followup893-heading { gap: 6px 9px; font-size: 16px; }
  .followup893-meta { grid-column: 1; grid-row: 2; font-size: 12px; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .followup893-chevron { grid-column: 2; grid-row: 1 / 3; width: 18px; height: 18px; }
  .followup893-complete { padding: 2px 6px; font-size: 12px; }
  .followup893-body { padding: 12px 12px 18px; }
  .followup893-content { font-size: 15px; line-height: 1.75; }
  .followup893-images { gap: 10px; }
  .followup893-image { flex-basis: calc((100% - 10px) / 2); width: calc((100% - 10px) / 2); height: 142px; }
  .followup893-actions { gap: 10px; margin-inline: 14px; padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
  .followup893-actions > button { min-width: 96px; min-height: 44px; padding: 9px 16px; }
  .followup893-summary { gap: 12px; }
  .followup893-summary > .text-button { min-height: 44px; }
}
/* V893_FOLLOWUP_HISTORY_END */

/* v934: event-month conversion help uses the standard compact information icon. */
#ecommerceDashboard .ecommerce-conversion-explanation934 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 12px; }
#ecommerceDashboard .ecommerce-conversion-caption934 { gap: 2px; white-space: nowrap; }
#ecommerceDashboard .ecommerce-conversion-help934 { position: relative; margin: 0; font-style: normal; }
#ecommerceDashboard .ecommerce-conversion-help934 > .crm-help-art { width: 12px; height: 12px; }
#ecommerceDashboard .ecommerce-conversion-tooltip934 { position: absolute; z-index: 40; top: calc(100% + 6px); left: -55px; width: 360px; max-width: calc(100vw - 40px); box-sizing: border-box; padding: 10px 12px; border: 1px solid #dce4f1; border-radius: 6px; background: #fff; color: #46566e; font-size: 12px; font-weight: 400; line-height: 1.7; text-align: left; white-space: normal; box-shadow: 0 5px 16px #25324a20; opacity: 0; visibility: hidden; pointer-events: none; }
#ecommerceDashboard .ecommerce-conversion-help934:hover > .ecommerce-conversion-tooltip934,
#ecommerceDashboard .ecommerce-conversion-help934:focus > .ecommerce-conversion-tooltip934,
#ecommerceDashboard .ecommerce-conversion-help934:focus-within > .ecommerce-conversion-tooltip934 { opacity: 1; visibility: visible; }
#ecommerceDashboard .ecommerce-conversion-status934 { color: #866639; line-height: 1.5; }
@media (max-width: 520px) { #ecommerceDashboard .ecommerce-conversion-tooltip934 { position: fixed; top: auto; bottom: 14px; left: 14px; width: calc(100vw - 28px); max-width: 360px; } }

/* v897: explanation icons use a small graphic and retain a comfortable trigger. */
:root { --crm-help-icon-size: 12px; --crm-help-target-size: 18px; --crm-help-caption-gap: 2px; }
.crm-help-icon { display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 auto; width: var(--crm-help-target-size); height: var(--crm-help-target-size); border-radius: 50%; color: #8291a8; font-size: var(--crm-help-icon-size); line-height: 1; vertical-align: middle; cursor: help; outline-offset: 3px; }
.crm-help-icon > :is(img, svg) { width: var(--crm-help-icon-size); height: var(--crm-help-icon-size); flex: none; }
.crm-help-icon:focus-visible { outline: 2px solid #4b5cf5; }

/* v898: centered vector artwork avoids font-dependent circled-i glyphs. */
:is(.field-info888, .pledge-field-info864, .contact-permission-help > summary, .secondary891-help, .crm-help-icon) > .crm-help-art { display: block; width: var(--crm-help-icon-size, 12px); height: var(--crm-help-icon-size, 12px); flex: 0 0 var(--crm-help-icon-size, 12px); }

/* v899: keep explanation icons close to their labels, with the hit area extending right. */
.crm-help-caption { display: inline-flex; align-items: center; gap: var(--crm-help-caption-gap, 2px); }

/* v900: split transfer reasons only in the normal-lead conversion table. */
#frontendProfitPanel .v736-conversion-card .conversion-table .conversion-overdue900-column { width: 100px; min-width: 100px; }
#frontendProfitPanel .conversion-overdue900-caption { justify-content: center; white-space: nowrap; }
#frontendProfitPanel .conversion-overdue900-help { width: var(--crm-help-target-size, 18px); height: var(--crm-help-target-size, 18px); margin-left: 0; justify-content: flex-start; }
.conversion-overdue900-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.conversion-overdue900-pending { display: block; margin-top: 3px; color: #866639; font-size: 11px; font-weight: 400; white-space: nowrap; }

/* v903: frontend overview reuses the established backend profit-card layout. */
#frontendProfitPanel .frontend-profit-overview903 { padding: 14px; }
#frontendProfitPanel .frontend-profit-overview903 .backend-profit-overview-body { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#frontendProfitPanel .frontend-profit-card903 { min-height: 108px; }
#frontendProfitPanel .frontend-profit-person903 { align-items: center; gap: 5px; margin-bottom: 9px; }
#frontendProfitPanel .frontend-profit-person903 > span { display: inline-flex; align-items: center; margin: 0; }
#frontendProfitPanel .frontend-profit-name903 { width: 100%; color: var(--text, #172039); font-size: 14px; font-weight: 600; }
#frontendProfitPanel .frontend-profit-schedule903, #frontendProfitPanel .frontend-profit-status903 { padding: 2px 6px; border-radius: 4px; background: #f2f4f8; color: #637187; font-size: 11px; }
#frontendProfitPanel .frontend-profit-status903.is-online { background: #eaf7ef; color: #24844a; }
#frontendProfitPanel .frontend-profit-status903.is-paused { background: #fff4df; color: #9a6b18; }
#frontendProfitPanel .frontend-profit-today-label903 { font-size: 12px; }
#frontendProfitPanel .frontend-profit-card903 .metric-lines b { font-weight: 500; color: var(--text, #172039); }
#frontendProfitPanel .frontend-profit-card903 .frontend-profit-negative903 { color: #bd3d3d; }
.frontend-profit-overview-description903, .frontend-profit-overview-updated903 { color: var(--muted, #69788e); font-size: 12px; line-height: 1.6; }
.frontend-profit-overview-error903 { margin-top: 8px; color: #a66324; font-size: 12px; }
@media (max-width: 520px) { #frontendProfitPanel .frontend-profit-overview903 .backend-profit-overview-body { grid-template-columns: minmax(0, 1fr); } .frontend-profit-overview-actions903 { flex-wrap: wrap; } }

/* v905 visual refinement: compact six columns and right-aligned actions. */
#frontendProfitPanel .frontend-profit-overview-head903 .frontend-profit-overview-actions903 { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; }
#frontendProfitPanel .frontend-profit-overview-head903 .frontend-profit-overview-updated903 { margin-right: auto; min-width: 0; }
#frontendProfitPanel .frontend-profit-overview-head903 .frontend-profit-overview-actions903 > button { width: auto; min-width: 80px; flex: none; }
@media (max-width: 1100px) { #frontendProfitPanel .frontend-profit-overview903 .backend-profit-overview-body { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { #frontendProfitPanel .frontend-profit-overview903 .backend-profit-overview-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { #frontendProfitPanel .frontend-profit-overview903 .backend-profit-overview-body { grid-template-columns: minmax(0, 1fr); } #frontendProfitPanel .frontend-profit-overview-head903 .frontend-profit-overview-actions903 { flex-wrap: wrap; } #frontendProfitPanel .frontend-profit-overview-head903 .frontend-profit-overview-updated903 { flex-basis: 100%; } }

#frontendProfitPanel .frontend-profit-overview-head903 .conversion-tabs { flex-wrap: nowrap; overflow-x: auto; align-items: stretch; max-width: 100%; }
#frontendProfitPanel .frontend-profit-overview-head903 .conversion-tabs > .backend-register-tab { flex: 0 0 auto; width: auto; white-space: nowrap; }

#frontendProfitPanel .frontend-profit-overview-head903 .frontend-conversion-topline { flex: 1 1 100%; width: 100%; max-width: 100%; min-width: 0; }
@media (max-width: 720px) { #frontendProfitPanel .frontend-profit-overview-head903 .conversion-tabs { flex: 0 1 100%; width: 100%; min-width: 0; } }

/* v908: registration filters, 10 fields per desktop row; shared pledge filters stay unchanged. */
#recycleFilterPanel { container-type: inline-size; }
#recycleFilterPanel .backend-filter-head { justify-content: flex-end; margin-bottom: 12px; }
#recycleFilterPanel.is-collapsed .backend-filter-head { margin-bottom: 0; }
#recycleFilterPanel .backend-filter-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 10px;
  align-items: start;
}
#recycleFilterPanel .backend-filter-field > span { white-space: nowrap; line-height: 16px; }
#recycleFilterPanel .backend-filter-field.span-3 { grid-column: span 3; }
#recycleFilterPanel .backend-filter-field input,
#recycleFilterPanel .backend-filter-field select { height: 36px; }
#recycleFilterPanel .backend-date-range839 { gap: 5px; }
#recycleFilterPanel .backend-date-range839 input { padding-inline: 7px; }
@container (max-width: 1399px) {
  #recycleFilterPanel .backend-filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@container (max-width: 899px) {
  #recycleFilterPanel .backend-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #recycleFilterPanel .backend-filter-field.span-3 { grid-column: span 2; }
}
@container (max-width: 599px) {
  #recycleFilterPanel .backend-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #recycleFilterPanel .backend-date-filter839 { grid-column: 1 / -1; }
}
@container (max-width: 359px) {
  #recycleFilterPanel .backend-filter-grid { grid-template-columns: minmax(0, 1fr); }
  #recycleFilterPanel .backend-filter-field.span-2,
  #recycleFilterPanel .backend-filter-field.span-3 { grid-column: 1 / -1; }
}

/* v912: compact backend salary editor; all other salary schemes keep their layout. */
.hr-salary-config-workspace.hr-backend-salary-912 {
  --hr-salary-912-line: #dce2ee;
  --hr-salary-912-muted: #657086;
  --hr-salary-912-blue: #4655f5;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
  color: #1c2637;
}

.hr-backend-salary-912 .hr-salary-scheme-sidebar {
  border-color: var(--hr-salary-912-line);
  border-radius: 7px;
  background: #fafbfe;
}

.hr-backend-salary-912 .hr-salary-scheme-sidebar-head {
  min-height: 47px;
  padding: 12px 12px 7px;
  flex-wrap: wrap;
  gap: 6px;
}

.hr-backend-salary-912 .hr-salary-scheme-sidebar-head strong { font-size: 16px; }
.hr-backend-salary-912 .hr-salary-scheme-sidebar-head button { padding: 4px 6px; }
.hr-backend-salary-912 .hr-salary-scheme-search { padding: 0 10px 9px; }
.hr-backend-salary-912 .hr-salary-scheme-search input {
  min-height: 31px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 11px;
  background: #fff;
}
.hr-backend-salary-912 .hr-salary-scheme-list { max-height: 690px; padding: 5px 8px 9px; }
.hr-backend-salary-912 .hr-salary-scheme-group h4 { margin: 8px 5px 5px; letter-spacing: 0; }
.hr-backend-salary-912 .hr-salary-scheme-entry {
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 7px;
  min-height: 47px;
  padding: 6px;
  border-radius: 7px;
}
.hr-backend-salary-912 .hr-salary-scheme-entry.is-active {
  border-color: #d4d9ff;
  background: #edf0ff;
  color: var(--hr-salary-912-blue);
}
.hr-backend-salary-912 .hr-salary-scheme-icon { width: 27px; height: 30px; border-radius: 6px; }
.hr-backend-salary-912 .hr-salary-scheme-entry.is-active .hr-salary-scheme-icon { background: #fff; color: var(--hr-salary-912-blue); }
.hr-backend-salary-912 .hr-salary-scheme-copy { gap: 3px; }
.hr-backend-salary-912 .hr-salary-scheme-copy strong { font-size: 13px; }
.hr-backend-salary-912 .hr-salary-scheme-copy small { font-size: 10px; }
.hr-backend-salary-912 .hr-salary-scheme-entry > .hr-status-pill { grid-column: 2; justify-self: start; margin-top: 0; padding: 1px 5px; }
.hr-backend-salary-912 .hr-salary-scheme-sidebar footer { padding: 9px 11px; background: transparent; }
.hr-backend-salary-912 .hr-salary-scheme-sidebar footer span { font-size: 11px; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 { min-height: 680px; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-sidebar-head { display: block; min-height: 66px; padding: 15px 12px 10px; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-sidebar-head strong { display: block; font-size: 17px; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-sidebar-head small { display: block; margin-top: 4px; color: #6b7587; font-size: 12px; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-sidebar-head p { margin: 4px 0 0; color: #6b7587; font-size: 12px; line-height: 1.5; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-list { max-height: none; padding: 5px 10px 12px; border-top: 0; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-list .hr-salary-scheme-entry { min-height: 47px; margin-top: 5px; }
.hr-backend-salary-912 .hr-backend-compact-sidebar-912 > .hr-salary-scheme-list .hr-salary-scheme-copy strong { font-size: 14px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 { margin: 0 11px; padding-top: 10px; border-top: 1px solid #dce2ee; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 > summary { padding: 6px 1px; color: #6e7b92; font-size: 11px; cursor: pointer; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912[open] { margin: 0 6px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 > summary:focus-visible { outline: 2px solid #727cff; outline-offset: 2px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 .hr-salary-scheme-sidebar-head { padding-inline: 5px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 .hr-salary-scheme-sidebar-head strong { font-size: 12px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 .hr-salary-scheme-search { padding-inline: 5px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 .hr-salary-scheme-list { padding-inline: 0; max-height: 440px; }
.hr-backend-salary-912 .hr-backend-catalog-tools-912 .hr-salary-scheme-entry { grid-template-columns: 24px minmax(0, 1fr); }

.hr-backend-salary-912 .hr-salary-scheme-main-head {
  min-height: 62px;
  gap: 12px;
  margin-bottom: 0;
  padding: 11px 14px;
  border-color: var(--hr-salary-912-line);
  border-radius: 7px;
  background: #fafbff;
}
.hr-backend-salary-912 .hr-salary-scheme-main-head > div { min-width: 0; }
.hr-backend-salary-912 .hr-salary-scheme-main-head > div > div { gap: 9px; margin-top: 0; flex-wrap: wrap; }
.hr-backend-salary-912 .hr-salary-scheme-main-head h3 { font-size: 20px; line-height: 1.4; }
.hr-backend-salary-912 .hr-salary-scheme-main-head p { margin-top: 3px; font-size: 12px; }
.hr-backend-salary-912 .hr-salary-scheme-main-head dl {
  min-width: 0;
  flex-shrink: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 340px;
  border-radius: 5px;
  border-color: #d5deed;
  background: #fff;
}
.hr-backend-salary-912 .hr-salary-scheme-main-head dl > div { gap: 2px; padding: 6px 9px; }
.hr-backend-salary-912 .hr-salary-scheme-main-head dt { font-size: 10px; }
.hr-backend-salary-912 .hr-salary-scheme-main-head dd { font-size: 11px; }
.hr-backend-salary-912 .hr-backend-plan-head-912 { min-height: 63px; position: relative; }
.hr-backend-salary-912 .hr-backend-plan-head-912 > div > div { align-items: center; }
.hr-backend-salary-912 .hr-backend-plan-title-912 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.hr-backend-salary-912 .hr-backend-plan-title-912 h3 { margin: 0; font-size: 20px; font-weight: 700; }
.hr-backend-salary-912 .hr-backend-draft-note-912 { display: inline-flex; align-items: center; gap: 4px; color: #69748a; font-size: 11px; font-weight: 400; }
.hr-backend-salary-912 .hr-backend-plan-meta-912 { flex-shrink: 0; color: #69758a; font-size: 11px; }
.hr-backend-salary-912 .hr-backend-plan-meta-912 > summary { padding: 4px 7px; color: #68768e; cursor: pointer; }
.hr-backend-salary-912 .hr-backend-plan-meta-912[open] { z-index: 4; }
.hr-backend-salary-912 .hr-backend-plan-meta-912 dl { margin-top: 5px; }
.hr-backend-salary-912 .hr-backend-header-controls-912 { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; min-width: 0; }
.hr-backend-salary-912 .hr-backend-header-controls-912 label { display: flex; align-items: center; gap: 6px; color: #617087; font-size: 11px; white-space: nowrap; }
.hr-backend-salary-912 .hr-backend-header-controls-912 input,
.hr-backend-salary-912 .hr-backend-header-controls-912 select { width: 83px; min-height: 29px; padding: 4px 6px; border-radius: 4px; border-color: #d5ddec; font-size: 11px; background: #fff; }
.hr-backend-salary-912 .hr-backend-header-controls-912 input[type="month"] { width: 118px; }
.hr-backend-salary-912 .hr-salary-config-sections {
  gap: 0;
  min-height: 45px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--hr-salary-912-line);
  border-radius: 0;
  background: transparent;
}
.hr-backend-salary-912 .hr-salary-config-sections button {
  min-width: 130px;
  padding: 11px 20px 10px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #626e84;
  font-size: 15px;
  box-shadow: none;
}
.hr-backend-salary-912 .hr-salary-config-sections button.is-active {
  color: var(--hr-salary-912-blue);
  border-bottom-color: var(--hr-salary-912-blue);
  background: #fff;
  box-shadow: none;
}
.hr-backend-salary-912 .hr-salary-config-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr);
  gap: 8px;
  margin-bottom: 12px;
}
.hr-backend-salary-912 .hr-salary-config-head > div,
.hr-backend-salary-912 .hr-salary-config-head > label { gap: 4px; padding: 8px 10px; border-radius: 6px; }
.hr-backend-salary-912 .hr-salary-config-head span { font-size: 11px; }
.hr-backend-salary-912 .hr-salary-config-head strong { font-size: 16px; }
.hr-backend-salary-912 .hr-salary-config-head select,
.hr-backend-salary-912 .hr-salary-config-head input { min-height: 30px; padding: 4px 7px; font-size: 12px; }

.hr-backend-salary-912 .hr-salary-config-section {
  margin-bottom: 12px;
  border-color: var(--hr-salary-912-line);
  border-radius: 7px;
  background: #fff;
}
.hr-backend-salary-912 .hr-config-section-title {
  min-height: 45px;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 0;
  background: transparent;
}
.hr-backend-salary-912 .hr-config-section-title strong { font-size: 16px; }
.hr-backend-salary-912 .hr-config-section-title > div { gap: 3px; }
.hr-backend-salary-912 .hr-config-section-title span { font-size: 11px; }
.hr-backend-salary-912 .hr-config-section-title .secondary-button { min-height: 30px; padding: 4px 11px; font-size: 12px; }
.hr-backend-salary-912 .hr-backend-structure-912 > .hr-table-scroll { margin: 0 8px; border: 1px solid var(--hr-salary-912-line); border-radius: 6px; }
.hr-backend-salary-912 .hr-backend-tier-table-912 { width: 100%; min-width: 840px; table-layout: fixed; font-size: 13px; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th,
.hr-backend-salary-912 .hr-backend-tier-table-912 td { padding: 3px 5px; height: 31px; text-align: center; border-color: #e2e7f0; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th { height: 43px; padding-block: 5px; line-height: 1.35; white-space: normal; font-size: 12px; background: #f3f5fc; color: #273247; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th:first-child,
.hr-backend-salary-912 .hr-backend-tier-table-912 td:first-child { width: 50px; text-align: left; padding-left: 10px; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th:nth-child(2) { width: 205px; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th:last-child { width: 58px; }
.hr-backend-salary-912 .hr-backend-tier-table-912:has(th:nth-child(10)) { min-width: 1040px; }
.hr-backend-salary-912 .hr-backend-tier-table-912:has(th:nth-child(11)) { min-width: 1160px; }
.hr-backend-salary-912 .hr-backend-tier-table-912:has(th:nth-child(12)) { min-width: 1280px; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th small { display: block; margin-top: 1px; color: #667086; font-size: 10px; font-weight: 400; }
.hr-backend-salary-912 .hr-backend-tier-table-912 tr:last-child td { border-bottom: 0; }
.hr-backend-salary-912 .hr-backend-tier-table-912 th:last-child,
.hr-backend-salary-912 .hr-backend-tier-table-912 td:last-child { border-right: 0; }
.hr-backend-salary-912 .hr-backend-tier-table-912 input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 25px;
  height: 25px;
  padding: 2px 3px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.hr-backend-salary-912 .hr-backend-tier-table-912 input::-webkit-inner-spin-button,
.hr-backend-salary-912 .hr-backend-tier-table-912 input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hr-backend-salary-912 .hr-backend-tier-table-912 input:not(:disabled):hover { border-color: #c8d3e6; background: #fff; }
.hr-backend-salary-912 .hr-backend-tier-table-912 input:focus { outline: 2px solid #8790ff; outline-offset: 0; border-color: var(--hr-salary-912-blue); background: #fff; }
.hr-backend-salary-912 .hr-backend-tier-table-912 input:disabled { opacity: 1; color: #5f6979; cursor: default; }
.hr-backend-salary-912 .hr-backend-range-inputs-912 { display: flex; align-items: center; gap: 3px; min-width: 0; }
.hr-backend-salary-912 .hr-backend-range-inputs-912 input { flex: 1 1 0; width: 0; }
.hr-backend-salary-912 .hr-backend-range-separator-912 { flex: 0 0 8px; color: #7b8595; font-size: 11px; }
.hr-backend-salary-912 .hr-backend-percent-912 { display: flex; align-items: center; justify-content: center; gap: 0; min-width: 0; }
.hr-backend-salary-912 .hr-backend-percent-912 input { flex: 0 1 58px; width: 58px; min-width: 0; text-align: right; }
.hr-backend-salary-912 .hr-backend-percent-912 > span { flex: 0 0 auto; padding-right: 4px; color: #5e697c; font-size: 12px; }
.hr-backend-salary-912 .hr-backend-basis-total-912 { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: #273247; white-space: nowrap; }
.hr-backend-salary-912 .hr-backend-basis-total-912 small { display: none; }
.hr-backend-salary-912 .crm-help-icon { position: relative; }
.hr-backend-salary-912 .crm-help-icon > .secondary891-tooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: -6px;
  display: block;
  width: 230px;
  max-width: calc(100vw - 40px);
  padding: 10px 12px;
  border: 1px solid #cdd7e7;
  border-radius: 6px;
  background: #fff;
  color: #46566e;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  box-shadow: 0 5px 16px #1f315224;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hr-backend-salary-912 .crm-help-icon:hover > .secondary891-tooltip,
.hr-backend-salary-912 .crm-help-icon:focus > .secondary891-tooltip,
.hr-backend-salary-912 .crm-help-icon:focus-within > .secondary891-tooltip { opacity: 1; visibility: visible; }
.hr-backend-salary-912 .hr-backend-row-menu-912 { font-size: 11px; line-height: 1.5; }
.hr-backend-salary-912 .hr-backend-row-menu-912 summary { cursor: pointer; color: #6e7790; list-style-position: inside; white-space: nowrap; }
.hr-backend-salary-912 .hr-backend-row-menu-912[open] summary { color: var(--hr-salary-912-blue); }
.hr-backend-salary-912 .hr-backend-row-menu-912 button { display: block; margin: 3px auto 0; padding: 3px 1px; color: #aa4540; font-size: 11px; white-space: normal; }
.hr-backend-salary-912 .hr-backend-boundary-note-912 { margin: 0; padding: 7px 14px 8px; color: var(--hr-salary-912-muted); font-size: 11px; line-height: 1.5; }

.hr-backend-salary-912 .hr-backend-supplement-912 { padding: 0 14px 11px; border: 1px solid var(--hr-salary-912-line); border-radius: 7px; margin-bottom: 12px; background: #fff; }
.hr-backend-salary-912 .hr-backend-supplement-912 .hr-config-section-title { padding: 9px 0 10px; min-height: 45px; }
.hr-backend-salary-912 .hr-backend-supplement-912 .hr-config-section-title > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hr-backend-salary-912 .hr-backend-supplement-912 .hr-status-pill { background: #fff0da; color: #975213; border-radius: 4px; font-size: 10px; }
.hr-backend-salary-912 .hr-backend-supplement-formula-912 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; min-height: 47px; padding: 9px 16px; border: 1px solid #eceefa; border-radius: 6px; background: #f5f6fe; }
.hr-backend-salary-912 .hr-backend-supplement-formula-912 > strong { color: #1e293b; font-size: 16px; line-height: 1.5; font-weight: 700; white-space: nowrap; }
.hr-backend-salary-912 .hr-backend-supplement-limits-912 { display: flex; align-items: center; gap: 12px; }
.hr-backend-salary-912 .hr-backend-supplement-limits-912 > span { padding: 3px 12px; border: 1px solid #c8d2e4; border-radius: 4px; background: #fff; color: #677286; font-size: 12px; white-space: nowrap; }
.hr-backend-salary-912 .hr-backend-supplement-limits-912 strong { color: #202b3e; font-size: 15px; }
.hr-backend-salary-912 .hr-backend-supplement-limits-912 b { color: #202b3e; font-size: 15px; }
.hr-backend-salary-912 .hr-backend-supplement-912 ul { margin: 9px 0 0; padding-left: 19px; color: #5d697c; font-size: 12px; line-height: 1.8; }

.hr-backend-salary-912 .hr-backend-config-fold-912 { margin-bottom: 6px; border: 1px solid var(--hr-salary-912-line); border-radius: 6px; background: #fff; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912 { padding: 10px 15px; min-height: 40px; cursor: pointer; color: #344158; line-height: 1.4; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912::marker { color: #3a465d; font-size: 11px; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912 strong { display: inline-block; min-width: 145px; margin-left: 7px; color: #263247; font-size: 13px; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912 small { color: #68758a; font-size: 12px; font-weight: 400; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912 .hr-status-pill { margin: 0; padding: 2px 6px; border-radius: 4px; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912 .hr-status-pill.warning { background: #fff0da; color: #975213; font-size: 11px; font-weight: 600; }
.hr-backend-salary-912 .hr-backend-config-fold-head-912:focus-visible { outline: 2px solid var(--hr-salary-912-blue); outline-offset: 2px; border-radius: 5px; }
.hr-backend-salary-912 .hr-backend-config-fold-912[open] > summary { border-bottom: 1px solid #e5eaf3; background: #f8faff; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 { padding: 10px; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 > .hr-salary-config-section:last-child { margin-bottom: 0; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 .hr-commission-config-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 .hr-config-section-title { min-height: 40px; padding: 8px 10px; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 .hr-config-section-title strong { font-size: 13px; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 .hr-summary-table { font-size: 12px; }
.hr-backend-salary-912 .hr-backend-config-fold-body-912 .hr-summary-table th,
.hr-backend-salary-912 .hr-backend-config-fold-body-912 .hr-summary-table td { padding: 7px; }
.hr-backend-salary-912 .hr-split-field-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.hr-backend-salary-912 .hr-split-field-card { padding: 10px; border-radius: 6px; }

.hr-backend-salary-912 .hr-backend-main-rates-912 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 14px 14px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 { min-width: 0; padding: 12px 14px; border: 1px solid #dce3ef; border-radius: 6px; background: #fafbff; }
.hr-backend-salary-912 .hr-backend-rate-card-912 > strong { display: block; color: #27364c; font-size: 14px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 label { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #637087; font-size: 12px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #27364c; font-size: 13px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 > span small { color: #7a8699; font-size: 10px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 > div { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 > div b { color: #586780; font-size: 12px; font-weight: 500; }
.hr-backend-salary-912 .hr-backend-rate-card-912 > small { display: block; margin-top: 8px; color: #728098; font-size: 11px; }
.hr-backend-salary-912 .hr-backend-rate-card-912 input[type="number"] { width: 100px; min-height: 34px; padding: 6px 8px; color: #263c6c; font-size: 17px; font-weight: 600; }

.hr-backend-salary-912 .hr-sticky-actions { gap: 8px; min-height: 54px; margin-top: 20px; padding: 8px 12px 8px 15px; border-color: #eadfcf; border-radius: 7px; background: #fffbf4; box-shadow: none; }
.hr-backend-salary-912 .hr-sticky-actions p { font-size: 12px; line-height: 1.5; }
.hr-backend-salary-912 .hr-sticky-actions button { min-height: 34px; padding: 6px 14px; font-size: 12px; }
.hr-backend-salary-912 .hr-sticky-actions .primary-button { background: var(--hr-salary-912-blue); border-color: var(--hr-salary-912-blue); }
.hr-backend-salary-912 .hr-backend-draft-more-912 { position: relative; color: #5d6b80; font-size: 12px; }
.hr-backend-salary-912 .hr-backend-draft-more-912 > summary { min-height: 34px; padding: 7px 12px; border: 1px solid #cfd7e6; border-radius: 5px; background: #fff; cursor: pointer; }
.hr-backend-salary-912 .hr-backend-draft-more-912 > button { display: block; width: 100%; margin-top: 5px; text-align: center; }
.hr-backend-salary-912 .hr-backend-draft-more-912 > summary:focus-visible { outline: 2px solid #727cff; outline-offset: 2px; }
.hr-backend-salary-912 .hr-backend-config-errors-912 { margin-top: 9px; color: #986133; font-size: 11px; }
.hr-backend-salary-912 .hr-backend-config-errors-912 > summary { padding: 5px 2px; cursor: pointer; }
.hr-backend-salary-912 .hr-backend-config-errors-912 > ul { margin: 4px 0 0; padding: 10px 14px 10px 30px; border: 1px solid #efddc1; border-radius: 5px; background: #fffbf2; color: #8c6035; line-height: 1.7; }
.hr-backend-salary-912 .hr-backend-config-errors-912 > summary:focus-visible { outline: 2px solid #727cff; outline-offset: 2px; }
.hr-backend-salary-912 .hr-config-errors { padding: 9px 12px; font-size: 12px; }
.hr-backend-salary-912 .hr-config-errors ul { margin-top: 5px; }
.hr-backend-salary-912 .hr-config-review { grid-template-columns: minmax(0, 1fr) auto; border-radius: 7px; }
.hr-backend-salary-912 button:focus-visible { outline: 2px solid #727cff; outline-offset: 2px; }

@media (max-width: 1180px) {
  .hr-salary-config-workspace.hr-backend-salary-912 { grid-template-columns: 164px minmax(0, 1fr); }
  .hr-backend-salary-912 .hr-salary-scheme-main-head { align-items: flex-start; flex-direction: column; }
  .hr-backend-salary-912 .hr-salary-scheme-main-head dl { max-width: none; width: 100%; }
  .hr-backend-salary-912 .hr-salary-scheme-copy strong { font-size: 12px; }
  .hr-backend-salary-912 .hr-salary-config-sections button { min-width: 110px; padding-inline: 15px; }
  .hr-backend-salary-912 .hr-backend-supplement-formula-912 > strong { font-size: 14px; }
  .hr-backend-salary-912 .hr-backend-supplement-limits-912 { gap: 8px; }
}

@media (max-width: 760px) {
  .hr-salary-config-workspace.hr-backend-salary-912 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hr-backend-salary-912 .hr-salary-scheme-sidebar { position: static; }
  .hr-backend-salary-912 .hr-backend-compact-sidebar-912 { min-height: 0; }
  .hr-backend-salary-912 .hr-backend-header-controls-912 { justify-content: flex-start; }
  .hr-backend-salary-912 .hr-salary-scheme-list { max-height: 210px; }
  .hr-backend-salary-912 .hr-salary-scheme-entry { grid-template-columns: 27px minmax(0, 1fr) auto; }
  .hr-backend-salary-912 .hr-salary-scheme-entry > .hr-status-pill { grid-column: auto; }
  .hr-backend-salary-912 .hr-salary-scheme-main-head h3 { font-size: 18px; }
  .hr-backend-salary-912 .hr-salary-config-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-backend-salary-912 .hr-salary-config-head > div { grid-column: 1 / -1; }
  .hr-backend-salary-912 .hr-salary-config-sections button { min-width: 0; flex: 1 1 0; padding: 10px 7px; font-size: 13px; }
  .hr-backend-salary-912 .hr-backend-supplement-formula-912 { padding: 9px 10px; }
  .hr-backend-salary-912 .hr-backend-supplement-formula-912 > strong { white-space: normal; }
  .hr-backend-salary-912 .hr-backend-config-fold-head-912 strong { min-width: 110px; font-size: 12px; }
  .hr-backend-salary-912 .hr-backend-config-fold-head-912 small { font-size: 11px; }
  .hr-backend-salary-912 .hr-backend-main-rates-912 { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-salary-912 .hr-split-field-list { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-salary-912 .hr-sticky-actions { flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
  .hr-backend-salary-912 .hr-sticky-actions p { flex: 1 0 100%; margin-bottom: 3px; }
  .hr-backend-salary-912 .hr-config-review { grid-template-columns: minmax(0, 1fr); }
  .hr-backend-salary-912 .hr-config-review > div { flex-wrap: wrap; }
}

/* v913b: fixed salary plans have no customer-rate/action columns. */
.hr-backend-salary-912 .hr-backend-tier-table-912.hr-backend-fixed-table-913 {
  min-width: 580px;
  table-layout: auto;
}
.hr-backend-salary-912 .hr-backend-fixed-table-913 th:first-child,
.hr-backend-salary-912 .hr-backend-fixed-table-913 td:first-child {
  width: 80px;
  min-width: 80px;
  white-space: nowrap;
}
.hr-backend-salary-912 .hr-backend-fixed-table-913 th:nth-child(2),
.hr-backend-salary-912 .hr-backend-fixed-table-913 td:nth-child(2) {
  width: 205px;
  min-width: 205px;
}
.hr-backend-salary-912 .hr-backend-fixed-table-913 th:not(:first-child):not(:nth-child(2)):not(:last-child),
.hr-backend-salary-912 .hr-backend-fixed-table-913 td:not(:first-child):not(:nth-child(2)):not(:last-child) {
  min-width: 130px;
}
.hr-backend-salary-912 .hr-backend-fixed-table-913 th:last-child,
.hr-backend-salary-912 .hr-backend-fixed-table-913 td:last-child {
  width: 165px;
  min-width: 165px;
  white-space: nowrap;
}
.hr-backend-salary-912 .hr-backend-fixed-table-913 td:not(:first-child):not(:nth-child(2)) > input {
  max-width: 160px;
}

/* v921: compact official backend payroll; historical reference tables stay intact. */
.hr-payroll-workspace921 { color: #17233d; font-size: 13px; }
.hr-payroll-workspace921 > .hr-payroll-banner { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; padding: 5px 12px; font-size: 12px; }
.hr-payroll-workspace921 > .hr-payroll-banner > button { min-height: 28px; padding: 4px 9px; font-size: 12px; }
.hr-payroll-workspace921 > .hr-payroll-metrics { margin-bottom: 10px; border: 1px solid #dce4f1; border-radius: 8px; background: #fff; }
.hr-payroll-workspace921 > .hr-payroll-metrics > div { padding: 10px 12px; }
.hr-payroll-workspace921 > .hr-payroll-metrics strong { color: #15213b; font-size: 20px; }
.hr-payroll-workspace921 > .hr-payroll-metrics .is-negative { color: #d43156; }
.hr-payroll-workspace921 > .hr-payroll-metrics > div:nth-child(4) { order: 5; }
.hr-payroll-workspace921 > .hr-payroll-metrics > div:nth-child(5) { order: 4; }
.hr-payroll-overview921 { margin: 0 0 12px; overflow: hidden; border: 1px solid #dce4f1; border-radius: 8px; background: #fff; }
.hr-payroll-overview921 .hr-table-scroll { margin: 0; border: 0; border-radius: 0; }
.hr-payroll-overview-table921 { width: 100%; min-width: 680px; table-layout: fixed; }
.hr-payroll-overview-table921 th { padding: 8px 12px; background: #f5f7fd; color: #17233d; font-size: 12px; font-weight: 650; }
.hr-payroll-overview-table921 th:first-child { width: 22%; }
.hr-payroll-overview-table921 th:nth-child(2) { width: 10%; }
.hr-payroll-overview-table921 th:nth-child(3), .hr-payroll-overview-table921 th:nth-child(4) { width: 15%; }
.hr-payroll-overview-table921 th:nth-child(5) { width: 16%; }
.hr-payroll-overview-table921 th:last-child { width: 22%; }
.hr-payroll-overview-table921 td { padding: 5px 12px; border-color: #e1e7f1; font-size: 14px; line-height: 1.4; vertical-align: middle; }
.hr-payroll-overview-table921 th:not(:first-child), .hr-payroll-overview-table921 td:not(:first-child) { text-align: center; }
.hr-payroll-overview-table921 td:nth-child(3), .hr-payroll-overview-table921 td:nth-child(4), .hr-payroll-overview-table921 td:nth-child(5) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hr-payroll-overview-table921 tbody tr { cursor: pointer; }
.hr-payroll-overview-table921 tbody tr:hover { background: #f8faff; }
.hr-payroll-overview-table921 tbody tr.is-selected { background: #eceeff; }
.hr-payroll-person-cell921 { display: flex; align-items: center; gap: 10px; text-align: left; }
.hr-payroll-person-cell921 > input { flex: 0 0 15px; width: 15px; height: 15px; margin: 0; accent-color: #3f4bff; pointer-events: none; }
.hr-payroll-person-cell921 > div { min-width: 0; }
.hr-payroll-person-cell921 .text-button { display: block; min-height: 0; height: auto; margin: 0; padding: 0; color: #15213b; font-size: inherit; font-weight: 650; line-height: 18px; text-align: left; }
.hr-payroll-overview-table921 tr.is-selected .hr-payroll-person-cell921 .text-button { color: #243add; }
.hr-payroll-person-cell921 small { display: block; margin: 0; color: #66738b; font-size: 11px; line-height: 14px; }
.hr-payroll-row-state921 { display: inline; font-size: 12px; }
.hr-payroll-overview-table921 .hr-calc-entry { display: inline-block; min-height: 0; margin: 0 0 0 7px; padding: 0; font-size: 12px; line-height: 18px; }
.hr-payroll-person921 { min-width: 0; padding: 12px; border: 1px solid #dce4f1; border-radius: 10px; background: #fff; }
.hr-payroll-person-head921 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.hr-payroll-person-head921 h3 { margin: 0; color: #14213b; font-size: 20px; font-weight: 700; }
.hr-payroll-person-head921 > span { color: #637087; font-size: 12px; }
.hr-payroll-person-head921 > span > strong { margin-left: 5px; color: #17233d; font-variant-numeric: tabular-nums; }
.hr-payroll-person-head921 .hr-payroll-plan921 { padding: 4px 9px; border: 1px solid #dbe1fe; border-radius: 5px; background: #f0f2ff; color: #263cdc; font-weight: 600; }
.hr-payroll-person-head921 .hr-status-pill { margin: 0; }
.hr-payroll-person-grid921 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(255px, 28%); gap: 16px; align-items: start; }
.hr-payroll-income921, .hr-payroll-deductions921 { min-width: 0; border: 1px solid #e0e6f2; border-radius: 8px; background: #fff; }
.hr-payroll-person-nav921 { display: flex; flex-wrap: wrap; gap: 20px; min-height: 39px; padding: 0 14px; border-bottom: 1px solid #e5e9f3; }
.hr-payroll-person-nav921 a { display: flex; align-items: center; padding: 9px 0 8px; border-bottom: 2px solid transparent; color: #364158; font-size: 13px; text-decoration: none; }
.hr-payroll-person-nav921 a:hover, .hr-payroll-person-nav921 a:focus-visible, .hr-payroll-person-nav921 a.is-active { border-bottom-color: #4556ff; color: #2f43e7; }
.hr-payroll-wages921 { padding: 0 14px; scroll-margin-top: 18px; }
.hr-payroll-formula921 { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.hr-payroll-formula921 + .hr-payroll-formula921 { border-top: 1px solid #e8ecf4; }
.hr-payroll-term921 { display: flex; flex: 1 1 112px; flex-direction: column; justify-content: center; min-width: 0; gap: 4px; padding: 5px 7px; }
.hr-payroll-term921 > span { display: flex; align-items: center; color: #25324a; font-size: 13px; line-height: 1.4; }
.hr-payroll-term921 > strong { color: #17233d; font-size: 19px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hr-payroll-term921 > small { color: #6a768a; font-size: 11px; }
.hr-payroll-term921.is-total { flex-basis: 130px; border-radius: 6px; background: #eeefff; }
.hr-payroll-term921.is-total > span, .hr-payroll-term921.is-total > strong { color: #263cdb; font-weight: 650; }
.hr-payroll-term921.is-total > strong { font-size: 21px; }
.hr-payroll-operator921 { display: flex; flex: 0 0 10px; align-items: center; justify-content: center; color: #1d2b46; font-size: 17px; }
.hr-payroll-source921 { padding: 0 14px 10px; scroll-margin-top: 18px; }
.hr-payroll-source-heading921 { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0 7px; }
.hr-payroll-source-heading921 > strong { color: #25324a; font-size: 12px; }
.hr-payroll-source-heading921 > strong > small { font-size: 11px; font-weight: 400; }
.hr-payroll-source-heading921 > span { color: #6c7890; font-size: 10px; }
.hr-payroll-source921 > .hr-table-scroll { border: 1px solid #e1e7f2; border-radius: 4px; }
.hr-payroll-source-table921 { width: 100%; min-width: 480px; }
.hr-payroll-source-table921 th, .hr-payroll-source-table921 td { padding: 5px 8px; font-size: 12px; line-height: 1.35; }
.hr-payroll-source-table921 th { background: #f6f8fd; }
.hr-payroll-source-table921 th:last-child, .hr-payroll-source-table921 td:last-child { text-align: right; white-space: nowrap; }
.hr-payroll-source-fold921 { margin-top: 8px; }
.hr-payroll-source-fold921 > summary { width: fit-content; color: #3347e6; font-size: 12px; cursor: pointer; }
.hr-payroll-source-fold921 .hr-backend-payroll-selected848 { margin-top: 12px; }
.hr-payroll-source-fold921 .hr-backend-payroll-sources848 > table { min-width: 650px; }
.hr-payroll-deductions921 { padding: 12px; scroll-margin-top: 18px; }
.hr-payroll-deductions921 h4 { margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid #e5e9f3; color: #1a2943; font-size: 14px; }
.hr-payroll-deductions921 dl { margin: 0; }
.hr-payroll-deductions921 dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; }
.hr-payroll-deductions921 dt { color: #3c4961; font-size: 13px; }
.hr-payroll-deductions921 dd { margin: 0; color: #17233d; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr-payroll-deductions921 .is-subtotal { margin-top: 9px; padding: 10px; border-radius: 5px; background: #f5f6fa; }
.hr-payroll-deductions921 .is-subtotal dt, .hr-payroll-deductions921 .is-subtotal dd { color: #1e2c45; font-weight: 650; }
.hr-payroll-deductions921 .is-final { margin-top: 9px; padding: 11px 10px; border-radius: 5px; background: #eeefff; }
.hr-payroll-deductions921 .is-final dt { color: #253bd9; font-size: 15px; font-weight: 650; }
.hr-payroll-deductions921 .is-final dd { color: #253bd9; font-size: 21px; font-weight: 700; }
.hr-payroll-note921 { margin: 8px 0 0; color: #718096; font-size: 11px; line-height: 1.6; }
.hr-payroll-unavailable921 { padding: 18px; border: 1px solid #e3e8f1; border-radius: 7px; background: #f8faff; }
.hr-payroll-unavailable921 strong { font-size: 14px; }
.hr-payroll-unavailable921 p { margin: 7px 0; color: #5f6d83; }
.hr-payroll-unavailable921 small { color: #718096; }
.hr-payroll-complete921 { margin-top: 14px; border: 1px solid #dce4f1; border-radius: 8px; background: #fff; }
.hr-payroll-complete921 > summary { padding: 12px 15px; color: #243858; font-size: 13px; cursor: pointer; }
.hr-payroll-complete921 > summary > span { margin-left: 12px; color: #758196; font-size: 11px; }
.hr-payroll-complete-body921 { padding: 0 12px 12px; }
.hr-payroll-complete-body921 .hr-payroll-layout { grid-template-columns: minmax(0, 1fr) 320px; }
.hr-payroll-workspace921 > .hr-sticky-actions { gap: 12px; margin-top: 14px; padding: 12px 14px; box-shadow: none; }
.hr-payroll-workspace921 > .hr-sticky-actions p { font-size: 12px; line-height: 1.6; }
.hr-payroll-workspace921 .crm-help-icon { position: relative; flex: 0 0 12px; width: 12px; height: 12px; margin: 0 0 0 3px; }
.hr-payroll-workspace921 .crm-help-icon > .secondary891-tooltip { position: absolute; z-index: 100; top: calc(100% + 7px); left: 0; width: min(270px, 72vw); padding: 8px 10px; border: 1px solid #dce4f1; border-radius: 6px; background: #fff; color: #53627a; font-size: 11px; font-weight: 400; line-height: 1.7; white-space: normal; box-shadow: 0 5px 16px #25324a14; opacity: 0; visibility: hidden; pointer-events: none; }
.hr-payroll-workspace921 .crm-help-icon:hover > .secondary891-tooltip, .hr-payroll-workspace921 .crm-help-icon:focus > .secondary891-tooltip { opacity: 1; visibility: visible; }
.hr-payroll-workspace921 a:focus-visible, .hr-payroll-workspace921 summary:focus-visible { outline: 2px solid #7b86ef; outline-offset: 3px; }
@media (max-width: 1100px) {
  .hr-payroll-workspace921 > .hr-payroll-metrics.hr-payroll-metrics-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hr-payroll-workspace921 > .hr-payroll-metrics > div { min-width: 0; }
  .hr-payroll-workspace921 > .hr-payroll-metrics span, .hr-payroll-workspace921 > .hr-payroll-metrics strong, .hr-payroll-workspace921 > .hr-payroll-metrics small { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .hr-payroll-person-grid921 { grid-template-columns: minmax(0, 1fr) 250px; gap: 12px; }
  .hr-payroll-person921 { padding: 12px; }
  .hr-payroll-term921 { flex-basis: 100px; }
  .hr-payroll-complete-body921 .hr-payroll-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hr-payroll-workspace921 > .hr-payroll-metrics.hr-payroll-metrics-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-payroll-workspace921 > .hr-payroll-metrics strong { font-size: 18px; }
  .hr-payroll-workspace921 .crm-help-icon > .secondary891-tooltip { position: fixed; top: auto; bottom: 14px; left: 14px; width: calc(100vw - 28px); max-width: 360px; box-sizing: border-box; }
  .hr-payroll-person-grid921 { grid-template-columns: minmax(0, 1fr); }
  .hr-payroll-person-head921 { gap: 8px; margin-bottom: 12px; }
  .hr-payroll-person-head921 h3 { font-size: 18px; }
  .hr-payroll-person-head921 > span:not(.hr-status-pill):not(.hr-payroll-plan921) { flex-basis: 100%; }
  .hr-payroll-formula921 { gap: 4px; padding: 10px 0; }
  .hr-payroll-term921 { flex-basis: 90px; padding: 5px; }
  .hr-payroll-term921 > strong { font-size: 17px; }
  .hr-payroll-term921.is-total { flex-basis: 112px; }
  .hr-payroll-term921.is-total > strong { font-size: 19px; }
  .hr-payroll-person-nav921 { gap: 18px; }
  .hr-payroll-complete921 > summary > span { display: block; margin: 5px 0 0 15px; }
  .hr-payroll-workspace921 > .hr-sticky-actions { align-items: stretch; flex-direction: column; }
  .hr-payroll-workspace921 > .hr-sticky-actions button { align-self: flex-end; }
}

.ai-knowledge-pdf949 { min-width: 0; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.form-grid > .ai-knowledge-pdf949 { grid-column: 1 / -1; }
.ai-knowledge-pdf-summary949, .ai-knowledge-pdf-actions949 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-knowledge-pdf-summary949 > strong { flex: 1; min-width: 150px; }
.ai-knowledge-pdf-page949 { margin: 8px 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.ai-knowledge-pdf949 pre { max-height: 240px; padding: 8px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: #f8fafc; }
.ai-knowledge-pdf-image949 { margin: 10px 0; padding-top: 8px; border-top: 1px solid var(--line); }
.ai-knowledge-pdf-image949 img { display: block; max-width: 100%; max-height: 280px; object-fit: contain; }
.ai-knowledge-image-choice958 { min-width: 0; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.ai-knowledge-image-options958 { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 8px 0; }
.ai-knowledge-image-options958 label { display: inline-flex; align-items: center; gap: 6px; }
.ai-knowledge-image-choice958 input[type="radio"] { width: 16px; min-width: 16px; height: 16px; margin: 0; }
.ai-knowledge-image-choice958 textarea { display: block; width: 100%; min-height: 112px; resize: vertical; margin-top: 8px; }
.ai-knowledge-image-choice958 [hidden] { display: none !important; }
.ai-knowledge-pdf-image949 > label, .ai-knowledge-pdf-confirm949 { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; line-height: 1.6; }
.ai-knowledge-pdf949 input[type="checkbox"] { flex: 0 0 16px; width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 4px 0 0; }

.peer-advance-row950 > .payment-proof-upload, .peer-advance-row950 > [data-peer-proof-preview950] { grid-column: 1 / -1; }
.peer-advance-row950 [data-peer-proof-preview950] img { max-height: 140px; }
.peer-payment950 .peer-item-choice950 { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; }
.peer-payment950 .peer-item-choice950 input[type="checkbox"] { flex: 0 0 16px; width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 3px 0 0; }
.peer-payment-actions950 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* v955: selected design 2, remaining goods stay on the original owner's order. */
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) { padding: 0; place-items: stretch end; z-index: 150; background: rgba(24, 36, 57, .27); }
body:has(#formModal:not([hidden]) [data-primary-drawer955]) { overflow: hidden; }
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) > .modal-panel { width: min(840px, 100%); height: 100dvh; max-height: 100dvh; min-height: 0; border-radius: 0; box-shadow: -8px 0 28px rgba(23, 35, 57, .12); }
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header { flex: none; min-height: 104px; padding: 22px 30px; align-items: flex-start; gap: 16px; border-color: #d6ddeb; }
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header h2 { display: grid; gap: 4px; margin: 0; color: #15213a; font-size: 28px; line-height: 1.35; font-weight: 700; }
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header h2 small { font-size: 17px; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere; }
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header .icon-button { width: 40px; height: 40px; min-width: 40px; border: 1px solid #c4cede; border-radius: 6px; background: #fff; color: #18243a; }
#formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-body { flex: 1; min-height: 0; overflow: hidden; padding: 0; }
.primary955-form { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; color: #1d2a40; font-size: 16px; line-height: 1.5; background: #fff; }
.primary955-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 30px 28px; }
.primary955-context { margin: 0 0 24px; color: #40506c; font-size: 17px; line-height: 1.7; }
.primary955-items { overflow: hidden; margin: 0; border: 1px solid #ccd4e3; border-radius: 6px; }
.primary955-item-head { display: grid; grid-template-columns: minmax(0,1fr) 34%; align-items: center; min-height: 46px; padding: 10px 18px; color: #26324b; background: #f1f3f9; }
.primary955-item-head strong { font-size: 17px; font-weight: 600; }
.primary955-item-head > strong:first-child { padding-left: 26px; }
.primary955-item { display: grid; grid-template-columns: minmax(0,1fr) 34%; align-items: center; gap: 8px; min-height: 60px; padding: 12px 18px; border-top: 1px solid #d9deea; background: #fffaf1; }
.primary955-item > label { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; color: #1d2a40; font-size: 16px; line-height: 1.5; cursor: pointer; }
.primary955-item > label > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.primary955-item > label strong { font-size: 18px; font-weight: 600; }
.primary955-item > label small { color: #637085; font-size: 13px; }
.primary955-form input[type="checkbox"] { appearance: auto; width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; max-width: 18px; padding: 0; margin: 0; flex: 0 0 18px; accent-color: #465cf4; }
.primary955-status { justify-self: start; display: inline-block; padding: 3px 10px; border-radius: 5px; color: #9b6014; background: #ffebc7; font-size: 16px; line-height: 1.5; white-space: nowrap; }
.primary955-status.is-completed { color: #626d80; background: #e7ebf3; }
.primary955-sold { border-top: 1px solid #d9deea; background: #f7f8fb; color: #798396; }
.primary955-sold > summary { display: grid; grid-template-columns: minmax(0,1fr) 34%; align-items: center; gap: 8px; min-height: 60px; padding: 12px 18px; cursor: pointer; list-style: none; }
.primary955-sold > summary::-webkit-details-marker { display: none; }
.primary955-sold > summary > strong { min-width: 0; padding-left: 26px; font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.primary955-sold-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.primary955-sold-link { font-size: 15px; color: #596980; text-decoration: underline; text-underline-offset: 3px; }
.primary955-sold-detail { padding: 0 18px 14px 44px; color: #64718a; font-size: 13px; }
.primary955-sold-detail p { margin: 6px 0; }
.primary955-receipt { margin: 32px 0 0; padding: 24px 0 0; border: 0; border-top: 1px solid #d6deec; border-radius: 0; background: transparent; }
.primary955-receipt > h3 { margin: 0 0 22px; color: #1c2840; font-size: 22px; line-height: 1.5; font-weight: 650; }
.primary955-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 28px; }
.primary955-fields > label { display: grid; gap: 7px; min-width: 0; margin: 0; font-size: 17px; font-weight: 400; color: #35415a; }
.primary955-fields > .full { grid-column: 1 / -1; }
.primary955-fields :where(input:not([type="checkbox"]), select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid #bfcadd; border-radius: 6px; background: #fff; color: #1f2a40; font-family: inherit; font-size: 18px; line-height: 1.4; box-shadow: none; }
.primary955-fields textarea { min-height: 78px; max-height: 200px; resize: vertical; }
.primary955-fields > .primary955-confirm { display: flex; align-items: center; gap: 11px; margin-top: 6px; color: #243149; cursor: pointer; }
.primary955-confirm > span { font-size: 17px; line-height: 1.6; }
.primary955-hint { margin: 0; color: #78849a; font-size: 16px; line-height: 1.7; }
.primary955-fields > .primary955-hint { margin-top: -9px; }
.primary955-form [hidden] { display: none !important; }
.primary955-form :is(input,select,textarea,button,summary):focus-visible { outline: 2px solid #465cf4; outline-offset: 3px; }
.primary955-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 30px; border-top: 1px solid #d6deec; background: #fff; }
.primary955-footer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.primary955-footer :is(.secondary-button,.primary-button) { min-height: 44px; padding: 10px 18px; border-radius: 6px; font-size: 17px; line-height: 1.4; font-weight: 500; white-space: nowrap; }
.primary955-footer .primary-button { color: #fff; background: #465cf4; border-color: #465cf4; }
.primary955-footer .primary-button:disabled { opacity: .55; cursor: not-allowed; }
.primary955-failure { margin: 0; padding: 4px 0; border: 0; background: none; color: #3956df; font-size: 14px; text-align: left; }
.primary955-failure:disabled { opacity: .5; cursor: not-allowed; }
.primary955-body > .form-status:empty { display: none; }
.primary955-body > .form-status { margin: 14px 0 0; font-size: 14px; }
.primary955-recovery { padding: 16px 0; border-bottom: 1px solid #e1e6ef; }
.primary955-recovery > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.primary955-recovery p { margin: 10px 0; font-size: 14px; }
.primary955-form .postal-remaining890-card { margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.primary955-form .postal-remaining890-items { margin-block: 10px; }
.primary955-form .postal-remaining890-item { min-height: 48px; border: 0; border-bottom: 1px solid #e2e6ee; border-radius: 0; padding: 9px 0; background: transparent; }
.primary955-form .postal-remaining890-item:has(input:checked) { border-color: #e2e6ee; background: transparent; }
@media (max-width: 680px) {
  #formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header { min-height: 92px; padding: 18px; }
  #formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header h2 { font-size: 22px; }
  #formModal:has(:is(#visitRemainingSelection875, #postalRemaining890Form)[data-primary-drawer955]) .modal-header h2 small { font-size: 14px; }
  .primary955-body { padding: 18px; }
  .primary955-context { margin-bottom: 18px; font-size: 13px; }
  .primary955-item-head,.primary955-item { grid-template-columns: minmax(0,1fr) auto; padding-inline: 12px; }
  .primary955-item > label { gap: 9px; }
  .primary955-item > label strong { font-size: 14px; }
  .primary955-sold > summary { grid-template-columns: minmax(0,1fr) auto; padding-left: 12px; gap: 8px 12px; }
  .primary955-sold > summary > strong { padding-left: 0; }
  .primary955-sold-detail { padding-left: 12px; }
  .primary955-fields { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .primary955-receipt { margin-top: 24px; padding-top: 20px; }
  .primary955-receipt > h3 { font-size: 18px; margin-bottom: 18px; }
  .primary955-footer { align-items: stretch; flex-direction: column-reverse; padding: 14px 18px; gap: 10px; }
  .primary955-footer-actions { flex-wrap: nowrap; gap: 10px; }
  .primary955-footer-actions > button { flex: 1; min-width: 0; padding-inline: 10px; font-size: 14px; white-space: normal; }
  .primary955-failure { align-self: flex-start; font-size: 13px; }
}

#formModal:has(#leadCustomerReturnForm) {
  z-index: 150;
  padding: 16px;
}

#formModal:has(#leadCustomerReturnForm) .modal-panel { width: min(1040px, 100%); }
#formModal:has(#leadCustomerReturnForm) .modal-header { padding: 12px 24px; gap: 12px; }
#formModal:has(#leadCustomerReturnForm) .modal-body { padding: 20px 24px 16px; }
#formModal:has(#leadCustomerReturnForm) #formModalTitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  row-gap: 4px;
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.customer-return-current-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.customer-return-current-owner strong { color: var(--text); font-weight: 600; }

.customer-return-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 24px;
}
.customer-return-form > .full { grid-column: 1 / -1; }
.customer-return-form > label, .customer-return-upload label { color: var(--text); font-size: 13px; font-weight: 600; }
.customer-return-form label > small, .customer-return-form label span > small { color: var(--muted); font-size: 12px; font-weight: 400; }
.customer-return-form > label > :is(input, select, textarea) { min-height: 38px; font-weight: 400; }
.customer-return-form > label > textarea { resize: vertical; }
.customer-return-required { color: #ba2e3c; }

.customer-return-methods {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.customer-return-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.customer-return-choice {
  position: relative;
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-align: center;
  align-content: center;
  justify-items: center;
  gap: 3px;
  color: var(--text);
  background: #fff;
}
.customer-return-choice > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.customer-return-choice > input:disabled { cursor: wait; }
.customer-return-choice > strong { font-size: 17px; }
.customer-return-choice:has(:checked) { border-color: #315aee; color: #294bd6; background: #eef2ff; }
.customer-return-choice:hover { border-color: #627be5; }
.customer-return-choice:has(:focus-visible) { outline: 2px solid #315aee; outline-offset: 2px; }

.customer-return-promoter { max-width: 460px; }
div.customer-return-promoter { display: flex; gap: 8px; align-items: center; font-size: 13px; }
div.customer-return-promoter > span { color: var(--muted); }
.customer-return-upload {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.customer-return-upload label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}
.customer-return-quote-upload { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.customer-return-upload input[type="file"] {
  width: min(328px, 100%);
  padding: 0;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.customer-return-upload input[type="file"]::file-selector-button {
  margin: 0 8px 0 0;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.customer-return-quote-upload [data-quote-conversion-status] { font-size: 12px; }

#formModal .customer-return-help,
.pledge-order-table .pledge-handoff-help {
  flex: 0 0 var(--crm-help-target-size);
  width: var(--crm-help-target-size);
  height: var(--crm-help-target-size);
  min-height: var(--crm-help-target-size);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4861ba;
}
:is(.customer-return-help, .pledge-handoff-help) > .secondary891-tooltip { display: none !important; }
#leadCustomerReturnFormStatus:empty { display: none; }

.customer-return-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.customer-return-footer .form-actions { display: flex; gap: 8px; margin: 0; }
.customer-return-footer .form-actions button { white-space: nowrap; }
.customer-return-destination { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; }
.customer-return-destination > span:first-child { color: var(--muted); }
.visit-customer-method { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; }
.visit-method-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eaf1ff;
  color: #26489b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.visit-method-badge[data-method="到店"] { background: #efebff; color: #5c409d; }
.visit-method-badge[data-method="邮寄"] { background: #e9f2f3; color: #285e64; }

@media (max-width: 620px) {
  #formModal:has(#leadCustomerReturnForm) { padding: 10px; }
  #formModal:has(#leadCustomerReturnForm) .modal-panel { max-height: calc(100dvh - 20px); }
  #formModal:has(#leadCustomerReturnForm) :is(.modal-header, .modal-body) { padding-inline: 15px; }
  .customer-return-current-owner { border-inline-start: 0; padding-left: 0; }
  .customer-return-form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .customer-return-methods, .customer-return-upload { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .customer-return-choices { gap: 6px; }
  .customer-return-choice { min-height: 66px; padding-inline: 4px; }
  .customer-return-choice > small { max-width: 100%; }
  .customer-return-footer { flex-wrap: wrap; }
  .customer-return-footer .form-actions { margin-left: auto; }
}
